/* Chesed of Linden Dispatch
   Friendly, calm and current: Chesed brand green on a soft light-grey workspace, white rounded surfaces,
   gentle depth, people shown as avatars with their unit badge, generous spacing for a dispatcher on the phone. */
@font-face { font-family: "Fira Sans"; src: url(fonts/FiraSans-Regular.woff) format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url(fonts/FiraSans-Medium.woff) format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url(fonts/FiraSans-SemiBold.woff) format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url(fonts/FiraSans-ExtraBold.woff) format("woff"); font-weight: 800; font-display: swap; }

:root {
  --green: #347b60; --green-dark: #22523d; --green-bright: #43b883;
  --green-50: #eef6f2; --green-100: #dbece3;
  --bg: #f4f5f4; --surface: #ffffff; --ink: #231f20; --ink-2: #5f6763; --ink-3: #8a918d;
  --line: #e7e9e8; --line-2: #d6dad8;
  --high: #d4363b; --high-50: #fdecec;
  --reg: #e39b06; --reg-ink: #93600a; --reg-50: #fff5df;
  --btw: #7a8691; --btw-50: #eff1f3;
  --live: #4466e0; --live-50: #ecf0fd;
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px;
  --shadow: 0 1px 2px rgba(35, 31, 32, .05), 0 4px 14px rgba(35, 31, 32, .05);
  --shadow-lg: 0 20px 50px rgba(20, 45, 35, .18);
  font-size: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Fira Sans", "Segoe UI", system-ui, sans-serif; line-height: 1.5; background: var(--bg); color: var(--ink);
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 3px solid #9fd8bd; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.shell.bare { grid-template-columns: 1fr; }
.shell > * { min-width: 0; }
.shell.bare main { padding: 0; max-width: none; }
.side { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px; gap: 18px; }
.side-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); padding: 4px 8px 16px; border-bottom: 1px solid var(--line); }
.side-brand img { height: 52px; width: auto; }
.side-brand b { display: block; font-size: 1rem; font-weight: 600; line-height: 1.2; }
.side-brand small { color: var(--green); font-weight: 600; font-size: .8125rem; }
nav { display: grid; gap: 2px; flex: 1; align-content: start; }
nav .group { font-size: .75rem; color: var(--ink-3); font-weight: 600; padding: 16px 12px 6px; }
nav a { display: flex; align-items: center; gap: 12px; color: var(--ink-2); text-decoration: none; padding: 10px 12px; border-radius: var(--r-sm); font-weight: 500; font-size: .9375rem; }
nav a:hover { background: var(--bg); color: var(--ink); }
nav a.active { background: var(--green-50); color: var(--green-dark); font-weight: 600; }
nav a.active svg { color: var(--green); }
nav .count { margin-left: auto; background: var(--high); color: #fff; border-radius: 99px; min-width: 22px; padding: 0 7px; font-size: .75rem; font-weight: 700; text-align: center; line-height: 22px; }
nav a.cta { background: var(--green); color: #fff; font-weight: 600; justify-content: center; margin-bottom: 10px; box-shadow: 0 4px 12px rgba(52,123,96,.25); }
nav a.cta:hover { background: var(--green-dark); color: #fff; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-sm); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover, .menu[open] summary { background: var(--bg); }
.menu summary .meta { display: grid; line-height: 1.25; min-width: 0; }
.menu summary b { font-weight: 600; font-size: .9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu summary small { color: var(--ink-2); font-size: .8125rem; }
.menu-list { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 6px; box-shadow: var(--shadow-lg); display: grid; z-index: 6; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; padding: 10px 12px; border-radius: var(--r-sm);
  border: 0; background: none; font: inherit; font-weight: 500; font-size: .9375rem; cursor: pointer; text-align: left; min-height: 0; justify-content: flex-start; }
.menu-list a:hover, .menu-list button:hover { background: var(--bg); }
main { padding: 36px 44px 72px; max-width: 1240px; width: 100%; }

/* ---------- type ---------- */
h1 { font-size: 1.875rem; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; margin: 0; }
h2 { font-size: 1.125rem; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 1rem; font-weight: 600; margin: 18px 0 8px; }
p { margin: 0 0 12px; max-width: 70ch; }
.lede { color: var(--ink-2); margin: 6px 0 0; font-size: 1.0625rem; }
.muted { color: var(--ink-2); } .small { font-size: .875rem; } .center { text-align: center; } .pad { padding: 56px; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.hello { color: var(--green); font-weight: 600; margin-bottom: 4px; }

/* ---------- layout ---------- */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 20px; }
.grid2 > *, .grid3 > *, .compose > *, .stats > * { min-width: 0; }
input, select, textarea { max-width: 100%; }
.panel { background: var(--surface); border-radius: var(--r-lg); padding: 24px 26px; margin-bottom: 18px; box-shadow: var(--shadow); }
.panel > h2:first-child { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }

/* ---------- controls ---------- */
label { display: block; font-size: .875rem; font-weight: 600; color: var(--ink); }
label .hint, .hint { font-weight: 400; color: var(--ink-2); }
input, select, textarea { width: 100%; margin-top: 7px; padding: 11px 14px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); font: inherit; font-size: 1rem;
  background: #fff; color: var(--ink); min-height: 48px; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:hover, select:hover, textarea:hover { border-color: #b9c1bd; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(67, 184, 131, .18); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; margin: 0 10px 0 0; accent-color: var(--green); flex: none; }
textarea { min-height: 84px; resize: vertical; }
.check { display: flex; align-items: center; font-weight: 500; margin: 10px 0; cursor: pointer; }
fieldset { border: 0; padding: 0; margin: 0 0 24px; }
legend { font-size: 1rem; font-weight: 600; padding: 0; margin-bottom: 12px; }
.seg { display: inline-flex; background: var(--bg); border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.seg label { margin: 0; cursor: pointer; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 9px; font-weight: 500; color: var(--ink-2); }
.tdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.tdot.high { background: var(--high); } .tdot.regular { background: var(--reg); } .tdot.btw { background: var(--btw); }
.seg input:checked + span { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.seg input:focus-visible + span { outline: 3px solid #9fd8bd; }
.choice { display: grid; gap: 10px; margin-top: 8px; }
.choice label { display: flex; align-items: flex-start; gap: 0; padding: 14px 16px; border: 1.5px solid var(--line-2); border-radius: var(--r-md); font-weight: 500; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; }
.choice label:hover { border-color: #b9c1bd; }
.choice label:has(input:checked) { border-color: var(--green); background: var(--green-50); }
.choice small { display: block; font-weight: 400; color: var(--ink-2); margin-top: 2px; }

button, .btn { font: inherit; font-weight: 600; cursor: pointer; border-radius: 12px; border: 1.5px solid var(--line-2); background: #fff; padding: 10px 18px; color: var(--ink); min-height: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: background .15s, border-color .15s, transform .05s; }
button:hover, .btn:hover { border-color: #b9c1bd; background: #fafbfa; }
button:active, .btn:active { transform: translateY(1px); }
button.primary, .btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
button.primary:hover, .btn.primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
button.big, .btn.big { font-size: 1.0625rem; padding: 12px 24px; min-height: 54px; border-radius: 14px; }
button.danger { color: var(--high); border-color: #f1c4c5; }
button.danger:hover { background: var(--high-50); }
button.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
button.ghost:hover { background: var(--line); }
button.small { padding: 6px 14px; font-size: .875rem; min-height: 38px; border-radius: 10px; }
button.link { background: none; border: none; padding: 0; min-height: 0; color: var(--green-dark); text-decoration: underline; font-weight: 500; }
button:disabled { opacity: .55; cursor: progress; }
a { color: var(--green-dark); }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: .9375rem; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th { font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
tr.click { cursor: pointer; transition: background .12s; } tr.click:hover td { background: #f8faf9; }

/* ---------- chips ---------- */
.tier { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 600; white-space: nowrap; padding: 3px 10px 3px 8px; border-radius: 99px; }
.tier::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.tier.high { color: var(--high); background: var(--high-50); } .tier.high::before { background: var(--high); }
.tier.regular { color: var(--reg-ink); background: var(--reg-50); } .tier.regular::before { background: var(--reg); }
.tier.btw { color: var(--btw); background: var(--btw-50); } .tier.btw::before { background: var(--btw); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; white-space: nowrap; background: var(--btw-50); color: var(--ink-2); }
.status.open { background: var(--green-50); color: var(--green-dark); }
.status.assigned, .status.en_route, .status.picked_up, .status.dropped_off, .status.return_trip { background: var(--live-50); color: var(--live); }
.status.en_route::before, .status.picked_up::before, .status.return_trip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.status.completed { background: var(--green-50); color: var(--green); }
.status.cancelled { background: transparent; color: var(--ink-3); text-decoration: line-through; padding-left: 0; }
.unit { display: inline-flex; align-items: center; background: var(--green); color: #fff; font-weight: 700; font-size: .75rem; letter-spacing: .02em; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.person { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .875rem; color: var(--green-dark); background: var(--green-100); flex: none; }
.avatar.sm { width: 32px; height: 32px; font-size: .75rem; }
.person .nm { display: grid; line-height: 1.3; min-width: 0; }
.person .nm b { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.person .nm small { color: var(--ink-2); font-size: .8125rem; }

/* ---------- board ---------- */
.overview { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 99px; padding: 8px 16px 8px 12px; font-weight: 500; box-shadow: var(--shadow); color: var(--ink-2); }
.pill b { font-weight: 700; color: var(--ink); }
.pill .dot { width: 10px; height: 10px; border-radius: 50%; }
.lane { margin-top: 30px; }
.lane-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.lane-head h2 { margin: 0; font-size: 1.0625rem; }
.lane-head .n { background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .8125rem; padding: 1px 9px; border-radius: 99px; box-shadow: var(--shadow); }
.cards { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.trip { display: grid; grid-template-columns: 92px minmax(0, 1fr) 250px 22px; align-items: center; gap: 20px; padding: 14px 20px 14px 14px; background: var(--surface);
  border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow); cursor: pointer; text-align: left; width: 100%; font-weight: 400; min-height: 0;
  transition: box-shadow .15s, transform .15s; }
.trip:hover { box-shadow: 0 2px 4px rgba(35,31,32,.06), 0 10px 28px rgba(35,31,32,.09); background: var(--surface); transform: translateY(-1px); border: 0; }
.trip .time { border-radius: 14px; padding: 10px 6px; text-align: center; background: var(--bg); }
.trip.high .time { background: var(--high-50); } .trip.regular .time { background: var(--reg-50); } .trip.btw .time { background: var(--btw-50); }
.trip .time b { display: block; font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.trip .time small { display: block; font-size: .75rem; color: var(--ink-2); font-weight: 500; margin-top: 2px; }
.trip .route { font-size: 1.125rem; font-weight: 600; line-height: 1.3; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trip .route svg { color: var(--ink-3); width: 18px; height: 18px; }
.trip .facts { font-size: .875rem; color: var(--ink-2); margin-top: 6px; display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; }
.trip .facts > span:not(.tier) { display: inline-flex; align-items: center; gap: 5px; }
.trip .facts svg { width: 16px; height: 16px; color: var(--ink-3); }
.trip .state { display: flex; align-items: center; gap: 10px; font-size: .875rem; min-width: 0; }
.trip .state .stack { display: grid; gap: 2px; min-width: 0; }
.trip .state .big { font-weight: 600; color: var(--ink); font-size: .9375rem; display: flex; align-items: center; gap: 8px; }
.trip .chev { color: var(--ink-3); }
.trip.attention { box-shadow: 0 0 0 2px #f6c3c5, var(--shadow); }
.trip.attention .state .big { color: var(--high); }
.trip.closed { opacity: .7; }
.waiting-dots { display: inline-flex; gap: 3px; }
.waiting-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--reg); animation: pulse 1.4s infinite; }
.waiting-dots i:nth-child(2) { animation-delay: .2s; } .waiting-dots i:nth-child(3) { animation-delay: .4s; }
.empty { background: var(--surface); border-radius: var(--r-lg); padding: 28px; text-align: center; color: var(--ink-2); box-shadow: var(--shadow); }
.empty svg { width: 34px; height: 34px; color: var(--green-bright); margin-bottom: 6px; }
.empty b { display: block; color: var(--ink); font-size: 1.0625rem; margin-bottom: 2px; }

/* ---------- drawer, modal, toast ---------- */
.drawer { position: fixed; inset: 0; background: rgba(20, 35, 28, .28); z-index: 10; display: flex; justify-content: flex-end; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.drawer-inner { width: min(620px, 100%); height: 100%; overflow: auto; background: var(--bg); padding: 28px; border-radius: 24px 0 0 24px; box-shadow: var(--shadow-lg); animation: slide .22s cubic-bezier(.2,.8,.2,1); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.modal { position: fixed; inset: 0; background: rgba(20, 35, 28, .4); z-index: 20; display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 56px 16px; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.modal-inner { width: min(760px, 100%); background: var(--surface); border-radius: 24px; padding: 32px; box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 13px 20px; border-radius: 14px; z-index: 30;
  max-width: min(560px, 92vw); font-weight: 500; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; animation: rise .2s ease-out; }
@keyframes rise { from { transform: translate(-50%, 10px); opacity: 0; } }
.toast.ok::before { content: ""; width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: var(--green-bright) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' stroke='white' stroke-width='2.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.toast.bad { background: var(--high); }
.notice { background: var(--reg-50); border-radius: var(--r-md); padding: 14px 16px; margin: 12px 0; max-width: 72ch; color: #5c4209; }
.notice.ok { background: var(--green-50); color: var(--green-dark); }
.notice.bad { background: var(--high-50); color: #8b1f23; }

.callhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.callhead .route { font-size: 1.625rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 10px 0 4px; }
.iconbtn { width: 44px; height: 44px; padding: 0; border-radius: 50%; min-height: 0; flex: none; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 12px 16px; margin: 0; }
.kv dt { color: var(--ink-2); font-size: .9375rem; } .kv dd { margin: 0; font-weight: 500; }
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; list-style: none; padding: 0; margin: 0 0 20px; gap: 6px; }
.steps li { font-size: .8125rem; color: var(--ink-3); padding-top: 12px; position: relative; font-weight: 500; }
.steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 99px; background: var(--line-2); }
.steps li.done { color: var(--ink-2); } .steps li.done::before { background: var(--green-bright); }
.steps li.now { color: var(--live); font-weight: 600; } .steps li.now::before { background: var(--live); }
.resp { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); gap: 12px; }
.resp:last-of-type { border-bottom: 0; }
.log .item { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.log .item:last-child { border-bottom: 0; }
.log .meta { font-size: .8125rem; color: var(--ink-2); margin-bottom: 2px; }

/* new call */
.compose { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.preview { position: sticky; top: 28px; }
.phone { background: #1d2420; border-radius: 30px; padding: 18px 16px 26px; color: #fff; box-shadow: var(--shadow-lg); }
.phone .notch { display: flex; justify-content: center; margin-bottom: 16px; } .phone .notch i { width: 76px; height: 6px; border-radius: 99px; background: #3a4440; }
.phone .from { font-size: .75rem; color: #9fb5aa; margin: 0 0 8px 6px; }
.phone .bubble { background: #2f3a35; border-radius: 18px 18px 18px 6px; padding: 12px 14px; font-size: .9375rem; line-height: 1.45; }
.found { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r-md); background: var(--green-50); margin-top: 14px; animation: pop .18s ease-out; }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green-50); color: var(--green-dark); font-weight: 700; font-size: .875rem; margin-right: 10px; }

/* codes, stats, sign-in */
.codebox { font-size: 2.5rem; font-weight: 800; letter-spacing: .14em; text-align: center; padding: 24px; background: var(--green); color: #fff; border-radius: var(--r-lg); margin: 18px 0; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 22px 0 10px; }
.stat { background: var(--surface); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow); }
.stat .n { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; } .stat .l { font-size: .875rem; color: var(--ink-2); }
.signin { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.signin .sign { background: var(--green); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.signin .sign::after { content: ""; position: absolute; right: -200px; top: 50%; width: 640px; height: 640px; transform: translateY(-50%); background: url(brand/globe-lines.svg) center / contain no-repeat; opacity: .12; pointer-events: none; }
.signin .sign > * { position: relative; z-index: 1; }
.signin .crest { display: flex; align-items: center; gap: 24px; }
.signin .crest img { height: 120px; width: auto; }
.signin .crest b { display: block; font-size: 1.875rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.signin .crest span { display: block; margin-top: 6px; color: #d6e6de; font-size: 1.0625rem; }
.signin .sign .tag { font-size: 1.625rem; font-weight: 500; max-width: 20ch; line-height: 1.3; color: #fff; margin: 0; }
.signin .sign .foot { color: #d6e6de; margin: 0; max-width: 40ch; }
.signin .form { display: grid; place-items: center; padding: 48px; }
.signin .card { width: min(420px, 100%); }
.tabs { display: inline-flex; background: #e9ecea; border-radius: 12px; padding: 4px; gap: 4px; margin: 18px 0 24px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 8px 14px; color: var(--ink-2); font-weight: 500; min-height: 0; border-radius: 9px; font-size: .9375rem; }
.tabs button:hover { background: rgba(255,255,255,.6); }
.tabs button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---------- small screens ---------- */
@media (max-width: 1100px) { .trip { grid-template-columns: 84px minmax(0, 1fr) 210px 18px; } main { padding: 32px 28px 64px; } }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; height: auto; z-index: 5; flex-direction: row; align-items: center; padding: 10px 14px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
  .side-brand { border: 0; padding: 0; } .side-brand img { height: 38px; } .side-brand small { display: none; }
  nav { order: 3; flex-basis: 100%; display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px; }
  nav .group { display: none; } nav a { white-space: nowrap; padding: 8px 12px; } nav a.cta { margin: 0; box-shadow: none; }
  .menu { margin-left: auto; } .menu summary .meta { display: none; } .menu-list { left: auto; right: 0; bottom: auto; top: calc(100% + 8px); min-width: 220px; }
  main { padding: 24px 18px 56px; }
  .compose { grid-template-columns: 1fr; } .preview { position: static; }
  .signin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .signin .sign { padding: 28px 24px; gap: 0; } .signin .crest img { height: 72px; } .signin .crest b { font-size: 1.5rem; }
  .signin .sign .tag, .signin .sign .foot { display: none; } .signin .form { padding: 28px 20px; place-items: start center; }
  .tabs { display: flex; width: 100%; } .tabs button { flex: 1; padding: 8px 6px; font-size: .875rem; }
  .trip { grid-template-columns: 76px minmax(0, 1fr); } .trip .state { grid-column: 2; } .trip .chev { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid2, .grid3 { grid-template-columns: 1fr; } .grid3 > [style*="grid-column"] { grid-column: 1 / -1 !important; }
  .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 10px; }
  .drawer-inner { border-radius: 0; padding: 20px; } .panel { padding: 20px; }
  .pagehead .big { width: 100%; } h1 { font-size: 1.625rem; }
  .trip { grid-template-columns: 1fr; gap: 10px; } .trip .time { display: flex; gap: 8px; align-items: baseline; padding: 6px 12px; width: max-content; }
  .trip .state { grid-column: 1; }
}

/* ---------- installed app + device safe areas (iPhone notch, Android gesture bar) ---------- */
body { padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
.side { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
main { padding-bottom: max(72px, calc(env(safe-area-inset-bottom) + 48px)); }
.toast { bottom: max(28px, calc(env(safe-area-inset-bottom) + 12px)); }
.offline { position: fixed; top: env(safe-area-inset-top); left: 0; right: 0; z-index: 40; background: var(--ink); color: #fff; text-align: center; padding: 10px 16px; font-weight: 500; font-size: .9375rem; }
@media (display-mode: standalone) { body { -webkit-user-select: none; user-select: none; } input, textarea, td, dd, .bubble, .codebox { -webkit-user-select: text; user-select: text; } }
@media (hover: none) { .trip:hover { transform: none; } }
button, a, .trip, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.install-hint { display: flex; gap: 14px; align-items: flex-start; }
.install-hint img { width: 52px; height: 52px; border-radius: 12px; flex: none; }
