/* Nursery bus - interface styles. Dark premium look for phones, light work surface for the admin panel. */
:root {
  --ink: #15171c; --ink2: #23262e; --deep: #111216; --muted: #a9afba; --muted-light: #5b6470;
  --orange: #f78b32; --orange-1: #fbb06a; --orange-2: #f0761f; --orange-text: #fbc08a; --orange-dark: #8a4208;
  --line: rgba(255, 255, 255, 0.1); --glass: rgba(255, 255, 255, 0.06);
  --font: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; }
h1, h2, p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.muted { color: var(--muted); font-size: 14px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ------------------------------------------------------------ dark pages (parents, driver, sign-in) */
body.dark { background: var(--deep); color: #fff; min-height: 100vh; }
.phone { max-width: 440px; min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--ink2) 0%, var(--deep) 100%); }
.hero { position: relative; padding: 34px 22px 44px; text-align: center; border-radius: 0 0 36px 36px; border-bottom: 1px solid var(--line);
  background: radial-gradient(120% 110% at 85% 0%, rgba(247, 139, 50, 0.34) 0%, rgba(247, 139, 50, 0) 62%), #1b1d23; }
.hero-logo { display: block; margin: 0 auto 14px; width: 196px; }
.hero h1 { font-size: 24px; font-weight: 700; }
.hero p { margin-top: 4px; font-size: 14px; color: #c9ced6; }
.lang { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
.hero .lang { position: absolute; top: 14px; inset-inline-end: 16px; }
.sheet { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 0 22px 22px; }
.tabs { margin-top: -27px; position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; border-radius: 18px;
  background: rgba(40, 43, 51, 0.94); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); }
.tabs a { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 14px; color: #c9ced6; font-size: 15px; font-weight: 600; text-decoration: none; }
.tabs a.on { background: #fff; color: var(--ink); }
.sheet > .flash:first-child, .sheet > form:first-child { margin-top: 22px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack label { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.dark input[type='text'], .dark input[type='tel'], .dark input[type='password'] { width: 100%; height: 50px; padding: 0 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: rgba(255, 255, 255, 0.07); color: #fff; font: inherit; }
.dark input::placeholder { color: #8d94a0; }
.dark input.num { text-align: start; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 4px; font-size: 14px; color: inherit !important; font-weight: 400 !important; }
.check input { width: 22px; height: 22px; accent-color: var(--orange); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 14px; border: 1px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.dark .btn.primary { height: 54px; margin-top: 8px; border-radius: 16px; background: linear-gradient(135deg, var(--orange-1) 0%, var(--orange-2) 100%); color: var(--ink); box-shadow: 0 10px 26px rgba(240, 118, 31, 0.4); }
.dark .btn.soft { height: 50px; background: rgba(247, 139, 50, 0.16); color: var(--orange-text); font-size: 14px; }
.dark .btn.ghost { width: 100%; height: 50px; margin-top: 8px; background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); color: #fff; font-weight: 600; }
.link { padding: 6px 0; font-size: 14px; font-weight: 600; color: var(--orange-text); }
.foot { margin-top: auto; padding-top: 18px; text-align: center; font-size: 13px; color: var(--muted); }
.flash { padding: 12px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; }
.dark .flash.ok { background: rgba(247, 139, 50, 0.16); border: 1px solid rgba(247, 139, 50, 0.4); color: var(--orange-text); }
.dark .flash.err { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; }
.top h1 { font-size: 26px; font-weight: 700; }
.chip-logo { width: 52px; height: 52px; padding: 12px 8px; border-radius: 18px; background: var(--glass); border: 1px solid rgba(255, 255, 255, 0.09); object-fit: contain; }
.top .lang { height: 52px; min-width: 52px; border-radius: 18px; background: var(--glass); border-color: rgba(255, 255, 255, 0.09); }
.list { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 0 22px 22px; }
.card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 22px; background: var(--glass); border: 1px solid rgba(255, 255, 255, 0.09); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25); }
.card h2 { font-size: 17px; font-weight: 700; }
.avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--orange); color: var(--ink); font-size: 18px; font-weight: 700; }
.note { margin-top: 6px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.07); font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------ admin panel */
body.admin { background: #f5f6f8; color: var(--ink); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 32px; color: #fff;
  background: linear-gradient(180deg, var(--ink2) 0%, var(--deep) 100%); border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.brand { display: flex; align-items: center; gap: 16px; }
.brand p { font-size: 13px; color: var(--muted); }
.brand h1 { font-size: 22px; font-weight: 700; }
.badge { display: inline-block; margin-inline-start: 6px; padding: 2px 8px; border-radius: 8px; background: rgba(247, 139, 50, 0.2); color: var(--orange-text); font-size: 12px; font-weight: 700; }
.bar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bar nav a, .navbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12); color: #fff; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.bar nav a.on { background: linear-gradient(135deg, var(--orange-1) 0%, var(--orange-2) 100%); border-color: transparent; color: var(--ink); box-shadow: 0 8px 22px rgba(240, 118, 31, 0.4); }
.bar nav a.lang { min-width: 44px; justify-content: center; font-weight: 700; }
.wrap { max-width: 1216px; margin: 0 auto; padding: 24px 32px 48px; display: flex; flex-direction: column; gap: 20px; }
.panel { padding: 20px; border-radius: 22px; background: #fff; box-shadow: 0 10px 30px rgba(21, 23, 28, 0.06); display: flex; flex-direction: column; gap: 14px; }
.panel h2 { font-size: 18px; font-weight: 700; }
.panel.danger { border: 1.5px solid #e6e8ec; }
.admin .muted { color: var(--muted-light); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 22px; background: #fff; box-shadow: 0 10px 30px rgba(21, 23, 28, 0.06); }
.kpi span { font-size: 14px; color: var(--muted-light); }
.kpi strong { font-size: 32px; font-weight: 700; }
.scroll { overflow-x: auto; }
table { width: 100%; min-width: 560px; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid #e6e8ec; font-size: 14px; }
th { font-size: 13px; font-weight: 600; color: var(--muted-light); }
td.narrow { width: 110px; }
td.code { font-size: 20px; font-weight: 700; letter-spacing: 2px; }
.tag { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 10px; background: #eef0f2; color: #3d4350; font-size: 12px; font-weight: 600; }
.tag.yes { background: #fef1e4; color: var(--orange-dark); }
.admin .btn { background: #fff; border-color: #c3c8d0; color: var(--ink); font-weight: 600; }
.admin .btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.admin .btn.warn { background: #fff; border-color: var(--ink); color: var(--ink); }
.admin .btn.small { min-height: 44px; padding: 0 14px; font-size: 14px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, legend { font-size: 14px; font-weight: 600; }
.admin input[type='text'], .admin input[type='tel'], .admin input[type='password'], .admin input:not([type]) { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1.5px solid #9aa1ac; background: #fff; color: var(--ink); font: inherit; }
.admin input.short { width: 84px; }
.admin input.num { text-align: start; }
fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
legend { margin-bottom: 8px; padding: 0; }
.pick { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1.5px solid #c3c8d0; background: #fff; cursor: pointer; }
.pick input { width: 20px; height: 20px; accent-color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inline input { max-width: 220px; }
.subtabs { display: flex; gap: 8px; }
.subtabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 12px; background: #fff; border: 1.5px solid #c3c8d0; font-weight: 600; text-decoration: none; }
.subtabs a.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.admin .flash.ok { background: #fef1e4; border: 1px solid #f0b47c; color: var(--orange-dark); }
.admin .flash.err { background: #fff; border: 1.5px solid var(--ink); color: var(--ink); }
@media (max-width: 640px) { .bar { padding: 14px 16px; } .wrap { padding: 16px 16px 40px; } }

/* account type chooser on the sign-in screen */
.roles { margin-top: -27px; position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.roles a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; border-radius: 20px; text-decoration: none;
  background: rgba(40, 43, 51, 0.94); border: 1px solid rgba(255, 255, 255, 0.12); color: #c9ced6; font-size: 15px; font-weight: 600; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); }
.roles a.on { background: #fff; border-color: #fff; color: var(--ink); }
.roles a.on svg { color: var(--orange-2); }
.roles + .tabs { margin-top: 0; box-shadow: none; }

/* phase 2: trips and tracking */
.status { font-weight: 600; }
.stops { min-height: 0; font-size: 14px; color: var(--orange-text); font-weight: 600; }
.stops:empty { display: none; }
.map { height: 44vh; min-height: 260px; border-radius: 22px; overflow: hidden; background: #2a2d35; border: 1px solid rgba(255, 255, 255, 0.09); }
.card.trip { flex-wrap: wrap; }
.card.trip .btn { height: 46px; margin-top: 0; width: auto; }
.card.trip form { margin: 0; }
.card.stop { align-items: flex-start; }
.card.stop.absent, .card.stop.dropped, .card.stop.arrived { opacity: 0.72; }
.seq { flex: none; width: 34px; height: 34px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.1); font-weight: 700; }
.pill { display: inline-block; margin-top: 6px; padding: 3px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.1); font-size: 13px; font-weight: 700; }
.pill.boarded, .pill.arrived, .pill.dropped { background: rgba(247, 139, 50, 0.2); color: var(--orange-text); }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.acts form { margin: 0; }
.acts .btn, .dark .acts .btn.primary, .dark .acts .btn.ghost, .dark .acts .btn.soft { width: auto; height: 46px; margin-top: 0; padding: 0 16px; font-size: 15px; box-shadow: none; }
.note.gps.on { color: var(--orange-text); }
.note.gps.off, .note.gps.denied { border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; }
.dark .btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.list > a.btn { text-align: center; }
.stack .check { margin-top: 4px; }

/* update 3: premium tracking screen, privacy page, admin text editor */
.eta { font-size: 15px; color: var(--muted); }
.eta:empty { display: none; }
.eta strong { font-size: 30px; font-weight: 700; color: #fff; margin: 0 6px; font-variant-numeric: tabular-nums; }
.phone.track { position: relative; }
.phone.track .map { height: 52vh; min-height: 300px; border-radius: 0 0 30px 30px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
.phone.track .map.none { height: 96px; min-height: 0; background: transparent; border: 0; }
.top.over { position: absolute; inset: 0 0 auto 0; z-index: 5; padding: 16px 18px; pointer-events: none; }
.top.over a, .top.over img { pointer-events: auto; }
.top.over .lang, .top.over .chip-logo { background: rgba(21, 23, 28, 0.82); border-color: rgba(255, 255, 255, 0.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 22px; }
.top.over .row .lang { font-size: 14px; }
.sheet-up { margin-top: 14px; position: relative; z-index: 4; padding-top: 0; }
.phone.track .map.none + .sheet-up { margin-top: 0; }
.live { display: flex; align-items: center; gap: 10px; align-self: flex-start; padding: 9px 16px; border-radius: 999px; background: rgba(21, 23, 28, 0.9); border: 1px solid rgba(255, 255, 255, 0.14); font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.live .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 5px rgba(247, 139, 50, 0.22), 0 0 16px rgba(247, 139, 50, 0.8); }
.phone.track .card.child { padding: 18px; border-radius: 26px; background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4); }
.phone.track .status { font-size: 17px; }
.prose p { color: #e2e5ea; line-height: 1.9; }
.foot.small { margin-top: 0; padding-top: 4px; }
.foot.small a { color: var(--muted); }
.admin textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid #8f96a3; background: #fff; color: var(--ink); font: inherit; line-height: 1.7; resize: vertical; }
.admin textarea:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* update 7: parent tab bar, absence, alerts, complaints, guides */
.tabbar { position: sticky; bottom: 0; z-index: 6; margin: auto 20px 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 6px; border-radius: 26px; background: rgba(35, 38, 46, 0.94); border: 1px solid rgba(255, 255, 255, 0.09); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.tabbar a { height: 50px; border-radius: 20px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #c9ced6; font-size: 13px; font-weight: 500; text-decoration: none; }
.tabbar a.on { background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.tabbar a.on svg { color: var(--orange-2); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chips a { flex: none; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px 0 8px; border-radius: 24px; background: var(--glass); border: 1px solid rgba(255, 255, 255, 0.09); color: #fff; font-weight: 600; text-decoration: none; }
[dir='rtl'] .chips a { padding: 0 8px 0 16px; }
.chips a.on { background: #fff; color: var(--ink); }
.avatar.small { width: 32px; height: 32px; font-size: 14px; }
.card.block { flex-direction: column; align-items: stretch; gap: 10px; padding: 18px; border-radius: 26px; }
.switchrow { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.switch { flex: none; width: 56px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; }
.switch span { display: block; width: 56px; height: 32px; border-radius: 16px; background: rgba(255, 255, 255, 0.18); position: relative; transition: background 0.15s; }
.switch span::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: inset-inline-start 0.15s; }
.switch.on span { background: var(--orange); }
.switch.on span::after { inset-inline-start: 27px; }
.switch[disabled] { opacity: 0.4; cursor: not-allowed; }
.days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.days form { margin: 0; }
.day { width: 100%; min-height: 88px; padding: 10px 6px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.05); color: #fff; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.day .dname { font-size: 13px; color: var(--muted); }
.day .dnum { font-size: 24px; font-weight: 700; }
.day .dstate { font-size: 12px; font-weight: 600; color: var(--muted); }
.day.off { background: rgba(247, 139, 50, 0.18); border-color: var(--orange); }
.day.off .dstate, .day.off .dname { color: var(--orange-text); }
.dayhead { margin: 10px 4px 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.card.alert { align-items: flex-start; }
.card.alert time { flex: none; font-size: 13px; padding-top: 3px; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.pair .btn { margin-top: 0; }
.dark select, .dark textarea { width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.07); color: #fff; font: inherit; }
.dark select { height: 54px; }
.dark select option { color: var(--ink); }
.dark textarea:focus-visible, .dark select:focus-visible, .day:focus-visible, .switch:focus-visible span, .tabbar a:focus-visible, .chips a:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.handq { width: 100%; font-size: 14px; }
ol.steps { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 10px; line-height: 1.8; }
.prose ol.steps { color: #e2e5ea; }
.panel.done { opacity: 0.7; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.phone.track .tabbar { margin-top: 0; }

/* update 8: the page fades out behind the tab bar instead of showing through around it */
.tabbar::before { content: ''; position: absolute; z-index: -1; inset: -28px -20px -16px; background: linear-gradient(to top, var(--deep) 62%, rgba(17, 18, 22, 0)); pointer-events: none; }
.tabbar { background: #23262e; }
.list:has(+ .tabbar) { padding-bottom: 28px; }

/* update 9: driver screens follow the trip (loading, on the road, arriving) and the office dashboard */
.row.between { justify-content: space-between; }
.center { text-align: center; align-self: center; }
.phone.drive { position: relative; }
.dhead { padding: 18px 22px 20px; border-radius: 0 0 30px 30px; background: linear-gradient(180deg, #2a2d36 0%, #1b1d23 100%); border-bottom: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
.dhead h1 { font-size: 26px; font-weight: 700; }
.dhead .lang { height: 52px; min-width: 52px; border-radius: 18px; background: var(--glass); border-color: rgba(255, 255, 255, 0.09); }
.counter { margin-top: 14px; font-size: 15px; color: #c9ced6; }
.counter strong { font-size: 28px; font-weight: 700; color: #fff; margin-inline-end: 4px; }
.counter .pill { margin-top: 0; }
.bar-track { margin-top: 8px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.bar-track span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--orange-1), var(--orange-2)); }
.bar-track .w0 { width: 0%; }
.bar-track .w5 { width: 5%; }
.bar-track .w10 { width: 10%; }
.bar-track .w15 { width: 15%; }
.bar-track .w20 { width: 20%; }
.bar-track .w25 { width: 25%; }
.bar-track .w30 { width: 30%; }
.bar-track .w35 { width: 35%; }
.bar-track .w40 { width: 40%; }
.bar-track .w45 { width: 45%; }
.bar-track .w50 { width: 50%; }
.bar-track .w55 { width: 55%; }
.bar-track .w60 { width: 60%; }
.bar-track .w65 { width: 65%; }
.bar-track .w70 { width: 70%; }
.bar-track .w75 { width: 75%; }
.bar-track .w80 { width: 80%; }
.bar-track .w85 { width: 85%; }
.bar-track .w90 { width: 90%; }
.bar-track .w95 { width: 95%; }
.bar-track .w100 { width: 100%; }
.list.rows { padding-top: 14px; padding-bottom: 150px; }
.crow { display: flex; align-items: center; gap: 10px; min-height: 76px; padding: 12px; border-radius: 20px; background: var(--glass); border: 1px solid rgba(255, 255, 255, 0.09); }
.crow h2 { font-size: 17px; font-weight: 700; }
.crow .muted { font-size: 13px; }
.crow form { margin: 0; flex: none; }
.crow.gone { background: transparent; border-style: dashed; border-color: rgba(255, 255, 255, 0.22); }
.crow.gone h2 { color: #b6bcc6; }
.crow.tight { min-height: 68px; padding: 10px 12px; background: rgba(255, 255, 255, 0.07); }
.avatar.dim { background: rgba(255, 255, 255, 0.12); color: #fff; }
.avatar.warm { background: rgba(247, 139, 50, 0.28); color: var(--orange-text); }
.dark .btn.white { height: 48px; min-width: 104px; padding: 0 10px; border-radius: 14px; background: #fff; color: var(--ink); font-size: 15px; }
.dark .btn.donebtn { height: 48px; min-width: 104px; padding: 0 10px; gap: 8px; border-radius: 14px; background: rgba(247, 139, 50, 0.24); color: var(--orange-text); font-size: 15px; }
.dark .btn.chipbtn { min-height: 44px; padding: 0 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.16); color: #fff; font-size: 14px; font-weight: 600; }
.dark .crow .btn.primary { height: 50px; min-width: 124px; margin-top: 0; padding: 0 14px; border-radius: 14px; font-size: 15px; box-shadow: none; }
.dfoot { position: fixed; z-index: 7; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 440px; margin: 0; padding: 12px 22px 18px; display: flex; flex-direction: column; gap: 8px; background: #1a1c22; border-top: 1px solid var(--line); }
.dfoot .btn.primary { margin-top: 0; }
.dfoot .check { margin: 0; font-size: 13px; }
.warnbtn { flex: none; width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); color: #fff; }
.gpschip { align-self: center; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; background: rgba(21, 23, 28, 0.92); border: 1px solid rgba(255, 255, 255, 0.14); font-size: 14px; font-weight: 600; color: #fff; }
.gpschip.on::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(247, 139, 50, 0.22); }
.gpschip.off, .gpschip.denied { border-color: rgba(255, 255, 255, 0.5); }
.mapwrap { position: relative; }
.route .map { height: 46vh; min-height: 280px; border-radius: 0; border: 0; }
.route .map.none { height: 84px; min-height: 0; background: transparent; }
.mapchips { position: absolute; z-index: 5; top: 14px; inset-inline: 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none; }
.stopchip { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 700; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3); }
.mapchips .gpschip { align-self: auto; min-height: 44px; }
.dsheet { position: relative; z-index: 4; flex: 1; margin-top: -26px; padding: 12px 22px 22px; display: flex; flex-direction: column; gap: 10px; border-radius: 30px 30px 0 0; background: linear-gradient(180deg, #23262e 0%, var(--deep) 100%); border-top: 1px solid var(--line); box-shadow: 0 -14px 34px rgba(0, 0, 0, 0.45); }
.route .map.none + .mapchips + .dsheet, .route .mapwrap:has(.map.none) + .dsheet { margin-top: 0; }
.grip { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.25); }
.stophead { gap: 14px; margin: 4px 0 2px; }
.stophead h1 { font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.stopnum { flex: none; width: 50px; height: 50px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--orange-1), var(--orange-2)); color: var(--ink); font-size: 22px; font-weight: 700; }
.stopnum.ring { width: 38px; height: 38px; border-radius: 50%; background: transparent; border: 2px solid rgba(255, 255, 255, 0.6); color: #fff; font-size: 15px; }
.dist { flex: none; font-size: 14px; color: var(--muted); }
.dist strong { font-size: 32px; font-weight: 700; color: #fff; }
.nextstop { gap: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.nextstop h2 { font-size: 16px; font-weight: 700; }
.endrow { gap: 10px; margin-top: 6px; }
.endrow form { margin: 0; display: flex; }
.endrow .btn, .dark .endrow .btn.ghost, .dark .endrow .btn.primary { flex: 1; width: 100%; height: 54px; margin-top: 0; border-radius: 16px; }
.handbox { padding: 12px 14px; border-radius: 18px; background: rgba(247, 139, 50, 0.14); border: 1px solid rgba(247, 139, 50, 0.4); display: flex; flex-direction: column; gap: 8px; }
.handbox form { margin: 0; }
.link.center { display: block; min-height: 44px; line-height: 32px; }

.kpi.hot strong { color: var(--orange-dark); }
.kpi.edge { border: 1.5px solid var(--ink); }
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.dmain, .dside { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (max-width: 900px) { .dash { grid-template-columns: minmax(0, 1fr); } }
.panel.night { color: #fff; background: linear-gradient(180deg, var(--ink2) 0%, var(--deep) 100%); box-shadow: 0 14px 34px rgba(21, 23, 28, 0.3); }
.panel.night .muted { color: var(--muted); }
.panel.night h2 { font-size: 20px; }
.panel.night .btn { background: #fff; border-color: #fff; color: var(--orange-dark); font-weight: 700; }
.cbox { padding: 12px 14px; border-radius: 14px; background: #eef0f2; font-size: 14px; }
.cbox p { overflow-wrap: anywhere; }
.dside .btn { width: 100%; }
th.narrowest { width: 70px; }
.admin .map.big { height: 68vh; min-height: 420px; border: 1px solid #e6e8ec; background: #e9ebee; }
@media (max-width: 640px) { .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .kpi { padding: 14px 16px; } .kpi strong { font-size: 28px; } }

/* update 10: dashboard tables fit a phone screen; the map keeps its Google credit visible above the driver's sheet */
@media (max-width: 640px) { table.fit { min-width: 0; } table.fit th, table.fit td { padding: 10px 5px; font-size: 13px; } table.fit th, table.fit td.num { white-space: nowrap; } table.fit th { font-size: 12px; } table.fit th.narrowest { width: auto; } table.fit .tag { margin-top: 0; } }
.dsheet { margin-top: 0; border-radius: 26px 26px 0 0; }
.mapwrap { background: #1d2027; }

/* update 11: two buttons under the name on the morning stop, so long names are never squeezed */
.crow.two { flex-wrap: wrap; }
.rowacts { flex: 1 0 100%; display: flex; gap: 8px; }
.rowacts form:last-child { flex: 1; }
.rowacts form:last-child .btn { width: 100%; }
.dark .rowacts .btn.chipbtn { height: 50px; min-width: 92px; border-radius: 14px; }

/* update 13: phone notifications card */
.pushbox h2 { font-size: 17px; }
.pushbox .btn { margin-top: 4px; }
.pushbox .stops { color: #fff; font-weight: 500; }
[hidden] { display: none !important; }

/* update 14: child pictures */
img.avatar.photo { object-fit: cover; padding: 0; background: #2a2d35; border: 2px solid rgba(255, 255, 255, 0.22); }
img.avatar.photo.warm { border-color: var(--orange); }
img.avatar.photo.small { border-width: 1px; }
.thumb { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-inline-end: 8px; background: #eef0f2; }
.thumb.big { width: 96px; height: 96px; margin: 0; border: 1px solid #c3c8d0; }
.photorow { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.admin input[type='file'] { max-width: 100%; min-height: 44px; font: inherit; }

/* update 15: install-as-app offer on the parents' pages */
.installbar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: rgba(247, 139, 50, 0.14); border: 1px solid rgba(247, 139, 50, 0.4); }
.installbar img { flex: none; border-radius: 12px; }
.installbar .status { font-size: 15px; }
.installbar .muted { font-size: 13px; }
.installbar .stops { margin-top: 4px; color: #fff; }
.dark .installbar .btn.primary { flex: none; height: 46px; margin-top: 0; padding: 0 16px; border-radius: 14px; font-size: 15px; box-shadow: none; }

/* update 17: drivers as blocks that fit a phone */
.drow { display: flex; flex-direction: column; gap: 12px; padding: 16px 0; border-bottom: 1px solid #e6e8ec; }
.drow:first-child { padding-top: 0; }
.dwho { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.dwho strong { font-size: 17px; }
.dwho .tag { margin-top: 0; }
.dacts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.dacts .check { margin: 0; min-height: 44px; }

/* update 18: what a parent changed during the trip, shown to the driver */
.changebar { padding: 12px 14px; border-radius: 18px; background: #fff; color: var(--ink); display: flex; flex-direction: column; gap: 4px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35); }
.changebar p { font-size: 15px; font-weight: 700; }
.changebar p .num { font-weight: 500; color: var(--muted-light); margin-inline-start: 6px; }
.changebar .changehead { font-size: 13px; font-weight: 600; color: var(--orange-dark); }
