/* ASN ERP V5.2.7 — primeira camada de padronização visual.
   Somente apresentação: preserva handlers, IDs, rotas, permissões e regras financeiras. */
html.asn-erp-v527-ui {
  --ui-bg:#f4f6fa;
  --ui-surface:#ffffff;
  --ui-surface-soft:#f8fafc;
  --ui-border:#dfe5ee;
  --ui-text:#172337;
  --ui-muted:#607087;
  --ui-accent:#cf3854;
  --ui-accent-hover:#b92e49;
  --ui-success:#16845f;
  --ui-shadow:0 8px 24px rgba(18,35,59,.055);
  color-scheme:light;
}
html.asn-erp-v527-ui[data-theme="dark"] {
  --ui-bg:#0b1424;
  --ui-surface:#122037;
  --ui-surface-soft:#17283f;
  --ui-border:#2d4361;
  --ui-text:#e8eef7;
  --ui-muted:#a9bad0;
  --ui-accent:#f1768b;
  --ui-accent-hover:#e34c68;
  --ui-success:#48c99b;
  --ui-shadow:0 10px 28px rgba(0,0,0,.18);
  color-scheme:dark;
}
html.asn-erp-v527-ui body {
  background-color:var(--ui-bg);
  color:var(--ui-text);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  line-height:1.5;
}
html.asn-erp-v527-ui .sidebar {
  width:260px;
  padding:22px 16px;
  background:linear-gradient(180deg,#101d31 0%,#0b1424 100%);
  border-right:1px solid #283b55;
  box-shadow:8px 0 24px rgba(6,17,34,.08);
}
html.asn-erp-v527-ui .sidebar h2 {
  margin:0 0 25px;
  padding:0 8px 18px;
  border-bottom:1px solid rgba(205,220,240,.13);
  font-size:1rem;
  letter-spacing:.04em;
}
html.asn-erp-v527-ui .sidebar nav ul { gap:5px; }
html.asn-erp-v527-ui .sidebar a {
  min-height:42px;
  padding:10px 12px;
  border-radius:9px;
  font-size:.9rem;
  transition:background-color .16s ease,color .16s ease;
}
html.asn-erp-v527-ui .sidebar a.active {
  margin-left:0;
  padding-left:12px;
  border:1px solid rgba(241,118,139,.25);
  border-left:3px solid #f1768b;
  border-radius:9px;
  background:rgba(207,56,84,.18);
  color:#fff;
}
html.asn-erp-v527-ui .main-content {
  min-width:0;
  max-width:none;
  padding:30px clamp(18px,2.5vw,40px) 56px;
}
html.asn-erp-v527-ui :is(h1,h2,h3) { color:var(--ui-text); line-height:1.25; }
html.asn-erp-v527-ui :is(.header-actions,.pc-title-row,.asn-v515-page-header) {
  gap:16px;
  margin-bottom:20px;
}
html.asn-erp-v527-ui :is(.card,.dash-card,.panel,.chart-card,.table-container,.pc-card,.v34-panel,.v34-filterbar,.v34-kpi,.fin-intro) {
  border:1px solid var(--ui-border);
  border-radius:12px;
  box-shadow:var(--ui-shadow);
}
html.asn-erp-v527-ui[data-theme="light"] .main-content :is(.card,.dash-card,.panel,.chart-card,.table-container,.pc-card,.v34-panel,.v34-filterbar,.v34-kpi,.fin-intro) {
  background:var(--ui-surface);
}
html.asn-erp-v527-ui[data-theme="dark"] .main-content :is(.card,.dash-card,.panel,.chart-card,.table-container,.pc-card,.v34-panel,.v34-filterbar,.v34-kpi,.fin-intro) {
  background:var(--ui-surface);
  border-color:var(--ui-border);
}
html.asn-erp-v527-ui :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {
  min-height:40px;
  border:1px solid var(--ui-border);
  border-radius:8px;
  background-color:var(--ui-surface);
  color:var(--ui-text);
}
html.asn-erp-v527-ui :is(input,select,textarea):focus-visible,
html.asn-erp-v527-ui :is(button,a):focus-visible {
  outline:3px solid rgba(102,218,205,.55);
  outline-offset:2px;
}
html.asn-erp-v527-ui :is(button,.btn,.btn-add,.btn-submit,.btn-primary,.cf-btn-primary,.v34-btn-primary) {
  border-radius:8px;
}
html.asn-erp-v527-ui table { border-color:var(--ui-border); }
html.asn-erp-v527-ui th {
  background:var(--ui-surface-soft);
  color:var(--ui-muted);
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.025em;
}
html.asn-erp-v527-ui td,html.asn-erp-v527-ui th { padding:11px 13px; }
html.asn-erp-v527-ui a { text-underline-offset:3px; }
@media (max-width:1000px) {
  html.asn-erp-v527-ui .main-content { padding:22px 18px 44px; }
}
@media (max-width:600px) {
  html.asn-erp-v527-ui .main-content { padding:16px 12px 36px; }
  html.asn-erp-v527-ui :is(.dashboard-filters,.header-actions,.pc-title-row) { gap:10px; }
  html.asn-erp-v527-ui :is(.cards-grid,.dashboard-cards) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  html.asn-erp-v527-ui :is(button,.btn,.btn-add,.btn-submit) { min-height:40px; }
  html.asn-erp-v527-ui table { min-width:640px; }
}
@media (prefers-reduced-motion:reduce) {
  html.asn-erp-v527-ui *,html.asn-erp-v527-ui *::before,html.asn-erp-v527-ui *::after { scroll-behavior:auto!important; transition:none!important; }
}