/* =========================================================================
   DESIGN SYSTEM — terminal financeiro.
   Verde-limão elétrico + preto + neutros claros. Numerais em IBM Plex Mono.
   Tema base: Bootstrap (light). Layout: sidebar preta + conteúdo claro.
   ========================================================================= */
:root {
  /* ---- Primitivos da paleta (Figma "Primitive Token") ---- */
  --toll-white:#FFFFFF; --toll-black:#000000;
  --toll-grey-50:#F5F5F5;  --toll-grey-100:#D6D6D7; --toll-grey-200:#98999C; --toll-grey-300:#6A6B6E; --toll-grey-400:#4D4E52;
  --toll-grey-500:#202227; --toll-grey-600:#1D1F23; --toll-grey-700:#17181C; --toll-grey-800:#121315; --toll-grey-900:#0D0E10;
  --toll-yellow-50:#FCFFEE;  --toll-yellow-100:#F7FFC9; --toll-yellow-200:#F3FFAF; --toll-yellow-300:#EEFF8A; --toll-yellow-400:#EAFF74;
  --toll-yellow-500:#E5FF51; --toll-yellow-600:#D0E84A; --toll-yellow-700:#A3B53A; --toll-yellow-800:#7E8C2D; --toll-yellow-900:#1D1D1D;
  --toll-red-50:#FFEEEE;  --toll-red-100:#FFC9CA; --toll-red-200:#FFAFB0; --toll-red-300:#FF8A8C; --toll-red-400:#FF7476;
  --toll-red-500:#FF5154; --toll-red-600:#E84A4C; --toll-red-700:#B53A3C; --toll-red-800:#8C2D2E; --toll-red-900:#6B2223;
  --toll-green-50:#F2FFEE;  --toll-green-100:#D6FFC9; --toll-green-200:#C2FFAF; --toll-green-300:#A6FF8A; --toll-green-400:#95FF74;
  --toll-green-500:#7AFF51; --toll-green-600:#6FE84A; --toll-green-700:#57B53A; --toll-green-800:#438C2D; --toll-green-900:#336B22;
  --toll-orange-50:#FFF7EE;  --toll-orange-100:#FFE6C9; --toll-orange-200:#FFDAAF; --toll-orange-300:#FFC98A; --toll-orange-400:#FFBE74;
  --toll-orange-500:#FFAE51; --toll-orange-600:#E89E4A; --toll-orange-700:#B57C3A; --toll-orange-800:#8C602D; --toll-orange-900:#6B4922;

  /* ---- Semanticos (mapeados pros primitivos oficiais) ---- */
  --brand:        var(--toll-yellow-500);
  --brand-700:    var(--toll-yellow-600);
  --brand-soft:   var(--toll-yellow-100);
  --brand-glow:   rgba(229, 255, 81, .35);
  --ink:          var(--toll-grey-900);
  --ink-2:        var(--toll-grey-700);

  --bg:           var(--toll-grey-50);
  --card:         var(--toll-white);
  --muted:        #ECECED;
  --input:        #E9E9EA;
  --border:       var(--toll-grey-100);
  --row-hover:    #FAFDE6;

  --text:         var(--toll-grey-900);
  --text-muted:   var(--toll-grey-400);
  --text-subtle:  var(--toll-grey-200);
  --on-brand:     var(--toll-grey-900);
  --on-dark:      var(--toll-white);

  --pos:          var(--toll-green-800);
  --pos-bg:       var(--toll-green-50);
  --neg:          var(--toll-red-600);
  --neg-bg:       var(--toll-red-50);
  --neg-on-dark:  var(--toll-red-300);
  --warn:         var(--toll-orange-700);

  --r-sm: 9px;  --r: 14px;  --r-lg: 18px;  --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(10,10,10,.04), 0 1px 3px rgba(10,10,10,.06);
  --sh-2: 0 1px 2px rgba(10,10,10,.05), 0 8px 24px rgba(10,10,10,.07);
  --sh-glow: 0 0 0 1px var(--brand), 0 0 18px var(--brand-glow);
  --font-display: "Gabarito", "Sora", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --brand-dark: var(--brand-700);
}

/* ============================ BASE ============================ */
body {
  font-family: var(--font-body);
  background:
    radial-gradient(820px 420px at 92% -80px, rgba(229,255,81,.10), transparent 65%),
    radial-gradient(rgba(10,10,10,.05) 1px, transparent 1.4px),
    var(--bg) !important;
  background-size: auto, 26px 26px, auto;
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--brand); color: var(--ink); }
* { scrollbar-width: thin; scrollbar-color: #C3C9CF transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #C3C9CF; border-radius: 9px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }
::-webkit-scrollbar-track { background: transparent; }

.app-shell { display: flex; align-items: stretch; min-height: 100vh; }
.content { flex: 1 1 auto; min-width: 0; padding: 28px 32px 56px; display: block; }
h1, h2, h3, h4, h5, .display-font { font-family: var(--font-display); letter-spacing: -.01em; }
.num, .tabular-nums, .mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
a { color: var(--ink); }
.brand-text { color: var(--toll-yellow-800) !important; }
.text-pos { color: var(--pos) !important; }
.text-neg { color: var(--neg) !important; }
.text-muted { color: var(--text-muted) !important; }
.up { color: var(--pos); } .down { color: var(--neg); }
/* saldo das viagens (classes do app.css antigo) nas cores oficiais e legiveis */
.cor-positivo { color: var(--pos) !important; }
.cor-negativo { color: var(--neg) !important; }
.cor-atencao  { color: var(--warn) !important; }
.cor-neutro   { color: var(--text-muted) !important; }
:focus-visible { outline: 2px solid var(--brand-700); outline-offset: 2px; border-radius: 4px; }

/* chip técnico (stack, tags, metadados) */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-muted); background: var(--card);
  border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 4px 10px;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-700); }

/* ============================ SIDEBAR (PRETO) ============================ */
.sidebar {
  position: sticky; top: 0; align-self: flex-start;
  flex: 0 0 248px; width: 248px; height: 100vh; overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(229,255,81,.05), transparent 140px),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(255,255,255,.025) 31px 32px),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  color: var(--on-dark);
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,.06);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .mark { height: 42px; width: auto; flex: 0 0 auto; background: transparent !important; }
.brand .word { font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.04; letter-spacing: -.01em; color: #fff; }
.brand .word .accent { color: var(--brand); }
.brand .word small { display: block; font-weight: 600; font-size: 9.5px; letter-spacing: .18em; color: var(--brand); text-transform: uppercase; margin-top: 3px; }
.sidebar .side-top { display: flex; align-items: center; justify-content: space-between; padding: 20px 16px 14px; }
.sidebar .nav-label {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.34);
  padding: 12px 26px 4px;
}
.sidebar .nav { display: flex; flex-direction: column; gap: 3px; padding: 4px 12px 10px; }
.sidebar .nav a {
  color: #C9CDD2; text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 9px 14px; border-radius: 11px; white-space: nowrap;
  display: flex; align-items: center; gap: 11px;
  transition: color .16s, background .16s, transform .16s, box-shadow .16s;
}
.sidebar .nav a i { font-size: 15px; opacity: .55; transition: opacity .16s; width: 18px; text-align: center; }
.sidebar .nav a:hover { color: #fff; background: rgba(255,255,255,.08); transform: translateX(2px); }
.sidebar .nav a:hover i { opacity: 1; }
.sidebar .nav a.active {
  color: var(--on-brand); background: var(--brand);
  box-shadow: 0 0 16px var(--brand-glow);
}
.sidebar .nav a.active i { opacity: 1; }
/* contador de pendências no item Despesas — discreto, alinhado à direita do label */
.sidebar .nav a .nav-badge {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; line-height: 1;
  min-width: 19px; height: 19px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  background: var(--neg); color: #fff;
}
.sidebar .nav a.active .nav-badge { background: var(--ink); color: var(--brand); }
@media (min-width: 993px) {
  .sidebar.collapsed .nav a .nav-badge {
    position: absolute; margin: 0; transform: translate(13px, -11px);
    min-width: 16px; height: 16px; font-size: 9.5px; padding: 0 3px;
  }
  .sidebar.collapsed .nav a { position: relative; }
}
.sidebar .side-foot { margin-top: auto; padding: 14px 16px 16px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar .side-status {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.40);
  padding: 0 4px 10px;
}
.sidebar .side-status .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 8px var(--brand-glow);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.btn-ghost-d { background: transparent; color: #fff !important; border: 1.5px solid rgba(255,255,255,.35) !important; }
.btn-ghost-d:hover { border-color: var(--brand) !important; color: var(--brand) !important; background: rgba(229,255,81,.06) !important; }
.sidebar .hamburger { display: none; background: transparent; border: 1.5px solid rgba(255,255,255,.35); color:#fff; border-radius: 10px; width: 42px; height: 38px; font-size: 20px; cursor: pointer; }

/* Botão recolher/expandir (desktop) */
.sidebar .collapse-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1.5px solid rgba(255,255,255,.20); color: #fff;
  border-radius: 10px; width: 34px; height: 32px; font-size: 15px; cursor: pointer; flex: 0 0 auto;
  transition: border-color .15s, color .15s;
}
.sidebar .collapse-btn:hover { border-color: var(--brand); color: var(--brand); }

/* Estado RECOLHIDO — só no desktop (no mobile a sidebar vira barra full-width) */
@media (min-width: 993px) {
  .sidebar.collapsed { flex-basis: 72px; width: 72px; }
  .sidebar.collapsed .brand .word,
  .sidebar.collapsed .nav-label,
  .sidebar.collapsed .side-status,
  .sidebar.collapsed .btn-ghost-d span { display: none; }
  .sidebar.collapsed .side-top { justify-content: center; flex-wrap: wrap; gap: 10px; padding: 18px 8px 12px; }
  .sidebar.collapsed .brand { justify-content: center; }
  .sidebar.collapsed .collapse-btn i { transform: rotate(180deg); }
  .sidebar.collapsed .nav { padding: 4px 8px 10px; }
  .sidebar.collapsed .nav a { justify-content: center; gap: 0; font-size: 0; padding: 11px 0; }
  .sidebar.collapsed .nav a i { font-size: 18px; opacity: .85; width: auto; }
  .sidebar.collapsed .nav a.active i { opacity: 1; }
  .sidebar.collapsed .side-foot { padding: 12px 8px 14px; }
  .sidebar.collapsed .btn-ghost-d i { margin: 0 !important; }
}

/* ============================ BOTÕES ============================ */
.btn { border-radius: var(--r-pill); font-weight: 700; transition: transform .14s, box-shadow .14s, background-color .14s, border-color .14s; }
.btn:active { transform: translateY(1px); }
.btn-primary, .btn-brand {
  background-color: var(--brand) !important; border-color: var(--brand) !important; color: var(--on-brand) !important;
}
.btn-primary:hover, .btn-brand:hover {
  background-color: var(--brand-700) !important; border-color: var(--brand-700) !important;
  transform: translateY(-1px); box-shadow: 0 4px 14px var(--brand-glow);
}
.btn-outline-primary { color: var(--ink) !important; border-color: var(--border) !important; background: #fff !important; }
.btn-outline-primary:hover { background: var(--muted) !important; color: var(--ink) !important; border-color: var(--text-subtle) !important; }
.btn-secondary { background: #fff !important; color: var(--text-muted) !important; border: 1px solid var(--border) !important; }
.btn-secondary:hover { background: var(--muted) !important; color: var(--ink) !important; }
.btn-danger { background: var(--neg) !important; border-color: var(--neg) !important; }

/* ============================ CARDS ============================ */
.card { background: var(--card); border: 1px solid var(--border) !important; border-radius: var(--r-lg); box-shadow: var(--sh-2); transition: border-color .18s, box-shadow .18s, transform .18s; }
.card-header { background: transparent; border-bottom: 1px solid var(--border); font-family: var(--font-display); font-weight: 700; }
a .card:hover, .card.lift:hover { transform: translateY(-2px); border-color: #CBD4A2 !important; box-shadow: var(--sh-2), 0 6px 22px var(--brand-glow); }

/* ============================ KPIs ============================ */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; box-shadow: var(--sh-1); position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--brand); opacity: .9; }
.kpi .label { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.kpi .val { font-family: var(--font-mono); font-weight: 700; font-size: 25px; letter-spacing: -.02em; margin-top: 8px; }
.kpi .delta { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; margin-top: 6px; display: inline-flex; align-items: center; gap: 5px; }
.kpi.featured { background: var(--ink); border-color: var(--ink); color: #fff; }
.kpi.featured::before { background: var(--brand); box-shadow: 0 0 10px var(--brand-glow); }
.kpi.featured .label { color: #B9BEC4; }
.kpi.featured .val { color: var(--brand); text-shadow: 0 0 22px var(--brand-glow); }
.kpi.featured .accent { position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, var(--brand-glow), transparent 70%); }
.kpi.featured .up { color: var(--brand); } .kpi.featured .down { color: var(--neg-on-dark); }

/* ============================ PAINEL ============================ */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-2); overflow: hidden; }
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.panel-head h2 { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin: 0; }
.panel-head .tag { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); background: var(--muted); padding: 5px 10px; border-radius: var(--r-pill); }
.bar-accent { width: 8px; height: 20px; border-radius: 3px; background: var(--brand); display: inline-block; box-shadow: 0 0 8px var(--brand-glow); }

/* ============================ ÁRVORE DO PLANO DE CONTAS (Estrutura) ============================ */
.coa { font-variant-numeric: tabular-nums; }
.coa-row { display: flex; align-items: baseline; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--muted); }
.coa-row:hover { background: var(--row-hover); }
.coa-row .cod { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-subtle); font-weight: 600; min-width: 78px; }
.coa-sintetica { background: #FAFBFC; font-weight: 800; font-family: var(--font-display); }
.coa-sintetica .cod { color: var(--ink); }
.coa-analitica .nome { color: var(--text-muted); }
.coa-nivel-2 { padding-left: 22px; }
.coa-nivel-3 { padding-left: 44px; }
.coa-nivel-4 { padding-left: 66px; }

/* ============================ TABELA DRE ============================ */
.dre-table { width: 100%; border-collapse: collapse; }
.dre-table td { padding: 11px 20px; font-size: 14.5px; border-bottom: 1px solid var(--muted); }
.dre-table td:last-child { text-align: right; font-weight: 600; white-space: nowrap; font-family: var(--font-mono); font-size: 13.5px; }
.dre-table .lbl.indent { padding-left: 36px; color: var(--text-muted); font-weight: 500; }
.dre-table tr:hover td { background: var(--row-hover); }
.dre-table tr.sub td { font-weight: 700; background: #FAFBFC; }
.dre-table tr.sub .lbl { color: var(--ink); }
.dre-table tr.total td { background: var(--ink); color: #fff; font-size: 15px; box-shadow: inset 3px 0 0 var(--brand); }
.dre-table tr.total td:last-child { font-family: var(--font-mono); font-weight: 700; font-size: 16px; color: var(--brand); text-shadow: 0 0 18px var(--brand-glow); }

/* Realces da DRE renderizada por dbc.Table */
tr.dre-sub td { font-weight: 700 !important; background: #FAFBFC !important; color: var(--ink) !important; }
tr.dre-total td { background: var(--ink) !important; color: #fff !important; font-weight: 800 !important; border-color: var(--ink) !important; box-shadow: inset 3px 0 0 var(--brand); }
tr.dre-total td:last-child { color: var(--brand) !important; font-family: var(--font-mono); font-size: 15px; text-shadow: 0 0 18px var(--brand-glow); }

/* ============================ TABELAS GENÉRICAS (dbc) ============================ */
.table { color: var(--text); }
.table > :not(caption) > * > * { background: var(--card); }
.table thead th { font-family: var(--font-mono); color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; border-color: var(--border); }
.table td, .table th { border-color: var(--muted); }
.table tbody tr:hover > * { background: var(--row-hover); }
.table .tabular-nums, .table .num { font-size: 13px; }
.table-dark, .table .table-dark { --bs-table-bg: var(--muted); --bs-table-color: var(--text); --bs-table-border-color: var(--border); }
.table-dark th { color: var(--text-muted) !important; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }

/* ============================ AG GRID (lançamentos) ============================ */
.ag-theme-alpine, .ag-theme-quartz {
  --ag-font-family: var(--font-body);
  --ag-border-color: var(--border);
  --ag-header-background-color: #FAFBFC;
  --ag-header-foreground-color: var(--text-muted);
  --ag-row-hover-color: var(--row-hover);
  --ag-selected-row-background-color: var(--brand-soft);
  --ag-range-selection-border-color: var(--brand-700);
  --ag-input-focus-border-color: var(--brand-700);
  font-variant-numeric: tabular-nums;
}
.ag-theme-alpine .ag-header-cell-text, .ag-theme-quartz .ag-header-cell-text {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
}
.ag-theme-alpine .ag-cell, .ag-theme-quartz .ag-cell { font-feature-settings: "tnum" 1; }

/* ============================ SLIDERS (dcc.Slider / rc-slider) ============================ */
.rc-slider-rail { background: var(--input) !important; height: 6px !important; }
.rc-slider-track { background: var(--brand) !important; height: 6px !important; }
.rc-slider-handle {
  background: var(--ink) !important; border: 3px solid var(--brand) !important;
  width: 22px !important; height: 22px !important; margin-top: -8px !important; opacity: 1 !important; box-shadow: var(--sh-1) !important;
}
.rc-slider-handle:hover, .rc-slider-handle:active { border-color: var(--brand-700) !important; box-shadow: 0 0 0 5px rgba(229,255,81,.2) !important; }
.rc-slider-mark-text { color: var(--text-subtle) !important; font-size: 11px; font-family: var(--font-mono); }
.rc-slider-dot { display: none !important; }

/* ============================ SEGMENTED CONTROL ============================ */
.seg { display: inline-flex; background: #fff; border: 1px solid var(--border); border-radius: var(--r-pill); padding: 4px; box-shadow: var(--sh-1); }
.seg .btn { border: 0 !important; background: transparent !important; color: var(--text-muted) !important; font-weight: 600; font-size: 13.5px; padding: 7px 16px; border-radius: var(--r-pill); box-shadow: none !important; }
.seg .btn.active, .seg .btn.on { background: var(--ink) !important; color: #fff !important; }
.seg .btn.on-otim { background: var(--brand) !important; color: var(--on-brand) !important; }
.seg .btn.on-pess { background: var(--neg) !important; color: #fff !important; }

/* ============================ RESULT PILL ============================ */
.result-pill { background: var(--brand-soft); border: 1px solid #DCEFA0; border-radius: var(--r); padding: 12px 16px; box-shadow: inset 3px 0 0 var(--brand); }
.result-pill .k { font-family: var(--font-mono); font-size: 11px; color: #5C6B14; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.result-pill .v { font-family: var(--font-mono); font-weight: 700; font-size: 21px; letter-spacing: -.02em; color: var(--ink); }

/* ============================ FORMS / INPUTS ============================ */
.form-control, .form-select, input[type=text], input[type=number] { background: #fff; border: 1px solid var(--border); color: var(--text); }
input[type=number], .form-control[inputmode=numeric] { font-family: var(--font-mono); }
.form-control:focus, .form-select:focus { border-color: var(--brand-700); box-shadow: 0 0 0 3px rgba(229,255,81,.25); }

/* alertas */
.alert-info { background: #EAF6FB; border-color: #CDE9F3; color: #0c5460; }
.alert-success { background: var(--pos-bg); border-color: #BFE6CC; color: #11633a; }
.alert-danger { background: var(--neg-bg); border-color: #F3C9C9; color: #8f1d1d; }

/* ============================ RESPONSIVO ============================ */
@media (max-width: 992px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .app-shell { flex-direction: column; }
  .sidebar { flex: none; width: 100%; height: auto; position: sticky; top: 0; z-index: 50; }
  .sidebar .nav, .sidebar .nav-label { display: none; }
  .sidebar.nav-open .nav { display: flex; }
  .sidebar.nav-open .nav-label { display: block; }
  .sidebar .side-foot { display: none; }
  .sidebar .hamburger { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar .collapse-btn { display: none; }
  .content { padding: 20px 16px 40px; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .dre-table td { padding: 10px 13px; font-size: 13.5px; }
  .dre-table .lbl.indent { padding-left: 22px; }
}

/* entrada suave com stagger */
.reveal { opacity: 0; transform: translateY(10px); animation: rise .5s cubic-bezier(.2,.7,.3,1) forwards; }
.kpis .kpi:nth-child(1), .reveal:nth-child(1) { animation-delay: .02s; }
.kpis .kpi:nth-child(2), .reveal:nth-child(2) { animation-delay: .08s; }
.kpis .kpi:nth-child(3), .reveal:nth-child(3) { animation-delay: .14s; }
.kpis .kpi:nth-child(4), .reveal:nth-child(4) { animation-delay: .20s; }
.kpis .kpi { opacity: 0; transform: translateY(10px); animation: rise .5s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal, .kpis .kpi { animation: none; opacity: 1; transform: none; }
  .sidebar .side-status .pulse { animation: none; }
}

/* ============================ SHELL VIAJANTE / AUTH (sem sidebar) ============================ */
/* usado por base.html — telas mobile-first do viajante, login e conta.       */
.app-mobile { min-height: 100vh; display: flex; flex-direction: column; }
.app-mobile-inner {
  width: 100%; max-width: 720px; margin: 0 auto;
  padding: 22px 16px 48px; flex: 1 1 auto;
}
@media (min-width: 768px) { .app-mobile-inner { padding: 32px 24px 56px; } }
/* barra de marca opcional no topo das telas do viajante */
.topbrand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.topbrand .mark { height: 34px; width: auto; }
.topbrand .word { font-family: var(--font-display); font-weight: 800; font-size: 17px; line-height: 1; color: var(--ink); }
.topbrand .word .accent { color: var(--brand-700); }
