/* Field Check map app. Same tokens as the reports so the two read as one product. */
:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #1d2621;
  --ink-2: #4d5650;
  --muted: #7b817c;
  --rule: #dfe0da;
  --axis: #c3c2b7;
  --accent: #2a78d6;
  --accent-ink: #ffffff;
  --track: #e6e5df;
  --danger: #b42f2f;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --rule: #2c2c2a;
    --axis: #383835;
    --accent: #3987e5;
    --track: #2c2c2a;
    --danger: #e66767;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--page); color: var(--ink); font: 15px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { display: grid; grid-template-columns: minmax(320px, 380px) 1fr; height: 100%; }
.panel { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; padding: 22px 20px 28px;
  border-right: 1px solid var(--rule); background: var(--page); min-width: 0; }
.panel > * { flex-shrink: 0; } /* the panel scrolls; its parts keep their height */
#map { min-height: 0; }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 56% 44%; }
  .panel { order: 2; border-right: 0; border-top: 1px solid var(--rule); padding: 14px 16px 22px; }
  #map { order: 1; }
}

.brand h1 { font-family: var(--font-head); font-size: 1.65rem; font-weight: 600; margin: 0 0 4px; line-height: 1.1; }
.brand p { margin: 0; color: var(--ink-2); }
h2 { font-family: var(--font-head); font-size: 1.05rem; font-weight: 600; margin: 0 0 8px; }

.search { display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; }
input, select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--axis);
  border-radius: 8px; padding: 8px 10px; width: 100%; }
button { font: 600 14px var(--font-ui); cursor: pointer; border-radius: 8px; padding: 8px 14px;
  border: 1px solid var(--axis); background: var(--surface); color: var(--ink); }
button:hover { background: var(--track); }
button:disabled { opacity: 0.55; cursor: progress; }
.note, .status { margin: 0; color: var(--ink-2); font-size: 0.9rem; }
.note:empty { display: none; }
.error { margin: 0; color: var(--danger); font-size: 0.9rem; }
.error:empty { display: none; }

.seg { display: inline-flex; border: 1px solid var(--axis); border-radius: 8px; overflow: hidden; width: fit-content; }
.seg button { border: 0; border-radius: 0; background: var(--surface); }
.seg button + button { border-left: 1px solid var(--axis); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--page); }

.card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--rule);
  border-radius: 10px; background: var(--surface); }
.picked { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow-y: auto; }
.picked li { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.picked strong { display: block; font-weight: 600; }
.picked span { display: block; color: var(--ink-2); font-size: 0.86rem; }
.picked button { padding: 3px 8px; font-size: 12px; font-weight: 500; }
.total { margin: 0; font-weight: 600; }
.field-row { display: grid; gap: 4px; }
.field-row label { font-size: 0.85rem; color: var(--ink-2); }
.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-size: 15px; padding: 10px 16px; }
.primary:hover { background: var(--accent); filter: brightness(1.08); }
a.primary.link { display: block; text-align: center; text-decoration: none; border-radius: 8px; font-weight: 600; }

.bar { height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.bar span { display: block; height: 100%; width: 3%; border-radius: 4px; background: var(--accent); transition: width 0.6s ease; }
@media (prefers-reduced-motion: reduce) { .bar span { transition: none; } }
.job-msg { margin: 0; color: var(--ink-2); font-size: 0.92rem; }

.recent ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.recent li { display: flex; justify-content: space-between; gap: 10px; font-size: 0.92rem; }
.recent a { color: var(--ink); font-weight: 500; text-decoration-thickness: 1px; text-underline-offset: 2px; min-width: 0; overflow-wrap: anywhere; }
.recent time { color: var(--muted); white-space: nowrap; font-size: 0.85rem; }
.recent .empty { color: var(--muted); }

.maplibregl-ctrl-attrib { font-size: 11px; }
