:root {
  --bs-primary: #2952e3;
  --bs-primary-rgb: 41, 82, 227;
  --bs-link-color: #2952e3;
  --bs-link-color-rgb: 41, 82, 227;
  --app-bg: #f5f7fb;
  --ink: #1b2333;
  --muted: #5f6b7d;
  --line: #e3e8f0;
}
body { background: var(--app-bg); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
.btn-primary { --bs-btn-bg: #2952e3; --bs-btn-border-color: #2952e3; --bs-btn-hover-bg: #1f43c4; --bs-btn-hover-border-color: #1f43c4; --bs-btn-active-bg: #1a39a8; --bs-btn-disabled-bg: #2952e3; --bs-btn-disabled-border-color: #2952e3; }
.btn-outline-primary { --bs-btn-color: #2952e3; --bs-btn-border-color: #2952e3; --bs-btn-hover-bg: #2952e3; --bs-btn-hover-border-color: #2952e3; --bs-btn-active-bg: #2952e3; --bs-btn-active-border-color: #2952e3; }
.text-primary { color: #2952e3 !important; }
.dropdown-item.active, .dropdown-item:active { background: #2952e3; }

.app-nav { background: #fff; border-bottom: 1px solid var(--line); }
.app-nav .nav-link { white-space: nowrap; }
.app-nav .nav-link.active { color: #2952e3; font-weight: 600; }
.app-footer { padding: 1.5rem 0; border-top: 1px solid var(--line); background: #fff; margin-top: 3rem; }
.card { border-color: var(--line); }
.card-header { border-bottom-color: var(--line); }
.min-w-0 { min-width: 0; }

/* Marca */
.brand-name { color: #1b2333; }
.brand-name .reg { font-size: .5em; top: -.9em; margin-left: 1px; }
.brand-sub { color: #2952e3; font-weight: 500; }

/* Auth */
.auth-card { max-width: 440px; margin: 2rem auto; border-radius: 16px; }
.marketing-box { background: var(--app-bg); border-radius: 10px; padding: .75rem 1rem; }

.empty-state { text-align: center; padding: 3rem 1rem; background: #fff; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); }
.empty-state i { font-size: 2.5rem; display: block; margin-bottom: .5rem; }

.logo-preview { width: 84px; height: 84px; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #fff; overflow: hidden; flex-shrink: 0; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-preview i { font-size: 2rem; color: #b8c1cf; }

/* Faixa de assinatura */
.sub-strip { background: #2952e3; color: #fff; padding: .45rem 0; }
.sub-strip.is-late { background: #b02a37; }
.sub-strip .btn-light { color: #2952e3; padding: .15rem .7rem; }
.sub-strip.is-late .btn-light { color: #b02a37; }

/* Painel */
.stat .stat-icon { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.stat-icon.blue { background: #eef2ff; color: #2952e3; }
.stat-icon.green { background: #e9fbf3; color: #198754; }
.stat-icon.amber { background: #fff6e0; color: #b7791f; }
.stat-icon.red { background: #fdecee; color: #dc3545; }
.stat a.stretched-link { color: inherit; }
.quick-actions .btn { padding: .65rem 1rem; font-weight: 600; }
.bars { display: flex; align-items: flex-end; gap: .6rem; height: 170px; padding-top: .5rem; }
.bars .bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .bar-pair { display: flex; gap: 3px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.bars .bar { width: 42%; max-width: 22px; border-radius: 5px 5px 0 0; min-height: 2px; }
.bars .bar.in { background: #198754; }
.bars .bar.out { background: #2952e3; }
.bars .bar-label { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .25rem; }

/* Tabelas */
.table thead th { font-size: .78rem; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; }
.table td { border-bottom-color: #f0f2f6; }
.qty-pos { color: #198754; font-weight: 600; }
.qty-neg { color: #dc3545; font-weight: 600; }
.mv-badge { font-weight: 600; }
tr.is-reversed td { color: #98a2b3; text-decoration: line-through; }
tr.is-inactive td { opacity: .55; }
.sku { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82em; color: var(--muted); }

/* Lançamento de movimentação */
.mv-type { display: flex; gap: .5rem; }
.mv-type .btn { flex: 1; font-weight: 600; padding: .7rem; }
.items-table td { vertical-align: top; }
.items-table .col-qty { width: 120px; }
.items-table .col-price { width: 140px; }
.items-table .col-total { width: 130px; white-space: nowrap; }
.items-table .col-del { width: 40px; }
.items-table .prod-info { font-size: .78rem; color: var(--muted); margin-top: .2rem; min-height: 1.1em; }
.items-table .prod-info.warn { color: #dc3545; }
.scan-box { background: #eef2ff; border: 1px solid #dfe6ff; border-radius: 12px; padding: .75rem; }

/* Inventário */
.count-input { max-width: 120px; }
tr.has-diff { background: #fff9e6; }
.diff-pos { color: #198754; font-weight: 600; }
.diff-neg { color: #dc3545; font-weight: 600; }

/* Relatórios */
.report-head { display: none; }
.rep-tabs .nav-link { color: var(--muted); }
.rep-tabs .nav-link.active { color: #2952e3; font-weight: 600; }

/* Admin */
.admin-tabs .nav-link { color: var(--muted); }
.admin-tabs .nav-link.active { color: #2952e3; font-weight: 600; }
.pay-box { background: #f3f6ff; border: 1px solid #dfe6ff; border-radius: 12px; padding: 1rem; }

/* Assinatura */
.plan-card { border-radius: 18px; border: 2px solid #2952e3; }
.plan-price { font-size: 2.6rem; font-weight: 800; color: #1b2333; letter-spacing: -.02em; }
.plan-price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.pix-key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--app-bg); border: 1px dashed #b8c1cf; border-radius: 10px; padding: .6rem .8rem; word-break: break-all; }

/* Páginas legais */
.legal { max-width: 860px; margin: 0 auto; }
.legal h2 { font-size: 1.1rem; margin-top: 1.75rem; }
.legal table { font-size: .9rem; }

/* Landing */
.landing .hero h1 { letter-spacing: -.02em; }
.hero { background: linear-gradient(135deg, #eef2ff 0%, #f7f9ff 55%, #e9fbf3 100%); border-bottom: 1px solid var(--line); }
.hero-stage { position: relative; padding: 1.5rem 1rem 2.5rem; }
.hero-card { background: #fff; border-radius: 16px; padding: 1.5rem; transform: rotate(-1.2deg); position: relative; z-index: 1; }
.hero-card .mini-stat { background: var(--app-bg); border-radius: 10px; padding: .6rem .75rem; }
.hero-card .mini-stat .v { font-weight: 800; font-size: 1.15rem; }
.float-chip { position: absolute; z-index: 2; background: #fff; border-radius: 12px; padding: .6rem .85rem; display: flex; gap: .6rem; align-items: center; font-size: .85rem; border: 1px solid var(--line); }
.float-chip > i { font-size: 1.3rem; color: #2952e3; }
.chip-alert { left: -.5rem; bottom: 0; max-width: 320px; }
.chip-alert > i { color: #dc3545; }
.chip-in { right: -.25rem; top: 0; }
.chip-in > i { color: #198754; }
.trust-strip { background: #1b2333; color: #fff; padding: 1.1rem 0; }
.trust-strip i { color: #8fb0ff; margin-right: .35rem; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 2rem 1.5rem 1.5rem; }
.step-num { position: absolute; top: -14px; left: 1.5rem; width: 30px; height: 30px; border-radius: 50%; background: #2952e3; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step-icon { font-size: 2rem; color: #2952e3; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; }
.feature i { font-size: 1.8rem; color: #2952e3; }
.who { display: flex; gap: .9rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem; }
.who > i { font-size: 1.6rem; color: #2952e3; }
.price-card { background: #fff; border: 2px solid #2952e3; border-radius: 20px; padding: 2rem; box-shadow: 0 16px 40px rgba(41, 82, 227, .12); }
.price-card .plan-price { font-size: 3.2rem; }
.price-card li { padding: .3rem 0; }
.privacy-band { display: flex; gap: 1.25rem; align-items: center; background: #e9fbf3; border: 1px solid #c4ecd9; border-radius: 16px; padding: 1.5rem 1.75rem; }
.privacy-band > i { font-size: 2.5rem; color: #198754; }
.faq { max-width: 820px; }
.faq .accordion-button { font-weight: 600; }
.faq .accordion-button:not(.collapsed) { background: #eef2ff; color: #1b2333; }
.final-cta { background: linear-gradient(135deg, #2952e3, #1a39a8); color: #fff; }
.final-cta .btn-light { color: #2952e3; }
.landing .app-footer { margin-top: 0; }

@media (max-width: 575.98px) {
  .hero-card { transform: none; padding: 1.1rem; }
  .chip-alert { position: relative; left: 0; bottom: 0; margin-top: 1rem; max-width: none; }
  .chip-in { display: none; }
  .hero-stage { padding: 0; }
  .privacy-band { flex-direction: column; text-align: center; }
  .landing { overflow-x: hidden; }
  .mv-type { flex-direction: column; }
}

@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #fff; font-size: 11px; }
  .no-print, .app-nav, .app-footer, .sub-strip { display: none !important; }
  main.container { max-width: none; padding: 0 !important; }
  .card { box-shadow: none !important; border: 0; }
  .report-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid #2952e3; padding-bottom: 8px; margin-bottom: 12px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report-head img { max-height: 50px; max-width: 180px; }
  .table { font-size: 10.5px; }
  .table-responsive { overflow: visible; }
  a { text-decoration: none; color: inherit; }
}

/* PIX Inter */
.pix-qr { width: 220px; height: 220px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.pix-qr svg { width: 100%; height: 100%; }
.pix-pay .pix-key { font-size: .75rem; }
