/* SchoolWay — identidade: azul-marinho + amarelo-ônibus */
:root {
  --navy: #0F2340;
  --navy-2: #1B3358;
  --navy-3: #2A4672;
  --yellow: #FBBF24;
  --yellow-2: #F5A90A;
  --yellow-soft: #FEF6DC;
  --bg: #F4F6FA;
  --card: #FFFFFF;
  --text: #0F2340;
  --muted: #6B7690;
  --line: #E6EAF2;
  --green: #16A34A;
  --green-soft: #DCFCE7;
  --blue: #2563EB;
  --blue-soft: #E0EAFF;
  --red: #DC2626;
  --red-soft: #FEE2E2;
  --gray-soft: #EEF1F6;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 35, 64, .04), 0 6px 20px rgba(15, 35, 64, .06);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Poppins', var(--font);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 .6em; }
small, .muted { color: var(--muted); }
img { max-width: 100%; }
.ic { width: 22px; height: 22px; flex-shrink: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 16px; }
.gap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }

/* ---------- Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 13px 20px; font: 600 15px var(--font-head); cursor: pointer; background: var(--gray-soft); color: var(--navy); transition: transform .08s, filter .15s; text-align: center; }
.btn:active { transform: scale(.98); }
.btn:hover { filter: brightness(.97); }
.btn .ic { width: 19px; height: 19px; }
.btn-primary { background: var(--yellow); color: var(--navy); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-outline { background: #fff; border: 1.5px solid var(--line); }
.btn-ghost { background: transparent; }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 16px 22px; font-size: 16px; border-radius: 16px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; background: #fff; border: 1px solid var(--line); color: var(--navy); cursor: pointer; position: relative; flex-shrink: 0; }
.icon-btn.ghost { visibility: hidden; }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }
.link { color: var(--blue); font-weight: 600; font-size: 14px; }
.link-yellow { color: var(--yellow-2); font-weight: 600; }

/* ---------- Forms */
.field { display: block; margin-bottom: 14px; }
.field-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--navy-2); }
.hint { display: block; margin-top: 4px; font-size: 12px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=month], input[type=search], select, textarea {
  width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 14px; font: 15px var(--font); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; min-height: 48px;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236B7690' stroke-width='2'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(251, 191, 36, .2); }
.input-icon { position: relative; }
.input-icon .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 19px; height: 19px; }
.input-icon input { padding-left: 44px; }
.check { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--navy); }
.days-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.days-pick label { cursor: pointer; }
.days-pick input { display: none; }
.days-pick span { display: inline-block; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--line); font-weight: 600; font-size: 13px; background: #fff; }
.days-pick input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 0 0 8px; }
legend { font: 600 15px var(--font-head); margin-bottom: 12px; }

/* ---------- Alerts / badges */
.alert { padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; font-size: 14px; font-weight: 500; }
.alert-success { background: var(--green-soft); color: #11612F; }
.alert-error { background: var(--red-soft); color: #9B1C1C; }
.alert-info { background: var(--blue-soft); color: #1E3A8A; }
.alert-warn { background: var(--yellow-soft); color: #7A5200; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-yellow { background: var(--yellow-soft); color: #A16A00; }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-gray { background: var(--gray-soft); color: var(--muted); }

/* ---------- Avatars */
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; flex-shrink: 0; }
.avatar-initials { background: hsl(var(--h) 70% 92%); color: hsl(var(--h) 50% 32%); font: 600 15px var(--font-head); }
.avatar.sm { width: 36px; height: 36px; font-size: 13px; }
.avatar.lg { width: 76px; height: 76px; font-size: 24px; }
.avatar.xl { width: 110px; height: 110px; font-size: 34px; border: 4px solid #fff; box-shadow: var(--shadow); }

/* ---------- Cards & lists */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card-title h2, .card-title h3 { font-size: 1rem; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin: 22px 2px 10px; }
.section-title h2 { font-size: 1.02rem; }
.list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.list > .item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.list > .item:last-child { border-bottom: 0; }
.list > a.item:active { background: var(--bg); }
.item .t { font-weight: 600; font-size: 14.5px; }
.item .s { font-size: 13px; color: var(--muted); }
.item .chev { color: #B4BCCD; width: 18px; height: 18px; }
.ibox { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex-shrink: 0; }
.ibox.yellow { background: var(--yellow-soft); color: #B27A00; }
.ibox.green { background: var(--green-soft); color: var(--green); }
.ibox.red { background: var(--red-soft); color: var(--red); }
.ibox.navy { background: var(--navy); color: var(--yellow); }
.ibox.gray { background: var(--gray-soft); color: var(--muted); }
.amount { font: 600 15px var(--font-head); white-space: nowrap; }
.amount.neg { color: var(--green); }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .ic { width: 40px; height: 40px; opacity: .45; margin-bottom: 6px; }

/* ---------- Public pages */
body.public { background: #fff; }
.public-wrap { max-width: 460px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding: 24px 22px calc(28px + var(--safe-b)); display: flex; flex-direction: column; }
.welcome { background: linear-gradient(180deg, #DCEEFF 0%, #F2F8FF 40%, #FFF7DD 100%); }
.welcome .public-wrap { justify-content: space-between; text-align: center; }
.welcome .logo-big { width: 86%; margin: 18px auto 0; }
.welcome .hero { width: 100%; margin: 10px 0; }
.welcome .claim { font: 500 1.05rem var(--font-head); text-align: left; }
.welcome .claim strong { display: block; font-size: 1.45rem; font-weight: 700; }
.auth-head { text-align: center; margin: 22px 0 22px; }
.auth-head h1 { font-size: 1.9rem; }
.auth-head p { color: var(--muted); }
.seg { display: flex; background: var(--gray-soft); border-radius: 14px; padding: 4px; margin-bottom: 18px; }
.seg a, .seg button, .seg label { flex: 1; text-align: center; padding: 10px; border-radius: 11px; font: 600 14px var(--font-head); color: var(--muted); border: 0; background: none; cursor: pointer; }
.seg .on, .seg input:checked + span { background: var(--yellow); color: var(--navy); }
.seg label { padding: 0; } .seg label span { display: block; padding: 10px; border-radius: 11px; } .seg input { display: none; }
.lang-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lang-switch .ic { width: 16px; height: 16px; }
.public-foot { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- Parent app shell */
.shell { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--bg); position: relative; padding-bottom: calc(76px + var(--safe-b)); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: rgba(244, 246, 250, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.topbar h1 { font-size: 1.12rem; text-align: center; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { padding: 6px 16px 20px; }
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px; background: #fff; border-top: 1px solid var(--line); display: flex; padding: 6px 4px calc(6px + var(--safe-b)); z-index: 30; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: #8A93A8; padding: 4px 0; position: relative; }
.tabbar a .ic { width: 23px; height: 23px; }
.tabbar a.active { color: var(--navy); }
.tabbar a.active .ic { color: var(--navy); background: var(--yellow); border-radius: 9px; padding: 3px; width: 30px; height: 28px; margin: -3px 0 -2px; }

.greet { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 16px 6px; gap: 12px; }
.greet h1 { font-size: 1.45rem; }
.greet p { color: var(--muted); font-size: 13.5px; margin: 2px 0 0; }
.greet .acts { display: flex; gap: 8px; align-items: center; }
.week { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 6px; margin-bottom: 8px; scrollbar-width: none; }
.week::-webkit-scrollbar { display: none; }
.week a { flex: 1; min-width: 56px; text-align: center; padding: 8px 4px; border-radius: 13px; background: #fff; font-size: 12px; color: var(--muted); box-shadow: var(--shadow); }
.week a b { display: block; font: 600 13px var(--font-head); color: var(--navy); }
.week a.on { background: var(--yellow); color: var(--navy); }
.week a.off { opacity: .55; }
.next-ride { display: flex; align-items: center; gap: 14px; background: var(--yellow-soft); border: 1.5px solid #FBE3A0; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.next-ride .ibox { width: 50px; height: 50px; background: var(--yellow); color: var(--navy); }
.next-ride small { font-size: 12px; }
.next-ride .t { font: 600 16px var(--font-head); }
.kids { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kid { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 10px 14px; text-align: center; }
.kid .avatar { width: 68px; height: 68px; margin-bottom: 6px; font-size: 22px; }
.kid h3 { font-size: 15px; }
.kid small { display: block; font-size: 12px; line-height: 1.35; }
.kid .badge { margin-top: 8px; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.quick a { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 14px 6px 11px; text-align: center; font-size: 12.5px; font-weight: 600; position: relative; }
.quick a .ic { display: block; margin: 0 auto 6px; width: 25px; height: 25px; color: var(--navy); }
.quick a .dot { position: absolute; top: 10px; right: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.banner { display: flex; align-items: center; gap: 12px; background: var(--yellow-soft); border-radius: var(--radius); padding: 14px 16px; font: 600 14px var(--font-head); margin-bottom: 14px; }
.banner .ic { color: var(--navy); width: 30px; height: 30px; }
.banner.navy { background: var(--navy); color: #fff; }
.banner.navy .ic { color: var(--yellow); }

/* Balance card */
.balance { background: radial-gradient(120% 140% at 100% 0%, var(--navy-3) 0%, var(--navy) 55%); color: #fff; border-radius: 22px; padding: 20px; margin-bottom: 14px; position: relative; overflow: hidden; }
.balance small { color: #C4CEE0; font-size: 13px; }
.balance .big { font: 700 2.3rem var(--font-head); margin: 2px 0 6px; letter-spacing: -.02em; }
.balance .ok { display: inline-flex; gap: 6px; align-items: center; color: #86EFAC; font-weight: 600; font-size: 14px; }
.balance .due { color: var(--yellow); }
.balance .ic.bg { position: absolute; right: -18px; top: 6px; width: 120px; height: 120px; opacity: .1; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 20px 36px; }
.timeline li::before { content: ''; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li.done::before { background: var(--green); }
.timeline .dotc { position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #C9D1E0; background: #fff; display: grid; place-items: center; }
.timeline li.done .dotc { background: var(--green); border-color: var(--green); color: #fff; }
.timeline li.now .dotc { border-color: var(--blue); box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 12px var(--blue); }
.timeline .dotc .ic { width: 14px; height: 14px; stroke-width: 3; }
.timeline .tl-row { display: flex; justify-content: space-between; gap: 8px; }
.timeline .tl-row b { font-size: 14.5px; }
.timeline .tl-row span { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* Map */
.map { width: 100%; height: 340px; border-radius: var(--radius); overflow: hidden; background: #DDE6F2; margin-bottom: 14px; position: relative; z-index: 1; }
.map.tall { height: 52vh; min-height: 300px; }
.map-chip { position: absolute; top: 12px; right: 12px; z-index: 500; }
.van-marker { width: 44px; height: 44px; border-radius: 50%; background: var(--yellow); border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.25); display: grid; place-items: center; color: var(--navy); }
.van-marker .ic { width: 24px; height: 24px; }
.pin-marker { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.25); display: grid; place-items: center; color: #fff; }
.pin-marker .ic { width: 17px; height: 17px; }
.pin-marker.home { background: var(--blue); }

/* Calendar grid */
.cal-head { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 14px; padding: 8px; margin-bottom: 10px; box-shadow: var(--shadow); }
.cal-head h2 { font-size: 1rem; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; background: #fff; border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); margin-bottom: 14px; }
.cal .dow { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.cal .d { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; font-size: 14px; font-weight: 500; position: relative; }
.cal .d.out { opacity: .3; }
.cal .d.today { background: var(--navy); color: #fff; font-weight: 700; }
.cal .d.sel { box-shadow: inset 0 0 0 2px var(--yellow); }
.cal .d.noschool { color: var(--red); }
.cal .d.noschool::after, .cal .d.event::after, .cal .d.early::after { content: ''; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--red); }
.cal .d.event::after { background: var(--blue); }
.cal .d.early::after { background: var(--yellow-2); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: -4px 4px 14px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }

/* Profile */
.profile-head { text-align: center; padding: 6px 0 18px; }
.profile-head h2 { margin-top: 10px; font-size: 1.3rem; }

/* Slots */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-bottom: 14px; }
.slots label input { display: none; }
.slots label span { display: block; text-align: center; padding: 10px 4px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line); font-weight: 600; font-size: 14px; cursor: pointer; }
.slots label input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.quote { background: var(--yellow-soft); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.quote .big { font: 700 1.9rem var(--font-head); }

/* Referral */
.ref-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 2px dashed var(--yellow); border-radius: 16px; padding: 12px 16px; font: 700 1.4rem var(--font-head); letter-spacing: .12em; }

/* Install / push prompt */
.install-steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.install-steps li { counter-increment: s; position: relative; padding: 0 0 14px 40px; }
.install-steps li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font: 700 14px var(--font-head); }

/* Stars */
.stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.stars input { display: none; }
.stars label { cursor: pointer; color: #D3D9E4; }
.stars label .ic { width: 30px; height: 30px; fill: currentColor; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: var(--yellow); }

/* ---------- Admin */
body.admin { background: var(--bg); }
.admin-shell { display: flex; min-height: 100vh; }
.sidebar { width: 252px; background: var(--navy); color: #C9D3E6; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 60; transition: transform .25s; }
.sidebar-brand { padding: 22px 22px 14px; }
.sidebar-brand img { width: 160px; }
.sidebar nav { flex: 1; overflow-y: auto; padding: 4px 12px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.sidebar nav a .ic { width: 20px; height: 20px; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active { background: var(--yellow); color: var(--navy); font-weight: 600; }
.nav-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.sidebar-foot { padding: 14px 18px 18px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.sidebar-foot .who { display: flex; gap: 10px; align-items: center; }
.sidebar-foot .who strong { display: block; color: #fff; font-size: 14px; }
.sidebar-foot .who small { color: #9AA7C0; }
.sidebar-foot .lang-switch, .sidebar-foot .logout { color: #C9D3E6; display: flex; gap: 8px; align-items: center; }
.sidebar-foot .ic { width: 17px; height: 17px; }
.sidebar-scrim { display: none; }
.admin-main { flex: 1; margin-left: 252px; min-width: 0; }
.admin-top { position: sticky; top: 0; z-index: 40; background: rgba(244,246,250,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; align-items: center; gap: 12px; padding: 16px 28px; }
.admin-top h1 { font-size: 1.35rem; flex: 1; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.menu-btn { display: none; }
.admin-content { padding: 4px 28px 40px; max-width: 1200px; }
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .sidebar.open + .sidebar-scrim { display: block; position: fixed; inset: 0; background: rgba(15,35,64,.45); z-index: 55; }
  .admin-main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .admin-top { padding: 12px 16px; }
  .admin-top h1 { font-size: 1.12rem; }
  .admin-content { padding: 4px 16px 40px; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.stat small { display: block; font-size: 12.5px; font-weight: 600; }
.stat b { display: block; font: 700 1.55rem var(--font-head); margin-top: 4px; }
.stat .sub { font-size: 12px; color: var(--muted); }
.stat.navy { background: var(--navy); color: #fff; } .stat.navy small, .stat.navy .sub { color: #B8C4DA; }
.stat.yellow { background: var(--yellow); } .stat.yellow small, .stat.yellow .sub { color: var(--navy-2); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cols-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 900px) { .cols, .cols-3 { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; } .table tr.click:hover td { background: #FAFBFD; }
.table .who { display: flex; gap: 10px; align-items: center; }
.table tfoot td { font-weight: 700; background: #FAFBFD; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { width: auto; min-height: 42px; padding: 9px 12px; }
.toolbar .seg { margin: 0; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 99px; background: #fff; font-size: 13.5px; font-weight: 600; color: var(--muted); box-shadow: var(--shadow); }
.tabs a.on { background: var(--navy); color: #fff; }
.inline-form { display: inline; }
details.card summary { cursor: pointer; font: 600 15px var(--font-head); list-style: none; display: flex; align-items: center; justify-content: space-between; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary::after { content: '+'; font-size: 20px; color: var(--muted); }
details.card[open] summary { margin-bottom: 14px; }
details.card[open] summary::after { content: '−'; }
.chart-box { position: relative; height: 280px; }

/* Driver mode */
.drive-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.gps { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 99px; background: var(--gray-soft); color: var(--muted); }
.gps i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.gps.on { background: var(--green-soft); color: var(--green); }
.gps.on i { animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.stop { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 10px; }
.stop.boarded { border-left: 5px solid var(--green); }
.stop.dropped { opacity: .6; }
.stop.absent { opacity: .5; }
.stop .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.stop .acts .btn { padding: 10px 14px; }
.start-card { text-align: center; padding: 24px 16px; }
.start-card .btn { margin-top: 10px; }

/* Print */
@media print {
  .tabbar, .topbar, .no-print, .sidebar, .admin-top { display: none !important; }
  .shell, .admin-main { padding: 0; margin: 0; max-width: none; }
  body { background: #fff; }
  .card, .list, .table-wrap { box-shadow: none; border: 1px solid var(--line); }
  .print-only { display: block !important; }
}
.print-only { display: none; }
