@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Share+Tech+Mono&display=swap');

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

:root {
  --bg:          #090c07;
  --bg-sidebar:  #0c0f08;
  --bg-card:     #0e1209;
  --bg-card2:    #121709;
  --border:      #1c2512;
  --border-hi:   #2e3e18;
  --accent:      #8da020;
  --accent-hi:   #aac424;
  --gold:        #c9a42c;
  --gold-hi:     #e8c030;
  --purple:      #6530b8;
  --purple-hi:   #9060e0;
  --text:        #c8d2be;
  --text-muted:  #8e9e7e;
  --text-bright: #edf3e6;
  --green-ok:    #40c020;
  --sidebar-w:   218px;
  --header-h:    52px;
  --bg-input:    #0b0e08;
  --red:         #c03020;
  --red-bg:      #c0302015;
}

html, body {
  height: 100%;
  font-family: 'Rajdhani', 'Segoe UI', sans-serif;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
}

/* ─── App shell ─── */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ─────────────────────────────────────
   SIDEBAR
───────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 2px; }

.sidebar-brand {
  padding: 1.4rem 1.2rem 1.1rem;
  border-bottom: 1px solid var(--border);
  user-select: none;
}

.brand-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-void {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-bright);
  line-height: 1;
  text-shadow: 0 0 24px #8da02033;
}

.brand-icon {
  display: flex;
  align-items: center;
  opacity: 0.6;
}

.brand-divider {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.35rem 0;
}
.brand-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.brand-diamond {
  font-size: 0.5rem;
  color: var(--accent);
}

.brand-frontier {
  font-size: 0.7rem;
  letter-spacing: 0.38em;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 600;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 0.4rem 0;
}

.nav-section {
  margin-top: 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.58rem 1.2rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-left: 2px solid transparent;
  transition: color 0.13s, background 0.13s, border-color 0.13s;
}
.nav-item:hover {
  color: var(--text);
  background: #ffffff04;
  border-left-color: var(--border-hi);
}
.nav-item.active {
  color: var(--accent-hi);
  background: #8da02015;
  border-left-color: var(--accent);
}
.nav-item svg { flex-shrink: 0; }

.nav-fa-icon {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  font-size: 0.8rem;
}

/* Sidebar status */
.sidebar-status {
  padding: 0.9rem 1.2rem;
  border-top: 1px solid var(--border);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.status-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}
.status-online { color: var(--green-ok); font-weight: 700; }
.status-label { font-size: 0.62rem; color: var(--text-muted); margin-top: 0.1rem; }
.status-time {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1;
}
.status-date { font-size: 0.64rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ─────────────────────────────────────
   MAIN WRAPPER
───────────────────────────────────── */
.main-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─────────────────────────────────────
   TOP HEADER
───────────────────────────────────── */
.top-header {
  height: var(--header-h);
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: 0.5rem;
  flex-shrink: 0;
}

.menu-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.menu-btn:hover { color: var(--text); }

/* Three bars that animate to an X when the sidebar is open */
.ham-bar {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transform-origin: center;
  pointer-events: none;
  transition: transform 0.24s ease, opacity 0.2s ease, width 0.2s ease;
}
.menu-btn.active .ham-bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-btn.active .ham-bar:nth-child(2) { opacity: 0; width: 0; }
.menu-btn.active .ham-bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.header-stats {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 0;
}

.hstat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  border-right: 1px solid var(--border);
}
.hstat:first-child { padding-left: 0; }

.hstat-icon { font-size: 1rem; flex-shrink: 0; line-height: 1; }

.hstat-text { display: flex; flex-direction: column; gap: 1px; }

.hstat-label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  line-height: 1;
}

.hstat-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1;
  letter-spacing: 0.02em;
}
.hstat-value.gold    { color: var(--gold); }
.hstat-value.avail   { color: var(--accent-hi); }

.xp-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.xp-bar-track {
  height: 3px;
  width: 70px;
  background: var(--border);
  border-radius: 2px;
}
.xp-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.player-menu-wrap {
  position: relative;
  margin-left: auto;
}

.header-player {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.13s;
}
.header-player:hover,
.header-player.active { border-color: var(--border-hi); background: #ffffff03; }

.player-avatar {
  width: 34px;
  height: 34px;
  border-radius: 2px;
  background: var(--bg-card2);
  border: 1px solid var(--border-hi);
  overflow: hidden;
  flex-shrink: 0;
}

.player-info { display: flex; flex-direction: column; gap: 1px; }

.player-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.06em;
  line-height: 1;
}

.player-class {
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.player-chevron {
  color: var(--text-muted);
  font-size: 0.7rem;
  display: inline-block;
  transition: transform 0.2s ease;
}
.header-player.active .player-chevron { transform: rotate(180deg); }

/* ─────────────────────────────────────
   PLAYER DROPDOWN
───────────────────────────────────── */
.player-dropdown {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  width: 256px;
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: 3px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.72), 0 0 0 1px #8da02012;
  z-index: 500;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.player-dropdown.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
/* Small caret pointing up to the trigger */
.player-dropdown::before {
  content: '';
  position: absolute;
  top: -5px;
  right: 22px;
  width: 9px;
  height: 9px;
  background: var(--bg-card2);
  border-left: 1px solid var(--border-hi);
  border-top: 1px solid var(--border-hi);
  transform: rotate(45deg);
}

/* Identity header */
.pd-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card2);
}
.pd-head-avatar {
  flex-shrink: 0;
  border: 1px solid var(--border-hi);
  border-radius: 2px;
  overflow: hidden;
  line-height: 0;
}
.pd-head-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.pd-head-class {
  font-size: 0.63rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.15rem;
}

/* Stats grid */
.pd-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}
.pd-stat {
  padding: 0.6rem 0.5rem;
  text-align: center;
  border-right: 1px solid var(--border);
}
.pd-stat:last-child { border-right: none; }
.pd-stat-label {
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.18rem;
}
.pd-stat-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-bright);
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.02em;
}
.pd-gold { color: var(--gold); }

/* XP bar */
.pd-xp-wrap {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}
.pd-xp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.38rem;
}
.pd-xp-pct { color: var(--accent-hi); }
.pd-xp-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.pd-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi));
  border-radius: 2px;
  box-shadow: 0 0 6px #aac42450;
}
.pd-xp-sub {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  letter-spacing: 0.03em;
}

/* Action links */
.pd-actions { padding: 0.3rem 0; }
.pd-action {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.pd-action i { color: var(--text-muted); transition: color 0.12s; }
.pd-action:hover { background: #ffffff07; color: var(--text-bright); }
.pd-action:hover i { color: var(--accent); }
.pd-action-danger:hover { background: #c0302012; color: #e06050; }
.pd-action-danger:hover i { color: #c03020; }
/* Thin rule above action list */
.pd-actions { border-top: 1px solid var(--border); }

/* ─────────────────────────────────────
   PAGE CONTENT
───────────────────────────────────── */
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}
.page-content::-webkit-scrollbar { width: 5px; }
.page-content::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }

/* ─────────────────────────────────────
   DASHBOARD
───────────────────────────────────── */
.dashboard { display: flex; flex-direction: column; gap: 0.9rem; }

/* ── Hero ── */
.hero {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  min-height: 190px;
  display: flex;
  align-items: flex-end;
  padding: 1.75rem 2rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, #090c07 35%, rgba(20,35,10,0.95) 65%, rgba(30,50,15,0.8) 100%),
    radial-gradient(ellipse 80% 120% at 85% 60%, #1e3810 0%, transparent 60%);
}

.hero-city {
  position: absolute;
  right: 0;
  top: 0;
  width: 55%;
  height: 100%;
  background:
    linear-gradient(to left, transparent 0%, #090c07 100%),
    repeating-linear-gradient(90deg, #0a120600 0px, #0a120600 30px, #0c150800 30px, #0c150800 31px),
    repeating-linear-gradient(0deg, #0a120600 0px, #0a120600 20px, #0c150800 20px, #0c150800 21px),
    linear-gradient(170deg, #101a08 0%, #1a2e10 40%, #0a1206 100%);
  opacity: 0.7;
}

/* Silhouette figure */
.hero-city::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 18%;
  width: 60px;
  height: 140px;
  background: #060908;
  clip-path: polygon(30% 0%, 70% 0%, 75% 30%, 90% 30%, 90% 45%, 75% 45%, 80% 100%, 20% 100%, 25% 45%, 10% 45%, 10% 30%, 25% 30%);
  opacity: 0.9;
  filter: blur(0.5px);
}

.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 40% 60% at 75% 80%, #2a5010 0%, transparent 60%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero-welcome {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}

.hero-name {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--accent-hi);
  letter-spacing: 0.05em;
  line-height: 1;
  margin-bottom: 0.6rem;
  text-shadow: 0 0 40px #aac42433;
}

.hero-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 1.3rem;
  line-height: 1.7;
  max-width: 340px;
}

.hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.58rem 1.4rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.13s;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #080a06;
  border: 1px solid var(--accent-hi);
}
.btn-primary:hover {
  background: var(--accent-hi);
  box-shadow: 0 0 18px #8da02044;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-hi);
}
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text-bright); }
.btn-sm { padding: 0.35rem 0.9rem; font-size: 0.72rem; }

/* ── Grid rows ── */
.card-row { display: grid; gap: 0.9rem; }
.cols-4   { grid-template-columns: repeat(4, 1fr); }
.cols-3   { grid-template-columns: 1.1fr 1.9fr 1.1fr; }

/* ── Base card ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: border-color 0.15s;
}
.card:hover { border-color: var(--border-hi); }

.card-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title svg { color: var(--text-muted); cursor: pointer; }
.card-title svg:hover { color: var(--text); }

/* ── World Event ── */
.event-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.04em;
}
.event-orb {
  width: 26px;
  height: 26px;
  background: radial-gradient(circle at 35% 35%, var(--purple-hi), var(--purple) 60%, #2a1060);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: 0 0 10px #6530b866;
}

.event-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.progress-track {
  background: var(--border);
  border-radius: 2px;
  height: 5px;
}
.progress-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--purple) 0%, var(--purple-hi));
  box-shadow: 0 0 8px #6530b855;
}

.progress-meta {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.progress-count {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--purple-hi);
}
.progress-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  flex: 1;
}

.next-event-box {
  margin-top: auto;
  background: #ffffff04;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.5rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ne-orb {
  width: 22px;
  height: 22px;
  background: radial-gradient(circle at 35% 35%, var(--purple-hi), #3a1080);
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px #6530b866;
}
.ne-text { flex: 1; }
.ne-label {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.ne-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-hi);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ne-timer {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-bright);
  letter-spacing: 0.04em;
}

/* ── Missions ── */
.mission-list { display: flex; flex-direction: column; gap: 0.6rem; }

.mission-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.mission-item:last-child { border-bottom: none; padding-bottom: 0; }

.mission-thumb {
  width: 30px;
  height: 30px;
  border-radius: 2px;
  background: var(--bg-card2);
  border: 1px solid var(--border-hi);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.mission-info { flex: 1; min-width: 0; }

.mission-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-bright);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mission-prog {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.06em;
  margin-top: auto;
  align-self: flex-start;
}
.view-all-link:hover { color: var(--accent-hi); }

/* ── News ── */
.news-list { display: flex; flex-direction: column; gap: 0.6rem; }

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.news-item:last-child { border-bottom: none; padding-bottom: 0; }

.news-orb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  margin-top: 1px;
}
.news-orb.purple { background: radial-gradient(circle at 35% 35%, var(--purple-hi), #2a1060); box-shadow: 0 0 8px #6530b844; }
.news-orb.gold   { background: radial-gradient(circle at 35% 35%, var(--gold-hi), #4a2c08);  box-shadow: 0 0 8px #c9a42c44; }
.news-orb.green  { background: radial-gradient(circle at 35% 35%, var(--accent-hi), #2a4008); box-shadow: 0 0 8px #8da02044; }

.news-body {}
.news-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-bright);
  line-height: 1.2;
}
.news-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  line-height: 1.45;
}

/* ── Quick Actions ── */
.action-list { display: flex; flex-direction: column; gap: 0.38rem; }

.action-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 2px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.13s;
}
.action-link:hover {
  border-color: var(--accent);
  color: var(--accent-hi);
  background: #8da02010;
}

/* ── Leaderboard ── */
.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.lb-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.09em;
  padding: 0.25rem 0.4rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.64rem;
  text-transform: uppercase;
}
.lb-table td {
  padding: 0.48rem 0.4rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.lb-table tr:last-child td { border-bottom: none; }
.lb-table tr.you td { color: var(--accent-hi); background: #8da02010; }
.lb-rank { color: var(--text-muted); font-size: 0.75rem; }
.lb-crown { font-size: 0.68rem; }
.lb-level { text-align: center; color: var(--text-muted); }
.lb-xp { text-align: right; color: var(--gold); font-weight: 700; font-family: 'Share Tech Mono', monospace; font-size: 0.74rem; }

/* ── Systems Overview ── */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
}

.sys-thumb {
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s;
}
.sys-thumb:hover { border-color: var(--accent); }

.sys-img {
  height: 75px;
  position: relative;
  overflow: hidden;
}

.sys-img-research {
  background: linear-gradient(145deg, #0a1808, #142a0c, #1e3e14);
}
.sys-img-research::after {
  content: '⚗';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  opacity: 0.35;
  color: var(--accent-hi);
  text-shadow: 0 0 15px var(--accent);
}

.sys-img-implants {
  background: linear-gradient(145deg, #080a14, #10162a, #1a2040);
}
.sys-img-implants::after {
  content: '◎';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  opacity: 0.4;
  color: #6090ff;
  text-shadow: 0 0 15px #4060ff;
}

.sys-img-missions {
  background: linear-gradient(145deg, #100e08, #201a0a, #2c2410);
}
.sys-img-missions::after {
  content: '⬡';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  opacity: 0.4;
  color: var(--gold-hi);
  text-shadow: 0 0 15px var(--gold);
}

.sys-img-world {
  background: linear-gradient(145deg, #0a1208, #14200c, #1e3018);
}
.sys-img-world::after {
  content: '◉';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  opacity: 0.4;
  color: var(--accent-hi);
  text-shadow: 0 0 15px var(--accent);
}

.sys-label {
  padding: 0.38rem 0.4rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-card2);
  border-top: 1px solid var(--border);
  line-height: 1.3;
}

/* ── Community ── */
.community-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.social-row { display: flex; gap: 0.5rem; }

.social-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.13s;
  font-size: 0.95rem;
}
.social-btn:hover { border-color: var(--border-hi); background: #ffffff05; }

.social-discord { color: #5865f2; }
.social-reddit  { color: #ff4500; }
.social-twitch  { color: #9146ff; }

.guild-banner {
  flex: 1;
  border-radius: 2px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: linear-gradient(160deg, #0a100a, #142814, #1e3c1a, #0c1a0c);
  position: relative;
  min-height: 90px;
}
.guild-banner::before {
  content: '⚜';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #c9a42c55;
  text-shadow: 0 0 20px #c9a42c55;
}
.guild-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, #1a3c1055, transparent);
}

.join-btn {
  width: 100%;
  padding: 0.55rem;
  background: transparent;
  border: 1px solid var(--border-hi);
  border-radius: 2px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.13s;
}
.join-btn:hover {
  border-color: #5865f2;
  color: #8899ff;
  background: #5865f210;
}

/* ── Bottom Banner ── */
.frontier-banner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 1.4rem 2rem;
  gap: 2.5rem;
  position: relative;
}

.banner-right-art {
  position: absolute;
  right: 0;
  top: 0;
  width: 35%;
  height: 100%;
  background: linear-gradient(to right, var(--bg-card), transparent);
  z-index: 1;
}
.banner-right-art::after {
  content: '';
  position: absolute;
  right: 15%;
  bottom: 0;
  width: 50px;
  height: 85%;
  background: #070908;
  clip-path: polygon(35% 0%, 65% 0%, 70% 25%, 85% 25%, 85% 45%, 70% 45%, 75% 100%, 25% 100%, 30% 45%, 15% 45%, 15% 25%, 30% 25%);
  opacity: 0.7;
  filter: blur(0.5px);
}

.banner-text { position: relative; z-index: 2; }

.banner-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-hi);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.banner-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.banner-stats {
  display: flex;
  gap: 2.5rem;
  position: relative;
  z-index: 2;
}

.bstat { text-align: center; }
.bstat-icon { font-size: 1.3rem; line-height: 1; margin-bottom: 0.3rem; color: var(--accent); }
.bstat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-hi);
  letter-spacing: 0.06em;
}
.bstat-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.1rem;
}

/* ─────────────────────────────────────
   SETTINGS PAGE
───────────────────────────────────── */
.settings-wrap {
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.settings-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  padding-top: 0.6rem;
  margin-top: 0.4rem;
  border-top: 1px solid var(--border);
}

/* Form field utilities (used on settings page and reusable elsewhere) */
.s-form-grid  { display: flex; flex-direction: column; gap: 0.8rem; }
.s-form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.s-form-group { display: flex; flex-direction: column; gap: 0.25rem; }

.s-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.s-input {
  width: 100%;
  background: #0b0e08;
  border: 1px solid var(--border-hi);
  border-radius: 2px;
  color: var(--text);
  padding: 0.55rem 0.7rem;
  font-family: inherit;
  font-size: 0.84rem;
  transition: border-color 0.13s, box-shadow 0.13s;
  box-sizing: border-box;
}
.s-input:focus          { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px #8da02018; }
.s-input::placeholder   { color: #1e2c10; }
.s-input[readonly]      { opacity: 0.45; cursor: default; }
.s-input.s-input-err    { border-color: #b04040; }
select.s-input          { cursor: pointer; appearance: none; }
select.s-input option   { background: #101509; }

.s-hint { font-size: 0.64rem; color: var(--text-muted); line-height: 1.4; }
.s-err  { font-size: 0.68rem; color: #c06050; display: flex; align-items: center; gap: 0.3rem; }

.s-alert {
  padding: 0.52rem 0.75rem;
  border-radius: 2px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}
.s-alert-ok  { background: #3cb02012; border: 1px solid #3cb02036; color: #60c840; }
.s-alert-err { background: #b0302012; border: 1px solid #b0302036; color: #d05040; }

/* Email verification UI */
.ev-notice {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text);
  padding: 0.6rem 0.8rem;
  background: #8da02010;
  border: 1px solid var(--border-hi);
  border-radius: 2px;
  margin-bottom: 0.35rem;
}
.ev-timer {
  font-size: 0.66rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.7rem;
}
.ev-timer.expiring { color: #c06040; }
.ev-code-input {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.6rem;
  letter-spacing: 0.45em;
  text-align: center;
  max-width: 230px;
}

/* Login history */
.activity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.77rem;
}
.activity-table th {
  text-align: left;
  font-size: 0.61rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.22rem 0.5rem;
  border-bottom: 1px solid var(--border);
}
.activity-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.activity-table tr:last-child td { border-bottom: none; }
.at-ok   { color: var(--accent-hi); }
.at-fail { color: #c04030; }
.at-ua   { color: var(--text-muted); font-size: 0.72rem; }

/* ─────────────────────────────────────
   SIDEBAR BACKDROP
───────────────────────────────────── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 199;
  cursor: pointer;
}
.sidebar-backdrop.active { display: block; }

/* ─────────────────────────────────────
   RESPONSIVE BREAKPOINTS
   Hierarchy (each block adds to / overrides previous):
   1600px+   large desktop   — default styles, nothing overridden
   992–1200  laptop          — 2×2 card grid, 2 header stats
   768–991   tablet          — sidebar overlay, hamburger, full-width header
   369–767   mobile          — phone layout, 2-col cards, compact nav
   0–368     small mobile    — 1-col everything, minimal header
───────────────────────────────────── */

/* Desktop: hamburger is never needed — hide it */
@media (min-width: 992px) {
  .menu-btn { display: none; }
}

/* ──────────────────────────────────────
   992px – 1200px  (Laptop)
   Sidebar occupies 218 px; content area is 774–982 px wide.
   4-col card grid → 2×2 so each card stays readable.
   Keep only Gold + XP in header bar (less horizontal space).
   3-col row is fine as-is at these widths.
────────────────────────────────────── */
@media (max-width: 1200px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .header-stats .hstat:nth-child(n+3) { display: none; }
}

/* ──────────────────────────────────────
   768px – 991px  (Tablet)
   Sidebar leaves the flow and becomes a slide-in overlay.
   Header is now full-width → restore all 4 stats.
   Nav compacted so all 15 items fit in portrait height with no scroll.
────────────────────────────────────── */
@media (max-width: 991px) {
  /* Sidebar overlay */
  .sidebar {
    position: fixed;
    left: 0; top: 0;
    height: 100%;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 48px rgba(0, 0, 0, 0.8);
  }
  /* Nav compacted for no-scroll: status block removed, items tighter */
  .sidebar-status { display: none; }
  .sidebar-brand  { padding: 0.8rem 1.1rem; }
  .brand-void     { font-size: 1.7rem; }
  .nav-item       { padding: 0.44rem 1.1rem; }

  /* Main wrapper fills the entire viewport width */
  .main-wrapper { width: 100%; }

  /* Sidebar is gone from flow → full-width header → restore 2 hidden stats */
  .header-stats .hstat:nth-child(n+3) { display: flex; }

  /* 3-col: leaderboard + systems side-by-side, community below */
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 > *:last-child { grid-column: 1 / -1; }

  /* Bottom banner: vertical stack */
  .frontier-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.2rem 1.5rem;
  }
  .banner-right-art { display: none; }
  .banner-stats     { gap: 1.5rem; }
}

/* ──────────────────────────────────────
   369px – 767px  (Mobile)
   Sidebar still overlay. Header narrower; show only Gold + XP.
   4-col stays 2×2 (inherited). 3-col collapses to single column.
   Nav items further reduced for typical 667–812 px portrait heights.
────────────────────────────────────── */
@media (max-width: 767px) {
  .page-content { padding: 0.7rem; }
  .dashboard    { gap: 0.7rem; }
  .top-header   { padding: 0 0.75rem; }

  /* Show Gold + XP only */
  .header-stats .hstat:nth-child(n+3) { display: none; }

  /* 3-col → single column */
  .cols-3 { grid-template-columns: 1fr; }
  .cols-3 > *:last-child { grid-column: auto; }

  /* Nav: smaller for phone-height viewports */
  .sidebar-brand { padding: 0.65rem 1rem; }
  .brand-void    { font-size: 1.5rem; }
  .nav-item      { padding: 0.36rem 1rem; font-size: 0.78rem; gap: 0.6rem; }

  /* Hero */
  .hero      { padding: 1.2rem 1.25rem; min-height: 150px; }
  .hero-desc { display: none; }
  .btn       { padding: 0.48rem 0.9rem; font-size: 0.74rem; }

  /* Event timer can't stretch across a 170px card — let it wrap */
  .next-event-box { flex-wrap: wrap; gap: 0.5rem; }
  .ne-timer       { margin-left: auto; font-size: 0.76rem; }

  /* Banner */
  .banner-stats { flex-wrap: wrap; gap: 1rem; }
  .bstat        { flex: 1 1 80px; }

  /* Settings: two-col form rows collapse to single column */
  .s-form-row-2 { grid-template-columns: 1fr; }
}

/* ──────────────────────────────────────
   0px – 368px  (Small mobile)
   Everything single column. Header stats hidden; player widget only.
   Nav maximally compacted for 568px-tall iPhone SE portrait height.
────────────────────────────────────── */
@media (max-width: 368px) {
  .page-content { padding: 0.5rem; }
  .dashboard    { gap: 0.5rem; }
  .top-header   { padding: 0 0.55rem; gap: 0.3rem; }

  /* Player widget only — no room for stat pills */
  .header-stats { display: none; }

  /* Everything single column */
  .cols-4 { grid-template-columns: 1fr; }
  /* cols-3 is already 1fr from the 767px block */

  /* Nav: tightest possible without losing legibility */
  .sidebar       { width: 200px; }
  .sidebar-brand { padding: 0.5rem 0.85rem; }
  .brand-void    { font-size: 1.3rem; }
  .brand-frontier{ letter-spacing: 0.18em; }
  .brand-divider { margin: 0.2rem 0; }
  .nav-item      { padding: 0.28rem 0.85rem; font-size: 0.72rem; gap: 0.5rem; }
  .nav-fa-icon   { font-size: 0.72rem; }

  /* Systems overview: 2×2 inside its full-width card */
  .systems-grid { grid-template-columns: repeat(2, 1fr); }

  /* Hero */
  .hero      { min-height: 130px; padding: 0.9rem; }
  .hero-name { font-size: 1.9rem; }
  .hero-actions .btn:last-child { display: none; }

  /* Cards */
  .card     { padding: 0.65rem; gap: 0.5rem; }
  .card-row { gap: 0.5rem; }
}


/* ═════════════════════════════════════════════════════════════
   PRE-AUTH PAGES
   Landing page, login, beta-signup, confirm-password, admin tool
═════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────
   SHARED: Starfield, nebula base, body variants
───────────────────────────────────── */

/* Animated starfield canvas */
#stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

/* Nebula glow base — each page sets position/size/color below */
.nebula {
  position: fixed;
  border-radius: 50%;
  filter: blur(85px);
  pointer-events: none;
  z-index: 0;
}

/* ── Landing page nebulas ── */
.pg-landing .nebula-1 {
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, #2a4a1022 0%, transparent 70%);
  top: -100px; left: -100px;
}
.pg-landing .nebula-2 {
  width: 500px; height: 500px;
  background: radial-gradient(ellipse, #6530b818 0%, transparent 70%);
  bottom: -80px; right: 5%;
}
.pg-landing .nebula-3 {
  width: 350px; height: 350px;
  background: radial-gradient(ellipse, #8da02010 0%, transparent 70%);
  top: 40%; left: 55%;
}

/* ── Login page nebulas ── */
.pg-login .nebula-1 {
  width: 500px; height: 400px;
  background: radial-gradient(ellipse, #2a4a1018 0%, transparent 70%);
  top: -80px; left: 10%;
}
.pg-login .nebula-2 {
  width: 400px; height: 400px;
  background: radial-gradient(ellipse, #6530b812 0%, transparent 70%);
  bottom: -60px; right: 5%;
}

/* ── Beta signup page nebulas ── */
.pg-signup .nebula-1 {
  width: 500px; height: 400px;
  background: radial-gradient(ellipse, #2a4a1018 0%, transparent 70%);
  top: -80px; right: 10%;
}
.pg-signup .nebula-2 {
  width: 400px; height: 400px;
  background: radial-gradient(ellipse, #6530b812 0%, transparent 70%);
  bottom: -60px; left: 5%;
}

/* Scanline texture — landing page only */
body.pg-landing::after {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px, transparent 3px,
    #00000008 3px, #00000008 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* Confirm-password page: body is the full-viewport flex centerer */
body.pg-confirm {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

/* Admin tool page: body centres the single card */
body.pg-admin-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

/* ─────────────────────────────────────
   SHARED: Pre-auth nav bar & page body
───────────────────────────────────── */

.page-nav {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.nav-brand {
  font-size: 0.9rem; font-weight: 700; letter-spacing: 0.25em;
  text-transform: uppercase; text-decoration: none; color: var(--text-muted);
}
.nav-brand span { color: var(--accent); }
.nav-back,
.nav-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted);
  text-decoration: none; transition: color 0.13s;
}
.nav-back:hover,
.nav-link:hover { color: var(--accent-hi); }

.page-body {
  position: relative; z-index: 2;
  min-height: calc(100vh - 57px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2.5rem 1.5rem;
}

/* ─────────────────────────────────────
   LANDING PAGE (index.html)
───────────────────────────────────── */

/* Fixed splash nav */
.splash-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, #090c07cc, transparent);
  backdrop-filter: blur(4px);
}
.splash-nav .nav-brand { font-size: 1rem; }

.nav-login {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
  text-decoration: none; border: 1px solid var(--border);
  padding: 0.4rem 0.9rem; border-radius: 2px; transition: all 0.15s;
}
.nav-login:hover { color: var(--accent-hi); border-color: var(--accent); background: #8da02010; }

/* Main centered content area */
.splash-main {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6rem 2rem 4rem; text-align: center;
}

/* Rotating crosshair emblem */
.emblem {
  animation: emblem-spin 40s linear infinite, fadeIn 1s ease both;
  margin-bottom: 1.8rem; opacity: 0.7;
}
@keyframes emblem-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Closed beta pill */
.access-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid #8da02044; padding: 0.3rem 0.9rem; border-radius: 2px;
  margin-bottom: 2rem; animation: fadeIn 0.8s 0.2s ease both; background: #8da02010;
}
.badge-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-hi); box-shadow: 0 0 6px var(--accent-hi);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* Logo block */
.splash-logo { animation: fadeIn 0.9s 0.35s ease both; margin-bottom: 1.5rem; }
.logo-void {
  font-size: clamp(4rem, 10vw, 7rem); font-weight: 700;
  letter-spacing: 0.2em; line-height: 0.9; color: var(--text-bright);
  text-shadow: 0 0 60px #aac42422, 0 0 120px #aac42411;
}
.logo-divider {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 0.6rem auto; max-width: 360px;
}
.logo-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.logo-diamond { font-size: 0.6rem; color: var(--accent); }
.logo-frontier {
  font-size: clamp(1rem, 2.5vw, 1.5rem); font-weight: 600;
  letter-spacing: 0.55em; text-transform: uppercase; color: var(--accent);
  text-shadow: 0 0 20px #aac42444;
}

/* Taglines */
.splash-tagline {
  font-size: clamp(1rem, 2.5vw, 1.3rem); color: var(--text); letter-spacing: 0.08em;
  margin-bottom: 0.4rem; animation: fadeIn 0.9s 0.5s ease both;
}
.splash-sub {
  font-size: 0.85rem; color: var(--text-muted); letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 2.5rem; animation: fadeIn 0.9s 0.6s ease both;
}

/* CTA row */
.splash-cta {
  display: flex; gap: 0.9rem; align-items: center; justify-content: center;
  flex-wrap: wrap; margin-bottom: 3rem; animation: fadeIn 0.9s 0.75s ease both;
}
.cta-btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 2.2rem; background: var(--accent); color: #080a06;
  border: 1px solid var(--accent-hi); border-radius: 2px;
  font-family: inherit; font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: all 0.15s; animation: cta-pulse 3s ease-in-out infinite;
}
.cta-btn:hover {
  background: var(--accent-hi); box-shadow: 0 0 30px #aac42466;
  transform: translateY(-2px); animation: none;
}
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 0 12px #8da02044; }
  50%       { box-shadow: 0 0 28px #aac42466; }
}
.ghost-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.85rem 1.8rem; background: transparent; color: var(--text);
  border: 1px solid var(--border-hi); border-radius: 2px;
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  transition: all 0.15s;
}
.ghost-btn:hover { border-color: var(--text-muted); color: var(--text-bright); }

/* Stats bar */
.splash-stats { display: flex; align-items: center; gap: 2rem; animation: fadeIn 0.9s 0.9s ease both; }
.sstat-val {
  font-size: 1.5rem; font-weight: 700; color: var(--accent-hi);
  line-height: 1; font-family: 'Share Tech Mono', monospace;
}
.sstat-label { font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 0.2rem; }
.sstat-sep { width: 1px; height: 36px; background: var(--border-hi); }

/* Fixed bottom footer */
.splash-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 2rem;
  border-top: 1px solid var(--border);
  background: linear-gradient(to top, #090c07cc, transparent);
  backdrop-filter: blur(4px);
  font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.06em;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; transition: color 0.13s; }
.footer-links a:hover { color: var(--accent); }

/* Shared fade-in animation (also used on login/signup) */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Landing responsive */
@media (max-width: 640px) {
  .splash-nav  { padding: 0.85rem 1rem; }
  .splash-main { padding: 5rem 1.25rem 90px; }
  .splash-cta  { gap: 0.6rem; }
  .cta-btn     { padding: 0.75rem 1.5rem; font-size: 0.82rem; }
  .ghost-btn   { padding: 0.75rem 1.2rem; font-size: 0.82rem; }
  .splash-stats { gap: 1rem; flex-wrap: wrap; justify-content: center; }
  .sstat-sep   { display: none; }
  .splash-footer {
    flex-direction: column; align-items: center;
    gap: 0.45rem; padding: 0.75rem 1rem; text-align: center;
  }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 0.9rem; }
}
@media (max-width: 400px) {
  .logo-frontier           { letter-spacing: 0.3em; }
  .splash-sub              { font-size: 0.76rem; }
  .splash-nav .nav-brand   { font-size: 0.85rem; }
}

/* ─────────────────────────────────────
   AUTH FORMS — Commander Login (login.php)
───────────────────────────────────── */

/* Card shells */
.login-card {
  width: 100%; max-width: 420px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 4px; overflow: hidden;
}
.signup-card {
  width: 100%; max-width: 500px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 4px; overflow: hidden;
}

/* Shared card chrome */
.card-header {
  padding: 1.5rem 1.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem;
}
.card-label {
  font-size: 0.62rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.1rem;
}

/* Pre-auth card title — scoped to avoid overriding dashboard .card-title */
.login-card .card-title,
.signup-card .card-title {
  font-size: 1.3rem; font-weight: 700; color: var(--text-bright); letter-spacing: 0.06em;
}
.login-card .card-title span,
.signup-card .card-title span { color: var(--accent-hi); }

.card-body { padding: 1.5rem 1.75rem; }
.login-card .card-body  { display: flex; flex-direction: column; gap: 1rem; }
.signup-card .card-body p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1.5rem; }

.card-footer {
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.74rem; color: var(--text-muted); text-align: center;
}
.card-footer a { color: var(--accent); text-decoration: none; }
.card-footer a:hover { color: var(--accent-hi); }

/* Error alert */
.alert-error {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  background: #c0302015; border: 1px solid #c0302044;
  border-radius: 2px; font-size: 0.8rem; color: #e06050;
}

/* Divider (the "or" row between form and signup link) */
.divider-row {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted);
}
.divider-row::before, .divider-row::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Form layout primitives */
.form-row    { display: grid; gap: 1rem; margin-bottom: 1rem; }
.form-row-2  { grid-template-columns: 1fr 1fr; }
.form-group  { display: flex; flex-direction: column; gap: 0.35rem; }
.form-label  { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.form-label .req { color: var(--accent); }

/* Text / email / password inputs */
.form-input {
  width: 100%; background: var(--bg-input);
  border: 1px solid var(--border-hi); border-radius: 2px;
  color: var(--text); padding: 0.62rem 0.75rem;
  font-family: inherit; font-size: 0.88rem;
  transition: border-color 0.13s, box-shadow 0.13s; appearance: none;
}
.form-input::placeholder { color: var(--border-hi); }
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px #8da02020; }
.form-input.error { border-color: var(--red); box-shadow: 0 0 0 2px #c0302018; }
textarea.form-input { resize: vertical; min-height: 90px; }
select.form-input { cursor: pointer; }
select.form-input option { background: #111609; }

/* Icon-in-input wrapper */
.input-wrap { position: relative; }
.input-icon {
  position: absolute; left: 0.75rem; top: 50%;
  transform: translateY(-50%); color: var(--text-muted);
  font-size: 0.8rem; pointer-events: none;
}
.input-wrap .form-input { padding-left: 2.2rem; }

/* Password visibility toggle */
.password-wrap { position: relative; }
.toggle-pw {
  position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 0.8rem; transition: color 0.13s;
}
.toggle-pw:hover { color: var(--accent); }

/* Remember-me + forgot-password row */
.form-footer-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.74rem; }
.remember-row { display: flex; align-items: center; gap: 0.4rem; color: var(--text-muted); cursor: pointer; }
.remember-row input { accent-color: var(--accent); cursor: pointer; }
.forgot-link { color: var(--text-muted); text-decoration: none; transition: color 0.13s; }
.forgot-link:hover { color: var(--accent); }

/* Field-level validation error */
.form-error { font-size: 0.7rem; color: var(--red); display: flex; align-items: center; gap: 0.3rem; }

/* Shared submit button */
.submit-btn {
  width: 100%; padding: 0.8rem 2rem; background: var(--accent); color: #080a06;
  border: 1px solid var(--accent-hi); border-radius: 2px;
  font-family: inherit; font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.submit-btn:hover  { background: var(--accent-hi); box-shadow: 0 0 20px #aac42444; }
.submit-btn:active { transform: translateY(1px); }

/* ─────────────────────────────────────
   BETA ACCESS SIGNUP (beta-signup.php)
───────────────────────────────────── */

.card-emblem { flex-shrink: 0; opacity: 0.8; }

/* Platform radio tile grid */
.platform-group { display: flex; gap: 0.5rem; }
.platform-option { flex: 1; }
.platform-option input[type="radio"] { display: none; }
.platform-label {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  padding: 0.65rem 0.5rem; background: var(--bg-input);
  border: 1px solid var(--border-hi); border-radius: 2px; cursor: pointer;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); transition: all 0.13s;
}
.platform-label i { font-size: 1rem; }
.platform-option input[type="radio"]:checked + .platform-label {
  border-color: var(--accent); color: var(--accent-hi);
  background: #8da02012; box-shadow: 0 0 0 1px #8da02030;
}
.platform-label:hover { border-color: var(--border-hi); color: var(--text); }

/* Terms & conditions checkbox */
.terms-row {
  display: flex; gap: 0.6rem; align-items: flex-start;
  padding: 0.9rem; border: 1px solid var(--border);
  border-radius: 2px; background: #ffffff04; margin-bottom: 1.25rem;
}
.terms-row.error { border-color: var(--red); background: var(--red-bg); }
.terms-row input[type="checkbox"] {
  width: 14px; height: 14px; accent-color: var(--accent);
  margin-top: 2px; flex-shrink: 0; cursor: pointer;
}
.terms-row label { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; cursor: pointer; }
.terms-row a { color: var(--accent); text-decoration: none; }
.terms-row a:hover { color: var(--accent-hi); }

/* Success state after submission */
.success-card {
  width: 100%; max-width: 500px;
  background: var(--bg-card); border: 1px solid var(--accent);
  border-radius: 4px; padding: 3rem 2rem; text-align: center;
  box-shadow: 0 0 40px #8da02015;
}
.success-icon    { font-size: 2.5rem; color: var(--accent-hi); margin-bottom: 1rem; display: block; }
.success-title   { font-size: 1.6rem; font-weight: 700; color: var(--text-bright); letter-spacing: 0.06em; margin-bottom: 0.4rem; }
.success-callsign{ font-size: 1.1rem; color: var(--accent-hi); font-weight: 700; letter-spacing: 0.1em; }
.success-body    { font-size: 0.85rem; color: var(--text-muted); margin: 1.25rem 0 2rem; line-height: 1.7; }
.success-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); margin: 1.5rem 0; }
.success-ref     { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }
.success-ref span{ font-family: 'Share Tech Mono', monospace; color: var(--accent); }
.back-home {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.5rem; border: 1px solid var(--border-hi); border-radius: 2px;
  color: var(--text); text-decoration: none; font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; transition: all 0.13s;
}
.back-home:hover { border-color: var(--accent); color: var(--accent-hi); }

/* Auth form responsive */
@media (max-width: 560px) {
  .page-nav    { padding: 0.85rem 1rem; }
  .page-body   { padding: 1.5rem 1rem; }
  .card-header { padding: 1.1rem 1.25rem 1rem; }
  .card-body   { padding: 1.25rem; }
  .card-footer { padding: 0.85rem 1.25rem; }
  .form-row-2  { grid-template-columns: 1fr; }
  .success-card{ padding: 2rem 1.25rem; }
}
@media (max-width: 480px) {
  .login-card .card-body { gap: 0.85rem; }
}

/* ─────────────────────────────────────
   CONFIRM PASSWORD PAGE (confirm-password.php)
───────────────────────────────────── */

.confirm-page { display: block; width: 100%; }

.confirm-wrap   { max-width: 440px; margin: 0 auto; }
.confirm-brand  { text-align: center; margin-bottom: 1.8rem; }
.confirm-brand-void {
  font-size: 2rem; font-weight: 700; color: var(--accent-hi);
  letter-spacing: 0.15em; line-height: 1;
}
.confirm-brand-frontier {
  font-size: 0.65rem; letter-spacing: 0.4em; color: var(--text-muted);
  text-transform: uppercase; margin-top: 0.1rem;
}
.confirm-card {
  background: var(--bg-card); border: 1px solid var(--border-hi);
  border-radius: 3px; overflow: hidden;
}
.confirm-card-top { padding: 0.25rem 0; height: 3px; }
.confirm-card-top.ok   { background: linear-gradient(90deg, #5a8010, #8da020, #5a8010); }
.confirm-card-top.warn { background: linear-gradient(90deg, #806010, #c0a020, #806010); }
.confirm-card-top.err  { background: linear-gradient(90deg, #801010, #c02020, #801010); }
.confirm-card-body { padding: 2rem 2rem 1.5rem; text-align: center; }
.confirm-icon { font-size: 2.4rem; margin-bottom: 0.9rem; line-height: 1; }
.confirm-icon.ok   { color: var(--accent-hi); }
.confirm-icon.warn { color: #c0a020; }
.confirm-icon.err  { color: #c04030; }
.confirm-title {
  font-size: 1.1rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-bright); margin-bottom: 0.6rem;
}
.confirm-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 1.5rem; }
.confirm-desc strong { color: var(--text); }
.confirm-card-footer { border-top: 1px solid var(--border); padding: 1rem 2rem; text-align: center; }

/* ─────────────────────────────────────
   ADMIN TOOL (tools/create-admin.php)
───────────────────────────────────── */

.tool-card {
  width: 100%; max-width: 480px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 4px; overflow: hidden;
}
.tool-card .card-header { padding: 1.2rem 1.5rem; }
.header-icon  { color: var(--gold); font-size: 1.3rem; }
.header-title { font-size: 1.2rem; font-weight: 700; color: var(--text-bright); letter-spacing: 0.05em; }
.header-sub   { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }

.warning-bar {
  background: #c9a42c18; border-bottom: 1px solid #c9a42c44;
  padding: 0.65rem 1.5rem;
  display: flex; align-items: center; gap: 0.55rem;
  font-size: 0.76rem; color: var(--gold);
}
.tool-card .card-body { display: flex; flex-direction: column; gap: 0.9rem; padding: 1.4rem 1.5rem; }
.tool-card .card-footer {
  padding: 0.9rem 1.5rem; border-top: 1px solid var(--border);
  font-size: 0.72rem; color: var(--text-muted); line-height: 1.6;
}
.tool-card .card-footer strong { color: var(--red); }

.alert { padding: 0.6rem 0.75rem; border-radius: 2px; display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.8rem; }
.alert-success { background: #40c02015; border: 1px solid #40c02044; color: #60d040; }

.hash-preview {
  background: var(--bg-input); border: 1px solid var(--border); border-radius: 2px;
  padding: 0.6rem 0.75rem; font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem; color: var(--text-muted); word-break: break-all; line-height: 1.5;
}
.hash-label { font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.25rem; }
