/* SchoolGPS parent app — same palette, type and motion as the public site (../index.php).
   Mobile first: a full-screen map with a bottom sheet; from 900px the sheet floats beside the map. */

:root {
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-rtl: 'Vazirmatn', 'Plus Jakarta Sans', system-ui, sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  --bg: #f4f6fc;
  --bg-soft: #eaeef9;
  --surface: #ffffff;
  --surface-2: #f7f8fd;
  --surface-glass: rgba(255, 255, 255, .74);
  --glass: rgba(255, 255, 255, .88);
  --field: #f3f5fb;
  --line: rgba(17, 27, 78, .09);
  --line-strong: rgba(17, 27, 78, .16);
  --ink: #0b1437;
  --ink-2: #4a5480;
  --ink-3: #737da3;
  --blue: #2a4be0;
  --blue-2: #5470ff;
  --blue-deep: #17238f;
  --blue-soft: rgba(42, 75, 224, .09);
  --yellow: #ffbf1f;
  --yellow-2: #ff9f0a;
  --on-yellow: #131a45;
  --green: #12b76a;
  --green-soft: rgba(18, 183, 106, .12);
  --green-ink: #067647;
  --red: #e5372b;
  --red-soft: rgba(240, 68, 56, .1);
  --red-ink: #b42318;
  --amber: #f79009;
  --amber-soft: rgba(247, 144, 9, .12);
  --amber-ink: #93370d;
  /* One colour per alert distance; dark enough for white text on top */
  --b500: #2a4be0;
  --b400: #6d4ae8;
  --b200: #c2410c;
  --b100: #047857;
  --on-band: #ffffff;
  --track: rgba(17, 27, 78, .08);
  --track-strong: rgba(17, 27, 78, .18);
  --map-bg: #e9edf5;
  --me: #2f6bff;
  --glow-1: rgba(42, 75, 224, .20);
  --glow-2: rgba(255, 191, 31, .24);
  --glow-3: rgba(84, 112, 255, .14);
  --grid: rgba(42, 75, 224, .07);
  --shadow: 0 1px 2px rgba(17, 27, 78, .06), 0 8px 24px -12px rgba(17, 27, 78, .22);
  --shadow-lg: 0 30px 70px -24px rgba(17, 27, 78, .45), 0 12px 28px -16px rgba(17, 27, 78, .22);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #050919;
  --bg-soft: #111a40;
  --surface: #0c1331;
  --surface-2: #101840;
  --surface-glass: rgba(14, 21, 54, .7);
  --glass: rgba(12, 19, 49, .82);
  --field: #0f173d;
  --line: rgba(150, 170, 255, .12);
  --line-strong: rgba(150, 170, 255, .22);
  --ink: #eef1ff;
  --ink-2: #a9b3da;
  --ink-3: #7f89b3;
  --blue: #6582ff;
  --blue-2: #8aa0ff;
  --blue-deep: #2a3bb8;
  --blue-soft: rgba(101, 130, 255, .16);
  --green: #3ee29a;
  --green-soft: rgba(62, 226, 154, .14);
  --green-ink: #3ee29a;
  --red: #ff6b6b;
  --red-soft: rgba(255, 107, 107, .14);
  --red-ink: #ff8f8f;
  --amber: #ffb547;
  --amber-soft: rgba(255, 181, 71, .14);
  --amber-ink: #ffc56e;
  --b500: #7c93ff;
  --b400: #a78bfa;
  --b200: #fb923c;
  --b100: #34d399;
  --on-band: #07102e;
  --track: rgba(150, 170, 255, .14);
  --track-strong: rgba(150, 170, 255, .3);
  --map-bg: #0e1330;
  --me: #5b8cff;
  --glow-1: rgba(60, 90, 255, .28);
  --glow-2: rgba(255, 200, 61, .12);
  --glow-3: rgba(138, 160, 255, .14);
  --grid: rgba(138, 160, 255, .06);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -12px rgba(0, 0, 0, .65);
  --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .85), 0 12px 28px -16px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* ───────────── Base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
[x-cloak] { display: none !important; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100%;
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
[dir="rtl"] body { font-family: var(--font-rtl); }
/* Arabic script must never be letter-spaced — it breaks the joins. */
[dir="rtl"] body * { letter-spacing: 0 !important; }
body.scr-app { position: fixed; inset: 0; overflow: hidden; overscroll-behavior: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-user-select: none; user-select: none; }
a { color: inherit; }
img { display: block; }
:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 2px; }
.i { display: block; flex: none; width: 20px; height: 20px; }
.i.sm { width: 17px; height: 17px; }
.i.xs { width: 14px; height: 14px; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
bdi { unicode-bidi: isolate; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wave { 0% { transform: scale(.8); opacity: .75; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(3); opacity: 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes drift { to { transform: translate3d(7vmax, 5vmax, 0) scale(1.08); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ───────────── Boot ───────────── */
.boot {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  background: var(--bg);
}
.boot-logo {
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden; background: #2b3aa6;
  box-shadow: 0 0 0 5px var(--surface), 0 22px 44px -16px rgba(23, 35, 143, .75);
  animation: boot-pop 1.8s var(--ease-out) infinite;
}
/* logo.png is the round badge on a white square — scale crops it to just the circle. */
.boot-logo img, .logo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.94); }
@keyframes boot-pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.boot-bar { width: 120px; height: 4px; overflow: hidden; border-radius: 4px; background: var(--track); }
.boot-bar i { display: block; width: 40%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-2), var(--blue)); animation: boot-bar 1.1s ease-in-out infinite; }
@keyframes boot-bar { from { transform: translateX(-110%); } to { transform: translateX(260%); } }

/* ───────────── Shared controls ───────────── */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border: 0; border-radius: 14px;
  font-size: 15px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; text-decoration: none;
  transition: transform .15s var(--ease-out), box-shadow .3s, background-color .2s, opacity .2s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.block { display: flex; width: 100%; }
.btn.lg { height: 56px; border-radius: 17px; font-size: 16px; }
.btn.sm { height: 36px; padding: 0 12px; border-radius: 11px; font-size: 13px; gap: 6px; }
.btn.primary {
  color: #fff; background: linear-gradient(135deg, var(--blue-2), var(--blue) 55%, var(--blue-deep));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 14px 28px -14px rgba(42, 75, 224, .9);
}
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.soft { background: var(--bg-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.soft.danger { color: var(--red); }
.btn.danger-soft { background: var(--red-soft); color: var(--red); }
.link { padding: 0; border: 0; background: none; color: var(--blue); font-weight: 800; }
.link.sm { font-size: 13px; }
.spin { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.spin.sm { width: 14px; height: 14px; border-width: 2px; }

.icon-btn {
  position: relative; flex: none; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 14px;
  display: grid; place-items: center; background: transparent; color: var(--ink);
  transition: transform .15s var(--ease-out), background-color .2s;
}
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.glass, .icon-btn.glass:hover {
  background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
}
.icon-btn.lg { width: 56px; height: 56px; border-radius: 19px; }
.icon-btn.lg .i { width: 23px; height: 23px; }
.badge-dot { position: absolute; top: 12px; inset-inline-end: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2.5px var(--surface); }

.seg { display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line); }
.seg button {
  flex: 1; min-width: 0; height: 36px; padding: 0 8px; border: 0; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 700; white-space: nowrap;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(17, 27, 78, .08), 0 4px 12px -6px rgba(17, 27, 78, .3); }
.seg button[lang="ckb"], .seg button[lang="ar"], .seg button[lang="fa"] { font-family: var(--font-rtl); font-size: 13.5px; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin-bottom: 14px; }

/* School shift (morning / evening): two big options, nothing chosen until the parent taps one */
.shift-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shift-pick button {
  min-width: 0; height: 54px; padding: 0 12px; border: 0; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--field); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 15px; font-weight: 700; line-height: 1.2; text-align: center;
  transition: background-color .2s, color .2s, box-shadow .2s, transform .15s;
}
.shift-pick button:hover { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.shift-pick button:active { transform: scale(.97); }
.shift-pick .i { width: 22px; height: 22px; }
.shift-pick .sh-morning .i { color: var(--yellow-2); }
.shift-pick .sh-evening .i { color: var(--b400); }
.shift-pick button.on { background: var(--blue-soft); color: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }
.shift-pick.lg button { height: auto; min-height: 104px; padding: 16px 10px; flex-direction: column; gap: 10px; border-radius: 20px; font-size: 15.5px; }
.shift-pick.lg .i { width: 34px; height: 34px; }
.field-lbl { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field-lbl em { font-style: normal; font-weight: 600; color: var(--ink-3); }
.field-hint { font-size: 12px; line-height: 1.5; color: var(--ink-3); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input {
  position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; height: 54px; padding: 0 14px;
  border-radius: 16px; background: var(--field); box-shadow: inset 0 0 0 1.5px var(--line);
  transition: box-shadow .2s, background-color .2s;
}
.input:focus-within { background: var(--surface); box-shadow: inset 0 0 0 2px var(--blue), 0 0 0 4px var(--blue-soft); }
.input > .i { color: var(--ink-3); transition: color .2s; }
.input:focus-within > .i { color: var(--blue); }
.input input, .input select {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent;
  font-size: 16px; font-weight: 600; color: var(--ink);   /* 16px: iOS does not zoom into the field */
}
.input input::placeholder { color: var(--ink-3); font-weight: 500; opacity: .75; }
[dir="rtl"] .input input[dir="ltr"] { text-align: right; }
.input select { -webkit-appearance: none; appearance: none; cursor: pointer; }
.input select option { color: #0b1437; background: #fff; }
.input.select::after {
  content: ''; flex: none; width: 8px; height: 8px; margin-top: -4px;
  border: solid var(--ink-3); border-width: 0 2px 2px 0; transform: rotate(45deg); pointer-events: none;
}
.eye { flex: none; width: 40px; height: 40px; margin-inline-end: -8px; padding: 0; border: 0; border-radius: 12px; display: grid; place-items: center; background: none; color: var(--ink-3); }
.eye:hover { color: var(--ink); }

.form-msg { display: flex; align-items: center; gap: 8px; margin: 2px 0 14px; padding: 11px 13px; border-radius: 13px; font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.form-msg.err { background: var(--red-soft); color: var(--red-ink); }
.form-msg.info { background: var(--blue-soft); color: var(--blue); }
.form-msg.warn { background: var(--amber-soft); color: var(--amber-ink); }

.switch { position: relative; flex: none; width: 52px; height: 32px; padding: 0; border: 0; border-radius: 999px; background: var(--track-strong); transition: background-color .25s; }
.switch span { position: absolute; top: 3px; inset-inline-start: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .35s var(--ease-spring); }
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"] span { transform: translateX(20px); }
[dir="rtl"] .switch[aria-checked="true"] span { transform: translateX(-20px); }
.pill { flex: none; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.pill.ok { background: var(--green-soft); color: var(--green-ink); }
.plate {
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 6px;
  font-family: var(--font); font-size: 12px; font-weight: 800; letter-spacing: .04em; direction: ltr;
  color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.initials {
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(140deg, var(--blue-2), var(--blue-deep)); color: #fff; font-weight: 800; font-size: 15px;
}

/* ───────────── Sign in / Register ───────────── */
.auth { position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l); }
.auth-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.auth-bg i { position: absolute; border-radius: 50%; will-change: transform; }
.auth-bg .g1 { width: 62vmax; height: 62vmax; left: -22vmax; top: -26vmax; background: radial-gradient(circle, var(--glow-1), transparent 65%); animation: drift 22s ease-in-out infinite alternate; }
.auth-bg .g2 { width: 46vmax; height: 46vmax; right: -16vmax; top: 10vmax; background: radial-gradient(circle, var(--glow-2), transparent 65%); animation: drift 26s ease-in-out infinite alternate-reverse; }
.auth-bg .g3 { width: 52vmax; height: 52vmax; left: 20vmax; bottom: -34vmax; background: radial-gradient(circle, var(--glow-3), transparent 65%); animation: drift 30s ease-in-out infinite alternate; }
.auth-bg .grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 18%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 18%, #000 20%, transparent 75%);
}
.auth-top { width: 100%; max-width: 1100px; margin: 0 auto; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; text-decoration: none; }
.logo { flex: none; width: 40px; height: 40px; overflow: hidden; border-radius: 50%; background: #2b3aa6; box-shadow: 0 0 0 3px var(--surface), 0 8px 18px -8px rgba(23, 35, 143, .7); }
.brand-txt { min-width: 0; line-height: 1.2; }
.brand-txt strong { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand-txt small { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.auth-main { flex: 1; display: grid; place-items: center; padding: 6px 16px 20px; }
.auth-card {
  width: 100%; max-width: 440px; padding: 22px 24px 26px; border-radius: 30px;
  background: var(--surface-glass); -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lg);
  animation: rise .7s var(--ease-out) both;
}
.top-actions { display: flex; align-items: center; gap: 8px; }

/* Language dropdown — always in the top bar, next to the settings / theme button */
.lang-dd { position: relative; flex: none; }
.lang-btn {
  height: 42px; padding: 0 12px; border: 0; border-radius: 14px; display: flex; align-items: center; gap: 7px;
  color: var(--ink); font-family: var(--font); font-size: 14px; font-weight: 800; letter-spacing: .02em;
  background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow); transition: transform .15s var(--ease-out);
}
.lang-btn:active { transform: scale(.94); }
.lang-btn > .i.sm { color: var(--blue); }
.lang-chev { transform: rotate(90deg); color: var(--ink-3); transition: transform .3s var(--ease-out); }
.lang-btn[aria-expanded="true"] .lang-chev { transform: rotate(-90deg); }
.topbar .lang-btn { height: 56px; padding: 0 14px; border-radius: 19px; font-size: 15px; }
.lang-menu {
  position: absolute; z-index: 50; top: calc(100% + 8px); inset-inline-end: 0; min-width: 196px; padding: 6px;
  border-radius: 18px; background: var(--surface); box-shadow: 0 24px 50px -16px rgba(5, 10, 40, .5), inset 0 0 0 1px var(--line);
  transform-origin: top right;
}
[dir="rtl"] .lang-menu { transform-origin: top left; }
.lang-menu button {
  width: 100%; height: 46px; padding: 0 12px; border: 0; border-radius: 12px; display: flex; align-items: center; gap: 12px;
  background: none; color: var(--ink); font-size: 15px; font-weight: 700; text-align: start;
}
.lang-menu button:hover { background: var(--bg-soft); }
.lang-menu button.on { background: var(--blue-soft); color: var(--blue); }
.lang-menu .lm-code { flex: none; width: 34px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-family: var(--font); font-size: 11.5px; font-weight: 800; letter-spacing: .04em; color: var(--ink-2); background: var(--bg-soft); }
.lang-menu button.on .lm-code { color: #fff; background: var(--blue); }
.lang-menu .lm-name { flex: 1; }
.lang-menu button[lang="ckb"] .lm-name, .lang-menu button[lang="ar"] .lm-name, .lang-menu button[lang="fa"] .lm-name { font-family: var(--font-rtl); }
.dd-enter { transition: transform .25s var(--ease-spring), opacity .2s; }
.dd-leave { transition: transform .15s var(--ease-out), opacity .15s; }
.dd-from { transform: scale(.92) translateY(-6px); opacity: 0; }
.dd-to { transform: none; opacity: 1; }
.auth-emblem { position: relative; width: 76px; height: 76px; margin: 6px auto 16px; display: grid; place-items: center; }
.ae-core {
  position: relative; z-index: 1; width: 66px; height: 66px; border-radius: 22px; display: grid; place-items: center;
  color: var(--on-yellow); background: linear-gradient(140deg, #ffd24a, var(--yellow-2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 16px 30px -12px rgba(255, 159, 10, .9);
}
.ae-core .i { width: 34px; height: 34px; }
.ae-ring { position: absolute; inset: 0; border-radius: 26px; border: 2px solid var(--yellow); opacity: 0; animation: wave 2.6s var(--ease-out) infinite; }
.ae-ring.r2 { animation-delay: 1.3s; }
.auth h1 { margin: 0 0 6px; text-align: center; font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.25; }
.auth-sub { margin: 0 0 22px; text-align: center; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.auth-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 18px; }
.auth-head h1, .auth-head .auth-sub { text-align: start; }
.auth-head h1 { font-size: 23px; margin-top: 4px; }
.auth-head .auth-sub { margin: 0; font-size: 14px; }
.auth-head .icon-btn { margin-inline-start: -8px; }
/* Register: the site's school (and a fixed shift) as small tags under the title, instead of fields */
.reg-ctx { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ctx-tag {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-height: 26px; padding: 3px 10px;
  padding-inline-start: 8px; border-radius: 999px; background: var(--blue-soft); color: var(--blue);
  font-size: 12.5px; font-weight: 700; line-height: 1.3;
}
.ctx-tag .i { width: 15px; height: 15px; }
.ctx-tag span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-tag.sh-morning .i { color: var(--yellow-2); }
.ctx-tag.sh-evening .i { color: var(--b400); }
.auth-switch { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 0; font-size: 14px; color: var(--ink-2); }
.fine { margin: 12px 0 0; text-align: center; font-size: 12px; line-height: 1.55; color: var(--ink-3); }
.fine a { color: var(--blue); font-weight: 700; text-decoration: none; }
.auth-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 12px 16px 20px; font-size: 12.5px; color: var(--ink-3); }
.auth-foot a { color: var(--ink-2); font-weight: 700; text-decoration: none; }

/* ───────────── The app ───────────── */
.app { position: fixed; inset: 0; overflow: hidden; --sheet-h: 260px; }
.map { position: absolute; inset: 0; z-index: 0; background: var(--map-bg); }
.leaflet-container { font-family: inherit; background: var(--map-bg); outline: 0; }
.app .leaflet-top { top: calc(var(--safe-t) + 88px); }
.leaflet-control-attribution { margin: 0 8px 0 0 !important; padding: 1px 7px !important; border-radius: 8px; font-size: 10px; line-height: 1.6; background: var(--glass) !important; color: var(--ink-3) !important; }
.leaflet-control-attribution a { color: var(--ink-2) !important; }
.leaflet-tile-pane { transition: filter .4s; }
/* Dark map: the light OSM tiles inverted into a navy night map (same recipe as /dashboard) */
.map-dark .leaflet-tile-pane { filter: brightness(.65) invert(1) contrast(2.4) hue-rotate(200deg) saturate(.3) brightness(.85); }

/* Top bar: me + settings */
.topbar {
  position: absolute; z-index: 20; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-t) + 12px) calc(var(--safe-r) + 12px) 10px calc(var(--safe-l) + 12px);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.me-chip {
  flex: 1; min-width: 0; height: 64px; padding: 0 16px 0 8px; border: 0; border-radius: 22px;
  display: flex; align-items: center; gap: 12px; text-align: start;
  background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
  transition: transform .15s var(--ease-out);
}
[dir="rtl"] .me-chip { padding: 0 8px 0 16px; }
.me-chip:active { transform: scale(.98); }
.me-av { position: relative; flex: none; width: 50px; height: 50px; display: grid; place-items: center; }
.me-av img, .me-av .initials { grid-area: 1 / 1; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
/* The GPS ring around my photo: spinning gradient = live, sweeping arc = searching, dashed = off */
.me-ring { position: absolute; inset: 0; border-radius: 50%; }
.me-ring::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%; padding: 3px;
  background: conic-gradient(from 0deg, var(--green), #2fd0c0, var(--blue-2), #8b5cf6, var(--green));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.me-ring::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--green); opacity: 0; }
.geo-on .me-ring::before { animation: spin 3.2s linear infinite; }
.geo-on .me-ring::after { animation: wave 2.4s var(--ease-out) infinite; }
.geo-asking .me-ring::before { background: conic-gradient(var(--blue) 0 28%, transparent 28% 100%); animation: spin .9s linear infinite; }
.geo-idle .me-ring::before, .geo-denied .me-ring::before, .geo-unavailable .me-ring::before, .geo-insecure .me-ring::before {
  padding: 0; background: none; border: 2px dashed var(--ink-3); opacity: .7; -webkit-mask: none; mask: none;
}
.geo-denied .me-ring::before, .geo-insecure .me-ring::before { border-color: var(--red); }
.me-dot { position: absolute; bottom: 3px; inset-inline-end: 3px; width: 13px; height: 13px; border-radius: 50%; background: var(--ink-3); box-shadow: 0 0 0 2.5px var(--surface); }
.geo-on .me-dot { background: var(--green); }
.geo-asking .me-dot { background: var(--amber); }
.geo-denied .me-dot, .geo-insecure .me-dot, .geo-unavailable .me-dot { background: var(--red); }
.me-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }
.me-txt small { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
[dir="rtl"] .me-txt small { font-size: 12px; text-transform: none; }
.me-txt small { white-space: nowrap; min-width: 0; }
.me-txt small > span { overflow: hidden; text-overflow: ellipsis; }
.me-txt small .acc { flex: none; white-space: nowrap; margin-inline-start: auto; padding: 1px 7px; border-radius: 999px; background: var(--green-soft); color: var(--green-ink); font-size: 11px; letter-spacing: 0; text-transform: none; }
.me-txt strong { font-size: 16.5px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.geo-denied .me-txt strong, .geo-insecure .me-txt strong { color: var(--red); }
.geo-idle .me-txt strong { color: var(--blue); }
/* Top chip for the line: dashed grey ring while the driver is not on a trip */
.geo-off .me-ring::before { padding: 0; background: none; border: 2px dashed var(--ink-3); opacity: .7; -webkit-mask: none; mask: none; }
.geo-off .me-txt strong { color: var(--ink-2); }
.geo-on .me-txt strong { font-variant-numeric: tabular-nums; }

.net-pill {
  position: absolute; z-index: 22; top: calc(var(--safe-t) + 88px); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 700; box-shadow: var(--shadow);
}

.fabs {
  position: absolute; z-index: 15; inset-inline-end: calc(var(--safe-r) + 12px); bottom: calc(var(--sheet-h) + 14px);
  display: flex; flex-direction: column; gap: 10px; transition: bottom .4s var(--ease-out);
}
.fab {
  width: 52px; height: 52px; padding: 0; border: 0; border-radius: 18px; display: grid; place-items: center;
  background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
  color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
  transition: transform .15s var(--ease-out), color .2s;
}
.fab:active { transform: scale(.92); }
.fab.on { color: var(--blue); }
.fab .i { width: 23px; height: 23px; }

/* Arrival alert banner — drops in from the top like a system notification */
.banner {
  position: absolute; z-index: 45; top: calc(var(--safe-t) + 10px); left: 10px; right: 10px; max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; overflow: hidden;
  border-radius: 24px; background: var(--bn, linear-gradient(135deg, #2a4be0, #17238f)); color: #fff; cursor: pointer;
  box-shadow: 0 26px 50px -18px rgba(5, 10, 40, .65), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.banner::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent); transform: skewX(-18deg);
  animation: sweep 2.4s var(--ease-out) .3s infinite;
}
@keyframes sweep { 0% { left: -40%; } 60%, 100% { left: 130%; } }
.banner.bd-b500 { --bn: linear-gradient(135deg, #3a5cf0, #17238f); }
.banner.bd-b400 { --bn: linear-gradient(135deg, #7b5af0, #4527a6); }
.banner.bd-b200 { --bn: linear-gradient(135deg, #d9530f, #9a3412); }
.banner.bd-b100 { --bn: linear-gradient(135deg, #059669, #065f46); }
.banner.bd-school { --bn: linear-gradient(135deg, #0d9f5f, #064e3b); }
.banner.bd-start { --bn: linear-gradient(135deg, #3a5cf0, #17238f); }
.banner.bd-near { --bn: linear-gradient(135deg, #d9530f, #9a3412); }
.bn-ico { position: relative; flex: none; width: 50px; height: 50px; border-radius: 17px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); }
.bn-ico .i { width: 27px; height: 27px; transform-origin: 50% 12%; animation: bell 1s ease-in-out 3; }
.bn-wave { position: absolute; inset: 0; border-radius: inherit; border: 2px solid rgba(255, 255, 255, .75); animation: wave 1.4s var(--ease-out) infinite; }
@keyframes bell { 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
.bn-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bn-txt strong { font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.bn-txt span { font-size: 14px; font-weight: 600; line-height: 1.4; opacity: .95; }
.bn-time { align-self: flex-start; font-size: 12px; font-weight: 700; opacity: .85; }
.bn-enter { transition: transform .6s var(--ease-spring), opacity .3s; }
.bn-leave { transition: transform .35s var(--ease-out), opacity .3s; }
.bn-from { transform: translateY(-140%); opacity: 0; }
.bn-to { transform: none; opacity: 1; }

/* Location permission card */
.perm {
  position: absolute; z-index: 35; left: 12px; right: 12px; bottom: calc(var(--safe-b) + 12px); max-width: 440px; margin: 0 auto;
  padding: 24px 22px 18px; border-radius: 30px; text-align: center;
  background: var(--surface); box-shadow: 0 30px 70px -20px rgba(5, 10, 40, .6), inset 0 0 0 1px var(--line);
}
.perm-art { position: relative; width: 88px; height: 88px; margin: 0 auto 14px; display: grid; place-items: center; }
.pa-core { position: relative; z-index: 1; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--blue-2), var(--blue-deep)); box-shadow: 0 12px 24px -10px rgba(42, 75, 224, .9); }
.pa-core .i { width: 28px; height: 28px; }
.pa-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--blue-2); opacity: 0; animation: wave 2.4s var(--ease-out) infinite; }
.pa-ring.r2 { animation-delay: .8s; }
.pa-ring.r3 { animation-delay: 1.6s; }
.perm h2 { margin: 0 0 8px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.perm p { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.perm-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: -4px 0 18px; }
.perm-steps span { padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 800; color: var(--on-band); background: var(--c); }
.perm-actions { display: flex; gap: 10px; }
.perm-actions .btn { flex: 1; }
.pm-enter { transition: transform .5s var(--ease-out), opacity .3s; }
.pm-leave { transition: transform .3s var(--ease-out), opacity .25s; }
.pm-from { transform: translateY(40px); opacity: 0; }
.pm-to { transform: none; opacity: 1; }
.st-500 { --c: var(--b500); }
.st-400 { --c: var(--b400); }
.st-200 { --c: var(--b200); }
.st-100 { --c: var(--b100); }

/* Bottom sheet */
.sheet {
  position: absolute; z-index: 25; left: 0; right: 0; bottom: 0;
  max-height: calc(100% - var(--safe-t) - 96px); overflow-y: auto; overscroll-behavior: contain;
  padding: 4px calc(var(--safe-r) + 18px) calc(var(--safe-b) + 18px) calc(var(--safe-l) + 18px);
  border-radius: 28px 28px 0 0; background: var(--surface);
  box-shadow: 0 -14px 40px -18px rgba(5, 10, 40, .4), inset 0 1px 0 var(--line);
  animation: sheet-in .6s var(--ease-out) both;
}
@keyframes sheet-in { from { transform: translateY(40%); opacity: 0; } }
.sheet-handle { display: block; width: 100%; height: 26px; margin: 0 0 2px; padding: 0; border: 0; background: none; touch-action: none; }
.sheet-handle span { display: block; width: 44px; height: 5px; margin: 0 auto; border-radius: 5px; background: var(--ink-3); opacity: .35; }

.sk { padding: 2px 0 8px; }
.sk-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.sk-row > span { flex: 1; }
.sk-av { display: block; width: 60px; height: 60px; border-radius: 50%; }
.sk-l { display: block; height: 12px; margin: 9px 0; border-radius: 6px; }
.sk-av, .sk-l { background: linear-gradient(90deg, var(--bg-soft) 25%, var(--surface-2) 50%, var(--bg-soft) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.w90 { width: 90%; } .w70 { width: 70%; } .w60 { width: 60%; } .w40 { width: 40%; }

.drv-row { display: flex; align-items: center; gap: 14px; }
.drv-av { position: relative; flex: none; width: 62px; height: 62px; display: grid; place-items: center; --sc: var(--ink-3); }
.drv-av img, .drv-av .initials { grid-area: 1 / 1; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; font-size: 19px; }
.drv-av::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2.5px solid var(--sc); }
.drv-av.st-live::after, .drv-av.st-stale::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--sc); animation: wave 2s var(--ease-out) infinite; }
.drv-type { position: absolute; bottom: -3px; inset-inline-end: -5px; width: 27px; height: 27px; border-radius: 9px; display: grid; place-items: center; color: var(--on-yellow); background: linear-gradient(140deg, #ffd24a, var(--yellow-2)); box-shadow: 0 0 0 2.5px var(--surface); }
.drv-type .i { width: 17px; height: 17px; }
.drv-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.drv-txt small { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
[dir="rtl"] .drv-txt small { font-size: 12.5px; text-transform: none; }
.drv-txt strong { font-size: 18px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.call { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; text-decoration: none; background: linear-gradient(140deg, #2fd08a, #0e9f5c); box-shadow: 0 12px 24px -10px rgba(18, 183, 106, .9); transition: transform .15s var(--ease-out); }
.call:active { transform: scale(.92); }
.call .i { width: 23px; height: 23px; }

.st-live, .st-stale { --sc: var(--green); }   /* stale = signal lost under 30 min: shown green as "Live (LL)" */
.st-offline, .st-nogps { --sc: var(--ink-3); }
.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 800; color: var(--ink-2); background: color-mix(in srgb, var(--sc) 15%, transparent); }
.chip.st-live, .chip.st-stale { color: var(--green-ink); }
.chip i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }
.chip.st-live i::after, .chip.st-stale i::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 1.8s var(--ease-out) infinite; }
.ago { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.drv-row.tap { cursor: pointer; }
.drv-status { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 3px; }
.drv-status .chip { padding: 3px 9px; font-size: 11.5px; gap: 6px; }
.drv-status .chip i { width: 7px; height: 7px; }
.drv-status .ago { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Speed / left / time */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.stat {
  min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 16px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: background .35s, box-shadow .35s;
}
.stat small { font-size: 11.5px; font-weight: 700; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat strong { font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stat em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.stats.flash .stat { background: var(--blue-soft); box-shadow: inset 0 0 0 1.5px var(--blue); }

/* Speed dial: a 270° arc, coloured by how fast the line is going */
.sp-none { --bc: var(--ink-3); }
.sp-stop { --bc: var(--amber); }
.sp-slow { --bc: var(--blue-2); }
.sp-ok { --bc: var(--green); }
.sp-fast { --bc: var(--red); }
.gauge .ring-prog { stroke-dasharray: 0 100; transition: stroke-dasharray .9s var(--ease-out), stroke .4s; }
.gauge .ring-c { padding-top: 6px; }
.gauge .ring-c small { text-transform: none; }

/* Trip progress toward school */
.trip { margin-top: 10px; padding: 12px 14px 14px; border-radius: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.trip-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.trip-top b { font-size: 14px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.trip-bar { position: relative; height: 8px; margin-inline-end: 22px; border-radius: 999px; background: var(--track); }
.trip-bar > i { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; border-radius: inherit; background: linear-gradient(90deg, var(--blue-2), var(--green)); transition: width .9s var(--ease-out); }
[dir="rtl"] .trip-bar > i { background: linear-gradient(270deg, var(--blue-2), var(--green)); }
.trip-bus, .trip-end {
  position: absolute; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%;
  display: grid; place-items: center; box-shadow: 0 0 0 3px var(--surface-2), 0 4px 10px -4px rgba(17, 27, 78, .5);
}
.trip-bus { margin-inline-start: -14px; background: var(--yellow, #f5b700); color: #17238f; transition: inset-inline-start .9s var(--ease-out); }
.trip-end { inset-inline-end: -22px; background: var(--green); color: #fff; }
.note { margin: 10px 0 0; padding: 10px 14px; border-radius: 14px; font-size: 13px; font-weight: 600; color: var(--amber-ink); background: var(--amber-soft); }

/* Distance ring — fills over the last kilometre, one colour per alert band */
.dist { display: flex; align-items: center; gap: 16px; margin-top: 12px; padding: 14px; border-radius: 22px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); --bc: var(--blue-2); }
.bd-b500 { --bc: var(--b500); }
.bd-b400 { --bc: var(--b400); }
.bd-b200 { --bc: var(--b200); }
.bd-b100 { --bc: var(--b100); }
.bd-none { --bc: var(--ink-3); }
.ring { position: relative; flex: none; width: 108px; height: 108px; }
.ring svg { width: 100%; height: 100%; overflow: visible; }
.ring-track { fill: none; stroke: var(--track); stroke-width: 9; }
.ring-prog { fill: none; stroke: var(--bc); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 100; transition: stroke-dashoffset .9s var(--ease-out), stroke .4s; }
.ring-tick { fill: var(--surface-2); stroke: var(--track-strong); stroke-width: 2; transition: fill .3s, stroke .3s; }
.ring-tick.on { fill: var(--bc); stroke: var(--surface-2); }
.ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ring-c strong { font-size: 27px; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ring-c small { margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.bd-b100 .ring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--bc); opacity: .12; animation: wave 1.6s var(--ease-out) infinite; }
.dist-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.dist-txt > strong { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.dist-txt > strong::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--bc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bc) 20%, transparent); }
.place, .eta { display: flex; align-items: center; gap: 6px; max-width: 100%; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.place .i, .eta .i { color: var(--ink-3); }
.place span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.step {
  display: flex; align-items: center; justify-content: center; gap: 4px; height: 34px; border-radius: 12px;
  font-size: 12.5px; font-weight: 800; white-space: nowrap; color: var(--ink-3);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color .35s, color .35s, box-shadow .35s;
}
.step.on { color: var(--on-band); background: var(--c); box-shadow: 0 8px 16px -10px var(--c); }

.idle { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 14px; border-radius: 20px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.idle-ico { flex: none; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--bg-soft); color: var(--ink-3); }
.idle strong { display: block; font-size: 15px; font-weight: 800; line-height: 1.35; }
.idle small { display: block; margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }

.school-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 11px 14px; border-radius: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.sc-ico { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--blue-2), var(--blue-deep)); }
.sc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sc-txt small { font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.sc-txt strong { font-size: 14.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-state { flex: none; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; color: var(--ink-2); background: var(--bg-soft); }
.sc-state.ok { color: var(--green-ink); background: var(--green-soft); }

.tip { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 12px 14px; border: 0; border-radius: 18px; text-align: start; color: var(--ink); background: var(--blue-soft); }
.tip > span:nth-child(2) { flex: 1; min-width: 0; }
.tip-ico { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--blue); }
.tip strong { display: block; font-size: 14px; font-weight: 800; }
.tip small { display: block; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.tip > .i { color: var(--ink-3); }

/* New account: "being reviewed" until the school adds the driver */
.review { padding: 2px 0 0; }
.rv-head { display: flex; align-items: flex-start; gap: 14px; }
.rv-head strong { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.rv-head small { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.rv-ico { position: relative; flex: none; width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--blue-2), var(--blue-deep)); box-shadow: 0 12px 24px -12px rgba(42, 75, 224, .9); }
.rv-ico .i { width: 26px; height: 26px; }
.rv-orbit { position: absolute; inset: -5px; border-radius: 22px; border: 2px solid transparent; border-top-color: var(--blue-2); border-right-color: var(--blue-2); animation: spin 2.4s linear infinite; }
.rv-steps { display: flex; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.rv-steps li { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; line-height: 1.3; text-align: center; color: var(--ink-3); }
.rv-steps li:not(:last-child)::after { content: ''; position: absolute; top: 13px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; border-radius: 2px; background: var(--track-strong); }
[dir="rtl"] .rv-steps li:not(:last-child)::after { left: calc(-50% + 18px); right: calc(50% + 18px); }
.rv-steps li.done::after { background: var(--green); }
.rv-steps .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--track-strong); }
.rv-steps .done { color: var(--green-ink); }
.rv-steps .done .dot { color: #fff; background: var(--green); box-shadow: none; }
.rv-steps .now { color: var(--blue); }
.rv-steps .now .dot { box-shadow: inset 0 0 0 2px var(--blue); }
.rv-steps .now .dot i { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.55); opacity: .5; } }
.rv-info { margin-top: 14px; padding: 2px 14px; border-radius: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.rv-info .kv-row:last-child { border-bottom: 0; }
.area-form { margin-top: 12px; }
.area-form .form-msg { margin: 0 0 10px; }
.area-form .form-msg.err { margin: 10px 0 0; }

/* Neighborhood fields and values are always Kurdish, whatever the interface language */
.input input.ku-in { font-family: var(--font-rtl); text-align: right; }
.input input.ku-in::placeholder { font-family: var(--font-rtl); }
.ku-txt { font-family: var(--font-rtl); }
.pf-area { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 3px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--blue); background: var(--blue-soft); }
.waiting { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; font-weight: 700; color: var(--blue); background: var(--blue-soft); }

/* Collapsed sheet (phones): driver + distance only */
@media (max-width: 899px) {
  .sheet.collapsed .status-row, .sheet.collapsed .steps, .sheet.collapsed .school-row, .sheet.collapsed .tip,
  .sheet.collapsed .place, .sheet.collapsed .idle small { display: none !important; }
  .sheet.collapsed .dist { padding: 10px 12px; }
  .sheet.collapsed .ring { width: 70px; height: 70px; }
  .sheet.collapsed .ring-c strong { font-size: 18px; }
  .sheet.collapsed .ring-c small { font-size: 10px; margin-top: 2px; }
  .sheet.collapsed .trip, .sheet.collapsed .note, .sheet.collapsed .eta { display: none !important; }
}

/* ───────────── Settings ───────────── */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(5, 9, 25, .45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.settings {
  position: fixed; z-index: 61; top: 0; bottom: 0; right: 0; width: 100%; max-width: 460px;
  display: flex; flex-direction: column; background: var(--bg); box-shadow: -24px 0 60px -24px rgba(5, 10, 40, .55);
}
[dir="rtl"] .settings { right: auto; left: 0; box-shadow: 24px 0 60px -24px rgba(5, 10, 40, .55); }
.st-head { display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 10px) 14px 10px; border-bottom: 1px solid var(--line); background: var(--bg); }
.st-head h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.st-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 14px; padding: 18px 16px calc(var(--safe-b) + 28px); }
.st-enter { transition: transform .45s var(--ease-out); }
.st-leave { transition: transform .3s var(--ease-out); }
.st-from { transform: translateX(100%); }
[dir="rtl"] .st-from { transform: translateX(-100%); }
.st-to { transform: none; }

.profile { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 24px 16px 18px; border-radius: 24px; text-align: center; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.pf-av { position: relative; width: 100px; height: 100px; margin-bottom: 10px; padding: 0; border: 0; border-radius: 50%; background: none; }
.pf-av img, .pf-av .initials { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; font-size: 32px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 7px var(--blue-soft); }
.pf-cam { position: absolute; bottom: 2px; inset-inline-end: 2px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--blue); box-shadow: 0 0 0 3px var(--surface); }
.profile > strong { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.pf-phone { font-size: 14px; font-weight: 600; color: var(--ink-3); direction: ltr; }
.pf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }

.card { display: flex; flex-direction: column; padding: 18px 16px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 15.5px; font-weight: 800; }
.card h3 .i { color: var(--blue); }
.card > .field-lbl { margin: 4px 0 8px; }
.card > .seg + .field-lbl { margin-top: 16px; }
.card .field { margin-bottom: 12px; }
.card > .btn.primary { align-self: flex-start; }
.card .form-msg { margin-top: 0; }
.kv { display: flex; flex-direction: column; }
.kv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv-row > span:first-child { flex: none; font-weight: 600; color: var(--ink-2); }
.kv-row strong { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 800; text-align: end; }
.kv-row a { color: var(--blue); font-weight: 800; text-decoration: none; }
.muted { margin: 0 0 4px; font-size: 14px; color: var(--ink-3); }
.card .link-form { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.link-inline { display: flex; gap: 8px; }
.link-inline .input { flex: 1; height: 50px; }
.link-inline .btn { height: 50px; }
.opt { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px 0 2px; border-top: 1px solid var(--line); }
.opt-ico { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: var(--ink-2); background: var(--bg-soft); }
.opt-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.opt-txt strong { font-size: 14.5px; font-weight: 800; }
.opt-txt small { font-size: 12.5px; color: var(--ink-3); }
.card > .btn.soft.block { margin-top: 16px; }
.st-foot { display: flex; justify-content: center; gap: 8px; margin: 4px 0 0; font-size: 12.5px; color: var(--ink-3); }
.st-foot a { color: var(--ink-2); font-weight: 700; text-decoration: none; }

/* School shift window: above the map and the settings, closes only after a choice */
.shift-scrim { z-index: 80; }
.shift-modal {
  position: fixed; z-index: 81; inset: 0; display: grid; place-items: center; overflow-y: auto; pointer-events: none;
  padding: calc(var(--safe-t) + 16px) calc(var(--safe-r) + 16px) calc(var(--safe-b) + 16px) calc(var(--safe-l) + 16px);
}
.sm-card {
  pointer-events: auto; width: 100%; max-width: 400px; display: flex; flex-direction: column; align-items: center;
  padding: 26px 20px 20px; border-radius: 26px; text-align: center;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lg);
}
.sm-card:focus { outline: none; }
.sm-ico { width: 56px; height: 56px; margin-bottom: 14px; border-radius: 19px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, var(--blue-2), var(--blue-deep)); box-shadow: 0 12px 24px -12px rgba(42, 75, 224, .9); }
.sm-ico .i { width: 27px; height: 27px; }
.sm-card h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.sm-card p:not(.form-msg) { margin: 6px 0 18px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.sm-card .shift-pick { align-self: stretch; margin-bottom: 18px; }
.sm-card .form-msg { align-self: stretch; margin: -6px 0 14px; }
.sm-enter { transition: opacity .3s var(--ease-out), transform .45s var(--ease-spring); }
.sm-leave { transition: opacity .2s var(--ease-out), transform .2s var(--ease-out); }
.sm-from { opacity: 0; transform: translateY(16px) scale(.97); }
.sm-to { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .sm-enter, .sm-leave { transition: opacity .2s; } .sm-from { transform: none; } }

/* Toast */
.toast {
  position: fixed; z-index: 90; left: 50%; top: calc(var(--safe-t) + 88px); transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px); display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px;
  border-radius: 16px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 700;
  box-shadow: 0 22px 44px -14px rgba(0, 0, 0, .55);
}
[dir="rtl"] .toast { padding: 10px 10px 10px 16px; }
.toast .i { width: 24px; height: 24px; padding: 4px; border-radius: 50%; color: #fff; background: var(--green); }
.toast.tk-err .i { background: var(--red); }

/* ───────────── Map markers ───────────── */
.mk-wrap { background: none; border: 0; }
.me-mk { position: relative; width: 24px; height: 24px; }
.me-mk .core { position: absolute; inset: 4px; border-radius: 50%; background: var(--me); box-shadow: 0 0 0 3px #fff, 0 3px 10px rgba(0, 0, 0, .4); }
.me-mk .pulse { position: absolute; inset: 0; border-radius: 50%; background: var(--me); opacity: 0; animation: me-pulse 2.2s var(--ease-out) infinite; }
@keyframes me-pulse { from { transform: scale(.7); opacity: .55; } to { transform: scale(3.4); opacity: 0; } }
.me-acc { fill: var(--me); fill-opacity: .1; stroke: var(--me); stroke-opacity: .3; stroke-width: 1; }

/* The 500 / 400 / 200 / 100 m rings around me; a ring turns solid once the line is inside it */
.alert-ring { fill: none; stroke: var(--c); stroke-width: 2; stroke-dasharray: 2 8; stroke-linecap: round; stroke-opacity: .7; transition: stroke-opacity .3s, stroke-width .3s; }
.alert-ring.on { fill: var(--c); fill-opacity: .06; stroke-dasharray: none; stroke-opacity: .95; stroke-width: 2.5; }
.ar-500 { --c: var(--b500); }
.ar-400 { --c: var(--b400); }
.ar-200 { --c: var(--b200); }
.ar-100 { --c: var(--b100); }
.rl {
  display: inline-block; transform: translate(-50%, -50%); padding: 2px 7px; border-radius: 999px; white-space: nowrap;
  font-family: var(--font); font-size: 10.5px; font-weight: 800; color: var(--on-band); background: var(--c);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .22); opacity: .85; transition: opacity .3s, transform .3s;
}
[dir="rtl"] .rl { font-family: var(--font-rtl); }
.mk-wrap.on .rl { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
.z-mid .rl { display: none; }
.z-far .alert-ring { display: none; }

.drv-mk { position: relative; width: 52px; height: 52px; display: grid; place-items: center; cursor: pointer; }
.drv-mk .pulse { position: absolute; inset: 5px; border-radius: 50%; background: var(--yellow); opacity: 0; }
.drv-mk.st-live .pulse, .drv-mk.st-stale .pulse { animation: drv-pulse 1.8s var(--ease-out) infinite; }
@keyframes drv-pulse { from { transform: scale(.75); opacity: .65; } to { transform: scale(2); opacity: 0; } }
.drv-mk .body {
  position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  color: #17238f; background: linear-gradient(140deg, #ffd24a, #ff9f0a);
  box-shadow: 0 0 0 3px #fff, 0 8px 18px -4px rgba(0, 0, 0, .45);
}
.drv-mk .body .i { width: 25px; height: 25px; }
.drv-mk .head { position: absolute; inset: -9px; z-index: 2; pointer-events: none; }
.drv-mk .head i { position: absolute; top: 0; left: 50%; margin-left: -7px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 10px solid #17238f; filter: drop-shadow(0 0 1.5px #fff); }
.drv-mk .tag {
  position: absolute; z-index: 3; top: 100%; left: 50%; transform: translate(-50%, 1px);
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  font-family: var(--font); font-size: 11.5px; font-weight: 800; color: #fff; background: #0b1437; box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
}
[dir="rtl"] .drv-mk .tag { font-family: var(--font-rtl); }
.sc-mk { position: relative; display: flex; flex-direction: column; align-items: center; width: 40px; }
.sc-mk .pin { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #5470ff, #17238f); box-shadow: 0 0 0 3px #fff, 0 8px 18px -6px rgba(23, 35, 143, .8); }
.sc-mk .pin .i { width: 23px; height: 23px; }
.sc-mk .lbl {
  margin-top: 7px; max-width: 170px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 11.5px; font-weight: 800; color: var(--ink); background: var(--surface); box-shadow: var(--shadow);
}
.rt-casing { fill: none; stroke: #fff; stroke-width: 10; stroke-opacity: .95; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .rt-casing { stroke: #050919; }
.rt-line { fill: none; stroke: #2f55ff; stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; }
.rt-line.to-school { stroke: #17238f; }
:root[data-theme="dark"] .rt-line { stroke: #7c93ff; }
:root[data-theme="dark"] .rt-line.to-school { stroke: #a78bfa; }
.rt-line.dashed { stroke-dasharray: 1 12; stroke-width: 6.5; }

/* ───────────── Wider screens ───────────── */
@media (min-width: 900px) {
  .topbar { padding: calc(var(--safe-t) + 16px) 20px 12px; }
  .me-chip { flex: none; width: 420px; }
  .topbar > .lang-dd { margin-inline-start: auto; }
  .sheet {
    top: calc(var(--safe-t) + 96px); bottom: auto; left: 20px; right: auto; width: 420px;
    max-height: calc(100% - var(--safe-t) - 116px); padding: 18px; border-radius: 26px;
    box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line);
  }
  [dir="rtl"] .sheet { left: auto; right: 20px; }
  .sheet-handle { display: none; }
  .fabs { bottom: 24px; }
  .app .leaflet-top { top: calc(var(--safe-t) + 16px); }
  .app .leaflet-right .leaflet-control-attribution { margin-right: 84px !important; }
  .perm { bottom: 24px; }
  .banner { top: 16px; }
  .toast { top: 24px; }
}
@media (max-width: 400px) {
  .topbar { gap: 8px; }
  .topbar .lang-btn { padding: 0 11px; gap: 6px; }
  .topbar .lang-chev { display: none; }
  .me-chip { gap: 9px; padding-inline-end: 12px; }
  .auth-card { padding: 18px 16px 22px; border-radius: 26px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .brand-txt small { display: none; }
  .ring { width: 96px; height: 96px; }
  .ring-c strong { font-size: 24px; }
  .dist { gap: 12px; padding: 12px; }
  .step { font-size: 11.5px; }
}

/* ───────────── Phones: compact top bar, map buttons and card, so the map keeps most of the screen ───────────── */
@media (max-width: 899px) {
  .topbar { gap: 8px; padding: calc(var(--safe-t) + 8px) calc(var(--safe-r) + 10px) 8px calc(var(--safe-l) + 10px); }
  .me-chip { height: 52px; gap: 10px; padding: 0 12px 0 5px; border-radius: 18px; }
  [dir="rtl"] .me-chip { padding: 0 5px 0 12px; }
  .me-av { width: 42px; height: 42px; }
  .me-av img, .me-av .initials { width: 34px; height: 34px; font-size: 13px; }
  .me-dot { width: 11px; height: 11px; bottom: 2px; inset-inline-end: 2px; }
  .me-txt small { font-size: 10.5px; letter-spacing: .04em; }
  [dir="rtl"] .me-txt small { font-size: 11px; }
  .me-txt strong { font-size: 14.5px; }
  .icon-btn.lg { width: 52px; height: 52px; border-radius: 17px; }
  .icon-btn.lg .i { width: 21px; height: 21px; }
  .topbar .lang-btn { height: 52px; padding: 0 11px; border-radius: 17px; font-size: 14px; }
  .app .leaflet-top { top: calc(var(--safe-t) + 66px); }
  .net-pill { top: calc(var(--safe-t) + 68px); }

  .fabs { gap: 8px; inset-inline-end: calc(var(--safe-r) + 10px); bottom: calc(var(--sheet-h) + 10px); }
  .fab { width: 44px; height: 44px; border-radius: 15px; }
  .fab .i { width: 20px; height: 20px; }

  .sheet {
    max-height: calc(100% - var(--safe-t) - 72px);
    padding: 0 calc(var(--safe-r) + 14px) calc(var(--safe-b) + 12px) calc(var(--safe-l) + 14px);
    border-radius: 22px 22px 0 0;
  }
  .sheet-handle { height: 20px; }
  .drv-row { gap: 11px; }
  .drv-av { width: 50px; height: 50px; }
  .drv-av img, .drv-av .initials { width: 44px; height: 44px; font-size: 15px; }
  .drv-type { transform: scale(.85); }
  .drv-txt strong { font-size: 16px; }
  .drv-meta { gap: 6px; margin-top: 1px; font-size: 12px; }
  .call { width: 44px; height: 44px; }
  .call .i { width: 20px; height: 20px; }

  .dist { gap: 12px; margin-top: 10px; padding: 10px 12px; border-radius: 18px; }
  .ring { width: 84px; height: 84px; }
  .ring-c strong { font-size: 23px; }
  .ring-c small { font-size: 11px; margin-top: 2px; }
  .dist-txt { gap: 4px; }
  .dist-txt > strong { font-size: 15.5px; }
  .dist-txt > strong::before { width: 8px; height: 8px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bc) 20%, transparent); }
  .place, .eta { font-size: 12.5px; }

  .stats { margin-top: 8px; }
  .stat { padding: 8px 10px; border-radius: 14px; gap: 1px; }
  .stat small { font-size: 11px; }
  .stat strong { font-size: 16.5px; }
  .stat em { font-size: 11px; }

  .trip { margin-top: 8px; padding: 9px 12px 11px; border-radius: 14px; }
  .trip-top { margin-bottom: 9px; font-size: 11.5px; }
  .trip-top b { font-size: 13px; }
  .trip-bar { height: 6px; }
  .trip-bus, .trip-end { width: 24px; height: 24px; margin-top: -12px; }
  .trip-bus { margin-inline-start: -12px; }

  .school-row { gap: 10px; margin-top: 8px; padding: 8px 12px; border-radius: 14px; }
  .sc-ico { width: 34px; height: 34px; border-radius: 11px; }
  .sc-txt small { font-size: 11px; }
  .sc-txt strong { font-size: 14px; }
  .idle { gap: 12px; margin-top: 10px; padding: 11px 12px; border-radius: 16px; }
  .idle-ico { width: 40px; height: 40px; border-radius: 13px; }
  .idle strong { font-size: 14px; }
  .idle small { font-size: 12px; }
  .tip { gap: 10px; margin-top: 8px; padding: 9px 12px; border-radius: 14px; }
  .tip-ico { width: 32px; height: 32px; border-radius: 10px; }
  .tip strong { font-size: 13px; }
  .tip small { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .note { margin-top: 8px; padding: 8px 12px; font-size: 12px; }
}
/* Collapsed card on phones: the dial shrinks too (after the phone sizes above, so it wins) */
@media (max-width: 899px) {
  .sheet.collapsed .dist { padding: 8px 10px; }
  .sheet.collapsed .ring { width: 64px; height: 64px; }
  .sheet.collapsed .ring-c strong { font-size: 18px; }
  .sheet.collapsed .ring-c small { font-size: 10px; }
}
/* Small phones (iPhone SE / mini, 360 px Androids) */
@media (max-width: 380px) {
  .me-chip { gap: 8px; }
  .me-txt strong { font-size: 13.5px; }
  .icon-btn.lg, .topbar .lang-btn { height: 48px; }
  .icon-btn.lg { width: 48px; }
  .sheet { padding-left: calc(var(--safe-l) + 12px); padding-right: calc(var(--safe-r) + 12px); }
  .ring { width: 74px; height: 74px; }
  .ring-c strong { font-size: 20px; }
  .dist-txt > strong { font-size: 14.5px; }
  .stats { gap: 5px; }
  .stat { padding: 7px 8px; }
  .stat small { font-size: 10.5px; }
  .stat strong { font-size: 15px; }
  .drv-status .ago { display: none; }
}
/* Short screens (landscape phones, small Androids): tighter still */
@media (max-width: 899px) and (max-height: 640px) {
  .dist { padding: 8px 10px; }
  .ring { width: 66px; height: 66px; }
  .ring-c strong { font-size: 18px; }
  .ring-c small { font-size: 10px; }
  .trip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
