@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&family=Inter:wght@700;800;900&display=swap');

:root {
  --bg:     #050816;
  --card:   #111f3b;
  --muted:  #c2cee0;
  --text:   #ffffff;
  --border: #20375c;
  --accent: #f4b53f;
  --ok:     #42d392;
  --danger: #ff5c7a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* ── BACKGROUND ── */
.bg-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg-layer::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(24,39,83,0.9) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(244,181,63,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 100% 80% at 50% 50%, #050816 40%, #02030a 100%);
}
.bg-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(32,55,92,0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32,55,92,0.22) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 80%);
}

/* ── LAYOUT ── */
.page { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: 0 24px 64px; }

/* ── HEADER ── */
.header { padding: 36px 0 32px; }

.brand-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.brand-left { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 58px; width: auto; }
.brand-right { display: flex; align-items: center; gap: 14px; }

.back-link {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid rgba(32,55,92,.7);
  border-radius: 999px;
  transition: color .15s, border-color .15s;
}
.back-link:hover { color: var(--text); border-color: rgba(194,206,224,.4); }

.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }

.hero-eyebrow {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.hero-eyebrow::before { content: ''; display: block; width: 24px; height: 1px; background: var(--accent); opacity: .7; }

.hero-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin-bottom: 12px;
}
.hero-title span { color: var(--accent); }

.hero-sub { font-size: 14px; line-height: 1.6; color: var(--muted); font-weight: 300; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(32,55,92,.9) 20%, rgba(32,55,92,.9) 80%, transparent);
  margin: 0 0 28px;
}

/* ── USER BAR ── */
.user-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-bar-name { font-size: 13px; font-weight: 500; color: rgba(194,206,224,.8); }
.user-bar-role {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.user-bar-role--admin  { background: rgba(244,181,63,.15); border: 1px solid rgba(244,181,63,.4); color: #f4b53f; }
.user-bar-role--member { background: rgba(66,211,146,.1);  border: 1px solid rgba(66,211,146,.35); color: #42d392; }
.user-bar-role--guest  { background: rgba(194,206,224,.08); border: 1px solid rgba(194,206,224,.2); color: rgba(194,206,224,.5); }

.btn-logout {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,92,122,.3);
  background: transparent;
  color: rgba(255,92,122,.7);
  font-size: 12px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-logout:hover { background: rgba(255,92,122,.1); color: #ff5c7a; border-color: rgba(255,92,122,.5); }

/* ── BUTTONS ── */
.btn {
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn--ghost { background: transparent; border: 1px solid rgba(32,55,92,.8); color: var(--muted); }
.btn--ghost:hover { background: rgba(32,55,92,.4); color: var(--text); }
.btn--accent { background: var(--accent); border: none; color: #0a1630; font-family: 'Syne', sans-serif; font-weight: 700; }
.btn--accent:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(244,181,63,.35); }
.btn:disabled { opacity: .4; cursor: default; transform: none; box-shadow: none; }

/* ── CARDS / CONTENT ── */
.content { display: flex; flex-direction: column; gap: 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.coord-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(3,7,18,.45);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  margin-bottom: 16px;
}
.coord-select:focus { outline: none; border-color: rgba(244,181,63,.6); }

.dropzone {
  padding: 22px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(194,206,224,.6);
  background: rgba(3,7,18,.45);
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
  margin-bottom: 16px;
}
.dropzone.dragover { border-style: solid; border-color: rgba(244,181,63,.9); background: rgba(244,181,63,.06); }
.dropzone-text { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.selected-file-label { display: block; margin-top: 10px; font-size: 12px; color: var(--text); word-break: break-all; }

.upload-btn { width: 100%; }

.upload-status {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.5;
  padding: 10px 12px;
  border-radius: 8px;
}
.upload-status--working { color: var(--muted); background: rgba(194,206,224,.06); }
.upload-status--ok      { color: #6be3ae; background: rgba(66,211,146,.1); }
.upload-status--error   { color: #ff8fa3; background: rgba(255,92,122,.1); }

/* ── RECENT FILES LIST ── */
.recent-list { display: flex; flex-direction: column; gap: 10px; }
.recent-empty { font-size: 13px; color: rgba(194,206,224,.4); text-align: center; padding: 12px 0; }

.recent-row {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(3,7,18,.35);
}
.recent-row-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.recent-filename { font-size: 13px; font-weight: 500; word-break: break-all; }
.recent-row-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; color: rgba(194,206,224,.55); }

.status-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
.status-badge--muted  { background: rgba(194,206,224,.08); border: 1px solid rgba(194,206,224,.25); color: rgba(194,206,224,.7); }
.status-badge--ok     { background: rgba(66,211,146,.1);   border: 1px solid rgba(66,211,146,.35);  color: #42d392; }
.status-badge--danger { background: rgba(255,92,122,.1);   border: 1px solid rgba(255,92,122,.35);  color: #ff5c7a; }

/* ── LOCKED SCREEN ── */
.locked-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  text-align: center;
  padding: 24px;
}
.locked-icon { font-size: 48px; }
.locked-title { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 700; color: #fff; }
.locked-body { max-width: 380px; line-height: 1.65; color: rgba(194,206,224,.7); }
.locked-back { color: var(--accent); text-decoration: none; font-size: 14px; }
