/* Fika — look "Direction C".
   Forest green for headers and main buttons, ochre for progress only, terracotta for alerts only,
   bright green for confirmations, cream for the content area. Fredoka for headings, Nunito Sans for text. */

:root {
  --forest: #01553A;
  --forest-2: #276F58;
  --ochre: #E3A23B;
  --terra: #A4472A;
  --terra-tint: #F7DCD0;
  --terra-ink: #7E3420;
  --green: #2F7D4B;
  --green-tint: #DDF1E2;
  --cream: #F7F1E6;
  --card: #FFFFFF;
  --ink: #2B2A22;
  --muted: #6B5E4A;
  --line: #D8CBB5;
  --soft: #EFE6D5;
  --on-forest: #F7F1E6;
  --on-forest-muted: #D7E6DC;
  --shadow: 0 6px 16px rgba(60, 50, 30, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cream: #17150F; --card: #24211A; --ink: #F2EBDD; --muted: #BFB29B; --line: #4A4335; --soft: #2E2A21;
    --terra-tint: #4A2418; --terra-ink: #F6C2AE; --green-tint: #1D3A28; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --cream: #17150F; --card: #24211A; --ink: #F2EBDD; --muted: #BFB29B; --line: #4A4335; --soft: #2E2A21;
  --terra-tint: #4A2418; --terra-ink: #F6C2AE; --green-tint: #1D3A28; --shadow: none; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; background: var(--forest); }
body {
  margin: 0; min-height: 100%; background: var(--cream); color: var(--ink);
  font-family: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif; font-size: 16px; line-height: 1.4;
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%;
}
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3, .display { font-family: 'Fredoka', 'Nunito Sans', sans-serif; font-weight: 600; margin: 0; line-height: 1.15; }
a { color: inherit; }
.noscript { padding: 24px; text-align: center; }

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--cream); }

/* ---------- Logo and splash ---------- */
.logo { display: block; height: 28px; width: auto; }
.logo-tagline { display: block; width: 260px; max-width: 72vw; height: auto; }

/* ---------- Header and the chitenge band ---------- */
.hero {
  background: var(--forest); color: var(--on-forest);
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.hero h1 { font-size: 28px; }
.hero .sub { color: var(--on-forest-muted); }
/* The pattern under every header. Replace img/band.svg with the final chitenge pattern. */
.band { display: block; height: 16px; background: url('../img/band.svg') repeat-x left center / auto 16px; flex-shrink: 0; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 22px; border: none; background: rgba(255, 255, 255, .12); color: var(--on-forest);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon-btn svg { width: 22px; height: 22px; }
.hero-actions { display: flex; gap: 8px; }
.back { background: none; border: none; color: var(--on-forest-muted); font-weight: 700; padding: 10px 0; display: inline-flex; align-items: center; gap: 4px; }
.back svg { width: 20px; height: 20px; }

/* ---------- Content ---------- */
.content { padding: 18px 16px 28px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.card { background: var(--card); border-radius: 22px; padding: 16px 18px; box-shadow: var(--shadow); }
.card h2 { font-size: 22px; }
.card h3 { font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; }
.row2 { display: flex; gap: 10px; }
.row2 > * { flex: 1 1 0; min-width: 0; }
.spacer { flex: 1; }
.empty { padding: 22px; text-align: center; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  min-height: 56px; border-radius: 28px; border: none; font-size: 17px; font-weight: 700; padding: 0 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; text-align: center;
}
.btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.row2 > .btn { white-space: nowrap; padding: 0 14px; }
.btn-big { min-height: 60px; border-radius: 30px; font-size: 18px; width: 100%; }
.btn-primary { background: var(--forest); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-ochre { background: var(--ochre); color: #2B2A22; }
.btn-outline { background: var(--card); color: var(--ink); border: 2px solid var(--line); }
.btn-on-forest { background: var(--on-forest); color: var(--forest); }
.btn-ghost-forest { background: transparent; color: var(--on-forest); border: 2px solid rgba(255, 255, 255, .35); }
.btn-small { min-height: 44px; border-radius: 22px; font-size: 15px; padding: 0 16px; }
.linkish { background: none; border: none; color: var(--muted); font-weight: 700; font-size: 15px; padding: 12px; text-decoration: underline; align-self: center; }
.btn-danger-text { color: var(--terra-ink); }

/* ---------- Alerts (terracotta only here) and confirmations (green) ---------- */
.alert { background: var(--terra-tint); color: var(--terra-ink); border-radius: 16px; padding: 12px 14px; font-weight: 700; font-size: 15px; }
.alert-on-forest { background: var(--terra-tint); color: var(--terra-ink); border-radius: 16px; padding: 10px 14px; font-weight: 700; font-size: 15px; }
.confirm { background: var(--green-tint); color: var(--green); border-radius: 16px; padding: 12px 14px; font-weight: 700; font-size: 15px; }
.note { background: var(--soft); border-radius: 16px; padding: 12px 14px; font-size: 15px; }

/* ---------- Welcome ---------- */
.welcome { flex: 1; display: flex; flex-direction: column; }
.welcome .hero { flex: 1; justify-content: center; align-items: center; text-align: center; gap: 18px; padding-top: calc(48px + env(safe-area-inset-top, 0px)); padding-bottom: 48px; }
.welcome .tag { font-size: 20px; color: var(--on-forest-muted); }
.welcome-body { padding: 24px 18px calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px; }
.welcome-points { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 15px; }
.price-line { margin: 2px 0 4px; text-align: center; font-weight: 700; color: var(--forest); font-size: 17px; }
:root[data-theme="dark"] .price-line { color: var(--on-forest); }
.free-note { align-self: flex-start; background: var(--green-tint); color: var(--green); border-radius: 12px; padding: 6px 12px; font-size: 14px; font-weight: 700; }
.msg-card { gap: 10px; font-weight: 600; }
.msg-card.msg-alert { background: var(--terra-tint); color: var(--terra-ink); }
.msg-x { background: var(--soft); color: var(--muted); font-size: 22px; line-height: 1; }
.price { white-space: nowrap; text-align: right; }
.welcome-points li::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: var(--ochre); margin-right: 10px; vertical-align: middle; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-weight: 700; font-size: 15px; }
.field .help { font-size: 14px; color: var(--muted); }
.input {
  height: 58px; border-radius: 18px; border: 2px solid var(--line); background: var(--card); padding: 0 16px; font-size: 19px; font-weight: 600; width: 100%;
}
.input:focus { outline: none; border-color: var(--forest); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.phone-wrap { display: flex; align-items: center; height: 58px; border-radius: 18px; border: 2px solid var(--line); background: var(--card); padding: 0 16px; gap: 8px; }
.phone-wrap:focus-within { border-color: var(--forest); }
.phone-wrap span { font-weight: 700; color: var(--muted); font-size: 19px; }
.phone-wrap input { border: none; outline: none; background: transparent; font-size: 20px; font-weight: 700; flex: 1; min-width: 0; letter-spacing: .02em; }
.msg { color: var(--terra-ink); font-weight: 700; font-size: 15px; min-height: 1.4em; }
.msg:empty { min-height: 0; }

/* ---------- PIN pad (as in ZEDHub) ---------- */
.pin-screen { align-items: center; text-align: center; }
.dots { display: flex; gap: 18px; justify-content: center; margin: 8px 0 4px; }
.dots i { width: 20px; height: 20px; border-radius: 10px; border: 3px solid var(--forest); display: block; }
.dots i.full { background: var(--forest); }
:root[data-theme="dark"] .dots i { border-color: var(--on-forest); }
.shake { animation: shake .36s ease; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; max-width: 320px; margin: 6px auto 0; }
.key { height: 66px; border-radius: 22px; border: none; background: var(--card); box-shadow: var(--shadow); font-family: 'Fredoka', sans-serif; font-size: 28px; font-weight: 600; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.key:active { transform: scale(.95); background: var(--green-tint); }
.key svg { width: 30px; height: 30px; }
.key-gap { visibility: hidden; }
.busy { color: var(--muted); font-weight: 700; }

/* ---------- Parent: a child's card ---------- */
.child-card { background: var(--card); border-radius: 26px; box-shadow: var(--shadow); overflow: hidden; }
.child-top { display: flex; align-items: center; gap: 14px; padding: 18px 18px 10px; }
.ring-wrap { width: 112px; height: 112px; position: relative; flex-shrink: 0; }
.ring-wrap svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.seg { fill: none; stroke-width: 16; stroke-linecap: round; stroke: var(--soft); transition: stroke .6s ease; }
.seg.on { stroke: var(--ochre); }
.avatar { position: absolute; left: 22%; top: 22%; width: 56%; height: 56%; border-radius: 50%; background: var(--forest); color: var(--on-forest); display: flex; align-items: center; justify-content: center; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 30px; }
.avatar svg { width: 34px; height: 34px; }
.child-card.safe .avatar { background: var(--green); animation: glow 2.4s ease-in-out 3; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(47, 125, 75, 0); } 50% { box-shadow: 0 0 0 14px rgba(47, 125, 75, .28); } }
.status-big { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 24px; line-height: 1.15; }
.child-card.safe .status-big { color: var(--green); }
.status-small { color: var(--muted); font-size: 15px; margin-top: 2px; }
.child-name { font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.child-body { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.steps { display: flex; flex-direction: column; }
.step { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.dot { width: 26px; height: 26px; border-radius: 13px; border: 3px solid var(--line); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.step.done .dot { background: var(--green); border-color: var(--green); }
.dot svg { width: 14px; height: 14px; }
.step .lbl { flex: 1; font-weight: 700; }
.step:not(.done) .lbl { color: var(--muted); }
.step .tm { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.step.done .tm { color: var(--ink); }
.child-meta { font-size: 14px; color: var(--muted); }

/* A home screen "the trip is complete" moment. */
.safe-banner { display: flex; align-items: center; gap: 10px; }

/* ---------- Sheets (small pop-up panels) ---------- */
.veil { position: fixed; inset: 0; background: rgba(20, 18, 12, .45); z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--cream); width: 100%; max-width: 480px; border-radius: 26px 26px 0 0; padding: 20px 18px calc(22px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; max-height: 92vh; overflow: auto; animation: up .25s ease; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h2 { font-size: 24px; }
.choice-row { display: flex; gap: 10px; flex-wrap: wrap; }
.choice { flex: 1 1 0; min-width: 120px; min-height: 56px; border-radius: 18px; border: 2px solid var(--line); background: var(--card); font-weight: 700; font-size: 16px; padding: 8px 12px; }
.choice[aria-pressed="true"] { border-color: var(--forest); background: var(--forest); color: #fff; }

/* ---------- Route picker ---------- */
.pick-list { display: flex; flex-direction: column; gap: 10px; }
.pick { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 16px; border-radius: 20px; border: 2px solid var(--line); background: var(--card); text-align: left; width: 100%; }
.pick[aria-checked="true"] { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.pick .ini { width: 42px; height: 42px; border-radius: 21px; background: #F6E3C0; color: #6A4410; display: flex; align-items: center; justify-content: center; font-family: 'Fredoka', sans-serif; font-size: 18px; flex-shrink: 0; }
.pick .t { font-weight: 700; font-size: 17px; }
.pick .s { font-size: 14px; color: var(--muted); }

/* ---------- Driver ---------- */
.runs { display: flex; background: rgba(255, 255, 255, .12); border-radius: 22px; padding: 4px; gap: 4px; }
.runs button { flex: 1; height: 44px; border-radius: 18px; border: none; background: transparent; color: var(--on-forest); font-weight: 700; font-size: 16px; }
.runs button[aria-pressed="true"] { background: var(--on-forest); color: var(--forest); }
.bar { height: 10px; border-radius: 5px; background: var(--forest-2); overflow: hidden; }
.bar > div { height: 100%; background: var(--ochre); border-radius: 5px; transition: width .4s ease; }
.sync { font-size: 14px; font-weight: 700; color: var(--on-forest-muted); display: flex; align-items: center; gap: 8px; }
.sync i { width: 10px; height: 10px; border-radius: 5px; background: #7FD39A; display: inline-block; }
.sync.waiting i { background: var(--ochre); }
.search { display: flex; align-items: center; gap: 10px; height: 58px; border-radius: 29px; background: var(--card); border: 2px solid var(--line); padding: 0 18px; }
.search:focus-within { border-color: var(--forest); }
.search input { border: none; outline: none; background: transparent; font-size: 20px; font-weight: 600; flex: 1; min-width: 0; }
.search svg { width: 22px; height: 22px; color: var(--muted); flex-shrink: 0; }
.kids { display: flex; flex-direction: column; gap: 10px; }
.kid { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 22px; padding: 10px 10px 10px 16px; box-shadow: var(--shadow); min-height: 78px; }
.kid .who { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kid .nm { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 21px; overflow-wrap: anywhere; }
.kid .sub { font-size: 14px; color: var(--muted); }
.kid .act { min-height: 58px; padding: 0 20px; border-radius: 29px; border: none; font-weight: 700; font-size: 17px; white-space: nowrap; }
.kid.ok { background: var(--green); color: #fff; }
.kid.ok .sub { color: var(--green-tint); }
.kid.off { background: var(--soft); box-shadow: none; }
.kid.off .nm { color: var(--muted); }
.kid .side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chip { padding: 8px 12px; border-radius: 14px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.chip-terra { background: var(--terra-tint); color: var(--terra-ink); }
.chip-green { background: var(--green-tint); color: var(--green); }
.chip-soft { background: var(--soft); color: var(--muted); }
.tiny-link { background: none; border: none; color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: underline; padding: 4px; }
.tick { width: 46px; height: 46px; border-radius: 23px; background: #fff; color: var(--green); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tick svg { width: 24px; height: 24px; }
.flash { animation: flash .7s ease; }
@keyframes flash { 0% { transform: scale(.97); box-shadow: 0 0 0 0 rgba(47, 125, 75, .6); } 60% { transform: scale(1.02); box-shadow: 0 0 0 14px rgba(47, 125, 75, 0); } 100% { transform: scale(1); } }
.foot { position: sticky; bottom: 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--cream) 70%, transparent); }
.undo-bar { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; background: var(--forest); color: var(--on-forest); border-radius: 22px; padding: 10px 10px 14px 18px; margin-bottom: 10px; font-weight: 700; box-shadow: 0 10px 24px rgba(30, 25, 15, .25); }
.undo-bar i { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--ochre); transform-origin: left; animation: undo-left linear forwards; }
@keyframes undo-left { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.kid .undo-btn { background: #fff; color: var(--green); border: none; min-height: 50px; }
.driver-card { display: flex; align-items: center; gap: 12px; background: var(--soft); border-radius: 18px; padding: 10px 10px 10px 12px; }
.driver-card .grow { flex: 1; min-width: 0; }
.driver-card .t { font-weight: 700; }
.driver-card .s { font-size: 14px; color: var(--muted); }
.driver-photo { width: 52px; height: 52px; border-radius: 26px; object-fit: cover; flex-shrink: 0; background: var(--card); }
.driver-photo.big { width: 72px; height: 72px; border-radius: 36px; }
.driver-initial { display: inline-flex; align-items: center; justify-content: center; background: var(--forest); color: #fff; font-family: 'Fredoka', sans-serif; font-size: 22px; }
.verified { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--green); font-size: 13px; font-weight: 700; background: var(--green-tint); border-radius: 10px; padding: 3px 8px 3px 6px; }
.verified svg { width: 14px; height: 14px; }
.shared-line { font-size: 14px; color: var(--muted); }
.code { font-family: 'Fredoka', sans-serif; letter-spacing: .12em; font-size: 1.1em; }
.check { display: flex; gap: 12px; align-items: flex-start; background: var(--soft); border-radius: 16px; padding: 12px 14px; }
.check input { width: 24px; height: 24px; margin-top: 2px; accent-color: var(--green); flex-shrink: 0; }
.btn-danger { background: var(--terra); color: #fff; }
.kid.alert-kid { box-shadow: inset 0 0 0 3px var(--terra); }
.kid.alert-kid .sub { color: var(--terra-ink); font-weight: 700; }
.ev-alert { background: var(--terra-tint); color: var(--terra-ink); padding-right: 10px; }
.offline-bar { position: sticky; top: 0; z-index: 25; background: #2B2A22; color: #F7F1E6; text-align: center; font-size: 14px; font-weight: 700;
               padding: calc(6px + env(safe-area-inset-top, 0px)) 12px 6px; }
/* ---------- Welcome page for first-time visitors ---------- */
.intro { flex: 1; display: flex; flex-direction: column; }
.intro-hero { align-items: center; padding-top: calc(30px + env(safe-area-inset-top, 0px)); padding-bottom: 26px; }
.intro-hero .logo-tagline { width: 210px; }
.intro-body { gap: 16px; padding-bottom: 8px; }
.intro-line { margin: 4px 0 0; text-align: center; font-family: 'Fredoka', 'Nunito Sans', sans-serif; font-weight: 600; font-size: 24px; line-height: 1.2; color: var(--forest); }
:root[data-theme="dark"] .intro-line { color: var(--on-forest); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .intro-line { color: var(--on-forest); } }
.intro-journey { display: flex; align-items: center; gap: 16px; padding: 18px; }
.intro-ring { width: 120px; height: 120px; }
.intro-ring .avatar { transition: background .5s ease; }
.intro-ring .avatar svg { width: 32px; height: 32px; }
.intro-house { display: none; }
.intro-journey.all-home .intro-bus { display: none; }
.intro-journey.all-home .intro-house { display: inline-flex; }
.intro-journey.all-home .avatar { background: var(--green); animation: glow 2.4s ease-in-out infinite; }
.intro-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.intro-step { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.intro-step .dot { width: 28px; height: 28px; border-radius: 14px; border: 3px solid var(--line); flex-shrink: 0; display: flex; align-items: center; justify-content: center;
                   transition: background .35s ease, border-color .35s ease; }
.intro-step .dot svg { width: 15px; height: 15px; opacity: 0; transition: opacity .35s ease; }
.intro-step .lbl { font-weight: 700; color: var(--muted); transition: color .35s ease; }
.intro-step.on .dot { background: var(--green); border-color: var(--green); }
.intro-step.on .dot svg { opacity: 1; }
.intro-step.on .lbl { color: var(--ink); }
.intro-step.pop .dot { animation: tick-pop .5s ease; }
@keyframes tick-pop { 0% { transform: scale(.6); box-shadow: 0 0 0 0 rgba(47, 125, 75, .55); } 60% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(47, 125, 75, 0); } 100% { transform: scale(1); } }
.intro-foot { margin-top: auto; }
@media (max-width: 340px) { .intro-journey { flex-direction: column; } }
.pending-card { border: 2px dashed var(--line); background: var(--card); border-radius: 22px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- History ---------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.tab { min-height: 44px; border-radius: 22px; border: 2px solid rgba(255, 255, 255, .35); background: transparent; color: var(--on-forest); font-weight: 700; padding: 0 16px; white-space: nowrap; }
.tab[aria-pressed="true"] { background: var(--on-forest); color: var(--forest); border-color: var(--on-forest); }
.week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.wd { border-radius: 14px; background: var(--soft); padding: 8px 4px; text-align: center; font-size: 13px; font-weight: 700; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.wd b { font-family: 'Fredoka', sans-serif; font-size: 15px; }
.wd.on_time { background: var(--green-tint); color: var(--green); }
.wd.late { background: var(--terra-tint); color: var(--terra-ink); }
.wd.absent { color: var(--muted); }
.day-row { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--soft); }
.day-row:first-child { border-top: none; padding-top: 0; }
.day-times { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: 13px; color: var(--muted); }
.day-times b { display: block; color: var(--ink); font-size: 16px; font-variant-numeric: tabular-nums; }

/* ---------- Messages set-up ---------- */
.how { counter-reset: how; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.how li { counter-increment: how; display: flex; gap: 12px; align-items: flex-start; }
.how li::before { content: counter(how); flex-shrink: 0; width: 30px; height: 30px; border-radius: 15px; background: var(--forest); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-family: 'Fredoka', sans-serif; }
.how svg { width: 20px; height: 20px; vertical-align: -4px; }
.seg-switch { display: flex; background: var(--soft); border-radius: 20px; padding: 4px; gap: 4px; }
.seg-switch button { flex: 1; min-height: 42px; border-radius: 16px; border: none; background: transparent; font-weight: 700; }
.seg-switch button[aria-pressed="true"] { background: var(--card); box-shadow: var(--shadow); }

/* ---------- Admin ---------- */
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--soft); }
.list-item:first-child { border-top: none; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .t { font-weight: 700; }
.list-item .s { font-size: 14px; color: var(--muted); }
.pill-count { font-size: 13px; font-weight: 700; background: var(--soft); border-radius: 12px; padding: 4px 10px; white-space: nowrap; }
.ev { display: inline-flex; align-items: center; gap: 6px; background: var(--soft); border-radius: 12px; padding: 4px 4px 4px 10px; font-size: 13px; font-weight: 700; margin: 2px 4px 2px 0; }
.ev button { width: 28px; height: 28px; border-radius: 14px; border: none; background: var(--card); color: var(--terra-ink); font-weight: 700; }
.expired { color: var(--terra-ink); font-weight: 700; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -160%);
  width: min(440px, calc(100% - 24px)); background: var(--card); color: var(--ink); border-radius: 20px; padding: 14px 16px;
  box-shadow: 0 12px 30px rgba(30, 25, 15, .25); display: flex; gap: 12px; align-items: center; transition: transform .35s ease; z-index: 40;
}
.toast.show { transform: translate(-50%, 0); }
.toast .ic { width: 40px; height: 40px; border-radius: 20px; background: var(--green); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; }
.toast .ic.alert-ic { background: var(--terra); }
.toast .ic svg { width: 22px; height: 22px; }
.toast .tt { font-weight: 700; font-size: 15px; }
.toast .ts { font-size: 13px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 481px) { .app { box-shadow: 0 0 0 1px var(--soft); } }
