@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root{
  --sgs-font:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --sgs-bg:#f3f4f6;
  --sgs-bg-2:#e5e7eb;
  --sgs-surface:#ffffff;
  --sgs-card:#ffffff;
  --sgs-card-soft:#f9fafb;
  --sgs-text:#111827;
  --sgs-text-2:#374151;
  --sgs-muted:#6b7280;
  --sgs-border:#dbe1ea;
  --sgs-border-strong:#cbd5e1;
  --sgs-primary:#2563eb;
  --sgs-primary-strong:#1d4ed8;
  --sgs-primary-soft:#eff6ff;
  --sgs-primary-soft-2:#dbeafe;
  --sgs-success:#16a34a;
  --sgs-warning:#d97706;
  --sgs-danger:#dc2626;
  --sgs-shadow-xs:none;
  --sgs-shadow-sm:0 1px 2px rgba(15,23,42,.04);
  --sgs-shadow:0 4px 12px rgba(15,23,42,.06);
  --sgs-shadow-lg:0 10px 30px rgba(15,23,42,.12);
  --sgs-radius-xs:6px;
  --sgs-radius-sm:8px;
  --sgs-radius:10px;
  --sgs-radius-lg:12px;
  --sgs-ring:0 0 0 .18rem rgba(37,99,235,.12);
  --sgs-ease:cubic-bezier(.2,.8,.2,1);
}

body[data-theme="dark"]{
  --sgs-bg:#0b1220;
  --sgs-bg-2:#0f172a;
  --sgs-surface:#0f172a;
  --sgs-card:#111827;
  --sgs-card-soft:#162033;
  --sgs-text:#f8fafc;
  --sgs-text-2:#e2e8f0;
  --sgs-muted:#cbd5e1;
  --sgs-border:#334155;
  --sgs-border-strong:#475569;
  --sgs-primary:#3b82f6;
  --sgs-primary-strong:#2563eb;
  --sgs-primary-soft:rgba(59,130,246,.10);
  --sgs-primary-soft-2:rgba(59,130,246,.18);
  --sgs-shadow-sm:0 1px 2px rgba(0,0,0,.18);
  --sgs-shadow:0 10px 30px rgba(0,0,0,.26);
  --sgs-shadow-lg:0 18px 48px rgba(0,0,0,.34);
  --sgs-ring:0 0 0 .18rem rgba(96,165,250,.18);
}

html,body{height:100%;}
body{
  font-family:var(--sgs-font);
  background:var(--sgs-bg);
  color:var(--sgs-text);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
*,*::before,*::after{box-sizing:border-box;}
a{color:var(--sgs-primary);text-decoration:none;}
a:hover{color:var(--sgs-primary-strong);}
.text-muted,.text-secondary{color:var(--sgs-muted)!important;}

.sgs-layout{min-height:100vh;display:flex;}
.sgs-main{display:flex;flex-direction:column;min-width:0;flex:1;}
.sgs-content{flex:1;}
.sgs-container{max-width:1440px;padding-inline:24px;}

.card,.sgs-card,.table,.modal-content,.offcanvas,.dropdown-menu,.alert,.form-control,.form-select,.btn,.list-group-item{
  transition:background-color .16s var(--sgs-ease),border-color .16s var(--sgs-ease),box-shadow .16s var(--sgs-ease),color .16s var(--sgs-ease);
}
.card,.sgs-card,.table,.modal-content,.offcanvas{
  background:var(--sgs-card);
  border:1px solid var(--sgs-border)!important;
  border-radius:var(--sgs-radius)!important;
  box-shadow:var(--sgs-shadow-sm)!important;
}
.card-header{background:var(--sgs-card-soft);border-bottom:1px solid var(--sgs-border)!important;}

.table{overflow:hidden;color:var(--sgs-text);}
.table thead th{
  background:var(--sgs-card-soft);
  color:var(--sgs-muted);
  font-size:.74rem;
  text-transform:uppercase;
  letter-spacing:.06em;
  border-bottom:1px solid var(--sgs-border);
}
.table td,.table th{vertical-align:middle;border-color:var(--sgs-border);}
.table-hover tbody tr:hover{background:var(--sgs-primary-soft);}

.form-control,.form-select{
  background:var(--sgs-card);
  color:var(--sgs-text);
  border:1px solid var(--sgs-border);
  border-radius:var(--sgs-radius-sm);
  min-height:42px;
  padding-inline:.85rem;
  box-shadow:none;
}
.form-control:focus,.form-select:focus{
  background:var(--sgs-card);
  color:var(--sgs-text);
  border-color:var(--sgs-primary);
  box-shadow:var(--sgs-ring);
}
.form-control::placeholder{color:var(--sgs-muted);}

.btn{
  border-radius:var(--sgs-radius-sm);
  min-height:40px;
  padding:.55rem .95rem;
  font-weight:600;
  letter-spacing:0;
  box-shadow:none!important;
}
.btn-sm{min-height:34px;padding:.38rem .75rem;}
.btn-primary{background:var(--sgs-primary);border-color:var(--sgs-primary);color:#fff;}
.btn-primary:hover,.btn-primary:focus{background:var(--sgs-primary-strong);border-color:var(--sgs-primary-strong);color:#fff;}
.btn-outline-primary,.btn-light,.btn-outline-dark,.btn-outline-secondary,.btn-soft{
  background:var(--sgs-card);
  color:var(--sgs-text);
  border:1px solid var(--sgs-border);
}
.btn-outline-primary{color:var(--sgs-primary);border-color:#bfdbfe;}
.btn-outline-primary:hover,.btn-light:hover,.btn-outline-dark:hover,.btn-outline-secondary:hover,.btn-soft:hover{
  background:var(--sgs-card-soft);
  color:var(--sgs-text);
  border-color:var(--sgs-border-strong);
}

.alert{border-radius:var(--sgs-radius);border:1px solid var(--sgs-border);background:var(--sgs-card);color:var(--sgs-text);box-shadow:none;}
.badge,.sgs-chip,.sgs-pill{border-radius:999px;}

.sgs-topbar{position:sticky;top:0;z-index:50;background:var(--sgs-surface);border-bottom:1px solid var(--sgs-border);}
.sgs-topbar-inner{max-width:1400px;margin:0 auto;padding:12px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;}
.sgs-topbar-title{font-size:1.45rem;font-weight:800;letter-spacing:-.035em;color:var(--sgs-text);line-height:1.05;}
.sgs-topbar-sub{color:var(--sgs-muted);font-size:.86rem;margin-top:4px;line-height:1.45;}
.sgs-topbar .dropdown-menu{min-width:240px;}

.sgs-brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;}
.sgs-brand-mark{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border-radius:12px;background:#2563eb;color:#fff;font-weight:800;}
.sgs-brand-text{display:flex;flex-direction:column;line-height:1.04;}
.sgs-brand-name{font-size:1rem;font-weight:800;letter-spacing:-.02em;}
.sgs-brand-sub{font-size:.74rem;color:rgba(255,255,255,.6);font-weight:600;}

.sgs-sidebar{width:228px;flex:0 0 228px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;padding:14px 10px 12px;background:#1f2937;border-right:1px solid rgba(255,255,255,.06);color:#e5e7eb;z-index:60;}
.sgs-sidebar-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 6px 12px;}
.sgs-sidebar-header-actions .btn{min-height:34px;}
.sgs-sidebar-company{margin:0 6px 12px;padding:10px 12px;border-radius:10px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.06);}
.sgs-company-name{font-size:.82rem;font-weight:700;color:#fff;}
.sgs-company-plan{font-size:.72rem;color:rgba(255,255,255,.6);margin-top:4px;}
.sgs-nav{flex:1;overflow:auto;padding:2px 2px 8px;scrollbar-width:thin;}
.sgs-nav-section{margin-top:8px;}
.sgs-nav-section + .sgs-nav-section{padding-top:12px;border-top:1px solid rgba(255,255,255,.06);}
.sgs-nav-section-title{padding:0 12px 10px;font-size:.72rem;text-transform:uppercase;letter-spacing:.1em;color:rgba(255,255,255,.45);font-weight:700;}
.sgs-nav-item,.sgs-subnav-item,.sgs-footer-item{display:flex;align-items:center;gap:10px;min-height:40px;margin:3px 4px;padding:8px 12px;border-radius:8px;color:rgba(255,255,255,.86);font-weight:600;border:1px solid transparent;}
.sgs-nav-item svg,.sgs-subnav-item svg,.sgs-footer-item svg{width:17px;height:17px;flex:0 0 auto;color:rgba(255,255,255,.68);}
.sgs-nav-item:hover,.sgs-subnav-item:hover,.sgs-footer-item:hover{color:#fff;background:rgba(255,255,255,.06);}
.sgs-nav-item.active,.sgs-subnav-item.active{color:#fff!important;background:rgba(37,99,235,.18);border-color:rgba(59,130,246,.28);box-shadow:inset 0 0 0 1px rgba(96,165,250,.12);}
.sgs-nav-item.active svg,.sgs-subnav-item.active svg{color:#fff;}
.sgs-nav-item-collapse .sgs-chevron{margin-left:auto;opacity:.74;}
.sgs-subnav{padding:2px 0 6px 10px;}
.sgs-subnav-item{min-height:36px;font-size:.92rem;color:rgba(255,255,255,.74);}
.sgs-sidebar-footer{padding:12px 4px 0;border-top:1px solid rgba(255,255,255,.06);}
.sgs-footer-item.text-danger,.sgs-footer-item.text-danger svg{color:#fca5a5!important;}
.sgs-sidebar-open{position:fixed;inset:16px auto auto 16px;z-index:90;width:44px;height:44px;border-radius:12px;box-shadow:var(--sgs-shadow);}

.sgs-page-title,h1,.h1,h2,.h2,h3,.h3{color:var(--sgs-text);letter-spacing:-.02em;font-weight:700;}
.sgs-page-subtitle,.sgs-subtitle{color:var(--sgs-muted);}
.sgs-section-card{background:var(--sgs-card);border:1px solid var(--sgs-border);border-radius:var(--sgs-radius);box-shadow:var(--sgs-shadow-sm);}
.sgs-context-actions{display:flex;flex-wrap:wrap;gap:.55rem;}

.sgs-kpi,.sgs-actionbar,.sgs-actions{display:flex;align-items:center;gap:.55rem;}
.sgs-kpi .sgs-kpi-icon{width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:var(--sgs-primary-soft);border:1px solid var(--sgs-primary-soft-2);color:var(--sgs-primary);}
.sgs-kpi .sgs-kpi-label{color:var(--sgs-muted);font-size:.78rem;}
.sgs-kpi .sgs-kpi-value{font-size:1.55rem;font-weight:800;letter-spacing:-.03em;color:var(--sgs-text);}

.dropdown-menu{border:1px solid var(--sgs-border);background:var(--sgs-card);box-shadow:var(--sgs-shadow);border-radius:var(--sgs-radius);padding:.5rem;}
.dropdown-item,.dropdown-item-text{border-radius:8px;padding:.58rem .72rem;}
.dropdown-item:hover,.dropdown-item:focus{background:var(--sgs-card-soft);color:var(--sgs-text);}
.toast.sgs-toast{border-radius:var(--sgs-radius);box-shadow:var(--sgs-shadow);}
.sgs-auth-card,.sgs-login-card{background:var(--sgs-card);border:1px solid var(--sgs-border);border-radius:12px;box-shadow:var(--sgs-shadow);}

body.sgs-sidebar-collapsed .sgs-sidebar{width:82px;flex-basis:82px;padding-inline:8px;}
body.sgs-sidebar-collapsed .sgs-brand-text,body.sgs-sidebar-collapsed .sgs-company-name,body.sgs-sidebar-collapsed .sgs-company-plan,body.sgs-sidebar-collapsed .sgs-nav-item span,body.sgs-sidebar-collapsed .sgs-subnav,body.sgs-sidebar-collapsed .sgs-nav-section-title,body.sgs-sidebar-collapsed .sgs-footer-item span,body.sgs-sidebar-collapsed .sgs-toggle-expanded{display:none!important;}
body.sgs-sidebar-collapsed .sgs-toggle-collapsed{display:inline-flex!important;}
body:not(.sgs-sidebar-collapsed) .sgs-toggle-collapsed{display:none!important;}
body.sgs-sidebar-collapsed .sgs-sidebar-company{padding:10px;}
body.sgs-sidebar-collapsed .sgs-nav-item,body.sgs-sidebar-collapsed .sgs-footer-item{justify-content:center;padding-inline:0;}
body.sgs-sidebar-collapsed .sgs-nav-item svg,body.sgs-sidebar-collapsed .sgs-footer-item svg{margin:0;}

@media (max-width:991.98px){.sgs-sidebar{position:fixed;left:0;top:0;bottom:0;transform:translateX(-100%);transition:transform .22s var(--sgs-ease);box-shadow:var(--sgs-shadow-lg);}body.sgs-sidebar-open .sgs-sidebar{transform:translateX(0);}.sgs-topbar-inner,.sgs-container{padding-inline:16px;}}
@media (max-width:767.98px){.sgs-topbar-inner{align-items:flex-start;flex-direction:column;}.sgs-container{padding-inline:12px;}.btn{width:auto;}}


/* === UI 19: normalização visual e correção definitiva dos SVGs === */
.sgs-icon{
  width:18px;
  height:18px;
  min-width:18px;
  min-height:18px;
  display:inline-block;
  vertical-align:-0.125em;
  flex:0 0 auto;
  color:currentColor;
  overflow:visible;
}
.sgs-icon path,
.sgs-icon line,
.sgs-icon polyline,
.sgs-icon rect,
.sgs-icon circle,
.sgs-icon ellipse,
.sgs-icon polygon,
.sgs-icon use{
  vector-effect:non-scaling-stroke;
  stroke:currentColor;
  fill:none;
  stroke-width:1.85;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.btn .sgs-icon,
.dropdown-item .sgs-icon,
.mini-badge .sgs-icon,
.hero-badge .sgs-icon,
.metric-icon .sgs-icon,
.sgs-kpi-icon .sgs-icon{
  width:18px;
  height:18px;
}
.metric-icon .sgs-icon{width:22px;height:22px;}
.sgs-brand-mark,
.sgs-theme-icon{flex:0 0 auto;}
.sgs-theme-toggle{display:inline-flex;align-items:center;gap:.45rem;min-width:132px;justify-content:center;}
.sgs-theme-toggle .sgs-theme-icon{font-size:1rem;line-height:1;}
.sgs-theme-toggle .sgs-theme-label{font-weight:700;white-space:nowrap;}
@media (max-width:767.98px){.sgs-theme-toggle .sgs-theme-label{display:none;}.sgs-theme-toggle{min-width:auto;}}
.sgs-topbar .btn,
.sgs-sidebar .btn,
.sgs-nav-item,
.sgs-subnav-item,
.sgs-footer-item{overflow:hidden;}
.sgs-topbar .btn{white-space:nowrap;}

/* visual mais sóbrio e padrão ERP */
.sgs-topbar{background:#ffffff;}
body[data-theme="dark"] .sgs-topbar{background:#111827;}
.sgs-sidebar{background:#1f2937;}
body[data-theme="dark"] .sgs-sidebar{background:#0f172a;}
.sgs-nav-item.active,.sgs-subnav-item.active{background:#2563eb;border-color:#2563eb;box-shadow:none;}
.sgs-brand-mark{background:#2563eb;border-radius:12px;}
.sgs-sidebar-header .btn,.sgs-topbar .btn{border-radius:8px;}


/* base compacta */
html{font-size:14px;}
body{font-size:14px;line-height:1.45;}
.sgs-container{max-width:1440px;padding-inline:20px;}
.sgs-sidebar{width:232px;flex-basis:232px;padding:12px 8px 10px;background:#172131;}
.sgs-sidebar-header{padding:2px 8px 10px;}
.sgs-nav-item,.sgs-footer-item{min-height:40px;padding:8px 12px;font-size:.95rem;}
.sgs-subnav-item{min-height:34px;padding:7px 12px;font-size:.9rem;}
.sgs-nav-item svg,.sgs-subnav-item svg,.sgs-footer-item svg,.icon,svg{width:18px;height:18px;}
.sgs-topbar-inner{padding:12px 20px;}
.sgs-topbar-title{font-size:1.6rem;font-weight:800;line-height:1.05;}
.sgs-topbar-sub{font-size:.94rem;}
.sgs-page-title{font-size:2rem;line-height:1.08;margin:0;}
.sgs-card-title{font-size:1rem;font-weight:700;color:var(--sgs-text);}
.sgs-card-subtitle,.sgs-option-desc,.sgs-save-hint,.sgs-help-list,.sgs-pref-summary span{font-size:.92rem;}
.form-control,.form-select{min-height:38px;font-size:.94rem;}
.btn{min-height:36px;padding:.48rem .85rem;font-size:.92rem;}
.btn-sm{min-height:32px;padding:.34rem .7rem;}
.card,.sgs-card{border-radius:10px!important;}
.sgs-card-header{padding:14px 16px;border-bottom:1px solid var(--sgs-border);background:var(--sgs-card-soft);}
.sgs-card-body{padding:16px;}
.sgs-current-badge{display:inline-flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--sgs-border);border-radius:10px;background:var(--sgs-card);font-weight:600;}
.sgs-pref-summary{display:grid;gap:10px;}
.sgs-pref-summary>div{display:flex;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--sgs-border);border-radius:8px;background:var(--sgs-card-soft);}
.sgs-help-list{padding-left:1rem;display:grid;gap:8px;}
.sgs-scale-panel{display:grid;gap:14px;}
.sgs-scale-display{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-radius:8px;background:var(--sgs-card-soft);border:1px solid var(--sgs-border);}
.sgs-scale-step{border:1px solid var(--sgs-border);background:var(--sgs-card);color:var(--sgs-text);border-radius:8px;padding:8px 12px;font-weight:600;}
.sgs-scale-step.active{background:var(--sgs-primary-soft);border-color:var(--sgs-primary);color:var(--sgs-primary);}
.sgs-mini-info{height:100%;padding:12px;border:1px solid var(--sgs-border);border-radius:8px;background:var(--sgs-card);}
.sgs-mini-info.active{border-color:var(--sgs-primary);background:var(--sgs-primary-soft);}
.sgs-choice-card{display:block;height:100%;padding:14px;border:1px solid var(--sgs-border);border-radius:10px;background:var(--sgs-card);cursor:pointer;}
.sgs-choice-card.active{border-color:var(--sgs-primary);background:var(--sgs-primary-soft);}
.sgs-switch-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px;border:1px solid var(--sgs-border);border-radius:10px;background:var(--sgs-card-soft);}

/* dashboard mais compacto e com hierarquia melhor */
.dashboard-premium{padding:0!important;border:0!important;background:transparent!important;}
.dashboard-premium .hero-panel{padding:1rem 1.1rem!important;border-radius:12px!important;}
.dashboard-premium .hero-panel h2{font-size:1.7rem!important;line-height:1.08!important;margin-bottom:.3rem!important;}
.dashboard-premium .hero-panel .text-muted{font-size:.95rem!important;max-width:780px;}
.dashboard-premium .hero-badge,.dashboard-premium .mini-badge{min-height:28px!important;padding:.25rem .6rem!important;font-size:.74rem!important;}
.dashboard-premium .widget-panel{padding:.9rem!important;border-radius:10px!important;}
.dashboard-premium .premium-card,.dashboard-premium .widget-panel,.dashboard-premium .chart-shell,.dashboard-premium .empty-box{border-radius:10px!important;}
.dashboard-premium .metric-card{min-height:150px!important;}
.dashboard-premium .premium-card .card-body{padding:.9rem 1rem!important;}
.dashboard-premium .card-header-soft{padding:.9rem 1rem 0!important;}
.dashboard-premium .metric-label{font-size:.72rem!important;}
.dashboard-premium .metric-value{font-size:2rem!important;}
.dashboard-premium .metric-sub,.dashboard-premium .section-subtitle,.dashboard-premium .small,.dashboard-premium small{font-size:.84rem!important;}
.dashboard-premium .metric-icon{width:42px!important;height:42px!important;border-radius:9px!important;}
.dashboard-premium .chart-shell{min-height:300px!important;padding:.9rem!important;}
.dashboard-premium .chart-shell.chart-short{min-height:180px!important;}
.dashboard-premium .alert-stack .alert{padding:.85rem 1rem!important;font-size:.94rem;}
.dashboard-premium .widget-row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.dashboard-premium .widget-shell.widget-full{grid-column:1/-1;}
.dashboard-premium .widget-shell.widget-hidden{display:none!important;}
.dashboard-premium .stats-inline{grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem!important;}
.dashboard-premium .stats-pill{padding:.65rem .75rem!important;}
.dashboard-premium .section-title{font-size:1rem!important;}
.dashboard-premium .premium-table thead th{font-size:.72rem!important;}
.dashboard-premium .widget-check{padding:.8rem .9rem!important;}
.dashboard-premium .widget-check input[type="number"],.dashboard-premium .widget-check select{max-width:110px;font-size:.84rem;min-height:34px;}

@media (max-width:1200px){
  .dashboard-premium .widget-row{grid-template-columns:1fr!important;}
}
@media (max-width:991.98px){
  .sgs-container{padding-inline:14px;}
  .sgs-page-title{font-size:1.65rem;}
  .dashboard-premium .hero-panel h2{font-size:1.45rem!important;}
}


/* módulos internos */
.sgs-module-shell{display:grid;gap:16px;}
.sgs-module-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:4px;}
.sgs-module-title{font-size:1.55rem;font-weight:800;letter-spacing:-.03em;color:var(--sgs-text);margin:0;line-height:1.08;}
.sgs-module-subtitle{margin-top:6px;color:var(--sgs-muted);font-size:.93rem;max-width:760px;}
.sgs-module-actions{display:flex;flex-wrap:wrap;gap:.55rem;}
.sgs-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
.sgs-stat-card{background:var(--sgs-card);border:1px solid var(--sgs-border);border-radius:12px;padding:14px 15px;box-shadow:var(--sgs-shadow-sm);min-height:98px;display:flex;flex-direction:column;justify-content:space-between;}
.sgs-stat-label{font-size:.74rem;text-transform:uppercase;letter-spacing:.08em;color:var(--sgs-muted);font-weight:700;}
.sgs-stat-value{font-size:1.5rem;line-height:1.08;font-weight:800;color:var(--sgs-text);margin-top:4px;}
.sgs-stat-meta{font-size:.86rem;color:var(--sgs-muted);}
.sgs-panel{background:var(--sgs-card);border:1px solid var(--sgs-border);border-radius:12px;box-shadow:var(--sgs-shadow-sm);}
.sgs-panel-head{padding:14px 16px;border-bottom:1px solid var(--sgs-border);display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:var(--sgs-card-soft);border-radius:12px 12px 0 0;}
.sgs-panel-title{font-size:1rem;font-weight:700;color:var(--sgs-text);margin:0;}
.sgs-panel-subtitle{font-size:.86rem;color:var(--sgs-muted);margin-top:2px;}
.sgs-panel-body{padding:16px;}
.sgs-filter-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px;}
.sgs-filter-grid > .col-span-12{grid-column:span 12;}
.sgs-filter-grid > .col-span-6{grid-column:span 6;}
.sgs-filter-grid > .col-span-4{grid-column:span 4;}
.sgs-filter-grid > .col-span-3{grid-column:span 3;}
.sgs-filter-grid > .col-span-2{grid-column:span 2;}
.sgs-filter-grid .form-label{font-size:.8rem;font-weight:700;color:var(--sgs-text-2);margin-bottom:.35rem;}
.sgs-table-wrap{border:1px solid var(--sgs-border);border-radius:10px;overflow:hidden;background:var(--sgs-card);}
.table.sgs-table{margin-bottom:0;}
.table.sgs-table thead th{padding:.78rem .85rem;font-size:.72rem;background:var(--sgs-card-soft);}
.table.sgs-table tbody td{padding:.78rem .85rem;}
.table.sgs-table tfoot th,.table.sgs-table tfoot td{padding:.78rem .85rem;background:var(--sgs-card-soft);}
.sgs-table-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px;}
.sgs-inline-summary{display:flex;flex-wrap:wrap;gap:8px;}
.sgs-inline-pill{display:inline-flex;align-items:center;gap:8px;padding:8px 10px;border-radius:999px;border:1px solid var(--sgs-border);background:var(--sgs-card-soft);font-size:.84rem;font-weight:600;color:var(--sgs-text-2);}
.sgs-feature-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;}
.sgs-feature-card{display:flex;flex-direction:column;gap:12px;height:100%;padding:16px;border:1px solid var(--sgs-border);border-radius:12px;background:var(--sgs-card);box-shadow:var(--sgs-shadow-sm);color:inherit;text-decoration:none;transition:transform .16s var(--sgs-ease), box-shadow .16s var(--sgs-ease), border-color .16s var(--sgs-ease), background-color .16s var(--sgs-ease);}
.sgs-feature-card:hover{transform:translateY(-1px);border-color:var(--sgs-border-strong);box-shadow:var(--sgs-shadow);color:inherit;}
.sgs-feature-icon{width:42px;height:42px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:1.15rem;background:var(--sgs-primary-soft);color:var(--sgs-primary);border:1px solid var(--sgs-primary-soft-2);}
.sgs-feature-title{font-size:1rem;font-weight:700;color:var(--sgs-text);}
.sgs-feature-text{font-size:.88rem;color:var(--sgs-muted);line-height:1.45;}
.sgs-feature-cta{margin-top:auto;font-size:.84rem;font-weight:700;color:var(--sgs-primary);}
.sgs-icon-indigo,.sgs-icon-slate,.sgs-icon-emerald,.sgs-icon-amber,.sgs-icon-purple,.sgs-icon-blue{background:var(--sgs-primary-soft)!important;color:var(--sgs-primary)!important;border-color:var(--sgs-primary-soft-2)!important;}
.sgs-form-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px;}
.sgs-form-grid > .span-12{grid-column:span 12;}
.sgs-form-grid > .span-8{grid-column:span 8;}
.sgs-form-grid > .span-6{grid-column:span 6;}
.sgs-form-grid > .span-4{grid-column:span 4;}
.sgs-form-grid > .span-3{grid-column:span 3;}
.sgs-soft-section{padding:14px;border:1px solid var(--sgs-border);background:var(--sgs-card-soft);border-radius:10px;}
.sgs-soft-section-title{font-size:.92rem;font-weight:700;color:var(--sgs-text);margin:0 0 10px;}
.sgs-form-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;padding-top:4px;}
.sgs-list-actions{display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap;}
.sgs-tabs{display:flex;gap:8px;flex-wrap:wrap;}
.sgs-tabs .btn.active{background:var(--sgs-primary);border-color:var(--sgs-primary);color:#fff;}
.sgs-empty-state{padding:24px;border:1px dashed var(--sgs-border);border-radius:12px;background:var(--sgs-card-soft);color:var(--sgs-muted);text-align:center;}
@media (max-width:1200px){.sgs-stat-grid,.sgs-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:991.98px){.sgs-filter-grid > .col-span-6,.sgs-filter-grid > .col-span-4,.sgs-filter-grid > .col-span-3,.sgs-filter-grid > .col-span-2,.sgs-form-grid > .span-8,.sgs-form-grid > .span-6,.sgs-form-grid > .span-4,.sgs-form-grid > .span-3{grid-column:span 12;}.sgs-stat-grid,.sgs-feature-grid{grid-template-columns:1fr;}.sgs-module-title{font-size:1.35rem;}}


/* componentes globais */
:root{
  --sgs-control-h:38px;
  --sgs-control-h-sm:32px;
  --sgs-radius-control:8px;
}

/* botões */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  min-height:var(--sgs-control-h);
  font-size:.92rem;
  font-weight:600;
  border-radius:var(--sgs-radius-control);
}
.btn-sm{min-height:var(--sgs-control-h-sm);font-size:.84rem;}
.btn-lg{min-height:44px;font-size:.98rem;padding-inline:1rem;}
.btn:focus-visible{outline:0;box-shadow:var(--sgs-ring)!important;}
.btn-primary{box-shadow:0 1px 1px rgba(15,23,42,.04), inset 0 -1px 0 rgba(0,0,0,.05)!important;}
.btn-primary:hover{transform:translateY(-1px);}
.btn-outline-secondary,.btn-outline-dark,.btn-light,.btn-soft{background:var(--sgs-card);}
.btn-danger-soft,.btn-outline-danger-soft{
  background:#fef2f2;
  color:var(--sgs-danger);
  border:1px solid #fecaca;
}
.btn-danger-soft:hover,.btn-outline-danger-soft:hover{background:#fee2e2;color:#b91c1c;border-color:#fca5a5;}
.btn-success-soft{background:#ecfdf5;color:var(--sgs-success);border:1px solid #bbf7d0;}
.btn-success-soft:hover{background:#dcfce7;color:#15803d;border-color:#86efac;}

/* inputs e formulários */
.form-label{font-size:.79rem;font-weight:700;letter-spacing:.02em;color:var(--sgs-text-2);margin-bottom:.38rem;}
.form-control,.form-select,.input-group-text{
  min-height:var(--sgs-control-h);
  border-radius:var(--sgs-radius-control);
}
.input-group-text{background:var(--sgs-card-soft);border-color:var(--sgs-border);color:var(--sgs-muted);}
textarea.form-control{min-height:96px;resize:vertical;}
.form-control-sm,.form-select-sm{min-height:var(--sgs-control-h-sm);font-size:.84rem;}
.form-text{font-size:.8rem;color:var(--sgs-muted);}
.form-check-input{border-color:var(--sgs-border-strong);}
.form-check-input:checked{background-color:var(--sgs-primary);border-color:var(--sgs-primary);}
.form-check-input:focus{box-shadow:var(--sgs-ring);}

/* painéis de formulário */
.sgs-fieldset,
.sgs-form-panel,
.sgs-soft-panel{
  background:var(--sgs-card);
  border:1px solid var(--sgs-border);
  border-radius:12px;
  padding:16px;
}
.sgs-soft-panel{background:var(--sgs-card-soft);}
.sgs-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px;}
.sgs-section-title{font-size:1rem;font-weight:700;color:var(--sgs-text);margin:0;}
.sgs-section-note{font-size:.85rem;color:var(--sgs-muted);margin-top:4px;}

/* tabelas */
.table{margin-bottom:0;}
.table > :not(caption) > * > *{padding:.8rem .9rem;}
.table thead th{font-size:.72rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--sgs-muted);}
.table tbody td{font-size:.92rem;color:var(--sgs-text-2);}
.table tfoot th,.table tfoot td{background:var(--sgs-card-soft);font-weight:700;}
.table-responsive,.sgs-table-scroll{border:1px solid var(--sgs-border);border-radius:10px;background:var(--sgs-card);overflow:hidden;}
.table .actions-cell{white-space:nowrap;width:1%;}
.table .text-money{font-variant-numeric:tabular-nums;white-space:nowrap;}

/* badges */
.badge{
  --bs-badge-padding-x:.62em;
  --bs-badge-padding-y:.42em;
  --bs-badge-font-size:.72em;
  --bs-badge-font-weight:700;
  --bs-badge-border-radius:999px;
  letter-spacing:.02em;
}
.badge.border{border-color:var(--sgs-border)!important;}
.badge.text-bg-light{background:var(--sgs-card-soft)!important;color:var(--sgs-text)!important;}
.badge.text-bg-primary{background:var(--sgs-primary-soft)!important;color:var(--sgs-primary)!important;border:1px solid var(--sgs-primary-soft-2);}
.badge.text-bg-success{background:#ecfdf5!important;color:#15803d!important;border:1px solid #bbf7d0;}
.badge.text-bg-warning{background:#fffbeb!important;color:#b45309!important;border:1px solid #fde68a;}
.badge.text-bg-danger{background:#fef2f2!important;color:#b91c1c!important;border:1px solid #fecaca;}
.badge.text-bg-secondary{background:#f1f5f9!important;color:#475569!important;border:1px solid #cbd5e1;}
body[data-theme="dark"] .badge.text-bg-light{background:#243041!important;color:#f9fafb!important;}
body[data-theme="dark"] .badge.text-bg-secondary{background:#243041!important;color:#cbd5e1!important;border-color:#374151;}

/* modais */
.modal-content{border-radius:14px!important;overflow:hidden;box-shadow:var(--sgs-shadow-lg)!important;}
.modal-header,.modal-footer{padding:14px 16px;background:var(--sgs-card-soft);border-color:var(--sgs-border)!important;}
.modal-body{padding:16px;}
.modal-title{font-size:1rem;font-weight:800;color:var(--sgs-text);}
.btn-close{filter:none;opacity:.65;}
.btn-close:hover{opacity:1;}
body[data-theme="dark"] .btn-close{filter:invert(1) grayscale(1);}

/* dropdowns, listas e estados */
.list-group-item{background:var(--sgs-card);border-color:var(--sgs-border);}
.list-group-item.active{background:var(--sgs-primary);border-color:var(--sgs-primary);}
.dropdown-header{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--sgs-muted);}

/* estados de feedback */
.alert-info{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8;}
.alert-success{background:#ecfdf5;border-color:#bbf7d0;color:#15803d;}
.alert-warning{background:#fffbeb;border-color:#fde68a;color:#b45309;}
.alert-danger{background:#fef2f2;border-color:#fecaca;color:#b91c1c;}
body[data-theme="dark"] .alert-info{background:rgba(59,130,246,.1);border-color:rgba(59,130,246,.24);color:#93c5fd;}
body[data-theme="dark"] .alert-success{background:rgba(34,197,94,.1);border-color:rgba(34,197,94,.22);color:#86efac;}
body[data-theme="dark"] .alert-warning{background:rgba(245,158,11,.1);border-color:rgba(245,158,11,.2);color:#fcd34d;}
body[data-theme="dark"] .alert-danger{background:rgba(239,68,68,.1);border-color:rgba(239,68,68,.24);color:#fca5a5;}

/* utilitários padronizados */
.sgs-stack{display:grid;gap:12px;}
.sgs-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.sgs-toolbar-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.sgs-divider{height:1px;background:var(--sgs-border);margin:2px 0;}
.sgs-muted{color:var(--sgs-muted)!important;}
.sgs-number{font-variant-numeric:tabular-nums;}

@media (max-width:767.98px){
  .table > :not(caption) > * > *{padding:.7rem .75rem;}
  .modal-header,.modal-body,.modal-footer{padding:12px;}
}


/* === Refinamento final de UX operacional === */
:root{
  --sgs-progress-h:3px;
}
.sgs-progress-bar{
  position:fixed;top:0;left:0;height:var(--sgs-progress-h);width:0;z-index:2000;
  background:linear-gradient(90deg,var(--sgs-primary),#60a5fa);
  box-shadow:0 0 0 1px rgba(255,255,255,.08),0 2px 12px rgba(37,99,235,.24);
  opacity:0;transition:width .22s var(--sgs-ease),opacity .18s var(--sgs-ease);
}
body.sgs-busy .sgs-progress-bar{opacity:1;width:72%;}
body.sgs-busy.sgs-busy-done .sgs-progress-bar{width:100%;opacity:0;}
.sgs-form-actions{position:sticky;bottom:0;z-index:15;margin-top:16px;padding:12px 0 0;background:linear-gradient(180deg,rgba(243,244,246,0),var(--sgs-bg) 45%);}
body[data-theme="dark"] .sgs-form-actions{background:linear-gradient(180deg,rgba(17,24,39,0),var(--sgs-bg) 45%);}
.sgs-action-cluster{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;padding:12px;border:1px solid var(--sgs-border);border-radius:12px;background:rgba(255,255,255,.84);backdrop-filter:blur(10px);}
body[data-theme="dark"] .sgs-action-cluster{background:rgba(17,24,39,.84);}
.sgs-empty-state{display:grid;place-items:center;gap:10px;min-height:180px;padding:24px;border:1px dashed var(--sgs-border-strong);border-radius:14px;background:radial-gradient(circle at top right, rgba(37,99,235,.06), transparent 32%),var(--sgs-card-soft);text-align:center;}
.sgs-empty-state::before{content:"";width:52px;height:52px;border-radius:14px;background:var(--sgs-primary-soft);border:1px solid var(--sgs-primary-soft-2);box-shadow:inset 0 1px 0 rgba(255,255,255,.35);}
.sgs-empty-state strong{display:block;color:var(--sgs-text);font-size:1rem;}
.sgs-empty-state p{margin:0;color:var(--sgs-muted);max-width:520px;}
body[data-theme="dark"] .sgs-empty-state{background:radial-gradient(circle at top right, rgba(59,130,246,.09), transparent 32%), var(--sgs-card-soft);}
.table tbody tr{transition:background-color .14s var(--sgs-ease),transform .14s var(--sgs-ease);}
.table-hover tbody tr:hover{background:var(--sgs-primary-soft);}
.table tbody tr:focus-within{outline:2px solid rgba(37,99,235,.18);outline-offset:-2px;}
.table .actions-cell .btn,.sgs-list-actions .btn{min-width:34px;}
.sgs-panel-head.sticky,.sgs-sticky-filters{position:sticky;top:72px;z-index:12;backdrop-filter:blur(8px);}
.sgs-search-wrap{position:relative;}
.sgs-search-wrap .sgs-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--sgs-muted);}
.sgs-search-wrap .form-control{padding-left:2.4rem;}
.sgs-skeleton,.sgs-skeleton-line,.sgs-skeleton-block{position:relative;overflow:hidden;background:linear-gradient(90deg, rgba(148,163,184,.14), rgba(148,163,184,.24), rgba(148,163,184,.14));background-size:200% 100%;animation:sgs-shimmer 1.3s linear infinite;border-radius:10px;}
.sgs-skeleton-line{height:12px;}
.sgs-skeleton-block{min-height:84px;}
@keyframes sgs-shimmer{0%{background-position:200% 0;}100%{background-position:-200% 0;}}
.sgs-dirty-dot{width:8px;height:8px;border-radius:999px;background:var(--sgs-warning);display:inline-block;box-shadow:0 0 0 4px rgba(217,119,6,.12);}
.sgs-unsaved-bar{position:fixed;right:16px;bottom:16px;z-index:1200;display:none;align-items:center;gap:10px;padding:12px 14px;border:1px solid var(--sgs-border);border-radius:12px;background:rgba(255,255,255,.94);box-shadow:var(--sgs-shadow);color:var(--sgs-text);}
body[data-theme="dark"] .sgs-unsaved-bar{background:rgba(17,24,39,.94);}
body.sgs-has-unsaved .sgs-unsaved-bar{display:flex;}
.sgs-shortcut-hint{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid var(--sgs-border);border-radius:999px;background:var(--sgs-card-soft);color:var(--sgs-muted);font-size:.74rem;font-weight:700;}
.kbd,kbd{padding:.18rem .38rem;border-radius:6px;border:1px solid var(--sgs-border);background:var(--sgs-card);color:var(--sgs-text);font-size:.76rem;box-shadow:inset 0 -1px 0 rgba(15,23,42,.06);}
.btn,.sgs-feature-card,.sgs-nav-item,.sgs-subnav-item,.sgs-footer-item{transition:transform .16s var(--sgs-ease), background-color .16s var(--sgs-ease), border-color .16s var(--sgs-ease), color .16s var(--sgs-ease), box-shadow .16s var(--sgs-ease);}
.btn:hover{transform:translateY(-1px);}
:focus-visible{outline:0;box-shadow:var(--sgs-ring)!important;}
[aria-busy="true"]{cursor:progress;}
@media (max-width:991.98px){.sgs-form-actions{position:static;background:transparent;padding-top:8px;}.sgs-action-cluster{padding:10px;}.sgs-sticky-filters,.sgs-panel-head.sticky{position:static;backdrop-filter:none;}}
@media (max-width:767.98px){.sgs-unsaved-bar{left:12px;right:12px;bottom:12px;justify-content:space-between;}}


/* responsividade e legibilidade */
.dashboard-premium .widget-board{
  display:grid;
  gap:14px;
}
.dashboard-premium .widget-row{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr))!important;
  gap:14px!important;
  align-items:stretch;
}
.dashboard-premium .widget-shell{min-width:0;}
.dashboard-premium .widget-shell.widget-full{grid-column:1/-1;}
.dashboard-premium .premium-card,
.dashboard-premium .metric-card,
.dashboard-premium .executive-card,
.dashboard-premium .analytics-card,
.dashboard-premium .mini-kpi{
  min-width:0;
}
.dashboard-premium .premium-card .card-body,
.dashboard-premium .executive-card,
.dashboard-premium .analytics-card,
.dashboard-premium .mini-kpi{
  padding:1rem 1.05rem!important;
}
.dashboard-premium .metric-card{min-height:168px!important;}
.dashboard-premium .metric-value{
  font-size:clamp(1.55rem, 2.2vw, 2.15rem)!important;
  line-height:1.05!important;
  word-break:break-word;
}
.dashboard-premium .metric-sub,
.dashboard-premium .analytics-meta,
.dashboard-premium .section-subtitle{
  overflow-wrap:anywhere;
}
.dashboard-premium .mini-kpi-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.dashboard-premium .mini-kpi .value{
  font-size:1.65rem;
  line-height:1.05;
  color:var(--sgs-text);
}
.dashboard-premium .analytics-strip{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:14px;
}
.dashboard-premium .executive-panel{
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(280px,1fr);
  gap:16px;
}
@media (max-width: 1200px){
  .dashboard-premium .executive-panel{grid-template-columns:1fr;}
}
@media (max-width: 768px){
  .dashboard-premium .widget-row,
  .dashboard-premium .analytics-strip,
  .dashboard-premium .mini-kpi-grid,
  .dashboard-premium .stats-inline{grid-template-columns:1fr!important;}
}

.table.sgs-table,
.table.sgs-table tbody td,
.table.sgs-table tbody th{
  color:var(--sgs-text)!important;
}
.table.sgs-table thead th{
  color:var(--sgs-text-2)!important;
  background:var(--sgs-card-soft)!important;
  border-bottom:1px solid var(--sgs-border-strong)!important;
}
.table.sgs-table tbody tr + tr td{border-top:1px solid var(--sgs-border);}
.sgs-table .text-secondary,
.sgs-table .text-muted{color:var(--sgs-muted)!important;}
.sgs-table .is-data,
.sgs-table td strong,
.sgs-table td.fw-semibold{color:var(--sgs-text)!important;}
.sgs-nowrap{white-space:nowrap;}

.sgs-list-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  flex-wrap:nowrap;
}
.sgs-list-actions form{margin:0;}
.sgs-action-icon{
  width:32px;
  min-width:32px;
  height:32px;
  padding:0;
  border-radius:8px;
}
.sgs-action-icon .sgs-icon{width:15px;height:15px;}
.sgs-action-icon.btn-outline-danger{border-color:#fecaca;color:#b91c1c;background:#fff;}
.sgs-action-icon.btn-outline-danger:hover{background:#fef2f2;color:#991b1b;border-color:#fca5a5;}
@media (max-width: 991.98px){
  .sgs-list-actions{flex-wrap:wrap;}
}


/* dashboard */
.dashboard-premium .widget-board{
  display:flex !important;
  flex-direction:column;
  gap:16px;
}
.dashboard-premium .widget-row{
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr)) !important;
  gap:16px !important;
  width:100%;
  grid-column:1 / -1;
  align-items:stretch;
}
.dashboard-premium .widget-shell{
  min-width:0;
  width:100%;
  display:block;
}
.dashboard-premium .widget-shell.widget-full{
  grid-column:1 / -1 !important;
}
.dashboard-premium .widget-shell > .premium-card,
.dashboard-premium .widget-shell > .widget-panel,
.dashboard-premium .widget-shell > .chart-shell,
.dashboard-premium .widget-shell > .empty-box{
  height:100%;
}
.dashboard-premium .premium-card .card-body{
  height:100%;
}
.dashboard-premium .metric-card{
  min-height:176px !important;
}
.dashboard-premium .metric-card .d-flex,
.dashboard-premium .premium-card .d-flex,
.dashboard-premium .executive-card .d-flex{
  min-width:0;
}
.dashboard-premium .metric-sub,
.dashboard-premium .analytics-meta,
.dashboard-premium .context-meta,
.dashboard-premium .section-subtitle,
.dashboard-premium .list-line,
.dashboard-premium .small,
.dashboard-premium small,
.dashboard-premium .text-muted{
  overflow-wrap:anywhere;
  word-break:break-word;
}
.dashboard-premium .soft-divider{
  margin-top:12px;
}
.dashboard-premium .analytics-strip{
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr)) !important;
}
.dashboard-premium .executive-panel{
  grid-template-columns:minmax(0,1.7fr) minmax(320px,1fr) !important;
  align-items:start;
}
.dashboard-premium .mini-kpi-grid{
  grid-template-columns:repeat(2,minmax(140px,1fr)) !important;
}
.dashboard-premium .list-line{
  align-items:flex-start;
}
.dashboard-premium .list-line > *:last-child{
  text-align:right;
  flex-shrink:0;
}
@media (max-width: 1280px){
  .dashboard-premium .executive-panel{
    grid-template-columns:1fr !important;
  }
}
@media (max-width: 992px){
  .dashboard-premium .widget-row,
  .dashboard-premium .analytics-strip{
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr)) !important;
  }
}
@media (max-width: 768px){
  .dashboard-premium .widget-row,
  .dashboard-premium .analytics-strip,
  .dashboard-premium .mini-kpi-grid,
  .dashboard-premium .stats-inline{
    grid-template-columns:1fr !important;
  }
}


/* === VERSÃO 30.1 · Nitidez e consistência do dashboard === */
body[data-theme="dark"] .sgs-topbar{background:#0f172a;border-bottom-color:#223047;}
body[data-theme="dark"] .sgs-sidebar{background:#0b1220;}
body[data-theme="dark"] .sgs-nav-item,
body[data-theme="dark"] .sgs-subnav-item,
body[data-theme="dark"] .sgs-footer-item{color:#dbe4f0;}
body[data-theme="dark"] .sgs-nav-item.active,
body[data-theme="dark"] .sgs-subnav-item.active{background:#2563eb;border-color:#2563eb;color:#fff;}
body[data-theme="dark"] .sgs-nav-item:hover,
body[data-theme="dark"] .sgs-subnav-item:hover,
body[data-theme="dark"] .sgs-footer-item:hover{background:#142033;color:#fff;}

.dashboard-premium{
  --dash-font-xs:.74rem;
  --dash-font-sm:.86rem;
  --dash-font-md:.94rem;
  --dash-font-lg:1.02rem;
  --dash-font-xl:1.28rem;
}
.dashboard-premium .hero-panel,
.dashboard-premium .context-strip,
.dashboard-premium .analytics-card,
.dashboard-premium .executive-card,
.dashboard-premium .premium-card,
.dashboard-premium .widget-panel,
.dashboard-premium .stats-pill,
.dashboard-premium .mini-kpi{border-color:var(--sgs-border-strong)!important;}
.dashboard-premium .hero-panel h2{font-size:1.65rem!important;line-height:1.15!important;}
.dashboard-premium .hero-summary,
.dashboard-premium .context-meta,
.dashboard-premium .analytics-meta,
.dashboard-premium .metric-sub,
.dashboard-premium .section-subtitle,
.dashboard-premium .widget-label-sub{color:var(--sgs-muted)!important;}
.dashboard-premium .analytics-label,
.dashboard-premium .metric-label,
.dashboard-premium .context-eyebrow,
.dashboard-premium .stats-pill .label{font-size:.72rem!important;color:var(--sgs-muted)!important;}
.dashboard-premium .analytics-value,
.dashboard-premium .metric-value{font-size:1.22rem!important;line-height:1.12!important;letter-spacing:-.02em!important;}
.dashboard-premium .mini-kpi .value{font-size:1.08rem!important;line-height:1.15!important;}
.dashboard-premium .stats-pill .value{font-size:1rem!important;line-height:1.12!important;}
.dashboard-premium .context-title{font-size:1rem!important;}
.dashboard-premium .premium-card .card-body{padding:1rem 1.05rem!important;}
.dashboard-premium .metric-card{min-height:148px!important;}
.dashboard-premium .analytics-card{min-height:110px!important;}
.dashboard-premium .metric-card::before{height:2px!important;opacity:.9;}
.dashboard-premium .analytics-chip,
.dashboard-premium .hero-badge,
.dashboard-premium .mini-badge{background:var(--sgs-card-soft)!important;color:var(--sgs-text)!important;border-color:var(--sgs-border)!important;}
.dashboard-premium .metric-icon,
.dashboard-premium .widget-handle{background:var(--sgs-card-soft)!important;border-color:var(--sgs-border)!important;color:var(--sgs-primary)!important;}
.dashboard-premium .chart-shell canvas{filter:none;}
.dashboard-premium .widget-panel.is-open{display:block!important;}
.dashboard-premium .widget-panel.is-closed{display:none!important;}

@media (max-width: 991.98px){
  .dashboard-premium .hero-panel h2{font-size:1.45rem!important;}
  .dashboard-premium .analytics-value,
  .dashboard-premium .metric-value{font-size:1.14rem!important;}
}


/* === V30.2 · Contraste real no dark mode + dashboard legível === */
body[data-theme="dark"] .sgs-panel,
body[data-theme="dark"] .sgs-panel-head,
body[data-theme="dark"] .sgs-panel-body,
body[data-theme="dark"] .sgs-table-wrap,
body[data-theme="dark"] .table-responsive{
  background:#0f172a !important;
  border-color:#223047 !important;
}
body[data-theme="dark"] .table.sgs-table,
body[data-theme="dark"] .table.sgs-table tbody tr,
body[data-theme="dark"] .table.sgs-table tbody td,
body[data-theme="dark"] .table.sgs-table tbody th{
  background:#0f172a !important;
  color:#e5edf6 !important;
}
body[data-theme="dark"] .table.sgs-table tbody tr:nth-child(even) td{
  background:#111d31 !important;
}
body[data-theme="dark"] .table.sgs-table thead th{
  background:#162338 !important;
  color:#cbd5e1 !important;
  border-bottom-color:#26364d !important;
}
body[data-theme="dark"] .table.sgs-table tbody tr:hover td{
  background:#17263d !important;
}
body[data-theme="dark"] .table.sgs-table .text-secondary,
body[data-theme="dark"] .table.sgs-table .text-muted,
body[data-theme="dark"] .sgs-module-subtitle,
body[data-theme="dark"] .sgs-panel-subtitle{
  color:#a9b8cb !important;
}
body[data-theme="dark"] .sgs-action-icon.btn-outline-primary,
body[data-theme="dark"] .sgs-action-icon.btn-outline-secondary,
body[data-theme="dark"] .sgs-action-icon.btn-outline-dark,
body[data-theme="dark"] .btn.btn-outline-secondary,
body[data-theme="dark"] .btn.btn-outline-dark{
  color:#e5edf6 !important;
  border-color:#31445f !important;
  background:#132033 !important;
}
body[data-theme="dark"] .sgs-action-icon.btn-outline-primary:hover,
body[data-theme="dark"] .sgs-action-icon.btn-outline-secondary:hover,
body[data-theme="dark"] .sgs-action-icon.btn-outline-dark:hover,
body[data-theme="dark"] .btn.btn-outline-secondary:hover,
body[data-theme="dark"] .btn.btn-outline-dark:hover{
  background:#1a2b43 !important;
  border-color:#45638b !important;
  color:#ffffff !important;
}
body[data-theme="dark"] .dashboard-premium{
  --dash-font-xs:.74rem;
  --dash-font-sm:.82rem;
  --dash-font-md:.92rem;
  --dash-font-lg:1.02rem;
  --dash-font-xl:1.18rem;
}
body[data-theme="dark"] .dashboard-premium .hero-panel h2{
  font-size:1.72rem !important;
}
body[data-theme="dark"] .dashboard-premium .metric-value,
body[data-theme="dark"] .dashboard-premium .analytics-value{
  font-size:1.1rem !important;
  line-height:1.15 !important;
  letter-spacing:-.02em !important;
}
body[data-theme="dark"] .dashboard-premium .mini-kpi .value{
  font-size:1rem !important;
}
body[data-theme="dark"] .dashboard-premium .analytics-card,
body[data-theme="dark"] .dashboard-premium .executive-card,
body[data-theme="dark"] .dashboard-premium .premium-card,
body[data-theme="dark"] .dashboard-premium .widget-panel,
body[data-theme="dark"] .dashboard-premium .chart-shell{
  background:#0f172a !important;
  border-color:#223047 !important;
}
body[data-theme="dark"] .dashboard-premium .analytics-meta,
body[data-theme="dark"] .dashboard-premium .metric-sub,
body[data-theme="dark"] .dashboard-premium .section-subtitle,
body[data-theme="dark"] .dashboard-premium .context-meta,
body[data-theme="dark"] .dashboard-premium .hero-summary{
  color:#a9b8cb !important;
}
body[data-theme="dark"] .dashboard-premium .analytics-chip,
body[data-theme="dark"] .dashboard-premium .mini-badge,
body[data-theme="dark"] .dashboard-premium .hero-badge{
  background:#162338 !important;
  border-color:#26364d !important;
}
body[data-theme="dark"] #dashboardWidgetConfig[hidden]{display:none !important;}
body[data-theme="dark"] #dashboardWidgetConfig.is-open{display:block !important;}


/* === V30.3 · Personalizar painel + contraste dark global === */
.dashboard-config-panel{display:none;}
.dashboard-config-panel.is-open{display:block !important;}
.dashboard-config-panel.is-closed{display:none !important;}
#dashboardWidgetConfig[hidden]{display:none !important;}
#dashboardWidgetConfig.is-open[hidden]{display:block !important;}

body[data-theme="dark"] .card,
body[data-theme="dark"] .card-header,
body[data-theme="dark"] .card-body,
body[data-theme="dark"] .table-responsive,
body[data-theme="dark"] .alert,
body[data-theme="dark"] .progress,
body[data-theme="dark"] .progress-bar,
body[data-theme="dark"] .list-group-item,
body[data-theme="dark"] .modal-content{
  border-color:#24344a !important;
}
body[data-theme="dark"] .card,
body[data-theme="dark"] .card-body,
body[data-theme="dark"] .table-responsive,
body[data-theme="dark"] .list-group-item,
body[data-theme="dark"] .modal-content{
  background:#0f172a !important;
  color:#e5edf6 !important;
}
body[data-theme="dark"] .card-header{
  background:#142033 !important;
  color:#e5edf6 !important;
}
body[data-theme="dark"] .table:not(.sgs-table),
body[data-theme="dark"] .table:not(.sgs-table) thead th,
body[data-theme="dark"] .table:not(.sgs-table) tbody td,
body[data-theme="dark"] .table:not(.sgs-table) tbody th,
body[data-theme="dark"] .table:not(.sgs-table) tfoot td,
body[data-theme="dark"] .table:not(.sgs-table) tfoot th{
  color:#e5edf6 !important;
  border-color:#24344a !important;
}
body[data-theme="dark"] .table:not(.sgs-table) thead th{
  background:#162338 !important;
  color:#cbd5e1 !important;
}
body[data-theme="dark"] .table:not(.sgs-table) tbody td,
body[data-theme="dark"] .table:not(.sgs-table) tbody th{
  background:#0f172a !important;
}
body[data-theme="dark"] .table:not(.sgs-table) tbody tr:nth-child(even) td,
body[data-theme="dark"] .table:not(.sgs-table) tbody tr:nth-child(even) th{
  background:#111d31 !important;
}
body[data-theme="dark"] .table:not(.sgs-table) tbody tr:hover td,
body[data-theme="dark"] .table:not(.sgs-table) tbody tr:hover th{
  background:#17263d !important;
}
body[data-theme="dark"] .text-muted,
body[data-theme="dark"] .text-secondary,
body[data-theme="dark"] .small.text-muted,
body[data-theme="dark"] .card .text-muted,
body[data-theme="dark"] .alert .text-muted{
  color:#a9b8cb !important;
}
body[data-theme="dark"] .fw-semibold,
body[data-theme="dark"] .fw-bold,
body[data-theme="dark"] strong,
body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] h4,
body[data-theme="dark"] h5,
body[data-theme="dark"] h6{
  color:#f8fbff !important;
}
body[data-theme="dark"] .progress{background:#162338 !important;}
body[data-theme="dark"] .progress-bar{background:#2563eb !important;}
body[data-theme="dark"] .alert-info{background:rgba(37,99,235,.12) !important;color:#cfe0ff !important;border-color:#2f4d7c !important;}
body[data-theme="dark"] .alert-warning{background:rgba(245,158,11,.12) !important;color:#fde68a !important;border-color:#6b4b16 !important;}
body[data-theme="dark"] .alert-success{background:rgba(34,197,94,.12) !important;color:#bbf7d0 !important;border-color:#1f5d39 !important;}
body[data-theme="dark"] .dashboard-premium .metric-value,
body[data-theme="dark"] .dashboard-premium .analytics-value{font-size:clamp(1.55rem, 2.2vw, 2rem) !important;}
body[data-theme="dark"] .dashboard-premium .section-title,
body[data-theme="dark"] .dashboard-premium .context-title{color:#f8fbff !important;}
body[data-theme="dark"] .dashboard-premium .premium-card .text-muted,
body[data-theme="dark"] .dashboard-premium .premium-card .small,
body[data-theme="dark"] .dashboard-premium .premium-card .section-subtitle{color:#9fb0c7 !important;}


/* === V30.5 · Contraste, escala e CTA do dashboard === */
.hero-actions .btn-primary,
.hero-actions .btn-primary:hover,
.hero-actions .btn-primary:focus{
  color:#ffffff !important;
}
.hero-actions .btn{
  min-width:auto !important;
  white-space:nowrap;
}
.dashboard-premium .analytics-value,
.dashboard-premium .metric-value{
  font-size:clamp(1.18rem, 1.5vw, 1.55rem) !important;
  line-height:1.08 !important;
}
.dashboard-premium .mini-kpi .value{
  font-size:clamp(.98rem, 1.2vw, 1.18rem) !important;
  line-height:1.12 !important;
}
.dashboard-premium .stats-pill .value{
  font-size:clamp(.92rem, 1.1vw, 1.08rem) !important;
}
.dashboard-premium .hero-summary,
.dashboard-premium .analytics-meta,
.dashboard-premium .metric-sub,
.dashboard-premium .section-subtitle,
.dashboard-premium .context-meta{
  color:var(--sgs-text-2) !important;
}
body[data-theme="dark"] .dashboard-premium .hero-summary,
body[data-theme="dark"] .dashboard-premium .analytics-meta,
body[data-theme="dark"] .dashboard-premium .metric-sub,
body[data-theme="dark"] .dashboard-premium .section-subtitle,
body[data-theme="dark"] .dashboard-premium .context-meta{
  color:#b6c2d1 !important;
}
body[data-theme="dark"] .dashboard-premium .analytics-value,
body[data-theme="dark"] .dashboard-premium .metric-value{
  font-size:clamp(1.18rem, 1.45vw, 1.5rem) !important;
}
body[data-theme="dark"] .dashboard-premium .mini-kpi .value{
  font-size:clamp(.98rem, 1.1vw, 1.12rem) !important;
}
body[data-theme="dark"] .bg-white,
body[data-theme="dark"] .bg-light,
body[data-theme="dark"] .border,
body[data-theme="dark"] .rounded,
body[data-theme="dark"] .shadow-sm,
body[data-theme="dark"] .p-4.bg-white{
  background:var(--sgs-card) !important;
  color:var(--sgs-text) !important;
  border-color:var(--sgs-border) !important;
}
body[data-theme="dark"] .p-4.bg-white .table,
body[data-theme="dark"] .p-4.bg-white .table thead th,
body[data-theme="dark"] .p-4.bg-white .table tbody td{
  color:var(--sgs-text) !important;
}
body[data-theme="dark"] .p-4.bg-white hr{
  border-color:var(--sgs-border) !important;
}


/* v32 compact dashboard + theme toggle */
.sgs-theme-toggle{min-width:96px;padding-inline:.75rem!important;}
.sgs-theme-toggle .sgs-theme-label{display:inline!important;font-size:.85rem;font-weight:700;}
.sgs-theme-toggle .sgs-theme-icon{font-size:.95rem;}
body[data-theme="dark"] .sgs-theme-toggle{background:#111827!important;border-color:#314155!important;color:#f8fafc!important;}
body:not([data-theme="dark"]) .sgs-theme-toggle{background:#fff!important;border-color:#cbd5e1!important;color:#0f172a!important;}
@media (max-width:767.98px){.sgs-theme-toggle{min-width:74px;}.sgs-theme-toggle .sgs-theme-label{display:inline!important;font-size:.78rem;}}

.dashboard-premium .hero-panel{padding:.8rem .9rem!important;}
.dashboard-premium .hero-panel h2{font-size:1.05rem!important;line-height:1.15!important;}
.dashboard-premium .hero-summary{font-size:.77rem!important;line-height:1.35!important;max-width:680px;}
.dashboard-premium .context-strip{padding:.65rem .8rem!important;margin:.65rem 0 .75rem!important;}
.dashboard-premium .context-title{font-size:.92rem!important;}
.dashboard-premium .context-meta{font-size:.8rem!important;}
.dashboard-premium .analytics-strip{gap:.75rem!important;margin-bottom:.8rem!important;}
.dashboard-premium .analytics-card{padding:.68rem .78rem!important;min-height:82px!important;}
.dashboard-premium .analytics-label{font-size:.68rem!important;}
.dashboard-premium .analytics-value,.dashboard-premium .metric-value{font-size:1rem!important;line-height:1.05!important;}
.dashboard-premium .analytics-meta,.dashboard-premium .metric-sub,.dashboard-premium .section-subtitle{font-size:.76rem!important;line-height:1.35!important;}
.dashboard-premium .analytics-trend{padding-top:.42rem!important;margin-top:.42rem!important;}
.dashboard-premium .analytics-chip{font-size:.7rem!important;padding:.22rem .48rem!important;}
.dashboard-premium .executive-card{padding:.72rem .82rem!important;}
.dashboard-premium .executive-item{padding:.56rem .64rem!important;}
.dashboard-premium .section-title{font-size:.9rem!important;}
.dashboard-premium .widget-shell,.dashboard-premium .analytics-card,.dashboard-premium .executive-card,.dashboard-premium .premium-card{min-width:0;}
body[data-theme="dark"] .dashboard-premium .hero-panel,
body[data-theme="dark"] .dashboard-premium .executive-card,
body[data-theme="dark"] .dashboard-premium .analytics-card,
body[data-theme="dark"] .dashboard-premium .context-strip{background:#0f172a!important;border-color:#243041!important;}
body[data-theme="dark"] .dashboard-premium .analytics-meta,
body[data-theme="dark"] .dashboard-premium .context-meta,
body[data-theme="dark"] .dashboard-premium .section-subtitle,
body[data-theme="dark"] .dashboard-premium .hero-summary{color:#94a3b8!important;}
body[data-theme="dark"] .dashboard-premium .analytics-value,
body[data-theme="dark"] .dashboard-premium .context-title,
body[data-theme="dark"] .dashboard-premium .section-title,
body[data-theme="dark"] .dashboard-premium .metric-value{color:#f8fafc!important;}
body[data-theme="dark"] .dashboard-premium .mini-badge,
body[data-theme="dark"] .dashboard-premium .hero-badge,
body[data-theme="dark"] .dashboard-premium .analytics-chip{background:#111827!important;border-color:#314155!important;color:#e5edf7!important;}
body[data-theme="dark"] .dashboard-premium .btn-outline-dark{background:#111827!important;border-color:#314155!important;color:#f8fafc!important;}
body[data-theme="dark"] .dashboard-premium .btn-outline-dark:hover{background:#182235!important;border-color:#3b82f6!important;}
body[data-theme="dark"] .dashboard-premium .btn-primary{color:#fff!important;}
body[data-theme="dark"] .sgs-panel,body[data-theme="dark"] .sgs-table-wrap,body[data-theme="dark"] .table-responsive{background:#111827!important;border-color:#243041!important;}
body[data-theme="dark"] .table.sgs-table thead th{background:#0f172a!important;color:#cbd5e1!important;border-bottom-color:#243041!important;}
body[data-theme="dark"] .table.sgs-table tbody td{color:#f8fafc!important;background:#111827!important;border-color:#243041!important;}


/* === Edição atual PARTE 3 · formulários premium operacionais === */
.edgsop-op-page .sgs-module-title{font-size:clamp(1.65rem,2.5vw,2.2rem)!important;letter-spacing:-.03em;}
.edgsop-op-page .sgs-module-subtitle{font-size:1rem!important;max-width:900px;color:var(--sgs-text-2)!important;}
.edgsop-premium-form-panel{border-radius:28px!important;overflow:visible!important;box-shadow:0 24px 70px rgba(15,23,42,.08)!important;}
.edgsop-premium-form{display:block;}
.edgsop-op-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px;align-items:start;}
.edgsop-op-main{min-width:0;}
.edgsop-op-sidebar{position:sticky;top:92px;display:flex;flex-direction:column;gap:18px;}
.edgsop-hero-band{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;padding:22px 24px;border:1px solid rgba(148,163,184,.24);border-radius:22px;background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(241,245,249,.96));box-shadow:0 18px 50px rgba(15,23,42,.05);}
.edgsop-kicker,.edgsop-side-kicker{text-transform:uppercase;letter-spacing:.16em;font-size:.72rem;font-weight:800;color:#2563eb;display:block;margin-bottom:6px;}
.edgsop-hero-copy h2{font-size:1.4rem;letter-spacing:-.03em;margin:0 0 8px;}
.edgsop-hero-copy p{margin:0;color:var(--sgs-text-2);max-width:760px;line-height:1.55;}
.edgsop-hero-metrics{display:flex;gap:12px;flex-wrap:wrap;}
.edgsop-hero-chip{min-width:132px;padding:14px 16px;border-radius:18px;background:rgba(15,23,42,.04);border:1px solid rgba(148,163,184,.2);}
.edgsop-hero-chip span{display:block;font-size:.74rem;text-transform:uppercase;letter-spacing:.1em;color:var(--sgs-text-2);margin-bottom:6px;}
.edgsop-hero-chip strong{font-size:1rem;color:var(--sgs-text);}
.edgsop-premium-form .form-label{font-size:.88rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em;margin-bottom:.55rem;color:var(--sgs-text);}
.edgsop-premium-form .form-control,.edgsop-premium-form .form-select,.edgsop-premium-form .input-group-text{min-height:54px;border-radius:16px!important;font-size:1rem!important;padding:.85rem 1rem!important;border-color:rgba(148,163,184,.32)!important;box-shadow:none!important;}
.edgsop-premium-form .form-text{font-size:.82rem;line-height:1.45;margin-top:.5rem;color:var(--sgs-text-2)!important;}
.edgsop-premium-form .btn{min-height:48px;border-radius:14px;font-weight:700;}
.edgsop-premium-form .btn-sm{min-height:40px;border-radius:12px;}
.edgsop-section-divider{height:1px;background:linear-gradient(90deg,transparent,rgba(148,163,184,.45),transparent);margin:28px 0;}
.edgsop-items-header h5{font-size:1.1rem;font-weight:800;}
.edgsop-items-wrap{border:1px solid rgba(148,163,184,.22);border-radius:22px;padding:6px 6px 0;background:linear-gradient(180deg,rgba(248,250,252,.95),rgba(255,255,255,.98));overflow:auto;}
.edgsop-op-page .op-items-table{margin-bottom:0;}
.edgsop-op-page .op-items-table thead th{font-size:.76rem;text-transform:uppercase;letter-spacing:.09em;color:var(--sgs-text-2);padding:.95rem .9rem;border-bottom:1px solid rgba(148,163,184,.2);background:rgba(248,250,252,.88);}
.edgsop-op-page .op-items-table tbody td,.edgsop-op-page .op-items-table tfoot th,.edgsop-op-page .op-items-table tfoot td{padding:.8rem .75rem;vertical-align:middle;}
.edgsop-op-page .op-items-table tbody tr{border-bottom:1px solid rgba(148,163,184,.12);}
.edgsop-op-page .op-items-table tfoot th,.edgsop-op-page .op-items-table tfoot td{font-size:1rem;font-weight:800;background:rgba(241,245,249,.78);}
.edgsop-form-actions{margin-top:22px!important;gap:12px;}
.edgsop-side-card{background:linear-gradient(180deg,#0f172a,#162033);color:#f8fafc;border-radius:24px;padding:22px;border:1px solid rgba(37,99,235,.26);box-shadow:0 22px 60px rgba(15,23,42,.24);}
.edgsop-side-card h3{font-size:1.18rem;margin:0 0 10px;letter-spacing:-.03em;}
.edgsop-side-total{font-size:2rem;font-weight:800;letter-spacing:-.04em;margin-bottom:8px;}
.edgsop-side-sub{color:#b8c4d6;font-size:.88rem;line-height:1.45;margin-bottom:18px;}
.edgsop-side-metrics{display:grid;gap:10px;}
.edgsop-side-metric{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:12px 14px;border-radius:16px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);}
.edgsop-side-metric span{font-size:.76rem;text-transform:uppercase;letter-spacing:.08em;color:#94a3b8;}
.edgsop-side-metric strong{font-size:.95rem;max-width:170px;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.edgsop-side-card-soft{background:linear-gradient(180deg,#ffffff,#f8fafc);color:var(--sgs-text);border:1px solid rgba(148,163,184,.22);box-shadow:0 16px 44px rgba(15,23,42,.08);}
.edgsop-side-card-soft .edgsop-side-kicker{color:#0f766e;}
.edgsop-checklist{padding-left:1.05rem;margin:0;display:grid;gap:10px;color:var(--sgs-text-2);}
.edgsop-checklist li{line-height:1.45;}
body[data-theme="dark"] .edgsop-premium-form-panel{box-shadow:none!important;}
body[data-theme="dark"] .edgsop-hero-band,body[data-theme="dark"] .edgsop-items-wrap,body[data-theme="dark"] .edgsop-side-card-soft{background:linear-gradient(180deg,#0f172a,#111827)!important;border-color:#243041!important;color:#e5edf7!important;}
body[data-theme="dark"] .edgsop-hero-copy p,body[data-theme="dark"] .edgsop-checklist,body[data-theme="dark"] .edgsop-premium-form .form-text,body[data-theme="dark"] .edgsop-hero-chip span{color:#9fb0c7!important;}
body[data-theme="dark"] .edgsop-hero-chip{background:#0b1322!important;border-color:#243041!important;}
body[data-theme="dark"] .edgsop-hero-chip strong,body[data-theme="dark"] .edgsop-hero-copy h2,body[data-theme="dark"] .edgsop-side-card-soft{color:#f8fafc!important;}
body[data-theme="dark"] .edgsop-op-page .op-items-table thead th,body[data-theme="dark"] .edgsop-op-page .op-items-table tfoot th,body[data-theme="dark"] .edgsop-op-page .op-items-table tfoot td{background:#0b1322!important;color:#cbd5e1!important;border-color:#243041!important;}
body[data-theme="dark"] .edgsop-op-page .op-items-table tbody tr{border-color:#243041!important;}
body[data-theme="dark"] .edgsop-premium-form .form-control,body[data-theme="dark"] .edgsop-premium-form .form-select,body[data-theme="dark"] .edgsop-premium-form .input-group-text{background:#0b1322!important;border-color:#243041!important;color:#f8fafc!important;}
@media (max-width:1199.98px){.edgsop-op-grid{grid-template-columns:1fr;}.edgsop-op-sidebar{position:static;}}
@media (max-width:767.98px){.edgsop-hero-band{padding:18px;flex-direction:column;}.edgsop-hero-metrics{width:100%;}.edgsop-hero-chip{flex:1 1 150px;}.edgsop-premium-form .form-control,.edgsop-premium-form .form-select,.edgsop-premium-form .input-group-text{min-height:50px;font-size:.96rem!important;}.edgsop-items-wrap{border-radius:18px;}}


/* === v1.3.9 hardening final: contraste, login e legibilidade === */
:root{
  --sgs-text:#0f172a;
  --sgs-muted:#475569;
  --sgs-border:#cbd5e1;
  --sgs-card:#ffffff;
  --sgs-card-soft:#f8fafc;
  --sgs-surface:#eef2f7;
}
body{color:var(--sgs-text);background:var(--sgs-surface);}
.text-muted, .small.text-muted, .sgs-page-subtitle, .sgs-subtitle{color:var(--sgs-muted)!important;}
.sgs-topbar-title, .sgs-page-title, h1, h2, h3, h4, h5, h6, .form-label, .table, .table td, .table th{color:var(--sgs-text);}
.card, .sgs-card, .sgs-section-card, .sgs-auth-card{box-shadow:0 10px 30px rgba(15,23,42,.08)!important;}
.sgs-sidebar{background:#ffffff;color:#0f172a;border-right:1px solid #dbe3ef;}
.sgs-sidebar-company{background:#f8fafc;border:1px solid #dbe3ef;}
.sgs-company-name{color:#0f172a;}
.sgs-company-plan{color:#475569;}
.sgs-nav-section-title{color:#64748b;}
.sgs-nav-item,.sgs-subnav-item,.sgs-footer-item{color:#334155;}
.sgs-nav-item svg,.sgs-subnav-item svg,.sgs-footer-item svg{color:#64748b;}
.sgs-nav-item:hover,.sgs-subnav-item:hover,.sgs-footer-item:hover{background:#eff6ff;color:#0f172a;}
.sgs-nav-item.active,.sgs-subnav-item.active{background:#2563eb!important;border-color:#2563eb!important;color:#ffffff!important;}
.sgs-nav-item.active svg,.sgs-subnav-item.active svg{color:#ffffff!important;}
.sgs-brand{color:#0f172a;}
.sgs-brand-sub{color:#64748b;}
.badge, .sgs-chip, .sgs-pill{font-weight:700;}
.btn-outline-secondary, .btn-light, .btn-outline-dark, .btn-outline-primary{color:#0f172a;}
.table thead th{color:#475569;background:#f8fafc;}
.form-control, .form-select{color:#0f172a;background:#ffffff;}
.form-control::placeholder{color:#94a3b8;}

.sgs-auth-shell{display:flex;align-items:center;justify-content:center;min-height:calc(100vh - 8rem);}
.sgs-auth-wrap{width:100%;max-width:520px;margin:0 auto;}
.sgs-login-card{max-width:520px;margin:0 auto;}
.sgs-login-brand{display:flex;align-items:center;gap:14px;}
.sgs-login-brand-logo{width:72px;height:72px;max-width:72px;max-height:72px;object-fit:contain;border-radius:16px;box-shadow:0 6px 18px rgba(37,99,235,.16);background:#fff;padding:6px;}
.sgs-login-brand-name{font-size:1.35rem;font-weight:800;line-height:1.08;color:#0f172a;}
.sgs-login-brand-sub{font-size:.95rem;font-weight:600;color:#475569;}
.sgs-public-body main.container{max-width:1200px;}

body[data-theme="dark"]{background:#020617;color:#e5e7eb;}
body[data-theme="dark"] .sgs-sidebar{background:#0f172a;color:#e5e7eb;border-right-color:rgba(255,255,255,.08);}
body[data-theme="dark"] .sgs-sidebar-company{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.08);}
body[data-theme="dark"] .sgs-company-name,
body[data-theme="dark"] .sgs-nav-item,
body[data-theme="dark"] .sgs-subnav-item,
body[data-theme="dark"] .sgs-footer-item,
body[data-theme="dark"] .sgs-brand{color:#e5e7eb;}
body[data-theme="dark"] .sgs-brand-sub,
body[data-theme="dark"] .sgs-company-plan,
body[data-theme="dark"] .sgs-nav-section-title,
body[data-theme="dark"] .sgs-nav-item svg,
body[data-theme="dark"] .sgs-subnav-item svg,
body[data-theme="dark"] .sgs-footer-item svg{color:#94a3b8;}
body[data-theme="dark"] .sgs-nav-item:hover,
body[data-theme="dark"] .sgs-subnav-item:hover,
body[data-theme="dark"] .sgs-footer-item:hover{background:rgba(255,255,255,.06);color:#fff;}

@media (max-width: 767.98px){
  .sgs-auth-shell{min-height:auto;padding-top:1rem;}
  .sgs-login-brand{flex-direction:column;text-align:center;}
  .sgs-login-brand-text{text-align:center!important;}
  .sgs-auth-wrap{max-width:100%;}
}
