:root {
  color-scheme: light;
  --ink: #1b302d;
  --muted: #536761;
  --teal: #15584c;
  --paper: #f5f7f5;
  --line: #d2dcd6;
  --accent: #d8fb75;
  --danger: #a83521;
  font: 100%/1.5 "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; border: 1px solid transparent; padding: .56rem 1rem;
  border-radius: .45rem; color: white; background: var(--teal); font-weight: 650; cursor: pointer;
}
button:hover, .btn:hover { filter: brightness(.94); }
button:disabled { opacity: .55; cursor: wait; }
.secondary { color: var(--ink); background: white; border-color: var(--line); }
.text-button { color: var(--teal); background: transparent; padding: .35rem .4rem; }
:focus-visible { outline: 3px solid #0084ac; outline-offset: 3px; }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; min-height: 44px; padding: .58rem .72rem; color: var(--ink); background: white; border: 1px solid #9aada3; border-radius: .38rem; }
select { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 1.08rem) 50%, calc(100% - .82rem) 50%; background-size: .28rem .28rem; background-repeat: no-repeat; }
textarea { min-height: 8rem; resize: vertical; }
label, legend { font-size: .94rem; font-weight: 630; }
label input, label select, label textarea { margin-top: .28rem; font-weight: 420; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: .5rem; padding: .8rem; margin: 0; }
.choices { max-height: 13rem; overflow-y: auto; display: grid; }
.choices label { padding: .55rem .2rem; display: flex; align-items: center; gap: .65rem; }
.choices input { width: 1.15rem; height: 1.15rem; accent-color: var(--teal); }
.masthead { background: #142d2a; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.4rem; padding: .65rem max(4vw, calc((100vw - 1160px) / 2)); }
.brand { text-decoration: none; color: white; display: inline-flex; align-items: center; gap: .65rem; font-weight: 720; font-size: 1.25rem; letter-spacing: -.04em; white-space: nowrap; }
.mark { width: 1.8rem; height: 1.6rem; display: grid; gap: 3px; transform: skew(-18deg); align-content: center; }
.mark i { display: block; height: 5px; width: 100%; background: var(--accent); border-radius: 1px; }
.mark i:nth-child(2) { width: 70%; }
.mark i:nth-child(3) { width: 42%; }
#account { display: flex; align-items: center; gap: 1rem; font-size: .91rem; }
#account button { color: white; background: transparent; border-color: #5b746b; }
main { max-width: 1160px; margin: auto; padding: 2rem 0 4rem; width: 92%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 660; letter-spacing: -.052em; }
h2 { font-size: 1.35rem; letter-spacing: -.03em; }
h3 { font-size: 1.05rem; }
.muted, .loading { color: var(--muted); }
.eyebrow { font-size: .78rem; font-weight: 740; letter-spacing: .1em; text-transform: uppercase; }
.panel { background: white; border: 1px solid var(--line); border-radius: .75rem; padding: 1.3rem; }
.row, .section-head, .actions { display: flex; gap: .85rem; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: 1rem; }
.section-head { justify-content: space-between; margin: 1.85rem 0 1.2rem; }
.section-head .eyebrow { color: var(--teal); margin-bottom: .35rem; }
.tabs { display: flex; gap: .4rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { background: transparent; color: var(--muted); border: 0; border-radius: 0; border-bottom: 3px solid transparent; padding: .65rem .85rem; white-space: nowrap; }
.tabs [aria-current=page] { border-color: var(--teal); color: var(--teal); }
.login { width: min(100%, 28rem); margin: clamp(1rem, 9vh, 6rem) auto; padding: clamp(1.35rem, 4vw, 2.4rem); border-top: 5px solid var(--teal); box-shadow: 0 .5rem 2rem #16382a09; }
.login h1 { font-size: 2.4rem; }
.login .eyebrow { color: var(--teal); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); background: #e7eee8; border: 1px solid var(--line); border-radius: .7rem; padding: 1.15rem .3rem; }
.metric { display: grid; gap: .15rem; padding: 0 1.15rem; border-right: 1px solid #c4d3c8; }
.metric:last-child { border-right: 0; }
.metric strong { font-size: 1.75rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric span, .helper { font-size: .9rem; color: var(--muted); }
.empty { text-align: center; padding: 2.25rem 1rem; display: grid; justify-items: center; gap: .7rem; }
.date-filter { display: flex; align-items: center; gap: .65rem; }
.date-filter input { width: auto; margin: 0; }
.list-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding: .95rem 0; }
.list-row:first-child { border-top: 0; }
.list-row:last-child { padding-bottom: 0; }
.list-row p { overflow-wrap: anywhere; }
.route-top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: .8rem; }
.route-top h2 { margin: .3rem 0; }
.route-item { border-top: 1px solid var(--line); padding: .25rem 0; }
.route-item summary { display: flex; gap: .7rem; align-items: center; min-height: 48px; cursor: pointer; list-style: none; }
.route-item summary::after { content: '+'; color: var(--muted); }
.route-item[open] summary::after { content: '−'; }
.position { min-width: 2rem; text-align: center; background: #edf2ee; border-radius: .3rem; font-variant-numeric: tabular-nums; font-size: .875rem; font-weight: 650; padding: .2rem; }
.addr { flex: 1; overflow-wrap: anywhere; }
.pill { display: inline-flex; border-radius: 1rem; padding: .15rem .6rem; background: #edf0ed; color: #44534b; font-size: .82rem; font-weight: 620; }
.pill.done { color: #155339; background: #daf0dd; }
.report-detail { padding: .5rem 0 1rem 2.7rem; }
.photos { display: flex; flex-wrap: wrap; gap: .65rem; }
.photos img { width: 5rem; height: 5rem; object-fit: cover; border-radius: .3rem; }
dialog { color: var(--ink); width: min(94vw, 34rem); max-height: 88dvh; border: 1px solid var(--line); border-radius: .8rem; padding: 1.45rem; }
dialog::backdrop { background: #0c2422a8; }
.actions { justify-content: flex-end; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.error { color: var(--danger); font-weight: 570; }
.error:empty, .notice:empty { display: none; }
.notice { background: #ddf2df; padding: .7rem 1rem; border-radius: .4rem; }
@media(max-width: 600px) {
  .masthead { padding-inline: 4%; }
  main { padding-top: .8rem; }
  .tabs { gap: 0; }
  .tabs button { padding-inline: .58rem; font-size: .92rem; }
  .section-head { margin-top: 1.4rem; }
  .metric { padding: 0 .65rem; }
  .metric span { font-size: .84rem; }
  .two { grid-template-columns: 1fr; }
  .report-detail { padding-left: .2rem; }
  #account span { display: none; }
}
