:root { --bg:#f6f5f2; --card:#fff; --ink:#1c1b19; --muted:#6b6860; --line:#e4e1da; --accent:#c2410c; --on-accent:#fff;
  --n0:#9aa0a6; --n1:#2f9e44; --n2:#e8a317; --n3:#e8590c; --n4:#a4161a; --disp:"Bricolage Grotesque",system-ui,sans-serif; }
:root[data-theme="dark"] { color-scheme:dark; --bg:#14130f; --card:#1d1c17; --ink:#efece4; --muted:#a29e92; --line:#34322b; --accent:#f08a4b; --on-accent:#1b1a17;
  --n0:#7b8086; --n1:#51cf66; --n2:#fcc419; --n3:#ff922b; --n4:#ff6b6b; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font:14px/1.45 "IBM Plex Sans",system-ui,sans-serif; }
header { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:24px 32px 18px; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:14px; } .brand svg { width:52px; height:52px; flex:none; }
.brand .wm { color:var(--ink); } .brand .wm b { font-weight:700; color:var(--accent); }
.brand p { margin:4px 0 0; font-size:13px; max-width:640px; color:var(--muted); }
@media (max-width:900px) { header { padding:18px 16px 14px; } .brand .wm { font-size:28px !important; } }
h1,h2,h3 { font-family:var(--disp); letter-spacing:-.01em; }
header a { color:var(--ink); font-weight:600; text-decoration:none; border:1px solid var(--line); background:var(--card); padding:7px 12px; border-radius:8px; }
.layout { display:grid; grid-template-columns:380px 1fr; gap:14px; padding:10px 20px 30px; align-items:start; }
@media (max-width:900px) { .layout { grid-template-columns:1fr; padding:10px 16px 30px; } }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:14px; }
.col { display:flex; flex-direction:column; gap:12px; min-width:0; }
label.t { display:block; font-size:11px; font-weight:600; color:var(--muted); margin:12px 0 4px; text-transform:uppercase; letter-spacing:.04em; }
label.t:first-child { margin-top:0; }
input, select, button { font:inherit; color:var(--ink); background:var(--card); border:1px solid var(--line); border-radius:8px; padding:9px 10px; min-height:40px; }
input[type=text], select { width:100%; }
.pt { position:relative; display:flex; gap:8px; align-items:center; }
.pt .dot { flex:none; width:12px; height:12px; border-radius:50%; border:3px solid var(--ink); } .pt.d .dot { background:var(--accent); border-color:var(--accent); border-radius:3px; }
.pt .box { position:relative; flex:1; min-width:0; }
.sugg { position:absolute; z-index:1200; left:0; right:0; top:100%; background:var(--card); border:1px solid var(--line); border-radius:8px; margin-top:2px; box-shadow:0 8px 24px #0003; max-height:260px; overflow:auto; }
.sugg button { display:block; width:100%; text-align:left; border:0; border-radius:0; border-bottom:1px solid var(--line); font-size:13px; min-height:44px; cursor:pointer; }
.sugg button:hover, .sugg button:focus { background:color-mix(in srgb,var(--accent) 12%,transparent); }
.hint { color:var(--muted); font-size:12px; margin:6px 0 0; }
.seg { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.seg button { cursor:pointer; display:flex; gap:8px; align-items:center; justify-content:center; font-weight:600; }
.seg button.on { background:var(--accent); color:var(--on-accent); border-color:var(--accent); }
.seg svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.go { width:100%; margin-top:16px; background:var(--accent); color:var(--on-accent); border-color:var(--accent); font-weight:600; cursor:pointer; min-height:46px; }
.go:disabled { opacity:.6; cursor:wait; }
.erro { color:var(--n4); margin-top:10px; font-weight:500; }
#map { height:560px; border-radius:10px; border:1px solid var(--line); }
@media (max-width:900px) { #map { height:420px; } }
:root[data-theme="dark"] .leaflet-tile { filter:brightness(.75) contrast(1.1) saturate(.7); }
.rotas { display:flex; flex-direction:column; gap:8px; }
.r { text-align:left; width:100%; padding:12px; cursor:pointer; display:block; line-height:1.35; }
.r.on { border-color:var(--accent); box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 35%,transparent); }
.r .l1 { display:flex; justify-content:space-between; gap:8px; align-items:center; }
.r .nome { font-weight:600; }
.r .m { color:var(--muted); font-size:12.5px; margin-top:3px; }
.via { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 6px; margin:8px 0 2px; font-weight:600; font-size:13px; line-height:1.35; } .via i { font-style:normal; color:var(--accent); } .via small { font-weight:500; color:var(--muted); }
.badge { display:inline-block; padding:2px 9px; border-radius:999px; font-size:12px; font-weight:600; color:#fff; white-space:nowrap; }
.tag { font-size:11px; font-weight:600; padding:1px 7px; border-radius:6px; background:color-mix(in srgb,var(--n1) 22%,transparent); color:var(--ink); margin-left:6px; }
.tag.rap { background:color-mix(in srgb,var(--accent) 20%,transparent); }
.kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(100px,1fr)); gap:8px; }
.kpi .v { font:600 22px/1.1 "IBM Plex Mono",monospace; } .kpi .l { color:var(--muted); font-size:12px; }
.kpi.danger .v { color:var(--n4); }
h3 { margin:0 0 8px; font-size:13px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
.bar { margin:6px 0; font-size:13px; } .bar .lin { display:flex; justify-content:space-between; gap:10px; } .bar .tr { height:7px; background:var(--line); border-radius:4px; overflow:hidden; margin-top:2px; } .bar .tr i { display:block; height:100%; background:var(--accent); }
.horas { display:flex; align-items:flex-end; gap:2px; height:70px; } .horas i { flex:1; background:var(--accent); border-radius:2px 2px 0 0; min-height:1px; opacity:.85; }
.horas-l { display:flex; justify-content:space-between; color:var(--muted); font-size:11px; margin-top:2px; }
.crit { display:block; width:100%; text-align:left; cursor:pointer; margin-bottom:6px; padding:8px 10px; line-height:1.35; }
.leg { display:flex; flex-wrap:wrap; gap:10px; font-size:12px; color:var(--muted); margin-top:8px; } .leg i { display:inline-block; width:22px; height:6px; border-radius:3px; margin-right:5px; vertical-align:middle; }
.nota { color:var(--muted); font-size:12px; line-height:1.5; }
.ic { width:26px; height:26px; border-radius:50%; border:2px solid #fff; box-shadow:0 1px 4px #0007; display:flex; align-items:center; justify-content:center; color:#fff; font:700 10px/1 "IBM Plex Mono",monospace; }
.ic svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.ic.pol { background:#1d4ed8; } .ic.pol2 { background:#6b7280; width:20px; height:20px; } .ic.ped { background:#b45309; } .ic.par { background:#7c3aed; }
.ic.ant { background:var(--card); color:#0e7490; border-color:#0e7490; width:22px; height:22px; } .ic.ant svg { width:15px; height:15px; }
.ic.swr, .ic.sws { border:0; box-shadow:none; border-radius:4px; } .ic.sws { background:linear-gradient(90deg,var(--n1) 0 33%,var(--n2) 33% 66%,var(--n4) 66%); } .ic.swr { background:linear-gradient(90deg,var(--n1) 0 25%,var(--n2) 25% 50%,var(--n3) 50% 75%,var(--n4) 75%); }
.ic.sem { background:#a4161a; width:24px; height:24px; } .ic.sem svg { width:16px; height:16px; }
.camadas { display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:10px; font-size:13px; } .camadas label { display:flex; gap:6px; align-items:center; cursor:pointer; min-height:28px; } .camadas input { min-height:0; width:16px; height:16px; }
.camadas .ic { width:18px; height:18px; border-width:1px; box-shadow:none; } .camadas .ic svg { width:12px; height:12px; }
table.t { width:100%; border-collapse:collapse; font-size:13px; } table.t th { text-align:left; color:var(--muted); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.04em; padding:4px 6px; } table.t td { padding:6px; border-top:1px solid var(--line); vertical-align:top; }
.tw { overflow-x:auto; } .sinalbar { display:flex; height:12px; border-radius:6px; overflow:hidden; margin:6px 0; background:var(--line); } .sinalbar i { display:block; height:100%; }
.warn { color:var(--n4); font-weight:600; }
details.sec { border-top:1px solid var(--line); margin-top:14px; padding-top:2px; }
details.sec > summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:10px; min-height:44px; font-size:13px; font-weight:600; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
details.sec > summary::-webkit-details-marker { display:none; }
details.sec > summary::before { content:""; flex:none; width:8px; height:8px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(-45deg); transition:transform .15s; margin:0 4px 0 2px; }
details.sec[open] > summary::before { transform:rotate(45deg); }
details.sec > summary:hover { color:var(--ink); }
details.sec .resumo { margin-left:auto; text-transform:none; letter-spacing:0; font-weight:500; font-size:13px; color:var(--ink); text-align:right; }
details.sec .corpo { padding:4px 0 6px; }
.ctl { display:flex; gap:8px; justify-content:flex-end; margin-top:12px; } .ctl button { min-height:36px; padding:4px 12px; font-size:12.5px; cursor:pointer; }
.mk { width:26px; height:26px; border-radius:50% 50% 50% 0; transform:rotate(-45deg); border:2px solid #fff; box-shadow:0 1px 4px #0006; } .mk.o { background:var(--ink); } .mk.d { background:var(--accent); }
