/*
 * Giro — tema claro (padrão) e tema escuro.
 * O tema vem de <html data-tema="claro|escuro">, definido antes da página aparecer (ver comum.js / <head>).
 * Todas as cores que mudam com o tema são variáveis; o resto do arquivo só usa as variáveis.
 * `.papel` = folhas de impressão (sempre claras).
 */
:root {
  /* superfícies */
  --bg: #f3f5f9;
  --bg-luz-1: rgba(47, 107, 255, .10);
  --bg-luz-2: rgba(8, 145, 178, .06);
  --card: #ffffff;
  --card-2: #fbfcfe;
  --sup: rgba(15, 23, 42, .035);
  --sup-2: rgba(15, 23, 42, .055);
  --sup-3: rgba(15, 23, 42, .09);
  --borda: rgba(15, 23, 42, .09);
  --borda-2: rgba(15, 23, 42, .16);
  --vidro: rgba(255, 255, 255, .8);
  --vidro-forte: rgba(255, 255, 255, .94);
  --modal: #ffffff;
  --campo: #ffffff;
  --btn-sec: #ffffff;
  --menu: rgba(255, 255, 255, .86);
  --th: #f7f9fc;
  --termo: #f8fafc;
  --tooltip: rgba(255, 255, 255, .98);
  --fundo-modal: rgba(15, 23, 42, .42);
  --toast: #ffffff;
  --toast-txt: #0f172a;
  --palco: radial-gradient(70% 60% at 50% 66%, rgba(47, 107, 255, .14), transparent 70%), linear-gradient(180deg, #f4f7fc, #dfe7f3);
  --vsvg: #a9b8d2;
  --avatar: linear-gradient(135deg, #dfe8ff, #f2f6ff);
  --diag-corpo: #f1f5fb;
  --diag-corpo-borda: #c3cede;
  --diag-zona: #ffffff;
  /* texto */
  --texto: #0f172a;
  --texto-2: #5a6478;
  --texto-3: #8b94a7;
  --texto-campo: #334155;
  --ativo-txt: #1d4fd8;
  /* marca e estados */
  --azul: #2f6bff;
  --azul-forte: #2f6bff;
  --azul-txt: #1d4fd8;
  --azul-suave: rgba(47, 107, 255, .10);
  --azul-borda: rgba(47, 107, 255, .42);
  --ciano: #0e7490;
  --ciano-vivo: #06b6d4;
  --barra-hoje: linear-gradient(180deg, #38c6e6, #0e9ab8);
  --verde: #1f9d55;
  --verde-txt: #15803d;
  --ambar: #c27c0e;
  --ambar-txt: #9a5b00;
  --vermelho: #dc2f45;
  --vermelho-txt: #c01f36;
  /* gravidade da avaria (cores de status: sempre com texto junto) */
  --leve: #f5b014;
  --moderada: #f0802e;
  --grave: #dc3a44;
  --leve-txt: #8a5a00;
  --moderada-txt: #b4470c;
  --grave-txt: #b81d2f;
  /* situação da frota (gráficos) */
  --st-disp: #1f9d55;
  --st-uso: #2f6bff;
  --st-avaria: #c27c0e;
  --st-inativo: #9aa3b5;
  --inativo: #9aa3b5;
  /* efeitos */
  --brilho: 0;
  --sombra: 0 12px 34px rgba(15, 23, 42, .12);
  --sombra-card: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px rgba(15, 23, 42, .04);
  --raio: 18px;
  --fonte: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "SF Pro Text", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fonte-disp: "Inter Display", "Segoe UI Variable Display", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", "Roboto Mono", Consolas, monospace;
  color-scheme: light;
}

:root[data-tema="escuro"] {
  --bg: #05070d;
  --bg-luz-1: rgba(61, 123, 255, .20);
  --bg-luz-2: rgba(95, 227, 255, .06);
  --card: rgba(255, 255, 255, .05);
  --card-2: rgba(255, 255, 255, .02);
  --sup: rgba(255, 255, 255, .035);
  --sup-2: rgba(255, 255, 255, .06);
  --sup-3: rgba(255, 255, 255, .09);
  --borda: rgba(255, 255, 255, .08);
  --borda-2: rgba(255, 255, 255, .15);
  --vidro: rgba(5, 7, 13, .72);
  --vidro-forte: rgba(12, 17, 29, .82);
  --modal: linear-gradient(180deg, #111829, #0a0f1b);
  --campo: rgba(255, 255, 255, .04);
  --btn-sec: rgba(255, 255, 255, .06);
  --menu: rgba(8, 11, 19, .7);
  --th: rgba(8, 11, 19, .9);
  --termo: rgba(0, 0, 0, .25);
  --tooltip: rgba(10, 14, 24, .95);
  --fundo-modal: rgba(2, 4, 9, .72);
  --toast: rgba(17, 24, 41, .96);
  --toast-txt: #ffffff;
  --palco: radial-gradient(70% 60% at 50% 62%, rgba(95, 227, 255, .07), transparent 70%), linear-gradient(180deg, #0a0f1c, #05070d);
  --vsvg: #3a4a6e;
  --avatar: linear-gradient(135deg, #22335c, #121a2e);
  --diag-corpo: rgba(255, 255, 255, .03);
  --diag-corpo-borda: rgba(255, 255, 255, .18);
  --diag-zona: rgba(255, 255, 255, .05);
  --texto: #eef2fb;
  --texto-2: #8d97ab;
  --texto-3: #5d6679;
  --texto-campo: #c9d1e2;
  --ativo-txt: #ffffff;
  --azul: #3d7bff;
  --azul-txt: #7ea6ff;
  --azul-suave: rgba(61, 123, 255, .18);
  --azul-borda: rgba(61, 123, 255, .5);
  --ciano: #5fe3ff;
  --ciano-vivo: #5fe3ff;
  --barra-hoje: linear-gradient(180deg, #8ff0ff, #3fc8ef);
  --verde: #22b866;
  --verde-txt: #4ee08f;
  --ambar: #d18a0e;
  --ambar-txt: #ffbe4d;
  --vermelho: #e0344c;
  --vermelho-txt: #ff6b7d;
  --leve-txt: #ffd36b;
  --moderada-txt: #ffa65a;
  --grave-txt: #ff6b7d;
  --st-disp: #22b866;
  --st-uso: #3d7bff;
  --st-avaria: #d18a0e;
  --st-inativo: #4a5265;
  --inativo: #4a5265;
  --brilho: 1;
  --sombra: 0 10px 40px rgba(0, 0, 0, .35);
  --sombra-card: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; font-family: var(--fonte); color: var(--texto); font-size: 16px; line-height: 1.45; min-height: 100vh;
  background:
    radial-gradient(900px 420px at 50% -220px, var(--bg-luz-1), transparent 70%),
    radial-gradient(700px 380px at 100% 0%, var(--bg-luz-2), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--azul-txt); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-family: var(--fonte-disp); letter-spacing: -.02em; }
h1 { font-size: 1.9rem; font-weight: 700; letter-spacing: -.035em; }
h1 .qtd, h2 .qtd { color: var(--texto-3); font-weight: 600; margin-left: .25em; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .75em; }
.sub { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-2); margin: -4px 0 18px; }
.sub b { color: var(--texto); font-weight: 600; }
.rotulo { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--texto-2); }
.muted { color: var(--texto-2); }
.small { font-size: .86rem; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num-tab { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.cab-secao { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.cab-secao h1 { margin: 0; }

/* ------------------------------------------------ marca */
.marca { display: flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -.03em; color: var(--texto); text-decoration: none; }
.marca svg { width: 34px; height: 34px; flex: none; }
.marca span { font-size: 1.25rem; font-family: var(--fonte-disp); }
.marca small { display: block; font-family: var(--mono); font-weight: 500; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--texto-2); }

/* ------------------------------------------------ topo */
.topo {
  position: sticky; top: 0; z-index: 20; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--vidro); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--borda);
}
.topo .acoes { display: flex; gap: 8px; align-items: center; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem;
  background: var(--avatar); border: 1px solid var(--borda-2); color: var(--texto); padding: 0; min-height: 0; box-shadow: none;
}

/* ------------------------------------------------ containers */
.pagina { max-width: 680px; margin: 0 auto; padding: 18px 16px calc(110px + env(safe-area-inset-bottom)); }
.card {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--borda); border-radius: var(--raio); padding: 16px; box-shadow: var(--sombra-card);
}
.card + .card { margin-top: 12px; }
.card.destaque { border-color: var(--azul-borda); background: linear-gradient(180deg, rgba(61, 123, 255, .12), rgba(61, 123, 255, .02) 70%), var(--card); box-shadow: 0 0 0 1px rgba(61, 123, 255, .08), 0 18px 50px rgba(47, 107, 255, .12); }
.card.alerta { border-color: rgba(214, 150, 20, .4); background: linear-gradient(180deg, rgba(255, 176, 32, .13), rgba(255, 176, 32, .03)), var(--card); }
.card.perigo { border-color: rgba(220, 47, 69, .38); background: linear-gradient(180deg, rgba(224, 52, 76, .12), rgba(224, 52, 76, .03)), var(--card); }
.card.vazio, .vazio { padding: 28px; text-align: center; color: var(--texto-2); }
.vazio > svg { width: 38px; height: 38px; color: var(--azul-txt); opacity: .8; }
.card h2 { margin-bottom: 12px; }

/* ------------------------------------------------ botões e campos */
button, .btn {
  font: inherit; font-weight: 600; border: 0; border-radius: 12px; cursor: pointer;
  padding: 12px 18px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--azul-forte); color: #fff; text-decoration: none; transition: filter .15s, transform .05s, background .15s, border-color .15s;
  box-shadow: 0 6px 22px rgba(47, 107, 255, .26), inset 0 1px 0 rgba(255, 255, 255, .18);
}
button svg, .btn svg, .menu-lateral a svg { width: 18px; height: 18px; flex: none; }
button:hover, .btn:hover { filter: brightness(1.08); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.sec, .btn.sec { background: var(--btn-sec); color: var(--texto); border: 1px solid var(--borda-2); box-shadow: none; }
button.sec:hover, .btn.sec:hover { background: var(--sup-2); filter: none; }
button.perigo, .btn.perigo { background: var(--vermelho); box-shadow: 0 6px 22px rgba(224, 52, 76, .26), inset 0 1px 0 rgba(255, 255, 255, .15); }
button.ambar, .btn.ambar { background: linear-gradient(180deg, #ffbb3d, #e89a10); color: #1d1300; box-shadow: 0 6px 22px rgba(232, 154, 16, .26), inset 0 1px 0 rgba(255, 255, 255, .35); }
button.link, .btn.link { background: none; color: var(--azul-txt); padding: 6px 8px; min-height: 0; font-weight: 600; box-shadow: none; }
button.pequeno, .btn.pequeno { min-height: 36px; padding: 6px 12px; font-size: .86rem; border-radius: 10px; }
button.bloco, .btn.bloco { width: 100%; }
button.grande, .btn.grande { min-height: 58px; font-size: 1.06rem; border-radius: 14px; }
button.icone-btn { width: 40px; min-height: 40px; padding: 0; border-radius: 12px; background: var(--btn-sec); border: 1px solid var(--borda); box-shadow: none; color: var(--texto); }

label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: 6px; color: var(--texto-campo); }
.campo { margin-bottom: 14px; }
.campo .dica, .dica { font-size: .78rem; color: var(--texto-2); margin-top: 5px; font-weight: 400; }
input, select, textarea {
  font: inherit; width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--borda-2);
  background: var(--campo); color: var(--texto); min-height: 48px; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--texto-3); }
select option { background: var(--bg); color: var(--texto); }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 4px rgba(61, 123, 255, .18); }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--ciano-vivo); outline-offset: 2px; }
input.km { font-family: var(--mono); font-size: 1.9rem; font-weight: 700; letter-spacing: .12em; text-align: center; font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--texto); }
.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--azul); flex: none; }

/* seletor segmentado (tema, filtros simples) */
.segmentado { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--sup); border: 1px solid var(--borda); }
.segmentado button { min-height: 40px; padding: 6px 8px; font-size: .84rem; background: none; color: var(--texto-2); box-shadow: none; border-radius: 10px; gap: 6px; }
.segmentado button svg { width: 16px; height: 16px; }
.segmentado button.on { background: var(--card); color: var(--texto); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); border: 1px solid var(--borda); }
:root[data-tema="escuro"] .segmentado button.on { background: var(--azul-suave); color: #fff; border-color: var(--azul-borda); box-shadow: none; }

/* ------------------------------------------------ pílulas de status (contorno) */
.badge, .pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600;
  border: 1px solid var(--borda-2); color: var(--texto-2); background: var(--sup); white-space: nowrap; line-height: 1.4;
}
.badge.ponto::before, .pill.ponto::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 calc(8px * var(--brilho)) currentColor; }
.badge.verde { color: var(--verde-txt); border-color: rgba(34, 184, 102, .45); background: rgba(34, 184, 102, .08); }
.badge.ambar { color: var(--ambar-txt); border-color: rgba(214, 150, 20, .45); background: rgba(209, 138, 14, .09); }
.badge.vermelho { color: var(--vermelho-txt); border-color: rgba(224, 52, 76, .42); background: rgba(224, 52, 76, .08); }
.badge.azul { color: var(--azul-txt); border-color: var(--azul-borda); background: var(--azul-suave); }
.badge.ciano { color: var(--ciano); border-color: rgba(8, 145, 178, .4); background: rgba(8, 145, 178, .07); }
.badge.leve { color: var(--leve-txt); border-color: rgba(245, 176, 20, .55); background: rgba(245, 176, 20, .08); }
.badge.moderada { color: var(--moderada-txt); border-color: rgba(240, 128, 46, .55); background: rgba(240, 128, 46, .08); }
.badge.grave { color: var(--grave-txt); border-color: rgba(220, 58, 68, .5); background: rgba(220, 58, 68, .08); }

/* Placa Mercosul */
.placa {
  position: relative; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  font-family: var(--mono); font-weight: 800; letter-spacing: .1em; font-size: .82rem; line-height: 1;
  background: #fbfbf8; color: #111622; border: 1.5px solid #1b2236; border-radius: 5px;
  padding: 10px 7px 3px; min-width: 84px; white-space: nowrap; box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.placa::before {
  content: "BRASIL"; position: absolute; left: 0; right: 0; top: 0; height: 7px; background: #1d47b4; color: #fff;
  font-size: 5px; line-height: 7px; letter-spacing: .3em; text-align: center; border-radius: 3px 3px 0 0; font-weight: 700;
}
.placa.grande { font-size: 1.05rem; padding: 13px 10px 4px; min-width: 112px; }
.placa.grande::before { height: 9px; line-height: 9px; font-size: 6px; }

/* ------------------------------------------------ cartões de veículo */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.vcard {
  position: relative; display: flex; flex-direction: column; text-align: left; width: 100%; color: var(--texto); padding: 0; min-height: 0;
  background: linear-gradient(180deg, var(--card), var(--card-2)); border: 1px solid var(--borda);
  border-radius: var(--raio); overflow: hidden; box-shadow: var(--sombra-card); font-weight: 400; transition: border-color .2s, transform .2s, box-shadow .2s;
}
button.vcard:hover:not(:disabled) { filter: none; border-color: var(--azul-borda); box-shadow: 0 14px 40px rgba(47, 107, 255, .14); transform: translateY(-2px); }
.vcard .vimg { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; background: var(--palco); }
.vcard .vimg img { width: 100%; height: 100%; object-fit: cover; }
.vcard .vimg .vsvg { width: 52%; color: var(--vsvg); }
.vcard .vimg .badge { position: absolute; top: 10px; left: 10px; backdrop-filter: blur(6px); background: var(--vidro); }
.vcard .vimg .placa { position: absolute; right: 10px; bottom: 10px; }
.vcard .vinfo { padding: 12px 14px 14px; }
.vcard .vtitulo { font-weight: 650; font-size: 1rem; letter-spacing: -.01em; }
.vcard .vmeta { font-family: var(--mono); font-size: .72rem; color: var(--texto-2); letter-spacing: .03em; margin-top: 3px; }
.vcard.ocupado { opacity: .55; }
.vcard.inativo { opacity: .45; }
.grupo-titulo { font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--texto-2); margin: 22px 2px 10px; display: flex; align-items: center; gap: 10px; }
.grupo-titulo::after { content: ""; flex: 1; height: 1px; background: var(--borda); }

/* Linha de veículo (lista compacta) */
.veiculo {
  display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; color: var(--texto); box-shadow: none; font-weight: 400;
  background: var(--card); border: 1px solid var(--borda); border-radius: 14px; padding: 12px 14px; min-height: 64px;
}
.veiculo + .veiculo { margin-top: 8px; }
button.veiculo:hover { background: var(--sup-2); filter: none; }
.veiculo .titulo { font-weight: 650; }

/* ------------------------------------------------ passos do checklist */
.passos { display: flex; gap: 5px; margin: 6px 0 16px; }
.passos i { flex: 1; height: 4px; border-radius: 4px; background: var(--sup-3); }
.passos i.feito { background: var(--azul); }
.passos i.atual { background: var(--ciano-vivo); box-shadow: 0 0 calc(12px * var(--brilho)) rgba(95, 227, 255, .7); }
.passo-rotulo { font-family: var(--mono); font-size: .7rem; color: var(--texto-2); font-weight: 500; text-transform: uppercase; letter-spacing: .1em; }

.rodape-acoes {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--vidro-forte);
  border-top: 1px solid var(--borda); padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.rodape-acoes .dentro { max-width: 680px; margin: 0 auto; display: flex; gap: 10px; }
.rodape-acoes .dentro > * { flex: 1; }
body.em-fluxo .tabbar { display: none; }

/* ------------------------------------------------ barra de abas inferior */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 24;
  display: flex; gap: 2px; padding: 6px; border-radius: 22px; width: min(calc(100% - 20px), 520px);
  background: var(--vidro-forte); border: 1px solid var(--borda-2); box-shadow: var(--sombra);
  backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
}
.tabbar button, .tabbar a {
  flex: 1; flex-direction: column; gap: 3px; min-height: 52px; padding: 6px 2px; background: none; box-shadow: none; border-radius: 16px;
  color: var(--texto-2); font-size: .66rem; font-weight: 600; letter-spacing: .01em; position: relative; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.tabbar svg { width: 21px; height: 21px; }
.tabbar .ativo { color: var(--ativo-txt); background: var(--azul-suave); }
.tabbar .ativo svg { color: var(--azul-txt); }
:root[data-tema="escuro"] .tabbar .ativo svg { filter: drop-shadow(0 0 6px rgba(61, 123, 255, .8)); }
.tabbar .marcador { position: absolute; top: 6px; right: calc(50% - 18px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--vermelho); color: #fff; font-size: .62rem; display: grid; place-items: center; }

/* ------------------------------------------------ fotos */
.foto-box {
  position: relative; border: 1.5px dashed var(--azul-borda); border-radius: var(--raio);
  background: radial-gradient(80% 80% at 50% 40%, var(--azul-suave), transparent 70%), var(--card);
  min-height: 140px; display: grid; place-items: center; text-align: center; padding: 14px; cursor: pointer; overflow: hidden; color: var(--texto);
}
.foto-box:hover { border-color: var(--azul); }
.foto-box.ok { border-style: solid; border-color: rgba(34, 184, 102, .6); padding: 0; background: #000; }
.foto-box.ok img { width: 100%; max-height: 320px; object-fit: contain; }
.foto-box input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.foto-box .refazer { position: absolute; right: 8px; bottom: 8px; background: rgba(5, 7, 13, .72); color: #fff; font-size: .76rem; padding: 4px 10px; border-radius: 999px; pointer-events: none; border: 1px solid rgba(255, 255, 255, .2); }
.foto-box .rotulo-foto {
  position: absolute; left: 8px; top: 8px; background: rgba(5, 7, 13, .72); color: #4ee08f; border: 1px solid rgba(78, 224, 143, .45);
  font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; pointer-events: none; max-width: calc(100% - 16px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.foto-box svg { width: 34px; height: 34px; color: var(--azul-txt); margin: 0 auto 8px; }
.foto-box.grande { min-height: 210px; }
.grade-fotos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grade-fotos .foto-box { min-height: 124px; }
.grade-fotos .foto-box.ok img { height: 140px; object-fit: cover; max-height: none; }
.processando { font-size: .85rem; color: var(--texto-2); }

/* ------------------------------------------------ verificação */
.item-check { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--borda); }
.item-check:last-child { border-bottom: 0; }
.item-check .txt { flex: 1; font-size: .93rem; }
.simnao { display: flex; gap: 6px; flex: none; }
.simnao button { min-height: 38px; padding: 6px 13px; background: transparent; color: var(--texto-2); border: 1px solid var(--borda-2); font-size: .82rem; box-shadow: none; }
.simnao button.on-sim { color: var(--verde-txt); border-color: rgba(34, 184, 102, .6); background: rgba(34, 184, 102, .12); }
.simnao button.on-nao { color: var(--vermelho-txt); border-color: rgba(224, 52, 76, .55); background: rgba(224, 52, 76, .12); }
.combustivel { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.combustivel button { min-height: 46px; padding: 6px 2px; background: transparent; color: var(--texto-2); border: 1px solid var(--borda-2); font-size: .82rem; box-shadow: none; }
.combustivel button.on { color: var(--ativo-txt); border-color: var(--azul); background: var(--azul-suave); box-shadow: 0 0 calc(18px * var(--brilho)) rgba(61, 123, 255, .3); }

/* ------------------------------------------------ inspeção 3D */
.v3d { position: relative; display: flex; flex-direction: column; border-radius: var(--raio); overflow: hidden; border: 1px solid var(--borda); background: var(--palco); }
.v3d-palco { position: relative; flex: 1; min-height: 300px; height: 52vh; max-height: 460px; user-select: none; -webkit-user-select: none; }
.v3d-palco canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.v3d-palco canvas:active { cursor: grabbing; }
.v3d-pinos { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.v3d-pino {
  position: absolute; left: 0; top: 0; pointer-events: auto; width: 26px; height: 26px; min-height: 0; padding: 0; border-radius: 50%;
  font: 700 .74rem/1 var(--mono); color: #10131b; background: #ffb020; border: 2px solid rgba(255, 255, 255, .95);
  box-shadow: 0 0 0 4px rgba(255, 176, 32, .22), 0 0 18px rgba(255, 176, 32, .7); transition: opacity .2s; will-change: transform;
}
.v3d-pino:hover { filter: brightness(1.1); }
.v3d-pino.nova, .v3d-pino.grave { background: #ff3b4e; color: #fff; box-shadow: 0 0 0 4px rgba(255, 59, 78, .25), 0 0 18px rgba(255, 59, 78, .8); }
.v3d-pino.moderada { background: #ff8a1f; box-shadow: 0 0 0 4px rgba(255, 138, 31, .25), 0 0 18px rgba(255, 138, 31, .8); }
.v3d-pino.leve { background: #ffc233; box-shadow: 0 0 0 4px rgba(255, 194, 51, .22), 0 0 16px rgba(255, 194, 51, .6); }
.v3d-pino.resolvida { background: #8d97ab; box-shadow: none; }
.v3d-dica {
  position: absolute; left: 0; top: 0; pointer-events: none; z-index: 3; padding: 8px 12px; border-radius: 12px; max-width: 240px;
  background: var(--tooltip); border: 1px solid var(--borda-2); backdrop-filter: blur(10px); box-shadow: var(--sombra);
}
.v3d-dica b { display: block; font-size: .86rem; }
.v3d-dica span { display: block; font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ciano); margin-top: 2px; }
.v3d-carregando { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--texto-2); font-size: .85rem; }
.v3d-legenda { position: absolute; left: 12px; top: 12px; display: flex; flex-direction: column; gap: 5px; font-size: .72rem; color: var(--texto-2);
  padding: 8px 10px; border-radius: 12px; background: var(--vidro); border: 1px solid var(--borda); backdrop-filter: blur(6px); pointer-events: none; }
.v3d-legenda i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }
.v3d-credito { position: absolute; right: 10px; bottom: 8px; font-size: .62rem; color: var(--texto-3); max-width: 60%; text-align: right; pointer-events: none; }
.v3d-barra { display: flex; gap: 4px; justify-content: center; padding: 8px; border-top: 1px solid var(--borda); background: var(--vidro); flex-wrap: wrap; }
.v3d-barra button { width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 11px; background: transparent; color: var(--texto-2); box-shadow: none; border: 1px solid transparent; }
.v3d-barra button:hover { color: var(--texto); background: var(--sup-2); filter: none; }
.v3d-barra button.on { color: var(--ativo-txt); background: var(--azul-suave); border-color: var(--azul-borda); }
.v3d-barra button svg { width: 19px; height: 19px; }
.v3d-barra i.sep { width: 1px; background: var(--borda-2); margin: 6px 4px; }
.v3d.v3d-cheia { position: fixed; inset: 0; z-index: 90; border-radius: 0; border: 0; }
.v3d.v3d-cheia .v3d-palco { height: auto; max-height: none; }
body.v3d-travado { overflow: hidden; }
.dica-3d { font-family: var(--mono); font-size: .7rem; letter-spacing: .05em; color: var(--texto-2); text-align: center; margin: 10px 0 0; text-transform: uppercase; }

/* ------------------------------------------------ diagrama 2D (alternativa sem 3D e impressão) */
.carro-wrap { display: flex; justify-content: center; }
.carro { width: 100%; max-width: 260px; height: auto; touch-action: manipulation; user-select: none; }
.carro .corpo { fill: var(--diag-corpo); stroke: var(--diag-corpo-borda); stroke-width: 1.5; }
.carro .zona { fill: var(--diag-zona); stroke: var(--azul-borda); stroke-width: 1.2; cursor: pointer; transition: fill .15s; }
.carro .zona:hover { fill: rgba(61, 123, 255, .3); }
.carro .zona.vidro { fill: rgba(8, 145, 178, .1); }
.carro .zona.existente { fill: rgba(255, 176, 32, .5); stroke: #e39a12; }
.carro .zona.nova { fill: rgba(255, 59, 78, .5); stroke: #e0344c; }
.carro .rotulo-dir { font-size: 8.5px; font-weight: 700; fill: var(--texto-2); letter-spacing: .1em; font-family: var(--mono); }
.legenda { display: flex; flex-wrap: wrap; gap: 12px; font-size: .78rem; color: var(--texto-2); justify-content: center; margin-top: 10px; }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; margin-right: 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.chip { min-height: 36px; padding: 6px 12px; border-radius: 999px; background: var(--card); color: var(--texto); border: 1px solid var(--borda-2); font-weight: 500; font-size: .82rem; box-shadow: none; }
.chip:hover { background: var(--sup-2); filter: none; }

.avaria-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--borda); }
.avaria-item:last-child { border-bottom: 0; }
.avaria-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; flex: none; cursor: zoom-in; border: 1px solid var(--borda); background: var(--sup-2); }
.tipo-letra {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 .78rem/1 var(--mono); flex: none;
  color: #fff; background: #ff3b4e; box-shadow: 0 0 calc(14px * var(--brilho)) rgba(255, 59, 78, .55);
}
.tipo-letra.existente { background: #ffb020; color: #10131b; box-shadow: 0 0 calc(14px * var(--brilho)) rgba(255, 176, 32, .5); }
.tipo-letra.leve { background: #ffc233; color: #10131b; box-shadow: 0 0 calc(14px * var(--brilho)) rgba(255, 194, 51, .45); }
.tipo-letra.moderada { background: #ff8a1f; color: #10131b; box-shadow: 0 0 calc(14px * var(--brilho)) rgba(255, 138, 31, .5); }
.tipo-letra.grave { background: #ff3b4e; }
.tipo-letra.resolvida { background: var(--sup-3); color: var(--texto-2); box-shadow: none; }

.tipos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tipos button, .gravs button { background: var(--card); color: var(--texto); border: 1px solid var(--borda-2); justify-content: flex-start; box-shadow: none; font-weight: 500; }
.tipos button b { width: 26px; height: 26px; border-radius: 50%; background: var(--sup-3); display: grid; place-items: center; font-family: var(--mono); font-size: .8rem; }
.tipos button.on { border-color: var(--azul); background: var(--azul-suave); }
.tipos button.on b { background: var(--azul); color: #fff; }
.gravs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gravs button { justify-content: center; font-size: .88rem; }
.gravs button i { width: 9px; height: 9px; border-radius: 50%; }
.gravs button.on[data-g="leve"] { border-color: var(--leve); background: rgba(245, 176, 20, .13); }
.gravs button.on[data-g="moderada"] { border-color: var(--moderada); background: rgba(240, 128, 46, .14); }
.gravs button.on[data-g="grave"] { border-color: var(--grave); background: rgba(220, 58, 68, .14); }

/* ------------------------------------------------ assinatura (papel claro, tinta escura) */
.assinatura-box { border: 1px solid var(--borda-2); border-radius: var(--raio); background: #f7f9fc; position: relative; }
.assinatura-box canvas { width: 100%; height: 180px; display: block; touch-action: none; border-radius: var(--raio); }
.assinatura-box .linha { position: absolute; left: 20px; right: 20px; bottom: 40px; border-bottom: 1.5px dashed #b4bccb; pointer-events: none; }
.assinatura-box .x { position: absolute; left: 14px; bottom: 44px; color: #b4bccb; font-weight: 800; pointer-events: none; }
.assinatura-img { background: #fff; border-radius: 10px; max-height: 90px; padding: 4px; border: 1px solid var(--borda); }
.declaracao { font-size: .86rem; color: var(--texto-campo); background: var(--azul-suave); border: 1px solid var(--azul-borda); border-radius: 12px; padding: 10px 12px; }

/* ------------------------------------------------ termo */
.termo-texto {
  white-space: pre-wrap; font-size: .9rem; line-height: 1.6; color: var(--texto); max-height: 52vh; overflow: auto; padding: 16px;
  background: var(--termo); border: 1px solid var(--borda); border-radius: 14px; font-family: var(--fonte);
}
.termo-texto::-webkit-scrollbar { width: 8px; }
.termo-texto::-webkit-scrollbar-thumb { background: var(--borda-2); border-radius: 8px; }
.selo { display: flex; gap: 12px; align-items: center; }
.selo .icone-selo { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; background: rgba(34, 184, 102, .12); color: var(--verde-txt); border: 1px solid rgba(34, 184, 102, .35); }
.selo .icone-selo.pendente { background: rgba(209, 138, 14, .12); color: var(--ambar-txt); border-color: rgba(214, 150, 20, .38); }
.selo .icone-selo svg { width: 22px; height: 22px; }
.hash { font-family: var(--mono); font-size: .68rem; color: var(--texto-3); word-break: break-all; }

/* ------------------------------------------------ modal */
.modal-fundo { position: fixed; inset: 0; background: var(--fundo-modal); backdrop-filter: blur(6px); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.modal {
  background: var(--modal); border: 1px solid var(--borda-2); width: 100%; max-width: 640px; max-height: 92vh; overflow: auto;
  border-radius: 22px 22px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px rgba(0, 0, 0, .25);
  animation: sobe .22s ease-out;
}
.modal.largo { max-width: 1020px; }
.modal-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.modal-topo h2 { margin: 0; font-size: 1.3rem; }
.fechar { background: var(--sup-2); color: var(--texto); min-height: 38px; width: 38px; padding: 0; border-radius: 50%; font-size: 1.2rem; flex: none; box-shadow: none; border: 1px solid var(--borda); }
@media (min-width: 700px) { .modal-fundo { align-items: center; padding: 24px; } .modal { border-radius: 22px; padding: 22px; } }
@keyframes sobe { from { transform: translateY(16px); opacity: .4; } to { transform: none; opacity: 1; } }
.zoom-img { position: fixed; inset: 0; background: rgba(0, 0, 0, .94); z-index: 95; display: grid; place-items: center; padding: 12px; cursor: zoom-out; }
.zoom-img img { max-height: 94vh; max-width: 96vw; object-fit: contain; }

/* ------------------------------------------------ toast */
#toasts { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 100; width: min(92vw, 460px); }
.toast { background: var(--toast); color: var(--toast-txt); padding: 12px 16px; border-radius: 14px; margin-bottom: 8px; box-shadow: var(--sombra);
  font-weight: 500; animation: entra .2s ease-out; border: 1px solid var(--borda-2); border-left: 3px solid var(--azul); }
.toast.erro { border-left-color: var(--vermelho); }
.toast.ok { border-left-color: var(--verde); }
@keyframes entra { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.carregando { display: grid; place-items: center; padding: 40px; color: var(--texto-2); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--sup-3); border-top-color: var(--ciano-vivo); border-radius: 50%; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ------------------------------------------------ login */
.login-pagina { min-height: 100vh; display: grid; place-items: center; padding: 20px; position: relative; overflow: hidden; }
.login-pagina::before {
  content: ""; position: absolute; width: 760px; height: 760px; left: 50%; top: 50%; transform: translate(-50%, -38%) rotateX(72deg);
  border-radius: 50%; border: 2px solid rgba(47, 107, 255, .35); box-shadow: 0 0 40px rgba(47, 107, 255, .16), inset 0 0 60px rgba(47, 107, 255, .08);
  pointer-events: none;
}
:root[data-tema="escuro"] .login-pagina::before { border-color: rgba(95, 227, 255, .55); box-shadow: 0 0 60px rgba(95, 227, 255, .35), inset 0 0 80px rgba(95, 227, 255, .12); }
.login-card { position: relative; width: min(400px, 100%); padding: 30px 24px; border-radius: 24px; background: var(--vidro-forte);
  border: 1px solid var(--borda-2); backdrop-filter: blur(18px); box-shadow: var(--sombra); }
.login-card .marca { justify-content: center; margin-bottom: 6px; }
.login-card .marca svg { width: 50px; height: 50px; }
.login-card .marca span { font-size: 2rem; }
.login-tema { position: absolute; top: 14px; right: 14px; z-index: 2; }
.login-tema .segmentado button { min-height: 34px; padding: 4px 10px; font-size: .78rem; }
@media (max-width: 520px) { .login-tema .segmentado button span { display: none; } }

/* ------------------------------------------------ resumo / detalhes */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: .92rem; margin: 0; }
.kv dt { color: var(--texto-2); }
.kv dd { margin: 0; font-weight: 550; }
.grade-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.thumb { position: relative; border-radius: 12px; overflow: hidden; background: #000; cursor: zoom-in; aspect-ratio: 4/3; border: 1px solid var(--borda); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb span { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); color: #fff; font-size: .7rem; padding: 14px 6px 4px; font-weight: 600; }
.lado-a-lado { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.lado-a-lado > .card + .card { margin-top: 0; }
.grade-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.lista-linha { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--borda); align-items: center; font-size: .92rem; }
.lista-linha:last-child { border-bottom: 0; }
.lista-linha.clicavel { cursor: pointer; }
.lista-linha.clicavel:hover { background: var(--sup); }

/* ------------------------------------------------ gestor */
.gestor-corpo { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.menu-lateral {
  position: sticky; top: 0; height: 100vh; padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto;
  background: var(--menu); border-right: 1px solid var(--borda); backdrop-filter: blur(14px);
}
.menu-lateral .marca { padding: 4px 8px 18px; }
.menu-lateral .grupo { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--texto-3); padding: 14px 12px 6px; }
.menu-lateral button, .menu-lateral a {
  width: 100%; justify-content: flex-start; background: none; color: var(--texto-2); font-weight: 550; min-height: 42px; box-shadow: none;
  border-radius: 12px; padding: 8px 12px; font-size: .92rem; text-decoration: none; display: flex; align-items: center; gap: 10px;
}
.menu-lateral button:hover, .menu-lateral a:hover { background: var(--sup-2); color: var(--texto); filter: none; }
.menu-lateral button.ativo { background: var(--azul-suave); color: var(--ativo-txt); box-shadow: inset 2px 0 0 var(--azul); }
.menu-lateral button.ativo svg { color: var(--azul-txt); }
.menu-lateral .qtd { margin-left: auto; }
.menu-lateral .rodape-menu { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--borda); }
.menu-lateral .segmentado { margin: 0 4px 10px; }
.menu-lateral .segmentado button { min-height: 34px; padding: 4px; font-size: .74rem; justify-content: center; }
.conteudo { padding: 26px 28px 60px; min-width: 0; }
.conteudo-max { max-width: 1280px; margin: 0 auto; }
.so-celular { display: none !important; }
@media (max-width: 900px) {
  .gestor-corpo { grid-template-columns: 1fr; }
  .menu-lateral { display: none; }
  .conteudo { padding: 16px 14px calc(110px + env(safe-area-inset-bottom)); }
  .so-celular { display: flex !important; }
  h1 { font-size: 1.6rem; }
}

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { position: relative; padding: 16px; border-radius: var(--raio); border: 1px solid var(--borda); background: linear-gradient(180deg, var(--card), var(--card-2)); overflow: hidden; box-shadow: var(--sombra-card); }
.kpi .rot { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--texto-2); }
.kpi .num { font-family: var(--fonte-disp); font-size: 2.1rem; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; margin: 6px 0 2px; line-height: 1.05; }
.kpi .num small { font-size: .9rem; color: var(--texto-3); font-weight: 600; letter-spacing: 0; margin-left: 4px; }
.kpi .extra { font-size: .78rem; color: var(--texto-2); }
.kpi .extra .sobe { color: var(--ambar-txt); }
.kpi .extra .desce { color: var(--verde-txt); }
.kpi.clicavel { cursor: pointer; }
.kpi.clicavel:hover { border-color: var(--borda-2); }
.segs { display: flex; gap: 3px; margin-top: 12px; height: 6px; }
.segs i { flex: 1; border-radius: 2px; background: var(--sup-3); }
.segs i.on { background: var(--c, var(--azul)); box-shadow: 0 0 calc(8px * var(--brilho)) var(--c, var(--azul)); }

/* barra empilhada */
.pilha { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; margin: 6px 0 14px; background: var(--sup-2); }
.pilha i { display: block; height: 100%; min-width: 4px; background: var(--c); box-shadow: 0 0 calc(16px * var(--brilho)) var(--c); position: relative; }
.pilha i:first-child { border-radius: 7px 0 0 7px; }
.pilha i:last-child { border-radius: 0 7px 7px 0; }
.legenda-pilha { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.legenda-pilha div { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--texto-2); }
.legenda-pilha i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 calc(8px * var(--brilho)) var(--c); flex: none; }
.legenda-pilha b { color: var(--texto); font-variant-numeric: tabular-nums; margin-left: auto; }

/* gráfico de barras (últimos dias) */
.grafico { position: relative; display: flex; align-items: flex-end; gap: 6px; height: 140px; padding: 0 2px; border-bottom: 1px solid var(--borda-2); }
.grafico .col { flex: 1; height: 100%; display: flex; align-items: flex-end; position: relative; cursor: default; }
.grafico .col i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #5b8fff, #2f6bff); box-shadow: 0 0 calc(14px * var(--brilho)) rgba(61, 123, 255, .45); min-height: 2px; }
.grafico .col.zero i { background: var(--sup-3); box-shadow: none; }
.grafico .col.hoje i { background: var(--barra-hoje); box-shadow: 0 0 calc(16px * var(--brilho)) rgba(95, 227, 255, .6); }
.grafico .col:hover i { filter: brightness(1.15); }
.grafico .col .tip { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none; opacity: 0;
  background: var(--tooltip); border: 1px solid var(--borda-2); padding: 6px 9px; border-radius: 10px; font-size: .74rem; transition: opacity .12s; z-index: 2; box-shadow: var(--sombra); }
.grafico .col:hover .tip { opacity: 1; }
.grafico-eixo { display: flex; gap: 6px; padding: 6px 2px 0; }
.grafico-eixo span { flex: 1; text-align: center; font-family: var(--mono); font-size: .6rem; color: var(--texto-3); }

.duas-col { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; }
.tres-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1150px) { .duas-col, .tres-col { grid-template-columns: 1fr; } }
.tabela-wrap { overflow-x: auto; border: 1px solid var(--borda); border-radius: var(--raio); background: var(--card); box-shadow: var(--sombra-card); }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--borda); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
th { font-family: var(--mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .1em; color: var(--texto-2); font-weight: 500; background: var(--th); position: sticky; top: 0; }
tbody tr:hover { background: var(--sup); }
tr.clicavel { cursor: pointer; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.filtros .campo { margin: 0; min-width: 150px; flex: 1; }
.filtros input, .filtros select { min-height: 42px; padding: 8px 10px; }
.filtros button { min-height: 42px; }
.alerta-linha { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--borda); align-items: flex-start; font-size: .9rem; }
.alerta-linha:last-child { border-bottom: 0; }
.alerta-linha.clicavel { cursor: pointer; }
.ponto:not(.badge):not(.pill) { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; }
.ponto.alto { background: #ff4d5e; box-shadow: 0 0 calc(10px * var(--brilho)) #ff4d5e; }
.ponto.medio { background: #ffb020; box-shadow: 0 0 calc(10px * var(--brilho)) #ffb020; }
.ponto.baixo { background: #8b94a7; }
.barra { height: 6px; background: var(--sup-3); border-radius: 99px; overflow: hidden; min-width: 80px; }
.barra i { display: block; height: 100%; background: var(--azul); border-radius: 99px; box-shadow: 0 0 calc(10px * var(--brilho)) rgba(61, 123, 255, .6); }
.barra i.ambar { background: #e89a10; box-shadow: 0 0 calc(10px * var(--brilho)) rgba(232, 154, 16, .6); }
.barra i.vermelho { background: var(--vermelho); box-shadow: 0 0 calc(10px * var(--brilho)) rgba(224, 52, 76, .6); }
.abas { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--sup); border: 1px solid var(--borda); flex-wrap: wrap; }
.abas button { min-height: 34px; padding: 4px 12px; font-size: .82rem; background: none; color: var(--texto-2); box-shadow: none; border-radius: 10px; }
.abas button.on { background: var(--azul-suave); color: var(--ativo-txt); }
.inspecao-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; align-items: start; }
.inspecao-grid .v3d-palco { height: 58vh; max-height: 560px; }
@media (max-width: 900px) { .inspecao-grid { grid-template-columns: 1fr; } .inspecao-grid .v3d-palco { height: 46vh; } }
.lista-rolavel { max-height: 58vh; overflow: auto; }
.av-ativa { background: var(--azul-suave); border-radius: 12px; }

/* ------------------------------------------------ modelos 3D (gestor) */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.mcard .vimg { aspect-ratio: 16 / 9; }
.envio-modelo .v3d-palco { height: 42vh; min-height: 260px; }
.fontes li { margin-bottom: 6px; }

/* ------------------------------------------------ folhas de impressão (sempre claras) */
body.papel {
  --texto: #111; --texto-2: #555; --texto-3: #888; --borda: #cfd5dd; --borda-2: #b9c1cc; --sup: #fff; --sup-2: #f2f4f7; --sup-3: #e8ebf0;
  --card: #fff; --card-2: #fff; --azul-txt: #1d47b4; --brilho: 0; color-scheme: light; background: #e7eaee; color: #111;
}
body.papel .card { background: #fff; border-color: var(--borda); box-shadow: none; }
body.papel .carro .corpo { fill: #eef2f0; stroke: #c9d3cf; }
body.papel .carro .zona { fill: #fff; stroke: #8fa29b; }
body.papel .carro .zona.vidro { fill: #dbe8f0; }
body.papel .carro .zona.existente { fill: #ffe2a6; stroke: #d39316; }
body.papel .carro .zona.nova { fill: #f7b3ad; stroke: #c8372d; }
body.papel .carro .rotulo-dir { fill: #7a8a85; }
body.papel .marca span { color: #111; }
body.papel .marca small { color: #555; }
body.papel .placa { box-shadow: none; }
body.papel .badge { background: #fff; }
.folha { background: #fff; max-width: 820px; margin: 16px auto; padding: 28px 32px; box-shadow: 0 4px 30px rgba(0, 0, 0, .12); font-size: 13px; color: #111; border-radius: 4px; }
.folha h1 { font-family: var(--fonte); font-size: 16px; text-align: center; border: 2px solid #333; padding: 6px; margin: 0 0 10px; letter-spacing: .02em; }
.barra-acoes { max-width: 820px; margin: 16px auto 0; display: flex; gap: 10px; justify-content: flex-end; padding: 0 12px; }
@media print {
  body.papel { background: #fff; }
  .barra-acoes { display: none; }
  .folha { box-shadow: none; margin: 0; padding: 0; max-width: none; }
  @page { margin: 12mm; }
}

/* ------------------------------------------------ foto de referência (mesmo ângulo da retirada) */
.foto-box:has(img.ref) { min-height: 150px; }
.foto-box img.ref { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; pointer-events: none; }
.foto-box .sobre-ref { position: absolute; left: 6px; right: 6px; bottom: 6px; background: rgba(5, 7, 13, .66); color: #fff; border-radius: 10px; padding: 5px 8px; pointer-events: none; font-size: .8rem; line-height: 1.25; }
.foto-box .sobre-ref svg { color: #fff; width: 18px; height: 18px; margin: 0 auto 2px; }
.foto-box .sobre-ref .small { font-size: .7rem; opacity: .85; }
.leitura-ia:empty { display: none; }
.leitura-ia { margin-top: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.leitura-ia svg { width: 16px; height: 16px; flex: none; }
.spinner.mini { width: 14px; height: 14px; border-width: 2px; display: inline-block; vertical-align: -2px; }

/* ------------------------------------------------ comparar fotos (retirada × devolução) */
.grade-comparar { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.comparador { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #000; user-select: none; }
.comparador img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.comparador .depois { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.comparador .cmp-linha { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, .6); pointer-events: none; }
.comparador .cmp-linha::after { content: '⟷'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; font-size: 14px; }
.comparador .cmp-rot { position: absolute; top: 8px; font-size: .7rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: rgba(5, 7, 13, .72); color: #fff; pointer-events: none; }
.comparador .cmp-rot.a { left: 8px; }
.comparador .cmp-rot.b { right: 8px; }
.comparador input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }

/* ------------------------------------------------ agenda (gestão) */
.agenda { min-width: 760px; }
.ag-linha { display: grid; grid-template-columns: 150px 1fr; align-items: stretch; border-bottom: 1px solid var(--borda); }
.ag-cab { position: sticky; top: 0; background: var(--card); z-index: 2; }
.ag-carro { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; justify-content: center; border-right: 1px solid var(--borda); }
.ag-dias { display: grid; grid-template-columns: repeat(7, 1fr); }
.ag-dias div { padding: 8px 6px; font-size: .76rem; color: var(--texto-2); text-align: center; border-left: 1px solid var(--borda); text-transform: capitalize; }
.ag-dias div.hoje { color: var(--azul-txt); background: var(--azul-suave); }
.ag-trilho { position: relative; min-height: 52px; cursor: copy;
  background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(100% / 7 - 1px), var(--borda) calc(100% / 7 - 1px), var(--borda) calc(100% / 7)); }
.ag-bloco { position: absolute; height: 18px; min-height: 0; padding: 0 6px; border-radius: 6px; font-size: .68rem; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  box-shadow: none; justify-content: flex-start; cursor: pointer; border: 0; }
.ag-bloco.reserva { top: 6px; background: var(--azul-suave); color: var(--azul-txt); border: 1px solid var(--azul-borda); }
.ag-bloco.reserva.concluida { opacity: .55; }
.ag-bloco.uso { bottom: 6px; background: rgba(245, 166, 35, .22); color: var(--ambar-txt); border: 1px solid rgba(245, 166, 35, .5); }
.ag-bloco.uso.em_uso { background: var(--ambar); color: #1a1200; }
.ag-agora { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--vermelho); pointer-events: none; }
.legenda-ag { display: inline-flex; gap: 6px 10px; align-items: center; font-size: .76rem; color: var(--texto-2); flex-wrap: wrap; }
.legenda-ag i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; vertical-align: middle; }
.legenda-ag i.reserva { background: var(--azul-suave); border: 1px solid var(--azul-borda); }
.legenda-ag i.uso { background: rgba(245, 166, 35, .22); border: 1px solid rgba(245, 166, 35, .5); }
.legenda-ag i.em_uso { background: var(--ambar); }

/* ------------------------------------------------ itens de lista e filtros das seções novas */
.lista-linha button.link { white-space: nowrap; }
.filtros .campo { margin: 0; min-width: 150px; }
