/* ============================================================
   quantnode design tokens
   A trading-desk / terminal register: deep ink background,
   monospace for system chrome, Inter for reading text.
   Per-area accents: life = copper, trading = signal green,
   math = violet (matches the tracker's existing dot color).
   ============================================================ */

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

:root {
  --bg: #0B0E14;
  --surface: #11151F;
  --surface-2: #161B27;
  --border: #232838;
  --border-strong: #323a52;

  --text: #E7E9EE;
  --text-dim: #8C93A6;
  --text-faint: #565D72;

  --life: #D98E4B;
  --trading: #2FA876;
  --math: #7F77DD;
  --danger: #D85A30;

  --radius: 10px;
  --radius-lg: 14px;

  --mono: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* focus visibility, kept simple and consistent everywhere */
:focus-visible {
  outline: 2px solid var(--text-dim);
  outline-offset: 2px;
}

/* ---------- terminal status bar (the page's signature element) ---------- */
.statusbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 0.5px solid var(--border);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
  background: var(--surface);
}

.statusbar .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--trading);
  box-shadow: 0 0 6px var(--trading);
  flex-shrink: 0;
}

.statusbar .crumb { color: var(--text-faint); }
.statusbar .crumb-current { color: var(--text); }

.statusbar .cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: var(--text-dim);
  margin-left: 1px;
  animation: blink 1.1s steps(1) infinite;
  vertical-align: -2px;
}

@keyframes blink { 50% { opacity: 0; } }

.statusbar-right {
  margin-left: auto;
  display: flex;
  gap: 16px;
  align-items: center;
}

.statusbar button.logout {
  background: transparent;
  border: 0.5px solid var(--border-strong);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.statusbar button.logout:hover { color: var(--text); border-color: var(--text-dim); }

/* ---------- shared layout shell ---------- */
.page {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}

/* ---------- menu page ---------- */
.hero {
  padding: 72px 0 40px;
  text-align: center;
}

.hero h1 {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.hero p {
  margin-top: 10px;
  color: var(--text-faint);
  font-size: 14px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 720px) {
  .card-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 32px; }
}

.route-card {
  display: block;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  transition: border-color 0.15s, transform 0.15s;
}

.route-card:hover { transform: translateY(-2px); }
.route-card[data-area="life"]:hover { border-color: var(--life); }
.route-card[data-area="trading"]:hover { border-color: var(--trading); }
.route-card[data-area="math"]:hover { border-color: var(--math); }

.route-card .path {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
}

.route-card[data-area="life"] .path { color: var(--life); }
.route-card[data-area="trading"] .path { color: var(--trading); }
.route-card[data-area="math"] .path { color: var(--math); }

.route-card h2 {
  font-size: 19px;
  font-weight: 600;
  margin: 10px 0 6px;
}

.route-card p {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.5;
}

.route-card .ext {
  display: inline-block;
  margin-left: 6px;
  color: var(--text-faint);
  font-size: 12px;
}

/* ---------- login ---------- */
.login-wrap {
  min-height: calc(100vh - 46px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
}

.login-card .eyebrow { text-align: center; margin-bottom: 18px; }

.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  background: var(--surface-2);
  border: 0.5px solid var(--border-strong);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
}

.field input:focus { border-color: var(--text-dim); }

.login-card button[type="submit"] {
  width: 100%;
  margin-top: 6px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.login-card button[type="submit"]:hover { opacity: 0.9; }

.login-error {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--danger);
  margin-bottom: 14px;
}

/* ---------- generic content sections (life / trading) ---------- */
.section-title {
  font-size: 22px;
  font-weight: 600;
  margin: 36px 0 4px;
}

.section-sub {
  color: var(--text-dim);
  font-size: 13.5px;
  margin-bottom: 24px;
}

.placeholder-card {
  background: var(--surface);
  border: 0.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
}

.placeholder-card h3 {
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.placeholder-card p {
  color: var(--text-faint);
  font-size: 13px;
  font-style: italic;
}

.coming-soon {
  margin-top: 32px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- weekly tracker (ported from the uploaded widget,
   re-themed onto the token system above) ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tab { padding: 7px 18px; border-radius: var(--radius); border: 0.5px solid var(--border-strong); background: transparent; cursor: pointer; font-size: 13.5px; color: var(--text-dim); font-family: var(--sans); transition: all 0.15s; }
.tab.active { background: var(--surface-2); color: var(--text); border-color: var(--text-faint); font-weight: 500; }

.section { margin-bottom: 2rem; }
.section-label { font-size: 11.5px; color: var(--text-faint); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.75rem; font-family: var(--mono); }

.day-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 10px; }
.day-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 0.5px solid var(--border); }
.day-name { font-weight: 500; font-size: 15px; }
.day-tag { font-size: 11px; padding: 3px 10px; border-radius: 20px; font-family: var(--mono); }
.tag-hard { background: #1E1B3A; color: #ABA4F5; }
.tag-active { background: #1B2A12; color: #9CD974; }
.tag-light { background: #102621; color: #6FD9BC; }
.tag-rest { background: #1C1C1C; color: #9A988F; }

.blocks { padding: 10px 16px 14px; display: flex; flex-direction: column; gap: 7px; }
.block { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: var(--radius); }
.block-time { font-size: 12px; color: var(--text-faint); min-width: 80px; margin-top: 2px; font-family: var(--mono); }
.block-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.block-content { flex: 1; }
.block-title { font-size: 14px; font-weight: 500; }
.block-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

.dot-math { background: var(--math); }
.dot-trade { background: var(--trading); }
.dot-lang { background: #378ADD; }
.dot-edu { background: #EF9F27; }
.dot-workout { background: #D85A30; }
.dot-rest { background: #565D72; }

.tracker-grid { display: grid; grid-template-columns: 130px repeat(7, 1fr); gap: 1px; background: var(--border); border-radius: var(--radius-lg); overflow: hidden; border: 0.5px solid var(--border); }
.tg-cell { background: var(--surface); padding: 9px 6px; text-align: center; font-size: 12px; }
.tg-header { background: var(--surface-2); font-weight: 500; font-size: 12px; color: var(--text-dim); font-family: var(--mono); }
.tg-area { text-align: left; padding-left: 12px; font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 7px; }

.check-btn { width: 26px; height: 26px; border-radius: 6px; border: 0.5px solid var(--border-strong); background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; margin: 0 auto; transition: all 0.12s; font-size: 13px; color: var(--text); }
.check-btn.done { border-color: transparent; }
.check-btn.done.c-math { background: #1E1B3A; color: #ABA4F5; }
.check-btn.done.c-trade { background: #102621; color: #6FD9BC; }
.check-btn.done.c-lang { background: #102233; color: #7FB6EE; }
.check-btn.done.c-edu { background: #2A1E08; color: #F2B84E; }
.check-btn.done.c-workout { background: #2A140A; color: #F0916C; }
.check-btn[disabled] { opacity: 0.4; cursor: default; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 1.5rem; }
.stat-card { background: var(--surface-2); border-radius: var(--radius); padding: 14px 16px; }
.stat-label { font-size: 11.5px; color: var(--text-dim); margin-bottom: 4px; font-family: var(--mono); }
.stat-value { font-size: 22px; font-weight: 600; }
.stat-sub { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

.rules-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 1rem 1.25rem; margin-bottom: 10px; }
.rule-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 0.5px solid var(--border); }
.rule-row:last-child { border-bottom: none; padding-bottom: 0; }
.rule-text { font-size: 14px; line-height: 1.5; color: var(--text); }
.rule-text strong { font-weight: 600; }

.week-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 1rem; }
.week-nav button { background: transparent; border: 0.5px solid var(--border-strong); border-radius: var(--radius); padding: 5px 12px; cursor: pointer; font-size: 13px; color: var(--text-dim); font-family: var(--mono); }
.week-label { font-size: 14px; font-weight: 500; flex: 1; font-family: var(--mono); }
.progress-bar-wrap { height: 5px; background: var(--surface-2); border-radius: 3px; margin-top: 6px; }
.progress-bar { height: 5px; border-radius: 3px; transition: width 0.2s; }
