/* Painel da loja - Tour Car Auto Peças (gestao.tourcar.com.br).
   Mesma família visual do TourGest, do fiado e das entregas: azul-marinho +
   dourado, Manrope (texto e números) e Sora (títulos). Tema claro e escuro.
   Cores dos gráficos conferidas no validador (daltonismo e contraste) no
   cartão branco (#fff) e no cartão escuro (#131a28). */

@font-face { font-family: 'Manrope'; src: url('manrope-latin.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Sora'; src: url('sora-latin.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f2f4f8;
  --card: #ffffff;
  --card-2: #f6f8fb;
  --card-3: #eef1f6;
  --ink: #131a2a;
  --ink-2: #4a5366;
  --ink-3: #737d90;
  --line: #e3e7ee;
  --line-2: #edf0f5;
  --grade: #e8ebf0;
  --base: #c7cdd7;
  --navy: #0f1d3a;
  --navy-2: #1a2c56;
  --navy-3: #253b6e;
  --gold: #f2b631;
  --gold-2: #e09f12;
  --gold-soft: #fff5d9;
  --gold-ink: #6e4c00;
  --foco: #2a78d6;
  --lateral: #0d1a33;
  --lateral-2: #13234a;
  --lateral-ink: #c9d3e6;
  /* séries (ordem fixa, validada) */
  --serie-1: #2a78d6;
  --serie-2: #eb6834;
  --serie-3: #1baf7a;
  --serie-4: #eda100;
  --serie-5: #e87ba4;
  --serie-6: #008300;
  --comparacao: #898781;
  --comparacao-barra: #c3c2b7;
  /* classes ABC (ordinal: A mais forte) */
  --abc-a: #184f95;
  --abc-b: #3987e5;
  --abc-c: #86b6ef;
  /* mapa de calor (sequencial, um tom só) */
  --seq-0: #f1f4f8;
  --seq-1: #cde2fb;
  --seq-2: #9ec5f4;
  --seq-3: #6da7ec;
  --seq-4: #3987e5;
  --seq-5: #256abf;
  --seq-6: #1c5cab;
  --seq-7: #104281;
  /* situação (sempre com ícone + texto) */
  --bom: #0ca30c;
  --atencao: #fab219;
  --serio: #ec835a;
  --critico: #d03b3b;
  --bom-fundo: #e7f6e7;
  --bom-texto: #0f5f0f;
  --atencao-fundo: #fff3d6;
  --atencao-texto: #714c00;
  --serio-fundo: #fdeee7;
  --serio-texto: #8a3614;
  --critico-fundo: #fdeaea;
  --critico-texto: #9b1f1f;
  --info-fundo: #eaf2fd;
  --info-texto: #1c4f8f;
  --sombra: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 22px -12px rgba(16, 24, 40, 0.16);
  --sombra-alta: 0 24px 60px -18px rgba(9, 16, 34, 0.45);
  --raio: 20px;
  --raio-p: 14px;
  --lateral-larga: 252px;
  --lateral-curta: 78px;
  --topo: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema='claro']) {
    color-scheme: dark;
    --bg: #0a0e16;
    --card: #131a28;
    --card-2: #182132;
    --card-3: #1d2840;
    --ink: #edf1f7;
    --ink-2: #b9c1ce;
    --ink-3: #8b94a6;
    --line: #253049;
    --line-2: #1c2639;
    --grade: #222c40;
    --base: #36425b;
    --gold-soft: rgba(242, 182, 49, 0.14);
    --gold-ink: #ffd36b;
    --lateral: #0b1222;
    --lateral-2: #121c33;
    --serie-1: #3987e5;
    --serie-2: #d95926;
    --serie-3: #199e70;
    --serie-4: #c98500;
    --serie-5: #d55181;
    --serie-6: #008300;
    --comparacao: #898781;
    --comparacao-barra: #4a5163;
    --abc-a: #9ec5f4;
    --abc-b: #5598e7;
    --abc-c: #256abf;
    --seq-0: #182132;
    --seq-1: #104281;
    --seq-2: #184f95;
    --seq-3: #1c5cab;
    --seq-4: #256abf;
    --seq-5: #3987e5;
    --seq-6: #6da7ec;
    --seq-7: #9ec5f4;
    --bom-fundo: rgba(12, 163, 12, 0.16);
    --bom-texto: #86e386;
    --atencao-fundo: rgba(250, 178, 25, 0.15);
    --atencao-texto: #ffd27a;
    --serio-fundo: rgba(236, 131, 90, 0.16);
    --serio-texto: #f7b597;
    --critico-fundo: rgba(208, 59, 59, 0.18);
    --critico-texto: #ff9d9d;
    --info-fundo: rgba(57, 135, 229, 0.16);
    --info-texto: #a9cbf6;
    --sombra: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 26px -14px rgba(0, 0, 0, 0.7);
  }
}
:root[data-tema='escuro'] {
  color-scheme: dark;
  --bg: #0a0e16;
  --card: #131a28;
  --card-2: #182132;
  --card-3: #1d2840;
  --ink: #edf1f7;
  --ink-2: #b9c1ce;
  --ink-3: #8b94a6;
  --line: #253049;
  --line-2: #1c2639;
  --grade: #222c40;
  --base: #36425b;
  --gold-soft: rgba(242, 182, 49, 0.14);
  --gold-ink: #ffd36b;
  --lateral: #0b1222;
  --lateral-2: #121c33;
  --serie-1: #3987e5;
  --serie-2: #d95926;
  --serie-3: #199e70;
  --serie-4: #c98500;
  --serie-5: #d55181;
  --serie-6: #008300;
  --comparacao: #898781;
  --comparacao-barra: #4a5163;
  --abc-a: #9ec5f4;
  --abc-b: #5598e7;
  --abc-c: #256abf;
  --seq-0: #182132;
  --seq-1: #104281;
  --seq-2: #184f95;
  --seq-3: #1c5cab;
  --seq-4: #256abf;
  --seq-5: #3987e5;
  --seq-6: #6da7ec;
  --seq-7: #9ec5f4;
  --bom-fundo: rgba(12, 163, 12, 0.16);
  --bom-texto: #86e386;
  --atencao-fundo: rgba(250, 178, 25, 0.15);
  --atencao-texto: #ffd27a;
  --serio-fundo: rgba(236, 131, 90, 0.16);
  --serio-texto: #f7b597;
  --critico-fundo: rgba(208, 59, 59, 0.18);
  --critico-texto: #ff9d9d;
  --info-fundo: rgba(57, 135, 229, 0.16);
  --info-texto: #a9cbf6;
  --sombra: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 26px -14px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.015em; }
h1, h2 { font-family: 'Sora', 'Manrope', sans-serif; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--foco); }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }
.icone { width: 18px; height: 18px; flex-shrink: 0; }
:focus-visible { outline: 2.5px solid var(--foco); outline-offset: 2px; border-radius: 8px; }
.so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- botões, campos, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 13px;
  padding: 11px 17px; font-weight: 800; font-size: 14.5px; background: var(--navy); color: #fff; text-decoration: none;
  transition: transform .12s, filter .15s, background .15s; white-space: nowrap; min-height: 44px;
}
:root[data-tema='escuro'] .btn:not(.btn-claro):not(.btn-ouro):not(.btn-perigo):not(.btn-fantasma) { background: var(--navy-3); }
@media (prefers-color-scheme: dark) { :root:not([data-tema='claro']) .btn:not(.btn-claro):not(.btn-ouro):not(.btn-perigo):not(.btn-fantasma) { background: var(--navy-3); } }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: none; }
.btn-ouro { background: var(--gold); color: #1b1300; }
.btn-claro { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-claro:hover { background: var(--card-2); filter: none; }
.btn-perigo { background: var(--critico-fundo); color: var(--critico-texto); }
.btn-fantasma { background: transparent; color: var(--ink-2); padding: 9px 11px; min-height: 40px; }
.btn-fantasma:hover { background: var(--card-3); filter: none; }
.btn-pequeno { padding: 7px 11px; font-size: 13px; border-radius: 10px; min-height: 34px; gap: 6px; }
.btn-pequeno .icone { width: 16px; height: 16px; }
.btn-bloco { width: 100%; }
.btn-redondo { width: 42px; height: 42px; padding: 0; border-radius: 13px; min-height: 0; }

.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > span { font-size: 12.5px; font-weight: 800; color: var(--ink-2); }
.campo small { color: var(--ink-3); font-size: 12px; }
.entrada {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; background: var(--card);
  font-size: 16px; font-weight: 600; outline: none; transition: border-color .15s, box-shadow .15s; min-height: 44px;
}
.entrada:focus { border-color: var(--foco); box-shadow: 0 0 0 4px color-mix(in oklab, var(--foco) 18%, transparent); }
select.entrada { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.senha-caixa { position: relative; display: block; }
.senha-caixa .entrada { padding-right: 46px; }
.senha-caixa button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--ink-3); padding: 9px; }
.grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grade-2 { grid-template-columns: 1fr; } }
.pilha { display: flex; flex-direction: column; gap: 14px; }
.linha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg-erro { background: var(--critico-fundo); color: var(--critico-texto); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 700; }
.msg-info { background: var(--info-fundo); color: var(--info-texto); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; font-weight: 600; }
.msg-alerta { background: var(--atencao-fundo); color: var(--atencao-texto); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; font-weight: 600; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 13px; font-weight: 800; font-size: 13px;
  color: var(--ink-2); transition: background .15s, color .15s, border-color .15s; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
}
.chip:hover { border-color: var(--base); }
.chip.ativo { border-color: var(--ink); background: var(--ink); color: var(--card); }
.chip b { font-weight: 800; opacity: .75; }
.segmento { display: inline-grid; grid-auto-flow: column; grid-auto-columns: auto; background: var(--card-3); border-radius: 13px; padding: 4px; gap: 3px; }
.segmento button { border: 0; background: transparent; border-radius: 10px; padding: 8px 13px; font-weight: 800; color: var(--ink-2); font-size: 13.5px; white-space: nowrap; min-height: 36px; }
.segmento button.ativo { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .14); }
.busca { position: relative; flex: 1 1 220px; max-width: 360px; }
.busca .icone { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 17px; height: 17px; }
.busca .entrada { padding-left: 38px; font-size: 15px; }
.filtros { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filtros .espaco { flex: 1; }

/* ---------- estrutura (menu lateral + topo + tela) ---------- */
.app { display: grid; grid-template-columns: var(--lateral-larga) minmax(0, 1fr); min-height: 100dvh; }
.lateral {
  position: sticky; top: 0; height: 100dvh; background: linear-gradient(180deg, var(--lateral), var(--lateral-2));
  color: var(--lateral-ink); display: flex; flex-direction: column; padding: 18px 14px; gap: 6px; overflow-y: auto; z-index: 40;
}
.marca { display: flex; align-items: center; gap: 11px; padding: 2px 6px 16px; text-decoration: none; color: #fff; }
.marca img { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .7); }
.marca b { display: block; font-family: 'Sora', sans-serif; font-size: 16.5px; letter-spacing: -0.01em; }
.marca small { display: block; font-size: 11.5px; font-weight: 700; color: #8fa0c4; }
.nav-grupo { font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: #6f80a6; padding: 12px 12px 4px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--lateral-ink);
  text-decoration: none; font-weight: 700; font-size: 14.5px; transition: background .15s, color .15s; border: 0; background: none; text-align: left; width: 100%;
}
.nav-item .icone { width: 19px; height: 19px; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.ativo { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-item.ativo::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--gold); }
.nav-item.ativo .icone { color: var(--gold); opacity: 1; }
.nav-item .contador { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--critico); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.nav-item .contador.leve { background: rgba(255, 255, 255, .14); color: #e3e9f6; }
.lateral .rodape-lateral { margin-top: auto; padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.eu-cartao { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 0; color: inherit; text-align: left; width: 100%; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: #1b1300; font-weight: 800; display: grid; place-items: center; font-size: 13px; flex-shrink: 0; }
.eu-cartao b { display: block; color: #fff; font-size: 14px; }
.eu-cartao small { display: block; color: #8fa0c4; font-size: 12px; font-weight: 700; }

.principal { min-width: 0; display: flex; flex-direction: column; }
.topo {
  position: sticky; top: 0; z-index: 30; height: var(--topo); display: flex; align-items: center; gap: 12px; padding: 0 26px;
  background: color-mix(in oklab, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line-2);
}
.topo-titulo { min-width: 0; }
.topo-titulo h1 { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topo-titulo small { display: block; font-size: 12px; font-weight: 700; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topo .espaco { flex: 1; }
.btn-menu { display: none; }
.estado-loja { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 99px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 12.5px; font-weight: 800; color: var(--ink-2); white-space: nowrap; border: 0; }
.estado-loja i { width: 8px; height: 8px; border-radius: 50%; background: var(--bom); box-shadow: 0 0 0 0 color-mix(in oklab, var(--bom) 60%, transparent); animation: pulso 2s infinite; }
.estado-loja.parado i { background: var(--atencao); animation: none; }
.estado-loja.desligado i { background: var(--critico); animation: none; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--bom) 55%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.btn-topo { width: 42px; height: 42px; border-radius: 13px; border: 0; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink-2); display: grid; place-items: center; flex-shrink: 0; }
.btn-topo:hover { color: var(--ink); background: var(--card-2); }
.btn-topo.girando .icone { animation: girar .9s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

.tela { padding: 22px 26px 60px; max-width: 1440px; width: 100%; margin: 0 auto; transition: opacity .2s; }
.tela.carregando { opacity: .55; pointer-events: none; }
.tela-moldura { padding: 0; max-width: none; height: calc(100dvh - var(--topo)); display: flex; flex-direction: column; }

.abas-celular { display: none; }

/* computador médio: menu só com ícones */
@media (max-width: 1180px) and (min-width: 769px) {
  .app { grid-template-columns: var(--lateral-curta) minmax(0, 1fr); }
  .lateral { padding: 16px 10px; align-items: center; }
  .marca { padding: 2px 0 14px; }
  .marca span, .nav-item span, .nav-grupo, .eu-cartao div { display: none; }
  .nav-item { justify-content: center; padding: 12px; width: 52px; }
  .nav-item.ativo::before { left: -10px; }
  .nav-item .contador { position: absolute; top: 4px; right: 2px; margin: 0; min-width: 18px; height: 18px; font-size: 10.5px; padding: 0 5px; }
  .eu-cartao { justify-content: center; width: 52px; padding: 8px; }
}
/* celular: barra de abas embaixo */
@media (max-width: 768px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .lateral { display: none; }
  .topo { padding: 0 14px; padding-top: env(safe-area-inset-top); height: calc(var(--topo) + env(safe-area-inset-top)); gap: 8px; }
  .topo-titulo h1 { font-size: 17px; }
  .estado-loja span { display: none; }
  .estado-loja { padding: 8px; }
  .tela { padding: 14px 14px calc(96px + env(safe-area-inset-bottom)); }
  .tela-moldura { height: calc(100dvh - var(--topo) - env(safe-area-inset-top) - 70px - env(safe-area-inset-bottom)); padding: 0; }
  .abas-celular {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: color-mix(in oklab, var(--card) 92%, transparent); backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5);
    border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .abas-celular button, .abas-celular a {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border: 0; background: none;
    color: var(--ink-3); font-size: 11px; font-weight: 800; text-decoration: none; border-radius: 12px; min-height: 52px; justify-content: center;
  }
  .abas-celular .icone { width: 22px; height: 22px; }
  .abas-celular .ativo { color: var(--ink); }
  .abas-celular .ativo .icone { color: var(--serie-1); }
  .abas-celular .contador { position: absolute; top: 2px; left: 50%; margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--critico); color: #fff; font-size: 10.5px; display: grid; place-items: center; }
}

/* ---------- cabeçalho de cada tela ---------- */
.cabeca { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.cabeca h2 { font-size: 24px; }
.cabeca p { color: var(--ink-2); font-weight: 600; margin-top: 4px; font-size: 14px; }
@media (max-width: 768px) { .cabeca h2 { font-size: 20px; } .cabeca { margin-bottom: 14px; } }

/* ---------- cartões ---------- */
.cartao { background: var(--card); border-radius: var(--raio); box-shadow: var(--sombra); min-width: 0; }
.cartao-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.cartao-cab h3 { font-size: 16px; font-weight: 800; }
.cartao-cab p { font-size: 13px; color: var(--ink-3); font-weight: 600; margin-top: 3px; }
.cartao-cab .acoes { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.cartao-corpo { padding: 16px 20px 20px; }
.cartao-corpo.sem-lados { padding-left: 0; padding-right: 0; }
.cartao-rodape { padding: 12px 20px; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.cartao-rodape a { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; text-decoration: none; }
.cartao-rodape a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cartao-rodape a svg { width: 15px; height: 15px; }
@media (max-width: 768px) {
  .cartao-cab { padding: 15px 15px 0; }
  .cartao-corpo { padding: 14px 15px 16px; }
  .cartao-rodape { padding: 11px 15px; }
}
.grade { display: grid; gap: 16px; }
.grade + .grade, .grade + .cartao, .cartao + .grade, .cartao + .cartao { margin-top: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.pilha { display: flex; flex-direction: column; gap: 16px; min-width: 0; align-self: start; }
.pilha > .cartao + .cartao { margin-top: 0; }
@media (max-width: 1100px) { .g-2-1, .g-1-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-3 > :nth-child(3):last-child { grid-column: 1 / -1; } }
@media (max-width: 760px) { .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); } .grade, .pilha { gap: 12px; } .grade + .grade, .grade + .cartao, .cartao + .grade, .cartao + .cartao { margin-top: 12px; } .pilha > .cartao + .cartao { margin-top: 0; } }

/* ---------- número grande (um por tela) e cartões de número ---------- */
.heroi {
  position: relative; overflow: hidden; border-radius: 24px; padding: 22px 24px; color: #fff;
  background: radial-gradient(900px 420px at 110% -30%, rgba(242, 182, 49, .22), transparent 60%), linear-gradient(140deg, var(--navy-2), var(--navy) 70%);
  box-shadow: 0 24px 50px -28px rgba(9, 16, 34, .8);
}
.heroi-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.heroi-rotulo { font-size: 12.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #aebbd8; }
.heroi-valor { font-size: clamp(40px, 7vw, 60px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; margin: 8px 0 10px; }
.heroi-linha { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* O herói é sempre azul-escuro: a pílula não pode pegar o fundo claro do tema claro. */
.heroi .variacao, .heroi .variacao.boa, .heroi .variacao.ruim { background: rgba(255, 255, 255, .1); }
.heroi .variacao.boa { color: #9be59b; }
.heroi .variacao.ruim { color: #ffb3b3; }
.heroi .variacao small { color: #aebbd8; }
.heroi-numeros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.heroi-numeros div { background: rgba(255, 255, 255, .07); border-radius: 15px; padding: 11px 13px; min-width: 0; }
.heroi-numeros span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #9fb0d2; }
.heroi-numeros b { display: block; font-size: 19px; font-weight: 800; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .heroi { padding: 18px; border-radius: 22px; } .heroi-numeros { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis.k3, .kpis.k5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .kpis.k5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis.k5 > :last-child { grid-column: 1 / -1; } }
@media (max-width: 560px) { .kpis.k3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis.k3 > :nth-child(3):last-child { grid-column: 1 / -1; } .kpis { gap: 10px; } }
.kpi { position: relative; background: var(--card); border-radius: 18px; box-shadow: var(--sombra); padding: 15px 16px 14px; min-width: 0; display: flex; flex-direction: column; gap: 3px; border: 0; text-align: left; color: inherit; }
button.kpi, a.kpi { cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s; }
button.kpi:hover, a.kpi:hover { transform: translateY(-1px); }
.kpi-rotulo { font-size: 12px; font-weight: 800; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.kpi-rotulo .icone { width: 15px; height: 15px; }
.kpi-valor { font-size: 24px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub { font-size: 12.5px; font-weight: 700; color: var(--ink-3); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
/* "mesmos dias do mês passado" não cabe num cartão de celular: corta com "…" em vez de alargar a página. */
.kpi-sub .variacao { max-width: 100%; min-width: 0; }
.kpi-sub .variacao small { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.kpi .faisca-lugar { position: absolute; right: 12px; top: 14px; width: 78px; height: 26px; }
.faisca-lugar .faisca { display: block; width: 100%; height: 100%; }
@media (max-width: 560px) { .kpi { padding: 13px 13px 12px; } .kpi-valor { font-size: 20px; } .kpi .faisca-lugar { display: none; } }

.variacao { display: inline-flex; align-items: center; gap: 3px; border-radius: 99px; padding: 3px 8px 3px 5px; font-size: 12px; font-weight: 800; white-space: nowrap; background: var(--card-3); }
.variacao .icone-var { width: 14px; height: 14px; }
.variacao.boa { color: var(--bom-texto); background: var(--bom-fundo); }
.variacao.ruim { color: var(--critico-texto); background: var(--critico-fundo); }
.variacao.neutra { color: var(--ink-3); }
.variacao small { font-weight: 700; color: var(--ink-3); margin-left: 3px; font-size: 11.5px; }

.selo { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 3px 9px 3px 6px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.selo .icone-selo { width: 14px; height: 14px; }
.selo-bom { background: var(--bom-fundo); color: var(--bom-texto); }
.selo-atencao { background: var(--atencao-fundo); color: var(--atencao-texto); }
.selo-serio { background: var(--serio-fundo); color: var(--serio-texto); }
.selo-critico { background: var(--critico-fundo); color: var(--critico-texto); }
.selo-neutro, .selo-info { background: var(--card-3); color: var(--ink-2); }
.classe { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.classe-A { background: var(--abc-a); color: #fff; }
.classe-B { background: var(--abc-b); color: #fff; }
.classe-C { background: var(--abc-c); color: #0d2b52; }
:root[data-tema='escuro'] .classe-A, :root[data-tema='escuro'] .classe-B { color: #08162b; }
:root[data-tema='escuro'] .classe-C { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-tema='claro']) .classe-A, :root:not([data-tema='claro']) .classe-B { color: #08162b; } :root:not([data-tema='claro']) .classe-C { color: #fff; } }

/* ---------- avisos "precisa de atenção" ---------- */
.atencao-lista { display: flex; flex-direction: column; }
.atencao-item { display: flex; align-items: center; gap: 13px; padding: 12px 20px; border-top: 1px solid var(--line-2); text-decoration: none; color: inherit; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; width: 100%; }
.atencao-item:first-child { border-top: 0; }
.atencao-item:hover { background: var(--card-2); }
.atencao-icone { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.atencao-icone .icone { width: 19px; height: 19px; }
.atencao-icone.critico { background: var(--critico-fundo); color: var(--critico-texto); }
.atencao-icone.serio { background: var(--serio-fundo); color: var(--serio-texto); }
.atencao-icone.atencao { background: var(--atencao-fundo); color: var(--atencao-texto); }
.atencao-icone.info { background: var(--info-fundo); color: var(--info-texto); }
.atencao-icone.bom { background: var(--bom-fundo); color: var(--bom-texto); }
.atencao-texto { flex: 1; min-width: 0; }
.atencao-texto b { display: block; font-size: 14.5px; }
.atencao-texto small { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.atencao-item > .icone { color: var(--ink-3); width: 16px; height: 16px; }
@media (max-width: 768px) { .atencao-item { padding: 12px 15px; } }

/* ---------- listas e tabelas ---------- */
.lista { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-top: 1px solid var(--line-2); min-width: 0; }
.item:first-child { border-top: 0; }
.item-meio { flex: 1; min-width: 0; }
.item-meio b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-meio small { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-valor { text-align: right; flex-shrink: 0; }
.item-valor b { display: block; font-size: 14.5px; font-weight: 800; white-space: nowrap; }
.item-valor small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 700; white-space: nowrap; }
.item .bolinha { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--card-3); color: var(--ink-2); font-size: 12px; font-weight: 800; flex-shrink: 0; }
@media (max-width: 768px) { .item { padding: 11px 15px; } }

.tabela-rolar { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabela { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tabela th { position: sticky; top: 0; background: var(--card-2); text-align: left; font-size: 11.5px; font-weight: 800; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; padding: 10px 12px; white-space: nowrap; border-bottom: 1px solid var(--line); z-index: 1; }
.tabela th:first-child, .tabela td:first-child { padding-left: 20px; }
.tabela th:last-child, .tabela td:last-child { padding-right: 20px; }
.tabela td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tabela tbody tr:hover { background: var(--card-2); }
.tabela .dir { text-align: right; }
.tabela .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabela .forte { font-weight: 800; }
.tabela .desc { min-width: 220px; }
.tabela .desc b { display: block; font-weight: 700; }
/* Descrição de peça vem com "CORSA/MONT/MERIVA/ASTRA..." sem espaço: deixa quebrar
   em qualquer ponto, senão a coluna fica larga demais e a tabela rola de lado. */
.tabela .desc b, .tabela .desc small { overflow-wrap: anywhere; }
.tabela .desc small { display: block; color: var(--ink-3); font-weight: 600; font-size: 12px; }
.tabela .cx { width: 40px; }
.tabela input[type='checkbox'] { width: 19px; height: 19px; accent-color: var(--serie-1); }
.tabela tr.marcada { background: color-mix(in oklab, var(--serie-1) 8%, transparent); }
.tabela-cartao-vazia { padding: 26px 20px; text-align: center; color: var(--ink-3); font-weight: 600; }
.mais-linhas { display: flex; justify-content: center; padding: 14px; }

/* celular: tabela vira cartões (cada linha um bloco) */
@media (max-width: 760px) {
  .tabela.cartoes thead { display: none; }
  .tabela.cartoes, .tabela.cartoes tbody, .tabela.cartoes tr, .tabela.cartoes td { display: block; width: 100%; }
  .tabela.cartoes tr { padding: 12px 15px; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
  .tabela.cartoes td { border: 0; padding: 0 !important; }
  .tabela.cartoes td[data-r]::before { content: attr(data-r) ' '; font-size: 11px; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
  .tabela.cartoes td.desc { grid-column: 1 / -1; min-width: 0; }
  .tabela.cartoes td.cx + td.desc { grid-column: 2 / -1; }
  .tabela.cartoes td.c-meio { grid-column: 1 / 3; }
  .tabela.cartoes td.c-fim { text-align: right; }
  .tabela.cartoes td.c-linha { grid-column: 1 / -1; }
  .tabela.cartoes .dir { text-align: left; }
  .tabela.cartoes td.esconder-cel { display: none; }
}

/* ---------- abas dentro da tela ---------- */
.abas { position: relative; display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.abas.mais-direita { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.abas.mais-esquerda { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
.abas.mais-esquerda.mais-direita { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
.abas::-webkit-scrollbar { display: none; }
.abas button { border: 0; background: none; padding: 11px 12px; font-weight: 800; color: var(--ink-3); border-bottom: 3px solid transparent; margin-bottom: -1.5px; white-space: nowrap; font-size: 14px; display: inline-flex; align-items: center; gap: 7px; }
.abas button.ativo { color: var(--ink); border-bottom-color: var(--gold); }
.abas button .contador { min-width: 21px; height: 21px; padding: 0 6px; border-radius: 99px; background: var(--card-3); color: var(--ink-2); font-size: 11.5px; display: inline-grid; place-items: center; }
.abas button.ativo .contador { background: var(--ink); color: var(--card); }

/* ---------- gráficos ---------- */
.grafico { width: 100%; min-height: 60px; position: relative; }
.g-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.g-svg:focus-visible { outline: 2.5px solid var(--foco); outline-offset: 4px; }
.g-grade { stroke: var(--grade); stroke-width: 1; shape-rendering: crispEdges; }
.g-base { stroke: var(--base); stroke-width: 1; shape-rendering: crispEdges; }
.g-referencia { stroke: var(--ink-3); stroke-width: 1; opacity: .55; shape-rendering: crispEdges; }
.g-eixo { fill: var(--ink-3); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.g-eixo.forte { fill: var(--ink-2); font-weight: 800; }
.g-valor { fill: var(--ink-2); font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--card); stroke-width: 3px; }
.g-barra { fill: var(--serie-1); transition: fill-opacity .12s; }
.g-barra.parcial { fill-opacity: .5; }
.g-barra.acima { fill: var(--serio); }
.g-referencia.forte { stroke: var(--ink-2); opacity: .8; }
.g-barra.ativo { fill-opacity: .78; }
.g-linha { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.g-linha.principal { stroke: var(--serie-1); }
.g-linha.comparacao { stroke: var(--comparacao); }
.g-linha.serie-2 { stroke: var(--serie-2); }
.g-linha.serie-3 { stroke: var(--serie-3); }
.g-area { stroke: none; }
.g-area.principal { fill: var(--serie-1); fill-opacity: .1; }
.g-ponto { stroke: var(--card); stroke-width: 2; }
.g-ponto.principal { fill: var(--serie-1); }
.g-ponto.comparacao { fill: var(--comparacao); }
.g-ponto.serie-2 { fill: var(--serie-2); }
.g-ponto.serie-3 { fill: var(--serie-3); }
.g-mira { stroke: var(--ink-3); stroke-width: 1; shape-rendering: crispEdges; pointer-events: none; }
.g-ponto.mira { pointer-events: none; }
.g-toque { fill: transparent; cursor: crosshair; }
.g-faixa.faixa-A { fill: var(--abc-a); fill-opacity: .12; }
.g-faixa.faixa-B { fill: var(--abc-b); fill-opacity: .1; }
.g-faixa.faixa-C { fill: var(--abc-c); fill-opacity: .12; }
.g-faixa-rotulo { fill: var(--ink); font-size: 12px; font-weight: 800; }
.legenda { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }
.legenda span { display: inline-flex; align-items: center; gap: 7px; }
.chave-barra { display: inline-block; width: 11px; height: 11px; border-radius: 3px; background: var(--serie-1); flex-shrink: 0; }
.chave-linha { display: inline-block; width: 16px; height: 2px; border-radius: 2px; background: var(--comparacao); flex-shrink: 0; }
.chave-barra.s1 { background: var(--serie-1); } .chave-barra.s2 { background: var(--serie-2); } .chave-barra.s3 { background: var(--serie-3); }
.chave-barra.s4 { background: var(--serie-4); } .chave-barra.s5 { background: var(--serie-5); } .chave-barra.s6 { background: var(--serie-6); }
.chave-barra.s7 { background: var(--comparacao); }

.dica {
  position: absolute; left: 0; top: 0; z-index: 200; pointer-events: none; background: var(--ink); color: var(--card);
  border-radius: 12px; padding: 9px 11px; box-shadow: var(--sombra-alta); font-size: 12.5px; min-width: 120px; max-width: 280px;
}
.dica-titulo { font-weight: 700; opacity: .75; margin-bottom: 4px; font-size: 12px; }
.dica-linha { display: flex; align-items: center; gap: 7px; }
.dica-linha b { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dica-linha span { opacity: .75; font-weight: 600; }
.dica-chave { width: 12px; height: 2px; border-radius: 2px; flex-shrink: 0; }
.dica-chave.barra { width: 9px; height: 9px; border-radius: 2px; }

.barras-h { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.barras-h li { min-width: 0; }
.barras-h li[tabindex] { cursor: pointer; border-radius: 10px; }
.bh-topo { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 5px; }
.bh-rotulo { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bh-valor { font-size: 13.5px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bh-trilha { height: 8px; border-radius: 99px; background: var(--card-3); overflow: hidden; }
.bh-barra { height: 100%; border-radius: 99px; background: var(--serie-1); }
.bh-detalhe { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; margin-top: 4px; }

.partes { display: flex; gap: 2px; height: 16px; border-radius: 6px; overflow: hidden; background: var(--card); }
.parte { min-width: 3px; }
.parte.s1 { background: var(--serie-1); } .parte.s2 { background: var(--serie-2); } .parte.s3 { background: var(--serie-3); }
.parte.s4 { background: var(--serie-4); } .parte.s5 { background: var(--serie-5); } .parte.s6 { background: var(--serie-6); } .parte.s7 { background: var(--comparacao); }
.partes-legenda { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.partes-legenda li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 9px; align-items: center; font-size: 13.5px; }
.partes-legenda span { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.partes-legenda b { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.partes-legenda small { color: var(--ink-3); font-weight: 700; font-size: 12px; min-width: 44px; text-align: right; white-space: nowrap; }

.calor { display: grid; grid-template-columns: 34px repeat(var(--colunas), minmax(0, 1fr)); gap: 3px; }
.calor-col { font-size: 10.5px; font-weight: 700; color: var(--ink-3); text-align: center; }
.calor-lin { font-size: 11.5px; font-weight: 800; color: var(--ink-2); display: flex; align-items: center; }
.calor-celula { aspect-ratio: 1.35; border-radius: 5px; background: var(--seq-0); min-height: 16px; }
.calor-celula.p1 { background: var(--seq-1); } .calor-celula.p2 { background: var(--seq-2); } .calor-celula.p3 { background: var(--seq-3); }
.calor-celula.p4 { background: var(--seq-4); } .calor-celula.p5 { background: var(--seq-5); } .calor-celula.p6 { background: var(--seq-6); } .calor-celula.p7 { background: var(--seq-7); }
.calor-celula[data-i]:hover { outline: 2px solid var(--ink); outline-offset: -1px; }
.calor-escala { display: flex; align-items: center; gap: 3px; justify-content: flex-end; margin-top: 10px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.calor-escala .calor-celula { width: 16px; min-height: 12px; aspect-ratio: auto; height: 12px; border-radius: 3px; }
.calor-escala span { margin: 0 4px; }

.faisca { overflow: visible; }
.faisca-linha { fill: none; stroke: var(--comparacao); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.faisca-ponto { fill: var(--serie-1); stroke: var(--card); stroke-width: 1.5; }

.medidor-trilha { position: relative; height: 12px; border-radius: 99px; background: color-mix(in oklab, var(--serie-1) 16%, var(--card)); overflow: visible; }
.medidor-cheio { height: 100%; border-radius: 99px; background: var(--serie-1); }
.medidor.atras .medidor-cheio, .medidor.perto .medidor-cheio { background: var(--atencao); }
.medidor.passou .medidor-cheio { background: var(--critico); }
.medidor-passou { display: inline-flex; align-items: center; gap: 5px; color: var(--critico-texto); font-weight: 800; }
.medidor-passou .icone { width: 14px; height: 14px; }
.medidor-marca { position: absolute; top: -4px; width: 3px; height: 20px; border-radius: 3px; background: var(--ink); transform: translateX(-1.5px); }
.medidor-legenda { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.medidor-legenda b { color: var(--ink); }
.heroi .medidor-trilha { background: rgba(255, 255, 255, .14); }
.heroi .medidor-cheio { background: var(--gold); }
.heroi .medidor-marca { background: #fff; }
.heroi .medidor-legenda, .heroi .medidor-legenda b { color: #c5d0e6; }

/* ---------- estados ---------- */
.vazio { text-align: center; padding: 30px 18px; color: var(--ink-3); }
.vazio .vz-icone { width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 19px; display: grid; place-items: center; background: var(--card-3); color: var(--ink-3); }
.vazio .vz-icone .icone { width: 27px; height: 27px; }
.vazio b { display: block; color: var(--ink-2); font-size: 15.5px; margin-bottom: 4px; }
.vazio p { font-size: 13.5px; font-weight: 600; max-width: 420px; margin: 0 auto; }
.carregando-tela { display: grid; place-items: center; min-height: 50dvh; }
.rodinha { width: 34px; height: 34px; border-radius: 50%; border: 3.5px solid var(--line); border-top-color: var(--serie-1); animation: girar .8s linear infinite; }
.rodinha.pequena { width: 18px; height: 18px; border-width: 2.5px; }
.esqueleto { background: linear-gradient(90deg, var(--card-3), var(--card-2), var(--card-3)); background-size: 200% 100%; animation: brilho 1.4s infinite; border-radius: 12px; }
@keyframes brilho { to { background-position: -200% 0; } }
.aviso-velho { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--atencao-fundo); color: var(--atencao-texto); font-weight: 700; font-size: 13.5px; margin-bottom: 16px; }
.aviso-velho .icone { flex-shrink: 0; }
.aviso-lote { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; border-radius: 14px; background: var(--info-fundo); color: var(--info-texto); font-weight: 600; font-size: 13.5px; margin-bottom: 16px; }
.aviso-lote .icone { flex-shrink: 0; }
.aviso-lote span { flex: 1; min-width: 0; }
.aviso-lote b { font-weight: 800; }
.aviso-lote .btn { flex-shrink: 0; }
@media (max-width: 560px) { .aviso-lote { flex-wrap: wrap; align-items: flex-start; } .aviso-lote span { flex: 1 1 calc(100% - 40px); } .aviso-lote .btn { margin-left: 30px; } }
.nota-rodape { display: flex; align-items: flex-start; gap: 6px; margin: 10px 4px 0; font-size: 12.5px; font-weight: 600; color: var(--ink-3); line-height: 1.45; }
.nota-rodape .icone { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.nota-rodape > span { flex: 1; min-width: 0; }
.nota-rodape a { font-weight: 800; text-decoration: none; }
.selo-lote { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--info-fundo); color: var(--info-texto); font-size: 11px; font-weight: 800; vertical-align: 1px; }

/* ---------- folha (janela) e avisos ---------- */
.fundo-escuro { position: fixed; inset: 0; background: rgba(6, 11, 24, .55); backdrop-filter: blur(3px); z-index: 90; display: flex; align-items: flex-end; justify-content: center; animation: aparece .18s ease; }
.fundo-escuro.saindo { animation: some .18s ease forwards; }
@keyframes aparece { from { opacity: 0; } }
@keyframes some { to { opacity: 0; } }
.folha {
  background: var(--card); width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(22px + env(safe-area-inset-bottom)); animation: sobe .3s cubic-bezier(.2, .9, .3, 1.05); box-shadow: var(--sombra-alta);
}
.folha.larga { max-width: 820px; }
.folha::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 14px; }
@keyframes sobe { from { transform: translateY(40%); opacity: .5; } }
@media (min-width: 769px) {
  .fundo-escuro { align-items: center; padding: 20px; }
  .folha { border-radius: 24px; padding-top: 22px; }
  .folha::before { display: none; }
}
.folha-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.folha-topo h2 { font-size: 19px; }
.folha-topo p { margin-top: 4px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.folha-texto { color: var(--ink-2); font-weight: 600; margin-bottom: 18px; }
.fechar { border: 0; background: var(--card-3); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; color: var(--ink-2); }
.botoes-fim { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
.botoes-fim .btn { flex: 1 1 140px; }
.menu-opcoes { display: flex; flex-direction: column; gap: 6px; }
.menu-opcoes button, .menu-opcoes a { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; border: 0; background: var(--card-2); font-weight: 800; text-align: left; color: var(--ink); text-decoration: none; font-size: 15px; width: 100%; }
.menu-opcoes .icone { width: 20px; height: 20px; color: var(--ink-2); }
.menu-opcoes small { display: block; font-weight: 600; color: var(--ink-3); font-size: 12.5px; }
.menu-opcoes .contador { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--critico); color: #fff; font-size: 11.5px; display: grid; place-items: center; }

#toasts { position: fixed; left: 50%; transform: translateX(-50%); top: max(14px, env(safe-area-inset-top)); z-index: 150; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100% - 28px)); pointer-events: none; }
.toast { background: var(--ink); color: var(--card); border-radius: 14px; padding: 12px 15px; font-weight: 700; box-shadow: var(--sombra-alta); display: flex; gap: 10px; align-items: center; pointer-events: auto; animation: toast-entra .28s cubic-bezier(.2, .9, .3, 1.2); font-size: 14px; }
.toast.erro { background: var(--critico); color: #fff; }
.toast.sucesso { background: #0f6b2f; color: #fff; }
.toast.saindo { animation: toast-sai .24s ease forwards; }
@keyframes toast-entra { from { opacity: 0; transform: translateY(-12px) scale(.96); } }
@keyframes toast-sai { to { opacity: 0; transform: translateY(-10px); } }

/* ---------- entrada (login) ---------- */
.login-fundo {
  min-height: 100dvh; display: grid; place-items: center; padding: 26px 18px;
  background: radial-gradient(1100px 600px at 0% -10%, #22376a, transparent 60%), radial-gradient(900px 520px at 110% 110%, rgba(242, 182, 49, .32), transparent 60%), #0b1529;
}
.login-caixa { width: 100%; max-width: 420px; }
.login-marca { text-align: center; color: #fff; margin-bottom: 22px; }
.login-marca img { width: 84px; height: 84px; border-radius: 26px; box-shadow: 0 16px 42px -12px rgba(0, 0, 0, .7); }
.login-marca h1 { font-size: 26px; margin-top: 14px; }
.login-marca p { color: #aebbd8; font-weight: 600; margin-top: 4px; }
.login-cartao { background: var(--card); border-radius: 26px; padding: 24px 22px; box-shadow: var(--sombra-alta); }
.login-cartao h2 { font-size: 21px; }
.login-cartao > p { color: var(--ink-2); font-weight: 600; margin: 6px 0 18px; font-size: 14.5px; }
.login-rodape { text-align: center; color: #8fa0c4; font-size: 12.5px; font-weight: 600; margin-top: 18px; }
.login-recursos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.login-recursos div { background: rgba(255, 255, 255, .06); border-radius: 14px; padding: 10px; text-align: center; color: #c9d3e6; font-size: 12px; font-weight: 700; }
.login-recursos .icone { display: block; margin: 0 auto 4px; color: var(--gold); width: 20px; height: 20px; }

/* ---------- fiado e entregas por dentro ---------- */
.moldura-topo { display: flex; align-items: center; gap: 10px; padding: 10px 26px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.moldura-topo .chips { flex: 1; }
.moldura { flex: 1; width: 100%; border: 0; background: var(--bg); display: block; min-height: 300px; }
.moldura-carregando { flex: 1; display: grid; place-items: center; }
@media (max-width: 768px) { .moldura-topo { padding: 8px 14px; } }

/* ---------- pedidos pro TourGest (fila) ---------- */
.pedido-fila { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--info-texto); background: var(--info-fundo); border-radius: 99px; padding: 3px 9px; white-space: nowrap; }
.barra-acao {
  position: sticky; bottom: 14px; z-index: 20; margin-top: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--ink); color: var(--card); border-radius: 18px; padding: 10px 12px 10px 18px; box-shadow: var(--sombra-alta); animation: sobe .25s ease;
}
.barra-acao b { font-size: 14.5px; }
.barra-acao small { opacity: .75; font-weight: 600; }
.barra-acao .espaco { flex: 1; }
.barra-acao .btn-claro { background: transparent; color: var(--card); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--card) 35%, transparent); }
@media (max-width: 768px) { .barra-acao { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* ---------- boletos ---------- */
.dia-grupo { padding: 14px 20px 6px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line-2); }
.dia-grupo:first-child { border-top: 0; }
.dia-grupo b { font-size: 14px; }
.dia-grupo span { font-size: 13px; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.boleto { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 11px 20px; }
.boleto + .boleto { border-top: 1px dashed var(--line); }
.boleto input[type='checkbox'] { width: 20px; height: 20px; accent-color: var(--serie-1); }
.boleto .b-meio b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.boleto .b-meio small { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.boleto .b-valor { text-align: right; }
.boleto .b-valor b { display: block; font-size: 15px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.boleto .b-linha { grid-column: 2 / -1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.boleto .b-linha code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 12px; color: var(--ink-2); background: var(--card-2); border-radius: 8px; padding: 5px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
@media (max-width: 768px) { .boleto { padding: 11px 15px; } .dia-grupo { padding: 14px 15px 6px; } }

/* ---------- configurações ---------- */
.config-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 960px) { .config-grade { grid-template-columns: minmax(0, 1fr); } }
.chave-mostrada { font-family: ui-monospace, Consolas, monospace; font-size: 13px; word-break: break-all; background: var(--gold-soft); color: var(--gold-ink); border-radius: 12px; padding: 12px; font-weight: 700; }
.troca { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; cursor: pointer; }
.troca input { width: 44px; height: 26px; appearance: none; background: var(--line); border-radius: 99px; position: relative; transition: background .15s; cursor: pointer; flex-shrink: 0; }
.troca input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(16, 24, 40, .3); }
.troca input:checked { background: var(--bom); }
.troca input:checked::after { transform: translateX(18px); }
.marcar-telas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.marcar-telas label { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); font-weight: 700; font-size: 14px; cursor: pointer; }
.marcar-telas input { width: 18px; height: 18px; accent-color: var(--serie-1); }
.passos { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); font-weight: 600; font-size: 14px; }

/* ---------- impressão ---------- */
@media print {
  .lateral, .topo, .abas-celular, .barra-acao, .acoes { display: none !important; }
  .app { display: block; }
  .tela { padding: 0; }
  .cartao { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
