/* Ground Hours 賺時 — Mission Control design system
   Dark "mission control" theme. All section modules style with the
   class vocabulary defined here; avoid inventing new colors. */

:root {
  --bg:        #0b0f17;
  --bg-2:      #0f1521;
  --panel:     #121a28;
  --panel-2:   #16202f;
  --line:      #233044;
  --line-soft: #1b2636;

  --txt:       #e8eef6;
  --txt-2:     #aab6c6;
  --txt-3:     #6f7e92;

  --accent:    #5eead4;   /* teal — the brand "ground" */
  --accent-2:  #38bdf8;   /* sky */
  --gold:      #fbbf24;   /* the pass / money */
  --ok:        #34d399;
  --warn:      #fbbf24;
  --risk:      #fb7185;
  --info:      #818cf8;

  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 10px 30px -12px rgba(0,0,0,.6);
  --mono:      "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans:      "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: radial-gradient(1200px 600px at 80% -10%, #14203033, transparent),
              var(--bg);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
}

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; align-self: start; height: 100vh;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 22px 16px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 18px; }
.brand__mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 22px; font-weight: 800; color: #042e2a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px -6px var(--accent);
}
.brand__name { font-weight: 800; letter-spacing: .2px; }
.brand__zh { font-size: 12px; color: var(--txt-3); margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; padding-right: 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 9px; color: var(--txt-2);
  text-decoration: none; font-size: 13.5px; font-weight: 500;
  border: 1px solid transparent; transition: all .15s;
}
.nav a:hover { background: var(--panel); color: var(--txt); }
.nav a.active { background: var(--panel-2); color: var(--txt); border-color: var(--line); }
.nav a .nav__ix { font-family: var(--mono); font-size: 11px; color: var(--txt-3); width: 18px; }
.nav a.active .nav__ix { color: var(--accent); }

.sidebar__foot { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--txt-3); padding: 14px 8px 2px; border-top: 1px solid var(--line); }
.sidebar__lamp { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px #34d39922; }

.main { min-width: 0; }

/* ---------- topbar ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  padding: 30px 38px 22px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #0f1828, transparent);
}
.topbar__title { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.4px; }
.topbar__zh { color: var(--accent); }
.topbar__sub { margin: 6px 0 0; color: var(--txt-2); font-size: 14px; max-width: 640px; }
.countdown { text-align: right; }
.countdown__val { font-family: var(--mono); font-size: 38px; font-weight: 700; color: var(--gold); line-height: 1; }
.countdown__label { font-size: 11.5px; color: var(--txt-3); margin-top: 6px; }

.panels { padding: 26px 38px 10px; display: flex; flex-direction: column; gap: 26px; }

/* ---------- panel (section) ---------- */
.panel { scroll-margin-top: 18px; }
.panel__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel__ix { font-family: var(--mono); font-size: 12px; color: var(--accent); border: 1px solid var(--line); border-radius: 7px; padding: 3px 8px; }
.panel__title { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.2px; }
.panel__sub { color: var(--txt-3); font-size: 13px; margin: 2px 0 0; }
.panel__head-text { display: flex; flex-direction: column; }

/* ---------- grids ---------- */
.grid { display: grid; gap: 16px; }
.cols-1 { grid-template-columns: 1fr; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .cols-4 { grid-template-columns: repeat(2,1fr); } .cols-3 { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 720px)  { .cols-2,.cols-3,.cols-4 { grid-template-columns: 1fr; } }

/* ---------- card ---------- */
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.card--flush { padding: 0; overflow: hidden; }
.card__title { font-size: 14px; font-weight: 700; margin: 0 0 10px; display:flex; align-items:center; gap:8px; }
.card__num { font-family: var(--mono); color: var(--accent); font-size: 12px; }
.card p { color: var(--txt-2); font-size: 13.5px; line-height: 1.55; margin: 0 0 8px; }
.card strong { color: var(--txt); }

/* ---------- tile (KPI) ---------- */
.tile { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.tile__label { font-size: 12px; color: var(--txt-3); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.tile__value { font-family: var(--mono); font-size: 28px; font-weight: 700; margin: 8px 0 4px; color: var(--txt); }
.tile__value.is-gold { color: var(--gold); }
.tile__value.is-accent { color: var(--accent); }
.tile__sub { font-size: 12px; color: var(--txt-2); }
.tile__delta { font-size: 12px; font-weight: 600; }

/* ---------- badges & tags ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--txt-2); background: #0d1622; text-transform: uppercase; letter-spacing: .4px; }
.badge.is-ok   { color: var(--ok);   border-color: #34d39955; background: #34d3991a; }
.badge.is-warn { color: var(--warn); border-color: #fbbf2455; background: #fbbf241a; }
.badge.is-risk { color: var(--risk); border-color: #fb718555; background: #fb71851a; }
.badge.is-info { color: var(--info); border-color: #818cf855; background: #818cf81a; }
.badge.is-gold { color: var(--gold); border-color: #fbbf2455; background: #fbbf2414; }
.badge.is-muted{ color: var(--txt-3); }

.tag { display:inline-block; font-size: 11.5px; color: var(--txt-2); background: #0d1622; border: 1px solid var(--line); border-radius: 7px; padding: 3px 8px; margin: 2px 4px 2px 0; }
.tag--accent { color: var(--accent); border-color: #5eead455; }

/* ---------- progress bar ---------- */
.bar { height: 8px; background: #0c1420; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bar__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bar__fill.is-gold { background: linear-gradient(90deg, var(--gold), #f59e0b); }
.bar__fill.is-risk { background: linear-gradient(90deg, var(--risk), #f43f5e); }
.bar__fill.is-warn { background: linear-gradient(90deg, var(--warn), #f59e0b); }

/* ---------- key/value rows ---------- */
.kv { display: flex; flex-direction: column; gap: 0; }
.kv__row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv__row:last-child { border-bottom: 0; }
.kv__k { color: var(--txt-3); }
.kv__v { color: var(--txt); font-weight: 600; text-align: right; }
.kv__v.is-mono { font-family: var(--mono); }

/* ---------- list ---------- */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.list__item { display: flex; gap: 11px; font-size: 13.5px; color: var(--txt-2); line-height: 1.5; }
.list__item .dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 7px; }
.list__item .dot.is-risk { background: var(--risk); }
.list__item .dot.is-gold { background: var(--gold); }
.list__num { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px; background: #0d1622; border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--mono); font-size: 11px; color: var(--accent); }

/* ---------- timeline ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content:""; position:absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -26px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.tl-dot.is-gate { border-color: var(--gold); background: var(--gold); }
.tl-dot.is-risk { border-color: var(--risk); }
.tl-date { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.tl-title { font-weight: 700; font-size: 14px; margin: 2px 0 3px; }
.tl-body { font-size: 13px; color: var(--txt-2); line-height: 1.5; }

/* ---------- gate card ---------- */
.gate { border-left: 3px solid var(--gold); }
.gate__crit { display:flex; gap:9px; align-items:flex-start; font-size:13px; color:var(--txt-2); padding:7px 0; }
.gate__crit .mark { color: var(--gold); font-family: var(--mono); }

/* ---------- misc utilities ---------- */
.lead { font-size: 15px; line-height: 1.6; color: var(--txt-2); }
.lead strong { color: var(--txt); }
.muted { color: var(--txt-3); }
.mono { font-family: var(--mono); }
.hr { height: 1px; background: var(--line); border: 0; margin: 14px 0; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.quote { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; color: var(--txt-2); font-style: italic; font-size: 13.5px; line-height: 1.55; }
.stat-inline { font-family: var(--mono); color: var(--accent); font-weight: 600; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.table th { color: var(--txt-3); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; }
.table td { color: var(--txt-2); }
.table td.num, .table th.num { text-align: right; font-family: var(--mono); }
.table tr:last-child td { border-bottom: 0; }

.footer { padding: 26px 38px 40px; color: var(--txt-3); font-size: 12px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 10px; }
.footer code { color: var(--txt-2); background: #0d1622; padding: 1px 6px; border-radius: 5px; font-family: var(--mono); font-size: 11px; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar__foot { width: 100%; }
  .topbar { padding: 22px 20px; flex-direction: column; align-items: flex-start; }
  .panels { padding: 20px; }
}
