/* WRC Cockpit v0 -- operator-grade dense */
:root {
  --bg: #1A1A1C;
  --bg-deep: #111113;
  --bg-deeper: #0A0A0B;
  --surface: #1F1F22;
  --surface-2: #26262A;
  --line: #2E2E33;
  --text: #FFFFFF;
  --text-2: #C8C8CE;
  --text-3: #8A8A92;
  --accent: #FF1654;
  --accent-2: #FF4778;
  --good: #4CD080;
  --warn: #F2C94C;
  --bad: #FF4D4F;
  --mono: 'Noto Sans Mono', 'JetBrains Mono', Menlo, monospace;
  --sans: 'Lato', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: 0.005em;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo { width: 42px; height: 42px; }
.brand-name {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.18em;
}
.brand-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}
.meta { display: flex; gap: 18px; }
.meta-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.meta-item:first-child { border-left: none; padding-left: 0; }
.meta-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}
.meta-value {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-top: 3px;
}

/* Layout */
main {
  padding: 24px 28px 40px;
  max-width: 1680px;
  margin: 0 auto;
}

.block {
  margin-bottom: 32px;
}

.block-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
}
.block-head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.today .block-head h2 { font-size: 36px; color: var(--text); }
.today .block-head { border-bottom-color: var(--accent); }
.block-sub {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

/* Grid */
.grid {
  display: grid;
  gap: 14px;
}
.today-grid {
  grid-template-columns: repeat(4, 1fr);
}
.status-grid {
  grid-template-columns: repeat(5, 1fr);
}
.personal-grid {
  grid-template-columns: repeat(4, 1fr);
}
.span-2 { grid-column: span 2; }

@media (max-width: 1240px) {
  .today-grid, .status-grid, .personal-grid { grid-template-columns: repeat(2, 1fr); }
  .span-2 { grid-column: span 2; }
}
@media (max-width: 720px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .meta { flex-wrap: wrap; gap: 10px; }
  .meta-item { border-left: none; padding-left: 0; align-items: flex-start; }
  .today-grid, .status-grid, .personal-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  min-height: 140px;
}
.today .card { min-height: 180px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
}
.badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--accent);
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}
.badge.tag-stub { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--line); }
.badge.good { background: var(--good); color: #0A0A0B; }
.badge.warn { background: var(--warn); color: #0A0A0B; }
.badge.bad  { background: var(--bad); }

.card-body {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  margin: 0 0 10px;
}
.hint {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  margin: 8px 0 0;
}

/* Top 3 */
.top3 {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: top3;
}
.top3 li {
  counter-increment: top3;
  position: relative;
  padding: 10px 0 10px 36px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}
.top3 li:last-child { border-bottom: none; }
.top3 li::before {
  content: counter(top3);
  position: absolute;
  left: 0;
  top: 8px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
}

/* List */
.list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list li {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-2);
}
.list li:last-child { border-bottom: none; }
.list .time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  min-width: 78px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.skeleton {
  color: var(--text-3);
  font-style: italic;
  opacity: 0.7;
}

/* KV list */
.kv-list { display: flex; flex-direction: column; gap: 6px; }
.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px dotted var(--line);
  font-size: 13px;
}
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--text-3); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.kv .v { color: var(--text); font-weight: 700; text-align: right; }

/* Big stat */
.big-stat {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.big-stat.single { grid-template-columns: 1fr; }
.stat { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; background: var(--surface-2); border-radius: 6px; }
.stat-num { font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--text); }
.stat-label { font-family: var(--mono); font-size: 9px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

/* Cutover countdown */
.cutover { background: linear-gradient(160deg, var(--surface) 0%, #2A1518 100%); border-color: var(--accent); }
.countdown {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0;
}
.countdown-num {
  font-family: var(--mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.countdown-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Progress */
.progress-wrap { margin-top: 6px; }
.progress {
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  transition: width 0.4s ease;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 4px;
  margin-top: auto;
}
.btn:hover { background: var(--accent-2); color: #fff; }

/* Principle */
.principle-card {
  background: linear-gradient(135deg, var(--bg-deep) 0%, var(--surface) 100%);
}
.principle {
  margin: 0;
  padding: 8px 0 0;
  font-size: 18px;
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
  border-left: 3px solid var(--accent);
  padding-left: 14px;
}

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  padding: 14px 28px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}
.footer .dot { margin: 0 8px; }
