/* ===== base.css - Variables, Reset, Typography ===== */

:root {
  /* ===== Design system tokens =====
     Step 1 of the design-system plan (docs/design-system-plan.md): every colour
     used in the app should resolve from a named token here, so later steps can
     change the palette in one place. Values below are the CURRENT colours, so
     this introduces the names with no visual change. Steps 2-3 flip the values
     (accent off Ant blue, admin role its own colour, near-colourless chrome). */

  /* Chrome: surfaces, lines, text. --bg derives from --ink so step 3 is a
     one-line change. */
  --ink: #0e1216;            /* neutral graphite so the rainbow pills read true */
  --bg: var(--ink);
  --panel: #141b22;
  --panel-2: #19222b;
  --table-border: rgba(255,255,255,0.06);
  --line: var(--table-border);
  --line-strong: rgba(255,255,255,0.14);
  --text: #e6eef6;
  --muted: #8b98a6;
  --faint: #5d6873;
  --muted-bg: #4b5563;
  --muted-text: #9ca3af;

  /* Interaction accent (chrome only): a muted instrument teal, not Ant blue.
     Driven by --accent-rgb so the solid accent and every translucent wash
     (today highlights, focus rings) flip together from one place. */
  --accent-rgb: 77 138 154;          /* #4d8a9a */
  --accent: rgb(var(--accent-rgb));
  --accent-strong: #3d7180;          /* darker teal for hover */
  --accent-soft: rgb(var(--accent-rgb) / 0.08);

  /* Semantic status */
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #7bd389;        /* money in / positive */
  --warning: #ffa500;
  --role: #a78bfa;           /* admin role, its own violet (not --danger, not --ob5) */

  /* Schedule / absence categories (data colours referenced by templates) */
  --sem: #c7c700;            /* vacation (SEM) */
  --blue: #3b82f6;           /* secondary blue: substitutes, parental, overrides */
  --ob-sick: #f97316;        /* OB lost on sick days */
  --ob5: #a855f7;            /* highest OB level / absence purple */

  /* Typography: display for headings, body for prose, mono for all hard data */
  --font-display: 'Bricolage Grotesque', Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 0.5rem;

  /* Back-compat aliases (existing names kept, same resolved values) */
  --background: var(--bg);
  --accent-2: var(--success);
  --primary: var(--accent);
  --primary-dark: var(--accent-strong);
  --info: var(--accent);
  --info-bg: var(--accent-soft);
  --glass: rgba(255,255,255,0.03);
  --table-stripe: rgba(255,255,255,0.02);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: var(--font-body);
  background: linear-gradient(180deg, var(--bg), #071018 120%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
  font-size: 1rem;
  /* Tabular figures so numeric data (hours, pay, dates, shift codes) keeps
     a fixed digit width and columns stay aligned across the app. */
  font-variant-numeric: tabular-nums;
}

h1, h2, h3, .page-title {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 0.75rem 0;
}
h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }

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

/* Utility Classes */
.row { display: flex; gap: 0.75rem; align-items: center; }
.col { flex: 1; }
.w-sm { min-width: 3.75rem; }
.w-md { min-width: 7.5rem; }
.w-lg { min-width: 8.75rem; }

/* Responsive Base */
@media (max-width: 800px) {
  h1 { font-size: 1.25rem; }
  h2, .page-title { font-size: 1.125rem; }
  h3 { font-size: 0.9375rem; }
}