/* ============================================================
   CAMP 2027 · painel de gestão
   Cartões grandes, números em destaque, tema claro e escuro.
   ============================================================ */
:root {
  --bg: #eceae4; --surface: #ffffff; --surface-2: #f4f2ec; --surface-3: #eae7df;
  --ink: #141915; --muted: #6b726a; --line: #e4e1d8;
  --brand: #1e3323; --brand-ink: #f6f1e6;
  --gold: #e1ad45; --gold-soft: #f8ebc9; --gold-ink: #6a4a08;
  --ok: #2c8a4b; --ok-soft: #dcf2e2;
  --warn: #b57a14; --warn-soft: #fbedcc;
  --bad: #a03a37; --bad-soft: #f8dfdc;
  --info: #3a6aa6; --info-soft: #deeaf8;
  --neutro: #7b8279; --neutro-soft: #e9e7e0;
  --destaque-bg: #e1ad45; --destaque-ink: #1c1608; --destaque-mini: rgba(255,255,255,.42);
  --sombra: 0 1px 2px rgba(20,25,21,.04), 0 12px 32px rgba(20,25,21,.06);
  --r-xl: 28px; --r-lg: 20px; --r-md: 14px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}
:root[data-tema="escuro"] {
  --bg: #0d100e; --surface: #171b18; --surface-2: #1f2420; --surface-3: #272d28;
  --ink: #f2efe7; --muted: #98a096; --line: #293029;
  --brand: #e1ad45; --brand-ink: #17130a;
  --gold: #e1ad45; --gold-soft: #3a2f14; --gold-ink: #f0cd7d;
  --ok: #6fd08c; --ok-soft: #173322;
  --warn: #e9b85a; --warn-soft: #3a2e12;
  --bad: #f08b86; --bad-soft: #3d1c1a;
  --info: #8db6ea; --info-soft: #18283c;
  --neutro: #8c948a; --neutro-soft: #262b27;
  --destaque-bg: linear-gradient(135deg, #24402b 0%, #1b2f20 55%, #3b3413 130%); --destaque-ink: #f6f1e6; --destaque-mini: rgba(255,255,255,.07);
  --sombra: 0 1px 0 rgba(255,255,255,.03) inset, 0 16px 40px rgba(0,0,0,.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: "Urbanist", system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.4; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; }
svg.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Estrutura ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.lado { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 22px 16px 18px; }
.lado__marca { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; }
.lado__marca img { height: 44px; width: auto; filter: drop-shadow(0 4px 10px rgba(0,0,0,.18)); }
.lado__marca b { display: block; font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; }
.lado__marca span { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border-radius: var(--r-md); font-weight: 700; font-size: .96rem; color: var(--muted); transition: background .2s, color .2s; }
.nav-item:hover { color: var(--ink); background: var(--surface-3); }
.nav-item.is-ativo { background: var(--surface); color: var(--ink); box-shadow: var(--sombra); }
.nav-item .conta { margin-left: auto; font-size: .74rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.nav-item.is-ativo .conta { background: var(--brand); color: var(--brand-ink); }
.lado__fim { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-3); border-radius: 999px; padding: 4px; }
.seg button { padding: 7px 10px; border-radius: 999px; font-weight: 700; font-size: .84rem; color: var(--muted); transition: background .2s, color .2s; white-space: nowrap; }
.seg button.is-ativo { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.usuario { display: flex; align-items: center; gap: 10px; padding: 10px; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--sombra); }
.usuario__inicial { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 800; flex: none; }
.usuario b { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usuario > div span { display: block; font-size: .74rem; color: var(--muted); font-weight: 600; }
.usuario > div { min-width: 0; flex: 1; }
.icone-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--sombra); transition: transform .2s var(--ease), background .2s; flex: none; }
.icone-btn:hover { transform: translateY(-1px); background: var(--surface-2); }
.icone-btn--plano { box-shadow: none; background: var(--surface-3); }

.conteudo { padding: 22px 26px 60px 8px; min-width: 0; }
.topo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.topo__texto { margin-right: auto; min-width: 0; }
.topo h1 { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.topo p { color: var(--muted); font-weight: 600; font-size: .92rem; }
.topo__acoes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.faixa-teste { display: flex; align-items: center; gap: 10px; padding: 10px 16px; margin-bottom: 16px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: .88rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 999px; font-weight: 800; font-size: .92rem; white-space: nowrap; transition: transform .2s var(--ease), box-shadow .2s, background .2s, opacity .2s; }
a.btn { text-decoration: none; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn--primario { background: var(--brand); color: var(--brand-ink); }
.btn--primario:hover { box-shadow: 0 10px 24px rgba(30,51,35,.25); }
.btn--claro { background: var(--surface); color: var(--ink); box-shadow: var(--sombra); }
.btn--suave { background: var(--surface-3); color: var(--ink); }
.btn--perigo { background: var(--bad-soft); color: var(--bad); }
.btn--mini { padding: 7px 12px; font-size: .82rem; }
.btn--bloco { width: 100%; }

/* ---------- Cartões ---------- */
.grade { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.cartao { background: var(--surface); border-radius: var(--r-xl); padding: 22px; box-shadow: var(--sombra); min-width: 0; animation: surgir .5s var(--ease) both; }
.c-3 { grid-column: span 3; } .c-4 { grid-column: span 4; } .c-5 { grid-column: span 5; } .c-6 { grid-column: span 6; }
.c-7 { grid-column: span 7; } .c-8 { grid-column: span 8; } .c-12 { grid-column: span 12; }
.cartao__topo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cartao__icone { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); color: var(--ink); flex: none; }
.cartao__titulo { font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em; }
.cartao__sub { color: var(--muted); font-size: .82rem; font-weight: 600; }
.cartao__topo .fim { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.numero { font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.numero small { font-size: .5em; font-weight: 600; opacity: .7; letter-spacing: 0; }
.numero--m { font-size: 1.9rem; }
.selo { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 800; background: var(--ok-soft); color: var(--ok); white-space: nowrap; }
.selo--neutro { background: var(--surface-3); color: var(--muted); }

.cartao--destaque { background: var(--destaque-bg); color: var(--destaque-ink); position: relative; overflow: hidden; }
.cartao--destaque::after { content: ""; position: absolute; right: -60px; top: -70px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.14); pointer-events: none; }
.cartao--destaque .cartao__icone { background: rgba(0,0,0,.12); color: inherit; }
.cartao--destaque .cartao__sub { color: inherit; opacity: .72; }
.cartao--destaque .selo { background: rgba(255,255,255,.55); color: #1c1608; }
:root[data-tema="escuro"] .cartao--destaque .selo { background: rgba(225,173,69,.18); color: var(--gold); }
:root[data-tema="escuro"] .cartao--destaque::after { background: rgba(225,173,69,.07); }
.minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; position: relative; z-index: 1; }
.mini { background: var(--destaque-mini); border-radius: var(--r-lg); padding: 12px 14px; }
.mini span { display: block; font-size: .76rem; font-weight: 700; opacity: .75; }
.mini b { display: block; font-size: 1.18rem; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.mini i { display: block; font-style: normal; font-size: .72rem; font-weight: 700; opacity: .65; }

.pilha { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-3); gap: 3px; margin: 14px 0 12px; }
.pilha i { display: block; border-radius: 999px; min-width: 6px; transition: flex-grow .8s var(--ease); }
.legenda { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .84rem; font-weight: 600; color: var(--muted); }
.legenda span { display: inline-flex; align-items: center; gap: 7px; }
.legenda b { color: var(--ink); font-weight: 800; }
.ponto { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cor-pago { background: var(--ok); } .cor-parcial { background: var(--gold); } .cor-pendente { background: var(--info); }
.cor-expirado { background: var(--neutro); } .cor-cancelado { background: var(--bad); }

.barras { display: flex; flex-direction: column; gap: 14px; }
.barra__linha { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.barra__linha span:last-child { color: var(--muted); font-weight: 700; }
.barra__trilho { height: 9px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.barra__trilho i { display: block; height: 100%; border-radius: 999px; background: var(--brand); width: 0; transition: width .9s var(--ease); }
.barra__nota { font-size: .78rem; color: var(--muted); font-weight: 600; margin-top: 5px; }

.lista { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; padding-top: 0; }
.item__icone { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); flex: none; font-weight: 800; font-size: .8rem; }
.item__texto { min-width: 0; flex: 1; }
.item__texto b { display: block; font-size: .93rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__texto span { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item__valor { font-weight: 800; font-size: .95rem; white-space: nowrap; text-align: right; }
.item__valor.entrou { color: var(--ok); }
.vazio { padding: 26px 10px; text-align: center; color: var(--muted); font-weight: 600; font-size: .92rem; }

/* gráficos */
.grafico { position: relative; }
.grafico svg { display: block; width: 100%; height: auto; overflow: visible; }
.grafico .eixo { fill: var(--muted); font-size: 11px; font-weight: 600; font-family: inherit; }
.grafico .guia { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; }
.grafico .linha { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dica { position: absolute; pointer-events: none; transform: translate(-50%, -120%); background: var(--ink); color: var(--bg); padding: 7px 11px; border-radius: 12px; font-size: .78rem; font-weight: 700; white-space: nowrap; opacity: 0; transition: opacity .15s; z-index: 2; }
.dica b { display: block; font-size: .92rem; }
.rosca { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 14px; align-items: center; }
.rosca__centro { font-family: inherit; font-weight: 700; fill: var(--ink); }
.cartao:has(> .rosca) { display: flex; flex-direction: column; }
.cartao > .rosca { flex: 1; }
.rosca .legenda { flex-direction: column; gap: 10px; }
.rosca .legenda span { justify-content: space-between; gap: 10px; }
.rosca .legenda b { white-space: nowrap; }
.rosca .legenda em { font-style: normal; display: inline-flex; align-items: center; gap: 7px; }

/* funil das cobranças */
.funil { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.funil div { background: var(--surface-2); border-radius: var(--r-lg); padding: 14px; }
.funil span { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); }
.funil b { display: block; font-size: 1.7rem; font-weight: 600; letter-spacing: -.02em; }
.funil i { font-style: normal; font-size: .76rem; font-weight: 700; color: var(--muted); }

/* ---------- Pílulas de situação ---------- */
.pilula { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.pilula::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pilula--pago, .pilula--paga { background: var(--ok-soft); color: var(--ok); }
.pilula--parcial { background: var(--gold-soft); color: var(--gold-ink); }
.pilula--pendente, .pilula--gerada { background: var(--info-soft); color: var(--info); }
.pilula--expirado { background: var(--neutro-soft); color: var(--neutro); }
.pilula--cancelado, .pilula--estornado, .pilula--falhou { background: var(--bad-soft); color: var(--bad); }
.etiqueta { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 8px; font-size: .74rem; font-weight: 800; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.etiqueta--start { background: #e3ecdf; color: #2d4933; } .etiqueta--teens { background: #f8e3d3; color: #9a4a17; }
:root[data-tema="escuro"] .etiqueta--start { background: #1d3323; color: #9fd0a9; }
:root[data-tema="escuro"] .etiqueta--teens { background: #3b2414; color: #f0b488; }
.etiqueta--black { background: #17130f; color: var(--gold); }

/* ---------- Filtros e tabela ---------- */
.filtros { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.busca { display: flex; align-items: center; gap: 9px; flex: 1 1 240px; max-width: 380px; padding: 0 14px; height: 44px; border-radius: 999px; background: var(--surface); box-shadow: var(--sombra); color: var(--muted); }
.busca input { border: 0; outline: 0; background: none; width: 100%; font-weight: 600; color: var(--ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 9px 14px; border-radius: 999px; font-weight: 700; font-size: .86rem; background: var(--surface); color: var(--muted); box-shadow: var(--sombra); transition: background .2s, color .2s; white-space: nowrap; }
.chip b { font-weight: 800; margin-left: 4px; opacity: .7; }
.chip.is-ativo { background: var(--brand); color: var(--brand-ink); }
.selecao { height: 44px; padding: 0 34px 0 14px; border-radius: 999px; border: 0; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23808880' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; box-shadow: var(--sombra); font-weight: 700; font-size: .86rem; appearance: none; -webkit-appearance: none; cursor: pointer; }
.tabela { width: 100%; border-collapse: separate; border-spacing: 0; }
.tabela th { text-align: left; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0 12px 10px; white-space: nowrap; }
.tabela td { padding: 13px 12px; border-top: 1px solid var(--line); vertical-align: middle; font-weight: 600; font-size: .92rem; }
.tabela tbody tr { cursor: pointer; transition: background .15s; }
.tabela tbody tr:hover td { background: var(--surface-2); }
.tabela tbody tr:hover td:first-child { border-radius: 14px 0 0 14px; } .tabela tbody tr:hover td:last-child { border-radius: 0 14px 14px 0; }
.tabela .num { text-align: right; white-space: nowrap; }
.pessoa { display: flex; align-items: center; gap: 11px; min-width: 0; }
.pessoa__inicial { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); font-weight: 800; font-size: .82rem; flex: none; }
.pessoa b { display: block; font-weight: 700; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pessoa > div { min-width: 0; }
.pessoa > div span { display: block; font-size: .78rem; color: var(--muted); }
.progresso { min-width: 130px; }
.progresso__texto { font-size: .82rem; font-weight: 700; margin-bottom: 5px; white-space: nowrap; }
.progresso__texto span { color: var(--muted); font-weight: 600; }
.progresso__nota { margin-top: 5px; font-size: .74rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.parcelado { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); font-size: .86rem; font-weight: 600; color: var(--muted); }
.parcelado b { color: var(--ink); font-weight: 700; }
.progresso__trilho { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progresso__trilho i { display: block; height: 100%; border-radius: 999px; background: var(--ok); }
.sim { color: var(--ok); } .nao { color: var(--line); }
.rodape-tabela { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 14px; color: var(--muted); font-weight: 600; font-size: .86rem; }

/* Black Friday */
.lote-bf__topo { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.lote-bf__topo b { font-size: 1.15rem; font-weight: 700; }
.lote-bf__topo span { font-size: .8rem; color: var(--muted); font-weight: 700; }
.lote-bf__codigo { display: inline-block; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 700; font-size: .84rem; padding: 4px 10px; border-radius: 8px; background: var(--gold-soft); color: var(--gold-ink); margin-bottom: 14px; }
.lote-bf__primeiro { padding: 12px; border-radius: var(--r-md); background: var(--surface-2); margin-bottom: 12px; min-height: 66px; }
.lote-bf__primeiro span { display: block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 4px; }
.lote-bf__primeiro b { font-weight: 700; font-size: .95rem; }
.lote-bf__nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.lote-bf__nums b { display: block; font-size: 1.3rem; font-weight: 600; } .lote-bf__nums span { font-size: .72rem; font-weight: 700; color: var(--muted); }

/* ---------- Gaveta e modal ---------- */
.veu { position: fixed; inset: 0; background: rgba(10,14,11,.5); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 40; }
.veu.is-aberto { opacity: 1; pointer-events: auto; }
.gaveta { position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(520px, calc(100vw - 20px)); background: var(--bg); border-radius: var(--r-xl); z-index: 50; transform: translateX(calc(100% + 20px)); transition: transform .45s var(--ease); display: flex; flex-direction: column; overflow: hidden; box-shadow: -20px 0 60px rgba(0,0,0,.25); }
.gaveta.is-aberto { transform: none; }
.gaveta__topo { display: flex; align-items: center; gap: 12px; padding: 18px 18px 12px; }
.gaveta__topo h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gaveta__topo .icone-btn { margin-left: auto; }
.gaveta__corpo { overflow-y: auto; padding: 4px 18px 22px; display: flex; flex-direction: column; gap: 12px; }
.bloco { background: var(--surface); border-radius: var(--r-lg); padding: 16px; }
.bloco h3 { font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.campos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.campos div span { display: block; font-size: .74rem; font-weight: 700; color: var(--muted); }
.campos div b { font-weight: 700; font-size: .94rem; word-break: break-word; }
.campos .largo { grid-column: 1 / -1; }
.resumo-fin { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.resumo-fin div { background: var(--surface-2); border-radius: var(--r-md); padding: 10px 12px; }
.resumo-fin span { display: block; font-size: .72rem; font-weight: 700; color: var(--muted); }
.resumo-fin b { font-size: 1.08rem; font-weight: 700; letter-spacing: -.01em; }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.lixo { color: var(--muted); padding: 6px; border-radius: 8px; } .lixo:hover { color: var(--bad); background: var(--bad-soft); }

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.modal.is-aberto { opacity: 1; pointer-events: auto; background: rgba(10,14,11,.35); }
.modal__caixa { position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border-radius: var(--r-xl); padding: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.35); transform: translateY(14px) scale(.98); transition: transform .35s var(--ease); }
.modal.is-aberto .modal__caixa { transform: none; }
.modal__caixa h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: 4px; padding-right: 44px; }
.modal__caixa > p { color: var(--muted); font-weight: 600; font-size: .9rem; margin-bottom: 18px; }
.modal__fechar { position: absolute; top: 18px; right: 18px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .largo { grid-column: 1 / -1; }
.rotulo { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--muted); min-width: 0; }
.entrada { width: 100%; height: 46px; padding: 0 14px; border-radius: var(--r-md); border: 1.5px solid transparent; background: var(--surface-2); font-weight: 700; color: var(--ink); outline: 0; transition: border-color .2s, background .2s; min-width: 0; }
textarea.entrada { height: auto; padding: 12px 14px; resize: vertical; min-height: 74px; }
.entrada:focus { border-color: var(--gold); background: var(--surface); }
.senha { position: relative; display: block; }
.senha .entrada { padding-right: 50px; }
.senha__olho { position: absolute; top: 50%; right: 5px; width: 38px; height: 38px; margin-top: -19px; display: grid; place-items: center; border-radius: 12px; color: var(--muted); transition: color .2s, background .2s; }
.senha__olho svg.ic { width: 20px; height: 20px; }
.senha__olho:hover, .senha__olho[aria-pressed="true"] { color: var(--ink); }
.senha__olho:hover { background: var(--surface-3); }
.senha__olho:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.opcoes { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.opcoes label { position: relative; }
.opcoes input { position: absolute; opacity: 0; inset: 0; }
.opcoes span { display: flex; align-items: center; justify-content: center; height: 44px; border-radius: var(--r-md); background: var(--surface-2); font-weight: 700; font-size: .86rem; color: var(--muted); cursor: pointer; border: 1.5px solid transparent; transition: all .2s; text-align: center; }
.opcoes input:checked + span { background: var(--brand); color: var(--brand-ink); }
.opcoes input:focus-visible + span { border-color: var(--gold); }
.form__erro { grid-column: 1 / -1; padding: 10px 14px; border-radius: var(--r-md); background: var(--bad-soft); color: var(--bad); font-weight: 700; font-size: .88rem; }
.achados { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; max-height: 190px; overflow-y: auto; }
.achado { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: var(--r-md); background: var(--surface-2); font-weight: 700; font-size: .9rem; text-align: left; width: 100%; }
.achado:hover { background: var(--surface-3); }
.achado span { color: var(--muted); font-size: .78rem; font-weight: 600; }
.escolhido { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--gold-soft); color: var(--gold-ink); font-weight: 700; }
.escolhido span { display: block; font-size: .78rem; font-weight: 600; opacity: .8; }

.aviso { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: .92rem; opacity: 0; pointer-events: none; transition: all .35s var(--ease); z-index: 80; max-width: calc(100vw - 32px); text-align: center; }
.aviso.is-aberto { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Entrada (login) ---------- */
.entrar { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.entrar__caixa { display: grid; grid-template-columns: 1fr 1fr; width: min(880px, 100%); background: var(--surface); border-radius: 32px; overflow: hidden; box-shadow: var(--sombra); animation: surgir .6s var(--ease) both; }
.entrar__arte { background: linear-gradient(140deg, #1e3323 0%, #2d4933 45%, #4c6a48 78%, #c4922e 125%); color: #f6f1e6; padding: 36px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; min-height: 420px; }
.entrar__arte img { width: 170px; filter: drop-shadow(0 12px 30px rgba(0,0,0,.4)); }
.entrar__arte h2 { font-size: 1.9rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.12; }
.entrar__arte p { opacity: .8; font-weight: 600; margin-top: 8px; }
.entrar__form { padding: 36px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.entrar__form h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.entrar__form > p { color: var(--muted); font-weight: 600; margin-bottom: 8px; }

.carregando { display: grid; place-items: center; min-height: 40vh; color: var(--muted); font-weight: 700; }
.tabbar { display: none; }
.rodape-movel { display: none; }

@keyframes surgir { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.grade > .cartao:nth-child(2) { animation-delay: .05s; } .grade > .cartao:nth-child(3) { animation-delay: .1s; }
.grade > .cartao:nth-child(4) { animation-delay: .15s; } .grade > .cartao:nth-child(5) { animation-delay: .2s; }
.grade > .cartao:nth-child(n+6) { animation-delay: .25s; }

/* ---------- Telas menores ---------- */
@media (max-width: 1180px) {
  .c-3 { grid-column: span 6; } .c-4, .c-5, .c-7, .c-8 { grid-column: span 12; }
  .c-4.meio { grid-column: span 6; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .lado { display: none; }
  .conteudo { padding: 16px 14px 100px; }
  .topo h1 { font-size: 1.35rem; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 30; background: var(--surface); border-radius: 22px; padding: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.22); }
  .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px; border-radius: 16px; font-size: .68rem; font-weight: 800; color: var(--muted); }
  .tabbar button.is-ativo { background: var(--brand); color: var(--brand-ink); }
  .tabbar svg.ic { width: 20px; height: 20px; }
  .so-grande { display: none !important; }
  .topo__acoes { width: 100%; flex-wrap: nowrap; }
  .topo__acoes .btn--primario { flex: 1; }
  .filtros .busca { flex: 1 1 100%; max-width: none; }
  .filtros .selecao { flex: 1 1 0; min-width: 0; text-overflow: ellipsis; }
  .filtros .btn { margin-left: 0 !important; flex: 1 1 100%; }
  .rodape-movel { display: flex; justify-content: flex-end; margin-top: 22px; }
  .c-3, .c-4.meio, .c-6 { grid-column: span 12; }
  .cartao { padding: 18px; border-radius: 22px; }
  .rosca { grid-template-columns: 150px 1fr; }
  .tabela thead { display: none; }
  .tabela, .tabela tbody, .tabela tr, .tabela td { display: block; }
  .tabela tr { position: relative; padding: 14px 0; border-top: 1px solid var(--line); }
  .tabela tbody tr:first-child { border-top: 0; }
  .tabela td { border: 0; padding: 3px 0; }
  .tabela td.oculta-pequeno { display: none; }
  .tabela td.canto { position: absolute; top: 14px; right: 0; }
  .tabela .num { text-align: left; }
  .tabela tbody tr:hover td { background: none; }
  .pessoa b { max-width: 58vw; }
  .gaveta { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 92vh; border-radius: 26px 26px 0 0; transform: translateY(105%); }
  .entrar__caixa { grid-template-columns: 1fr; }
  .entrar__arte { min-height: 0; padding: 26px; }
  .entrar__arte img { width: 110px; }
  .entrar__form { padding: 26px; }
  .form { grid-template-columns: 1fr; }
  .aviso { bottom: 96px; }
}
@media (max-width: 460px) {
  .minis { grid-template-columns: 1fr 1fr; } .minis .mini:last-child { grid-column: 1 / -1; }
  .rosca { grid-template-columns: 1fr; justify-items: center; } .rosca svg { max-width: 190px; } .rosca .legenda { width: 100%; }
  .funil b { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
