/* Ajustes do app real sobre o visual do protótipo */
[hidden] { display: none !important; }
body { margin: 0; padding: 0; min-height: 100dvh; }
.shell { border: 0; border-radius: 0; box-shadow: none; min-height: 100dvh; height: auto; overflow: visible; }
@media (min-width: 701px) { .shell { height: 100dvh; overflow: hidden; } }
.layout { min-height: 100dvh; }
@container (min-width: 900px) { .layout { height: 100dvh; } }
.demo-note { margin: 0; padding: 8px 16px; font-size: 13px; background: var(--gold-soft); color: var(--gold-ink); text-align: center; }
a { color: var(--gold-ink); font-weight: 700; }
.err { font-size: 13px; font-weight: 700; color: var(--bad); }

/* Entrada */
.auth { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--bg); }
.auth-in { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.auth-box { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.auth-step { display: flex; flex-direction: column; gap: 14px; }
.auth-step .ob-h { font-size: 28px; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.auth-foot { font-size: 12px; color: var(--muted); line-height: 1.5; text-align: center; }
.check span { font-size: 13px; line-height: 1.45; }

/* Topo e navegação */
.mes-nav { display: inline-flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.mes-nav button { border: 0; background: none; min-width: 34px; min-height: 34px; border-radius: 9px; font-weight: 800; color: var(--muted); }
.mes-nav button:hover { background: var(--surface-2); color: var(--ink); }
.mes-nav span { font-size: 13px; font-weight: 800; padding: 0 6px; min-width: 92px; text-align: center; text-transform: capitalize; }
.mtop { position: sticky; top: 0; z-index: 6; background: var(--bg); padding-bottom: 10px; }
.side .sec { padding-top: 14px; }
.side .lock-tag { margin-left: auto; font-size: 10px; font-weight: 800; color: var(--on-night-muted); border: 1px solid var(--night-2); border-radius: 999px; padding: 1px 7px; }
.side .foot b { color: var(--on-night); font-weight: 700; }
.side .foot button { padding: 6px 0; font-size: 13px; }
.tabs { position: sticky; }
.mais { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mais button { display: flex; align-items: center; gap: 10px; min-height: 52px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 0 12px; font-size: 14px; font-weight: 700; text-align: left; }
.mais button svg { width: 20px; height: 20px; color: var(--gold-ink); flex: 0 0 auto; }
.mais button .lock-tag { margin-left: auto; font-size: 10px; font-weight: 800; color: var(--gold-ink); background: var(--gold-soft); border-radius: 999px; padding: 2px 7px; }
.mais h3 { grid-column: 1 / -1; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }

.banner { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; background: var(--gold-soft); border: 1px solid var(--gold); border-radius: 16px; padding: 12px 16px; margin-bottom: 14px; font-size: 14px; }
.banner.bad { background: var(--warn-soft); border-color: var(--warn); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 40; background: rgba(9, 14, 23, .55); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
@media (min-width: 701px) { .modal { align-items: center; padding: 24px; } }
.modal-box { width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: var(--surface); border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 701px) { .modal-box { border-radius: 22px; } }
.modal-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-h h2 { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.x { border: 0; background: var(--surface-2); width: 36px; height: 36px; border-radius: 999px; font-size: 14px; font-weight: 800; color: var(--muted); }
.form { display: flex; flex-direction: column; gap: 12px; }
label.f textarea { min-height: 80px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 10px 14px; font: inherit; font-size: 15px; }
label.f input:focus, label.f select:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px var(--gold-soft); }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.btn.bad { background: var(--bad); color: #FFFFFF; }
.btn.full { width: 100%; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btns .btn { flex: 1 1 140px; }

/* Lançar */
.valor-big { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 6px 16px; }
.valor-big i { font-style: normal; font-weight: 800; color: var(--muted); font-size: 18px; }
.valor-big input { border: 0; outline: none; background: transparent; width: 100%; min-height: 56px; font-family: var(--font-display); font-size: 34px; font-weight: 600; color: var(--ink); }
.valor-big:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 700; min-height: 36px; }
.chips button[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-ink); }
.atalhos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.atalho { display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 14px; font-size: 14px; }
.atalho b { display: block; font-size: 14px; }
.atalho span.s { font-size: 12px; color: var(--muted); }
.atalho .ic3 { width: 38px; height: 38px; border-radius: 12px; background: var(--night); color: var(--gold-on-night); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.atalho .ic3 svg { width: 20px; height: 20px; }
.ocr-box { display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); border-radius: 14px; padding: 12px 14px; font-size: 13px; }
.ocr-box img { max-height: 160px; max-width: 100%; border-radius: 10px; object-fit: contain; align-self: flex-start; }
.prog { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.prog span { display: block; height: 100%; background: var(--gold); border-radius: 999px; transition: width .2s; }

/* Extrato */
.dia { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 14px 0 4px; }
.lanc { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 10px 0; font-size: 14px; }
.lanc .av2 { width: 36px; height: 36px; border-radius: 11px; background: var(--surface-2); color: var(--gold-ink); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.lanc .d b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lanc .d span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lanc .v { font-weight: 800; white-space: nowrap; }
.lanc .v.rec { color: var(--good); }
.lanc.semcat .d span { color: var(--warn); font-weight: 700; }
.filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filtros input, .filtros select, .sel { min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 0 10px; font-size: 14px; font-weight: 600; }
.filtros input { flex: 1 1 180px; min-width: 0; }
.vazio { text-align: center; padding: 28px 12px; display: flex; flex-direction: column; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; }
.vazio b { color: var(--ink); font-size: 16px; }

/* Orçamento */
.orc-g { display: flex; flex-direction: column; gap: 4px; }
.orc-g h4 { margin: 10px 0 2px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); }
.orc-r { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.orc-r .cap { display: block; }
.orc-r .bar { margin-top: 6px; }
@container (min-width: 900px) { .orc-r { grid-template-columns: minmax(0, 1fr) 120px 110px; } .orc-r .real { text-align: right; font-weight: 700; } }
.orc-r .real { display: none; }
@container (min-width: 900px) { .orc-r .real { display: block; } }

/* Importar */
table.imp { width: 100%; border-collapse: collapse; font-size: 13px; }
table.imp th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line); }
table.imp td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.imp td.n { text-align: right; white-space: nowrap; font-weight: 700; }
table.imp tr.dup td { opacity: .5; }
table.imp select { max-width: 190px; min-height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 700; }
table.imp select.falta { border-color: var(--warn); }
table.imp input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--gold); }

/* Ajustes */
.lista-ed { display: flex; flex-direction: column; }
.lista-ed .r { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lista-ed .r .cap { display: block; }
.btn.xs { min-height: 34px; padding: 0 12px; font-size: 12px; border-radius: 10px; }
.tag-c.off { text-decoration: line-through; }

/* Planos */
.plan .btn { margin-top: auto; }
.plan .price small { font-family: var(--font-ui); font-size: 14px; font-weight: 700; }
.atual { font-size: 12px; font-weight: 800; color: var(--good); }

/* Gráficos */
.chart .cx { fill: var(--muted); font-size: 11px; }
.tt { font-weight: 800; fill: var(--ink); }

/* Impressão / PDF */
@media print {
  body { background: #FFFFFF; }
  .side, .tabs, .mtop, .dtop .actions, .banner, .no-print, .toast, .demo-note, .mes-nav { display: none !important; }
  .shell, .layout, .main, .page { height: auto !important; overflow: visible !important; display: block !important; }
  .page { border: 0 !important; padding: 0 !important; }
  .card, .kpi, .hero { break-inside: avoid; }
  .hero { color: #000; background: #FFFFFF; border: 1px solid #CCCCCC; }
}
.plan.main[data-plano="plus"], .plan.main[data-plano="plus"] .serif, .plan.main[data-plano="plus"] .price { color: var(--on-night); }
.plan.main .eyebrow { color: var(--gold-on-night); }
label.f .valor-big input { border: 0; min-height: 56px; padding: 0; font-family: var(--font-display); font-size: 34px; font-weight: 600; background: transparent; box-shadow: none; }
.btn { align-items: center; justify-content: center; }
@container (max-width: 899px) { .lancar-lado { display: contents !important; } .lancar-lado .atalhos { order: -1; grid-template-columns: 1fr 1fr !important; } .lancar-lado .atalho .s { display: none; } }
.side .foot .perfil-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; color: var(--on-night-muted); font-size: 12px; }
.side .foot .perfil-btn:hover { background: var(--night-2); color: var(--on-night); }
