/* Patrol Scan — single stylesheet, no framework.
 *
 * Palette from the app icon: deep navy, the shield's cyan, the "Premium" gold.
 * Cyan is a highlight colour, never body text on white (contrast too low): links
 * and accents on light surfaces use the darker --link.
 *
 * The CSP forbids inline style attributes, so anything that varies (bar widths)
 * is a class.
 */

:root {
  --navy-950: #060c18;
  --navy-900: #0b1426;
  --navy-800: #111d36;
  --navy-700: #1a2b4c;
  --navy-600: #284069;
  --cyan: #22d3ee;
  --cyan-soft: rgb(34 211 238 / .14);
  --gold: #ffd60a;
  --gold-soft: rgb(255 214 10 / .16);

  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --ink: #0f1a2e;
  --muted: #5b6b85;
  --link: #0e7490;
  --primary: var(--navy-900);
  --primary-ink: #ffffff;
  --ok: #047857;
  --ok-soft: #e7f6ef;
  --warn: #b45309;
  --warn-soft: #fef3e2;
  --danger: #c2271d;
  --danger-soft: #fdeceb;
  --shadow: 0 1px 2px rgb(15 26 46 / .06), 0 4px 16px rgb(15 26 46 / .05);
  --shadow-lg: 0 20px 50px rgb(6 12 24 / .35);
  --radius: 12px;
  --radius-lg: 18px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --sidebar-w: 248px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070e1c;
    --surface: #0f1a2f;
    --surface-2: #13203a;
    --border: #1f2f4e;
    --border-strong: #2b3f64;
    --ink: #e6edf7;
    --muted: #93a3bd;
    --link: #5fe0f4;
    --primary: var(--cyan);
    --primary-ink: var(--navy-950);
    --ok: #34d399;
    --ok-soft: rgb(52 211 153 / .12);
    --warn: #fbbf24;
    --warn-soft: rgb(251 191 36 / .12);
    --danger: #f87171;
    --danger-soft: rgb(248 113 113 / .12);
    --shadow: 0 1px 2px rgb(0 0 0 / .3);
    color-scheme: dark;
  }
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font: 15px/1.55 var(--font); color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
code { font: .86em/1.4 ui-monospace, "SF Mono", Menlo, monospace; background: var(--surface-2); border: 1px solid var(--border); padding: .05em .4em; border-radius: 6px; word-break: break-all; }
img { max-width: 100%; }
.sprite { display: none; }
.icon { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.icon-sm { width: 18px; height: 18px; vertical-align: -3px; }
.icon-xs { width: 15px; height: 15px; vertical-align: -2px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.pre { white-space: pre-wrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--navy-950); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  font: 600 .92rem/1 var(--font); padding: .7em 1.15em; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { font-size: .85rem; padding: .5em .85em; border-radius: 8px; }
.btn-lg { font-size: 1rem; padding: .85em 1.4em; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { filter: brightness(1.15); }
.btn-accent { background: var(--gold); color: var(--navy-950); }
.btn-accent:hover { background: #ffe14d; }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ghost-light { background: rgb(255 255 255 / .06); color: #fff; border-color: rgb(255 255 255 / .22); }
.btn-ghost-light:hover { background: rgb(255 255 255 / .12); }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.icon-btn:hover { background: rgb(127 127 127 / .14); }
.icon-btn-sm { width: 28px; height: 28px; border-radius: 7px; font-size: .9rem; }

/* ── Badges, tags, alerts ─────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: .3em; font: 600 .74rem/1 var(--font); padding: .35em .6em; border-radius: 999px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--border); white-space: nowrap; }
.badge-rfid, .badge-nfc { background: #e8f1ff; color: #1d4ed8; border-color: #c9dcfb; }
.badge-gps { background: #e7f6ef; color: #047857; border-color: #c4eadb; }
.badge-qr { background: #f3ecff; color: #6d28d9; border-color: #e2d4fd; }
.badge-qrgps { background: #fff1e5; color: #c2410c; border-color: #fbd9bd; }
.badge-late { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
@media (prefers-color-scheme: dark) {
  .badge-rfid, .badge-nfc { background: rgb(96 165 250 / .14); color: #93c5fd; border-color: transparent; }
  .badge-gps { background: rgb(52 211 153 / .14); color: #6ee7b7; border-color: transparent; }
  .badge-qr { background: rgb(167 139 250 / .16); color: #c4b5fd; border-color: transparent; }
  .badge-qrgps { background: rgb(251 146 60 / .16); color: #fdba74; border-color: transparent; }
}
.tag { display: inline-flex; align-items: center; gap: .3em; font: 600 .74rem/1 var(--font); padding: .3em .55em; border-radius: 6px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-muted { background: var(--surface-2); color: var(--muted); }
.tag-live { background: var(--cyan-soft); color: var(--link); }
.tag-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); animation: pulse 2s infinite; }
.tag-role-admin { background: var(--gold-soft); color: #8a6d00; }
.tag-role-supervisor { background: var(--cyan-soft); color: var(--link); }
@media (prefers-color-scheme: dark) { .tag-role-admin { color: var(--gold); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }

.alert { display: flex; gap: .5em; align-items: flex-start; padding: .8em 1em; border-radius: 10px; margin: 0 0 1rem; font-weight: 500; }
.alert .icon { margin-top: 2px; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert a { color: inherit; font-weight: 700; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.field { display: grid; gap: .35em; margin: 0 0 .9rem; }
.field > span { font-weight: 600; font-size: .86rem; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); width: 100%;
  border: 1px solid var(--border-strong); border-radius: 10px; padding: .62em .8em;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px var(--cyan-soft); }
input[readonly] { background: var(--surface-2); color: var(--muted); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--navy-700); }
fieldset { border: 0; padding: 0; margin: 1.2rem 0 .4rem; }
legend { font: 600 .95rem var(--font-display); margin-bottom: .6rem; padding: 0; }
.hint { color: var(--muted); font-size: .84rem; margin: -.5rem 0 .9rem; }
.field-error { color: var(--danger); font-size: .84rem; font-weight: 600; margin: -.5rem 0 .9rem; }
.check { display: flex; gap: .5em; align-items: center; font-weight: 500; margin: .4rem 0 1rem; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.form-actions { display: flex; gap: .6rem; margin-top: 1.2rem; flex-wrap: wrap; }
.form-card { padding: 1.5rem; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; max-width: 1040px; }
.radio-card { display: flex; gap: .7em; align-items: flex-start; padding: .75em .9em; border: 1px solid var(--border); border-radius: 10px; margin-bottom: .5rem; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--link); background: var(--cyan-soft); }
.radio-card input { margin-top: .25em; }
.radio-card span { display: grid; gap: .1em; }
.radio-card small { font-size: .82rem; }

/* ── Cards, layout helpers ────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .8rem; }
.card-head h2, .card-title { font-size: 1rem; margin: 0; display: flex; align-items: center; gap: .45em; }
.card-title { margin-bottom: .8rem; }
.card-foot { border-top: 1px solid var(--border); margin: .9rem -1.2rem -1.1rem; padding: .75rem 1.2rem; font-size: .9rem; font-weight: 600; }
.card-foot a { text-decoration: none; }
.card-foot.row { display: flex; gap: .4rem; }
.stack { display: grid; gap: 1.1rem; align-content: start; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; margin: 1.1rem 0; }
.intro { max-width: 70ch; }
.empty { color: var(--muted); padding: .6rem 0; }
.empty.ok { color: var(--ok); }
.empty-state { text-align: center; padding: 2.5rem 1.5rem; grid-column: 1 / -1; }
.empty-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--cyan-soft); color: var(--link); margin-bottom: .8rem; }
.empty-icon .icon { width: 28px; height: 28px; }
.result-count { margin: 0 0 .6rem; font-size: .88rem; }

/* ── Tables ───────────────────────────────────────────────────────────────── */
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font: 600 .74rem/1 var(--font); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .9rem 1rem .7rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .row-link:hover td { background: var(--surface-2); }
.table td a { color: inherit; text-decoration: none; }
.table td a:hover { color: var(--link); }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form { display: inline; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.table .flags { display: flex; gap: .4rem; align-items: center; color: var(--muted); flex-wrap: wrap; }
.table-compact td { padding: .45rem 0; }
.table-compact td:first-child { padding-right: .6rem; }
tr.is-muted td { opacity: .55; }
.person { display: inline-flex; align-items: center; gap: .65em; }
.person > span:last-child { display: grid; line-height: 1.25; }
.person small { font-size: .8rem; }
.ident { font-size: .82rem; }
.device-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy-700); color: var(--cyan); font: 700 .95rem var(--font-display); flex: none; }
.avatar-sm { width: 30px; height: 30px; font-size: .82rem; }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1rem 0; }

/* ── Filters and tabs ─────────────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; margin-bottom: 1rem; }
.filters .field { margin: 0; }
.field-inline input, .field-inline select { min-width: 140px; }
.field-grow { flex: 1 1 220px; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: .4em; padding: .6rem .9rem; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--cyan); }
.tabs .count { font-size: .75rem; background: var(--surface-2); border-radius: 999px; padding: .1em .5em; }

/* ── App shell ────────────────────────────────────────────────────────────── */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(120% 60% at 0% 0%, #12264a 0%, var(--navy-900) 55%, var(--navy-950) 100%);
  color: #c9d5ea; padding: 1.1rem .8rem; --sprite-cut: var(--navy-900);
}
.sidebar-head { padding: .2rem .5rem 1rem; border-bottom: 1px solid rgb(255 255 255 / .08); }
.org-name { margin: .7rem 0 0; font-size: .84rem; color: #9fb0cc; display: flex; gap: .4em; align-items: center; flex-wrap: wrap; }
.org-name code { background: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .1); color: var(--cyan); font-size: .75rem; }
.sidebar-nav { display: grid; gap: 2px; padding: .9rem 0; overflow-y: auto; flex: 1; }
.sidebar-nav a { display: flex; gap: .7em; align-items: center; padding: .58rem .7rem; border-radius: 9px; color: #c9d5ea; text-decoration: none; font-weight: 500; font-size: .93rem; }
.sidebar-nav a:hover { background: rgb(255 255 255 / .06); color: #fff; }
.sidebar-nav a[aria-current] { background: rgb(34 211 238 / .12); color: #fff; box-shadow: inset 3px 0 0 var(--cyan); }
.sidebar-nav a[aria-current] .icon { color: var(--cyan); }
.nav-group { margin: 1rem .7rem .35rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #6f82a3; font-weight: 700; }
.sidebar-foot { display: flex; align-items: center; gap: .4rem; border-top: 1px solid rgb(255 255 255 / .08); padding-top: .8rem; }
.me { display: flex; align-items: center; gap: .6em; flex: 1; min-width: 0; color: #fff; text-decoration: none; padding: .3rem; border-radius: 9px; }
.me:hover, .me[aria-current] { background: rgb(255 255 255 / .06); }
.me > span:last-child { display: grid; min-width: 0; line-height: 1.25; }
.me b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me small { color: #9fb0cc; font-size: .76rem; }
.sidebar .icon-btn { color: #c9d5ea; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: .8rem;
  padding: .85rem 1.6rem; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); min-height: 66px;
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 1.3rem; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title .back { font-size: .82rem; text-decoration: none; color: var(--muted); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.menu-toggle { display: none; }
.page { padding: 1.4rem 1.6rem 3rem; max-width: 1320px; width: 100%; }
.scrim { position: fixed; inset: 0; background: rgb(6 12 24 / .5); z-index: 40; }

/* ── Brand ────────────────────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: .55rem; font: 700 1.12rem var(--font-display); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand-mark { width: 30px; height: 30px; color: var(--cyan); background: var(--navy-900); border-radius: 9px; padding: 4px; --sprite-cut: var(--navy-900); }
.brand-light { color: #fff; }
.brand-sm { font-size: .95rem; }
.brand-sm .brand-mark { width: 22px; height: 22px; border-radius: 6px; padding: 3px; }

/* ── Language switcher ────────────────────────────────────────────────────── */
.lang-switch { display: inline-flex; align-items: center; gap: .15rem; font-size: .8rem; font-weight: 700; color: var(--muted); }
.lang-switch a { color: inherit; text-decoration: none; padding: .25em .45em; border-radius: 6px; }
.lang-switch a[aria-current] { color: var(--ink); background: var(--surface-2); }

/* ── Dashboard ────────────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.stat { display: flex; align-items: center; gap: .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.stat b { display: block; font: 700 1.55rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: .82rem; line-height: 1.3; display: block; }
.stat-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--cyan-soft); color: var(--link); flex: none; }
.stat-icon-ok { background: var(--ok-soft); color: var(--ok); }
.stat-icon-warn { background: var(--warn-soft); color: var(--warn); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.onboarding { margin-bottom: 1.2rem; border-left: 4px solid var(--gold); }
.checklist { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; }
.live-pill { display: inline-flex; align-items: center; gap: .4em; font: 700 .72rem var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--ok); }
.live-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: blink 1.6s infinite; }
.live-pill.is-off { color: var(--warn); }
@keyframes blink { 50% { opacity: .3; } }
.feed { list-style: none; margin: 0 -1.2rem; padding: 0; }
.feed-row a { display: grid; grid-template-columns: 58px auto minmax(0, 1fr) auto; align-items: center; gap: .8rem; padding: .62rem 1.2rem; color: inherit; text-decoration: none; border-top: 1px solid var(--border); }
.feed-row:first-child a { border-top: 0; }
.feed-row a:hover { background: var(--surface-2); }
.feed-row time { font: 700 .95rem var(--font-display); font-variant-numeric: tabular-nums; display: grid; line-height: 1.15; }
.feed-row time small { font: 500 .7rem var(--font); color: var(--muted); }
.feed-main { display: grid; min-width: 0; line-height: 1.3; }
.feed-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-main small { color: var(--muted); font-size: .82rem; }
.feed-flags { display: flex; gap: .4rem; color: var(--muted); align-items: center; }
.feed-row.is-new a { animation: arrive 2.4s ease-out; }
@keyframes arrive { from { background: var(--cyan-soft); } to { background: transparent; } }
.feed .empty { padding: 1rem 1.2rem; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.people li { display: grid; grid-template-columns: auto 1fr; column-gap: .65rem; align-items: center; }
.people li a { color: inherit; text-decoration: none; }
.people li small { grid-column: 2; font-size: .8rem; }
.people li .avatar { grid-row: span 2; }
.coverage + .coverage { border-top: 1px solid var(--border); margin-top: .8rem; padding-top: .8rem; }
.coverage-head { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; font-size: .9rem; margin-bottom: .5rem; }
.coverage-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.coverage-list li { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: center; font-size: .9rem; padding: .35rem .55rem; border-radius: 8px; }
.coverage-list li.ok { color: var(--ink); }
.coverage-list li.ok .icon { color: var(--ok); }
.coverage-list li.overdue { background: var(--warn-soft); }
.coverage-list li.overdue .icon { color: var(--warn); }
.coverage-list small { color: var(--muted); font-size: .78rem; }

/* ── Entry detail, timeline ───────────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem; align-items: start; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.4rem; margin: 0; }
.facts > div.wide { grid-column: 1 / -1; }
.facts dt { font: 600 .72rem var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .25rem; }
.facts dd { margin: 0; }
.facts-compact { grid-template-columns: 1fr; gap: .7rem; margin-top: 1rem; }
.link-icon { display: inline-flex; align-items: center; gap: .3em; font-size: .86rem; font-weight: 600; text-decoration: none; }
.photo { display: block; width: 100%; border-radius: 10px; border: 1px solid var(--border); margin-bottom: .6rem; }
.hash { font-size: .75rem; }
.integrity { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .88rem; }
.integrity li { display: flex; gap: .5em; align-items: flex-start; }
.integrity li .icon { margin-top: 2px; }
.integrity li.ok .icon { color: var(--ok); }
.integrity li.warn { color: var(--warn); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 74px 1fr; gap: 1rem; position: relative; padding: .35rem 0; }
.timeline li::before { content: ""; position: absolute; left: 86px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline li:first-child::before { top: 50%; }
.timeline li:last-child::before { bottom: 50%; }
.timeline-time { font: 700 .95rem var(--font-display); text-align: right; display: grid; line-height: 1.15; font-variant-numeric: tabular-nums; }
.timeline-time small { font: 500 .72rem var(--font); color: var(--muted); }
.timeline-body { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-left: 1.2rem; padding: .55rem .8rem; border-radius: 10px; color: inherit; text-decoration: none; position: relative; }
.timeline-body::before { content: ""; position: absolute; left: -1.38rem; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 3px var(--surface); }
.timeline-body:hover { background: var(--surface-2); }
.timeline-body small { flex-basis: 100%; }

/* ── Reports ──────────────────────────────────────────────────────────────── */
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.bars li { display: grid; grid-template-columns: 96px 1fr 44px; gap: .7rem; align-items: center; font-size: .86rem; }
.bars b { text-align: right; font-variant-numeric: tabular-nums; }
.bar-label { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--navy-600), var(--cyan)); }
.w-0 { width: 0; } .w-5 { width: 5%; } .w-10 { width: 10%; } .w-15 { width: 15%; } .w-20 { width: 20%; }
.w-25 { width: 25%; } .w-30 { width: 30%; } .w-35 { width: 35%; } .w-40 { width: 40%; } .w-45 { width: 45%; }
.w-50 { width: 50%; } .w-55 { width: 55%; } .w-60 { width: 60%; } .w-65 { width: 65%; } .w-70 { width: 70%; }
.w-75 { width: 75%; } .w-80 { width: 80%; } .w-85 { width: 85%; } .w-90 { width: 90%; } .w-95 { width: 95%; } .w-100 { width: 100%; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li { display: inline-flex; align-items: center; gap: .4em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: .35rem .6rem; font-size: .88rem; }

/* ── Routes ───────────────────────────────────────────────────────────────── */
.route-card.is-active { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.stops { margin: 0; padding-left: 1.3rem; display: grid; gap: .35rem; font-size: .9rem; }
.stop-picker { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; counter-reset: stop; }
.stop-picker li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; border: 1px solid var(--border); border-radius: 10px; padding: .45rem .6rem; background: var(--surface); }
.stop-picker li:has(input:checked) { border-color: var(--link); background: var(--cyan-soft); }
.stop-picker label { display: flex; align-items: center; gap: .55em; flex: 1; cursor: pointer; min-width: 0; }
.stop-picker .move { display: flex; gap: .15rem; }

/* ── QR ───────────────────────────────────────────────────────────────────── */
.qr { background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--border); }
.print-sheet { background: #fff; color: #000; }
.print-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.5rem; border-bottom: 1px solid #e2e8f0; flex-wrap: wrap; }
.print-toolbar p { margin: 0; }
.labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(62mm, 1fr)); gap: 6mm; padding: 1.5rem; }
.label { margin: 0; border: 1px dashed #94a3b8; border-radius: 10px; padding: 5mm; text-align: center; break-inside: avoid; color: #0f1a2e; }
.label img { width: 44mm; height: 44mm; }
.label figcaption { display: grid; gap: 2px; margin-top: 2mm; }
.label b { font: 700 13pt var(--font-display); }
.label small { font-size: 8pt; color: #5b6b85; }
@media print {
  .print-toolbar { display: none; }
  .labels { padding: 0; }
  @page { margin: 10mm; }
}

/* ── Public site ──────────────────────────────────────────────────────────── */
.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(720px, 100% - 2.5rem); }
.site-header { position: sticky; top: 0; z-index: 20; background: rgb(11 20 38 / .82); backdrop-filter: blur(12px); border-bottom: 1px solid rgb(255 255 255 / .06); --sprite-cut: var(--navy-900); }
.site-header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.site-header .brand { color: #fff; }
.site-nav { display: flex; align-items: center; gap: 1.3rem; }
.site-nav > a:not(.btn) { color: #c9d5ea; text-decoration: none; font-weight: 500; font-size: .93rem; }
.site-nav > a:not(.btn):hover { color: #fff; }
.site-nav .btn-outline { background: transparent; color: #fff; border-color: rgb(255 255 255 / .3); }
.site-nav .btn-primary { background: var(--cyan); color: var(--navy-950); }
.site-header .lang-switch { color: #9fb0cc; }
.site-header .lang-switch a[aria-current] { color: #fff; background: rgb(255 255 255 / .1); }

.hero {
  position: relative; overflow: hidden; color: #e6edf7; padding: 5rem 0 6rem; margin-top: -68px; padding-top: calc(68px + 4.5rem);
  background:
    radial-gradient(60% 70% at 85% 30%, rgb(34 211 238 / .18), transparent 60%),
    radial-gradient(50% 60% at 10% 100%, rgb(40 64 105 / .7), transparent 70%),
    linear-gradient(180deg, var(--navy-900), var(--navy-950));
}
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgb(255 255 255 / .035) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .035) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 80%); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 3.5rem; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .45em; font: 600 .78rem var(--font); text-transform: uppercase; letter-spacing: .1em; color: var(--cyan); background: rgb(34 211 238 / .1); border: 1px solid rgb(34 211 238 / .25); border-radius: 999px; padding: .4em .9em; margin-bottom: 1.3rem; }
.eyebrow-dark { color: var(--link); background: var(--cyan-soft); border-color: transparent; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.7rem); line-height: 1.05; letter-spacing: -.03em; color: #fff; margin-bottom: 1.2rem; }
.lead { font-size: 1.12rem; color: #b6c4dc; max-width: 36rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.8rem 0 1.4rem; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; gap: 1.3rem; flex-wrap: wrap; color: #b6c4dc; font-size: .92rem; }
.hero-points .icon { color: var(--gold); }

.hero-visual { position: relative; min-height: 400px; }
.mock { position: absolute; inset: 0 60px 30px 0; background: rgb(17 29 54 / .85); border: 1px solid rgb(255 255 255 / .1); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; backdrop-filter: blur(6px); }
.mock-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid rgb(255 255 255 / .07); }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgb(255 255 255 / .15); }
.mock-body { padding: 18px; display: grid; gap: 16px; }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-stats div { background: rgb(255 255 255 / .04); border: 1px solid rgb(255 255 255 / .07); border-radius: 12px; padding: 12px; }
.mock-stats b { display: block; font: 700 1.5rem var(--font-display); color: #fff; }
.mock-stats b.ok { color: var(--cyan); }
.mock-stats small { color: #8ea0bf; font-size: .75rem; }
.mock-feed { display: grid; gap: 6px; }
.mock-row { display: grid; grid-template-columns: 10px auto 1fr auto; gap: 10px; align-items: center; background: rgb(255 255 255 / .03); border-radius: 10px; padding: 9px 12px; font-size: .86rem; color: #dbe5f5; }
.mock-row time { color: #8ea0bf; font-variant-numeric: tabular-nums; font-size: .8rem; }
.mock-row.warn { background: rgb(255 214 10 / .07); }
.mock-row .badge { border-color: transparent; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3b4f75; }
.dot-live { background: var(--cyan); box-shadow: 0 0 0 4px rgb(34 211 238 / .2); animation: blink 1.6s infinite; }
.dot-warn { background: var(--gold); }
.mock-phone { position: absolute; right: 0; bottom: 0; width: 170px; height: 300px; background: linear-gradient(180deg, #13213d, #0a1222); border: 6px solid #1e2e4d; border-radius: 30px; box-shadow: var(--shadow-lg); display: grid; justify-items: center; align-content: center; gap: 12px; color: #dbe5f5; text-align: center; padding: 14px; }
.mock-phone-notch { position: absolute; top: 8px; left: 50%; width: 54px; height: 14px; margin-left: -27px; border-radius: 10px; background: #0a1222; }
.mock-phone-scan { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: rgb(34 211 238 / .12); color: var(--cyan); box-shadow: 0 0 0 10px rgb(34 211 238 / .06), 0 0 0 22px rgb(34 211 238 / .03); }
.mock-phone-scan .icon { width: 40px; height: 40px; }
.mock-phone p { margin: 0; font-weight: 600; font-size: .86rem; }
.mock-chip { display: inline-flex; gap: .3em; align-items: center; font-size: .72rem; font-weight: 600; color: var(--navy-950); background: var(--gold); border-radius: 999px; padding: .3em .7em; }

.section { padding: 5rem 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { max-width: 720px; margin: 0 auto 2.8rem; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.02em; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.6rem; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgb(15 26 46 / .1); }
.feature p { color: var(--muted); margin: 0; }
.feature-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--navy-900); color: var(--cyan); margin-bottom: 1rem; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; counter-reset: step; }
.step { position: relative; padding: 1.6rem; border-radius: var(--radius-lg); background: var(--bg); border: 1px solid var(--border); }
.step p { color: var(--muted); margin: 0; }
.step-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--gold); color: var(--navy-950); font: 700 1.1rem var(--font-display); margin-bottom: 1rem; }
.trust { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.trust h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.trust-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.trust-list li { display: flex; gap: .7em; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1.1rem; font-weight: 500; }
.trust-list .icon { color: var(--ok); }
.cta-band { background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: #e6edf7; padding: 3.5rem 0; }
.cta-band h2 { color: #fff; font-size: 1.7rem; }
.cta-band p { color: #b6c4dc; margin: 0; }
.cta-band-row { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band .hero-actions { margin: 0; }
.site-footer { background: var(--navy-950); color: #8ea0bf; padding: 1.6rem 0; font-size: .88rem; --sprite-cut: var(--navy-900); }
.site-footer-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-footer p { margin: 0; }
.site-footer .brand { color: #dbe5f5; }
.site-footer nav { display: flex; gap: 1.2rem; }
.site-footer a { color: #b6c4dc; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.prose h2 { margin-top: 2rem; }
.prose p { color: var(--ink); }
.error-page { padding: 3rem 0; }
.error-code { font: 700 4.5rem/1 var(--font-display); color: var(--cyan); margin-bottom: .5rem; }

/* ── Sign-in ──────────────────────────────────────────────────────────────── */
.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-side {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 2.5rem;
  background: radial-gradient(80% 60% at 70% 60%, rgb(34 211 238 / .16), transparent 70%), linear-gradient(160deg, var(--navy-800), var(--navy-950));
  color: #e6edf7; --sprite-cut: var(--navy-900);
}
.auth-quote { font: 700 clamp(1.8rem, 3vw, 2.5rem)/1.1 var(--font-display); color: #fff; letter-spacing: -.02em; max-width: 14ch; position: relative; z-index: 1; }
.auth-sub { color: #b6c4dc; position: relative; z-index: 1; }
.auth-radar { position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; }
.auth-radar span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgb(34 211 238 / .25); animation: radar 4.5s linear infinite; }
.auth-radar span:nth-child(2) { animation-delay: 1.5s; }
.auth-radar span:nth-child(3) { animation-delay: 3s; }
@keyframes radar { from { transform: scale(.2); opacity: 1; } to { transform: scale(1); opacity: 0; } }
.auth-main { display: flex; flex-direction: column; padding: 1.5rem; background: var(--bg); }
.auth-top { display: flex; justify-content: flex-end; align-items: center; gap: 1rem; }
.auth-brand-mobile { display: none; margin-right: auto; }
.auth-card { width: min(400px, 100%); margin: auto; padding: 2rem 0; }
.auth-card h1 { font-size: 1.7rem; }
.auth-card .btn { margin-top: .4rem; }
.auth-card .hint { margin-top: 1.2rem; text-align: center; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid, .detail-grid, .form-layout { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 50; transform: translateX(-102%); transition: transform .22s ease; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .menu-toggle { display: inline-grid; }
  .topbar { padding: .7rem 1rem; }
  .page { padding: 1rem 1rem 3rem; }
  .hero-grid, .trust { grid-template-columns: 1fr; }
  .hero-visual { min-height: 360px; }
  .steps { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-brand-mobile { display: inline-flex; }
  .site-nav > a:not(.btn) { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .hide-sm { display: none; }
  .stats { gap: .6rem; }
  .stat { padding: .8rem; gap: .6rem; }
  .stat-icon { width: 36px; height: 36px; }
  .stat b { font-size: 1.25rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .row-2 { grid-template-columns: 1fr; }
  .filters .field-inline { flex: 1 1 45%; }
  .field-inline input, .field-inline select { min-width: 0; }
  .feed-row a { grid-template-columns: 50px minmax(0, 1fr) auto; }
  .feed-row .badge { display: none; }
  .mock { inset: 0 30px 40px 0; }
  .mock-phone { width: 130px; height: 230px; }
  .mock-row { grid-template-columns: 10px 1fr auto; }
  .mock-row .badge { display: none; }
  .topbar-actions .lang-switch { display: none; }
  .bars li { grid-template-columns: 80px 1fr 36px; }
  .section { padding: 3.5rem 0; }
  .hero { padding-bottom: 4rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* The shield's cut-out quadrants take the colour of whatever is behind the
   icon (set with --sprite-cut on the container). */
.sprite-cut { fill: var(--sprite-cut, #0b1426); }

/* ── Sign-in steps, MFA, team, maps ───────────────────────────────────────── */
.auth-links { margin: -.3rem 0 1rem; font-size: .88rem; text-align: right; }
.auth-card .auth-links:last-child { text-align: center; margin-top: 1rem; }
.auth-secondary { margin-top: .4rem; }
.code-input { font: 600 1.35rem/1.2 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .25em; text-align: center; }
.inline-form { display: inline-flex; gap: .4rem; align-items: center; }
.inline-form select { width: auto; padding: .35em .6em; font-size: .88rem; }
.recovery-codes { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.recovery-codes code { display: block; text-align: center; font-size: .95rem; padding: .4em; }
.disclosure { border-top: 1px solid var(--border); padding-top: .7rem; margin-top: .7rem; }
.disclosure summary { cursor: pointer; font-weight: 600; font-size: .9rem; margin-bottom: .6rem; }
.mfa-setup { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; margin: .5rem 0 1rem; }
.mfa-setup .qr { width: 180px; height: 180px; padding: 8px; }
.mfa-setup .qr svg { width: 100%; height: 100%; display: block; }
.secret { font-size: .85rem; letter-spacing: .08em; }
.blocked { text-align: center; padding: 2.2rem 1.5rem; margin-bottom: 1.1rem; border-top: 4px solid var(--warn); }
.blocked .empty-icon { background: var(--warn-soft); color: var(--warn); }
.map { height: min(62vh, 560px); padding: 0; overflow: hidden; margin-bottom: 1rem; position: relative; z-index: 0; }
.map-empty { position: absolute; inset: auto 0 1rem; margin: 0 auto; width: fit-content; background: var(--surface); padding: .5rem .9rem; border-radius: 10px; box-shadow: var(--shadow); z-index: 500; }
.leaflet-container { font: inherit; background: var(--surface-2); }
.leaflet-popup-content a { font-weight: 600; }

/* ── Tasks ────────────────────────────────────────────────────────────────── */
.tag-task-open { background: var(--cyan-soft); color: var(--link); }
.tag-task-done { background: var(--ok-soft); color: var(--ok); }
.tag-task-cancelled { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }
.thread { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; gap: .7rem; }
.thread-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: .7rem .9rem; max-width: 88%; }
.thread-item p:last-child { margin-bottom: 0; }
.thread-item.is-mine { margin-left: auto; background: var(--cyan-soft); border-color: transparent; }
.thread-origin { max-width: 100%; border-left: 4px solid var(--gold); }
.thread-meta { font-size: .8rem; color: var(--muted); margin-bottom: .3rem; }
.thread-status { font-size: .82rem; color: var(--muted); text-align: center; }
.row-buttons { display: flex; gap: .4rem; flex-wrap: wrap; }
.plain-list { list-style: none; padding: 0; margin: 0 0 .8rem; display: grid; gap: .4rem; }
textarea { resize: vertical; min-height: 4.5rem; }

/* ── Plans, locais, occurrences, SOS, schedule, reports ──────────────────── */
.block { display: block; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.section-title { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; margin: 1.5rem 0 .75rem; }
.btn-xs { padding: .2rem .45rem; font-size: .78rem; }
.alert-info { background: var(--cyan-soft); color: var(--link); }
.code-block { background: var(--navy-900); color: #e6edf7; border-radius: 8px; padding: .75rem 1rem; overflow-x: auto; font-size: .85rem; white-space: pre-wrap; word-break: break-all; }
.upsell { border: 1px dashed var(--border-strong); background: var(--surface-2); }
.tag-sev-baixa { background: var(--surface-2); color: var(--muted); }
.tag-sev-media { background: var(--warn-soft); color: var(--warn); }
.tag-sev-alta { background: var(--danger-soft); color: var(--danger); }

.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.usage-head { display: flex; justify-content: space-between; gap: .5rem; font-size: .88rem; margin-bottom: .35rem; }
.usage-head span { color: var(--muted); }
.usage-full .bar-fill { background: linear-gradient(90deg, var(--warn), var(--danger)); }
.usage-full .usage-head b { color: var(--danger); }

.plan-badge { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .1rem .45rem; border-radius: 999px; vertical-align: middle; }
.plan-badge-essencial { background: var(--surface-2); color: var(--muted); }
.plan-badge-profissional { background: var(--cyan-soft); color: var(--link); }
.plan-badge-completo { background: var(--gold-soft); color: #8a6d00; }
.feature-checks { list-style: none; margin: .75rem 0; padding: 0; display: grid; gap: .45rem; }
.feature-checks li { display: flex; gap: .5rem; align-items: flex-start; }
.feature-checks .icon { color: var(--ok); flex: none; margin-top: .2em; }

.sos-banner { background: var(--danger); color: #fff; padding: .75rem 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; border-radius: var(--radius); margin-bottom: 1rem; animation: pulse 2s infinite; }
.sos-banner a { color: #fff; font-weight: 700; }
.btn-sos { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sos:hover { filter: brightness(1.1); }
.sos-banner .btn-sos { background: #fff; color: var(--danger); }

.week { display: grid; gap: .75rem; }
.week-day .card-title { margin-bottom: .5rem; }
.week-shift { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .4rem 0; border-top: 1px solid var(--border); }
.week-shift:first-child { border-top: 0; }
.week-shift-missed b { color: var(--danger); }

.org-logo, .report-logo { max-height: 64px; max-width: 200px; object-fit: contain; }
.report-page { max-width: 960px; margin: 0 auto; padding: 1.5rem; background: #fff; }
.report-head { display: flex; align-items: center; gap: 1rem; border-bottom: 2px solid var(--ink); padding-bottom: .75rem; margin-bottom: 1rem; }
.report-head h1 { font-size: 1.4rem; margin: 0; }
.report-head p { margin: .2rem 0 0; color: var(--muted); }
.report-table { width: 100%; border-collapse: collapse; font-size: .85rem; margin-bottom: 1rem; }
.report-table th, .report-table td { border: 1px solid var(--border-strong); padding: .35rem .5rem; text-align: left; vertical-align: top; }
.report-table th { background: var(--surface-2); }
.report-foot { color: var(--muted); font-size: .78rem; }
.signature-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 3rem; text-align: center; font-size: .85rem; }
.signature-lines span { display: block; border-top: 1px solid var(--ink); margin-bottom: .3rem; }
.signoff .signature { max-height: 120px; max-width: 320px; display: block; }

/* Public: plans and features */
.page-hero { background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: #e6edf7; padding: 3.5rem 0 3rem; text-align: center; }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.02em; }
.page-hero .lead { color: #b6c4dc; max-width: 680px; margin: .75rem auto 0; }
.page-hero .hero-actions { justify-content: center; margin-top: 1.5rem; }
.section-heading { text-align: center; font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 1.5rem; }
.plan-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; align-items: start; }
.plan-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.plan-card h2 { margin: 0 0 .25rem; }
.plan-card-highlight { border: 2px solid var(--cyan); }
.plan-ribbon { position: absolute; top: -.8rem; left: 1.5rem; background: var(--gold); color: var(--navy-900); font-size: .75rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.plan-price { margin: 1rem 0; }
.plan-price b { font-size: 1.9rem; font-family: "Space Grotesk", sans-serif; }
.plan-price small { color: var(--muted); margin-left: .2rem; }
.faq { max-width: 760px; }
.faq .disclosure { margin-bottom: .5rem; }

@media (max-width: 860px) {
  .grid-2, .plan-cards { grid-template-columns: 1fr; }
  .signature-lines { gap: 1.5rem; }
}
@media print {
  .report-page { padding: 0; max-width: none; }
  .report-page .map { height: 320px; break-inside: avoid; }
  .report-table tr { break-inside: avoid; }
}

/* ── Public: /features selling points and their "screenshots" ─────────────── */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.feature-index { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 2rem; }
.feature-index .chip {
  display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem .45rem .45rem; border-radius: 999px;
  color: #dbe5f5; text-decoration: none; font-size: .88rem; font-weight: 500;
  background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .14); transition: background .15s, border-color .15s;
}
.feature-index .chip:hover { background: rgb(255 255 255 / .12); border-color: rgb(34 211 238 / .5); }
.feature-index .chip .icon { color: var(--cyan); }
.chip-n { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 999px; background: var(--gold); color: var(--navy-950); font: 700 .75rem var(--font-display); }

.feature-point {
  display: grid; gap: clamp(1.5rem, 5vw, 4rem); align-items: center;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  margin: clamp(3.5rem, 8vw, 6rem) 0 0; scroll-margin-top: 90px;
}
.feature-point-flip .feature-point-text { order: 2; }
.feature-point-label { display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 .7rem; color: var(--link); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.feature-point-n { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 12px; background: var(--gold); color: var(--navy-950); font: 700 1.1rem var(--font-display); letter-spacing: 0; }
.feature-point h2 { font-size: clamp(1.6rem, 3.6vw, 2.25rem); letter-spacing: -.02em; margin-bottom: .5rem; }
.feature-point-sub { color: var(--muted); font-size: 1.05rem; margin: 0 0 1.5rem; max-width: 34rem; }
.feature-point-list, .feature-security ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.feature-point-list li, .feature-security li { display: flex; gap: .8rem; align-items: center; font-weight: 500; }
.feature-point-icon { display: grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: var(--cyan-soft); color: var(--link); }
.feature-point-shot {
  position: relative; padding: clamp(1.25rem, 4vw, 2.5rem); border-radius: 24px; overflow: hidden;
  background:
    radial-gradient(70% 60% at 85% 15%, rgb(34 211 238 / .22), transparent 70%),
    radial-gradient(60% 60% at 10% 100%, rgb(255 214 10 / .14), transparent 70%),
    linear-gradient(160deg, var(--navy-800), var(--navy-950));
}
.feature-security { margin: clamp(3.5rem, 8vw, 6rem) 0 4rem; padding: clamp(1.25rem, 4vw, 2rem); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.feature-security h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.3rem; margin-bottom: 1.1rem; }
.feature-security h2 .icon { color: var(--ok); }
.feature-security ul { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.feature-security li { align-items: flex-start; font-size: .92rem; }
.feature-more { margin: 1.4rem 0 0; text-align: center; font-weight: 600; }
.feature-more a { text-decoration: none; }
@media (max-width: 900px) {
  .feature-point { grid-template-columns: 1fr; }
  .feature-point-flip .feature-point-text { order: 0; }
  .feature-security ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .feature-security ul { grid-template-columns: 1fr; }
  .feature-index .chip { font-size: .82rem; }
}

/* The screenshots: always the dark app look, whatever the page theme. */
.shot { --s-bg: #0b1426; --s-card: #111d36; --s-line: rgb(255 255 255 / .09); --s-ink: #e6edf7; --s-muted: #8ea0bf;
  font-size: .82rem; line-height: 1.35; color: var(--s-ink); user-select: none; max-width: 23rem; margin-inline: auto; width: 100%; }
.shot p { margin: 0; }
.shot .icon-xs { width: 14px; height: 14px; }
.shot-card, .shot.shot-card { background: var(--s-card); border: 1px solid var(--s-line); border-radius: 16px; padding: 1rem; box-shadow: var(--shadow-lg); }
.shot-stack { display: grid; gap: .7rem; }
.shot-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.shot-title { display: inline-flex; align-items: center; gap: .45rem; font: 600 .98rem var(--font-display); color: #fff; }
.shot-muted { display: inline-flex; align-items: center; gap: .3rem; color: var(--s-muted); font-size: .75rem; }
.shot .badge { border-color: transparent; }
.shot-good { color: #34d399 !important; }
.shot-warn { color: var(--gold) !important; }
.shot-photo {
  position: relative; display: grid; place-items: center; height: 7.5rem; border-radius: 12px; color: rgb(255 255 255 / .35);
  background: linear-gradient(135deg, #1f3358, #2b4a6e 45%, #3b5f7c 70%, #1a2b4c);
}
.shot-photo > .icon { width: 34px; height: 34px; }
.shot-photo .tag { position: absolute; left: .5rem; bottom: .5rem; background: rgb(4 120 87 / .9); color: #fff; }
.shot-photo-sm { height: 5rem; margin-bottom: .2rem; }
.shot-facts { list-style: none; padding: 0; margin: .7rem 0 0; display: grid; gap: .35rem; }
.shot-facts li { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem .6rem; border-radius: 10px; background: rgb(255 255 255 / .04); }
.shot-facts span { display: inline-flex; align-items: center; gap: .4rem; color: var(--s-muted); }
.shot-facts b { font-variant-numeric: tabular-nums; }
.shot-alert { display: flex; align-items: center; gap: .45rem; margin-top: .6rem !important; padding: .5rem .65rem; border-radius: 10px; font-weight: 600; }
.shot-alert-warn { background: rgb(255 214 10 / .12); color: var(--gold); }
.shot-trail { display: flex; align-items: center; gap: .45rem; margin-top: .5rem !important; color: var(--s-muted); font-size: .75rem; }

.shot-phone { max-width: 15.5rem; padding: .55rem; border-radius: 2.2rem; background: #1e2e4d; box-shadow: var(--shadow-lg); }
.shot-screen { display: grid; justify-items: center; gap: .55rem; padding: 1rem .8rem 1.1rem; border-radius: 1.75rem; background: linear-gradient(180deg, #13213d, var(--s-bg)); text-align: center; }
.shot-signal { justify-self: end; display: inline-flex; align-items: center; gap: .3rem; color: var(--gold); font-size: .7rem; font-weight: 600; }
.shot-scan { display: grid; place-items: center; width: 5rem; height: 5rem; margin-top: .3rem; border-radius: 50%; background: rgb(34 211 238 / .12); color: var(--cyan); box-shadow: 0 0 0 10px rgb(34 211 238 / .06), 0 0 0 22px rgb(34 211 238 / .03); animation: shot-ping 2.4s ease-out infinite; }
.shot-scan .icon { width: 36px; height: 36px; }
@keyframes shot-ping { 0%, 100% { box-shadow: 0 0 0 10px rgb(34 211 238 / .06), 0 0 0 22px rgb(34 211 238 / .03); } 50% { box-shadow: 0 0 0 14px rgb(34 211 238 / .1), 0 0 0 30px rgb(34 211 238 / .04); } }
.shot-scan-text { margin-top: .6rem !important; font-weight: 600; color: #fff; }
.shot-ok { display: inline-flex; align-items: center; gap: .3rem; color: #34d399; font-weight: 600; font-size: .78rem; }
.shot-queue { list-style: none; padding: 0; margin: .3rem 0 0; display: grid; gap: .3rem; width: 100%; }
.shot-queue li { display: grid; grid-template-columns: auto 1fr auto; gap: .45rem; align-items: center; padding: .4rem .5rem; border-radius: 9px; background: rgb(255 255 255 / .04); text-align: left; font-size: .75rem; }
.shot-queue time { color: var(--s-muted); font-variant-numeric: tabular-nums; }
.shot-queue .badge { font-size: .62rem; padding: .3em .45em; }
.shot-pill { display: inline-flex; align-items: center; gap: .3rem; margin-top: .2rem; padding: .3rem .7rem; border-radius: 999px; background: var(--gold); color: var(--navy-950); font-size: .72rem; font-weight: 700; }

.shot-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; margin-bottom: .7rem; }
.shot-kpis span { padding: .5rem .55rem; border-radius: 10px; background: rgb(255 255 255 / .04); border: 1px solid var(--s-line); }
.shot-kpis small { display: block; color: var(--s-muted); font-size: .66rem; }
.shot-kpis b { font: 700 1.15rem var(--font-display); color: #fff; }
.shot-map { display: block; width: 100%; height: auto; border-radius: 10px; background: #0d1830; }
.shot-map-block { fill: rgb(255 255 255 / .05); }
.shot-map-route { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 6 6; }
.shot-map-done { fill: #34d399; stroke: #0d1830; stroke-width: 3; }
.shot-map-missed { fill: var(--gold); stroke: #0d1830; stroke-width: 3; }
.shot-map-here { fill: #fff; stroke: var(--cyan); stroke-width: 4; }

.shot-push { display: grid; grid-template-columns: auto 1fr; gap: .65rem; align-items: center; padding: .7rem .8rem; border-radius: 14px; background: rgb(17 29 54 / .92); border: 1px solid var(--s-line); box-shadow: var(--shadow-lg); }
.shot-push small { display: block; color: var(--s-muted); font-size: .68rem; }
.shot-push b { display: block; color: #fff; }
.shot-push-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 9px; background: var(--cyan); color: var(--navy-950); }
.shot-push-danger { background: #3a1216; border-color: rgb(248 113 113 / .35); }
.shot-push-danger .shot-push-icon { background: #ef4444; color: #fff; animation: pulse 2s infinite; }

.shot-chat { display: grid; gap: .5rem; }
.shot-bubble { max-width: 85%; padding: .5rem .75rem; border-radius: 1rem 1rem 1rem .3rem; background: rgb(255 255 255 / .06); }
.shot-bubble-mine { justify-self: end; border-radius: 1rem 1rem .3rem 1rem; background: var(--cyan); color: var(--navy-950); font-weight: 500; }
.shot-system { display: flex; align-items: center; justify-content: center; gap: .3rem; color: #34d399; font-size: .72rem; font-weight: 600; }
.shot-people { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.shot-people li { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; }
.shot-people .tag { background: rgb(255 255 255 / .07); color: var(--s-muted); }
.shot-people .tag-role-admin { background: rgb(255 214 10 / .16); color: var(--gold); }
.shot-avatar { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 999px; font-size: .66rem; font-weight: 700; color: #fff; }
.shot-a1 { background: #b45309; } .shot-a2 { background: #0891b2; } .shot-a3 { background: #4f46e5; } .shot-a4 { background: #db2777; }
.shot-ranking { margin-top: .8rem; }
.shot-ranking li > span:last-child { font-size: .72rem; font-weight: 700; }
.shot .tag-sev-alta { background: rgb(248 113 113 / .16); color: #fca5a5; }
.shot-print { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; }
.shot-print > span:first-child { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; }
.shot-sign { width: 5rem; height: 1.4rem; border-bottom: 1px solid var(--s-muted); background: no-repeat center/90% 70% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 20'%3E%3Cpath d='M2 15c6-10 10-12 12-6s2 8 6 2 6-9 9-3 3 7 8 1 7-6 10-1 5 4 10-2 8-3 18-1' fill='none' stroke='%2322d3ee' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }

.shot-bars { display: block; width: 100%; height: 5.5rem; }
.shot-bars rect { fill: var(--cyan); }
.shot-bars .shot-bar-low { fill: var(--gold); }
.shot-days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; color: var(--s-muted); font-size: .66rem; margin-top: .25rem; }

/* ── Public: /plans comparison table ──────────────────────────────────────── */
.compare { max-width: 980px; }
.compare-sub { margin: -.75rem auto 1.5rem; color: var(--muted); text-align: center; max-width: 40rem; }
.compare-hint { display: none; margin: 0 0 .5rem; font-size: .8rem; color: var(--muted); align-items: center; gap: .35rem; }
.compare-scroll { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); overscroll-behavior-x: contain; }
.compare-table { width: 100%; min-width: 40rem; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.compare-table th, .compare-table td { padding: .7rem .8rem; border-bottom: 1px solid var(--border); text-align: center; vertical-align: middle; }
.compare-table tbody tr:last-child > * { border-bottom: 0; }
.compare-table thead th { background: var(--surface-2); padding-block: 1rem .85rem; }
.compare-table th[scope="row"], .compare-table .col-feature {
  position: sticky; left: 0; z-index: 2; text-align: left; background: var(--surface);
  width: 40%; min-width: 11rem; font-weight: 500; border-right: 1px solid var(--border);
}
.compare-table thead .col-feature { background: var(--surface-2); z-index: 3; }
.ct-plan { display: block; font: 600 1.05rem var(--font-display); }
.ct-price { display: block; margin-top: .15rem; font-size: .82rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ct-price small { font-weight: 400; }
.ct-value { font-weight: 700; white-space: nowrap; }
.ct-yes { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 999px; background: var(--ok-soft); color: var(--ok); }
.ct-no { color: var(--border-strong); font-weight: 700; }
.ct-group th {
  padding: .55rem .8rem; background: var(--surface-2); text-align: left;
  font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
/* The group label follows the pinned column while the table scrolls. */
.ct-group th span { position: sticky; left: .8rem; }
.compare-table .col-highlight { background: color-mix(in srgb, var(--cyan) 7%, var(--surface)); }
.compare-table thead .col-highlight { background: color-mix(in srgb, var(--cyan) 14%, var(--surface-2)); box-shadow: inset 0 3px 0 var(--cyan); }
@media (max-width: 760px) {
  .compare-hint { display: flex; }
  .compare-table { min-width: 34rem; font-size: .85rem; }
  .compare-table th, .compare-table td { padding: .6rem .55rem; }
  .compare-table th[scope="row"], .compare-table .col-feature { width: 9.5rem; min-width: 9.5rem; max-width: 9.5rem; }
}
