/* GeoSeal Business dashboard. Self-contained design system (does not load the marketing site's CSS). */

:root {
  --brand: #1fb57a;
  --brand-ink: #0b7a50;
  --brand-soft: #e7f6ef;
  --side: #0b1d17;
  --side-2: #10291f;
  --side-ink: #cfe0d8;
  --side-muted: #86a398;
  --bg: #f4f6f5;
  --card: #ffffff;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --line: #e4e9e7;
  --line-2: #eef2f0;
  --ok: #12805c;   --ok-bg: #e5f5ee;
  --warn: #b25e09; --warn-bg: #fdf1e3;
  --bad: #c4320a;  --bad-bg: #fdeceb;
  --info: #175cd3; --info-bg: #eaf1fd;
  --neutral-bg: #f0f2f1;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.14);
  --r: 12px;
  --r-sm: 8px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1210; --card: #131b18; --ink: #eef3f1; --ink-2: #c9d4cf; --muted: #93a29c; --line: #233029; --line-2: #1a2420;
    --brand-soft: #123326; --brand-ink: #4fd49c;
    --ok: #4fd49c; --ok-bg: #12301f; --warn: #f5b84a; --warn-bg: #33250f; --bad: #ff8a75; --bad-bg: #3a1a14; --info: #84adff; --info-bg: #162441;
    --neutral-bg: #1b2521; --side: #08130f; --side-2: #0d1d17;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.dash { margin: 0; background: var(--bg); color: var(--ink); font: 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
.dash a { color: var(--brand-ink); text-decoration: none; }
.dash a:hover { text-decoration: underline; }
.dash h1, .dash h2, .dash h3 { margin: 0; letter-spacing: -0.01em; color: var(--ink); }
.dash h1 { font-size: 1.55rem; font-weight: 700; }
.dash h2 { font-size: 1.02rem; font-weight: 650; }
.dash h3 { font-size: 0.95rem; font-weight: 650; }
.dash p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.dash-loading { padding: 40px; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 15px; height: 15px; }
.ic.lg { width: 22px; height: 22px; }

/* ------------------------------------------------------------------ buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font: 600 0.9rem/1 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: var(--shadow); transition: background 0.15s, border-color 0.15s; }
.dash a.btn { color: var(--ink-2); text-decoration: none; }
.btn:hover { background: var(--line-2); }
.btn.primary, .dash a.btn.primary { background: var(--brand); border-color: var(--brand); color: #04281a; }
.btn.primary:hover { background: #19a56e; }
.btn.danger, .dash a.btn.danger { color: var(--bad); }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 0.84rem; }
.btn.icon { padding: 0; width: 38px; }
.btn:disabled { opacity: 0.55; cursor: default; }
.dash input:not([type=checkbox]):not([type=radio]):not([type=range]), .dash select, .dash textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--ink);
  font: inherit; box-shadow: var(--shadow); }
.dash textarea { min-height: 80px; resize: vertical; }
.dash input:focus, .dash select:focus, .dash textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 0; border-color: var(--brand); }
.dash input[type=range] { width: 100%; height: 22px; background: transparent; -webkit-appearance: none; appearance: none; }
.dash input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: var(--line); }
.dash input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.dash input[type=range]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--line); }
.dash input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; }
.dash input[type=checkbox] { accent-color: var(--brand); width: 17px; height: 17px; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > span { font-weight: 600; font-size: 0.86rem; color: var(--ink-2); }
.field > small { color: var(--muted); font-size: 0.8rem; }
.form-grid { display: grid; gap: 14px 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.switch { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line-2); cursor: pointer; }
.switch:first-of-type { border-top: 0; }
.dash .switch input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--line); position: relative; flex: none;
  transition: background 0.15s; cursor: pointer; margin: 1px 0 0; }
.dash .switch input[type=checkbox]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform 0.15s; }
.dash .switch input[type=checkbox]:checked { background: var(--brand); }
.dash .switch input[type=checkbox]:checked::after { transform: translateX(16px); }
.dash .switch input[type=checkbox]:disabled { opacity: 0.5; }
.switch b { display: block; font-weight: 600; color: var(--ink); }
.switch span { color: var(--muted); font-size: 0.86rem; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--neutral-bg); gap: 2px; }
.seg a, .seg button { padding: 6px 12px; border-radius: 8px; font: 600 0.86rem var(--font); color: var(--muted); border: 0; background: none; cursor: pointer; text-decoration: none; }
.dash .seg a { color: var(--muted); }
.seg [aria-current="page"], .seg [aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  font: 600 0.82rem var(--font); color: var(--ink-2); cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }

/* ------------------------------------------------------------------ badges, avatars, status */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font: 600 0.76rem/1.6 var(--font); background: var(--neutral-bg); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn, .badge.caution { background: var(--warn-bg); color: var(--warn); }
.badge.bad, .badge.problem { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font: 700 0.8rem var(--font); color: #fff; letter-spacing: 0.02em; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.15rem; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person > div { min-width: 0; }
.person b { display: block; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person small { display: block; color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 45%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ------------------------------------------------------------------ shell */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--side) 252px, var(--bg) 252px); }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 18px 12px 14px; background: var(--side); color: var(--side-ink); overflow-y: auto; }
.side .brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 16px; color: #fff; text-decoration: none; }
.dash .side a.brand:hover { text-decoration: none; }
.side .brand img { width: 46px; height: 46px; flex: none; }
.side .brand b { font-size: 1.5rem; line-height: 1.1; letter-spacing: -0.02em; }
.side .brand b span { color: var(--brand); }
.side .brand small { display: block; margin-top: 2px; font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--side-muted); font-weight: 700; }
.org-box { margin: 0 4px 10px; padding: 10px 12px; border-radius: 10px; background: var(--side-2); border: 1px solid rgba(255,255,255,0.06); }
.org-box small { color: var(--side-muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.org-box select, .org-box strong { display: block; width: 100%; margin-top: 3px; background: transparent; border: 0; color: #fff; font: 650 0.95rem var(--font); padding: 0; box-shadow: none; min-height: 0; }
.org-box select option { color: #111; }
.org-box .plan { margin-top: 6px; display: flex; gap: 6px; align-items: center; color: var(--side-muted); font-size: 0.78rem; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--side-ink); font-weight: 550; text-decoration: none; }
.dash .nav a { color: var(--side-ink); }
.dash .nav a:hover { background: rgba(255,255,255,0.05); text-decoration: none; }
.nav a[aria-current="page"] { background: rgba(31, 181, 122, 0.16); color: #fff; }
.nav a[aria-current="page"] .ic { color: var(--brand); }
.nav .count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #e5484d; color: #fff; font: 700 0.72rem/20px var(--font); text-align: center; }
.nav-label { margin: 14px 12px 4px; color: var(--side-muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.side .tour-btn { margin-top: auto; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; border: 0; background: none; color: var(--side-muted); font: 550 0.9rem var(--font); cursor: pointer; text-align: left; }
.side .tour-btn:hover { color: #fff; background: rgba(255,255,255,0.06); }
.side .me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 2px; border-top: 1px solid rgba(255,255,255,0.08); }
.side .me .me-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: inherit; text-decoration: none; border-radius: 8px; }
.side .me .me-link:hover b { text-decoration: underline; }
.side .me div { min-width: 0; flex: 1; }
.side .me b { display: block; color: #fff; font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .me small { color: var(--side-muted); font-size: 0.76rem; }
.side .me button { background: none; border: 0; color: var(--side-muted); cursor: pointer; padding: 6px; border-radius: 8px; }
.side .me button:hover { color: #fff; background: rgba(255,255,255,0.06); }
.topbar { display: none; }
.main { min-width: 0; padding: 26px clamp(18px, 2.2vw, 48px) 64px; display: grid; gap: 20px; align-content: start; width: 100%; }
.banner { display: flex; gap: 10px; align-items: center; padding: 11px 16px; border-radius: var(--r); font-weight: 600; }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.bad { background: var(--bad-bg); color: var(--bad); }
.page-head { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; justify-content: space-between; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.page-head .tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 0.88rem; }
.dash a.back { color: var(--muted); }
.scrim { display: none; }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; background: var(--bg); }
  .side { position: fixed; z-index: 2000; left: 0; top: 0; bottom: 0; width: min(290px, 86vw); transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: var(--shadow-lg); }
  .app.nav-open .side { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 1999; background: rgba(4, 12, 9, 0.45); }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 1500; padding: 10px 14px; background: var(--side); color: #fff; }
  .topbar .logo { display: inline-flex; padding: 0; }
  .topbar .logo img { width: 34px; height: 34px; }
  .topbar .title { flex: 1; min-width: 0; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar button, .topbar a { color: #fff; background: none; border: 0; padding: 8px; border-radius: 9px; display: inline-flex; position: relative; }
  .topbar .count { position: absolute; top: 2px; right: 0; min-width: 17px; padding: 0 4px; border-radius: 999px; background: #e5484d; font: 700 0.66rem/17px var(--font); text-align: center; }
  .main { padding: 18px 14px 56px; gap: 16px; }
  .dash h1 { font-size: 1.32rem; }
}

/* ------------------------------------------------------------------ cards, KPIs */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-head .sub { color: var(--muted); font-size: 0.84rem; }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 6px 18px; }
.card-foot { padding: 10px 18px; border-top: 1px solid var(--line-2); font-size: 0.86rem; }
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; color: var(--ink); text-decoration: none; }
.dash a.kpi { color: var(--ink); }
.dash a.kpi:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.kpi .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand-ink); }
.kpi.bad .ico { background: var(--bad-bg); color: var(--bad); }
.kpi.warn .ico { background: var(--warn-bg); color: var(--warn); }
.kpi.info .ico { background: var(--info-bg); color: var(--info); }
.kpi span { display: block; color: var(--muted); font-size: 0.84rem; font-weight: 550; }
.kpi strong { display: block; font-size: 1.65rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 0.8rem; }
@media (max-width: 560px) {
  .kpi { padding: 13px 14px; gap: 10px; }
  .kpi .ico { width: 34px; height: 34px; }
  .kpi strong { font-size: 1.35rem; }
}
.grid-2 { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); align-items: start; }
@media (max-width: 1150px) { .grid-2 { grid-template-columns: 1fr; } }
/* Wide windows: the page uses the whole width; side columns grow a little, the main column takes the rest. */
@media (min-width: 1700px) {
  .main { gap: 24px; }
  .grid-2 { gap: 24px; grid-template-columns: minmax(0, 2.1fr) minmax(380px, 1fr); }
  .stack { gap: 24px; }
  .kpis { gap: 18px; }
  .detail { grid-template-columns: minmax(0, 1.3fr) minmax(400px, 1fr); }
  .editor { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
  .map { height: 380px; } .map.tall { height: 520px; } .map.square { height: 420px; }
}
@media (min-width: 2300px) { .grid-2 { grid-template-columns: minmax(0, 2.6fr) minmax(440px, 1fr); } }
.stack { display: grid; gap: 20px; }
.progress { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.progress.warn i { background: #f0a033; }
.progress.bad i { background: #e5484d; }

/* ------------------------------------------------------------------ patrol status */
.patrol { display: grid; grid-template-columns: minmax(170px, 1.1fr) minmax(0, 2fr) auto; gap: 8px 18px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line-2); color: var(--ink); }
.dash a.patrol { color: var(--ink); text-decoration: none; }
.dash a.patrol:hover { background: var(--line-2); text-decoration: none; }
.patrol:first-child { border-top: 0; }
.patrol .name b { display: block; font-weight: 650; }
.patrol .name small { color: var(--muted); font-size: 0.8rem; }
.timeline { display: flex; gap: 3px; align-items: center; min-width: 0; }
.tl.runs { display: flex; gap: 14px; min-width: 0; }
.run { min-width: 0; flex: 1 1 0; }
.run.n1, .run.n2 { flex: 0 1 70px; } .run.n3, .run.n4 { flex: 0.6 1 0; }
.timeline .w { flex: 1 1 0; min-width: 6px; max-width: 40px; height: 22px; border-radius: 5px; background: var(--line-2); position: relative; }
.timeline .w.done { background: var(--brand); }
.timeline .w.missed { background: #e5484d; }
.timeline .w.now { background: repeating-linear-gradient(45deg, color-mix(in srgb, #f0a033 30%, transparent) 0 4px, transparent 4px 8px); box-shadow: inset 0 0 0 2px #f0a033; }
.timeline-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.72rem; margin-top: 3px; font-variant-numeric: tabular-nums; }
.patrol .score { text-align: right; }
.patrol .score strong { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.patrol .score small { color: var(--muted); font-size: 0.78rem; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 0.78rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
@media (max-width: 720px) {
  .patrol { grid-template-columns: 1fr auto; }
  .patrol .tl { grid-column: 1 / -1; grid-row: 2; }
}

/* ------------------------------------------------------------------ lists */
.list { display: grid; }
.row { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line-2); color: var(--ink); min-width: 0; }
.row:first-child { border-top: 0; }
.dash a.row { color: var(--ink); text-decoration: none; }
.dash a.row:hover { background: var(--line-2); text-decoration: none; }
.row .grow { flex: 1; min-width: 0; }
.row .meta { color: var(--muted); font-size: 0.8rem; text-align: right; white-space: nowrap; }
.alert-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.alert-ico.bad { background: var(--bad-bg); color: var(--bad); }
.alert-ico.warn { background: var(--warn-bg); color: var(--warn); }
.alert-ico.info { background: var(--info-bg); color: var(--info); }
.row .title { font-weight: 600; }
.row.top { align-items: flex-start; }
.row .clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .where { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }
.row .desc { color: var(--muted); font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 36px 20px; text-align: center; color: var(--muted); }
.empty .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.empty b { color: var(--ink); font-size: 1rem; }

/* ------------------------------------------------------------------ photos */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar select, .toolbar input { width: auto; min-width: 150px; flex: 1 1 160px; }
.photo-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.photo-grid.strip { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (max-width: 560px) { .photo-grid, .photo-grid.strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.ph { display: grid; overflow: hidden; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.dash a.ph { color: var(--ink); }
.dash a.ph:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.ph .img { position: relative; aspect-ratio: 3 / 4; background: var(--neutral-bg); }
.ph.wide .img { aspect-ratio: 4 / 3; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph .over { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.72)); color: #fff; font-size: 0.8rem; }
.ph .over b { display: block; font-size: 0.88rem; }
.ph .flags { position: absolute; top: 8px; left: 8px; right: 40px; display: flex; flex-wrap: wrap; gap: 4px; }
.ph .flags .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: block; }
.ph .flags .badge { box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.ph .seal { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.92); color: var(--ok); }
.ph .body { padding: 9px 11px 11px; font-size: 0.82rem; color: var(--muted); display: grid; gap: 1px; }
.ph .body b { color: var(--ink); font-weight: 600; font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph.fresh { animation: fresh 2.5s ease-out; }
@keyframes fresh { from { box-shadow: 0 0 0 3px var(--brand); } to { box-shadow: var(--shadow); } }
.wait { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 0.8rem; }

.detail { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.05fr) minmax(320px, 1fr); align-items: start; }
@media (max-width: 1050px) { .detail { grid-template-columns: 1fr; } }
.detail .photo { width: 100%; display: block; border-radius: var(--r); border: 1px solid var(--line); background: #000; }
.sealbox { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); }
.sealbox.ok { background: var(--ok-bg); color: var(--ok); }
.sealbox.bad { background: var(--bad-bg); color: var(--bad); }
.sealbox.warn { background: var(--warn-bg); color: var(--warn); }
.sealbox b { display: block; }
.sealbox p { color: var(--ink-2); font-size: 0.88rem; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 18px; margin: 0; font-size: 0.9rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.section-title { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
/* "How it was taken" (seal.js trustSection) */
.trust { display: grid; gap: 2px; }
.trust h3 { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.trust-line { display: grid; grid-template-columns: 22px 5.5rem 1fr; gap: 8px; align-items: start; padding: 5px 0; font-size: 0.9rem; }
.trust-line svg { width: 19px; height: 19px; margin-top: 1px; }
.trust-line.ok svg { color: var(--ok); }
.trust-line.caution svg { color: var(--warn); }
.trust-line.problem svg { color: var(--bad); }
.trust-line.unknown svg { color: var(--muted); }
.trust-line strong { font-weight: 600; }
.trust-note { margin: 8px 0 0; color: var(--muted); font-size: 0.84rem; }

/* ------------------------------------------------------------------ tables (cards on phones) */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.t th { text-align: left; padding: 10px 18px; color: var(--muted); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: var(--line-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 13px 18px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr.link { cursor: pointer; }
.t tbody tr.link:hover { background: var(--line-2); }
.t .right { text-align: right; }
@media (max-width: 720px) {
  table.t, .t tbody, .t tr, .t td { display: block; width: 100%; }
  .t thead { display: none; }
  .t tr { padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
  .t td { padding: 3px 0; border: 0; }
  .t td[data-label] { display: inline-block; width: auto; margin: 4px 16px 0 0; vertical-align: top; font-size: 0.86rem; }
  .t td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
  .t td.first { margin-bottom: 4px; }
  .t td.first::before { display: none; }
  .t .right { text-align: left; }
}

/* ------------------------------------------------------------------ maps, sites */
.map { height: 320px; border-radius: var(--r); overflow: hidden; z-index: 0; background: var(--neutral-bg); }
.card .map { border-radius: 0 0 var(--r) var(--r); }
.map.tall { height: 420px; }
.map.square { height: 360px; }
.leaflet-container { font: inherit; }
.site-pin { width: 14px; height: 14px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.editor { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
@media (max-width: 1050px) { .editor { grid-template-columns: 1fr; } }
.editor .sticky { position: sticky; top: 20px; }
.days { display: flex; flex-wrap: wrap; gap: 6px; }
.day { position: relative; }
.day input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.day span { display: inline-block; min-width: 44px; padding: 7px 0; text-align: center; border-radius: 8px; border: 1px solid var(--line); font: 600 0.84rem var(--font); color: var(--muted); background: var(--card); }
.day input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.day input:focus-visible + span { outline: 2px solid var(--brand); }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 14px; }
fieldset.plain:disabled { opacity: 0.5; }

/* ------------------------------------------------------------------ people */
.profile { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.profile .who { flex: 1; min-width: 200px; }
.profile .who b { font-size: 1.2rem; display: block; }
.keys { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.keyval { padding: 12px 14px; border-radius: 10px; background: var(--line-2); }
.keyval span { display: block; color: var(--muted); font-size: 0.76rem; font-weight: 600; }
.keyval b { display: block; font-size: 1.05rem; margin-top: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.meter { display: grid; gap: 6px; min-width: 200px; }
.meter .top { display: flex; justify-content: space-between; gap: 14px; font-size: 0.86rem; }

/* ------------------------------------------------------------------ dialogs, toasts */
dialog.dlg { border: 0; border-radius: 14px; padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--card); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog.dlg::backdrop { background: rgba(4, 12, 9, 0.5); }
.dlg .in { padding: 22px; display: grid; gap: 12px; }
.dlg .in p { color: var(--muted); }
.dlg .btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 3000; display: grid; gap: 8px; }
.toast { display: flex; gap: 10px; align-items: center; padding: 11px 16px; border-radius: 10px; background: #102a20; color: #fff; box-shadow: var(--shadow-lg); font-weight: 550; animation: toast 0.2s ease-out; }
.toast.bad { background: #5a1a12; }
@keyframes toast { from { transform: translateY(8px); opacity: 0; } }
@media (max-width: 560px) { .toasts { left: 14px; right: 14px; } }
.notice { padding: 11px 14px; border-radius: 10px; font-size: 0.9rem; }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.info { background: var(--info-bg); color: var(--info); }

/* ------------------------------------------------------------------ sign-in page */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth .pitch { background: radial-gradient(1200px 600px at 0% 0%, #164234 0%, transparent 60%), linear-gradient(160deg, #0b1d17, #07130f); color: #e3eee9;
  padding: 48px clamp(28px, 5vw, 72px); display: flex; flex-direction: column; gap: 28px; justify-content: center; align-items: center; }
/* The pitch is one column centred in its half, like the form beside it (text stays left-aligned). */
.auth .pitch > * { width: 100%; max-width: 580px; }
.auth .pitch .brand { display: flex; align-items: center; gap: 12px; color: #fff; font-size: 1.7rem; font-weight: 800; }
.auth .pitch .brand img { width: 48px; height: 48px; }
.auth .pitch .brand span { color: var(--brand); }
.auth .pitch .brand small { font-size: 0.72rem; letter-spacing: 0.16em; color: #86a398; font-weight: 700; margin-left: 2px; }
.auth .pitch h1 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.15; letter-spacing: -0.03em; max-width: 580px; text-wrap: balance; }
.auth .pitch p.lead { color: #a9c0b6; font-size: 1.05rem; max-width: 580px; }
.auth .feats { display: grid; gap: 16px; max-width: 580px; }
.auth .feat { display: flex; gap: 14px; align-items: flex-start; }
.auth .feat .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(31,181,122,0.15); color: var(--brand); flex: none; }
.auth .feat b { color: #fff; display: block; }
.auth .feat span { color: #a9c0b6; font-size: 0.92rem; }
.auth .price { color: #a9c0b6; font-size: 0.92rem; }
.auth .price b { color: #fff; }
.auth .forms { padding: 48px clamp(20px, 5vw, 64px); display: flex; align-items: center; justify-content: center; }
.auth .box { width: min(420px, 100%); display: grid; gap: 18px; }
.auth .box .card { padding: 26px; display: grid; gap: 14px; }
.auth .fine { color: var(--muted); font-size: 0.82rem; text-align: center; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth .pitch { padding: 32px 22px; gap: 18px; }
  .auth .feats { display: none; }
  .auth .forms { padding: 24px 14px 48px; align-items: flex-start; }
}

/* ------------------------------------------------------------------ printing (tags, join and sign-in cards) */
.print-sheet { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.print-card { background: #fff; color: #111; border: 1px dashed #b9c4bf; border-radius: 14px; padding: 18px 18px 16px; text-align: center; break-inside: avoid; display: grid; gap: 4px; justify-items: center; }
.print-card .org { font-weight: 800; color: #0b7a50; font-size: 0.95rem; }
.print-card h2 { color: #111; font-size: 1.3rem; }
.print-card .qr { display: block; margin: 8px auto; image-rendering: pixelated; }
.print-card .ids { display: flex; gap: 18px; justify-content: center; margin: 2px 0 4px; }
.print-card .ids span { display: block; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: #667085; font-weight: 700; }
.print-card .ids b { font: 700 1.25rem var(--mono); letter-spacing: 0.06em; color: #111; }
.print-card .code { font: 700 1.35rem var(--mono); letter-spacing: 0.08em; color: #111; }
.print-card .how { font-size: 0.8rem; color: #444; max-width: 24em; }
.print-card ol { text-align: left; margin: 6px 0 0; padding-left: 18px; font-size: 0.8rem; color: #333; }
@media print {
  .side, .topbar, .banner, .noprint, .toasts { display: none !important; }
  body.dash, .main { background: #fff; padding: 0; }
  .app { display: block; }
  .print-card { border-color: #ccc; }
}

/* Avatar colours (class set from the name), meter widths, legend swatches: classes, so the page needs no inline styles. */
.avatar.c0 { background: #0f9d6c; } .avatar.c1 { background: #2563eb; } .avatar.c2 { background: #9333ea; } .avatar.c3 { background: #db2777; } .avatar.c4 { background: #ea580c; }
.avatar.c5 { background: #0891b2; } .avatar.c6 { background: #4f46e5; } .avatar.c7 { background: #65a30d; } .avatar.c8 { background: #c2410c; } .avatar.c9 { background: #0d9488; }
.progress i.w0 { width: 0; } .progress i.w5 { width: 5%; } .progress i.w10 { width: 10%; } .progress i.w15 { width: 15%; } .progress i.w20 { width: 20%; } .progress i.w25 { width: 25%; }
.progress i.w30 { width: 30%; } .progress i.w35 { width: 35%; } .progress i.w40 { width: 40%; } .progress i.w45 { width: 45%; } .progress i.w50 { width: 50%; } .progress i.w55 { width: 55%; }
.progress i.w60 { width: 60%; } .progress i.w65 { width: 65%; } .progress i.w70 { width: 70%; } .progress i.w75 { width: 75%; } .progress i.w80 { width: 80%; } .progress i.w85 { width: 85%; }
.progress i.w90 { width: 90%; } .progress i.w95 { width: 95%; } .progress i.w100 { width: 100%; }
.legend .lg-done { background: var(--brand); } .legend .lg-missed { background: #e5484d; } .legend .lg-now { box-shadow: inset 0 0 0 2px #f0a033; } .legend .lg-later { background: var(--line-2); border: 1px solid var(--line); }
.content { min-width: 0; }

/* ------------------------------------------------------------------ authenticator, account */
.auth.single { grid-template-columns: 1fr; background: var(--bg); }
.auth.single .forms { min-height: 100vh; }
.brandline { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
button.linklike { background: none; border: 0; padding: 0; color: var(--muted); font: 600 0.86rem var(--font); cursor: pointer; text-decoration: underline; justify-self: center; }
.steps-list { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.steps-list li::marker { color: var(--muted); font-weight: 700; }
.qr-box { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 10px; }
.qr-box .qr { background: #fff; padding: 8px; border-radius: 10px; image-rendering: pixelated; }
.qr-box .key { font: 600 0.9rem var(--mono); letter-spacing: 0.04em; word-break: break-all; padding: 8px 10px; border-radius: 8px; background: var(--line-2); max-width: 100%; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.codes code { font: 700 1rem var(--mono); letter-spacing: 0.06em; text-align: center; padding: 8px; border-radius: 8px; background: var(--line-2); }

/* ------------------------------------------------------------------ Getting started */
.dash a.row.step .title { color: var(--ink); }
.row.step.done .title { color: var(--muted); text-decoration: line-through; }
.row.step.done .desc { display: none; }
.alert-ico.ok { background: var(--ok-bg); color: var(--ok); }

/* ------------------------------------------------------------------ guided tour */
.tour { position: fixed; inset: 0; z-index: 2500; }
.tour:has(.tour-spot[hidden]) { background: rgba(4, 12, 9, 0.55); }
.tour-spot { position: fixed; left: var(--x, 0); top: var(--y, 0); width: var(--w, 0); height: var(--h, 0); border-radius: 11px; pointer-events: none;
  box-shadow: 0 0 0 3px var(--brand), 0 0 0 9999px rgba(4, 12, 9, 0.55); transition: all 0.25s ease; }
.tour-tip { position: fixed; left: var(--tx, 50%); top: var(--ty, 50%); width: min(350px, calc(100vw - 32px)); padding: 18px 18px 14px; border-radius: 14px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow-lg); display: grid; gap: 8px; transition: top 0.25s ease, left 0.25s ease; }
.tour-tip.center { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 32px)); }
.tour-tip.below { left: 16px; right: 16px; width: auto; }
.tour-tip h3 { margin: 0; font-size: 1.1rem; }
.tour-tip p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.tour-tip .btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.tour-tip .btns .ghost { margin-right: auto; }
.tour-count { color: var(--brand-ink); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-tip { transition: none; } }
@media print { .tour { display: none !important; } }

/* ------------------------------------------------------------------ billing: monthly or yearly */
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.choice { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--card)); }
.choice input { margin-top: 3px; accent-color: var(--brand); width: auto; flex: none; }
.choice > div { display: grid; gap: 2px; min-width: 0; }
.choice .choice-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.choice strong { font-size: 1.02rem; }
.choice small { color: var(--muted); font-size: 0.82rem; }
.auth .price a.pitch-more { color: #8be6c2; font-weight: 650; }

/* Map markers (Google and OpenStreetMap) */
.gmap { width: 100%; height: 100%; }
.mk { position: absolute; line-height: 0; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35)); }
.mk.pin { transform: translate(-50%, -100%); }
.mk.dot { transform: translate(-50%, -50%); }
.mk.link, .mk-leaf.link { cursor: pointer; }
.mk.link:hover { filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45)) brightness(1.08); }
.leaflet-div-icon.mk-leaf, .mk-leaf { background: none; border: 0; }
.mk-leaf .mk { position: static; transform: none; }
.map-legend { padding: 10px 18px 12px; }
.legend .lg-shot { background: #2563eb; border-radius: 50%; }

/* "Continue with Google" (Google's button colours) and the "or" divider */
.btn.google { width: 100%; justify-content: center; gap: 10px; background: #fff; color: #1f1f1f; border: 1px solid #747775; font-weight: 600; }
.btn.google:hover { background: #f6f8f7; text-decoration: none; }
.dash a.btn.google { color: #1f1f1f; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
@media (prefers-color-scheme: dark) {
  .btn.google, .dash a.btn.google { background: #131314; color: #e3e3e3; border-color: #8e918f; }
  .btn.google:hover { background: #1e1f20; }
}
