/* English and fallback Thaana fonts, served from our own site (SIL Open Font License; see /vendor/fonts). */
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 400; font-display: swap; src: url('/vendor/fonts/schibsted-grotesk-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 400; font-display: swap; src: url('/vendor/fonts/schibsted-grotesk-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 500; font-display: swap; src: url('/vendor/fonts/schibsted-grotesk-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 500; font-display: swap; src: url('/vendor/fonts/schibsted-grotesk-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 600; font-display: swap; src: url('/vendor/fonts/schibsted-grotesk-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 600; font-display: swap; src: url('/vendor/fonts/schibsted-grotesk-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 700; font-display: swap; src: url('/vendor/fonts/schibsted-grotesk-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 700; font-display: swap; src: url('/vendor/fonts/schibsted-grotesk-latin-ext-700-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 800; font-display: swap; src: url('/vendor/fonts/schibsted-grotesk-latin-800-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Schibsted Grotesk'; font-weight: 800; font-display: swap; src: url('/vendor/fonts/schibsted-grotesk-latin-ext-800-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Noto Sans Thaana'; font-weight: 400; font-display: swap; src: url('/vendor/fonts/noto-sans-thaana-thaana-400-normal.woff2') format('woff2'); unicode-range: U+060C, U+061B-061C, U+061F, U+0660-066C, U+0780-07B1, U+FDF2, U+FDFD; }
@font-face { font-family: 'Noto Sans Thaana'; font-weight: 600; font-display: swap; src: url('/vendor/fonts/noto-sans-thaana-thaana-600-normal.woff2') format('woff2'); unicode-range: U+060C, U+061B-061C, U+061F, U+0660-066C, U+0780-07B1, U+FDF2, U+FDFD; }
/* NALO — light lagoon theme */
/* Dhivehi fonts. Text: MV Funa by Hassan Hameed (the original files, unchanged). Headings: Sangu Suruhee from
   Thaana Type Foundry (SIL Open Font License). See /fonts/LICENSE.txt. Thaana letters only, so English words and
   numbers keep Schibsted Grotesk. */
@font-face { font-family: 'NALO Thaana'; src: local('MV Funa Light'), local('MVFuna-Light'), url('/fonts/mv-funa-light.ttf') format('truetype');
  font-weight: 100 349; font-display: swap; unicode-range: U+0780-07BF, U+060C, U+061B, U+061F, U+FDF2, U+200C-200F; }
@font-face { font-family: 'NALO Thaana'; src: local('MV Funa Regular'), local('MVFuna-Regular'), url('/fonts/mv-funa-regular.ttf') format('truetype');
  font-weight: 350 549; font-display: swap; unicode-range: U+0780-07BF, U+060C, U+061B, U+061F, U+FDF2, U+200C-200F; }
@font-face { font-family: 'NALO Thaana'; src: local('MV Funa Bold'), local('MVFuna-Bold'), url('/fonts/mv-funa-bold.ttf') format('truetype');
  font-weight: 550 749; font-display: swap; unicode-range: U+0780-07BF, U+060C, U+061B, U+061F, U+FDF2, U+200C-200F; }
@font-face { font-family: 'NALO Thaana'; src: local('MV Funa Black'), local('MVFuna-Black'), url('/fonts/mv-funa-black.ttf') format('truetype');
  font-weight: 750 900; font-display: swap; unicode-range: U+0780-07BF, U+060C, U+061B, U+061F, U+FDF2, U+200C-200F; }
@font-face { font-family: 'NALO Thaana Heading'; src: url('/fonts/sangu-suruhee.woff2') format('woff2');
  font-weight: 400 900; font-display: swap; unicode-range: U+0780-07BF, U+060C, U+061B, U+061F; }
:root {
  --paper: #F6FAFA;
  --shallows: #E1F2F1;
  --shallows-2: #EEF7F6;
  --lagoon: #13838A;
  --lagoon-deep: #0D646A;
  --ink: #1C2E36;
  --ink-2: #4E6470;
  --ink-3: #7F969F;
  --line: #DCE7E8;
  --card: #FFFFFF;
  --dhoni: #F2B544;
  --dhoni-bg: #FDF2DA;
  --dhoni-ink: #7A5200;
  --ok: #1E9C6A;
  --ok-bg: #E2F5EC;
  --warn: #D9534F;
  --warn-bg: #FBE7E6;
  --sky: #3D7FD6;
  --sky-bg: #E6EFFB;
  --grey-bg: #EDF2F3;
  --radius: 20px;
  --shadow: 0 0 0 1.5px var(--line);
  --lift: 0 12px 30px -10px rgba(28,46,54,.22);
  color-scheme: light;
  font-family: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--paper); font-size: 15.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: var(--lagoon); }
h1 { font-size: 1.75rem; line-height: 1.15; margin: 0; letter-spacing: -0.02em; font-weight: 800; }
h2 { font-size: 1.2rem; margin: .2rem 0 .6rem; letter-spacing: -0.01em; font-weight: 750; }
h3 { font-size: 1rem; margin: .1rem 0 .7rem; font-weight: 700; }
h1 small, h2 small { font-weight: 500; font-size: .7em; letter-spacing: 0; }
code, .mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.muted { color: var(--ink-3); }
.small { font-size: .86rem; }
.big { font-size: 1.3rem; font-weight: 700; }
.center { text-align: center; }
.r { text-align: right; }
.danger { color: var(--warn); }
.dv, [lang=dv] { font-family: 'NALO Thaana', 'Noto Sans Thaana', 'Schibsted Grotesk', system-ui, sans-serif; }
html[lang=dv] body, html[lang=dv] button, html[lang=dv] input, html[lang=dv] select, html[lang=dv] textarea { font-family: 'NALO Thaana', 'Noto Sans Thaana', 'Schibsted Grotesk', system-ui, sans-serif; }
html[lang=dv] :is(h1, h2, h3, .big, .lb-big, .tt-title) { font-family: 'NALO Thaana Heading', 'NALO Thaana', 'Noto Sans Thaana', 'Schibsted Grotesk', sans-serif; letter-spacing: 0; }
html[lang=dv] body { line-height: 1.7; }
/* Numbers, codes, phone numbers and maps stay left-to-right inside Dhivehi text */
html[dir=rtl] :is(.mono, .tcode, .code, .code-chip, input[type=tel], input[type=number], input[type=email], .smap, .mnh-map, .slippy) { direction: ltr; unicode-bidi: isolate; }
html[dir=rtl] table.list.edit select { min-width: 130px; }
html[dir=rtl] svg { direction: ltr; }   /* drawings and maps keep their layout */
html[dir=rtl] svg.i:is(.i-arrowLeft, .i-chevron) { transform: scaleX(-1); }   /* back and forward arrows point the reading way */
html[dir=rtl] :is(.mono, .tcode, .code-chip) { display: inline-block; }
/* A name or address in English inside a Dhivehi line keeps its own direction ("Sanoo A.", not ".Sanoo A") */
html[dir=rtl] :is(b, strong, span, small, em, a, time, label > span) { unicode-bidi: plaintext; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 18px; height: 18px; }
svg.i.lg { width: 26px; height: 26px; }
:focus-visible { outline: 2.5px solid var(--lagoon); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.boot, .loading { padding: 3rem 1rem; text-align: center; color: var(--ink-3); display: flex; gap: .6rem; justify-content: center; align-items: center; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--lagoon); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── buttons & fields ── */
button, .button {
  appearance: none; border: 0; background: var(--lagoon); color: #fff; font: 600 15.5px/1 inherit; font-family: inherit;
  padding: 0 18px; height: 46px; border-radius: 14px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
}
button:hover, .button:hover { filter: brightness(1.05); }
button:disabled { opacity: .5; cursor: default; }
button.ghost, .button.ghost { background: var(--card); color: var(--lagoon-deep); box-shadow: inset 0 0 0 1.5px var(--line); }
button.soft, .button.soft { background: var(--shallows); color: var(--lagoon-deep); }
button.small, .button.small { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
button.success { background: var(--ok); }
button.danger { background: var(--warn); }
button.ghost.danger { background: var(--card); color: var(--warn); box-shadow: inset 0 0 0 1.5px #F1C9C7; }
button.link { background: none; color: var(--lagoon); padding: 0 .2rem; height: auto; font-weight: 600; }
button.link.danger { color: var(--warn); }
button.block, .button.block { width: 100%; }
button.big, .button.big { height: 56px; font-size: 17px; border-radius: 17px; }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: 14px;
  padding: .7rem .85rem; min-height: 48px; width: 100%; max-width: 100%;
}
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { width: 19px; height: 19px; min-height: 0; accent-color: var(--lagoon); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lagoon); box-shadow: 0 0 0 3px var(--shallows); }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .85rem; }
.field.wide { grid-column: 1 / -1; }
.field-label { font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.hint { color: var(--ink-3); font-size: .82rem; }
.check { display: flex; align-items: center; gap: .55rem; margin: .5rem 0 .85rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

/* ── app shell ── */
.shell { min-height: 100vh; }
.side { display: none; }
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 14px 16px 120px; }
.mtop { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--lagoon); color: #fff; display: grid; place-items: center; }
.brand-mark svg { width: 19px; height: 19px; }
.avatar { width: 38px; height: 38px; border-radius: 13px; background: var(--dhoni-bg); color: var(--dhoni-ink); display: inline-grid; place-items: center; font-weight: 800; flex: none; }
.avatar.t { background: var(--shallows); color: var(--lagoon-deep); }
.avatar-btn { background: none; padding: 0; height: auto; }

/* floating tab bar (mobile) */
.tabbar { position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30; height: 70px;
  background: rgba(255,255,255,.97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: 24px; display: flex; align-items: center; justify-content: space-around; padding: 0 6px;
  box-shadow: 0 0 0 1px rgba(28,46,54,.06), var(--lift); max-width: 520px; margin: 0 auto; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; color: var(--ink-3); font-size: 11.5px; font-weight: 600; padding: 7px 0 6px; border-radius: 16px; text-decoration: none; }
.tab.on { color: var(--lagoon-deep); background: var(--shallows); }
.tab.center { width: 58px; height: 58px; border-radius: 19px; background: var(--lagoon); color: #fff; justify-content: center; gap: 2px; margin-top: -26px;
  box-shadow: 0 10px 22px -6px rgba(19,131,138,.6), 0 0 0 5px var(--paper); font-size: 10.5px; }
.tab.center.on { background: var(--lagoon-deep); }

/* desktop sidebar */
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 236px 1fr; }
  .side { display: flex; flex-direction: column; gap: 4px; padding: 22px 14px; border-right: 1.5px solid var(--line); background: #FBFDFD; position: sticky; top: 0; height: 100vh; }
  .side .brand { padding: 0 10px 22px; }
  .side nav { display: flex; flex-direction: column; gap: 3px; }
  .side nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 13px; color: var(--ink-2); font-weight: 550; text-decoration: none; }
  .side nav a.on { background: var(--shallows); color: var(--lagoon-deep); font-weight: 650; }
  .side .new-btn { margin: 0 2px 14px; }
  .side .me { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); font-size: 14px; text-decoration: none; color: var(--ink); }
  .side .me small { display: block; color: var(--ink-3); }
  .mtop, .tabbar { display: none; }
  .page { padding: 26px 30px 48px; }
}

/* sheet (More menu) */
.sheet-bg { position: fixed; inset: 0; background: rgba(28,46,54,.35); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
div.sheet { background: var(--card); width: 100%; max-width: 520px; border-radius: 24px 24px 0 0; padding: 10px 16px calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 4px; }
div.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 2px auto 10px; }
div.sheet a, div.sheet button.item { display: flex; align-items: center; gap: 14px; padding: 14px 10px; border-radius: 14px; color: var(--ink); text-decoration: none; font-weight: 600; background: none; height: auto; font-size: 16px; justify-content: flex-start; }
div.sheet a:hover, div.sheet button.item:hover { background: var(--shallows-2); }

/* ── page structure ── */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin: .2rem 0 1rem; }
.page-head .eyebrow { display: block; color: var(--ink-3); font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.actions, .row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.page-head select, .actions select, .row select, .toolbar select { width: auto; }
.row.end { justify-content: flex-end; margin-top: .7rem; }
.row.between { justify-content: space-between; }
.row.center { justify-content: center; }
.stack { display: flex; flex-direction: column; gap: .8rem; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.cols.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .cols, .cols.three { grid-template-columns: 1fr; } }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card.warn { background: var(--dhoni-bg); box-shadow: none; }
.card.tint { background: var(--shallows); box-shadow: none; }
.center-card { max-width: 520px; margin: 3rem auto; text-align: center; }
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .9rem; align-items: center; }
.toolbar > select, .toolbar > input { flex: 0 1 220px; }
.toolbar > input[type=search] { flex: 1 1 200px; }
.seg { display: inline-flex; background: #E7EFF0; border-radius: 13px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { background: transparent; color: var(--ink-2); height: 36px; border-radius: 10px; font-weight: 600; font-size: 14px; padding: 0 14px; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(28,46,54,.12); }
.seg.pay-how { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.seg.pay-how button { height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg.wide { display: flex; margin-bottom: 1rem; }
.seg.wide button { flex: 1; }
.selbar { display: flex; gap: .5rem; align-items: center; background: var(--shallows); border-radius: 14px; padding: .55rem .8rem; margin-bottom: .9rem; flex-wrap: wrap; }
.selbar.inline { margin: 0; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--ink-3); }
.error-box { background: var(--warn-bg); color: var(--warn); padding: .75rem .95rem; border-radius: 14px; margin-bottom: .9rem; }
.notice { background: var(--sky-bg); color: var(--sky); padding: .65rem .85rem; border-radius: 12px; }
.section { margin: 1.3rem 0 .6rem; font-size: 1.05rem; font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; align-items: baseline; }
.section a { font-size: 14px; font-weight: 600; text-decoration: none; }
.modal { position: fixed; inset: 0; background: rgba(28,46,54,.35); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 1rem; }
.modal .card { width: 100%; max-width: 420px; }

/* ── pills / chips ── */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.pill.green { background: var(--ok-bg); color: var(--ok); }
.pill.red { background: var(--warn-bg); color: var(--warn); }
.pill.amber { background: var(--dhoni-bg); color: var(--dhoni-ink); }
.pill.blue { background: var(--sky-bg); color: var(--sky); }
.pill.teal { background: var(--shallows); color: var(--lagoon-deep); }
.pill.grey { background: var(--grey-bg); color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { padding: .3rem .6rem; border-radius: 9px; background: var(--grey-bg); font-size: .85rem; font-weight: 650; }
.chip.paid { background: var(--ok-bg); color: var(--ok); }
.chip.sel { cursor: pointer; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-2); }
.chip.sel.on { background: var(--lagoon); color: #fff; box-shadow: none; }
.month-block { margin-bottom: 1rem; }

/* ── tables ── */
.table-wrap { overflow-x: auto; }
.page > .table-wrap { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: .8rem; color: var(--ink-3); font-weight: 600; padding: .65rem .7rem; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
table.list td { padding: .65rem .7rem; border-bottom: 1.5px solid var(--line); vertical-align: top; }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover { background: var(--shallows-2); cursor: pointer; }
table.list.edit tbody tr:hover { cursor: default; }
table.list.edit input, table.list.edit select { min-height: 38px; padding: .35rem .55rem; min-width: 80px; font-size: 14.5px; }
table.list th.r, table.list td.r { text-align: right; }
td.chk, th.chk { width: 36px; }
tr.bad td, tr.hl td { background: var(--dhoni-bg); }
tr.overdue td:first-child { box-shadow: inset 3px 0 var(--warn); }
tr.detail td { background: var(--shallows-2); font-size: .9rem; }
.clickable { cursor: pointer; }

/* ── list rows (mobile-friendly) ── */
.rows { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.rowi { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 13px 14px; align-items: center; text-decoration: none; color: var(--ink); }
.rowi + .rowi { border-top: 1.5px solid var(--line); }
.rowi b { font-size: 15.5px; font-weight: 650; }
.rowi small { color: var(--ink-3); font-size: 13.5px; }
.rowi > .pill, .rowi > .end { grid-row: 1 / 3; grid-column: 2; }

/* ── stats & charts ── */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0; margin-bottom: 1rem; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.stat { padding: 14px 18px; display: flex; flex-direction: column; box-shadow: -1.5px 0 0 var(--line), 0 -1.5px 0 var(--line); }
.stat small { color: var(--ink-2); font-size: .85rem; order: 2; }
.stat b { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.01em; }
.stat.good b { color: var(--ok); }
.stat.warn b { color: var(--warn); }
.stat.cash b { color: var(--dhoni-ink); }
.stat.big { box-shadow: none; padding: 0; margin-bottom: .6rem; }
.stat.big b { font-size: 2rem; color: var(--lagoon-deep); }
.chart { width: 100%; height: 160px; display: block; }
.chart-axis { display: flex; justify-content: space-between; font-size: .75rem; color: var(--ink-3); }
.hbars { display: flex; flex-direction: column; gap: .5rem; }
.hbar { display: grid; grid-template-columns: minmax(80px, 38%) 1fr auto; gap: .5rem; align-items: center; font-size: .9rem; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { background: var(--grey-bg); border-radius: 6px; height: 12px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--lagoon); border-radius: 6px; }
.hbar-val { font-weight: 650; min-width: 2.5rem; text-align: right; }
.vbars { display: flex; gap: 6px; align-items: flex-end; height: 120px; }
.vbars div { flex: 1; display: grid; gap: 6px; justify-items: center; font-size: 11.5px; color: var(--ink-3); font-weight: 600; align-content: end; height: 100%; }
.vbars i { width: 100%; border-radius: 7px 7px 3px 3px; background: #BFE2E0; display: block; min-height: 4px; }
.vbars .now i { background: var(--lagoon); }

/* ── kv, timeline, proof ── */
.kv { display: grid; gap: .5rem; margin: 0 0 .8rem; }
.kv > div { display: grid; grid-template-columns: 120px 1fr; gap: .5rem; }
.kv dt { color: var(--ink-2); font-size: .9rem; }
.kv dd { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; padding-bottom: 16px; position: relative; }
.timeline li:not(:last-child)::before { content: ''; position: absolute; inset-inline-start: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline .d { width: 22px; height: 22px; border-radius: 50%; background: var(--lagoon); opacity: .45; }
.timeline li:first-child .d { opacity: 1; box-shadow: 0 0 0 4px var(--shallows); }
.timeline b { font-weight: 600; }
.timeline small { display: block; color: var(--ink-3); font-size: .84rem; }
.timeline time { color: var(--ink-3); font-size: .84rem; white-space: nowrap; }
.proof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.proof-grid figure { margin: 0; }
.proof-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; box-shadow: var(--shadow); background: #fff; }
.proof-grid img.signature { object-fit: contain; }
.proof-grid figcaption { font-size: .78rem; color: var(--ink-3); }

/* ── rider app ── */
.duty { background: var(--grey-bg); color: var(--ink-2); height: 38px; border-radius: 13px; font-size: 14px; }
.duty.on { background: var(--ok-bg); color: var(--ok); }
.today-strip { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--card); border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.today-strip div { padding: 12px 14px; display: grid; gap: 1px; }
.today-strip div + div { border-left: 1.5px solid var(--line); }
.today-strip b { font-size: 21px; font-weight: 750; } .today-strip small { color: var(--ink-3); font-size: 12.5px; }
.jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.job { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 14px; display: grid; gap: 6px; cursor: pointer; }
.job.offer { box-shadow: 0 0 0 2px var(--lagoon); cursor: default; }
.job-top { display: flex; gap: 8px; align-items: center; }
.job-top .no { font-size: 17px; font-weight: 750; }
.job-top .who { color: var(--ink-3); font-size: 13.5px; }
.job-top .end { margin-left: auto; }
.order { width: 26px; height: 26px; border-radius: 9px; background: var(--ink); color: #fff; display: inline-grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.job-addr { font-size: 15.5px; line-height: 1.4; }
.job .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.iconbtn { width: 42px; height: 42px; border-radius: 14px; background: var(--shallows); color: var(--lagoon-deep); display: inline-grid; place-items: center; padding: 0; text-decoration: none; flex: none; }
.iconbtn.plain { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.cod-box { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--dhoni-bg); color: var(--dhoni-ink); font-weight: 600; margin: .7rem 0; }
.cod-box b { font-size: 20px; }
.pod .sec { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.pod .sec-h { display: flex; align-items: center; gap: 10px; font-weight: 650; margin-bottom: 10px; }
.tick { width: 24px; height: 24px; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--line); display: inline-grid; place-items: center; color: #fff; flex: none; }
.tick.done { background: var(--ok); box-shadow: none; }
.tick svg { width: 16px; height: 16px; stroke-width: 2.6; }
.action-bar { position: sticky; bottom: calc(96px + env(safe-area-inset-bottom)); display: flex; gap: .5rem; flex-wrap: wrap; background: linear-gradient(180deg, rgba(246,250,250,0), var(--paper) 25%); padding: 18px 0 6px; z-index: 5; }
.action-bar button { flex: 1 1 140px; height: 54px; font-size: 16px; border-radius: 17px; }
.action-bar.flow { bottom: 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.sig { position: relative; }
.sig canvas { width: 100%; height: 160px; border-radius: 14px; background: #FBFDFD; box-shadow: inset 0 0 0 1.5px var(--line); touch-action: none; display: block; }
.sig button { position: absolute; right: .5rem; top: .4rem; }
.thumbs { display: flex; gap: .5rem; flex-wrap: wrap; }
.thumb { width: 88px; height: 88px; border-radius: 14px; overflow: hidden; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 4px; right: 4px; height: 24px; width: 24px; padding: 0; border-radius: 50%; background: rgba(28,46,54,.65); }
.thumb.add { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12px; font-weight: 600; color: var(--lagoon); border: 2px dashed #B8D3D5; cursor: pointer; background: var(--card); }
.scan-video { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 22px; background: #0f1d22; display: block; }
.scan-frame { position: relative; }
.scan-frame::after { content: ''; position: absolute; inset: 22% 18%; border: 3px solid rgba(255,255,255,.85); border-radius: 22px; }

/* ── shop app ── */
.monthbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 3px; margin: 12px 0 10px; background: var(--grey-bg); }
.monthbar i { display: block; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.balance { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--shallows); text-decoration: none; color: var(--ink); margin-bottom: 1rem; }
.balance small { display: block; color: var(--lagoon-deep); font-size: 13px; font-weight: 600; }
.balance b { font-size: 19px; }
.paste { padding: 14px; border-radius: 18px; background: var(--shallows); display: grid; gap: 8px; margin-bottom: 1rem; }
.paste b { font-size: 15px; color: var(--lagoon-deep); display: flex; align-items: center; gap: 8px; }
.paste textarea { background: #fff; border-color: transparent; min-height: 70px; }
.zones-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.zone-opt { border-radius: 14px; padding: 10px 12px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); display: grid; gap: 1px; text-align: left; height: auto; color: var(--ink); font-weight: 650; justify-content: stretch; }
.zone-opt small { color: var(--ink-3); font-size: 13px; font-weight: 500; }
.zone-opt.on { box-shadow: inset 0 0 0 2px var(--lagoon); background: var(--shallows-2); }
.zone-opt.on small { color: var(--lagoon-deep); font-weight: 650; }

/* ── owner board ── */
.board-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bcol { background: #EEF5F5; border-radius: 20px; padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 360px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.bcol.attn { background: #FDF6E8; }
.bcol h3 { margin: 2px 4px 4px; font-size: 14.5px; display: flex; justify-content: space-between; }
.bcol h3 span { color: var(--ink-3); font-weight: 600; }
.tcard { background: var(--card); border-radius: 14px; padding: 11px 12px; box-shadow: 0 1px 2px rgba(28,46,54,.06); display: grid; gap: 5px; font-size: 13.5px; min-width: 0; cursor: pointer; }
.tcard .t { display: flex; justify-content: space-between; align-items: center; gap: 4px 6px; flex-wrap: wrap; }
.tcard .t b { font-size: 15px; }
.tcard .shop { color: var(--ink-2); }
.tcard .addr { color: var(--ink-2); }
.tcard .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tcard .pill { height: 22px; font-size: 12px; padding: 0 8px; }
.tcard select { min-height: 34px; padding: 4px 8px; font-size: 13.5px; border-radius: 10px; }
.who { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; }
.who i { width: 20px; height: 20px; border-radius: 7px; background: var(--shallows); color: var(--lagoon-deep); display: inline-grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; }
.owner-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.panel { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 16px; display: grid; gap: 12px; margin-bottom: 14px; }
.panel h3 { margin: 0; display: flex; justify-content: space-between; align-items: baseline; }
.panel h3 a { font-size: 13.5px; font-weight: 600; text-decoration: none; }
.rider-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; }
.rider-row b { display: block; } .rider-row small { color: var(--ink-3); font-size: 13px; }
.load { display: flex; gap: 3px; }
.load i { width: 8px; height: 18px; border-radius: 3px; background: #E3ECED; display: block; }
.load i.f { background: var(--lagoon); }
.line { display: flex; justify-content: space-between; font-size: 14.5px; }
@media (max-width: 1100px) { .owner-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .board-cols { grid-template-columns: 1fr; } .bcol { min-height: 0; } }

/* ── auth ── */
.auth { max-width: 420px; margin: 0 auto; padding: 1.5rem 1rem; }
.brand.big { font-size: 1.6rem; justify-content: center; display: flex; margin: 1.2rem 0; }
.auth-card h2 { margin-bottom: 1rem; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }

/* ── public pages ── */
.pub-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; max-width: 1240px; margin: 0 auto; }
.pub-top nav { display: none; gap: 28px; color: var(--ink-2); font-weight: 500; }
.pub-top nav a { color: inherit; text-decoration: none; }
.pub-top .right { display: flex; gap: 8px; align-items: center; }
.lang-btn { height: 40px; padding: 0 12px; border-radius: 12px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); font-family: 'NALO Thaana', 'Noto Sans Thaana', 'Schibsted Grotesk', sans-serif; font-weight: 500; }
.lang-btn:lang(en) { font-family: 'Schibsted Grotesk', sans-serif; }
.mtop-end { display: flex; align-items: center; gap: 8px; }
.mtop-end .lang-btn { height: 36px; font-size: 14px; }
.side-lang { margin: auto 0 8px; align-self: flex-start; }
.auth-lang { display: flex; justify-content: flex-end; margin-bottom: .5rem; }
.lang-btn.en { font-family: inherit; }
.signin { height: 40px; padding: 0 16px; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); display: inline-flex; align-items: center; font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: none; }
.hero { padding: 14px 20px 8px; display: grid; gap: 26px; max-width: 1240px; margin: 0 auto; }
.hero h1 { font-size: 40px; line-height: 1.05; letter-spacing: -0.025em; }
.hero .lead { margin: 12px 0 0; font-size: 17px; line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.trackbox { background: var(--card); border-radius: 22px; padding: 10px; box-shadow: 0 0 0 1.5px var(--line), 0 18px 40px -24px rgba(19,131,138,.45); display: grid; gap: 10px; margin-top: 22px; }
.trackbox input { border: 0; background: var(--shallows-2); height: 56px; font-size: 18px; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; }
.trackbox input::placeholder { text-transform: none; letter-spacing: 0; }
.trackbox button { height: 56px; font-size: 17px; border-radius: 15px; }
.hint-line { font-size: 14px; color: var(--ink-3); margin-top: 12px; display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.mapcard { background: linear-gradient(180deg, #D7EFEE 0%, #E6F5F4 100%); border-radius: 26px; position: relative; overflow: hidden; aspect-ratio: 1 / .92; }
.mapcard svg.map { position: absolute; inset: 0; width: 100%; height: 100%; }
.maplegend { position: absolute; left: 16px; bottom: 14px; font-size: 13px; color: var(--lagoon-deep); font-weight: 600; display: flex; gap: 6px; align-items: center; background: rgba(255,255,255,.75); padding: 6px 10px; border-radius: 10px; }
.pub section { padding: 44px 20px 0; max-width: 1240px; margin: 0 auto; }
.pub h2 { font-size: 27px; letter-spacing: -0.02em; margin: 0 0 8px; font-weight: 750; }
.pub .sub { margin: 0 0 22px; color: var(--ink-2); font-size: 16.5px; line-height: 1.5; max-width: 58ch; }
.prices .price-row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; padding: 16px 18px; }
.prices .price-row + .price-row { border-top: 1.5px solid var(--line); }
.zone-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--shallows); color: var(--lagoon-deep); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.price-row b { font-size: 17px; font-weight: 650; display: block; }
.price-row small { font-size: 14px; color: var(--ink-3); }
.price { font-size: 20px; font-weight: 750; white-space: nowrap; }
.price small { font-size: 13px; color: var(--ink-3); font-weight: 500; margin-right: 3px; }
.steps .step { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 0 0 22px; position: relative; }
.steps .step:not(:last-child)::after { content: ''; position: absolute; left: 19px; top: 44px; bottom: 4px; width: 2px; background: var(--line); }
.steps .n { width: 40px; height: 40px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 2px var(--lagoon); color: var(--lagoon-deep); display: grid; place-items: center; font-weight: 750; }
.steps h3 { margin: 8px 0 4px; font-size: 18px; font-weight: 650; }
.steps p, .perk p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.perks { display: grid; gap: 18px; }
.perk { display: grid; grid-template-columns: 46px 1fr; gap: 14px; align-items: start; }
.perk .ic { width: 46px; height: 46px; border-radius: 15px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); display: grid; place-items: center; color: var(--lagoon); }
.perk h3 { margin: 2px 0 4px; font-size: 17px; font-weight: 650; }
.about { background: var(--shallows); border-radius: 26px; padding: 28px 22px; margin: 44px 20px 0; display: grid; gap: 22px; }
.about p { color: var(--ink-2); font-size: 16px; line-height: 1.6; margin: 0; max-width: 60ch; }
.contact { display: grid; gap: 10px; align-content: start; }
.contact a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; box-shadow: 0 0 0 1.5px #CFE6E4; }
.contact a svg { color: var(--lagoon); }
.contact a small { display: block; color: var(--ink-3); font-weight: 400; font-size: 13.5px; }
.contact a.wa { background: #25A36A; color: #fff; box-shadow: none; }
.contact a.wa svg { color: #fff; } .contact a.wa small { color: #D7F3E5; }
.pub-foot { padding: 30px 20px 40px; color: var(--ink-3); font-size: 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; max-width: 1240px; margin: 0 auto; }
.pub-foot a { color: inherit; }
@media (min-width: 900px) {
  .pub-top { padding: 24px 48px; }
  .pub-top nav { display: flex; }
  .hero { grid-template-columns: 1.05fr 1fr; padding: 36px 48px 20px; gap: 56px; align-items: center; }
  .hero h1 { font-size: 68px; }
  .hero .lead { font-size: 19px; }
  .trackbox { grid-template-columns: 1fr auto; max-width: 560px; }
  .trackbox button { padding: 0 28px; }
  .pub section { padding: 76px 48px 0; }
  .pub h2 { font-size: 34px; }
  .pub .split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; max-width: 1240px; margin: 0 auto; }
  .pub .split section { padding-left: 0; padding-right: 0; margin: 0; }
  .pub .split { padding: 0 48px; }
  .perks { grid-template-columns: 1fr 1fr; gap: 28px 40px; }
  .about { margin: 76px auto 0; max-width: 1144px; padding: 44px; grid-template-columns: 1.2fr 1fr; gap: 48px; }
  .pub-foot { padding: 36px 48px 48px; }
}

/* tracking result */
.track-page { max-width: 560px; margin: 0 auto; padding: 0 16px 48px; }
.track-page[dir=rtl] { font-family: 'NALO Thaana', 'Noto Sans Thaana', 'Schibsted Grotesk', sans-serif; }
.track-page[dir=rtl] .ltr { font-family: 'Schibsted Grotesk', sans-serif; }
.tbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.t-status h1 { font-size: 32px; margin: 4px 0 6px; }
.t-status p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.t-code { font-size: 15px; color: var(--ink-3); font-weight: 600; }
.t-status.s-delivered h1 { color: var(--ink); }
.done-badge { width: 60px; height: 60px; border-radius: 20px; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; margin-bottom: 8px; }
.done-badge svg { width: 32px; height: 32px; stroke-width: 2.4; }
.fail-badge { background: var(--warn-bg); color: var(--warn); }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 16px; }
.progress div { display: grid; gap: 7px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.progress span { height: 6px; border-radius: 3px; background: var(--line); }
.progress .done { color: var(--ink); } .progress .done span { background: var(--lagoon); }
.eta { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--shallows); color: var(--lagoon-deep); font-weight: 600; margin-top: 14px; }
.rider-card { display: grid; grid-template-columns: 50px 1fr auto; gap: 12px; align-items: center; }
.rider-card .avatar { width: 50px; height: 50px; border-radius: 16px; font-size: 19px; }
.rider-card b { display: block; font-size: 17px; }
.rider-card small { color: var(--ink-2); }
.t-stack { display: grid; gap: 12px; margin-top: 14px; }
.t-stack > .card { margin: 0; }
.proof2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.proof2 a { display: block; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: var(--shadow); aspect-ratio: 1; }
.proof2 img { width: 100%; height: 100%; object-fit: cover; display: block; }
.proof2 img.signature { object-fit: contain; }
.stars { display: flex; gap: 8px; }
.stars button { background: none; padding: 0; height: auto; color: #D7DFE1; }
.stars button.on { color: var(--dhoni); }
.stars svg { width: 34px; height: 34px; fill: currentColor; stroke: currentColor; }
.t-foot { text-align: center; color: var(--ink-3); margin-top: 2rem; font-size: 14px; }

/* ── statement ── */
.stmt-head { display: flex; justify-content: space-between; margin-bottom: 1rem; }
table.sheet { width: 100%; border-collapse: collapse; font-size: .92rem; margin-bottom: 1rem; }
table.sheet th, table.sheet td { border-bottom: 1.5px solid var(--line); padding: .35rem .5rem; text-align: center; }
table.sheet th { font-weight: 700; }
table.sheet td.hl { background: #fff59d; color: #333; }
table.sheet th.r, table.sheet td.r { text-align: right; }
/* totals sit in the sheet's own columns */
table.sheet tfoot td { border-bottom: none; padding-top: .3rem; padding-bottom: .3rem; }
table.sheet tfoot tr:first-child td { border-top: 2px solid var(--ink); padding-top: .55rem; }
table.sheet tfoot tr.strong td { font-weight: 700; }
table.sheet tfoot tr.bal td { font-weight: 700; border-top: 1.5px solid var(--line); }
table.sheet tfoot tr.bal.neg td.r b { color: var(--warn); }
table.sheet tfoot tr.bal.pos td.r b { color: var(--ok); }
.sum-list { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 2px 16px; margin-bottom: 12px; }
.sum-list div { display: flex; justify-content: space-between; padding: 12px 0; }
.sum-list div + div { border-top: 1.5px solid var(--line); }
.sum-list .total b { font-size: 19px; }

/* ── labels (delivery-note layout; all sizes in --u so one layout fits every label size) ── */
.labels-page { padding: 1rem; }
.labels-bar { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.labels-bar select { width: auto; }
.labels { display: flex; flex-wrap: wrap; gap: 6mm; --u: 1mm; }
.labels.s100x150 { --u: 1.32mm; }
.labels.a4 { display: grid; grid-template-columns: repeat(2, 98mm); gap: 3mm; --u: .96mm; }
.lbl { width: 100mm; height: 75mm; background: #fff; color: #000; border: 1px solid #000; padding: calc(3.2 * var(--u)) calc(3.6 * var(--u));
  display: flex; flex-direction: column; gap: calc(1.3 * var(--u)); font: 500 calc(2.9 * var(--u))/1.22 'Schibsted Grotesk', Arial, sans-serif;
  overflow: hidden; page-break-inside: avoid; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.labels.s100x150 .lbl { height: 150mm; gap: calc(2 * var(--u)); }
.labels.a4 .lbl { width: 98mm; height: 70mm; border-style: dashed; }
.lbl small { display: block; font-size: calc(1.9 * var(--u)); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; }
.lb-from { display: flex; justify-content: space-between; align-items: flex-start; gap: 2mm; }
.lb-from > div { min-width: 0; }
.lb-from span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: calc(2.3 * var(--u)); }
.lb-mark { flex: none; width: calc(5.4 * var(--u)); height: calc(5.4 * var(--u)); border: .3mm solid #000; border-radius: 1mm; display: grid; place-items: center; }
.lb-mark svg { width: calc(3.6 * var(--u)); height: calc(3.6 * var(--u)); }
.lb-rule { border-top: .3mm solid #000; flex: none; }
.lb-rule.thick { border-top-width: .9mm; }
.lb-main { display: flex; gap: calc(3 * var(--u)); flex: 1 1 auto; min-height: 0; overflow: hidden; }
.lb-to { flex: 1; min-width: 0; text-transform: uppercase; }
.lb-big { display: block; font-size: calc(5.4 * var(--u)); line-height: 1.05; font-weight: 800; margin: calc(.4 * var(--u)) 0 calc(.8 * var(--u)); overflow-wrap: anywhere; }
.lb-addr { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.labels.s100x150 .lb-addr { -webkit-line-clamp: 4; }
.labels.s100x150 .lb-big { font-size: 8.5mm; }
.labels.s100x150 .lb-to { font-size: 4.4mm; }
.labels.s100x150 .lb-tel { font-size: 5mm; }
.labels.s100x150 .lb-dest { width: 34mm; }
.labels.s100x150 .lb-code { font-size: 15mm; padding: 2.6mm 3.2mm; }
.labels.s100x150 .lb-dest-ic svg { width: 6mm; height: 6mm; }
.labels.s100x150 .lb-dest-name { font-size: 3.6mm; }
.labels.s100x150 .lb-foot img { width: 27mm; height: 27mm; }
.labels.s100x150 .lb-track b { font-size: 6mm; }
.lb-tel { font-weight: 800; font-size: calc(3.3 * var(--u)); margin-top: calc(.6 * var(--u)); }
/* Boat labels: boat phone right under the boat name, bigger than the customer's; each number tagged */
.lb-tag { display: inline-block; vertical-align: middle; font-size: calc(1.8 * var(--u)); font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: calc(.25 * var(--u)) calc(.9 * var(--u)); border-radius: calc(.6 * var(--u)); background: #000; color: #fff; margin-right: calc(1.2 * var(--u)); line-height: 1.25; }
.lb-tag.light { background: #fff; color: #000; box-shadow: inset 0 0 0 calc(.25 * var(--u)) #000; }
.lb-tel-boat { font-size: calc(4.6 * var(--u)); margin: 0 0 calc(1 * var(--u)); line-height: 1.1; }
.lb-tel-boat .lb-tag { font-size: calc(2.1 * var(--u)); }
.lb-cust { font-weight: 700; }
.labels.s100x150 .lb-tel-boat { font-size: 7mm; }
@media print { .lb-tag { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.lb-small { font-size: calc(2.3 * var(--u)); }
.lb-dest { flex: none; width: calc(24 * var(--u)); display: flex; flex-direction: column; align-items: center; gap: calc(.9 * var(--u)); text-align: center; }
.lb-code { background: #000; color: #fff; font-weight: 800; font-size: calc(8 * var(--u)); line-height: 1; padding: calc(1.6 * var(--u)) calc(2.4 * var(--u)); min-width: calc(16 * var(--u)); border-radius: .6mm; letter-spacing: -.01em; }
.lb-dest-ic svg { width: calc(4 * var(--u)); height: calc(4 * var(--u)); }
.lb-dest-name { font-size: calc(2.4 * var(--u)); font-weight: 800; text-transform: uppercase; line-height: 1.15; }
.lb-meta { display: grid; grid-template-columns: auto auto auto 1fr; gap: 0 calc(4 * var(--u)); align-items: end; }
.lb-meta b { font-size: calc(3 * var(--u)); font-weight: 800; white-space: nowrap; }
.lb-pay { justify-self: end; text-align: right; }
.lb-pay.paid b, .lb-pay.cod b { display: inline-block; background: #000; color: #fff; padding: calc(.3 * var(--u)) calc(1.5 * var(--u)); border-radius: .5mm; }
.lb-note { border: .3mm solid #000; padding: calc(.8 * var(--u)) calc(1.5 * var(--u)); font-size: calc(2.3 * var(--u)); text-transform: uppercase; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: none; }
.lb-foot { display: flex; align-items: center; gap: calc(2.5 * var(--u)); flex: none; }
.lb-foot img { width: calc(14 * var(--u)); height: calc(14 * var(--u)); image-rendering: pixelated; }
.lb-track { min-width: 0; }
.lb-track b { display: block; font-size: calc(4 * var(--u)); font-weight: 800; letter-spacing: .02em; }
.lb-track span { display: block; font-size: calc(2 * var(--u)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-brand { margin-left: auto; flex: none; font-weight: 800; font-size: calc(3 * var(--u)); letter-spacing: .08em; border: .3mm solid #000; padding: calc(.5 * var(--u)) calc(1.3 * var(--u)); border-radius: .6mm; }

/* ── toasts ── */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 100; display: flex; flex-direction: column; gap: .4rem; width: min(92vw, 420px); }
.toast { background: var(--ink); color: #fff; padding: .75rem 1rem; border-radius: 14px; box-shadow: var(--lift); transition: opacity .4s; }
.toast.err { background: var(--warn); }
.toast.warn { background: #8a5a00; }
.toast.out { opacity: 0; }
@media (min-width: 900px) { #toasts { bottom: 28px; } }

/* ── print ── */
@media print {
  body { background: #fff; color: #000; }
  .no-print, .side, .mtop, .tabbar, .labels-bar, #toasts, .page-head .actions, .toolbar { display: none !important; }
  .shell { display: block; }
  .page, .labels-page { padding: 0; max-width: none; }
  .card { box-shadow: none; padding: 0; background: #fff; }
  .labels { gap: 0; }
  .labels.s100x75 .lbl, .labels.s100x150 .lbl { border: 0; page-break-after: always; break-after: page; }
  .labels.a4 { gap: 2mm; }
  table.sheet td.hl { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.flip { transform: scaleX(-1); }

/* ── Superadmin "View as" ── */
:root { --vab: 0px; }
html.viewing-as { --vab: 56px; }
.viewas-bar { position: sticky; top: 0; z-index: 45; height: var(--vab); display: flex; align-items: center; gap: 10px;
  padding: 0 12px 0 14px; background: var(--ink); color: #fff; box-shadow: inset 0 -3px 0 var(--dhoni); }
.viewas-bar .eye { width: 32px; height: 32px; border-radius: 10px; background: var(--dhoni); color: var(--ink); display: grid; place-items: center; flex: none; }
.viewas-bar .who { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; min-width: 0; flex: 1; line-height: 1.2; }
.viewas-bar .who small { flex-basis: 100%; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--dhoni); font-weight: 650; }
.viewas-bar .who b { color: #fff; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
.viewas-bar .who .role { font-size: 13px; color: #B9CBD1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.viewas-bar .exit { flex: none; height: 38px; padding: 0 16px; border-radius: 12px; background: var(--dhoni); color: var(--ink); font-weight: 750; }
.viewas-bar .exit:hover { background: #F5C566; }
@media (min-width: 900px) {
  html.viewing-as .side { top: var(--vab); height: calc(100vh - var(--vab)); }
}
@media print { .viewas-bar { display: none; } }
.viewas-pick { display: grid; gap: .8rem; }
.viewas-pick h3 { margin: 0; }
.viewas-pick .eyebrow { display: block; color: var(--dhoni-ink); font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.viewas-pick p { margin: 0; }
.viewas-pick .rowi { grid-template-columns: auto 1fr auto; }
.viewas-pick .rowi > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.viewas-pick .rowi > .end { grid-row: auto; grid-column: 3; }

/* ── New parcel: payment, packages, island ── */
.pay-pick { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.pay-opt { min-width: 0; white-space: normal; height: auto; border-radius: 16px; padding: 12px 14px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line);
  display: flex; align-items: center; gap: 12px; text-align: left; justify-content: flex-start; font-weight: 650; }
.pay-opt svg { flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 11px; background: var(--grey-bg); color: var(--ink-2); }
.pay-opt span { display: grid; gap: 1px; }
.pay-opt small { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.pay-opt.on { box-shadow: inset 0 0 0 2px var(--ok); background: var(--ok-bg); }
.pay-opt.on svg { background: var(--ok); color: #fff; }
.pay-opt.cash.on { box-shadow: inset 0 0 0 2px var(--dhoni); background: var(--dhoni-bg); }
.pay-opt.cash.on svg { background: var(--dhoni); color: var(--ink); }
.cod-field { margin-top: 10px; }
.cod-field input { font-size: 20px; font-weight: 700; }
.stepper { display: grid; grid-template-columns: 48px 1fr 48px; gap: 6px; }
.stepper input { text-align: center; font-weight: 700; font-size: 18px; }
.stepper button { padding: 0; font-size: 22px; }
.boat-box { padding: 14px; border-radius: 18px; background: var(--sky-bg); display: grid; gap: 4px; margin-top: 4px; }
.island-hits { margin-top: 6px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow), var(--lift); overflow: hidden; }
.island-hits button { width: 100%; height: auto; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px;
  background: none; color: var(--ink); border-radius: 0; text-align: left; font-weight: 600; justify-content: stretch; }
.island-hits button + button { border-top: 1.5px solid var(--line); }
.island-hits button:hover, .island-hits button:focus-visible { background: var(--shallows-2); }
.island-hits small { color: var(--ink-3); font-weight: 500; font-size: 13px; }
.island-chosen { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--card); box-shadow: inset 0 0 0 2px var(--sky); }
.island-chosen span:nth-child(2) { display: grid; }
.island-chosen small { color: var(--ink-3); font-size: 13px; }
.code, .code-chip { display: inline-grid; place-items: center; min-width: 40px; height: 30px; padding: 0 7px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 800; font-size: 14px; letter-spacing: -.01em; }
.code-chip.sm { min-width: 30px; height: 22px; font-size: 12px; border-radius: 6px; padding: 0 5px; }
.submit-row { align-items: center; gap: 12px; flex-wrap: wrap; }
@media (min-width: 700px) { .pay-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* rider job: island and paid */
.boat-line { display: flex; gap: 10px; align-items: center; margin: .7rem 0 0; padding: 10px 12px; border-radius: 14px; background: var(--sky-bg); }
.boat-line > span:last-child { display: grid; }
.boat-line small { color: var(--ink-2); font-size: 13px; }
.paid-box { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 18px; background: var(--ok-bg); color: var(--ok); font-weight: 650; margin: .7rem 0; }
.pill svg { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }

/* shop home: today tiles */
.today-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ttile { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 12px; text-decoration: none; color: var(--ink); display: grid; gap: 2px; }
.ttile .ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--grey-bg); color: var(--ink-2); margin-bottom: 6px; }
.ttile b { font-size: 26px; letter-spacing: -.02em; line-height: 1; }
.ttile small { color: var(--ink-3); font-size: 13px; font-weight: 550; }
.ttile.good .ic { background: var(--ok-bg); color: var(--ok); }
.ttile.blue .ic { background: var(--sky-bg); color: var(--sky); }
.ttile.warn .ic { background: var(--warn-bg); color: var(--warn); }
.ttile.alert { box-shadow: inset 0 0 0 2px var(--warn); }
.ttile.alert b { color: var(--warn); }
@media (max-width: 520px) { .today-tiles { grid-template-columns: repeat(2, 1fr); } }

/* public home: recent tracking, island deliveries */
.recent { margin-top: 18px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.recent-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 4px; font-size: 14px; }
.recent-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; text-decoration: none; color: var(--ink); }
.recent-row + .recent-row { border-top: 1.5px solid var(--line); }
.recent-row .mid { display: grid; min-width: 0; }
.recent-row .mid small { color: var(--ink-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-row .end { display: grid; justify-items: end; gap: 2px; }
.recent-row .end small { color: var(--ink-3); font-size: 12px; }
.recent-row .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dhoni); }
.recent-row .st { font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--dhoni-bg); color: var(--dhoni-ink); }
.recent-row .dot.s-delivered { background: var(--ok); } .recent-row .st.s-delivered { background: var(--ok-bg); color: var(--ok); }
.recent-row .dot.s-picked_up, .recent-row .dot.s-accepted { background: var(--sky); }
.recent-row .st.s-picked_up, .recent-row .st.s-accepted { background: var(--sky-bg); color: var(--sky); }
.recent-row .dot.s-failed { background: var(--warn); } .recent-row .st.s-failed { background: var(--warn-bg); color: var(--warn); }
.islands-band { display: grid; gap: 22px; align-items: center; }
.island-scene { width: 100%; height: auto; display: block; border-radius: 22px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; color: var(--ink-2); line-height: 1.4; }
.ticks svg { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 7px; background: var(--ok-bg); color: var(--ok); margin-top: 1px; }
@media (min-width: 900px) { .islands-band { grid-template-columns: 1.1fr 1fr; gap: 40px; } }

/* ── Tracking page (mockup v2) ── */
.track-page .t-stack { margin-top: 4px; }
.tcard { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 16px; display: grid; gap: 10px; }
.tcard.center { justify-items: center; text-align: center; }
.tcard-h { font-size: 17px; font-weight: 750; }
.tcard-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.thead { padding: 18px; }
.thead-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tcode { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); letter-spacing: .03em; font-family: 'Schibsted Grotesk', sans-serif; }
.tcopy { width: 34px; height: 34px; padding: 0; border-radius: 10px; background: var(--shallows-2); color: var(--lagoon-deep); }
.tpill { font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 99px; background: var(--dhoni-bg); color: var(--dhoni-ink); white-space: nowrap; }
.tpill.s-accepted, .tpill.s-picked_up { background: var(--sky-bg); color: #2C64B0; }
.tpill.s-delivered { background: var(--ok-bg); color: #157A52; }
.tpill.s-failed, .tpill.s-returned, .tpill.s-cancelled { background: var(--warn-bg); color: #B43D39; }
.thead-title { display: flex; align-items: center; gap: 12px; }
.thead h1 { margin: 0; font-size: 28px; line-height: 1.1; letter-spacing: -.02em; font-weight: 800; }
.thead p { margin: 0; font-size: 15.5px; line-height: 1.45; color: var(--ink-2); }
.tdone { flex: none; width: 48px; height: 48px; border-radius: 16px; background: var(--ok); color: #fff; display: grid; place-items: center; }
.teta { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--shallows-2); color: var(--lagoon-deep); }
.teta span { display: grid; }
.teta small { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.teta b { font-size: 17px; color: var(--ink); }
.ftcard { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.ftcard > div { display: grid; gap: 3px; align-content: start; min-width: 0; }
.ftcard > div:nth-child(2) { border-inline-start: 1.5px solid var(--line); padding-inline-start: 14px; }
.ftcard small { font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #5F7680; }
.ftcard b { font-size: 15.5px; overflow-wrap: anywhere; }
.ftcard span { font-size: 13.5px; color: var(--ink-2); }
.ftmeta { grid-column: 1 / -1; display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px !important; border-top: 1.5px solid var(--line); padding-top: 12px; }
.ftmeta small { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; }
.ftmeta > div { display: grid; gap: 2px; align-content: start; }
.ftcard .code-chip { color: #fff; }
.tmap { background: var(--card); }
.tmap-cap { display: flex; align-items: center; gap: 6px; padding: 9px 14px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); line-height: 1.3; border-top: 1.5px solid var(--line); }
.okc { color: #157A52; } .cashc { color: var(--dhoni-ink); }
.tmap { position: relative; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); line-height: 0; }
.tmap svg { width: 100%; height: auto; display: block; }
.tmap-chip { position: absolute; inset-inline-start: 12px; top: 12px; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 99px; background: rgba(255,255,255,.94); font-size: 12px; font-weight: 700; color: var(--ink-2); line-height: 1.2; }
.tphoto img { width: 100%; max-height: 360px; object-fit: cover; border-radius: 16px; display: block; }
.tproof-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tproof-grid > div { border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line); padding: 10px 12px; display: grid; gap: 4px; }
.tproof-grid small { font-size: 12px; color: #5F7680; font-weight: 600; }
.tproof-grid img { max-width: 100%; height: 56px; object-fit: contain; }
.vsteps { list-style: none; margin: 0; padding: 0; }
.vsteps li { display: grid; grid-template-columns: 26px 1fr auto; gap: 14px; position: relative; padding-bottom: 18px; }
.vsteps li:last-child { padding-bottom: 0; }
.vsteps li::before { content: ''; position: absolute; inset-inline-start: 11.5px; top: 28px; bottom: 2px; width: 3px; background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 11px); }
.vsteps li.done::before { background: var(--lagoon); }
.vsteps li:last-child::before { display: none; }
.vsteps .node { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 2.5px #C9D8DA; z-index: 1; }
.vsteps li.done .node { background: var(--lagoon); color: #fff; box-shadow: none; }
.vsteps li.current .node { box-shadow: 0 0 0 3px var(--sky), 0 0 0 9px var(--sky-bg); }
.vsteps li.current .node i { width: 10px; height: 10px; border-radius: 50%; background: var(--sky); }
.vsteps li.warn .node { background: var(--warn); color: #fff; box-shadow: 0 0 0 6px var(--warn-bg); }
.vsteps .txt { display: grid; gap: 2px; padding-top: 2px; }
.vsteps .txt b { font-size: 15.5px; }
.vsteps .txt span { font-size: 13.5px; color: var(--ink-2); }
.vsteps li.todo .txt b, .vsteps li.todo .txt span { color: #5F7680; }
.vsteps li.current .txt b { color: #2C64B0; }
.vsteps li.warn .txt b { color: #B43D39; }
.vsteps time { font-size: 13px; color: #5F7680; white-space: nowrap; padding-top: 4px; }
.vsteps li.current time { color: #2C64B0; font-weight: 700; }
.tperson { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.tperson > span:nth-child(2) { display: grid; gap: 1px; }
.tperson small { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #5F7680; }
.tperson b { font-size: 17px; }
.tperson span span, .tperson > span:nth-child(2) > span { font-size: 13.5px; color: var(--ink-2); }
.avatar.big { width: 50px; height: 50px; border-radius: 16px; font-size: 20px; }
.avatar.big.boat { background: var(--sky-bg); color: #2C64B0; }
.verified { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: #157A52; background: var(--ok-bg); padding: 5px 9px; border-radius: 99px; }
.tbtns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tbtns.one { grid-template-columns: 1fr; }
.tbtns .button { height: 48px; justify-content: center; }
.tsmall { margin: 0; font-size: 12.5px; color: #5F7680; }
.tpay { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 18px; }
.tpay > span { display: grid; gap: 2px; flex: 1; }
.tpay small { font-size: 13.5px; }
.tpay.cash { background: var(--dhoni-bg); color: var(--dhoni-ink); }
.tpay.cash .amt { font-size: 22px; white-space: nowrap; }
.tpay.paid { background: var(--ok-bg); color: #157A52; }
.thelp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.thelp.one { grid-template-columns: 1fr; }
.hbtn { height: 52px; border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; font-size: 15px; text-decoration: none; }
.hbtn .warn-ic { color: #B43D39; }
.tnote { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 16px; font-size: 14.5px; font-weight: 600; }
.tnote.ok { background: var(--ok-bg); color: #157A52; }
.reason-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.reason-pick button { height: 40px; padding: 0 14px; border-radius: 99px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 600; font-size: 14px; }
.reason-pick button.on { background: var(--shallows-2); box-shadow: inset 0 0 0 2px var(--lagoon); color: var(--lagoon-deep); }
.track-page .t-foot { margin-top: 1rem; }

/* reported issues (staff) */
.issues { display: grid; gap: 8px; }
.issue { border-radius: 14px; padding: 10px 12px; background: var(--warn-bg); display: grid; gap: 4px; }
.issue.done { background: var(--grey-bg); }
.issue-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.issue-top b { color: #B43D39; font-size: 14.5px; }
.issue.done .issue-top b { color: var(--ink-2); }
.issue-top a { font-weight: 700; font-size: 14px; }
.issue p { margin: 0; font-size: 14px; color: var(--ink); }
.issue-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12.5px; color: var(--ink-2); }
.issue-meta a { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; }
.issue-meta button { margin-inline-start: auto; }
.issues-card { margin-bottom: 1rem; }

.pay-opt span { min-width: 0; }
.pay-opt.transfer.on { box-shadow: inset 0 0 0 2px var(--sky); background: var(--sky-bg); }
.pay-opt.transfer.on svg { background: var(--sky); color: #fff; }
.pay-note { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: var(--sky-bg); display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.pay-note.warn { background: var(--dhoni-bg); color: var(--dhoni-ink); }
.pay-note b { color: var(--ink); }
/* inputs never wider than their column (iOS date pickers) */
.form input, .form select, .form textarea, .grid2 > * { min-width: 0; max-width: 100%; }
input[type=datetime-local], input[type=date] { -webkit-appearance: none; appearance: none; min-height: 48px; display: block; width: 100%; }
.grid2 { min-width: 0; }

/* bank accounts editor */
.bank-edit { display: grid; gap: 10px; }
.bank-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.2fr) 40px; gap: 8px; align-items: end; }
.bank-row label { display: grid; gap: 4px; min-width: 0; }
.bank-row label span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.bank-row .iconbtn { height: 48px; }
.rot45 { transform: rotate(45deg); }
@media (max-width: 560px) {
  .bank-row { grid-template-columns: 80px minmax(0, 1fr) 40px; padding-bottom: 10px; border-bottom: 1.5px solid var(--line); }
  .bank-row label.num { grid-column: 1 / 3; grid-row: 2; }
  .bank-row .iconbtn { grid-row: 1; grid-column: 3; }
}

/* tracking: bank transfer */
.tcard.transfer { box-shadow: inset 0 0 0 2px var(--sky); }
.tr-h { display: inline-flex; align-items: center; gap: 8px; color: #2C64B0; }
.tcard.transfer .amt { font-size: 22px; color: #2C64B0; white-space: nowrap; }
.trc { color: #2C64B0; }
.tr-accounts { display: grid; gap: 8px; }
.tr-acc { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--sky-bg); }
.tr-acc > span { display: grid; min-width: 0; }
.tr-acc small { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.tr-acc b { font-size: 17px; letter-spacing: .02em; overflow-wrap: anywhere; }
.hbtn.upload { position: relative; cursor: pointer; }
.hbtn.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.hbtn.upload.busy { opacity: .6; }

/* rider: transfer confirmation */
.confirm-tr { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--card); cursor: pointer; }
.confirm-tr input { width: 24px; height: 24px; flex: none; margin-top: 2px; accent-color: var(--ok); }
.confirm-tr span { display: grid; gap: 2px; }
.confirm-tr small { color: var(--ink-2); font-size: 13px; }
.confirm-tr.on { box-shadow: inset 0 0 0 2px var(--ok); background: var(--ok-bg); }
.transfer-box { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--sky-bg); color: #2C64B0; margin: .7rem 0; }
.transfer-box > span { display: grid; }
.transfer-box small { color: var(--ink-2); }
.transfer-box > b { font-size: 20px; }

/* ── delivery location map ── */
.place-map { position: relative; border-radius: 16px; overflow: hidden; background: #dfeceb; box-shadow: var(--shadow); margin-top: .55rem; }
.smap { touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.smap:active { cursor: grabbing; }
.smap-tiles, .smap-over { position: absolute; inset: 0; transform-origin: 0 0; }
.smap-tiles img { position: absolute; left: 0; top: 0; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.smap-tiles img.err { visibility: hidden; }
.smap-mk { position: absolute; left: 0; top: 0; will-change: transform; }
.smap-pin { width: 0; height: 0; z-index: 3; }
.smap-pin svg { position: absolute; left: -17px; top: -44px; width: 34px; height: 44px; filter: drop-shadow(0 3px 4px rgba(28,46,54,.35)); }
.smap-pin path { fill: var(--warn); stroke: #fff; stroke-width: 1.6; }
.smap-pin circle { fill: #fff; }
.smap-pin.drag svg { cursor: grab; }
.smap-lbl { width: 0; height: 0; z-index: 1; }
.smap-lbl i { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: #8a4444; box-shadow: 0 0 0 1.5px #fff; }
.smap-lbl span { position: absolute; left: 6px; top: -9px; white-space: nowrap; font-size: 11px; font-weight: 600; color: var(--ink); background: rgba(255,255,255,.82); padding: 1px 5px; border-radius: 6px; cursor: pointer; }
.smap-stop { width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: var(--lagoon); color: #fff; font: 700 13px/28px inherit; text-align: center; text-decoration: none; box-shadow: 0 0 0 2.5px #fff, 0 3px 8px rgba(28,46,54,.3); z-index: 2; }
.smap-stop.guess { background: var(--sky); }
.smap-zoom { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 4px; z-index: 5; }
.smap-zoom button { width: 36px; height: 36px; padding: 0; border-radius: 10px; background: #fff; color: var(--ink); font-size: 20px; box-shadow: 0 1px 4px rgba(28,46,54,.25); }
.smap-layers { position: absolute; left: 8px; top: 8px; display: flex; background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(28,46,54,.25); overflow: hidden; z-index: 5; }
.smap-layers button { height: 30px; padding: 0 9px; border-radius: 0; background: #fff; color: var(--ink-2); font-size: 12.5px; font-weight: 650; }
.smap-layers button.on { background: var(--lagoon); color: #fff; }
.smap-attr { position: absolute; right: 0; bottom: 0; font-size: 10px; padding: 1px 6px; background: rgba(255,255,255,.8); color: var(--ink-2); border-top-left-radius: 6px; z-index: 5; pointer-events: none; }
.loc-pick { margin: -.2rem 0 .9rem; }
.loc-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .93rem; }
.loc-status svg { color: var(--warn); }
.loc-status .link { margin-inline-start: auto; }
.loc-others { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: .45rem; }
.loc-others button.chip { height: 32px; padding: 0 10px; border-radius: 10px; background: var(--card); color: var(--lagoon-deep); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 13.5px; }
.map-links { display: flex; flex-wrap: wrap; gap: 8px; margin: .6rem 0 .3rem; }
.map-links .button { flex: 1 1 auto; height: 42px; }
.job-loc .link.small { margin-top: .2rem; }
.job-map.loading { height: 220px; border-radius: 16px; background: var(--grey-bg); }
.jobs-map { padding: 10px; }
.jobs-map .place-map { margin-top: 0; }
.pkg-loc { margin: .4rem 0 1rem; }
@media (max-width: 420px) { .smap-layers button { padding: 0 7px; font-size: 12px; } }
.smap-lbl.hidden-lbl span { display: none; }
.loc-status > span { flex: 1 1 12rem; min-width: 0; }
.loc-status > .link { flex: none; }

/* ── naalu ── */
.naalu-pick { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: .6rem; }
.naalu-wheel-wrap { position: relative; width: 150px; flex: none; isolation: isolate; }
.naalu-wheel-wrap::before { content: ''; position: absolute; inset: 0; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); z-index: -2; }
.naalu-wheel-wrap::after { content: ''; position: absolute; left: 6px; right: 6px; top: 44px; height: 44px; border-radius: 10px; background: var(--shallows); z-index: -1; }
.naalu-wheel { height: 132px; overflow-y: auto; scroll-snap-type: y mandatory; border-radius: 14px; scrollbar-width: none; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.naalu-wheel::-webkit-scrollbar { display: none; }
.naalu-wheel .pad { height: 44px; }
.naalu-wheel .opt { height: 44px; line-height: 44px; text-align: center; scroll-snap-align: center; font-size: 20px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; cursor: pointer; padding-right: 34px; }
.naalu-wheel .opt.on { color: var(--ink); font-size: 24px; font-weight: 800; }
.naalu-unit { position: absolute; right: 14px; top: 44px; line-height: 44px; font-size: 13px; font-weight: 700; color: var(--lagoon-deep); pointer-events: none; }
.naalu-other { display: flex; flex-direction: column; gap: 4px; flex: 1 1 120px; min-width: 0; }
.naalu-other span { font-size: .85rem; color: var(--ink-2); font-weight: 600; }
.naalu-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: .5rem; }
.naalu-line.editing { display: block; }
.naalu-line .nl-what { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.naalu-line .nl-act { display: inline-flex; align-items: center; gap: 8px; }
dd .naalu-line { margin-top: 0; }
.naalu-sum small.muted { display: block; font-weight: 500; }
.naalu-total { display: flex; justify-content: space-between; align-items: baseline; }
.naalu-total b { font-size: 1.8rem; letter-spacing: -.02em; }
.naalu-group .ng-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.naalu-group .ng-sum { font-size: 1.2rem; white-space: nowrap; }
.naalu-group .ng-pay { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: .3rem; font-size: .9rem; align-items: center; }
.naalu-group .ng-pay a { display: inline-flex; gap: 5px; align-items: center; }
.naalu-group .ng-pay .iconbtn { width: 30px; height: 30px; }
.ng-rows { margin-top: .7rem; border-top: 1.5px solid var(--line); }
.ng-row { display: flex; align-items: center; gap: 10px; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.ng-row.pick { cursor: pointer; }
.ng-row input[type=checkbox] { width: 20px; height: 20px; flex: none; }
.ng-row .ng-what { flex: 1; min-width: 0; }
.ng-row .ng-what small { display: block; color: var(--ink-3); }
.ng-act { margin-top: .7rem; }
.naalu-note { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); border-left: 4px solid var(--dhoni); }
.naalu-wheel-wrap.off .naalu-wheel, .naalu-wheel-wrap.off .naalu-unit { opacity: .4; }
.naalu-receipt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: .6rem; }
.naalu-receipt .nr-add { cursor: pointer; }
.naalu-receipt .nr-file { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--shallows); font-size: .9rem; max-width: 100%; }
.naalu-receipt .nr-file > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tnote.warn { background: var(--dhoni-bg); color: var(--dhoni-ink); }
.rcheck { display: inline-flex; align-items: flex-start; gap: 6px; font-size: .88rem; color: var(--ink-2); margin-top: .25rem; line-height: 1.35; }
.rcheck svg { margin-top: 1px; }
.rcheck.ok { color: #157A52; }
.rcheck.warn { color: var(--dhoni-ink); background: var(--dhoni-bg); padding: 4px 8px; border-radius: 8px; }
.rcheck small { color: var(--ink-3); }
.nr-reading { display: inline-flex; align-items: center; gap: 6px; }
.nr-reading .spinner { width: 14px; height: 14px; }
.timeline li > div { min-width: 0; overflow-wrap: anywhere; }

/* ── boats ── */
.boat-pick { position: relative; }
.boat-hits { position: absolute; left: 0; right: 0; top: calc(100% - 4px); z-index: 20; background: var(--card); border-radius: 14px; box-shadow: var(--lift), var(--shadow); max-height: 320px; overflow-y: auto; padding: 4px; }
.boat-hits button { display: flex; width: 100%; height: auto; min-height: 48px; align-items: center; gap: 10px; padding: 8px 10px; background: none; color: var(--ink); border-radius: 10px; text-align: start; font-weight: 500; white-space: normal; }
.boat-hits button:hover, .boat-hits button:focus-visible { background: var(--shallows); }
.boat-hits button > span { flex: 1; min-width: 0; display: grid; }
.boat-hits button small { color: var(--ink-3); font-size: 12.5px; }
.boat-hits button svg { color: var(--lagoon); }
.boat-new { padding: 8px 10px; }
.boat-chosen { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--shallows-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.boat-chosen svg { color: var(--lagoon); flex: none; }
.boat-chosen > span { flex: 1; min-width: 0; display: grid; }
.boat-chosen small { color: var(--ink-3); }
.boat-recent { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: .45rem; }
.boat-recent button.chip { height: 32px; padding: 0 10px; border-radius: 10px; background: var(--card); color: var(--lagoon-deep); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 13.5px; }

/* Jetty a boat parcel is handed over at */
.jetty-pick { position: relative; }
.jetty-no { display: grid; gap: 4px; margin-top: .5rem; max-width: 220px; }
.jetty-line { display: flex; gap: 10px; align-items: center; margin: .5rem 0 0; padding: 10px 12px; border-radius: 14px; background: var(--shallows-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.jetty-line > svg { color: var(--lagoon); flex: none; }
.jetty-line > span { flex: 1; min-width: 0; display: grid; }
.jetty-line small { color: var(--ink-3); font-size: 13px; }
.jetty-line .button { flex: none; }
.boat-chosen .link { flex: none; }
.boat-chosen a.link { text-decoration: none; font-weight: 600; }

/* Malé North Harbour berth lookup */
.berth-card { display: grid; gap: 8px; margin: .6rem 0 0; padding: 12px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.berth-card.found { box-shadow: inset 0 0 0 1.5px var(--lagoon); }
.berth-card.muted { display: flex; align-items: center; gap: 8px; }
.berth-head { display: flex; align-items: center; gap: 10px; }
.berth-head > svg { color: var(--lagoon); flex: none; }
.berth-head > span { flex: 1; min-width: 0; display: grid; }
.berth-head small { color: var(--ink-2); font-size: 13px; }
.berth-head .button { flex: none; }
.berth-src { font-size: 12.5px; }
.berth-src .link { font-size: 12.5px; }
.mnh-map { width: 100%; height: auto; display: block; border-radius: 12px; aspect-ratio: 360 / 210; }
.mnh-water { fill: #cfe6f2; }
.mnh-land { fill: #f1efe8; stroke: #c9c4b6; stroke-width: .8; stroke-linejoin: round; }
.mnh-boat { fill: #9db0bd; stroke: #fff; stroke-width: .5; }
.mnh-boat.on { fill: var(--lagoon); stroke: var(--lagoon-deep); stroke-width: .8; }
.mnh-mark circle { fill: none; stroke: var(--lagoon-deep); stroke-width: 1.6; stroke-dasharray: 3 2; }
.mnh-mark text { font-weight: 700; font-size: 9px; fill: var(--lagoon-deep); paint-order: stroke; stroke: #fff; stroke-width: 2.5px; stroke-linejoin: round; }
.mnh-zone { font-weight: 600; font-size: 7px; fill: #8a8577; letter-spacing: .04em; }
.berth-found { display: flex; gap: 8px; align-items: flex-start; margin-top: .45rem; padding: 8px 10px; border-radius: 12px; background: var(--shallows); font-size: 13.5px; }
.berth-found svg { color: var(--lagoon); flex: none; margin-top: 2px; }

/* Job page: parcel code, and the view-only / superadmin editing bar */
.job-code { gap: 8px; align-items: center; flex-wrap: wrap; }
.job-code .mono { font-size: 14px; font-weight: 600; letter-spacing: .04em; color: var(--ink-2); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); border-radius: 8px; padding: 3px 8px; }
.edit-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 .8rem; padding: 10px 12px; border-radius: 14px; background: var(--shallows); box-shadow: inset 0 0 0 1.5px var(--line); }
.edit-banner > svg { color: var(--lagoon); flex: none; }
.edit-banner > span { flex: 1; min-width: 0; display: grid; }
.edit-banner small { color: var(--ink-2); font-size: 13px; }
.edit-banner.on { background: #fff4dc; box-shadow: inset 0 0 0 1.5px #e9b949; }
.edit-banner.on > svg { color: #8a5a00; }
.edit-banner button { flex: none; }
/* Schedule delivery: date and time box with a calendar icon and a hint while it's empty */
.when { position: relative; display: block; direction: ltr; }   /* dates are numbers, so left to right in Dhivehi too */
.when > .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--lagoon); pointer-events: none; }
.when > input { direction: ltr; padding-left: 44px; padding-right: 12px; text-align: left; }
.when-ph { position: absolute; left: 44px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; white-space: nowrap; }
.when-empty input:not(:focus), .when-empty input:not(:focus)::-webkit-datetime-edit { color: transparent; }
.when:focus-within .when-ph { display: none; }
/* Share tracking link menu */
.share { position: relative; display: inline-flex; }
.share > button { display: inline-flex; align-items: center; gap: .4rem; }
.share-menu { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 40; min-width: 230px; max-width: calc(100vw - 32px);
  background: var(--card); border-radius: 14px; box-shadow: 0 10px 30px rgba(28,46,54,.16), inset 0 0 0 1px var(--line); padding: 6px; display: flex; flex-direction: column; }
.share-menu > a, .share-menu > button { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 10px;
  background: none; box-shadow: none; color: var(--ink); font: inherit; font-weight: 500; text-decoration: none; text-align: start; justify-content: flex-start; }
.share-menu > a:hover, .share-menu > button:hover, .share-menu > a:focus-visible, .share-menu > button:focus-visible { background: var(--shallows-2); }
.share-menu .i { color: var(--lagoon); }
.share-url { display: block; padding: 6px 12px 4px; color: var(--ink-3); font-size: .78rem; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; border-top: 1px solid var(--line); margin-top: 4px; }
.center .share-menu { inset-inline-end: auto; left: 50%; transform: translateX(-50%); }
/* Account: roles and superadmin mode */
.stack-sm { display: flex; flex-direction: column; gap: .5rem; }
.role-seg { margin: .2rem 0 0; }
.roles-card .stack-sm + .super-row { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.super-row { display: flex; align-items: center; gap: 1rem; cursor: pointer; }
.super-row > span { flex: 1; display: flex; flex-direction: column; gap: .2rem; }
.super-row b { display: inline-flex; align-items: center; gap: .4rem; }
.super-row small { color: var(--ink-2); }
input.switch { -webkit-appearance: none; appearance: none; width: 50px; height: 30px; min-height: 0; padding: 0; border-radius: 99px; border: 0;
  background: #CFDCDD; position: relative; flex: none; cursor: pointer; transition: background .2s; box-shadow: none; }
input.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
input.switch:checked { background: var(--lagoon); }
input.switch:checked::after { transform: translateX(20px); }
html[dir=rtl] input.switch::after { left: auto; right: 3px; }
html[dir=rtl] input.switch:checked::after { transform: translateX(-20px); }
.role-chips { display: flex; flex-wrap: wrap; gap: 4px; min-width: 150px; }
.role-chip { height: 30px; padding: 0 10px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--card); color: var(--ink-2);
  box-shadow: inset 0 0 0 1.5px var(--line); }
.role-chip.on { background: var(--shallows); color: var(--lagoon-deep); box-shadow: inset 0 0 0 1.5px var(--lagoon); }
.role-chip.in-use::after { content: ' •'; }
.links-cell { display: flex; flex-direction: column; gap: 4px; min-width: 130px; }
/* Users list: one card per person on phones instead of a wide table */
@media (max-width: 640px) {
  .users-table { min-width: 0 !important; }
  .users-table thead { display: none; }
  .users-table, .users-table tbody, .users-table tr, .users-table td { display: block; width: 100%; }
  .users-table tr { padding: 12px 10px; border-bottom: 1px solid var(--line); }
  .users-table td { padding: 3px 0 !important; border: 0 !important; }
  .users-table td:first-child { font-weight: 650; }
  .users-table .links-cell { min-width: 0; }
  .users-table td:empty { display: none; }
  .users-table td:last-child button { width: 100%; margin-top: 6px; }
}
/* Delivery type and the "send by boat?" hint */
.deliv-pick { grid-template-columns: 1fr 1fr; }
.boat-box { margin-bottom: .85rem; }
.boat-suggest { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; margin: -.3rem 0 .85rem; border-radius: 12px; background: var(--sky-bg); color: var(--ink); }
.boat-suggest > span { flex: 1; font-weight: 500; font-size: .92rem; line-height: 1.35; }
.boat-suggest .i { color: var(--sky); }
/* Label: the phone numbers never get cut off; the address gives way first */
.lb-to { display: flex; flex-direction: column; }
.lb-to > * { flex: none; }
.lb-to > .lb-addr { flex: 0 1 auto; min-height: 0; }
.lb-big { overflow-wrap: break-word; }
.labels.s100x150 .lb-big { font-size: 7.5mm; }
.zone-opt.boat > span { display: inline-flex; align-items: center; gap: .35rem; }
.zone-opt.boat .i { color: var(--lagoon); }
.area-riders .area-row { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
/* Parcel photos */
.parcel-photos { display: grid; gap: 6px; margin: .7rem 0 .2rem; }
.parcel-photos .thumb { width: 84px; height: 84px; display: block; background: var(--shallows-2); }
.parcel-photos .thumb.add.busy { opacity: .6; pointer-events: none; }
.pkg-photos { margin-top: 1rem; }
.pkg-photos h4 { margin: 0 0 .2rem; font-size: .95rem; }
.job-thumb { float: right; width: 52px; height: 52px; object-fit: cover; border-radius: 10px; margin: 0 0 4px 10px; background: var(--shallows-2); }
html[dir=rtl] .job-thumb { float: left; margin: 0 10px 4px 0; }
.offer-main { display: block; }
.tphotos .thumbs { margin-top: .5rem; }
.tphotos .thumb { width: 96px; height: 96px; display: block; }
/* Pickup time */
.pickup-modal { max-width: 420px; width: 100%; }
.pickup-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pickup-other { display: flex; gap: 8px; align-items: flex-end; margin: .8rem 0 .3rem; }
.pickup-line { gap: 8px; margin-top: 6px; }
.pill .i { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; }
/* Tracking page: parcel photo fills its card like the route map; tap for a full-size viewer */
.tphoto-card { background: var(--card); }
.tphoto-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.tphoto-strip::-webkit-scrollbar { display: none; }
.tphoto-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 3; padding: 0; margin: 0; border: 0; border-radius: 0; background: var(--shallows); height: auto; box-shadow: none; cursor: zoom-in; display: block; }
.tphoto-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tphoto-count { position: absolute; inset-inline-end: 12px; top: 12px; padding: 5px 9px; border-radius: 99px; background: rgba(28,46,54,.7); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.2; }
.tmap-chip .i { width: 15px; height: 15px; }
.pviewer { position: fixed; inset: 0; z-index: 90; background: rgba(12,22,26,.86); display: flex; align-items: center; justify-content: center; padding: 16px; }
.pviewer-box { position: relative; max-width: min(100%, 900px); max-height: 100%; line-height: 0; }
.pviewer-box img { max-width: 100%; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); object-fit: contain; border-radius: 16px; background: #fff; display: block; }
.pviewer-x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--ink); font-size: 26px; line-height: 1; box-shadow: 0 2px 10px rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; }
.pviewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink); font-size: 26px; line-height: 1; }
.pviewer-nav.prev { left: 10px; } .pviewer-nav.next { right: 10px; }
.pviewer-count { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); padding: 5px 10px; border-radius: 99px; background: rgba(28,46,54,.75); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.2; }
.tproof-in { padding: 10px 14px 14px; border-top: 1.5px solid var(--line); line-height: 1.35; }
.tproof-in .signature { max-height: 64px; }
/* Boat labels: the customer's address on the island sits under the island name; phone right under the name */
.lb-dest-addr { margin-top: calc(.2 * var(--u)); font-size: calc(2.2 * var(--u)); font-weight: 700; text-transform: uppercase; text-align: center; line-height: 1.2;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.labels.s100x150 .lb-dest-addr { font-size: 4mm; -webkit-line-clamp: 5; }
.lb-cust { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: calc(1.2 * var(--u)); }
.lb-cust .lb-tag { margin: calc(.35 * var(--u)) 0 0; }
.lb-cust > span:last-child { display: grid; min-width: 0; }
.lb-cust-name { overflow-wrap: anywhere; }
.lb-cust-tel { display: block; margin-top: calc(.3 * var(--u)); }
.lb-dest.boat { width: calc(28 * var(--u)); gap: calc(.5 * var(--u)); }
.labels.s100x150 .lb-dest.boat { width: 38mm; }
.lb-from b { font-weight: 800; }
/* Notifications */
.nbadge { position: absolute; top: -6px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #E5383B; color: #fff;
  font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--card); pointer-events: none; }
.nbadge.inline { position: static; display: inline-block; margin-inline-start: 8px; box-shadow: none; vertical-align: 1px; }
html[dir=rtl] .nbadge:not(.inline) { right: auto; left: -9px; }
.tab-ic, .has-badge { position: relative; display: inline-flex; }
.notif { width: 100%; background: none; height: auto; text-align: start; display: flex; gap: 12px; align-items: flex-start; border-radius: 0; color: var(--ink); font-weight: 500; }
.notif.unread { background: var(--shallows-2); }
.notif-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--shallows); color: var(--lagoon); }
.notif-ic.urgent { background: var(--warn-bg); color: var(--warn); }
.notif-txt { flex: 1; display: grid; gap: 2px; } .notif-txt small { font-size: 13px; color: var(--ink-2); }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; background: #E5383B; margin-top: 6px; flex: none; }
.required-box { display: grid; gap: 4px; }
.required-box b { display: inline-flex; align-items: center; gap: 6px; }
input.need { border-color: var(--warn) !important; background: #FFF7F6; }
.notif-settings .notif-group { border-top: 1px solid var(--line); padding-top: .6rem; margin-top: .6rem; }
.notif-settings h4 { margin: 0 0 .3rem; font-size: .95rem; }
.notif-pref { padding: .45rem 0; }
.notif-pref b { font-weight: 550; }

/* Phone notifications */
.push-card { display: flex; align-items: center; gap: 12px; max-width: 640px; margin-bottom: 12px; flex-wrap: wrap; }
.push-card > svg { flex: none; color: var(--lagoon); }
.push-card > div:first-of-type { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; }
.push-card small { color: var(--ink-3); }
.push-card.on > svg { color: var(--ok); }
.push-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.push-nudge { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; margin: 0 0 12px; border-radius: 14px;
  background: var(--shallows); color: var(--ink); font-size: 14px; }
.push-nudge > svg { flex: none; color: var(--lagoon); }
.push-nudge > span { flex: 1; min-width: 0; }
.push-nudge .push-x { width: 34px; padding: 0; font-size: 20px; line-height: 1; }
.push-checks { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 6px; }
.push-checks li { display: flex; align-items: center; gap: 8px; color: var(--ink-3); }
.push-checks li.ok { color: var(--ink); }
.push-checks li.ok svg { color: var(--ok); }
.push-made { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; background: var(--shallows-2); }
.push-made ol { padding-inline-start: 20px; margin: 8px 0 0; display: grid; gap: 4px; }

/* Password with show/hide eye */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-inline-end: 48px; }
.pw-eye { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; padding: 0;
  display: grid; place-items: center; background: none; border: 0; box-shadow: none; color: var(--ink-3); border-radius: 10px; }
.pw-eye:hover, .pw-eye[aria-pressed="true"] { color: var(--lagoon); background: var(--shallows-2); }
.pw-eye svg { width: 20px; height: 20px; }
.pw-row { width: 100%; background: none; height: auto; text-align: start; border-radius: 0; }

/* Two-step sign-in */
.mfa-card { text-align: start; }
.mfa-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--shallows); color: var(--lagoon); margin-bottom: 8px; }
.mfa-code { font-size: 26px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; margin: 6px 0 12px; }
.mfa-steps { padding-inline-start: 20px; margin: 4px 0 12px; display: grid; gap: 14px; }
.mfa-steps li > small { display: block; color: var(--ink-3); margin: 2px 0 6px; }
.mfa-qr { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; width: max-content; margin: 6px 0 8px; }
.mfa-qr img { display: block; width: 180px; height: 180px; }
.mfa-secret { display: block; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--shallows-2); font-size: 13px; word-break: break-all; user-select: all; }
.mfa-inline { margin-top: 4px; }
.two-step h3 { display: flex; align-items: center; gap: 6px; }
.two-step-cell { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.two-step-cell .pill { display: inline-flex; align-items: center; gap: 3px; }

/* Backups */
.backup-last { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; margin: 8px 0 12px; }
.backup-last.ok { background: var(--ok-bg); }
.backup-last.ok > svg { color: var(--ok); }
.backup-last.due { background: var(--warn-bg); }
.backup-last.due > svg { color: var(--warn); }
.backup-prog { margin-top: 10px; display: grid; gap: 4px; }
.backup-prog .bar { height: 8px; border-radius: 6px; background: var(--grey-bg); overflow: hidden; }
.backup-prog .bar i { display: block; height: 100%; background: var(--lagoon); transition: width .2s; }
.backup-help { margin-top: 12px; }
.backup-help summary { cursor: pointer; color: var(--lagoon); font-weight: 600; }
.backup-hist td, .backup-hist th { white-space: nowrap; }

/* Storage meters */
.meter { margin-bottom: 12px; }
.meter-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.meter-head span { color: var(--ink-2); white-space: nowrap; }
.meter-bar { height: 10px; border-radius: 6px; background: var(--grey-bg); overflow: hidden; }
.meter-bar i { display: block; height: 100%; border-radius: 6px; background: var(--ok); }
.meter.warn .meter-bar i { background: var(--dhoni); }
.meter.bad .meter-bar i { background: var(--warn); }
.meter small { color: var(--ink-3); }
.storage-facts { padding-inline-start: 18px; margin: 6px 0; display: grid; gap: 4px; }
.storage-table td:nth-child(n+2), .storage-table th:nth-child(n+2) { text-align: end; white-space: nowrap; }

/* ── New parcel: missing fields in red, label before the parcel ── */
.field.bad > .field-label { color: var(--warn); }
.field.bad > input, .field.bad > textarea, .field.bad > select { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); background: #FFF8F7; }
.field.bad .zone-opt, .field.bad .pay-opt { box-shadow: inset 0 0 0 1.5px var(--warn); }
.form-problems { background: var(--warn-bg); color: #B43D39; border-radius: 14px; padding: 10px 14px; font-size: 14px; text-align: start; }
.form-problems ul { margin: 4px 0 0; padding-inline-start: 1.1rem; }
.form-problems li { margin: 1px 0; }
.submit-row { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
@media (min-width: 700px) { .submit-row { align-items: flex-end; } .submit-row .form-problems { min-width: 320px; } }
.label-step { display: grid; gap: 8px; margin: .2rem 0 1rem; padding: 12px 14px; border-radius: 14px; background: var(--shallows); }
.label-step-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.label-step .hint { margin: 0; }
.label-warn { display: block; color: #8a5a00; background: #FFF3D6; padding: 8px 12px; border-radius: 12px; font-size: 14px; }
.label-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--good, #1C7C54); font-weight: 600; }
#draft-labels { position: fixed; inset: 0; z-index: 95; background: var(--paper); overflow: auto; }
.labels-intro { background: var(--shallows); border-radius: 12px; padding: 10px 12px; margin-bottom: 1rem; font-size: 14px; max-width: 640px; }
@media print {
  html.draft-print #app, html.draft-print #toasts, html.draft-print .viewas-bar { display: none !important; }
  html.draft-print #draft-labels { position: static; overflow: visible; background: #fff; }
}

/* ── Unfinished parcel (saved on this phone) ── */
.draft-card { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; box-shadow: inset 0 0 0 1.5px var(--dhoni), var(--shadow); }
.draft-card .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--dhoni-bg); color: var(--dhoni-ink); }
.draft-txt { display: grid; gap: 1px; min-width: 0; }
.draft-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-btns { grid-column: 1 / -1; display: flex; gap: 8px; }
.draft-btns button { flex: 1; }
@media (min-width: 700px) { .draft-card { grid-template-columns: auto 1fr auto; } .draft-btns { grid-column: auto; } .draft-btns button { flex: none; } }
.draft-banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--dhoni-bg); color: var(--dhoni-ink); border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.draft-banner .link { margin-inline-start: auto; }

/* ── Phone layout fixes ── */
/* Notification rows are buttons: start-aligned and wrapping (buttons centre and don't wrap by default, so long ones spilled out both sides) */
.notif { justify-content: flex-start; white-space: normal; }
.notif-txt { min-width: 0; }
.notif-txt b, .notif-txt small { overflow-wrap: anywhere; }
/* The letter in the account button stays centred (the badge style made it a left-aligned flex box) */
.avatar.has-badge { display: inline-grid; place-items: center; }
/* Statement table fits a phone; scrolls inside the card if it still can't */
.sheet-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1rem; }
.sheet-wrap table.sheet { margin-bottom: 0; }
@media (max-width: 600px) {
  table.sheet { font-size: 13px; }
  table.sheet th, table.sheet td { padding: .4rem .25rem; }
  table.sheet .yr { display: none; }
  .stmt-head { gap: 12px; }
}
@media print { .sheet-wrap { overflow: visible; } }

/* ── Back (lib/back.js) ── */
.mtop-start { display: flex; align-items: center; gap: 6px; min-width: 0; }
.back-btn { width: 40px; height: 40px; padding: 0; border-radius: 12px; background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); flex: none; }
.back-btn svg { width: 20px; height: 20px; }
html[dir=rtl] .back-btn svg { transform: scaleX(-1); }
.edge-back { position: fixed; z-index: 120; left: 0; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); color: var(--ink-2); box-shadow: 0 2px 12px rgba(28,46,54,.25); transform: translateX(calc(var(--d, 0px) * .55 - 30px)); pointer-events: none; transition: background .12s, color .12s; }
.edge-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.edge-back.go { background: var(--lagoon); color: #fff; }
html[dir=rtl] .edge-back { left: auto; right: 0; transform: translateX(calc(var(--d, 0px) * -.55 + 30px)); }
html[dir=rtl] .edge-back svg { transform: scaleX(-1); }

/* ── Delete parcels (Settings) ── */
.cleanup-group { margin: 1rem 0; display: grid; gap: 8px; }
.cleanup-group .rows { border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.cleanup-row { grid-template-columns: auto 1fr auto; cursor: pointer; }
.cleanup-row input[type=checkbox] { width: 22px; height: 22px; min-height: 0; accent-color: var(--warn); }
.cleanup-row span { display: grid; gap: 1px; min-width: 0; }
.cleanup-bar { position: sticky; bottom: calc(96px + env(safe-area-inset-bottom)); padding: 10px 0; background: linear-gradient(180deg, rgba(255,255,255,0), var(--card) 35%); z-index: 4; }
@media (min-width: 900px) { .cleanup-bar { bottom: 0; } }

/* ── Cash with riders, rider Earnings (migration 030) ── */
a.stat { color: inherit; text-decoration: none; }
.rider-cash { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 1rem; }
.rider-cash .stat { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.rider-cash .stat b { font-size: 1.25rem; font-weight: 800; }
.rider-cash .stat small { color: var(--ink-3); font-size: 13px; }
.rider-cash .stat.cash b { color: var(--dhoni-ink); }
.rider-cash .stat.on { box-shadow: inset 0 0 0 2.5px var(--lagoon-deep); background: var(--shallows); }
.rider-cash .stat:focus-visible { outline: 3px solid var(--lagoon); outline-offset: 2px; }
.nowrap { white-space: nowrap; }
.pill.tiny { height: 20px; padding: 0 7px; font-size: 11.5px; }
.kicker { color: var(--lagoon-deep); font-weight: 650; font-size: 13.5px; }
.big-amount { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: .7rem; }
.mini-stats > div { background: var(--card); border-radius: 14px; padding: 10px 12px; display: grid; gap: 2px; }
.mini-stats small { color: var(--ink-3); font-size: 12.5px; }
.cash-note { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; gap: 12px; align-items: center; background: var(--dhoni-bg); color: var(--dhoni-ink); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 1rem; }
.cash-note span { display: grid; gap: 1px; }
.cash-note small { color: var(--dhoni-ink); opacity: .8; font-size: 13px; }
.dot-warn { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--dhoni); vertical-align: middle; margin-inline-start: 3px; }
.rows.flat { box-shadow: none; border-radius: 0; background: none; }
.rowi.payout-row { display: block; padding: 0; }
.plain-row { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 14px; }
.plain-row > span { display: grid; gap: 2px; min-width: 0; }
.plain-row small { color: var(--ink-3); font-size: 13.5px; }
.plain-row .amt { font-size: 15.5px; white-space: nowrap; }
.plain-row:focus-visible { outline: 3px solid var(--lagoon); outline-offset: -3px; border-radius: 12px; }
.payout-detail { padding: 0 14px 14px; display: grid; gap: 10px; justify-items: start; }
.rider-sheet td:nth-child(2) { white-space: nowrap; }
.seg.wide { flex-wrap: nowrap; }
.seg.wide button { min-width: 0; padding: 0 8px; }
.rider-sheet td:first-child { white-space: nowrap; }
.seg.zones-how { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.seg.zones-how button { height: auto; min-height: 48px; padding: 6px 6px; line-height: 1.15; white-space: normal; text-align: center; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.seg.zones-how button small { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
@media (max-width: 600px) { .hide-sm { display: none; } }

/* ── Legal pages and footer (pages/legal.js) ── */
.legal-foot { max-width: 1240px; margin: 48px auto 0; padding: 32px 20px 40px; color: var(--ink-2); font-size: 14px; border-top: 1.5px solid var(--line); }
.lf-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; }
.lf-cols > div { display: grid; gap: 6px; align-content: start; }
.lf-cols b { color: var(--ink); font-size: 14.5px; margin-bottom: 2px; }
.lf-cols .lf-k { display: block; color: var(--ink-3); font-size: 12px; font-weight: 600; }
.lf-cols a { color: var(--ink-2); text-decoration: none; width: fit-content; }
.lf-cols a:hover { color: var(--lagoon-deep); text-decoration: underline; }
.lf-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
.lf-base a { color: inherit; }
.legal-wrap { max-width: 1240px; margin: 0 auto; padding: 8px 20px 40px; display: grid; grid-template-columns: 240px minmax(0, 760px); gap: 40px; align-items: start; }
.legal-tabs { position: sticky; top: 16px; display: grid; gap: 4px; }
.legal-tabs a { padding: 10px 14px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.legal-tabs a:hover { background: var(--shallows-2, var(--shallows)); }
.legal-tabs a.on { background: var(--shallows); color: var(--lagoon-deep); }
.legal-wrap:not(:has(.legal-tabs)) { grid-template-columns: minmax(0, 760px); justify-content: center; }
.legal-body { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px; line-height: 1.6; font-size: 15.5px; }
.legal-body h1 { margin: 0 0 .4rem; font-size: 1.9rem; letter-spacing: -.01em; }
.legal-body .lead { color: var(--ink-2); font-size: 1.05rem; margin-top: 0; }
.legal-body h2 { font-size: 1.1rem; margin: 1.6rem 0 .4rem; }
.legal-body ul { padding-inline-start: 1.2rem; margin: .4rem 0; }
.legal-body li { margin: .35rem 0; }
.legal-body a { color: var(--lagoon-deep); }
.legal-date { color: var(--ink-3); font-size: 13.5px; margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 12px; }
.legal-contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 1rem 0 1.4rem; }
.legal-contact a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--shallows); color: var(--ink); text-decoration: none; font-weight: 650; }
.legal-contact a small { display: block; color: var(--ink-3); font-weight: 500; font-size: 13.5px; }
.legal-contact a.wa { background: #25A36A; color: #fff; } .legal-contact a.wa small { color: #D7F3E5; }
.legal-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 1.2rem; }
.legal-dl dt { color: var(--ink-3); font-weight: 600; }
.legal-dl dd { margin: 0; }
.legal-table { border-collapse: collapse; width: 100%; max-width: 420px; margin: .4rem 0 .8rem; }
.legal-table th, .legal-table td { padding: 8px 10px; border-bottom: 1.5px solid var(--line); text-align: left; }
.legal-table .r { text-align: right; }
.t-legal, .auth-legal { font-size: 12.5px; color: var(--ink-3); text-align: center; }
.t-legal a, .auth-legal a { color: inherit; }
@media (max-width: 820px) {
  .legal-wrap { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 4px 12px 28px; }
  .legal-tabs { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .legal-tabs a { white-space: nowrap; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); padding: 8px 12px; font-size: 14px; }
  .legal-body { padding: 20px 18px; font-size: 15px; }
  .legal-body h1 { font-size: 1.55rem; }
}
.kv > .pay-edit { display: block; }
.pay-edit .card { margin: .4rem 0 0; box-shadow: inset 0 0 0 1.5px var(--line); }
.pay-edit .pay-pick { grid-template-columns: minmax(0, 1fr) !important; }
