/* ASN ERP V3.6.06 — tema claro corporativo inspirado no layout aprovado */
:root,
[data-theme="light"]{
  --bg-main:#f4f7fb!important;
  --bg-secondary:#ffffff!important;
  --bg-tertiary:#f7f9fc!important;
  --bg-elevated:#ffffff!important;
  --border:#dfe6ef!important;
  --border-soft:#edf1f6!important;
  --text-main:#12213a!important;
  --text-support:#64748b!important;
  --text-muted:#8492a6!important;
  --accent:#1769ff!important;
  --accent-hover:#0f55d8!important;
  --accent-soft:rgba(23,105,255,.09)!important;
  --danger:#ef4444!important;
  --warning:#f59e0b!important;
  --info:#1769ff!important;
  --radius:12px!important;
  --radius-sm:9px!important;
  --shadow:0 7px 24px rgba(30,64,120,.06)!important;
  --sidebar-width:236px!important;
}
*{box-sizing:border-box}
html{background:#f4f7fb!important}
body{
  margin:0!important;
  background:linear-gradient(180deg,#f8fbff 0,#f4f7fb 190px,#f4f7fb 100%)!important;
  color:#12213a!important;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif!important;
}

/* Sidebar */
.sidebar{
  width:var(--sidebar-width)!important;
  background:linear-gradient(180deg,#0e1d31 0%,#10243b 56%,#0d1b2c 100%)!important;
  border-right:1px solid rgba(255,255,255,.06)!important;
  padding:18px 10px!important;
  box-shadow:12px 0 32px rgba(13,29,49,.08)!important;
}
.sidebar h2{
  margin:0 8px 20px!important;padding:4px 8px 17px!important;
  color:#fff!important;font-size:1.05rem!important;letter-spacing:0!important;text-transform:none!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
}
.sidebar nav ul{gap:4px!important}
.sidebar a{
  min-height:44px!important;border-radius:8px!important;padding:10px 12px!important;margin:0!important;
  color:#c5d3e5!important;font-size:.88rem!important;font-weight:600!important;border:1px solid transparent!important;
}
.sidebar a:hover{background:rgba(255,255,255,.055)!important;color:#fff!important;transform:none!important}
.sidebar a.active{
  background:linear-gradient(90deg,#1358a8,#124b8a)!important;color:#fff!important;border:1px solid rgba(71,157,255,.28)!important;
  box-shadow:none!important;padding-left:12px!important;
}
.sidebar a.active:after{display:none!important}
.sidebar-footer{border-color:rgba(255,255,255,.09)!important;color:#a9bad0!important}

/* Conteúdo */
.main-content{
  margin-left:var(--sidebar-width)!important;
  max-width:calc(100vw - var(--sidebar-width))!important;
  padding:22px 24px 42px!important;
  min-height:100vh!important;
}
.main-content>header,.v34-topbar{
  margin:0 0 18px!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;
}
.main-content>header h1,.main-content>h1:first-child,.page-title,.v34-topbar h1,
.pc-title-row h1{color:#10203a!important;font-size:1.8rem!important;line-height:1.1!important;font-weight:850!important;letter-spacing:-.035em!important}
header p,.page-subtitle,.pc-subtitle,.v34-date{color:#6b7d96!important}

/* Superfícies */
.action-section,.table-container,.table-header,.filtros-globais,.card,.dash-card,.produto-card,.table-compras,.panel,.v34-panel,
.pp-panel,.pp-card,.pp-summary,.pc-card,.pc-topbar,.kanban-col{
  background:#fff!important;border:1px solid #e2e8f0!important;border-radius:12px!important;box-shadow:0 4px 18px rgba(45,78,125,.045)!important;
}
.action-section,.filtros-globais{padding:16px!important}
.toolbar{background:#fff!important;border:1px solid #e2e8f0!important;border-radius:12px!important;padding:10px!important;box-shadow:none!important}
.dashboard-cards{gap:12px!important}
.dashboard-cards .card,.dash-card{border-left:1px solid #e2e8f0!important;padding:16px!important}
.dashboard-cards .card::before,.dash-card::before{background:linear-gradient(90deg,#1769ff,transparent 72%)!important}
.card h3,.dash-card h3{color:#60738f!important}
.card .value,.dash-card .value{color:#10203a!important}

/* Inputs */
input:not([type="checkbox"]):not([type="radio"]),select,textarea,.search-input,.sort-select,.pp-input,
.pc-input,.pc-select{
  min-height:40px!important;background:#fff!important;color:#17233b!important;border:1px solid #d6dfeb!important;border-radius:8px!important;
  box-shadow:none!important;
}
input:focus,select:focus,textarea:focus,.search-input:focus,.pc-input:focus,.pc-select:focus{
  border-color:#1769ff!important;box-shadow:0 0 0 3px rgba(23,105,255,.10)!important;outline:none!important;
}
label,.form-group label,.pc-field label{color:#4f617a!important;font-weight:700!important}

/* Botões */
button,.btn-submit,.btn-add,.tab-btn,.pp-btn,.pc-button,.v34-btn{border-radius:8px!important;font-weight:750!important;box-shadow:none!important}
.btn-submit,.btn-add,.pp-btn-primary,.pc-button.blue,.pc-button.green,.v34-btn-primary,.tab-btn.active{
  background:#1769ff!important;border-color:#1769ff!important;color:#fff!important;
}
.btn-submit:hover,.btn-add:hover,.pp-btn-primary:hover,.pc-button.blue:hover,.pc-button.green:hover,.v34-btn-primary:hover{background:#0f55d8!important}
.pc-button.dark,.v34-btn:not(.v34-btn-primary){background:#fff!important;color:#1769ff!important;border:1px solid #cdd9ea!important}
.btn-danger{background:#fff1f2!important;color:#dc2626!important;border-color:#fecdd3!important}

/* Tabelas */
.table-container{overflow:auto!important;padding:0!important}
table,.tabela-itens{background:#fff!important}
th{background:#f5f8fc!important;color:#60738f!important;font-size:.72rem!important;border-bottom:1px solid #dfe6ef!important}
td{color:#24364f!important;border-bottom:1px solid #edf1f6!important}
tbody tr:hover td{background:#f8fbff!important}
.status-badge.ok,.lucro-alto,.status-resolvido,.badge-ok{background:#dcfce7!important;color:#15803d!important}
.status-badge.low,.lucro-baixo{background:#fff7ed!important;color:#c2410c!important}
.status-badge.out,.prejuizo,.status-pendente,.badge-alerta{background:#fee2e2!important;color:#b91c1c!important}

/* Modais */
.modal-overlay,#custom-confirm-overlay{background:rgba(15,23,42,.46)!important;backdrop-filter:blur(5px)!important}
.modal-content,#custom-confirm-box{background:#fff!important;border-color:#dfe6ef!important;color:#17233b!important;box-shadow:0 20px 55px rgba(15,23,42,.18)!important}

/* Visão geral */
.dashboard-v34-shell{background:transparent!important}
.dashboard-v34{max-width:none!important}
.v34-filterbar,.v34-kpi,.v34-panel,.v34-side-card,.v34-health-card{
  background:#fff!important;border:1px solid #e2e8f0!important;box-shadow:0 4px 18px rgba(45,78,125,.045)!important;
}
.v34-kpi{border-radius:12px!important}
.v34-kpi-value,.v34-total-cost strong{color:#10203a!important}
.v34-kpi-label,.v34-kpi-note,.v34-muted,.v34-panel-kicker{color:#6b7d96!important}
.v34-kpi-icon{background:#edf4ff!important;color:#1769ff!important}
.v34-platform-pills label{background:#f7f9fc!important;border-color:#dfe6ef!important;color:#4b5f79!important}

/* ===== Central de Precificação ===== */
#pc-root{
  --pc-card:#fff;--pc-card-2:#f7f9fc;--pc-border:#dfe6ef;--pc-muted:#6b7d96;
  --pc-green:#16a34a;--pc-blue:#1769ff;--pc-orange:#f59e0b;--pc-red:#ef4444;color:#17233b!important;
  gap:13px!important;
}
#pc-root .pc-title-row{margin-bottom:10px!important}
#pc-root .pc-market-badge{background:#edf4ff!important;border-color:#cfe0ff!important;color:#1769ff!important}
#pc-root .pc-topbar,#pc-root .pc-card{box-shadow:0 4px 18px rgba(45,78,125,.045)!important}
#pc-root .pc-product-row{color:#17233b!important;border-color:#edf1f6!important}
#pc-root .pc-product-row:hover{background:#f8fbff!important}
#pc-root .pc-product-row.active{background:#eef5ff!important;box-shadow:inset 3px 0 #1769ff!important}
#pc-root .pc-mini-card{background:#f7f9fc!important;border-color:#e2e8f0!important}
#pc-root .pc-status.none{background:#eef2f7!important;color:#64748b!important}
#pc-root .pc-status.pending{background:#fff7ed!important;color:#c2410c!important}
#pc-root .pc-status.done{background:#dcfce7!important;color:#15803d!important}
#pc-root .pc-calc-focus{background:#fff!important;border-color:#cfe0ff!important}
#pc-root .pc-big-result{color:#10203a!important}
#pc-root .pc-margin-result{color:#15803d!important}
#pc-root .pc-sheet-table th{background:#f5f8fc!important}

.asn-pc-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:0;background:#fff;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;margin:0 0 2px}
.asn-pc-step{padding:12px 14px;display:flex;align-items:center;gap:10px;border-right:1px solid #edf1f6;color:#6b7d96;min-width:0}
.asn-pc-step:last-child{border-right:0}.asn-pc-step strong{display:block;color:#263952;font-size:.82rem}.asn-pc-step small{display:block;font-size:.7rem;margin-top:2px}.asn-pc-step .n{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#e9eef5;color:#60738f;font-size:.77rem;font-weight:850;flex:0 0 auto}
.asn-pc-step.active{background:#f6f9ff;box-shadow:inset 0 -2px #1769ff}.asn-pc-step.active .n,.asn-pc-step.done .n{background:#1769ff;color:#fff}.asn-pc-step.active strong{color:#1769ff}

#pc-root .pc-topbar.asn-pc-context{padding:12px!important}
.asn-pc-context-main{display:grid;grid-template-columns:minmax(220px,1.5fr) auto auto;gap:10px;align-items:end}
.asn-pc-store{min-width:0}.asn-pc-store>label{display:block;margin-bottom:6px;font-size:.72rem;text-transform:uppercase;color:#60738f;font-weight:800}
.asn-pc-context-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.asn-pc-context-actions .pc-button{min-height:40px!important}
.asn-pc-optionline{margin-top:6px!important;font-size:11px!important}
.asn-pc-taxes-drawer,.asn-pc-avulso-drawer,.asn-pc-breakdown-drawer{border:1px solid #e2e8f0;border-radius:10px;background:#fff;overflow:hidden}
.asn-pc-taxes-drawer{margin-top:10px}.asn-pc-taxes-drawer>summary,.asn-pc-avulso-drawer>summary,.asn-pc-breakdown-drawer>summary{list-style:none;cursor:pointer;padding:11px 13px;font-size:.83rem;font-weight:800;color:#27405f;display:flex;justify-content:space-between;align-items:center;background:#f8fafc}
.asn-pc-taxes-drawer>summary::-webkit-details-marker,.asn-pc-avulso-drawer>summary::-webkit-details-marker,.asn-pc-breakdown-drawer>summary::-webkit-details-marker{display:none}
.asn-pc-taxes-drawer>summary:after,.asn-pc-avulso-drawer>summary:after,.asn-pc-breakdown-drawer>summary:after{content:'▾';color:#1769ff}.asn-pc-taxes-drawer[open]>summary:after,.asn-pc-avulso-drawer[open]>summary:after,.asn-pc-breakdown-drawer[open]>summary:after{content:'▴'}
.asn-pc-taxes-body{padding:13px}.asn-pc-taxes-body .pc-store-grid{grid-template-columns:repeat(4,minmax(130px,1fr))!important;align-items:start!important}.asn-pc-taxes-body .pc-field:first-child{grid-column:auto!important}
.asn-pc-avulso-drawer{margin-bottom:0}.asn-pc-avulso-body{padding:13px}

#pc-root .pc-main-grid{grid-template-columns:minmax(330px,42%) minmax(0,58%)!important;gap:12px!important}
#pc-root .pc-list-card{position:static!important;max-height:none!important}
#pc-root .pc-product-list{max-height:520px!important;min-height:360px!important}
#pc-root #pc-editor-conteudo{gap:12px!important}
#pc-root #pc-editor-conteudo>.pc-card{padding:15px!important}
#pc-root .pc-cost-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
#pc-root .pc-breakdown-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
#pc-root .pc-sheet-card{margin-top:0!important}

/* Página de Produtos */
.produto-card,.produto-item{background:#fff!important;color:#17233b!important}
.produto-card .produto-nome,.produto-name{color:#17233b!important}

/* Pedido presencial e módulos */
.pp-panel,.pp-card,.pp-summary{background:#fff!important;color:#17233b!important}

/* Responsivo */
@media(max-width:1180px){
  #pc-root .pc-main-grid{grid-template-columns:1fr!important}
  .asn-pc-taxes-body .pc-store-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .asn-pc-context-main{grid-template-columns:1fr!important}
}
@media(max-width:900px){
  .main-content{margin-left:0!important;max-width:100vw!important;padding:16px!important}
  .sidebar{width:260px!important}
  .asn-pc-steps{grid-template-columns:1fr 1fr}
  .asn-pc-step:nth-child(2){border-right:0}
  #pc-root .pc-calc-grid,#pc-root .pc-cost-grid,#pc-root .pc-breakdown-grid{grid-template-columns:1fr 1fr!important}
}
@media(max-width:620px){
  .asn-pc-steps{grid-template-columns:1fr}.asn-pc-step{border-right:0;border-bottom:1px solid #edf1f6}
  .asn-pc-taxes-body .pc-store-grid,#pc-root .pc-calc-grid,#pc-root .pc-cost-grid,#pc-root .pc-breakdown-grid{grid-template-columns:1fr!important}
  #pc-root .pc-filter-grid{grid-template-columns:1fr!important}
}

/* ===== ASN ERP V3.6.07 — Central de Precificação no layout aprovado ===== */
.asn-theme-toggle{position:fixed;right:18px;bottom:18px;z-index:99990;min-height:40px;padding:0 13px;border:1px solid #cbd8e8;border-radius:10px;background:#fff;color:#23405f;font-weight:800;box-shadow:0 8px 24px rgba(15,23,42,.12);cursor:pointer}.asn-theme-toggle span{margin-left:5px}
#pc-root>.pc-title-row{display:flex!important;align-items:flex-start!important;gap:20px!important;justify-content:space-between!important;margin-bottom:12px!important}
.asn-pc-header-controls{margin-left:auto;display:grid;grid-template-columns:160px 210px 145px auto;gap:10px;align-items:end;min-width:min(760px,62vw)}
.asn-pc-head-field{display:flex!important;flex-direction:column;gap:5px;font-size:11px!important;color:#536781!important;font-weight:800!important}.asn-pc-head-field>span{text-transform:none}.asn-pc-head-field .pc-select,.asn-pc-head-field .pc-input{height:40px!important;min-height:40px!important}.asn-pc-margin-head input{width:100%!important}.asn-pc-reset-btn{height:40px!important;background:#eef5ff!important;color:#1769ff!important;border:1px solid #cfe0ff!important;white-space:nowrap}
.asn-pc-steps-v3607{display:grid;grid-template-columns:repeat(4,1fr);background:#fff;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;margin:0 0 14px}.asn-pc-step-v3607{position:relative;display:flex;align-items:center;gap:10px;padding:11px 14px;min-width:0;border-right:1px solid #edf1f6;color:#6b7d96}.asn-pc-step-v3607:last-child{border-right:0}.asn-pc-step-v3607>b{width:30px;height:30px;flex:0 0 30px;display:grid;place-items:center;border-radius:50%;background:#e7edf5;color:#60738f}.asn-pc-step-v3607 span{min-width:0}.asn-pc-step-v3607 strong{display:block;color:#263952;font-size:.82rem}.asn-pc-step-v3607 small{display:block;font-size:.69rem;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.asn-pc-step-v3607 i{margin-left:auto;font-style:normal;font-size:24px;color:#91a0b4}.asn-pc-step-v3607.done>b,.asn-pc-step-v3607.active>b{background:#1769ff;color:#fff}.asn-pc-step-v3607.active{background:#f7faff;box-shadow:inset 0 0 0 1px #1769ff}.asn-pc-step-v3607.active strong{color:#1769ff}
.asn-pc-workspace{display:grid;grid-template-columns:minmax(420px,1.55fr) minmax(270px,.78fr) minmax(260px,.72fr);gap:12px;align-items:start;margin-bottom:12px}.asn-pc-column{background:#fff;border:1px solid #e2e8f0;border-radius:12px;box-shadow:0 4px 18px rgba(45,78,125,.045);padding:14px;min-width:0}.asn-pc-col-head{margin-bottom:11px}.asn-pc-col-head h3{margin:0;color:#16243b;font-size:1rem}.asn-pc-col-head p{margin:4px 0 0;color:#718198;font-size:.75rem;line-height:1.4}.asn-pc-tabs{display:flex;border:1px solid #dfe6ef;border-radius:8px;background:#f6f8fb;overflow:hidden;margin-bottom:10px}.asn-pc-tabs button{flex:1;min-height:39px;border:0;border-right:1px solid #dfe6ef;background:transparent;color:#465a75;font-weight:800;cursor:pointer}.asn-pc-tabs button:last-child{border-right:0}.asn-pc-tabs button.active{background:#fff;color:#1769ff;box-shadow:inset 0 -2px #1769ff}
#pc-root .asn-pc-list-embedded{padding:0!important;border:0!important;box-shadow:none!important;border-radius:8px!important}#pc-root .asn-pc-list-embedded .pc-list-head{padding:0!important}#pc-root .asn-pc-list-embedded .pc-list-head>.pc-title-row{display:none!important}#pc-root .asn-pc-list-embedded .pc-product-list{min-height:250px!important;max-height:360px!important;border:1px solid #e3e9f1!important;border-radius:8px!important;overflow:auto!important}#pc-root .asn-pc-list-embedded .pc-filter-grid{grid-template-columns:1fr 135px!important;margin-bottom:9px!important}.asn-pc-avulso-embedded{margin:0!important;border:0!important;box-shadow:none!important;padding:6px 0!important}.asn-pc-avulso-embedded>.pc-title-row{display:none!important}.asn-pc-product-info{margin-top:10px!important;padding:12px!important;box-shadow:none!important}.asn-pc-product-info .pc-product-header{margin-bottom:10px!important}.asn-pc-product-info .pc-cost-grid{grid-template-columns:repeat(3,1fr)!important}.asn-pc-product-info .pc-cost-audit{margin-top:10px!important}
.asn-pc-accordion{border:1px solid #e2e8f0;border-radius:9px;margin:0 0 8px;background:#fff;overflow:hidden}.asn-pc-accordion>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 12px;cursor:pointer;color:#223751;font-weight:800;font-size:.78rem;background:#fff}.asn-pc-accordion>summary::-webkit-details-marker{display:none}.asn-pc-accordion[open]>summary{background:#f8fbff;border-bottom:1px solid #e8eef5;color:#1769ff}.asn-pc-acc-arrow{color:#1769ff}.asn-pc-accordion-body{padding:11px;background:#fff}.asn-pc-accordion-body>.pc-field{margin:0!important}.asn-pc-accordion-body .pc-field label{font-size:.7rem!important}.asn-pc-accordion-body .pc-store-grid{grid-template-columns:1fr!important}.asn-pc-accordion-body #pc-ml-taxas-box,.asn-pc-accordion-body #pc-tiktok-taxas-box{grid-column:auto!important;margin:0!important;padding:10px!important}.asn-pc-product-rules,.asn-pc-breakdown{border:0!important;box-shadow:none!important;padding:0!important;margin:0!important}.asn-pc-product-rules>.pc-title-row,.asn-pc-breakdown>.pc-title-row{display:none!important}.asn-pc-product-rules .pc-calc-grid{grid-template-columns:1fr!important}.asn-pc-product-rules .pc-calc-grid>div:first-child{display:none!important}.asn-pc-breakdown .pc-breakdown-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.asn-pc-result-col{position:sticky;top:12px}.asn-pc-cert{display:flex;gap:9px;align-items:center;padding:10px;border:1px solid #dbe7f1;background:#f7fafc;border-radius:8px;margin-bottom:12px;color:#43566f}.asn-pc-cert.ok{background:#ecfdf3;border-color:#bdebd0;color:#166534}.asn-cert-icon{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#e2e8f0;color:#64748b;font-weight:900}.asn-pc-cert.ok .asn-cert-icon{background:#139b54;color:#fff}.asn-pc-cert b{display:block;font-size:.78rem}.asn-pc-cert small{display:block;font-size:.68rem;margin-top:2px}.asn-pc-result-price>small,.asn-pc-metrics small{display:block;color:#60738f;font-size:.69rem;font-weight:800}.asn-pc-result-price .pc-big-result{font-size:2.05rem!important;margin:3px 0!important}.asn-pc-equilibrium{color:#718198;font-size:.72rem;margin-bottom:10px}.asn-pc-metrics{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}.asn-pc-metrics>div{background:#f5f8fc;border:1px solid #e8eef5;border-radius:8px;padding:9px}.asn-pc-metrics .pc-big-result{font-size:1.22rem!important;margin:2px 0 0!important}.asn-pc-metrics #pc-margem-real{color:#15803d!important}.asn-pc-metrics #pc-lucro-estimado{font-weight:850;color:#17233b!important;font-size:1rem!important}.asn-pc-quick-label{font-size:.7rem;color:#60738f;font-weight:800;margin-bottom:6px}.asn-pc-result-col .pc-quick-margins{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:6px!important;margin:0 0 9px!important}.asn-pc-result-col .pc-chip{min-width:0!important;width:100%!important}.asn-pc-simulate{width:100%;min-height:42px;margin-bottom:8px}.asn-pc-result-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.asn-pc-result-actions .pc-button{min-height:39px;background:#eff5ff!important;color:#1769ff!important;border:1px solid #d4e3ff!important}.asn-pc-result-more{margin-top:9px;border-top:1px solid #edf1f6}.asn-pc-result-more>summary{cursor:pointer;padding:10px 2px 4px;color:#60738f;font-size:.71rem;font-weight:800}.asn-pc-result-more-body{padding-top:8px}.asn-pc-result-more-body>.pc-card{border:0!important;box-shadow:none!important;padding:0!important}.asn-pc-result-more-body .pc-actions-left{display:none!important}.asn-pc-result-more-body .pc-actions-right{display:none!important}
.asn-legacy-hidden{display:none!important}#pc-root #pc-editor-conteudo{display:contents!important}.asn-pc-revised{margin-top:0!important}.asn-pc-revised h3{font-size:1rem!important}

/* ===== Modo escuro global ===== */
html[data-theme="dark"]{background:#09111d!important;color-scheme:dark}html[data-theme="dark"] body{background:linear-gradient(180deg,#0c1625 0,#0a1320 190px,#0a1320 100%)!important;color:#dce7f5!important}html[data-theme="dark"] .sidebar{background:linear-gradient(180deg,#08121f,#0b1a2c)!important;border-right-color:#203047!important}html[data-theme="dark"] .main-content>header h1,html[data-theme="dark"] .main-content>h1:first-child,html[data-theme="dark"] .page-title,html[data-theme="dark"] .v34-topbar h1,html[data-theme="dark"] .pc-title-row h1{color:#f2f7ff!important}html[data-theme="dark"] header p,html[data-theme="dark"] .page-subtitle,html[data-theme="dark"] .pc-subtitle,html[data-theme="dark"] .v34-date{color:#8ea2bd!important}
html[data-theme="dark"] .action-section,html[data-theme="dark"] .table-container,html[data-theme="dark"] .table-header,html[data-theme="dark"] .filtros-globais,html[data-theme="dark"] .card,html[data-theme="dark"] .dash-card,html[data-theme="dark"] .produto-card,html[data-theme="dark"] .table-compras,html[data-theme="dark"] .panel,html[data-theme="dark"] .v34-panel,html[data-theme="dark"] .pp-panel,html[data-theme="dark"] .pp-card,html[data-theme="dark"] .pp-summary,html[data-theme="dark"] .pc-card,html[data-theme="dark"] .pc-topbar,html[data-theme="dark"] .kanban-col,html[data-theme="dark"] .toolbar,html[data-theme="dark"] .v34-filterbar,html[data-theme="dark"] .v34-kpi,html[data-theme="dark"] .v34-side-card,html[data-theme="dark"] .v34-health-card,html[data-theme="dark"] .asn-pc-column,html[data-theme="dark"] .asn-pc-steps-v3607,html[data-theme="dark"] .asn-pc-accordion,html[data-theme="dark"] .asn-pc-accordion-body{background:#101c2d!important;border-color:#24354b!important;color:#dce7f5!important;box-shadow:none!important}
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),html[data-theme="dark"] select,html[data-theme="dark"] textarea,html[data-theme="dark"] .search-input,html[data-theme="dark"] .sort-select,html[data-theme="dark"] .pp-input,html[data-theme="dark"] .pc-input,html[data-theme="dark"] .pc-select{background:#0c1726!important;color:#e5edf8!important;border-color:#314158!important}html[data-theme="dark"] label,html[data-theme="dark"] .form-group label,html[data-theme="dark"] .pc-field label{color:#aebed1!important}html[data-theme="dark"] th,html[data-theme="dark"] .pc-sheet-table th{background:#142238!important;color:#a9bbd0!important;border-color:#293950!important}html[data-theme="dark"] td{color:#d4dfec!important;border-color:#223249!important}html[data-theme="dark"] tbody tr:hover td{background:#142338!important}html[data-theme="dark"] .pc-button.dark,html[data-theme="dark"] .v34-btn:not(.v34-btn-primary){background:#142238!important;color:#8db9ff!important;border-color:#31445f!important}html[data-theme="dark"] .modal-content,html[data-theme="dark"] #custom-confirm-box{background:#101c2d!important;border-color:#314158!important;color:#e5edf8!important}
html[data-theme="dark"] .asn-theme-toggle{background:#132238;color:#dce8f8;border-color:#31455f}html[data-theme="dark"] .asn-pc-step-v3607{border-color:#22344b;color:#8fa4be}html[data-theme="dark"] .asn-pc-step-v3607 strong,html[data-theme="dark"] .asn-pc-col-head h3,html[data-theme="dark"] .asn-pc-accordion>summary{color:#dce7f5!important}html[data-theme="dark"] .asn-pc-step-v3607.active,html[data-theme="dark"] .asn-pc-accordion[open]>summary{background:#132640!important}html[data-theme="dark"] .asn-pc-tabs{background:#0d1929;border-color:#2b3d54}html[data-theme="dark"] .asn-pc-tabs button{color:#9db0c8;border-color:#2b3d54}html[data-theme="dark"] .asn-pc-tabs button.active{background:#14243a;color:#74a9ff}html[data-theme="dark"] .asn-pc-cert{background:#142238;border-color:#2b3d54;color:#aec0d5}html[data-theme="dark"] .asn-pc-cert.ok{background:#102a23;border-color:#235d48;color:#79d7a6}html[data-theme="dark"] .asn-pc-metrics>div{background:#0d1929;border-color:#26384f}html[data-theme="dark"] .asn-pc-metrics #pc-lucro-estimado,html[data-theme="dark"] #pc-root .pc-big-result{color:#edf4ff!important}html[data-theme="dark"] .asn-pc-result-more{border-color:#26364b}

@media(max-width:1280px){.asn-pc-header-controls{grid-template-columns:repeat(2,minmax(160px,1fr));min-width:520px}.asn-pc-workspace{grid-template-columns:minmax(360px,1.2fr) minmax(250px,.8fr)}.asn-pc-result-col{grid-column:1/-1;position:static}.asn-pc-result-col{display:grid;grid-template-columns:1fr 1fr;gap:10px}.asn-pc-result-col>.asn-pc-col-head,.asn-pc-result-col>.asn-pc-cert,.asn-pc-result-col>.asn-pc-result-more{grid-column:1/-1}}
@media(max-width:980px){#pc-root>.pc-title-row{display:block!important}.asn-pc-header-controls{margin-top:12px;min-width:0;grid-template-columns:1fr 1fr}.asn-pc-steps-v3607{grid-template-columns:1fr 1fr}.asn-pc-workspace{grid-template-columns:1fr}.asn-pc-result-col{grid-column:auto;display:block}.asn-pc-result-col>*{grid-column:auto}.asn-pc-product-info .pc-cost-grid{grid-template-columns:1fr 1fr!important}}
@media(max-width:620px){.asn-pc-header-controls{grid-template-columns:1fr}.asn-pc-steps-v3607{grid-template-columns:1fr}.asn-pc-step-v3607{border-right:0;border-bottom:1px solid #edf1f6}.asn-pc-result-actions,.asn-pc-metrics{grid-template-columns:1fr}.asn-theme-toggle span{display:none}}

/* ===== ASN ERP V3.6.08 — MODO ESCURO REFEITO / ALTO CONTRASTE ===== */
html[data-theme="dark"]{
  --bg-main:#0b1220!important;
  --bg-secondary:#111827!important;
  --bg-tertiary:#172033!important;
  --bg-elevated:#182235!important;
  --border:#334155!important;
  --border-soft:#253349!important;
  --text-main:#f8fafc!important;
  --text-support:#cbd5e1!important;
  --text-muted:#94a3b8!important;
  --accent:#3b82f6!important;
  --accent-hover:#60a5fa!important;
  --accent-soft:rgba(59,130,246,.16)!important;
  --danger:#f87171!important;
  --warning:#fbbf24!important;
  --info:#60a5fa!important;
  background:#0b1220!important;
  color-scheme:dark;
}
html[data-theme="dark"] body{
  background:#0b1220!important;
  color:#f8fafc!important;
}
html[data-theme="dark"] .main-content{
  background:linear-gradient(180deg,#0f172a 0,#0b1220 220px,#0b1220 100%)!important;
  color:#f8fafc!important;
}

/* Tipografia — nenhum texto funcional pode herdar preto/cinza de tema claro */
html[data-theme="dark"] .main-content h1,
html[data-theme="dark"] .main-content h2,
html[data-theme="dark"] .main-content h3,
html[data-theme="dark"] .main-content h4,
html[data-theme="dark"] .main-content h5,
html[data-theme="dark"] .main-content h6,
html[data-theme="dark"] .main-content .title,
html[data-theme="dark"] .main-content .page-title,
html[data-theme="dark"] .main-content .card-title,
html[data-theme="dark"] .main-content .section-title,
html[data-theme="dark"] .main-content strong:not(.status-badge):not(.badge){color:#f8fafc!important}
html[data-theme="dark"] .main-content p,
html[data-theme="dark"] .main-content .subtitle,
html[data-theme="dark"] .main-content .page-subtitle,
html[data-theme="dark"] .main-content .muted,
html[data-theme="dark"] .main-content .hint,
html[data-theme="dark"] .main-content small{color:#b8c6d9!important}
html[data-theme="dark"] .main-content a:not(.sidebar a){color:#7db2ff!important}

/* Superfícies */
html[data-theme="dark"] :is(
  .action-section,.table-container,.table-header,.filtros-globais,.card,.dash-card,.produto-card,.produto-item,
  .table-compras,.panel,.v34-panel,.v34-filterbar,.v34-kpi,.v34-side-card,.v34-health-card,.toolbar,
  .pp-panel,.pp-card,.pp-summary,.pc-card,.pc-topbar,.kanban-col,.form-card,.filter-card,.summary-card,
  .metric-card,.stat-card,.content-card,.list-card,.details-card,.section-card,.modal-content,#custom-confirm-box
){
  background:#111827!important;
  border-color:#334155!important;
  color:#f8fafc!important;
  box-shadow:0 6px 22px rgba(0,0,0,.18)!important;
}
html[data-theme="dark"] :is(.card,.dash-card,.v34-kpi,.metric-card,.stat-card) .value,
html[data-theme="dark"] :is(.card,.dash-card,.v34-kpi,.metric-card,.stat-card) .amount,
html[data-theme="dark"] .v34-kpi-value,
html[data-theme="dark"] .v34-total-cost strong{color:#ffffff!important}
html[data-theme="dark"] :is(.card,.dash-card,.v34-kpi,.metric-card,.stat-card) :is(.label,.card-label,.kpi-label),
html[data-theme="dark"] .v34-kpi-label,
html[data-theme="dark"] .v34-kpi-note,
html[data-theme="dark"] .v34-muted,
html[data-theme="dark"] .v34-panel-kicker{color:#b8c6d9!important}

/* Formulários */
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .search-input,
html[data-theme="dark"] .sort-select,
html[data-theme="dark"] .pp-input,
html[data-theme="dark"] .pc-input,
html[data-theme="dark"] .pc-select{
  background:#0f172a!important;
  color:#f8fafc!important;
  border-color:#42536b!important;
  caret-color:#ffffff!important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#8191a8!important;opacity:1!important}
html[data-theme="dark"] select option{background:#111827!important;color:#f8fafc!important}
html[data-theme="dark"] input:disabled,
html[data-theme="dark"] select:disabled,
html[data-theme="dark"] textarea:disabled{
  background:#182235!important;color:#9fb0c6!important;border-color:#334155!important;opacity:1!important;
}
html[data-theme="dark"] label,
html[data-theme="dark"] .form-group label,
html[data-theme="dark"] .pc-field label,
html[data-theme="dark"] .field-label{color:#d7e2ef!important}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] .pc-input:focus,
html[data-theme="dark"] .pc-select:focus{
  border-color:#60a5fa!important;
  box-shadow:0 0 0 3px rgba(96,165,250,.18)!important;
}

/* Tabelas */
html[data-theme="dark"] table,
html[data-theme="dark"] .tabela-itens{background:#111827!important;color:#e8f0fa!important}
html[data-theme="dark"] thead,
html[data-theme="dark"] th,
html[data-theme="dark"] .pc-sheet-table th{
  background:#182235!important;
  color:#d8e4f2!important;
  border-color:#34445b!important;
}
html[data-theme="dark"] td{
  background:#111827!important;
  color:#e6edf7!important;
  border-color:#27364a!important;
}
html[data-theme="dark"] tbody tr:nth-child(even) td{background:#121b2a!important}
html[data-theme="dark"] tbody tr:hover td{background:#1b2a40!important}
html[data-theme="dark"] tbody tr.selected td,
html[data-theme="dark"] tbody tr.active td{background:#1a3152!important}

/* Botões secundários/terciários */
html[data-theme="dark"] :is(.btn-secondary,.btn-outline,.btn-cancel,.pc-button.dark,.v34-btn:not(.v34-btn-primary),.asn-pc-result-actions .pc-button,.asn-pc-reset-btn){
  background:#182235!important;
  color:#a9ccff!important;
  border-color:#3a506c!important;
}
html[data-theme="dark"] :is(.btn-secondary,.btn-outline,.btn-cancel,.pc-button.dark,.v34-btn:not(.v34-btn-primary),.asn-pc-result-actions .pc-button,.asn-pc-reset-btn):hover{
  background:#21324b!important;color:#dbeafe!important;border-color:#5a77a0!important;
}
html[data-theme="dark"] :is(.btn-submit,.btn-add,.pp-btn-primary,.pc-button.blue,.pc-button.green,.v34-btn-primary,.tab-btn.active,.asn-pc-simulate){
  background:#2563eb!important;border-color:#3b82f6!important;color:#fff!important;
}
html[data-theme="dark"] :is(.btn-submit,.btn-add,.pp-btn-primary,.pc-button.blue,.pc-button.green,.v34-btn-primary,.tab-btn.active,.asn-pc-simulate):hover{
  background:#3b82f6!important;
}

/* Precificação — correção completa do layout escolhido */
html[data-theme="dark"] #pc-root{color:#eef5ff!important;--pc-card:#111827;--pc-card-2:#172033;--pc-border:#334155;--pc-muted:#a6b6ca;--pc-blue:#60a5fa}
html[data-theme="dark"] #pc-root .pc-title-row h1{color:#ffffff!important}
html[data-theme="dark"] #pc-root .pc-subtitle{color:#b7c5d8!important}
html[data-theme="dark"] .asn-pc-steps-v3607,
html[data-theme="dark"] .asn-pc-column{background:#111827!important;border-color:#334155!important}
html[data-theme="dark"] .asn-pc-step-v3607{color:#a8b7c9!important;border-color:#2c3d53!important}
html[data-theme="dark"] .asn-pc-step-v3607 strong{color:#f1f5f9!important}
html[data-theme="dark"] .asn-pc-step-v3607 small{color:#a5b4c7!important}
html[data-theme="dark"] .asn-pc-step-v3607>b{background:#23324a!important;color:#c8d6e8!important}
html[data-theme="dark"] .asn-pc-step-v3607.done>b,
html[data-theme="dark"] .asn-pc-step-v3607.active>b{background:#2563eb!important;color:#fff!important}
html[data-theme="dark"] .asn-pc-step-v3607.active{background:#17233a!important;box-shadow:inset 0 0 0 1px #3b82f6!important}
html[data-theme="dark"] .asn-pc-step-v3607.active strong{color:#8fc0ff!important}
html[data-theme="dark"] .asn-pc-col-head h3{color:#ffffff!important}
html[data-theme="dark"] .asn-pc-col-head p{color:#aebed1!important}
html[data-theme="dark"] .asn-pc-tabs{background:#0f172a!important;border-color:#334155!important}
html[data-theme="dark"] .asn-pc-tabs button{background:#0f172a!important;color:#b7c7d9!important;border-color:#334155!important}
html[data-theme="dark"] .asn-pc-tabs button.active{background:#1a2a43!important;color:#93c5fd!important;box-shadow:inset 0 -2px #60a5fa!important}
html[data-theme="dark"] #pc-root .pc-product-row{background:#111827!important;color:#e6edf7!important;border-color:#28384d!important}
html[data-theme="dark"] #pc-root .pc-product-row:hover{background:#17243a!important}
html[data-theme="dark"] #pc-root .pc-product-row.active{background:#193253!important;box-shadow:inset 3px 0 #60a5fa!important}
html[data-theme="dark"] #pc-root .pc-product-row :is(.pc-product-name,.pc-name,strong){color:#f8fafc!important}
html[data-theme="dark"] #pc-root .pc-product-row :is(.pc-product-sub,.pc-sku,.pc-muted,small){color:#aab9cc!important}
html[data-theme="dark"] .asn-pc-accordion{background:#111827!important;border-color:#334155!important}
html[data-theme="dark"] .asn-pc-accordion>summary{background:#111827!important;color:#e7eef8!important}
html[data-theme="dark"] .asn-pc-accordion[open]>summary{background:#17243a!important;color:#93c5fd!important;border-bottom-color:#334155!important}
html[data-theme="dark"] .asn-pc-accordion-body{background:#0f172a!important;color:#eef5ff!important}
html[data-theme="dark"] .asn-pc-cert{background:#172033!important;border-color:#3a4a60!important;color:#d6e0ec!important}
html[data-theme="dark"] .asn-pc-cert.ok{background:#102a22!important;border-color:#287258!important;color:#a7f3d0!important}
html[data-theme="dark"] .asn-pc-cert:not(.ok) .asn-cert-icon{background:#2a394d!important;color:#d9e4f2!important}
html[data-theme="dark"] .asn-pc-result-price>small,
html[data-theme="dark"] .asn-pc-metrics small,
html[data-theme="dark"] .asn-pc-quick-label,
html[data-theme="dark"] .asn-pc-equilibrium{color:#aebed1!important}
html[data-theme="dark"] #pc-root .pc-big-result,
html[data-theme="dark"] .asn-pc-metrics #pc-lucro-estimado{color:#ffffff!important}
html[data-theme="dark"] .asn-pc-metrics>div{background:#172033!important;border-color:#34445b!important}
html[data-theme="dark"] .asn-pc-metrics #pc-margem-real{color:#4ade80!important}
html[data-theme="dark"] .asn-pc-result-more{border-color:#334155!important}
html[data-theme="dark"] .asn-pc-result-more>summary{color:#b9c7d8!important}
html[data-theme="dark"] #pc-root .pc-mini-card,
html[data-theme="dark"] #pc-root .pc-calc-focus{background:#172033!important;border-color:#334155!important;color:#e6edf7!important}
html[data-theme="dark"] #pc-root .pc-market-badge{background:#172a48!important;border-color:#365a8c!important;color:#9ec8ff!important}
html[data-theme="dark"] #pc-root .pc-status.none{background:#263349!important;color:#c6d2e1!important}
html[data-theme="dark"] #pc-root .pc-status.pending{background:#3a2912!important;color:#fcd34d!important}
html[data-theme="dark"] #pc-root .pc-status.done{background:#123326!important;color:#86efac!important}

/* Dashboard / filtros / pills */
html[data-theme="dark"] .v34-kpi-icon{background:#172a48!important;color:#8abaff!important}
html[data-theme="dark"] .v34-platform-pills label{background:#172033!important;border-color:#334155!important;color:#d0dae7!important}
html[data-theme="dark"] .v34-platform-pills input:checked+span,
html[data-theme="dark"] .v34-platform-pills label.active{background:#1c3a66!important;color:#dbeafe!important;border-color:#4b78b7!important}

/* Status/badges continuam coloridos mas legíveis */
html[data-theme="dark"] :is(.status-badge.ok,.lucro-alto,.status-resolvido,.badge-ok){background:#123326!important;color:#86efac!important;border-color:#24553f!important}
html[data-theme="dark"] :is(.status-badge.low,.lucro-baixo){background:#3b2a13!important;color:#fcd34d!important;border-color:#705221!important}
html[data-theme="dark"] :is(.status-badge.out,.prejuizo,.status-pendente,.badge-alerta){background:#3b1d25!important;color:#fda4af!important;border-color:#6f3040!important}

/* Modal, menus flutuantes e overlays */
html[data-theme="dark"] .modal-overlay,
html[data-theme="dark"] #custom-confirm-overlay{background:rgba(2,6,23,.76)!important;backdrop-filter:blur(5px)!important}
html[data-theme="dark"] :is(.dropdown-menu,.context-menu,.menu-popup,.popover,.tooltip-panel){background:#162033!important;color:#f8fafc!important;border-color:#3b4b61!important;box-shadow:0 18px 45px rgba(0,0,0,.38)!important}

/* Toggle com leitura clara */
html[data-theme="dark"] .asn-theme-toggle{background:#1b2b43!important;color:#f8fafc!important;border-color:#4a607f!important;box-shadow:0 10px 28px rgba(0,0,0,.34)!important}
html[data-theme="dark"] .asn-theme-toggle:hover{background:#263a58!important;border-color:#6b86aa!important}

/* Scrollbar em modo escuro */
html[data-theme="dark"] *{scrollbar-color:#4b5f7a #101827}
html[data-theme="dark"] *::-webkit-scrollbar{width:10px;height:10px}
html[data-theme="dark"] *::-webkit-scrollbar-track{background:#101827}
html[data-theme="dark"] *::-webkit-scrollbar-thumb{background:#41546e;border:2px solid #101827;border-radius:10px}
html[data-theme="dark"] *::-webkit-scrollbar-thumb:hover{background:#5b7190}


/* ===== ASN ERP V3.6.10 — TEMA ESCURO GLOBAL UNIFICADO ===== */
html[data-theme="dark"]{
  --bg-main:#08111f!important;
  --bg-primary:#08111f!important;
  --bg-secondary:#0f1b2d!important;
  --bg-tertiary:#142238!important;
  --bg-elevated:#17263b!important;
  --border:#2f425c!important;
  --border-soft:#223249!important;
  --text-main:#f3f7fc!important;
  --text-support:#c2cede!important;
  --text-muted:#8fa1b9!important;
  --accent:#3b82f6!important;
  --accent-hover:#60a5fa!important;
  --accent-soft:rgba(59,130,246,.16)!important;
  --danger:#fb7185!important;
  --warning:#fbbf24!important;
  --info:#60a5fa!important;
  color-scheme:dark!important;
  background:#08111f!important;
}
html[data-theme="dark"] body,
html[data-theme="dark"] .main-content{
  background:#08111f!important;
  color:#f3f7fc!important;
}
html[data-theme="dark"] .main-content{
  background:linear-gradient(180deg,#0c1728 0,#08111f 230px,#08111f 100%)!important;
}

/* Superfícies genéricas e módulos antigos */
html[data-theme="dark"] .main-content :is(
  section,article,aside,details,
  .card,.dash-card,.panel,.action-section,.form-container,.table-container,.table-compras,.table-header,.toolbar,
  .filtros-globais,.filters,.filter-card,.form-card,.summary-card,.metric-card,.stat-card,.content-card,.list-card,.details-card,.section-card,
  .produto-card,.produto-item,.kanban-col,.kanban-card,.custom-select-dropdown,.custom-select-search,.modal-content,#custom-confirm-box,
  .v34-panel,.v34-filterbar,.v34-kpi,.v34-side-card,.v34-health-card,
  .pp-panel,.pp-card,.pp-summary,.pc-card,.pc-topbar,.asn-pc-column,.asn-pc-steps-v3607,.asn-pc-accordion,.asn-pc-accordion-body,
  .asn-pc-tabs,.asn-pc-cert,.asn-pc-metrics>div,.asn-pc-taxes-drawer,.asn-pc-avulso-drawer,.asn-pc-breakdown-drawer,
  .profile-card,.admin-card,.admin-section,.settings-card,.integration-card,.finance-card,.meta-card,.report-card,.dashboard-section
){
  background-color:#0f1b2d!important;
  border-color:#2f425c!important;
  color:#e8eef7!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .main-content :is(.pc-mini-card,.priority-card,.custom-select-option,.asn-pc-metrics>div){
  background:#142238!important;
  border-color:#2f425c!important;
}
html[data-theme="dark"] .main-content :is(.custom-select-option:hover,.kanban-card:hover){background:#192b44!important}

/* Textos */
html[data-theme="dark"] .main-content :is(h1,h2,h3,h4,h5,h6,.title,.page-title,.card-title,.section-title,.table-header h3,.panel-header h3){color:#f8fbff!important}
html[data-theme="dark"] .main-content :is(p,small,.subtitle,.page-subtitle,.muted,.hint,.description,.card-subtitle,.v34-muted,.v34-kpi-note,.v34-panel-kicker){color:#b4c2d5!important}
html[data-theme="dark"] .main-content :is(label,.form-group label,.input-group label,.pc-field label,.field-label){color:#d1dbea!important}
html[data-theme="dark"] .main-content a:not(.sidebar a){color:#8bb9ff!important}

/* Formulários */
html[data-theme="dark"] :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea,.form-control,.search-input,.sort-select,.pp-input,.pc-input,.pc-select,
  .custom-select-trigger,.custom-select-search input
){
  background:#0b1525!important;
  color:#f3f7fc!important;
  border-color:#3b506d!important;
  caret-color:#fff!important;
}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#7f92ad!important;opacity:1!important}
html[data-theme="dark"] select option{background:#0f1b2d!important;color:#f3f7fc!important}
html[data-theme="dark"] :is(input,select,textarea):disabled{background:#17263b!important;color:#9dadc2!important;opacity:1!important}

/* Tabelas */
html[data-theme="dark"] table,
html[data-theme="dark"] .tabela-itens,
html[data-theme="dark"] .pc-sheet-table{background:#0f1b2d!important;color:#e8eef7!important}
html[data-theme="dark"] :is(thead,th,.pc-sheet-table th){background:#17263b!important;color:#c9d5e4!important;border-color:#334860!important}
html[data-theme="dark"] td{background:#0f1b2d!important;color:#e5edf7!important;border-color:#223249!important}
html[data-theme="dark"] tbody tr:nth-child(even) td{background:#101e31!important}
html[data-theme="dark"] tbody tr:hover td{background:#192b44!important}
html[data-theme="dark"] tbody tr.selected td,
html[data-theme="dark"] tbody tr.active td{background:#1b365b!important}

/* Navegação/tabs/accordions */
html[data-theme="dark"] :is(.tab-btn,.asn-pc-tabs button,.asn-pc-accordion>summary,.asn-pc-taxes-drawer>summary,.asn-pc-avulso-drawer>summary,.asn-pc-breakdown-drawer>summary){color:#b8c7d9!important;border-color:#2f425c!important}
html[data-theme="dark"] :is(.tab-btn.active,.asn-pc-tabs button.active,.asn-pc-accordion[open]>summary){background:#18345a!important;color:#9fc5ff!important;border-color:#416a9d!important}

/* Botões */
html[data-theme="dark"] :is(.btn-secondary,.btn-outline,.btn-cancel,.pc-button.dark,.v34-btn:not(.v34-btn-primary),.asn-pc-reset-btn,.asn-pc-result-actions .pc-button){background:#17263b!important;color:#a9ccff!important;border-color:#3d5674!important}
html[data-theme="dark"] :is(.btn-secondary,.btn-outline,.btn-cancel,.pc-button.dark,.v34-btn:not(.v34-btn-primary),.asn-pc-reset-btn,.asn-pc-result-actions .pc-button):hover{background:#1d3451!important;color:#d7e8ff!important}
html[data-theme="dark"] :is(.btn-submit,.btn-add,.pp-btn-primary,.pc-button.blue,.pc-button.green,.v34-btn-primary,.tab-btn.active){color:#fff!important}

/* Modais, popovers e dropdowns */
html[data-theme="dark"] :is(.modal-content,#custom-confirm-box,.custom-select-dropdown,.dropdown-menu,.menu-dropdown,.popover){background:#0f1b2d!important;color:#f3f7fc!important;border-color:#334860!important}
html[data-theme="dark"] :is(.modal-header,.panel-header,.table-header){border-color:#2b3c53!important}

/* Dashboard / cards especiais */
html[data-theme="dark"] :is(.v34-kpi-value,.v34-total-cost strong,.card .value,.dash-card .value,.card-value){color:#fff!important}
html[data-theme="dark"] :is(.v34-kpi-label,.card h3,.dash-card h3,.card-title){color:#b8c6d9!important}
html[data-theme="dark"] .v34-kpi-icon{background:#18345a!important;color:#8bb9ff!important}
html[data-theme="dark"] .v34-platform-pills label{background:#142238!important;border-color:#334860!important;color:#c4d0df!important}

/* Precificação */
html[data-theme="dark"] #pc-root{--pc-card:#0f1b2d;--pc-card-2:#142238;--pc-border:#334860;--pc-muted:#9caec4;color:#eef4fb!important}
html[data-theme="dark"] #pc-root .pc-product-row{color:#e8eef7!important;border-color:#24364d!important}
html[data-theme="dark"] #pc-root .pc-product-row:hover{background:#172a43!important}
html[data-theme="dark"] #pc-root .pc-product-row.active{background:#1a365c!important;box-shadow:inset 3px 0 #60a5fa!important}
html[data-theme="dark"] #pc-root .pc-big-result{color:#fff!important}
html[data-theme="dark"] #pc-root .pc-margin-result{color:#86efac!important}
html[data-theme="dark"] .asn-pc-step-v3607{color:#9eb0c7!important;border-color:#2a3b52!important}
html[data-theme="dark"] .asn-pc-step-v3607 strong{color:#dce6f2!important}
html[data-theme="dark"] .asn-pc-step-v3607.active{background:#153258!important}
html[data-theme="dark"] .asn-pc-cert{background:#142238!important;color:#bdcadd!important;border-color:#334860!important}
html[data-theme="dark"] .asn-pc-cert.ok{background:#0f3025!important;color:#8be0b1!important;border-color:#2a6b50!important}
html[data-theme="dark"] .asn-pc-result-more{border-color:#2f425c!important}

/* Inline backgrounds antigos que eram claros — sem tocar em áreas de impressão/PDF */
html[data-theme="dark"] .main-content [style*="background: white"]:not(#pdf-pedido-compra-container),
html[data-theme="dark"] .main-content [style*="background:white"]:not(#pdf-pedido-compra-container),
html[data-theme="dark"] .main-content [style*="background: #fff"]:not(#pdf-pedido-compra-container),
html[data-theme="dark"] .main-content [style*="background:#fff"]:not(#pdf-pedido-compra-container){background:#0f1b2d!important;color:#f3f7fc!important}

/* Preserva documentos/PDFs que precisam continuar brancos ao imprimir */
html[data-theme="dark"] #pdf-pedido-compra-container,
html[data-theme="dark"] #pdf-pedido-compra-container *{color:#000!important}
html[data-theme="dark"] #pdf-pedido-compra-container{background:#fff!important}

/* Toggle global */
.asn-theme-toggle{position:fixed;right:18px;bottom:18px;z-index:100000;min-height:42px;padding:0 14px;border-radius:999px;border:1px solid #d4deeb;background:#fff;color:#1769ff;font-weight:800;cursor:pointer;box-shadow:0 10px 30px rgba(15,23,42,.14)}
html[data-theme="dark"] .asn-theme-toggle{background:#17263b!important;color:#d8e9ff!important;border-color:#426080!important;box-shadow:0 10px 30px rgba(0,0,0,.35)!important}

/* A barra lateral permanece escura nos dois temas */
html[data-theme="dark"] .sidebar{background:linear-gradient(180deg,#07111f 0%,#0b1a2c 55%,#07111f 100%)!important;border-right-color:#22344a!important}
