/* Falls Car: tema escuro premium. Contraste dos tokens verificado em tests/contraste.test.ts. */
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/inter-tight-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/inter-tight-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --fundo: #0F0F11;
  --superficie: #18181B;
  --superficie-2: #222226;
  --borda: #2E2E34;          /* decorativa */
  --borda-campo: #75757E;    /* limite de campo: 3,9:1 na superfície (WCAG 1.4.11) */
  --texto: #FFFFFF;
  --texto-2: #B5B5B5;
  --texto-3: #9E9E9E;
  --acento: #E00000;         /* fundo de botão com texto branco */
  --acento-escuro: #C00000;  /* hover do botão primário (6,5:1 com branco) */
  --acento-claro: #FF6B6B;   /* links e foco sobre escuro */
  --livre: #4ADE80;
  --reservado: #60A5FA;
  --alugado: #FBBF24;
  --manutencao: #F87171;
  --raio: 16px;
  --raio-p: 10px;
  --largura: 1240px;
  --brilho: rgba(224, 0, 0, .22);
  --vidro: rgba(15, 15, 17, .72);
  --sombra: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 24px 48px -24px rgba(0, 0, 0, .7);
  --fonte: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; min-height: 100vh; color: var(--texto);
  font: 16px/1.55 var(--fonte); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  /* Brilhos vermelhos: canto do topo (hero) e atrás do conteúdo. */
  background:
    radial-gradient(56rem 34rem at 92% -8%, var(--brilho), transparent 62%),
    radial-gradient(40rem 30rem at -12% 38%, rgba(224, 0, 0, .07), transparent 65%),
    var(--fundo);
}
/* Grid de estúdio (1px, ~4%) que some para baixo + ruído fotográfico (~5%). Decorativos, atrás de tudo. */
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .55) 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .55) 55%, transparent 100%);
}
body::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
}
::selection { background: var(--acento); color: #fff; }

h1, h2, h3 { font-weight: 600; color: var(--texto); text-wrap: balance; }
h1 {
  font-size: clamp(2.2rem, 5vw, 4.75rem); line-height: 1.02; letter-spacing: -.04em;
  margin: .25rem 0 .75rem; max-width: 18ch;
}
h2 { font-size: clamp(1.2rem, 1.6vw, 1.45rem); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 1rem; }
h3 { font-size: 1.05rem; letter-spacing: -.01em; margin: 1.5rem 0 .5rem; }
.palavra-cinza { font-weight: 300; color: var(--texto-3); }
p { margin: 0 0 1rem; }
a { color: var(--acento-claro); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--texto); }
:focus-visible { outline: 3px solid var(--acento-claro); outline-offset: 3px; }
h1:focus { outline: none; }
h1:focus-visible { outline: 3px solid var(--acento-claro); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pular { position: absolute; left: -999px; top: .75rem; background: var(--acento); color: #fff; font-weight: 600; padding: .6rem 1rem; border-radius: 999px; z-index: 50; text-decoration: none; }
.pular:focus { left: 1rem; }
.pular:hover { color: #fff; }

/* Topo: vidro fixo */
.topo {
  position: sticky; top: 0; z-index: 30;
  background: var(--vidro);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.topo-linha {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "marca nav perfil";
  align-items: center; gap: .5rem 1.5rem; max-width: var(--largura); margin: 0 auto; padding: .65rem 1.25rem;
}
.marca { grid-area: marca; color: var(--texto); font-weight: 600; font-size: 1.2rem; letter-spacing: -.03em; text-decoration: none; display: inline-flex; gap: .6rem; align-items: center; }
.marca:hover { color: var(--texto); }
.marca-icone { color: var(--acento); filter: drop-shadow(0 0 10px rgba(224, 0, 0, .55)); }
.topo nav { grid-area: nav; min-width: 0; }
.topo nav ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.topo nav a {
  display: block; position: relative; white-space: nowrap; color: var(--texto-2); text-decoration: none;
  font-size: .95rem; font-weight: 500; padding: .55rem .85rem; border-radius: 999px;
}
.topo nav a:hover { color: var(--texto); background: rgba(255, 255, 255, .06); }
.topo nav a[aria-current="page"] { color: var(--texto); font-weight: 600; }
.topo nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .2rem; height: 2px; border-radius: 2px;
  background: var(--acento); box-shadow: 0 0 12px var(--acento);
}
.perfil { grid-area: perfil; display: inline-flex; align-items: center; gap: .2rem; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; padding: .2rem; }
.perfil-rotulo { font-size: .8rem; padding: 0 .5rem 0 .6rem; color: var(--texto-3); text-transform: uppercase; letter-spacing: .12em; }
.perfil button { border: 0; border-radius: 999px; background: transparent; color: var(--texto-2); padding: .4rem .85rem; font: inherit; font-size: .88rem; font-weight: 500; cursor: pointer; min-height: 36px; }
.perfil button:hover { color: var(--texto); }
.perfil button[aria-pressed="true"] { background: var(--texto); color: var(--fundo); font-weight: 600; }
.perfil[hidden] { display: none; }
#usuario { justify-self: end; }
.usuario-id { display: inline-flex; flex-direction: column; line-height: 1.15; padding: 0 .5rem 0 .75rem; min-width: 0; }
.usuario-nome { font-size: .88rem; font-weight: 600; color: var(--texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 16ch; }
.usuario-perfil { font-size: .72rem; color: var(--texto-3); text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }
#sair { border: 1px solid rgba(255, 255, 255, .14); }

main { max-width: var(--largura); margin: 0 auto; padding: clamp(1.75rem, 4vw, 3.5rem) 1.25rem 4rem; }
main:focus { outline: none; }
.sub { color: var(--texto-2); font-size: clamp(1rem, 1.3vw, 1.15rem); max-width: 62ch; margin: 0 0 2rem; }
.dica { color: var(--texto-3); font-size: .9rem; }
.rodape {
  max-width: var(--largura); margin: 0 auto; padding: 1.5rem 1.25rem 2rem; color: var(--texto-3); font-size: .875rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; border-top: 1px solid var(--borda);
}
.rodape p { margin: 0; }

/* Blocos */
.cartao {
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, 0) 40%), var(--superficie);
  border: 1px solid var(--borda); border-radius: var(--raio); padding: clamp(1.1rem, 2vw, 1.6rem);
  margin-bottom: 1.25rem; box-shadow: var(--sombra);
}
.duas-colunas { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.duas-colunas > .cartao { margin: 0; }
.duas-colunas > * { min-width: 0; } /* tabelas largas rolam dentro do cartão, não a página */
.tabela code { white-space: nowrap; overflow-wrap: normal; }
.duas-colunas + .cartao { margin-top: 1.25rem; }
@media (min-width: 860px) { .duas-colunas { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Formulários */
.form { max-width: 780px; }
.campo { margin: 0 0 1.15rem; border: 0; padding: 0; min-width: 0; }
.campo-curto { max-width: 280px; }
label, legend { font-weight: 500; font-size: .9rem; color: var(--texto-2); display: block; margin-bottom: .4rem; }
input:not([type="radio"]):not([type="checkbox"]), select, textarea {
  width: 100%; font: inherit; color: var(--texto); background-color: var(--superficie-2);
  padding: .65rem .85rem; min-height: 48px; border: 1px solid var(--borda-campo); border-radius: var(--raio-p);
  color-scheme: dark; transition: border-color .15s, box-shadow .15s;
}
input:not([type="radio"]):not([type="checkbox"]):hover, select:hover, textarea:hover { border-color: var(--texto-2); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--acento-claro); outline-offset: 2px; }
textarea { resize: vertical; }
fieldset[aria-invalid="true"] .opcao { border-color: var(--manutencao); }
textarea[aria-invalid="true"], select[aria-invalid="true"] { border: 2px solid var(--manutencao); }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .9em; background: var(--superficie-2); padding: .05rem .35rem; border-radius: 6px; overflow-wrap: anywhere; }
input::placeholder { color: var(--texto-3); opacity: 1; }
select option { background: var(--superficie-2); color: var(--texto); }
input[aria-invalid="true"]:not([type="radio"]):not([type="checkbox"]) { border: 2px solid var(--manutencao); }
input:disabled, select:disabled { background-color: var(--superficie); color: var(--texto-3); }
.grade-2 { display: grid; gap: 0 1.15rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .grade-2 { grid-template-columns: 1fr 1fr; } }
.opcoes { display: flex; flex-wrap: wrap; gap: .5rem; }
.opcao {
  font-weight: 500; font-size: .95rem; color: var(--texto); display: inline-flex; align-items: center; gap: .55rem;
  border: 1px solid var(--borda-campo); border-radius: 999px; padding: .55rem 1rem; cursor: pointer;
  background: var(--superficie-2); margin: 0; min-height: 44px; transition: border-color .15s, background-color .15s;
}
.opcao:hover { border-color: var(--texto-2); }
.opcao:has(input:checked) { border-color: var(--acento-claro); background: rgba(224, 0, 0, .14); font-weight: 600; }
.opcao .dica { font-size: .875rem; }
.opcao input { width: 18px; height: 18px; margin: 0; accent-color: var(--acento); }
.erro-campo { color: var(--manutencao); font-size: .9rem; margin: .35rem 0 0; font-weight: 600; }
.erro-campo::before { content: "⚠ "; }

/* Escolha em lista (cliente na nova reserva) e consentimento */
.opcoes-coluna { flex-direction: column; align-items: stretch; }
.opcoes-coluna .opcao { border-radius: var(--raio-p); }
.lista-escolha { margin-top: .6rem; }
.opcao-bloco { align-items: flex-start; border-radius: var(--raio-p); font-weight: 400; }
.opcao-bloco input { margin-top: .2rem; flex: none; }
.titulo-acoes { margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; justify-content: space-between; }
.titulo-acoes h1 { margin-bottom: .5rem; }
.alternativas { margin: .25rem 0 0; }
.alternativas ul { margin: 0; padding: 0; list-style: none; }
.alternativas li { margin: .15rem 0; }
.alternativas .btn-link { padding: .35rem 0; text-align: left; min-height: 36px; }
.cartao-interno { background: var(--superficie-2); border-radius: var(--raio-p); padding: .75rem 1rem; margin: 0 0 1rem; }
.cartao-interno p { margin: 0; }
.cobrancas-titulo { text-align: left; font-weight: 600; color: var(--texto-2); padding: .5rem 0; caption-side: top; }
.lista-lojas { list-style: none; padding: 0; margin: 0 0 1rem; }
.lista-lojas li { padding: .6rem 0; border-bottom: 1px solid var(--borda); }
.exportar { align-items: center; margin: 0 0 1rem; }
.so-impressao { display: none; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: inherit; font-weight: 600; font-size: .95rem;
  letter-spacing: -.005em; padding: .65rem 1.35rem; min-height: 48px; border-radius: 999px;
  border: 1px solid var(--borda-campo); background: transparent; color: var(--texto); cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s, box-shadow .2s;
}
.btn:hover { background: rgba(255, 255, 255, .07); border-color: var(--texto); color: var(--texto); }
.btn-primario { background: var(--acento); border-color: var(--acento); color: #fff; box-shadow: 0 12px 32px -12px rgba(224, 0, 0, .75); }
.btn-primario:hover { background: var(--acento-escuro); border-color: var(--acento-escuro); color: #fff; box-shadow: 0 16px 40px -12px rgba(224, 0, 0, .9); }
.btn-perigo { border-color: var(--manutencao); color: var(--manutencao); }
.btn-perigo:hover { background: rgba(248, 113, 113, .12); border-color: var(--manutencao); color: var(--manutencao); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-pequeno { min-height: 36px; padding: .3rem .85rem; font-size: .85rem; }
.btn-link { background: none; border: 0; padding: .25rem; font: inherit; color: var(--acento-claro); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.btn-link:hover { color: var(--texto); }
.acoes { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }

/* Avisos */
.aviso { --cor: var(--alugado); border: 1px solid rgba(255, 255, 255, .06); border-left: 3px solid var(--cor); background: rgba(251, 191, 36, .08); color: var(--texto); padding: .7rem .9rem; border-radius: var(--raio-p); margin: .75rem 0; }
.aviso-ok { --cor: var(--livre); background: rgba(74, 222, 128, .08); }
.aviso-neutro { --cor: var(--texto-3); background: rgba(255, 255, 255, .04); }
.aviso-forte { --cor: var(--acento-claro); background: rgba(224, 0, 0, .1); }
.alerta { border: 1px solid var(--manutencao); border-left-width: 4px; background: rgba(248, 113, 113, .1); color: var(--texto); padding: .85rem 1rem; border-radius: var(--raio-p); margin-bottom: 1.25rem; }
#erro-pag:focus { outline: none; }
.vazio { text-align: center; padding: 2.5rem 1rem; color: var(--texto-2); background: rgba(24, 24, 27, .6); border: 1px dashed var(--borda-campo); border-radius: var(--raio); }
.carregando { display: flex; align-items: center; gap: .7rem; color: var(--texto-2); padding: 1.5rem 0; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--borda); border-top-color: var(--acento); border-radius: 50%; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.ajuda { margin-top: 1.25rem; }
.ajuda summary, details summary { cursor: pointer; color: var(--acento-claro); font-weight: 600; padding: .25rem 0; }
details summary:hover { color: var(--texto); }

/* Text reveal do h1: máscaras montadas por src/movimento.ts (só sem "reduzir movimento"). Folga para acentos e descendentes. */
.mascara { display: inline-block; overflow: hidden; vertical-align: top; padding: .1em .06em .14em; margin: -.1em -.06em -.14em; }
.palavra { display: inline-block; }

/* Hero da Busca (cliente): título, cena do carro e formulário. Celular: o cartão do formulário encosta na cena. */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); margin-bottom: clamp(3rem, 8vw, 6rem); }
.hero h1 { margin-top: 0; }
.hero .sub { margin-bottom: 0; }
.hero-cena { margin: -.5rem -1rem -1.9rem; max-width: 640px; pointer-events: none; }
.hero-cena svg { display: block; width: 100%; height: auto; }
.hero-form { position: relative; margin: 0; max-width: none; }
@media (min-width: 1024px) {
  .hero {
    grid-template-columns: minmax(0, 1.12fr) minmax(400px, .88fr); grid-template-rows: auto 1fr;
    column-gap: clamp(2rem, 4vw, 4rem); min-height: calc(100svh - 8rem); align-items: start;
  }
  .hero-texto { grid-column: 1; grid-row: 1; padding-top: 1.5rem; }
  .hero-cena { grid-column: 1 / -1; grid-row: 2; align-self: end; width: 72%; max-width: none; margin: -2rem 0 0 -3rem; }
  .hero-form { grid-column: 2; grid-row: 1 / span 2; align-self: center; z-index: 1; }
}

/* Como funciona: lista simples; no desktop (com movimento) fica fixa e destaca uma regra por vez. */
.como-funciona { display: grid; gap: 1.5rem 3rem; padding-top: clamp(2rem, 5vw, 3.5rem); border-top: 1px solid var(--borda); }
.cf-cabeca h2 { font-size: clamp(1.8rem, 3.2vw, 2.75rem); line-height: 1.05; letter-spacing: -.035em; }
.cf-cabeca p { color: var(--texto-2); max-width: 36ch; }
.cf-progresso { height: 2px; max-width: 220px; border-radius: 2px; background: var(--acento); box-shadow: 0 0 12px var(--acento); transform-origin: left center; }
.cf-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.cf-lista li {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .3rem 1.1rem; padding: 1.2rem 1.4rem;
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio);
  transition: border-color .4s, background-color .4s, box-shadow .4s;
}
.cf-num { grid-row: span 2; font-size: 1.6rem; font-weight: 300; line-height: 1.1; color: var(--texto-3); font-variant-numeric: tabular-nums; transition: color .4s; }
.cf-lista h3 { margin: 0; font-size: 1.1rem; }
.cf-lista p { margin: 0; color: var(--texto-2); }
.cf-lista li.ativo { background: var(--superficie-2); border-color: rgba(255, 107, 107, .55); box-shadow: 0 24px 48px -24px rgba(224, 0, 0, .5); }
.cf-lista li.ativo .cf-num { color: var(--acento-claro); }
@media (min-width: 1024px) { .como-funciona { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; } }

/* Etapas: rótulo técnico em caixa alta */
.passos {
  list-style: none; display: flex; flex-wrap: wrap; gap: .35rem .6rem; padding: 0; margin: 0 0 .75rem;
  font-size: .75rem; font-weight: 500; text-transform: uppercase; letter-spacing: .14em; color: var(--texto-3); counter-reset: p;
}
.passos li { counter-increment: p; }
.passos li::before { content: "0" counter(p) " "; font-variant-numeric: tabular-nums; }
.passos li:not(:last-child)::after { content: "/"; margin-left: .6rem; color: var(--borda-campo); }
.passos li[aria-current="step"] { color: var(--acento-claro); font-weight: 700; }

/* Status: cor do status no texto, borda e ícone sobre tinta escura (nunca só cor: ícone + texto). */
.badge {
  --st: var(--texto-2);
  display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem .2rem .5rem; border-radius: 999px;
  font-size: .8rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  color: var(--st); border: 1px solid var(--st); background: color-mix(in srgb, var(--st) 10%, transparent);
}
.ico { flex: none; }
.st-livre { --st: var(--livre); }
.st-reservado { --st: var(--reservado); }
.st-alugado { --st: var(--alugado); }
.st-manutencao, .st-cancelado { --st: var(--manutencao); }
.st-concluido { --st: var(--texto-2); }

/* Resultados */
.lista-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card-carro { margin: 0; display: flex; flex-direction: column; transition: border-color .2s; }
.card-carro:hover { border-color: rgba(255, 107, 107, .45); }
.card-carro p { margin: .25rem 0; }
.card-carro .btn { margin-top: auto; }
.card-carro .aviso { margin-bottom: 1rem; }
.indisponivel { border-style: dashed; box-shadow: none; background: rgba(24, 24, 27, .6); }
.card-carro .preco { margin: .75rem 0 1rem; }
.preco-total { font-size: clamp(1.75rem, 2.6vw, 2.25rem); font-weight: 600; letter-spacing: -.035em; color: var(--texto); font-variant-numeric: tabular-nums; }

/* Ilustrações (src/arte.ts): faixa escura com o carro em destaque */
.arte-carro { margin: -.25rem -.25rem 1rem; border-radius: calc(var(--raio, 12px) - 2px); background: radial-gradient(80% 90% at 50% 100%, rgba(224, 0, 0, .14), transparent 70%), var(--fundo); overflow: hidden; }
.arte-carro svg { display: block; width: 100%; height: auto; }
.duas-colunas .arte-carro, .confirmado .arte-carro { max-width: 420px; }

/* Resumo */
.resumo { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.25rem; margin: 0 0 1.25rem; }
.resumo dt { color: var(--texto-3); }
.resumo dd { margin: 0; font-weight: 600; }
.tabela-precos { width: 100%; border-collapse: collapse; margin-bottom: .75rem; font-variant-numeric: tabular-nums; }
.tabela-precos th { text-align: left; font-weight: 400; color: var(--texto-2); }
.tabela-precos td { text-align: right; }
.tabela-precos th, .tabela-precos td { padding: .5rem 0; border-bottom: 1px solid var(--borda); }
.tabela-precos .total th, .tabela-precos .total td { font-weight: 600; font-size: 1.3rem; letter-spacing: -.02em; color: var(--texto); border: 0; padding-top: .9rem; }
.codigo { font-size: 1.1rem; color: var(--texto-2); }
.codigo strong { display: inline-block; font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 600; color: var(--acento-claro); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.confirmado { border-top: 2px solid var(--acento); }

/* Reservas */
.lista-reservas { list-style: none; padding: 0; margin: 0; }
.linha-reserva { display: flex; gap: .75rem; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.lista-reservas details { margin-top: .5rem; }
.lista-reservas details .resumo { margin-top: .75rem; }

/* Frota */
.contadores { display: grid; gap: .85rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 1.25rem; }
@media (min-width: 700px) { .contadores { grid-template-columns: repeat(4, 1fr); } }
.contador {
  display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; font: inherit; text-align: left; cursor: pointer; color: var(--texto-2);
  background: var(--superficie); border: 1px solid var(--borda); border-left: 3px solid var(--borda); border-radius: var(--raio-p);
  padding: 1rem 1.1rem; transition: border-color .15s, background-color .15s;
}
.contador:hover { background: var(--superficie-2); }
.contador[aria-pressed="true"] { background: var(--superficie-2); border-color: var(--acento-claro); box-shadow: 0 0 0 1px var(--acento-claro); }
.contador-num { font-size: clamp(2rem, 3.2vw, 2.75rem); font-weight: 600; line-height: 1; letter-spacing: -.04em; color: var(--texto); font-variant-numeric: tabular-nums; }
.st-borda-livre { border-left-color: var(--livre); }
.st-borda-reservado { border-left-color: var(--reservado); }
.st-borda-alugado { border-left-color: var(--alugado); }
.st-borda-manutencao { border-left-color: var(--manutencao); }
.contador[aria-pressed="true"].st-borda-livre { border-left-color: var(--livre); }
.contador[aria-pressed="true"].st-borda-reservado { border-left-color: var(--reservado); }
.contador[aria-pressed="true"].st-borda-alugado { border-left-color: var(--alugado); }
.contador[aria-pressed="true"].st-borda-manutencao { border-left-color: var(--manutencao); }
.filtros { display: flex; flex-wrap: wrap; gap: .85rem; align-items: flex-end; }
.filtros .campo { margin: 0; flex: 1 1 180px; }
.tabela-rolagem { overflow-x: auto; background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra); }
.tabela { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabela th, .tabela td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--borda); vertical-align: middle; }
.tabela thead th { background: var(--superficie-2); color: var(--texto-2); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }
.tabela tbody tr { transition: background-color .15s; }
.tabela tbody tr:hover { background: rgba(255, 255, 255, .025); }
.tabela tbody tr:last-child td, .tabela tbody tr:last-child th { border-bottom: 0; }
.linha-tempo { padding-left: 1.25rem; margin: 0; }
.linha-tempo li { margin-bottom: .35rem; }
.linha-tempo li::marker { color: var(--acento); }
.linha-tempo time { font-weight: 600; margin-right: .5rem; font-variant-numeric: tabular-nums; }

/* Relatórios */
.indicadores { display: grid; gap: .85rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .indicadores { grid-template-columns: repeat(5, 1fr); } }
.indicador { display: flex; flex-direction: column; gap: .3rem; margin: 0; }
.ind-num { font-size: clamp(1.6rem, 2.6vw, 2.25rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; color: var(--texto); font-variant-numeric: tabular-nums; }
.indicador span:last-child { color: var(--texto-3); font-size: .875rem; }
.graficos { display: grid; gap: 1.25rem; grid-template-columns: 1fr; margin-top: 1.25rem; }
@media (min-width: 860px) { .graficos { grid-template-columns: 1fr 1fr; } .graficos figure:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.grafico { margin: 0; min-width: 0; }
.barras { display: grid; grid-template-columns: minmax(0, max-content) minmax(60px, 1fr) 2.5rem; gap: .5rem .9rem; align-items: center; margin-bottom: 1.25rem; }
.barra-rotulo { font-size: .9rem; color: var(--texto-2); overflow-wrap: anywhere; }
.barra-valor { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.barra { display: block; border-radius: 4px; background: linear-gradient(90deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02)); }
.barra rect { fill: var(--acento); }
.tabela-compacta { font-size: .9rem; }
.tabela-compacta th, .tabela-compacta td { padding: .5rem .6rem; }
.tabela-compacta td { text-align: right; font-variant-numeric: tabular-nums; }
.tabela-compacta th[scope="col"]:not(:first-child) { text-align: right; }
.tabela-compacta tbody th { font-weight: 400; color: var(--texto-2); }

/* Toast e diálogo (vidro) */
.toast {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 40;
  background: rgba(34, 34, 38, .88); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .1); color: var(--texto); padding: .8rem 1.1rem; border-radius: 999px;
  display: flex; gap: 1rem; align-items: center; width: max-content; max-width: calc(100% - 2rem); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .8);
}
.toast[hidden] { display: none; }
.toast .btn-link { color: var(--acento-claro); font-weight: 700; }
dialog {
  color: var(--texto); background: rgba(24, 24, 27, .86); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 20px; padding: 1.5rem;
  max-width: min(460px, calc(100% - 2rem)); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9);
}
dialog p { color: var(--texto-2); }
dialog::backdrop { background: rgba(5, 5, 7, .7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog .acoes { justify-content: flex-end; }

/* Celular: tabela da frota vira lista de cartões (sem rolagem lateral). */
@media (max-width: 640px) {
  .tabela-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tabela-cards tr { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .75rem; padding: 1rem; border-bottom: 1px solid var(--borda); }
  .tabela-cards tbody tr:last-child { border-bottom: 0; }
  .tabela-cards td { display: block; padding: 0; border: 0; }
  .tabela-cards td::before { content: attr(data-label); display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--texto-3); margin-bottom: .1rem; }
  .tabela-cards td[data-label="Ação"] { grid-column: 1 / -1; }
  .tabela-cards td[data-label="Ação"]::before { content: none; }

  .topo-linha { grid-template-columns: auto auto; grid-template-areas: "marca perfil" "nav nav"; justify-content: space-between; padding: .5rem 1rem .35rem; gap: .35rem .75rem; }
  .topo nav ul { margin: 0 -.5rem; flex-wrap: wrap; overflow-x: visible; } /* admin tem 5 itens: quebra a linha em vez de esconder */
  .topo nav a { padding: .45rem .7rem; font-size: .9rem; }
  main { padding-left: 1rem; padding-right: 1rem; }
}

@media (max-width: 480px) {
  .toast { border-radius: var(--raio); }
  .marca { font-size: 1.05rem; gap: .45rem; }
  .perfil-rotulo { display: none; }
  .perfil button { padding: .35rem .65rem; font-size: .8rem; }
  /* Rótulo com dica longa ("Com motorista"): a dica desce para a linha de baixo, alinhada ao texto. */
  .opcao { padding: .5rem .8rem; gap: .45rem; }
  .opcao:has(.dica) { flex-wrap: wrap; row-gap: 0; border-radius: var(--raio-p); }
  .opcao .dica { flex-basis: 100%; padding-left: calc(18px + .45rem); }
  .resumo { grid-template-columns: 1fr; gap: 0; }
  .resumo dd { margin-bottom: .6rem; }
}

/* Impressão (Relatórios → "Baixar PDF"): fundo claro, sem animação nem enfeites, gráficos e tabelas legíveis. */
@media print {
  :root { --texto: #000; --texto-2: #222; --texto-3: #444; --superficie: #fff; --superficie-2: #f2f2f2; --borda: #bbb; --fundo: #fff; color-scheme: light; }
  *, *::before, *::after { animation: none !important; transition: none !important; box-shadow: none !important; text-shadow: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  body::before, body::after, .topo, .rodape, .pular, #toast, dialog, #form-rel, .exportar, .carregando { display: none !important; }
  main { max-width: none; padding: 0; }
  h1 { font-size: 20pt; max-width: none; color: #000; }
  .so-impressao { display: block; font-size: 12pt; }
  .cartao, .tabela-rolagem { background: #fff; border: 1px solid #bbb; break-inside: avoid; }
  .graficos, .indicadores { display: block; }
  .indicador { display: inline-flex; flex-direction: column; width: 30%; margin: 0 1% .5rem 0; vertical-align: top; }
  .grafico { margin-bottom: 1rem; }
  .barra { background: #eee; }
  .barra rect { fill: #333; }
  .aviso { background: #fff; color: #000; }
  a { color: #000; }
}

/* Abertura: vídeo de fundo, créditos da equipe e botão Entrar (src/abertura.ts). */
.abertura { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #000; color: var(--texto); overflow: hidden; }
.abertura:focus { outline: none; }
.ab-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ab-veu { position: absolute; inset: 0; background: radial-gradient(60% 70% at 50% 100%, rgba(224, 0, 0, .18), transparent 70%), linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .82)); }
.ab-creditos { position: relative; text-align: center; padding: 1.5rem; max-width: 46rem; }
.ab-rotulo { margin: 0 0 .75rem; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--texto-2); }
.ab-titulo { margin: 0 0 2.5rem; font-size: clamp(3rem, 11vw, 7rem); font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.ab-nomes { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; font-size: clamp(1.15rem, 3.2vw, 1.6rem); font-weight: 400; letter-spacing: -.01em; }
.ab-entrar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 1.25rem; padding: 1rem 3.25rem; min-height: 56px; }
.ab-pular { position: absolute; top: 1rem; right: 1rem; z-index: 1; background: rgba(15, 15, 17, .6); color: var(--texto); border: 1px solid var(--borda-campo); border-radius: 999px; padding: .55rem 1.1rem; min-height: 44px; font: inherit; font-size: .9rem; cursor: pointer; backdrop-filter: blur(6px); }
.ab-entrar[hidden], .ab-creditos[hidden] { display: none; }
.ab-pular:hover { border-color: var(--texto-2); }
html.ab-aberta { overflow: hidden; }
