/* Curro Aftercare — design tokens (locked, see DESIGN-DECISIONS.md) */
:root {
  --curro-navy: #1A3A6A;
  --curro-navy-deep: #0F2A52;
  --curro-navy-bright: #2659A0;
  --curro-navy-soft: #E6EDF6;
  --curro-navy-line: #C9D5E5;

  --curro-yellow: #EFB22D;
  --curro-yellow-soft: #FBEED1;
  --curro-yellow-deep: #8B6510;

  --paper: #FFFFFF;
  --bg-blue: #1A3A6A;

  --ink: #0F2540;
  --ink-2: #455B7A;
  --ink-3: #8194AC;
  --on-blue: #FFFFFF;
  --on-blue-muted: #B6C9E2;

  --line: #E1E7F0;
  --line-soft: #F0F3F8;

  --good: #2E8C5A;
  --good-soft: #DCEFE3;
  --warn: #C97A1F;
  --warn-soft: #FAEBD3;
  --alert: #C24A2C;
  --alert-soft: #F8DBD0;

  /* Status colours — same dot/pill colour reused for matching status everywhere */
  --status-to-arrive: var(--warn);
  --status-at-aftercare: var(--good);
  --status-at-activity: var(--curro-navy-bright);
  --status-picked-up: var(--ink-3);
  --status-not-in: var(--ink-3);
  --status-late: var(--alert);

  --shadow-sm: 0 1px 2px rgba(15, 37, 64, 0.04), 0 2px 8px rgba(15, 37, 64, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 37, 64, 0.10), 0 2px 8px rgba(15, 37, 64, 0.06);
  --shadow-sheet: 0 -8px 32px rgba(15, 37, 64, 0.12);

  --radius-card: 18px;
  --radius-row: 14px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }

html, body { height: 100%; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "tnum" 0;
  color: var(--ink);
  background: var(--line-soft);
  line-height: 1.5;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--curro-navy-bright); text-decoration: none; }

.tnum { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Defensive: if a per-component CSS rule fails to load (stale cache, network blip),
   any unsized inline SVG defaults to 300×150 in browsers and blows out the layout.
   Cap them to a sensible icon size as a safety net. Component CSS overrides this
   when it loads correctly. */
svg:not([width]):not([height]) { max-width: 24px; max-height: 24px; }

/* ============================================================
   Round 9 — global offline banner (warn-orange, top of .app)
   ============================================================ */
.offline-banner {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--warn);
  color: var(--paper);
  padding: 8px 16px;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
  z-index: 70;
}
.offline-banner.show { display: flex; }
.offline-banner svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ============================================================
   Round 9 — shimmer skeletons (shape preserved)
   ============================================================ */
@keyframes shimmer-bg {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skel {
  background: linear-gradient(90deg, #ECF0F6 25%, #F5F7FB 50%, #ECF0F6 75%);
  background-size: 200% 100%;
  animation: shimmer-bg 1.5s ease-in-out infinite;
  border-radius: 6px;
  display: block;
}

/* ============================================================
   Round 9 — empty state hero (used on parent Today)
   ============================================================ */
.empty-hero-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 36px 24px 28px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(15, 37, 64, 0.04);
  margin-bottom: 16px;
}
.empty-illustration {
  width: 120px; height: 120px;
  margin: 0 auto 24px;
  position: relative;
  background: linear-gradient(135deg, var(--curro-navy-soft) 0%, #F0F4FA 100%);
  border-radius: 32px;
  display: flex; align-items: center; justify-content: center;
}
.empty-illustration .school-icon { width: 56px; height: 56px; color: var(--curro-navy); opacity: 0.7; }
.empty-illustration .pulse-dot {
  position: absolute;
  top: 18%; right: 18%;
  width: 14px; height: 14px;
  background: var(--curro-yellow);
  border: 3px solid var(--paper);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(239, 178, 45, 0.5);
  animation: pulse-yellow 2s infinite;
}
@keyframes pulse-yellow {
  0%   { box-shadow: 0 0 0 0 rgba(239, 178, 45, 0.5); }
  70%  { box-shadow: 0 0 0 12px rgba(239, 178, 45, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 178, 45, 0); }
}
.empty-eyebrow {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--curro-navy);
  margin-bottom: 8px;
}
.empty-h1 {
  font-size: 22px; font-weight: 700; letter-spacing: -0.025em;
  color: var(--ink); line-height: 1.15;
  margin-bottom: 8px;
}
.empty-h1 .accent { color: var(--curro-navy); }
.empty-p {
  font-size: 13.5px; color: var(--ink-2);
  line-height: 1.55; font-weight: 500;
  max-width: 280px; margin: 0 auto 18px;
}
.empty-time-card {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--curro-yellow-soft);
  border: 1px solid rgba(239, 178, 45, 0.3);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 12.5px; font-weight: 700;
  color: var(--curro-yellow-deep);
  letter-spacing: -0.01em;
}
.empty-time-card svg { width: 14px; height: 14px; color: var(--curro-yellow-deep); }

/* Stale data treatment — used when offline and showing last-loaded state */
.stale .status-hero { opacity: 0.85; }
.stale .status-pill {
  background: var(--warn-soft) !important;
  color: var(--warn) !important;
}
.stale .status-pill::before { background: var(--warn) !important; box-shadow: none !important; animation: none !important; }
.stale-meta-warn {
  font-size: 11.5px;
  color: var(--warn);
  font-weight: 700;
  margin-top: 8px;
  display: flex; align-items: center; gap: 6px;
}
.stale-meta-warn svg { width: 12px; height: 12px; }
