/* ShellDeals dashboard — tokens per docs/DESIGN.md */
:root {
  color-scheme: dark;
  --bg: #0b1020; --surface: #131a30; --surface-2: #182036;
  --border: #232c4a; --text: #e7ecf5; --text-dim: #9aa7c1;
  --text-faint: #5d6b8a; --accent: #6ea8ff; --accent-soft: rgba(110,168,255,.13);
  --good: #4ade80; --warn: #fbbf24; --danger: #f87171;
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select {
  font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px;
}
input::placeholder { color: var(--text-faint); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--text-dim); }

/* layout */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 5;
}
.logo { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.logo em { color: var(--accent); font-style: normal; }
.spacer { flex: 1; }
main { padding: 16px 20px 40px; max-width: 1400px; margin: 0 auto; }

/* stats hero */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.tile .k { color: var(--text-faint); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.tile .v { font-size: 1.4rem; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 2px; }
.tile .sub { color: var(--text-dim); font-size: .78rem; }

/* filter bar */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters input[type="search"] { min-width: 240px; flex: 1; }
.filters select { max-width: 150px; }
.filters .pillbtn {
  border-radius: 999px; background: var(--accent-soft); border-color: rgba(110,168,255,.35);
  color: var(--accent); cursor: pointer;
}
.clearbtn { color: var(--text-dim); cursor: pointer; background: none; border-style: dashed; }

/* pills */
.pill {
  display: inline-block; padding: 1px 9px; border-radius: 999px;
  border: 1px solid var(--border); font-size: .72rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}
.pill.offer { border-color: #2e5d3b; color: #86d89c; }
.pill.transfer { border-color: #5b4d23; color: var(--warn); }
.pill.flash { border-color: #5b2d3a; color: var(--danger); }
.pill.slot { border-color: rgba(110,168,255,.4); color: var(--accent); }
.pill.staff { color: var(--text-faint); }

/* table */
.tablewrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-faint); padding: 10px 12px; border-bottom: 1px solid var(--border);
  cursor: pointer; user-select: none; white-space: nowrap; background: var(--surface);
}
tbody td { padding: 9px 12px; border-bottom: 1px solid rgba(35,44,74,.45); vertical-align: top; }
tbody tr:hover { background: var(--surface-2); cursor: pointer; }
td.title-cell { max-width: 480px; }
td.title-cell .t { color: var(--text); }
.price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.age { color: var(--text-faint); font-size: .78rem; white-space: nowrap; }
.specs { color: var(--text-dim); font-size: .78rem; }

/* states */
.state { padding: 40px; text-align: center; color: var(--text-dim); }
.state .big { font-size: 1.1rem; color: var(--text); margin-bottom: 6px; }
.offline-banner { background: #3a2b12; border: 1px solid #6b531e; color: var(--warn); padding: 8px 20px; }
.countdown { color: var(--text-faint); font-size: .78rem; }

/* drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(4,8,18,.6); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw);
  background: var(--surface); border-left: 1px solid var(--border);
  padding: 20px; overflow-y: auto; z-index: 20;
}
.drawer h2 { font-size: 1.05rem; line-height: 1.35; margin-bottom: 8px; }
.drawer .meta { color: var(--text-faint); font-size: .78rem; margin-bottom: 12px; }
.offer-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: .85rem; }
.offer-card .raw { color: var(--text-faint); font-size: .75rem; margin-top: 6px; border-top: 1px dashed var(--border); padding-top: 6px; }
.kv { display: flex; gap: 8px; margin: 3px 0; font-size: .82rem; }
.kv .k { color: var(--text-faint); min-width: 90px; }

/* timetable */
.slot-row { display: flex; gap: 12px; align-items: baseline; padding: 9px 12px; border-bottom: 1px solid rgba(35,44,74,.45); }
.slot-row .time { font-variant-numeric: tabular-nums; color: var(--text-faint); white-space: nowrap; }
.slot-row.live .time { color: var(--good); }
.slot-row.upcoming .time { color: var(--warn); }
.slot-row.past { opacity: .55; }

/* login */
.login-wrap { display: grid; place-items: center; height: 100vh; }
.login-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2.5rem 2rem; width: min(360px, 90vw); text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.login-card input { width: 100%; margin: 14px 0 10px; }
.login-card button { width: 100%; background: var(--accent-soft); border-color: rgba(110,168,255,.35); color: var(--accent); cursor: pointer; }
.err { color: var(--danger); font-size: .8rem; min-height: 1em; }

@media (max-width: 760px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .hide-mobile { display: none; }
  .drawer { width: 100vw; }
}
