:root {
  color-scheme: dark;
  --night: #070b12;
  --navy: #0d1420;
  --navy-2: #131c2b;
  --navy-3: #1b2636;
  --gold: #cfa14f;
  --gold-fill: #cfa14f;
  --on-gold: #070b12;
  --wordmark: #d9dadb;
  --logo-x: #d9dadb;
  --gold-light: #e6c47f;
  --gold-deep: #a57c33;
  --silver: #d9dadb;
  --text: #eef0f3;
  --text-soft: #b2bac6;
  --text-muted: #8f99a9;
  --line: rgba(217, 218, 219, .12);
  --line-gold: rgba(207, 161, 79, .38);
  --success: #5fce9b;
  --danger: #ef8a7c;
  --sidebar: 256px;
  --topbar: 68px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--night); overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }

/* Marca */
.brand { width: 236px; display: flex; align-items: center; gap: 11px; flex: none; }
.brand .mark { width: 42px; height: 24px; }
.brand .words small { display: block; font-size: 7.5px; font-weight: 600; letter-spacing: .36em; color: var(--gold); }
.brand .words strong { display: block; margin-top: 1px; font-size: 18px; font-weight: 800; letter-spacing: .01em; line-height: 1; color: var(--wordmark); }
.brand .words em { font-style: normal; color: var(--gold); }

/* Topo */
.topbar { height: var(--topbar); display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.crumbs b { color: var(--text); font-weight: 600; }
input::placeholder { color: var(--text-muted); opacity: 1; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.balance { height: 38px; padding: 0 14px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-gold); border-radius: 8px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.balance svg { color: var(--gold); }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; color: var(--text-soft); font-size: 17px; }
.icon-btn:hover { background: var(--navy-2); color: var(--text); }
.menu-btn { display: none; }

/* Estrutura */
.shell { display: flex; height: calc(100% - var(--topbar)); }
.sidebar { width: var(--sidebar); flex: none; padding: 16px 12px 24px; overflow-y: auto; border-right: 1px solid var(--line); scrollbar-width: thin; scrollbar-color: var(--navy-3) transparent; }
.panel { flex: 1; min-width: 0; overflow-y: auto; background: radial-gradient(900px 500px at 100% 0, rgba(207,161,79,.09), transparent 65%), var(--navy); scrollbar-width: thin; scrollbar-color: var(--navy-3) transparent; }
.content { max-width: 1320px; margin: 0 auto; padding: 28px 28px 96px; }

/* Barra lateral */
.wallet { padding: 16px; border-radius: 12px; border: 1px solid var(--line-gold); background: linear-gradient(150deg, var(--navy-3), var(--navy)); }
.wallet small { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: var(--gold); }
.wallet strong { display: block; margin: 8px 0 12px; font-size: 24px; font-weight: 700; }
.wallet .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wallet .btn { height: 34px; padding: 0 8px; font-size: 12.5px; }
.nav-label { margin: 20px 12px 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: var(--text-muted); }
.nav-item { position: relative; width: 100%; min-height: 40px; margin-top: 2px; padding: 0 12px; display: flex; align-items: center; gap: 12px; border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--text-soft); text-align: left; }
.nav-item svg { font-size: 16px; }
.nav-item:hover { background: var(--navy-2); color: var(--text); }
.nav-item.active { background: var(--navy-3); color: var(--gold-light); font-weight: 600; }
.nav-group { position: relative; }
.nav-toggle { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; color: var(--text-muted); }
.nav-toggle:hover { background: var(--navy-2); color: var(--text); }
.nav-toggle svg { font-size: 16px; transition: transform .15s; }
.nav-toggle.closed svg { transform: rotate(180deg); }
.sub-nav { margin: 2px 0 8px 19px; padding-left: 8px; border-left: 1px solid var(--line); }
.sub-nav[hidden] { display: none; }
.sub-nav .nav-item { min-height: 34px; font-size: 13px; }

/* Componentes */
.card { border: 1px solid var(--line); border-radius: 12px; background: var(--navy-2); }
.btn { height: 40px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.btn-primary { color: var(--on-gold); background: linear-gradient(180deg, #e6c47f, #cfa14f); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { color: var(--text); border: 1px solid var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--line-gold); color: var(--gold-light); }
.field { height: 44px; padding: 0 14px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--navy); color: var(--text-muted); }
.field:focus-within { border-color: var(--gold); }
.field input { width: 100%; border: 0; outline: 0; background: none; font-size: 14px; color: var(--text); }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.page-head { margin-bottom: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
h1 { margin-top: 6px; font-size: 28px; font-weight: 700; letter-spacing: -.015em; }
.page-head p { max-width: 640px; margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--text-soft); }
h2 { font-size: 15.5px; font-weight: 700; }
.section-head { margin: 30px 0 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head small { font-size: 12.5px; color: var(--text-muted); }
.tile { width: 42px; height: 42px; display: grid; place-items: center; flex: none; border: 1px solid var(--line-gold); border-radius: 10px; background: rgba(207,161,79,.1); color: var(--gold-light); font-size: 20px; }
.badge { padding: 3px 8px; border-radius: 5px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.b-gold { background: var(--gold-fill); color: var(--on-gold); }
.b-silver { background: #d9dadb; color: var(--on-gold); }
.b-line { border: 1px solid var(--line-gold); color: var(--gold-light); }

/* Início */
.welcome { padding: 28px; display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: center; border-color: var(--line-gold); background: linear-gradient(120deg, var(--navy-3), var(--navy-2) 70%); }
.search-row { margin-top: 18px; display: flex; gap: 8px; }
.search-row .field { flex: 1; }
.search-row .btn { height: 44px; }
.quick { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.quick a { height: 32px; padding: 0 11px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-soft); }
.quick a:hover { border-color: var(--line-gold); color: var(--gold-light); }
.month { padding: 18px; border-radius: 10px; background: var(--night); }
.month strong { display: block; margin: 8px 0 14px; font-size: 26px; font-weight: 700; }
.month div { display: flex; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-soft); }

/* Consultar */
.go { margin-bottom: 14px; display: flex; gap: 8px; }
.go .field { flex: 1; }
.go .btn { height: 44px; }
.promo { padding: 14px 16px; display: flex; align-items: center; gap: 14px; font-size: 13.5px; line-height: 1.45; color: var(--text-soft); border-color: var(--line-gold); }
.promo b { color: var(--text); }
.promo .btn { margin-left: auto; }
.grid-cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 12px; }
.cat { display: flex; flex-direction: column; padding: 18px; transition: border-color .15s, transform .15s; }
.cat:hover, .item:hover { border-color: var(--line-gold); transform: translateY(-2px); }
.cat-top { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); }
.cat h3 { margin: 14px 0 6px; font-size: 15px; font-weight: 700; }
.cat p { min-height: 38px; margin-bottom: 14px; font-size: 13px; line-height: 1.45; color: var(--text-soft); }
.cat-foot { margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-muted); }
.cat-foot b { color: var(--gold-light); }

/* Categoria */
.back { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--gold-light); }
.cat-title { margin-top: 14px; display: flex; align-items: center; gap: 14px; }
.cat-title h1 { margin: 0; }
.cat-desc { margin-top: 10px; font-size: 14px; color: var(--text-soft); }
.tabs { margin: 18px 0; padding-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); }
.tab { height: 36px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-soft); }
.tab:hover { color: var(--text); }
.tab.active { border-color: var(--gold); background: var(--gold-fill); color: var(--on-gold); }
.tools { display: flex; gap: 10px; }
.tools .field { flex: 1; }
.segment { padding: 3px; display: flex; gap: 2px; flex: none; border: 1px solid var(--line); border-radius: 8px; }
.segment button { height: 36px; padding: 0 12px; border-radius: 6px; font-size: 13px; color: var(--text-soft); }
.segment button.active { background: var(--navy-3); color: var(--gold-light); font-weight: 600; }
.rule { margin: 26px 0 12px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.rule small { font-size: 12px; color: var(--text-muted); }
.grid-item { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.item { display: flex; flex-direction: column; padding: 18px; transition: border-color .15s, transform .15s; }
.item-head { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.item-model { width: 30px; height: 30px; margin-left: auto; display: grid; place-items: center; flex: none; border: 1px solid var(--line); border-radius: 50%; color: var(--text-muted); font-size: 14px; }
.item-model:hover { border-color: var(--gold); color: var(--gold-light); }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile-fill { border: 0; background: linear-gradient(145deg, #e6c47f, #a57c33); color: #070b12; }
.tile-lg { width: 52px; height: 52px; border-radius: 13px; font-size: 22px; }
.cat-head { margin-bottom: 14px; padding: 22px 24px 18px; }
.back-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.pill { margin-top: 10px; padding: 3px 10px; display: inline-block; border: 1px solid var(--line-gold); border-radius: 999px; background: rgba(207,161,79,.1); font-size: 11.5px; font-weight: 700; color: var(--gold-light); }
.cat-head .tabs { margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); border-bottom: 0; }
.list-head { margin: 22px 0 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--text-muted); }
.list-head b { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.list-head i { flex: 1 1 40px; height: 1px; background: var(--line); }
dialog.detail-dlg { width: min(580px, calc(100% - 32px)); padding: 28px; border-radius: 18px; }
.detail { display: flex; flex-direction: column; gap: 14px; }
.detail p { margin: 0; font-size: 14px; }
.detail-head { display: flex; align-items: center; gap: 12px; }
.detail-head > div { flex: 1; min-width: 0; }
.detail-head small { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.detail-head h3 { margin: 2px 0 0; }
.detail-box { padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.detail-box h4 { margin: 0 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.detail-box ul { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 16px; list-style: none; }
.detail-box li { display: flex; gap: 8px; font-size: 13px; line-height: 1.4; }
.detail-box li svg { flex: none; margin-top: 2px; font-size: 15px; color: var(--success); }
.detail-ideal { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-soft); }
.detail-ideal b { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--text-soft); }
.chip-gold { border-color: var(--line-gold); background: rgba(207,161,79,.1); color: var(--gold-light); }
.detail-price { padding-top: 12px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.detail-price small { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.detail-price strong { font-size: 21px; font-weight: 800; color: var(--gold-light); }
dialog.model-dlg { width: min(900px, calc(100% - 32px)); height: calc(100dvh - 48px); max-height: none; padding: 0; overflow: hidden; border-radius: 18px; }
.model { height: 100%; display: flex; flex-direction: column; }
.model-head { padding: 12px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.model-title { flex: 1; min-width: 0; }
.model-title b { display: block; font-size: 14px; overflow-wrap: anywhere; }
.model-title small { font-size: 11.5px; color: var(--text-muted); }
.model-zoom { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.model-body { flex: 1; min-height: 0; padding: 18px; overflow: auto; }
.model-foot { padding: 12px 18px; display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); }
#openPdf { margin-left: auto; }
@media (max-width: 860px) {
  .model-zoom { display: none; }
  .cat-head { padding: 18px 16px 14px; }
  dialog.detail-dlg { padding: 20px; }
  .model-foot .btn { flex: 1 1 auto; }
  #openPdf { margin-left: 0; }
}
.item-top { min-height: 22px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.item h3 { font-size: 15px; font-weight: 700; line-height: 1.35; }
.item p { margin-top: 8px; font-size: 13px; line-height: 1.55; color: var(--text-soft); }
.included { margin-top: 12px; display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-muted); }
.included svg { color: var(--gold); }
.price { margin-top: auto; padding-top: 16px; }
.price-row { padding-top: 14px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; border-top: 1px solid var(--line); }
.price-row strong { font-size: 19px; font-weight: 700; }
.price-row span { font-size: 12px; color: var(--text-muted); }
.price-row span b { color: var(--gold-light); }
.item-actions { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Recarga */
.topup { max-width: 460px; margin: 0 auto; padding: 26px; }
.topup-value { margin: 10px 0 20px; text-align: center; font-size: 42px; font-weight: 700; }
.topup-value small { margin-right: 6px; font-size: 18px; font-weight: 500; color: var(--text-muted); }
.topup-label { text-align: center; font-size: 13px; color: var(--text-soft); }
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.amounts button { height: 46px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-weight: 700; }
.amounts button:hover { border-color: var(--line-gold); }
.amounts button.active { border-color: var(--gold); background: rgba(207,161,79,.14); color: var(--gold-light); }
.topup .field { margin-top: 10px; }
.topup-sum { margin: 18px 0 12px; display: flex; justify-content: space-between; font-size: 13px; color: var(--text-soft); }
.topup-sum b { color: var(--text); }
.topup .btn { width: 100%; height: 46px; }

/* Histórico, extrato e relatórios */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.stat { padding: 18px; }
.stat.main { border-color: var(--line-gold); background: linear-gradient(140deg, var(--navy-3), var(--navy-2)); }
.stat small { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.stat.main small { color: var(--gold); }
.stat strong { display: block; margin-top: 8px; font-size: 24px; font-weight: 700; }
.filters { margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.filters .field { flex: 1 1 260px; }
.empty { margin-top: 14px; padding: 44px 24px; text-align: center; font-size: 14px; color: var(--text-soft); }
.empty .tile { margin: 0 auto 14px; }
.empty b { display: block; margin-bottom: 4px; color: var(--text); font-size: 15px; }
.empty .btn { margin-top: 16px; }

/* Premium */

/* Flutuantes */
dialog { width: min(440px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--line-gold); border-radius: 12px; background: var(--navy-2); color: var(--text); }
dialog::backdrop { background: rgba(3,5,9,.72); }
dialog h3 { margin-bottom: 8px; font-size: 18px; font-weight: 700; }
dialog p { margin-bottom: 16px; font-size: 13.5px; line-height: 1.5; color: var(--text-soft); }
dialog label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; }
.dlg-price { margin: 16px 0; padding: 12px 14px; display: flex; justify-content: space-between; border-radius: 8px; background: var(--night); font-size: 13.5px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 20; width: max-content; max-width: calc(100% - 32px); padding: 11px 16px; border: 1px solid var(--line-gold); border-radius: 8px; background: var(--night); font-size: 13.5px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.scrim { display: none; }

@media (max-width: 1100px) {
  .crumbs { display: none; }
  .brand { width: auto; }
  .welcome { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  body { overflow: auto; }
  .menu-btn { display: grid; }
  .topbar { position: sticky; top: 0; z-index: 8; padding: 0 16px; gap: 8px; background: var(--night); }
  .balance svg, .theme-btn .lbl-text { display: none; }
  .balance { padding: 0 10px; }
  .theme-btn { width: 38px; padding: 0; justify-content: center; }
  .brand .words strong { font-size: 16px; }
  .top-actions { margin-left: auto; }
  .shell { display: block; height: auto; }
  .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 12; width: 280px; background: var(--night); transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; z-index: 11; background: rgba(3,5,9,.72); }
  .panel { overflow: visible; min-height: calc(100vh - var(--topbar)); }
  .content { padding: 20px 16px 96px; }
  h1 { font-size: 24px; }
  .welcome { padding: 20px; }
  .go, .search-row, .tools { flex-direction: column; }
  .go .field, .search-row .field, .tools .field { flex: none; }
  .promo { flex-wrap: wrap; }
  .promo .btn { width: 100%; margin-left: 0; }
  .grid-cat, .grid-item { grid-template-columns: 1fr; }
  .segment button { flex: 1; padding: 0 6px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .tab { flex: none; }
  .page-head .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Entrada e cadastro */
.auth { position: fixed; inset: 0; z-index: 30; padding: 32px 16px; overflow-y: auto; background: radial-gradient(800px 500px at 50% 0, rgba(207,161,79,.14), transparent 70%), var(--night); }
.auth-card { max-width: 440px; margin: 0 auto; padding: 28px; }
.auth-logo { margin-bottom: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.auth-logo .mark { width: 76px; height: 44px; }
.auth-logo small { display: block; font-size: 10px; font-weight: 600; letter-spacing: .36em; color: var(--gold); }
.auth-logo strong { display: block; margin-top: 3px; font-size: 28px; font-weight: 800; line-height: 1; color: var(--wordmark); }
.auth-logo em { font-style: normal; color: var(--gold); }
.auth h1 { margin: 0 0 16px; font-size: 20px; text-align: center; }
.auth-switch { margin-top: 16px; text-align: center; font-size: 13.5px; color: var(--text-soft); }
.auth-switch a, .check a { color: var(--gold-light); font-weight: 600; }

/* Formulários */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-stack { display: grid; gap: 14px; }
.lbl { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--text); }
.hint { display: block; margin-top: 5px; font-size: 12px; line-height: 1.45; color: var(--text-muted); }
.hint-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 420px; }
.hint-bad { color: var(--danger); font-weight: 700; }
.price-input { width: 96px; height: 34px; margin-left: auto; text-align: right; }
.provider-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 16px; }
.provider-box .row-actions { flex-wrap: wrap; justify-content: flex-start; }
.query-filter { flex-direction: row; flex-wrap: wrap; }
.query-filter > * { flex: 1 1 200px; min-width: 0; height: 44px; }
tr[hidden] { display: none; }
.input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--navy); font-size: 14px; color: var(--text); }
.input:focus { outline: 0; border-color: var(--gold); }
textarea.input { min-height: 96px; resize: vertical; font-family: Consolas, Menlo, monospace; font-size: 13px; line-height: 1.5; }
select.input { appearance: auto; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.45; color: var(--text-soft); }
.check input { width: 17px; height: 17px; margin: 1px 0 0; flex: none; accent-color: var(--gold); }
.form-error { padding: 10px 12px; border: 1px solid var(--danger); border-radius: 8px; font-size: 13px; color: var(--danger); }
.form-error:empty { display: none; }
.btn[disabled] { opacity: .55; cursor: wait; }
.btn-block { width: 100%; height: 46px; }
.fieldset { padding-top: 16px; border-top: 1px solid var(--line); }
.fieldset > h3 { margin-bottom: 12px; font-size: 14px; font-weight: 700; color: var(--gold-light); }

/* Tabelas */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 12px 14px; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; color: var(--text-muted); border-bottom: 1px solid var(--line); }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--text-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td b, td a.strong { color: var(--text); font-weight: 600; }
td a.strong:hover { color: var(--gold-light); }
td.num, th.num { text-align: right; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
.pos { color: var(--success); font-weight: 600; }
.neg { color: var(--danger); font-weight: 600; }
.status { padding: 3px 8px; border-radius: 5px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.s-ok { background: rgba(95,206,155,.14); color: var(--success); }
.s-bad { background: rgba(239,138,124,.14); color: var(--danger); }
.s-wait { background: rgba(207,161,79,.16); color: var(--gold-light); }
.s-off { background: rgba(217,218,219,.1); color: var(--text-soft); }

/* Modelo e relatório */
.report { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--navy-2); }
.report-body { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.verdict { padding: 14px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; }
.verdict b { display: block; font-size: 15px; }
.verdict span { font-size: 13px; color: var(--text-soft); }
.verdict-icon { width: 30px; height: 30px; display: grid; place-items: center; flex: none; border-radius: 50%; border: 1.5px solid currentColor; font-size: 16px; }
.verdict-ok { border-color: rgba(95,206,155,.45); background: rgba(95,206,155,.1); }
.verdict-ok b, .verdict-ok .verdict-icon { color: var(--success); }
.verdict-bad { border-color: rgba(239,138,124,.45); background: rgba(239,138,124,.1); }
.verdict-bad b, .verdict-bad .verdict-icon { color: var(--danger); }
.verdict-neutral { border-color: var(--line-gold); background: rgba(207,161,79,.1); }
.verdict-neutral b, .verdict-neutral .verdict-icon { color: var(--gold-light); }
.report-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.report-card { padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.report-card small, .report-fields span, .report-section h5 { font-size: 11px; color: var(--text-muted); }
.report-card > small { display: block; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.gauge { display: flex; flex-direction: column; align-items: center; text-align: center; }
.gauge > small { align-self: flex-start; }
.gauge-arc { width: 136px; height: 78px; margin-top: 8px; font-size: 16px; }
.gauge-track, .gauge-value { fill: none; stroke-width: 10; stroke-linecap: round; }
.gauge-track { stroke: var(--line); }
.gauge-value.gauge-ok { stroke: var(--success); }
.gauge-value.gauge-mid { stroke: var(--gold); }
.gauge-value.gauge-bad { stroke: var(--danger); }
.gauge strong { margin-top: -42px; font-size: 28px; font-weight: 800; line-height: 1.1; }
strong.gauge-ok { color: var(--success); }
strong.gauge-mid { color: var(--gold-light); }
strong.gauge-bad { color: var(--danger); }
.gauge > span { font-size: 11px; color: var(--text-muted); }
.gauge > b { margin-top: 8px; font-size: 13px; }
.highlights { display: flex; flex-direction: column; gap: 12px; }
.highlights small { display: block; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.highlights b { display: block; margin-top: 3px; font-size: 16px; overflow-wrap: anywhere; }
.counter-grid { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.counter-grid > div { padding: 9px; border: 1px solid var(--line); border-radius: 8px; }
.counter-grid strong { display: block; font-size: 20px; font-weight: 800; }
.counter-grid .has strong { color: var(--danger); }
.counter-grid span { font-size: 11px; color: var(--text-muted); }
.report-section h4 { margin: 0 0 10px; padding-bottom: 7px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-light); }
.report-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 16px; }
.report-fields .wide { grid-column: 1 / -1; }
.report-fields span { display: block; }
.report-fields b { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.report-group { margin-top: 12px; }
.report-group h5 { margin: 0 0 6px; font-weight: 700; }
.report-group table { border: 1px solid var(--line); }
.report pre { margin: 0; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
dialog.wide-dlg { width: min(780px, calc(100% - 32px)); }
.dlg-section { margin-bottom: 16px; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 20px; padding: 18px; }
.detail-grid small { display: block; margin-bottom: 3px; font-size: 11px; color: var(--text-muted); }
.detail-grid b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }

.mt { margin-top: 14px; }
.backup-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 0; }
.notice { margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--line-gold); border-radius: 8px; font-size: 13px; line-height: 1.5; color: var(--text-soft); }
.loading { padding: 40px; text-align: center; color: var(--text-muted); font-size: 14px; }
@media (max-width: 860px) { .form-grid { grid-template-columns: 1fr; } .form-grid .wide { grid-column: auto; } }

/* Tema meio claro */
:root[data-theme="light"] {
  color-scheme: light;
  --night: #d8dce2;
  --navy: #e6e9ed;
  --navy-2: #f4f5f7;
  --navy-3: #dde1e7;
  --gold: #775512;
  --gold-light: #6f4f10;
  --wordmark: #1c2431;
  --logo-x: #2a3240;
  --text: #161d29;
  --text-soft: #434d5c;
  --text-muted: #566072;
  --line: rgba(20, 28, 40, .16);
  --line-gold: rgba(119, 85, 18, .42);
  --success: #12683f;
  --danger: #a4321f;
}
#appRoot { height: 100%; }
.mark { color: var(--logo-x); }
.theme-btn { height: 38px; padding: 0 12px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-soft); }
.theme-btn:hover { border-color: var(--line-gold); color: var(--gold-light); }
.theme-btn > span { display: inline-flex; align-items: center; gap: 7px; }
.theme-btn svg { font-size: 16px; }
.theme-btn .to-dark { display: none; }
:root[data-theme="light"] .theme-btn .to-light { display: none; }
:root[data-theme="light"] .theme-btn .to-dark { display: inline-flex; }
.auth-top { max-width: 440px; margin: 0 auto 12px; display: flex; justify-content: flex-end; }
@media (max-width: 860px) { #appRoot { height: auto; } }

/* Minha conta */
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; align-items: start; }
.account-card { padding: 22px; }
.input[readonly] { color: var(--text-muted); }

/* Relatório, QR Code e página do celular */
.report-actions { margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.qr-dialog h3 { margin: 0; }
.qr-box { width: min(260px, 100%); margin: 0 auto; padding: 8px; border-radius: 8px; background: #fff; }
.qr-box svg { display: block; width: 100%; height: auto; stroke: none; stroke-width: 1; stroke-linecap: butt; stroke-linejoin: miter; }
.share-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.share-top .brand { width: auto; }
.share-page { max-width: 560px; margin: 0 auto; padding: 22px 16px 48px; }
.share-meta { margin: 6px 0 16px; font-size: 13.5px; color: var(--text-soft); }
.share-note { margin: 10px 0 18px; text-align: center; }
@media (max-width: 860px) { .report-actions .btn { flex: 1 1 100%; } }

/* Logo nos relatórios e ações do painel */
.report-brand { display: flex; align-items: center; gap: 10px; padding: 12px; background: #070b12; }
.report-brand .mark { width: 38px; height: 22px; color: #d9dadb; }
.report-brand small { display: block; font-size: 7px; font-weight: 600; letter-spacing: .36em; color: #cfa14f; }
.report-brand strong { display: block; margin-top: 1px; font-size: 15px; font-weight: 800; line-height: 1; color: #d9dadb; }
.report-brand em { font-style: normal; color: #cfa14f; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 12.5px; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.input.prose { font-family: inherit; font-size: 14px; }

/* Preço próprio do cliente */
.input-sm { width: 110px; min-height: 32px; height: 32px; padding: 4px 8px; font-size: 13px; text-align: right; }
