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

:root {
  --bg: #060810;
  --surface: #0d1220;
  --surface-2: #131a2c;
  --surface-3: #1a2338;
  --line: #243045;
  --line-bright: #364f6e;
  --text: #eef2f8;
  --muted: #8fa5c0;
  --gold: #ffc844;
  --gold-bright: #ffd970;
  --teal: #00e0c8;
  --blue: #5aabff;
  --pink: #ff4fa0;
  --green: #2eeb5c;
  --orange: #ff8c2e;
  --red: #ff5a5a;
  --purple: #c084ff;
  --shadow: 0 20px 60px rgba(0,0,0,0.6);
  --shadow-sm: 0 4px 20px rgba(0,0,0,0.4);
  --glow-teal: 0 0 28px rgba(0,224,200,0.35);
  --glow-gold: 0 0 28px rgba(255,200,68,0.35);
  --glow-blue: 0 0 28px rgba(90,171,255,0.35);
  --glow-purple: 0 0 28px rgba(192,132,255,0.35);
  --glow-pink: 0 0 28px rgba(255,79,160,0.35);
  --glow-green: 0 0 28px rgba(46,235,92,0.35);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.18s ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 8% 0%, rgba(0,224,200,0.20) 0%, transparent 38%),
    radial-gradient(ellipse at 92% 4%, rgba(90,171,255,0.18) 0%, transparent 34%),
    radial-gradient(ellipse at 50% 100%, rgba(192,132,255,0.13) 0%, transparent 48%),
    radial-gradient(ellipse at 75% 50%, rgba(255,79,160,0.07) 0%, transparent 40%),
    radial-gradient(ellipse at 20% 70%, rgba(46,235,92,0.05) 0%, transparent 35%);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }

/* ─── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  border-bottom: 1px solid transparent;
  background: rgba(6,8,16,0.94);
  background-image: linear-gradient(rgba(6,8,16,0.94), rgba(6,8,16,0.94)),
    linear-gradient(90deg, var(--teal), var(--blue), var(--purple), var(--pink));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0,224,200,0.12), 0 4px 24px rgba(0,0,0,0.4);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--teal), var(--blue), var(--purple));
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: var(--glow-teal), 0 0 40px rgba(90,171,255,0.3);
  flex-shrink: 0;
  animation: iconPulse 3s ease-in-out infinite;
}
@keyframes iconPulse {
  0%,100% { box-shadow: var(--glow-teal), 0 0 30px rgba(90,171,255,0.2); }
  50%      { box-shadow: 0 0 36px rgba(0,224,200,0.55), 0 0 50px rgba(90,171,255,0.35); }
}

h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
h2 { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; }
h3 { font-size: 20px; font-weight: 700; }
h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }

.eyebrow {
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ─── TOPBAR ECONOMY ─────────────────────────────────────── */
.topbar-economy {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(255,200,68,0.07), rgba(46,235,92,0.05));
  border: 1px solid rgba(255,200,68,0.30);
  border-radius: 999px;
  padding: 6px 18px;
  box-shadow: 0 0 18px rgba(255,200,68,0.10);
}

.topbar-money {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.money-label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.money-value {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.money-value.earned  { color: var(--green);  text-shadow: 0 0 16px rgba(46,235,92,0.55); }
.money-value.balance { color: var(--gold);   text-shadow: 0 0 16px rgba(255,200,68,0.55); }

.topbar-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ─── STATUS PILL ────────────────────────────────────────── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  border: 1px solid rgba(76,196,176,0.4);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.status-pill.warn  { color: var(--orange); border-color: rgba(243,155,84,0.45); }
.status-pill.ok    { color: var(--green);  border-color: rgba(93,216,122,0.45); }
.status-pill.error { color: var(--red);    border-color: rgba(227,106,106,0.45); }
.status-pill.ok    .dot { background: var(--green);  box-shadow: 0 0 8px var(--green); }
.status-pill.warn  .dot { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.status-pill.error .dot { background: var(--red);    box-shadow: 0 0 8px var(--red); animation: none; }

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─── BUTTONS ────────────────────────────────────────────── */
.primary-button {
  background: linear-gradient(135deg, var(--gold), #ffdc7a, var(--orange));
  color: #1a0800;
  font-weight: 800;
  font-size: 13px;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(255,200,68,0.45), 0 0 0 1px rgba(255,200,68,0.2);
  white-space: nowrap;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,200,68,0.60), 0 0 0 1px rgba(255,200,68,0.35);
}

.ghost-button {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}

.ghost-button:hover {
  background: rgba(255,255,255,0.09);
  border-color: var(--line-bright);
}

.ghost-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.icon-button {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}

.icon-button:hover { background: rgba(255,255,255,0.1); }

.danger-button {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  width: 100%;
  transition: var(--transition);
}

.danger-button:hover { opacity: 0.9; transform: translateY(-1px); }

/* ─── LAYOUT ─────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 69px);
}

/* ─── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  position: sticky;
  top: 69px;
  height: calc(100vh - 69px);
  overflow-y: auto;
  background: rgba(8,10,18,0.5);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(0,224,200,0.12), rgba(90,171,255,0.08));
  border: 1px solid rgba(0,224,200,0.3);
  border-radius: var(--radius);
  margin-bottom: 4px;
  box-shadow: 0 0 20px rgba(0,224,200,0.08);
}

.pilot-avatar {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--teal), var(--blue), var(--purple));
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  box-shadow: var(--glow-teal), 0 0 0 2px rgba(0,224,200,0.25);
}

.pilot-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.pilot-rank-badge {
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
  margin-top: 2px;
}

.rank-progress-wrap {
  height: 3px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
  margin: 2px 0;
}

.rank-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--blue), var(--purple));
  border-radius: 999px;
  transition: width 0.6s ease;
  box-shadow: 0 0 8px rgba(0,224,200,0.6);
  position: relative;
  overflow: hidden;
}
.rank-progress-bar::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

.rank-progress-label {
  font-size: 10px;
  color: var(--muted);
  text-align: right;
  padding-right: 2px;
  margin-bottom: 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: var(--muted);
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border-left-color: var(--line-bright);
}

.nav-item.active {
  color: var(--teal);
  background: linear-gradient(90deg, rgba(0,224,200,0.22), rgba(90,171,255,0.10));
  border-left-color: var(--teal);
  box-shadow: inset 0 0 20px rgba(0,224,200,0.06);
  text-shadow: 0 0 12px rgba(0,224,200,0.5);
}

.nav-icon { font-size: 15px; }

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.wallet-mini {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(255,200,68,0.12), rgba(255,140,46,0.06));
  border: 1px solid rgba(255,200,68,0.35);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--muted);
  box-shadow: 0 0 16px rgba(255,200,68,0.08);
}

.wallet-mini strong {
  color: var(--gold);
  font-size: 15px;
  font-weight: 800;
}

/* ─── CONTENT ────────────────────────────────────────────── */
.content {
  padding: 24px 28px 60px;
  width: 100%;
  min-width: 0;
}

/* ─── STATS GRID ─────────────────────────────────────────── */
.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

/* 7 stat cards: centered, wrap on narrow screens */
.stat-cards-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.stat-cards-row .stat-card {
  flex: 1 1 148px;
  max-width: 192px;
  min-width: 132px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent, var(--teal)) 40%, var(--line));
  border-radius: var(--radius);
  padding: 20px 18px 18px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent, var(--teal)) 15%, transparent);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm), 0 0 28px color-mix(in srgb, var(--accent, var(--teal)) 30%, transparent);
  border-color: color-mix(in srgb, var(--accent, var(--teal)) 70%, var(--line));
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent, var(--teal)), color-mix(in srgb, var(--accent, var(--teal)) 40%, transparent));
  border-radius: var(--radius) var(--radius) 0 0;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -20px; right: -16px;
  width: 110px; height: 110px;
  background: radial-gradient(circle, var(--accent, var(--teal)), transparent 65%);
  opacity: 0.22;
  pointer-events: none;
}

.stat-cards-row .stat-card:nth-child(1) {
  --accent: var(--teal);
  background: linear-gradient(160deg, rgba(0,224,200,0.14) 0%, var(--surface) 55%);
}
.stat-cards-row .stat-card:nth-child(2) {
  --accent: var(--gold);
  background: linear-gradient(160deg, rgba(255,200,68,0.14) 0%, var(--surface) 55%);
}
.stat-cards-row .stat-card:nth-child(3) {
  --accent: var(--blue);
  background: linear-gradient(160deg, rgba(90,171,255,0.14) 0%, var(--surface) 55%);
}
.stat-cards-row .stat-card:nth-child(4) {
  --accent: var(--pink);
  background: linear-gradient(160deg, rgba(255,79,160,0.14) 0%, var(--surface) 55%);
}
.stat-cards-row .stat-card:nth-child(5) {
  --accent: var(--green);
  background: linear-gradient(160deg, rgba(46,235,92,0.14) 0%, var(--surface) 55%);
}
.stat-cards-row .stat-card:nth-child(6) {
  --accent: var(--orange);
  background: linear-gradient(160deg, rgba(255,140,46,0.14) 0%, var(--surface) 55%);
}
.stat-cards-row .stat-card:nth-child(7) {
  --accent: var(--purple);
  background: linear-gradient(160deg, rgba(192,132,255,0.14) 0%, var(--surface) 55%);
}

/* Happiness + Cosmic side by side */
.summary-bars-row {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 12px;
}

/* Bar cards (happiness / cosmic) — fill their grid cell */
.stat-bar-card {
  padding: 18px 20px;
}

.stat-bar-card .bar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.stat-bar-card .bar-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.4;
}
.stat-bar-card .bar-pct {
  font-size: 26px;
  font-weight: 900;
  color: var(--accent, var(--teal));
  white-space: nowrap;
  line-height: 1;
}
.stat-bar-card .bar-track {
  height: 10px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.stat-bar-card .bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease;
  box-shadow: 0 0 14px rgba(0,224,200,0.5), 0 0 30px rgba(0,224,200,0.2);
  position: relative; overflow: hidden;
}
.stat-bar-card .bar-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2.5s infinite;
}
.stat-bar-card .bar-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.stat-bar-card .bar-meta-item {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-3);
  border-radius: 6px;
  padding: 3px 8px;
}
.stat-bar-card .bar-meta-item strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  display: inline;
  margin: 0;
}
.stat-bar-card .bar-message {
  font-size: 12px;
  color: var(--text);
  padding: 10px 14px;
  background: var(--surface-3);
  border-radius: 8px;
  border-left: 3px solid var(--accent, var(--teal));
  margin-top: 10px;
  line-height: 1.55;
}

/* Legacy wide — kept for backward compat */
.stat-card-wide { grid-column: 1 / -1; padding: 18px 20px; }
.stat-card-wide .bar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.stat-card-wide .bar-title { font-size: 13px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.stat-card-wide .bar-pct { font-size: 22px; font-weight: 900; color: var(--accent, var(--teal)); }
.stat-card-wide .bar-track { height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.stat-card-wide .bar-fill { height: 100%; border-radius: 999px; transition: width 0.6s ease; }
.stat-card-wide .bar-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.stat-card-wide .bar-meta-item { font-size: 11px; color: var(--muted); }
.stat-card-wide .bar-meta-item strong { color: var(--text); font-size: 11px; font-weight: 600; display: inline; margin: 0; }
.stat-card-wide .bar-message { font-size: 12px; color: var(--text); padding: 8px 12px; background: var(--surface-3); border-radius: 8px; border-left: 3px solid var(--accent, var(--teal)); margin-top: 8px; line-height: 1.5; }

.stat-card span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; }
.stat-card strong { display: block; font-size: 26px; font-weight: 900; margin-top: 6px; color: var(--accent, var(--text)); letter-spacing: -0.5px; }
.stat-card .stat-icon { font-size: 26px; margin-bottom: 10px; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3)); }

/* ─── PANEL ──────────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: none;
  margin-top: 0;
}

.panel.active { display: block; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

/* ─── FLIGHT LIST ────────────────────────────────────────── */
.flight-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.flight-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.flight-card:hover {
  border-color: rgba(0,224,200,0.4);
  box-shadow: 0 0 24px rgba(0,224,200,0.08), 0 8px 32px rgba(0,0,0,0.3);
}

.flight-card-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 18px 20px 14px;
  position: relative;
}

.flight-card-header::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--score-color, var(--teal));
  border-radius: var(--radius) 0 0 0;
}

.flight-card h4 {
  margin: 0 0 10px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.flight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255,255,255,0.04);
  transition: var(--transition);
}

.chip:nth-child(1) {
  border-color: rgba(90,171,255,0.55);
  color: #8ac8ff;
  background: rgba(90,171,255,0.10);
  box-shadow: 0 0 10px rgba(90,171,255,0.15);
}
.chip:nth-child(2) {
  border-color: rgba(0,224,200,0.55);
  color: #7afcec;
  background: rgba(0,224,200,0.10);
  box-shadow: 0 0 10px rgba(0,224,200,0.15);
}
.chip:nth-child(3) {
  border-color: rgba(255,200,68,0.55);
  color: #ffe080;
  background: rgba(255,200,68,0.10);
  box-shadow: 0 0 10px rgba(255,200,68,0.15);
}
.chip:nth-child(4) {
  border-color: rgba(255,79,160,0.55);
  color: #ff96c8;
  background: rgba(255,79,160,0.10);
  box-shadow: 0 0 10px rgba(255,79,160,0.15);
}

.score-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.score {
  color: var(--gold);
  font-weight: 900;
  font-size: 28px;
  text-align: center;
  line-height: 1;
  text-shadow: 0 0 24px rgba(255,200,68,0.65), 0 0 50px rgba(255,200,68,0.3);
  font-variant-numeric: tabular-nums;
}

.score.high { color: var(--green); text-shadow: 0 0 24px rgba(46,235,92,0.70), 0 0 50px rgba(46,235,92,0.35); }
.score.mid  { color: var(--gold); }
.score.low  { color: var(--red);  text-shadow: 0 0 24px rgba(255,90,90,0.65), 0 0 50px rgba(255,90,90,0.3); }

.flight-salary-tag {
  font-size: 11px;
  color: var(--green);
  font-weight: 700;
  text-align: center;
  background: rgba(46,235,92,0.14);
  border: 1px solid rgba(46,235,92,0.45);
  border-radius: 999px;
  padding: 2px 8px;
  box-shadow: 0 0 10px rgba(46,235,92,0.25);
  text-shadow: 0 0 10px rgba(46,235,92,0.6);
}

.score-edit-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.book-page {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
  color: #d0dae8;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 12.5px;
  line-height: 1.8;
  white-space: pre-wrap;
  background: rgba(0,0,0,0.15);
}

.captain-note-form {
  display: grid;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}

.captain-note-form textarea { min-height: 72px; }
.captain-note-form .primary-button { justify-self: start; }

/* ─── PAGER ──────────────────────────────────────────────── */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.pager span { color: var(--muted); font-size: 13px; }

/* ─── LANDING HISTORY ────────────────────────────────────── */
.landing-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.landing-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  transition: var(--transition);
  box-shadow: -2px 0 12px rgba(0,224,200,0.12);
}
.landing-card:hover { border-color: rgba(0,224,200,0.45); border-left-color: var(--teal); transform: translateX(2px); }
.landing-card.hard {
  border-left-color: var(--red);
  box-shadow: -2px 0 12px rgba(255,90,90,0.18);
}
.landing-card.smooth {
  border-left-color: var(--green);
  box-shadow: -2px 0 12px rgba(46,235,92,0.18);
}

.landing-card strong { font-size: 15px; font-weight: 700; }
.landing-fpm { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ─── STATISTICS ─────────────────────────────────────────── */
.stat-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  transition: var(--transition);
}

.stat-row:hover { background: var(--surface-3); }
.stat-row:last-child { border-bottom: 0; }
.stat-row span { color: var(--muted); font-size: 13px; }
.stat-row strong { font-weight: 700; font-size: 14px; }

/* ─── ACHIEVEMENTS ───────────────────────────────────────── */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.achievement-badge {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.achievement-badge.unlocked {
  border-color: rgba(255,200,68,0.50);
  background: linear-gradient(160deg, rgba(255,200,68,0.14), var(--surface-2));
  box-shadow: 0 0 20px rgba(255,200,68,0.12);
}

.achievement-badge.unlocked::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--orange), var(--pink));
  box-shadow: 0 0 8px rgba(255,200,68,0.6);
}

.achievement-badge.locked { opacity: 0.45; filter: grayscale(1); }

.achievement-icon { font-size: 30px; display: block; margin-bottom: 10px; }
.achievement-name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.achievement-desc { font-size: 11px; color: var(--muted); line-height: 1.4; }

/* ─── STORE ──────────────────────────────────────────────── */
.store-balance-display {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(214,179,106,0.08);
  border: 1px solid rgba(214,179,106,0.25);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
}

.store-balance-val {
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.category-tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0 16px;
  flex-wrap: wrap;
}

.cat-tab {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.cat-tab:hover { border-color: var(--line-bright); color: var(--text); }
.cat-tab.active {
  background: rgba(0,224,200,0.20);
  border-color: rgba(0,224,200,0.65);
  color: var(--teal);
  box-shadow: 0 0 14px rgba(0,224,200,0.25);
  text-shadow: 0 0 10px rgba(0,224,200,0.5);
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.store-item {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.store-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--line-bright); }

.store-item.owned {
  border-color: rgba(93,216,122,0.35);
  background: linear-gradient(160deg, rgba(93,216,122,0.06), var(--surface-2));
}

.store-item-icon { font-size: 36px; text-align: center; display: block; }

.store-item-body { flex: 1; }
.store-item-name { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.store-item-desc { font-size: 12px; color: var(--muted); line-height: 1.4; }
.store-item-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

.store-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.price-tag {
  font-size: 18px;
  font-weight: 900;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.buy-button {
  background: linear-gradient(135deg, var(--teal), var(--blue), var(--purple));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  transition: var(--transition);
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,224,200,0.35);
}

.buy-button:hover {
  transform: scale(1.05) translateY(-1px);
  box-shadow: 0 6px 24px rgba(0,224,200,0.55);
}
.buy-button:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

.owned-stamp {
  background: rgba(93,216,122,0.15);
  border: 1px solid rgba(93,216,122,0.4);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  text-align: center;
}

.purchase-history {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.purchase-history h4 { margin-bottom: 12px; color: var(--muted); font-size: 13px; }

/* ─── SETTINGS ───────────────────────────────────────────── */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.settings-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-card.danger-zone { border-color: rgba(227,106,106,0.35); }
.settings-card-icon { font-size: 28px; margin-bottom: 4px; }

.salary-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.dollar-sign {
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
}

.salary-input-row input {
  flex: 1;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  color: var(--gold);
}

.settings-hint {
  font-size: 12px;
  color: var(--teal);
  min-height: 18px;
  font-weight: 600;
}

.small { font-size: 12px; }

/* ─── BRIDGE / CONNECTOR ─────────────────────────────────── */
.bridge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.bridge-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: rgba(8,11,18,0.6);
}

.bridge-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.bridge-grid strong { color: var(--teal); font-size: 13px; overflow-wrap: anywhere; }

.connector-banner {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(243,155,84,0.45);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius-sm);
  padding: 13px;
  background: rgba(243,155,84,0.08);
  font-size: 13px;
}

.connector-banner span { color: var(--muted); }
.connector-banner.ok { border-color: rgba(93,216,122,0.45); border-left-color: var(--green); background: rgba(93,216,122,0.08); }

/* ─── MAP ────────────────────────────────────────────────── */
.map-wrap {
  margin-top: 18px;
  width: 100%;
  aspect-ratio: 16/7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #060e14;
}

#worldMap { width: 100%; height: 100%; display: block; }

.leaflet-container { background: #060e14; color: var(--text); font-family: 'Inter', sans-serif; }
.leaflet-control-attribution, .leaflet-control-zoom a {
  background: rgba(10,14,22,0.9) !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
}
.leaflet-control-attribution a { color: var(--teal) !important; }

.route-marker {
  display: grid; place-items: center;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.8);
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 14px rgba(76,196,176,0.7);
}

.airport-label { color: #f3f7fb; font-weight: 800; text-shadow: 0 1px 5px rgba(0,0,0,0.95); font-size: 11px; }

/* ─── FORMS ──────────────────────────────────────────────── */
textarea, input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: rgba(0,0,0,0.3);
  padding: 10px 12px;
  transition: var(--transition);
  outline: none;
}

textarea:focus, input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(76,196,176,0.12);
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

dialog {
  width: min(900px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 28px;
}

dialog::backdrop { background: rgba(0,0,0,0.75); backdrop-filter: blur(4px); }

.dialog-form { display: grid; gap: 18px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0;
  margin: 0;
}

/* ─── TOAST ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--surface-3);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
  z-index: 100;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success { border-color: rgba(93,216,122,0.5); color: var(--green); }
.toast.error   { border-color: rgba(227,106,106,0.5); color: var(--red); }

/* ─── UTILITIES ──────────────────────────────────────────── */
.muted { color: var(--muted); }
.danger { color: var(--red); }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 850px) {
  .summary-bars-row { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px;
    gap: 8px;
  }
  .sidebar-profile, .rank-progress-wrap, .rank-progress-label, .sidebar-footer { display: none; }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; flex: unset; }
  .nav-item { width: auto; border-left: none; border-bottom: 3px solid transparent; padding: 8px 12px; font-size: 12px; }
  .nav-item.active { border-left: none; border-bottom-color: var(--teal); }
  .content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-grid, .stat-table, .bridge-grid, .form-grid { grid-template-columns: 1fr; }
  h2 { font-size: 24px; }
  .topbar-economy { display: none; }
}

/* ─── RARITY BADGES ─────────────────────────────────────── */
.rarity-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 2px 7px;
  margin-bottom: 6px;
}
.rarity-common   { background: rgba(170,181,196,0.15); color:#c0cad8; border:1px solid rgba(170,181,196,0.35); }
.rarity-uncommon { background: rgba(46,235,92,0.15);   color:#2eeb5c; border:1px solid rgba(46,235,92,0.45);  box-shadow:0 0 8px rgba(46,235,92,0.25); }
.rarity-rare     { background: rgba(90,171,255,0.15);  color:#5aabff; border:1px solid rgba(90,171,255,0.50); box-shadow:0 0 8px rgba(90,171,255,0.25); }
.rarity-epic     { background: rgba(192,132,255,0.15); color:#c084ff; border:1px solid rgba(192,132,255,0.50); box-shadow:0 0 10px rgba(192,132,255,0.30); }
.rarity-legendary{ background: rgba(255,200,68,0.18);  color:#ffc844; border:1px solid rgba(255,200,68,0.55); box-shadow:0 0 12px rgba(255,200,68,0.35); }
.rarity-mythic   { background: rgba(255,79,160,0.18);  color:#ff4fa0; border:1px solid rgba(255,79,160,0.55);
                   animation: mythicGlow 2s ease-in-out infinite; }
.rarity-ultra    { background: linear-gradient(90deg,rgba(255,200,68,0.22),rgba(192,132,255,0.22));
                   color:#fff; border:1px solid #c084ff;
                   animation: ultraGlow 1.5s ease-in-out infinite; }
@keyframes mythicGlow { 0%,100%{box-shadow:0 0 8px rgba(255,79,160,0.5)} 50%{box-shadow:0 0 20px rgba(255,79,160,1.0)} }
@keyframes ultraGlow  { 0%,100%{box-shadow:0 0 10px rgba(192,132,255,0.6)} 50%{box-shadow:0 0 28px rgba(255,200,68,1.0)} }

.seasonal-badge {
  font-size: 9px; font-weight: 800; background: rgba(243,155,84,0.15);
  color: var(--orange); border: 1px solid rgba(243,155,84,0.4);
  border-radius: 999px; padding: 2px 7px; display: inline-block;
}
.limited-badge {
  font-size: 9px; font-weight: 800; background: rgba(242,111,166,0.15);
  color: var(--pink); border: 1px solid rgba(242,111,166,0.4);
  border-radius: 999px; padding: 2px 7px; display: inline-block;
}

.effect-tag {
  font-size: 10px; font-weight: 700; color: var(--teal);
  background: rgba(76,196,176,0.1); border: 1px solid rgba(76,196,176,0.25);
  border-radius: 4px; padding: 2px 6px; display: inline-block; margin-top: 4px;
}

/* ─── HAPPINESS SYSTEM ───────────────────────────────────── */
.happiness-chip {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
  font-size: 13px; font-weight: 700;
}

.happiness-card {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; margin-bottom: 18px;
}

.happiness-meter-wrap {
  margin: 14px 0 8px;
  height: 16px; background: var(--surface-3);
  border-radius: 999px; overflow: hidden; position: relative;
}

.happiness-meter-fill {
  height: 100%; border-radius: 999px;
  transition: width 1s cubic-bezier(0.34,1.56,0.64,1);
  position: relative; overflow: hidden;
}

.happiness-meter-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}
.happiness-meter-fill {
  box-shadow: 0 0 16px rgba(0,224,200,0.45);
}

@keyframes shimmer { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }

.happiness-breakdown { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 14px; }
.hb-item {
  background: rgba(255,255,255,0.03); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px; text-align: center;
}
.hb-label { font-size: 11px; color: var(--muted); }
.hb-val   { font-size: 16px; font-weight: 800; color: var(--teal); }

.xp-bar-wrap { margin: 10px 0 4px; height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--blue), var(--teal));
  border-radius: 999px;
  transition: width 0.8s ease;
  box-shadow: 0 0 10px rgba(192,132,255,0.55);
  position: relative; overflow: hidden;
}
.xp-bar-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  animation: shimmer 2s infinite;
}

/* ─── PROFILE VIEW ───────────────────────────────────────── */
.profile-layout { display: grid; grid-template-columns: 320px 1fr; gap: 20px; margin-top: 20px; }

.profile-card-main {
  background: linear-gradient(160deg, rgba(76,196,176,0.1), var(--surface-2));
  border: 1px solid rgba(76,196,176,0.3); border-radius: var(--radius);
  padding: 28px; text-align: center; margin-bottom: 14px;
}

.profile-big-avatar {
  width: 80px; height: 80px; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--teal), var(--blue), var(--purple));
  border-radius: 20px; display: grid; place-items: center;
  font-size: 22px; font-weight: 900; color: #fff;
  box-shadow: 0 0 40px rgba(0,224,200,0.50), 0 0 0 3px rgba(0,224,200,0.25);
}

.profile-name { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.profile-rank-display { font-size: 14px; color: var(--gold); font-weight: 700; margin-bottom: 12px; }

.profile-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.profile-badge-item { font-size: 20px; title: attr(data-label); cursor: help; }

.profile-stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.profile-mini-stat {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 8px; text-align: center;
}
.profile-mini-stat .pms-label { font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.profile-mini-stat .pms-val   { font-size: 16px; font-weight: 800; color: var(--text); margin-top: 4px; }

/* ─── INVENTORY ──────────────────────────────────────────── */
.inventory-section { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.inventory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; margin-top: 12px; }
.inventory-item {
  background: var(--surface-3); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 8px; text-align: center;
  transition: var(--transition); cursor: help; position: relative;
}
.inventory-item:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); border-color: var(--line-bright); }
.inventory-item-icon { font-size: 26px; display: block; margin-bottom: 6px; }
.inventory-item-name { font-size: 10px; color: var(--muted); font-weight: 600; line-height: 1.3; }

.empty-inventory { color: var(--muted); font-size: 13px; text-align: center; padding: 30px; }

/* ─── SIMBRIEF LIVE ──────────────────────────────────────── */
.sb-status-pill {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; color: var(--teal);
  border: 1px solid rgba(76,196,176,0.4); border-radius: 999px; padding: 6px 14px;
}
.sb-status-pill.offline { color: var(--red); border-color: rgba(227,106,106,0.4); }
.sb-status-pill.offline .dot { background: var(--red); box-shadow: 0 0 8px var(--red); }

.instruments-bar {
  display: grid; grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 10px; margin: 18px 0;
}

.instrument-card {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 12px; text-align: center;
  transition: var(--transition);
}
.instrument-card:hover {
  border-color: var(--teal);
  box-shadow: 0 0 16px rgba(0,224,200,0.25);
  background: linear-gradient(160deg, rgba(0,224,200,0.10), var(--surface-2));
}

.inst-label { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.inst-val   { font-size: 16px; font-weight: 800; color: var(--teal); font-variant-numeric: tabular-nums; }

.sb-ofp-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }

.sb-ofp-card {
  background: var(--surface-2); border: 1px solid var(--line);
  border-left: 4px solid var(--blue); border-radius: var(--radius);
  padding: 18px;
}
.sb-ofp-card h4 { color: var(--blue); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.sb-ofp-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 13px; }
.sb-ofp-row:last-child { border-bottom: 0; }
.sb-ofp-row span { color: var(--muted); }
.sb-ofp-row strong { color: var(--text); font-weight: 700; }

.sb-history { margin-top: 24px; }
.sb-history h4 { color: var(--muted); font-size: 13px; margin-bottom: 10px; }

/* ─── STORE UPGRADES ─────────────────────────────────────── */
.store-item-tier {
  position: absolute; top: 10px; right: 10px;
  font-size: 11px; font-weight: 800;
  border-radius: 4px; padding: 2px 6px;
}

.store-item.tier-legendary {
  border-color: rgba(255,200,68,0.65);
  box-shadow: 0 0 28px rgba(255,200,68,0.20);
  background: linear-gradient(160deg, rgba(255,200,68,0.10), var(--surface-2));
}
.store-item.tier-mythic {
  border-color: rgba(255,79,160,0.70);
  box-shadow: 0 0 28px rgba(255,79,160,0.22);
  background: linear-gradient(160deg, rgba(255,79,160,0.10), var(--surface-2));
}
.store-item.tier-ultra {
  border-color: rgba(192,132,255,0.80);
  box-shadow: 0 0 36px rgba(192,132,255,0.25);
  background: linear-gradient(160deg, rgba(192,132,255,0.12), rgba(255,200,68,0.06), var(--surface-2));
}

.effect-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.effect-chip  {
  font-size: 10px; font-weight: 700; border-radius: 4px; padding: 2px 6px;
}
.effect-chip.happiness { background: rgba(242,111,166,0.15); color: var(--pink); }
.effect-chip.salary    { background: rgba(93,216,122,0.15);  color: var(--green); }
.effect-chip.xp        { background: rgba(167,139,250,0.15); color: var(--purple); }
.effect-chip.prestige  { background: rgba(214,179,106,0.15); color: var(--gold); }
.effect-chip.feature   { background: rgba(100,168,255,0.15); color: var(--blue); }

/* ─── ACHIEVEMENT UPDATES ────────────────────────────────── */
.achievement-badge.hidden-ach { border-color: rgba(167,139,250,0.3); }
.achievement-badge.hidden-ach .achievement-icon::after { content: "?"; position:absolute; top:0;left:0;right:0;bottom:0; display:grid; place-items:center; background:var(--surface-2); border-radius:4px; font-size:24px; }
.ach-pts { font-size: 10px; color: var(--gold); font-weight: 700; margin-top: 4px; }

/* ─── RESPONSIVE ADDITIONS ───────────────────────────────── */
@media (max-width: 1200px) {
  .instruments-bar { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .profile-layout  { grid-template-columns: 1fr; }
}
@media (max-width: 850px) {
  .instruments-bar { grid-template-columns: repeat(2,1fr); }
  .sb-ofp-grid     { grid-template-columns: 1fr; }
  .happiness-breakdown { grid-template-columns: repeat(2,1fr); }
  .profile-stat-row    { grid-template-columns: 1fr; }
}

/* ─── CARD ACTION BUTTONS ────────────────────────────────── */
.card-action-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  min-width: 108px;
}

.analysis-btn {
  background: linear-gradient(135deg, rgba(90,171,255,0.20), rgba(192,132,255,0.20));
  border: 1px solid rgba(90,171,255,0.50);
  color: var(--blue);
  border-radius: var(--radius-sm);
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  text-align: center;
  box-shadow: 0 0 12px rgba(90,171,255,0.15);
}
.analysis-btn:hover {
  background: linear-gradient(135deg, rgba(90,171,255,0.35), rgba(192,132,255,0.35));
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(90,171,255,0.40);
  color: #a0d4ff;
}

/* ─── ANALYSIS MODAL ─────────────────────────────────────── */
.analysis-dialog {
  background: transparent;
  border: 0;
  padding: 0;
  max-width: min(960px, 96vw);
  width: 100%;
  max-height: 92vh;
  border-radius: 0;
  overflow: visible;
}
.analysis-dialog::backdrop {
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
}
.analysis-modal-inner {
  background: var(--surface);
  border: 1px solid var(--line-bright);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  box-shadow: 0 40px 100px rgba(0,0,0,0.65), 0 0 0 1px rgba(100,168,255,0.08);
}
.analysis-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(100,168,255,0.07), rgba(167,139,250,0.05));
  flex-shrink: 0;
}
.analysis-modal-title { display: flex; align-items: center; gap: 16px; }
.analysis-modal-icon {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(100,168,255,0.3);
}
.analysis-content {
  overflow-y: auto;
  padding: 24px;
  flex: 1;
}

/* Loading */
.analysis-loading {
  display: flex; align-items: center; gap: 12px;
  padding: 40px; color: var(--muted); justify-content: center;
}
.analysis-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* No log */
.analysis-no-log {
  text-align: center; padding: 48px 24px;
  color: var(--text);
}
.analysis-no-log-icon { font-size: 48px; margin-bottom: 16px; }
.analysis-no-log h4 { font-size: 18px; margin-bottom: 8px; }

/* Hero */
.an-hero {
  background: linear-gradient(135deg, rgba(100,168,255,0.08), rgba(167,139,250,0.06));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 18px;
}
.an-hero-route {
  font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 4px;
  letter-spacing: -0.3px;
}
.an-hero-meta { font-size: 12px; color: var(--muted); }

/* Metrics grid */
.an-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.an-metric {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.an-metric-icon { font-size: 18px; }
.an-metric-label { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.an-metric-val { font-size: 14px; font-weight: 800; color: var(--text); }

/* Landing highlight card */
.an-landing-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  background: var(--surface-2);
  border: 1px solid var(--line-bright);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 18px;
  align-items: center;
}
.an-landing-left { text-align: center; padding-right: 20px; border-right: 1px solid var(--line); }
.an-landing-badge {
  display: inline-block;
  font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
  border: 1.5px solid; border-radius: 999px;
  padding: 3px 10px; margin-bottom: 8px; text-transform: uppercase;
}
.an-landing-vs { font-size: 32px; font-weight: 900; letter-spacing: -1px; line-height: 1; margin-bottom: 4px; }
.an-landing-sub { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.an-landing-right {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* Sections */
.an-section { margin-bottom: 18px; }
.an-section-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.an-section-title::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

/* Weather */
.an-wx-summary {
  font-size: 12px; color: var(--text);
  padding: 8px 12px; border-radius: 8px;
  background: var(--surface-3); margin-bottom: 8px;
  display: flex; align-items: flex-start; gap: 10px;
}
.an-wx-badge {
  font-size: 9px; font-weight: 800; letter-spacing: 1px;
  border-radius: 4px; padding: 2px 6px; flex-shrink: 0;
}
.an-wx-badge.dep { background: rgba(76,196,176,0.2); color: var(--teal); }
.an-wx-badge.arr { background: rgba(100,168,255,0.2); color: var(--blue); }
.an-metar-grid { display: flex; flex-direction: column; gap: 6px; }
.an-metar, .an-taf {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--muted);
  background: rgba(0,0,0,0.25);
  border-left: 3px solid var(--line-bright);
  padding: 8px 12px; border-radius: 0 6px 6px 0;
  word-break: break-all;
}
.an-taf { border-left-color: rgba(167,139,250,0.5); }

/* Timeline */
.an-timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.an-timeline::before {
  content: ''; position: absolute;
  left: 8px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(to bottom, var(--teal), var(--blue), var(--purple));
  border-radius: 999px; opacity: 0.4;
}
.an-tl-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 6px 0 6px 28px; position: relative;
}
.an-tl-dot {
  position: absolute; left: 4px; top: 12px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 2px solid var(--line-bright);
  flex-shrink: 0;
}
.an-tl-item:hover .an-tl-dot { border-color: var(--teal); background: var(--teal); }
.an-tl-body { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; flex: 1; }
.an-tl-text { font-size: 12px; color: var(--text); line-height: 1.5; }
.an-tl-dur {
  font-size: 10px; color: var(--muted); font-family: 'JetBrains Mono', monospace;
  background: var(--surface-3); border-radius: 4px; padding: 1px 6px;
  flex-shrink: 0;
}
.an-tl-item:hover { background: rgba(255,255,255,0.02); border-radius: 6px; }

/* ─── GIR LIVE PANEL ─────────────────────────────────────── */
.gir-live-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;   /* agar confirm overlay bisa absolute di atasnya */
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.gir-live-panel.flying {
  border-color: rgba(0,224,200,0.60);
  box-shadow: 0 0 30px rgba(0,224,200,0.18), inset 0 0 30px rgba(0,224,200,0.04);
}
.gir-live-panel.preflight {
  border-color: rgba(255,140,46,0.60);
  box-shadow: 0 0 28px rgba(255,140,46,0.18), inset 0 0 28px rgba(255,140,46,0.04);
}
.gir-live-panel.arrived {
  border-color: rgba(255,200,68,0.60);
  box-shadow: 0 0 30px rgba(255,200,68,0.18), inset 0 0 30px rgba(255,200,68,0.04);
}
.gir-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  gap: 12px;
  user-select: none;
}
.gir-header-left  { display: flex; align-items: center; gap: 9px; }
.gir-header-right { display: flex; align-items: center; gap: 9px; }

/* Pulsing status dot */
.gir-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted); flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}
.gir-dot.flying   { background: var(--teal);   box-shadow: 0 0 7px var(--teal);   animation: gir-blink 1.3s ease-in-out infinite; }
.gir-dot.preflight{ background: var(--orange); box-shadow: 0 0 7px var(--orange); animation: gir-blink 2s ease-in-out infinite; }
.gir-dot.arrived  { background: var(--gold);   box-shadow: 0 0 7px var(--gold); }
.gir-dot.idle     { background: var(--blue);   box-shadow: 0 0 5px var(--blue); }
@keyframes gir-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

.gir-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  color: var(--muted); font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
}
.gir-state-badge {
  font-size: 10px; font-weight: 700; padding: 2px 9px;
  border-radius: 999px; letter-spacing: 0.07em;
  background: var(--surface-3); color: var(--muted);
  transition: all 0.3s;
}
.gir-state-badge.flying    { background: rgba(76,196,176,0.14);  color: var(--teal); }
.gir-state-badge.preflight { background: rgba(243,155,84,0.15);  color: var(--orange); }
.gir-state-badge.arrived   { background: rgba(214,179,106,0.14); color: var(--gold); }
.gir-state-badge.idle      { background: rgba(100,168,255,0.12); color: var(--blue); }

.gir-route-tag {
  font-size: 11px; font-weight: 700; color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  background: var(--surface-3); padding: 3px 11px;
  border-radius: 6px; letter-spacing: 0.05em;
}
.gir-last-update {
  font-size: 10px; color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  background: var(--surface-3); padding: 2px 8px;
  border-radius: 5px; letter-spacing: 0.04em;
  white-space: nowrap;
}
.gir-refresh-btn {
  background: transparent; border: 1px solid var(--line);
  color: var(--muted); border-radius: 6px;
  width: 26px; height: 26px; font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 0; cursor: pointer; transition: all 0.2s; flex-shrink: 0;
}
.gir-refresh-btn:hover { border-color: var(--orange); color: var(--orange); }
.gir-refresh-btn.spinning { animation: gir-spin 0.6s linear; }
@keyframes gir-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.gir-toggle-btn {
  background: transparent; border: 1px solid var(--line);
  color: var(--muted); border-radius: 6px;
  width: 26px; height: 26px; font-size: 12px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 0; cursor: pointer; transition: all 0.2s; flex-shrink: 0;
}
.gir-toggle-btn:hover { border-color: var(--teal); color: var(--teal); }
.gir-toggle-btn.collapsed { transform: rotate(-90deg); }

/* ── Confirm overlay ── */
.gir-confirm-overlay {
  position: absolute; inset: 0;
  background: rgba(6,8,16,0.85);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 10; border-radius: 0 0 var(--radius) var(--radius);
}
.gir-confirm-box {
  background: var(--surface-2); border: 1px solid var(--line-bright);
  border-radius: var(--radius); padding: 24px 28px;
  text-align: center; max-width: 320px;
  box-shadow: var(--shadow);
}
.gir-confirm-icon { font-size: 28px; color: var(--orange); margin-bottom: 10px; }
.gir-confirm-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.gir-confirm-sub   { font-size: 12px; color: var(--muted); margin-bottom: 18px; line-height: 1.5; }
.gir-confirm-btns  { display: flex; gap: 10px; justify-content: center; }
.gir-confirm-yes {
  background: var(--orange); color: #1a0e00;
  border: 0; border-radius: 8px; padding: 8px 20px;
  font-weight: 700; font-size: 13px; cursor: pointer;
  transition: opacity 0.2s;
}
.gir-confirm-yes:hover { opacity: 0.85; }
.gir-confirm-no {
  background: transparent; color: var(--muted);
  border: 1px solid var(--line-bright); border-radius: 8px;
  padding: 8px 20px; font-size: 13px; cursor: pointer;
  transition: all 0.2s;
}
.gir-confirm-no:hover { border-color: var(--teal); color: var(--teal); }

/* Two-column body */
.gir-panel-body {
  display: grid;
  grid-template-columns: 1fr 260px;
  max-height: 210px;
  overflow: hidden;
  transition: max-height 0.32s ease;
}
.gir-panel-body.collapsed { max-height: 0; }

/* Left: live log feed */
.gir-live-feed {
  padding: 10px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 1px;
  max-height: 210px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.gir-log-line {
  color: var(--muted); line-height: 1.55; padding: 1px 0;
  white-space: pre-wrap; word-break: break-word;
  transition: color 0.2s;
}
.gir-log-line:last-child { color: var(--text); }
.gir-log-line.phase  { color: var(--teal);   font-weight: 600; }
.gir-log-line.arrived-line { color: var(--gold); font-weight: 700; }
.gir-log-line.warn   { color: var(--orange); }
.gir-no-data { color: var(--muted); font-size: 11px; font-style: italic; }

/* Right: overlay summary */
.gir-overlay-info {
  padding: 10px 13px;
  overflow-y: auto;
  max-height: 210px;
  background: rgba(0,0,0,0.12);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.gir-ov-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 6px; padding: 2px 0;
  border-bottom: 1px solid rgba(255,255,255,0.025);
}
.gir-ov-key {
  color: var(--muted); font-family: 'JetBrains Mono', monospace;
  font-size: 10px; flex-shrink: 0; max-width: 50%;
}
.gir-ov-val {
  color: var(--text); font-size: 11px; text-align: right;
  font-family: 'JetBrains Mono', monospace;
}
.gir-ov-sep {
  font-size: 9px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--teal); text-transform: uppercase;
  margin: 7px 0 3px; padding-top: 5px;
  border-top: 1px solid var(--line);
}
.gir-ov-sep:first-child { margin-top: 2px; border-top: 0; }
.gir-no-overlay { color: var(--muted); font-size: 10px; font-style: italic; padding: 4px 0; }
.gir-standby-msg {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; min-height: 120px; gap: 6px; text-align: center; padding: 16px 8px;
}
.gir-standby-icon { font-size: 22px; opacity: 0.35; }
.gir-standby-text { font-size: 11px; font-weight: 600; color: var(--muted); }
.gir-standby-sub  { font-size: 10px; color: var(--line-bright); line-height: 1.4; }

@media (max-width: 850px) {
  .gir-panel-body { grid-template-columns: 1fr; }
  .gir-live-feed  { border-right: 0; border-bottom: 1px solid var(--line); max-height: 130px; }
  .gir-overlay-info { max-height: 110px; }
}

/* ─── PRINT ──────────────────────────────────────────────── */
@media print {
  body { background: white; color: black; }
  .topbar, .sidebar, .stats-grid, .section-head button, dialog, .toast { display: none !important; }
  .layout, .content { display: block; padding: 0; max-width: none; }
  .panel, .panel.active, .view { display: block; border: 0; box-shadow: none; page-break-after: always; background: white; color: black; }
  .flight-card, .landing-card { box-shadow: none; border-color: #ccc; background: white; color: black; }
  .book-page { background: white; color: black; }
}

:root {
  --bg: #070715;
  --surface: #111827;
  --surface-2: #172136;
  --surface-3: #20304d;
  --line: rgba(123, 151, 255, 0.28);
  --line-bright: rgba(0, 224, 200, 0.58);
  --text: #f7fbff;
  --muted: #b4c3dd;
  --gold: #ffd45a;
  --gold-bright: #ffe99a;
  --teal: #00f5d4;
  --blue: #4da3ff;
  --pink: #ff4fb8;
  --green: #42ff7b;
  --orange: #ff9f43;
  --red: #ff5c7a;
  --purple: #bb6bff;
  --cyan: #38e8ff;
  --lime: #b6ff4d;
  --sky: #55b7ff;
  --shadow: 0 24px 80px rgba(0,0,0,0.68);
  --shadow-sm: 0 10px 34px rgba(0,0,0,0.46);
  --glow-teal: 0 0 32px rgba(0,245,212,0.45);
  --glow-gold: 0 0 32px rgba(255,212,90,0.45);
  --glow-blue: 0 0 32px rgba(77,163,255,0.45);
  --glow-purple: 0 0 34px rgba(187,107,255,0.45);
  --glow-pink: 0 0 34px rgba(255,79,184,0.45);
  --glow-green: 0 0 34px rgba(66,255,123,0.45);
}

body {
  background:
    radial-gradient(circle at 7% 8%, rgba(0,245,212,0.35) 0, transparent 24%),
    radial-gradient(circle at 88% 3%, rgba(255,79,184,0.28) 0, transparent 28%),
    radial-gradient(circle at 55% 0%, rgba(187,107,255,0.22) 0, transparent 30%),
    radial-gradient(circle at 82% 68%, rgba(255,159,67,0.20) 0, transparent 30%),
    radial-gradient(circle at 16% 82%, rgba(66,255,123,0.18) 0, transparent 30%),
    linear-gradient(135deg, #050813 0%, #07162a 42%, #170722 72%, #0a101d 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0%, rgba(0,245,212,0.08) 22%, transparent 42%),
    linear-gradient(245deg, transparent 0%, rgba(255,79,184,0.07) 28%, transparent 54%);
  opacity: 0.85;
}

.topbar {
  background:
    linear-gradient(135deg, rgba(7,9,22,0.92), rgba(17,15,43,0.94)),
    linear-gradient(90deg, var(--teal), var(--blue), var(--purple), var(--pink), var(--orange), var(--green));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border-bottom: 1px solid transparent;
  box-shadow: 0 0 34px rgba(0,245,212,0.14), 0 10px 34px rgba(0,0,0,0.48);
}

.brand-icon,
.pilot-avatar,
.profile-big-avatar {
  background: linear-gradient(135deg, var(--teal), var(--blue), var(--purple), var(--pink));
  box-shadow: 0 0 26px rgba(0,245,212,0.46), 0 0 46px rgba(255,79,184,0.22);
}

.eyebrow {
  color: var(--teal);
  text-shadow: 0 0 14px rgba(0,245,212,0.55);
}

.layout {
  background:
    linear-gradient(90deg, rgba(0,245,212,0.055), transparent 26%, rgba(255,79,184,0.045)),
    transparent;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(0,245,212,0.12), rgba(16,22,42,0.74) 36%, rgba(255,79,184,0.10));
  border-right: 1px solid rgba(0,245,212,0.28);
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.03), 14px 0 34px rgba(0,0,0,0.20);
}

.sidebar-profile {
  background:
    radial-gradient(circle at 20% 20%, rgba(0,245,212,0.30), transparent 42%),
    linear-gradient(135deg, rgba(77,163,255,0.18), rgba(187,107,255,0.14), rgba(255,79,184,0.10));
  border-color: rgba(0,245,212,0.48);
}

.nav-item {
  color: #adc2e6;
}

.nav-item:hover {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(77,163,255,0.18), rgba(187,107,255,0.12), rgba(255,79,184,0.08));
  border-left-color: var(--blue);
  box-shadow: inset 0 0 18px rgba(77,163,255,0.10);
}

.nav-item.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(0,245,212,0.28), rgba(77,163,255,0.18), rgba(255,79,184,0.12));
  border-left-color: var(--teal);
  box-shadow: 0 0 18px rgba(0,245,212,0.17), inset 0 0 24px rgba(0,245,212,0.10);
}

.panel,
.gir-live-panel,
.settings-card,
.flight-card,
.store-item,
.achievement-badge,
.stat-row,
.dialog-form,
dialog {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012)),
    linear-gradient(160deg, rgba(77,163,255,0.10), rgba(17,24,39,0.94) 45%, rgba(187,107,255,0.08));
  border-color: rgba(123,151,255,0.30);
  box-shadow: 0 12px 36px rgba(0,0,0,0.32);
}

.panel {
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--blue), var(--purple), var(--pink), var(--orange), var(--green));
  opacity: 0.92;
}

.stat-card {
  background:
    radial-gradient(circle at 82% 10%, color-mix(in srgb, var(--accent, var(--teal)) 34%, transparent), transparent 44%),
    linear-gradient(155deg, color-mix(in srgb, var(--accent, var(--teal)) 16%, transparent), rgba(17,24,39,0.92) 55%, rgba(5,8,19,0.86));
  border-color: color-mix(in srgb, var(--accent, var(--teal)) 55%, rgba(123,151,255,0.24));
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent, var(--teal)) 24%, transparent), 0 16px 42px rgba(0,0,0,0.34);
}

.stat-card:hover {
  transform: translateY(-5px) scale(1.015);
}

.stat-card strong,
.score,
.money-value,
.store-balance-val,
.price-tag {
  text-shadow: 0 0 18px currentColor;
}

.summary-bars-row .stat-bar-card:nth-child(1) {
  --accent: var(--green);
  background:
    radial-gradient(circle at 95% 5%, rgba(66,255,123,0.28), transparent 34%),
    linear-gradient(135deg, rgba(66,255,123,0.13), rgba(7,12,26,0.90) 60%);
  border-color: rgba(66,255,123,0.52);
}

.summary-bars-row .stat-bar-card:nth-child(2) {
  --accent: var(--purple);
  background:
    radial-gradient(circle at 90% 8%, rgba(187,107,255,0.28), transparent 35%),
    linear-gradient(135deg, rgba(187,107,255,0.14), rgba(7,12,26,0.90) 60%);
  border-color: rgba(187,107,255,0.52);
}

.stat-bar-card .bar-track,
.rank-progress-wrap {
  background: rgba(255,255,255,0.10);
  box-shadow: inset 0 0 16px rgba(0,0,0,0.45);
}

.stat-bar-card .bar-fill,
.rank-progress-bar {
  background: linear-gradient(90deg, var(--teal), var(--blue), var(--purple), var(--pink), var(--orange), var(--green));
  box-shadow: 0 0 18px rgba(0,245,212,0.48), 0 0 32px rgba(255,79,184,0.22);
}

.primary-button {
  background: linear-gradient(135deg, #ffe66d, #ff9f43 45%, #ff4fb8 100%);
  color: #180614;
  box-shadow: 0 0 20px rgba(255,212,90,0.42), 0 8px 24px rgba(255,79,184,0.20);
}

.primary-button:hover {
  box-shadow: 0 0 28px rgba(255,212,90,0.62), 0 10px 32px rgba(255,79,184,0.34);
}

.ghost-button,
.icon-button,
.gir-refresh-btn,
.gir-toggle-btn,
.cat-tab {
  background: linear-gradient(135deg, rgba(77,163,255,0.12), rgba(187,107,255,0.10));
  border-color: rgba(123,151,255,0.34);
}

.ghost-button:hover,
.icon-button:hover,
.gir-refresh-btn:hover,
.gir-toggle-btn:hover,
.cat-tab:hover {
  background: linear-gradient(135deg, rgba(0,245,212,0.18), rgba(255,79,184,0.12));
  border-color: rgba(0,245,212,0.54);
}

.status-pill {
  background: rgba(255,255,255,0.045);
  box-shadow: inset 0 0 18px rgba(255,255,255,0.025);
}

.flight-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(0,245,212,0.09), transparent 34%),
    linear-gradient(145deg, rgba(23,33,54,0.96), rgba(11,16,30,0.96));
}

.flight-card:hover {
  border-color: rgba(0,245,212,0.58);
  box-shadow: 0 0 26px rgba(0,245,212,0.18), 0 12px 36px rgba(0,0,0,0.38);
}

.book-page,
.captain-note-form {
  background:
    linear-gradient(135deg, rgba(0,245,212,0.035), rgba(187,107,255,0.035)),
    rgba(0,0,0,0.18);
}

.chip:nth-child(1) { border-color: rgba(77,163,255,0.75); background: rgba(77,163,255,0.16); color: #b8dcff; }
.chip:nth-child(2) { border-color: rgba(0,245,212,0.75); background: rgba(0,245,212,0.16); color: #a6fff3; }
.chip:nth-child(3) { border-color: rgba(255,212,90,0.78); background: rgba(255,212,90,0.17); color: #fff0ac; }
.chip:nth-child(4) { border-color: rgba(255,79,184,0.78); background: rgba(255,79,184,0.17); color: #ffc1e3; }
.chip:nth-child(5) { border-color: rgba(66,255,123,0.72); background: rgba(66,255,123,0.14); color: #baffca; }

input,
textarea,
select {
  background: linear-gradient(135deg, rgba(255,255,255,0.045), rgba(77,163,255,0.055));
  border-color: rgba(123,151,255,0.34);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,245,212,0.14), 0 0 20px rgba(0,245,212,0.18);
}

.store-item:hover,
.achievement-badge.unlocked:hover,
.landing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 28px rgba(0,245,212,0.14), 0 14px 38px rgba(0,0,0,0.38);
}

.buy-button {
  background: linear-gradient(135deg, var(--teal), var(--blue), var(--purple), var(--pink));
  box-shadow: 0 0 20px rgba(0,245,212,0.35);
}

.toast {
  background: linear-gradient(135deg, rgba(23,33,54,0.96), rgba(26,18,44,0.96));
  border-color: rgba(0,245,212,0.46);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: rgba(5,8,19,0.82);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--teal), var(--blue), var(--purple), var(--pink));
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--gold), var(--orange), var(--pink));
}

@media (max-width: 850px) {
  .sidebar {
    background: linear-gradient(135deg, rgba(0,245,212,0.10), rgba(255,79,184,0.08));
  }
}



/* ─── COSMETIC THEME SWITCHER ─────────────────────────────── */
.theme-switcher {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid rgba(90,171,255,0.35);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(90,171,255,0.10), rgba(192,132,255,0.08), rgba(0,224,200,0.06));
  box-shadow: 0 0 22px rgba(90,171,255,0.10);
}
.theme-switcher-title {
  font-size: 12px;
  color: var(--text);
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: .4px;
}
.theme-switcher-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.theme-choice,
.theme-use-button {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  transition: var(--transition);
}
.theme-choice:hover,
.theme-use-button:hover {
  transform: translateY(-1px);
  border-color: var(--teal);
  box-shadow: 0 0 18px rgba(0,224,200,0.22);
}
.theme-choice.active,
.theme-use-button.active {
  color: #05121d;
  background: linear-gradient(135deg, var(--teal), var(--blue), var(--gold));
  border-color: transparent;
  box-shadow: 0 0 24px rgba(90,171,255,0.38);
}

/* BLUE SKY LIGHT */
body.rkw-theme-blue {
  --bg: #071a2d;
  --surface: #10243a;
  --surface-2: #142f4c;
  --surface-3: #1b426b;
  --line: #2b6f9f;
  --line-bright: #5fc7ff;
  --text: #f4fbff;
  --muted: #a9cbe5;
  --teal: #00d9ff;
  --blue: #4ab7ff;
  --purple: #76a8ff;
  --pink: #ff70c8;
  --gold: #ffd45a;
  --green: #3df58a;
  background:
    radial-gradient(ellipse at 18% 0%, rgba(120,218,255,0.42) 0%, transparent 36%),
    radial-gradient(ellipse at 75% 8%, rgba(255,255,255,0.22) 0%, transparent 26%),
    radial-gradient(ellipse at 92% 70%, rgba(41,151,255,0.25) 0%, transparent 40%),
    linear-gradient(160deg, #071a2d 0%, #0b2a47 44%, #14385f 100%);
}
body.rkw-theme-blue .topbar {
  background: rgba(8,26,45,0.92);
  background-image: linear-gradient(rgba(8,26,45,0.92), rgba(8,26,45,0.92)),
    linear-gradient(90deg, #8be7ff, #4ab7ff, #ffd45a);
}
body.rkw-theme-blue .panel,
body.rkw-theme-blue .gir-live-panel,
body.rkw-theme-blue .store-item,
body.rkw-theme-blue .flight-card,
body.rkw-theme-blue .settings-card {
  background-image: linear-gradient(150deg, rgba(94,196,255,0.12), rgba(255,255,255,0.035), rgba(43,111,159,0.08));
}
body.rkw-theme-blue .primary-button,
body.rkw-theme-blue .buy-button {
  background: linear-gradient(135deg, #8be7ff, #4ab7ff, #ffd45a);
  color: #061827;
  box-shadow: 0 0 24px rgba(74,183,255,0.45);
}
body.rkw-theme-blue .brand-icon,
body.rkw-theme-blue .pilot-avatar,
body.rkw-theme-blue .rank-progress-bar {
  background: linear-gradient(135deg, #8be7ff, #4ab7ff, #76a8ff);
}
body.rkw-theme-blue .nav-item.active {
  color: #8be7ff;
  background: linear-gradient(90deg, rgba(74,183,255,0.30), rgba(255,212,90,0.08));
  border-left-color: #8be7ff;
}
body.rkw-theme-blue .store-balance-display,
body.rkw-theme-blue .topbar-economy,
body.rkw-theme-blue .wallet-mini {
  background: linear-gradient(135deg, rgba(255,212,90,0.16), rgba(139,231,255,0.12));
  border-color: rgba(139,231,255,0.45);
}

/* TWILIGHT PREMIUM */
body.rkw-theme-purple {
  --bg: #0d071d;
  --surface: #17102b;
  --surface-2: #21163a;
  --surface-3: #2c1f4f;
  --line: #4b3474;
  --line-bright: #aa7cff;
  --teal: #78ffe9;
  --blue: #8a9cff;
  --purple: #c084ff;
  --pink: #ff70c8;
  --gold: #ffd86b;
  background:
    radial-gradient(ellipse at 18% 0%, rgba(192,132,255,0.30) 0%, transparent 36%),
    radial-gradient(ellipse at 85% 10%, rgba(255,112,200,0.25) 0%, transparent 32%),
    radial-gradient(ellipse at 50% 100%, rgba(255,216,107,0.12) 0%, transparent 42%),
    linear-gradient(155deg, #0d071d 0%, #1b1034 50%, #271544 100%);
}
body.rkw-theme-purple .primary-button,
body.rkw-theme-purple .buy-button,
body.rkw-theme-purple .brand-icon,
body.rkw-theme-purple .pilot-avatar,
body.rkw-theme-purple .rank-progress-bar {
  background: linear-gradient(135deg, #ff70c8, #c084ff, #ffd86b);
}
body.rkw-theme-purple .panel,
body.rkw-theme-purple .gir-live-panel,
body.rkw-theme-purple .store-item,
body.rkw-theme-purple .flight-card,
body.rkw-theme-purple .settings-card {
  background-image: linear-gradient(150deg, rgba(192,132,255,0.13), rgba(255,112,200,0.06), rgba(255,216,107,0.04));
}

/* AVIATION WALLPAPER */
body.rkw-theme-aviation-wallpaper {
  --bg: #100d08;
  --surface: #1e1a16;
  --surface-2: #2a241d;
  --surface-3: #3b3023;
  --line: #6b5434;
  --line-bright: #ffc45b;
  --teal: #73f7df;
  --blue: #6fc7ff;
  --purple: #d7a8ff;
  --pink: #ff9bc8;
  --gold: #ffc45b;
  background:
    radial-gradient(ellipse at 16% 10%, rgba(255,196,91,0.30) 0%, transparent 32%),
    radial-gradient(ellipse at 80% 0%, rgba(111,199,255,0.18) 0%, transparent 34%),
    radial-gradient(ellipse at 55% 90%, rgba(255,128,68,0.16) 0%, transparent 44%),
    linear-gradient(155deg, #100d08 0%, #1d1b23 46%, #2d1a26 100%);
}
body.rkw-theme-aviation-wallpaper .primary-button,
body.rkw-theme-aviation-wallpaper .buy-button,
body.rkw-theme-aviation-wallpaper .brand-icon,
body.rkw-theme-aviation-wallpaper .pilot-avatar,
body.rkw-theme-aviation-wallpaper .rank-progress-bar {
  background: linear-gradient(135deg, #ffc45b, #ff8c2e, #6fc7ff);
}
