/* Mobile primeiro: botões grandes para luva, contraste alto sob sol, fonte mínima de 16 px. */
:root {
  --bg: #f4f5f7; --card: #fff; --ink: #0f1115; --muted: #4a5260; --line: #cfd4db;
  --brand: #14181f; --accent: #f0aa28; --ok: #11743a; --warn: #a14d00; --crit: #b3261e; --info: #1d4ed8;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg);
       color: var(--ink); padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
       gap: 12px; padding: 12px 16px; background: var(--brand); color: #fff; }
.brand { font-weight: 700; font-size: 19px; }
.status { display: flex; gap: 8px; align-items: center; }
.net { font-size: 15px; padding: 4px 10px; border-radius: 999px; background: #2b313b; }
.net.off { background: var(--warn); }
.badge { font: inherit; font-size: 15px; border: 0; border-radius: 999px; padding: 4px 12px; background: var(--accent);
         color: #000; font-weight: 700; min-height: 36px; }
main { padding: 16px; max-width: 720px; margin: 0 auto; outline: none; }
h1 { font-size: 22px; margin: 4px 0 12px; }
h2 { font-size: 18px; margin: 20px 0 8px; }
p { margin: 8px 0; }
.muted { color: var(--muted); font-size: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 10px 0; }
.card h3 { margin: 0 0 4px; font-size: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.tag { display: inline-block; font-size: 15px; padding: 2px 10px; border-radius: 999px; background: #e7eaee; color: var(--ink); }
.tag.overdue { background: var(--crit); color: #fff; font-weight: 700; }
.tag.lub { background: #fde7b5; } .tag.insp { background: #dbe7ff; }
.tag.ok { background: #d4f0dd; } .tag.bad { background: #ffd9d6; }
button, .btn { font: inherit; font-weight: 600; min-height: 52px; padding: 12px 18px; border-radius: 12px;
               border: 2px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; text-decoration: none;
               display: inline-flex; align-items: center; justify-content: center; }
button.secondary, .btn.secondary { background: #fff; color: var(--brand); }
button.danger { background: var(--crit); border-color: var(--crit); }
button.block, .btn.block { width: 100%; }
button:disabled { opacity: .55; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input, select, textarea { font: inherit; width: 100%; min-height: 52px; padding: 12px; border: 2px solid var(--line);
                          border-radius: 12px; background: #fff; color: var(--ink); }
textarea { min-height: 96px; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.hint { font-size: 15px; color: var(--muted); margin-top: 6px; }
.error { color: var(--crit); font-weight: 600; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
        background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.tabs a { text-align: center; padding: 16px 2px; font-size: 15px; color: var(--ink); text-decoration: none; font-weight: 600; min-height: 60px; }
.tabs a.active { color: #000; box-shadow: inset 0 -4px 0 var(--accent); }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); background: var(--brand);
         color: #fff; padding: 14px 16px; border-radius: 12px; z-index: 10; max-width: 688px; margin: 0 auto; }
video { width: 100%; border-radius: 12px; background: #000; max-height: 60vh; object-fit: cover; }
.photo-preview { max-width: 100%; border-radius: 10px; margin-top: 8px; }
.list-empty { text-align: center; color: var(--muted); padding: 24px 0; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 8px 0; }
dt { color: var(--muted); } dd { margin: 0; font-weight: 600; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
                   clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.kpi-value { font-size: 28px; font-weight: 700; }
.kpi-label { color: var(--muted); font-size: 15px; }
.kpi.bad .kpi-value { color: var(--crit); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 16px; font-size: 15px; }
.legend-item::before { content: ""; display: inline-block; width: 16px; height: 4px; margin-right: 6px; vertical-align: middle; background: var(--c); }
select { min-height: 48px; }
