/* ========================================================================== 
   ALPHA DESIGN ERP Cloud v4.8.0 — GLOBAL LAYOUT MODERNIZATION
   Presentation-only layer loaded after alpha-design-system.css.
   Goals: clearer hierarchy, calmer density, consistent page framing,
   modern data surfaces, stronger responsive behavior and dark-mode parity.
   No business, API, RBAC, accounting or database contract is changed here.
   ========================================================================== */

:root{
  --ui-sidebar:252px;
  --ui-content-max:1920px;
  --ui-gutter:clamp(16px,1.65vw,30px);
  --ui-space-1:6px;
  --ui-space-2:10px;
  --ui-space-3:14px;
  --ui-space-4:18px;
  --ui-space-5:24px;
  --ui-space-6:30px;
  --ui-radius-sm:9px;
  --ui-radius-md:13px;
  --ui-radius-lg:18px;
  --ui-radius-xl:22px;
  --ui-border:#dce6ec;
  --ui-border-soft:#e8eef2;
  --ui-canvas:#f4f7f9;
  --ui-surface:#fff;
  --ui-surface-soft:#f8fafb;
  --ui-surface-tint:#eef4f7;
  --ui-ink:#102c3d;
  --ui-muted:#6c808d;
  --ui-accent:#17658f;
  --ui-accent-strong:#135172;
  --ui-accent-soft:#e8f1f6;
  --ui-positive:#1b8057;
  --ui-warning:#a56b16;
  --ui-danger:#b74652;
  --ui-shadow-xs:0 1px 2px rgba(12,43,59,.035);
  --ui-shadow-sm:0 7px 22px rgba(12,43,59,.05);
  --ui-shadow-md:0 16px 44px rgba(12,43,59,.085);
  --ui-focus:0 0 0 3px rgba(12,145,174,.14);
}

/* ---------- Application shell ---------- */
.app-shell{
  grid-template-columns:var(--ui-sidebar) minmax(0,1fr)!important;
  min-height:100dvh;
}
.sidebar{
  width:var(--ui-sidebar)!important;
  padding:12px 10px 10px!important;
  border-right:1px solid var(--ui-border)!important;
  background:rgba(251,253,254,.97)!important;
  box-shadow:6px 0 28px rgba(13,49,66,.035)!important;
}
.sidebar.collapsed{width:76px!important}
/* Keep the CSS grid track in sync with the visual sidebar width.
   v4.8.0 kept the full --ui-sidebar grid column because the base shell rule
   was !important, then compensated with a negative main margin. That caused
   overlap/empty-space/reflow bugs when collapsing the navigation. */
.app-shell.sidebar-is-collapsed{grid-template-columns:76px minmax(0,1fr)!important}
.app-shell.sidebar-is-collapsed .main,
.sidebar.collapsed + .main{margin-left:0!important}
.sidebar.collapsed{overflow:hidden!important}
.sidebar.collapsed .nav{width:100%!important;padding-left:0!important;padding-right:0!important;overflow-x:hidden!important}
.sidebar.collapsed .nav-group-items{width:100%!important;justify-items:center!important}
.sidebar.collapsed .nav-item{width:52px!important;max-width:52px!important;margin-left:auto!important;margin-right:auto!important;justify-content:center!important;padding-left:9px!important;padding-right:9px!important}
.sidebar.collapsed .nav-label{display:none!important}
.brand-row{
  min-height:62px!important;
  padding:4px 6px 13px!important;
  border-bottom:1px solid var(--ui-border-soft)!important;
}
.brand-row .brand-image{max-width:126px!important}
.sidebar.collapsed .brand-row .brand-lockup{width:40px!important;height:40px!important}
.sidebar.collapsed .brand-row .brand-picture{width:40px!important;height:40px!important}
.sidebar.collapsed .brand-row .brand-compact-icon{width:38px!important;height:38px!important;border-radius:11px!important}
.nav{
  padding:12px 1px 10px!important;
  gap:6px!important;
  scrollbar-width:thin;
  scrollbar-color:#c5d3da transparent;
}
.nav-group{padding:2px 0!important}
.nav-group-toggle{
  min-height:28px!important;
  padding:5px 10px!important;
  color:#8595a0!important;
  font-size:8.5px!important;
  letter-spacing:.13em!important;
}
.nav-group-toggle:hover{color:#486474!important}
.nav-group-items{gap:3px!important}
.nav-item{
  min-height:42px!important;
  padding:8px 10px!important;
  gap:10px!important;
  border-radius:11px!important;
  font-size:11.5px!important;
  color:#415c6b!important;
}
.nav-item .nav-svg{width:18px!important;height:18px!important;flex:0 0 18px!important}
.nav-item:hover{background:#eef4f7!important;color:#17587b!important}
.nav-item.active{
  background:linear-gradient(90deg,#e6f0f5,#f1f6f9)!important;
  color:#114b6a!important;
  box-shadow:inset 0 0 0 1px rgba(13,145,171,.11)!important;
}
.nav-item.active::before{left:0!important;top:9px!important;bottom:9px!important;width:3px!important;background:#1b76a7!important}
.sidebar-footer{
  min-height:50px!important;
  padding:10px 8px 5px!important;
  border-top:1px solid var(--ui-border-soft)!important;
}
.sidebar-product strong{font-size:9px!important;letter-spacing:.08em!important}
.sidebar-product small{font-size:8px!important;color:#8b9ba5!important}

/* ---------- Global header ---------- */
.main{min-width:0;background:transparent}
.global-header{
  height:64px!important;
  padding:0 var(--ui-gutter)!important;
  background:rgba(247,250,252,.9)!important;
  border-bottom:1px solid rgba(217,229,235,.92)!important;
  box-shadow:none!important;
  backdrop-filter:blur(18px) saturate(1.12)!important;
}
.header-left{min-width:0;gap:12px!important}
.global-search-wrap{
  width:min(540px,46vw)!important;
  height:40px!important;
  padding:0 12px!important;
  border:1px solid #d9e3e8!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:var(--ui-shadow-xs)!important;
}
.global-search-wrap:focus-within{border-color:#7aadc9!important;box-shadow:var(--ui-focus)!important}
.global-search-wrap input{font-size:12px!important;color:#264657!important}
.global-search-wrap kbd{font-size:9px!important;border-radius:7px!important;background:#f5f8fa!important}
.header-actions{gap:6px!important}
.sync-pill{
  min-height:36px!important;
  padding:7px 10px!important;
  border-radius:10px!important;
  border:1px solid #dce6eb!important;
  background:#fff!important;
  color:#4d6877!important;
}
.header-icon{
  width:36px!important;height:36px!important;
  border-radius:10px!important;
  color:#526d7b!important;
}
.profile-button{
  min-height:40px!important;
  padding:4px 7px 4px 5px!important;
  border-radius:12px!important;
  gap:7px!important;
}
.profile-copy strong{font-size:10.5px!important}.profile-copy small{font-size:8.5px!important}
.avatar{width:31px!important;height:31px!important;font-size:10px!important}

/* ---------- Page frame ---------- */
.page-toolbar{
  min-height:78px!important;
  padding:11px var(--ui-gutter)!important;
  background:rgba(250,252,253,.92)!important;
  border-bottom:1px solid rgba(218,229,235,.92)!important;
  box-shadow:0 5px 18px rgba(12,44,60,.018)!important;
  gap:16px!important;
}
.page-heading{gap:11px!important;min-width:230px}
.page-icon{
  width:40px!important;height:40px!important;
  border-radius:12px!important;
  background:linear-gradient(145deg,#e5eff4,#eff5f8)!important;
  border:1px solid #cfe0e9!important;
  color:#155b80!important;
}
.page-heading h1{
  margin:0!important;
  font-size:20px!important;
  line-height:1.15!important;
  font-weight:790!important;
  letter-spacing:-.025em!important;
  color:#102e40!important;
}
.page-heading p{margin:4px 0 0!important;font-size:10.5px!important;color:#788b96!important}
.toolbar-actions{gap:7px!important}
.date-control,.toolbar-select,.toolbar-button{
  min-height:38px!important;height:38px!important;
  border-radius:10px!important;
  border-color:#d9e3e8!important;
  background:#fff!important;
  box-shadow:var(--ui-shadow-xs)!important;
}
.date-control input{font-size:10.5px!important}
.toolbar-select,.toolbar-button{font-size:10.5px!important}
#primaryAction{min-height:38px!important;box-shadow:0 5px 14px rgba(7,117,146,.14)!important}

.content{
  width:100%!important;
  max-width:var(--ui-content-max)!important;
  margin:0 auto!important;
  padding:22px var(--ui-gutter) 108px!important;
}
.content:focus{outline:0}
.content[data-view]{animation:uiViewIn .18s ease-out}
@keyframes uiViewIn{from{opacity:.6;transform:translateY(2px)}to{opacity:1;transform:none}}
.section{margin-top:17px!important}
.grid{gap:15px!important}
.two-col{gap:16px!important}.three-col,.four-col{gap:14px!important}

/* ---------- Universal information surfaces ---------- */
.card,.kpi-card,.feature-tile,.admin-card,.security-card,.cloud-card,.settings-card{
  border:1px solid var(--ui-border)!important;
  border-radius:var(--ui-radius-lg)!important;
  background:var(--ui-surface)!important;
  box-shadow:var(--ui-shadow-sm)!important;
}
.card{transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.card:hover{border-color:#d3dfe6!important;box-shadow:0 10px 30px rgba(12,43,59,.065)!important}
.card-pad{padding:17px 18px!important}
.section-header{gap:14px!important;margin-bottom:13px!important;align-items:flex-start!important}
.section-header h2,.section-header h3,.report-title h3{
  margin-top:0!important;
  color:#17384a!important;
  font-size:14px!important;
  line-height:1.3!important;
  font-weight:780!important;
  letter-spacing:-.012em!important;
}
.section-header p,.report-title p{font-size:10.5px!important;line-height:1.5!important;color:#748894!important}
.note,.algorithm-note,.workflow-helper{
  border-radius:12px!important;
  border-color:#dde7ec!important;
  background:#f5f9fb!important;
}

/* Unify module introductions without flattening their information. */
.business-screen-intro,.suite-screen-intro,.operations-screen-intro,
.commercial-hero,.planning-hero,.control-hero-v35,.cloud-hero,.security-hero{
  border-radius:20px!important;
  box-shadow:0 10px 30px rgba(10,50,69,.065)!important;
  overflow:hidden;
}
.business-screen-intro,.suite-screen-intro,.operations-screen-intro{
  border:1px solid #dae5eb!important;
  background:linear-gradient(135deg,#fff 0%,#f6fafc 72%,#eef4f7 100%)!important;
}
.business-screen-intro h2,.suite-screen-intro h2,.operations-screen-intro h2{letter-spacing:-.025em!important}
.business-intro-metric,.suite-intro-metric,.operations-intro-metric{
  border-radius:13px!important;
  border-color:#dde7ec!important;
  background:rgba(255,255,255,.86)!important;
  box-shadow:0 2px 8px rgba(12,45,61,.025)!important;
}

/* ---------- KPI / executive metric hierarchy ---------- */
.kpi-grid,.dashboard-kpi-grid,.executive-kpi-grid{gap:13px!important}
.kpi-card{
  min-height:120px!important;
  padding:15px 16px!important;
  overflow:hidden!important;
  position:relative;
}
.kpi-card::before{left:15px!important;right:15px!important;height:3px!important;opacity:.62!important}
.kpi-card::after{opacity:.35!important}
.kpi-icon{width:34px!important;height:34px!important;border-radius:10px!important}
.kpi-label{font-size:10px!important;line-height:1.35!important;font-weight:720!important;color:#5f7582!important}
.kpi-value{font-size:22px!important;line-height:1.08!important;font-weight:820!important;letter-spacing:-.032em!important;color:#102f41!important;font-variant-numeric:tabular-nums lining-nums}
.kpi-foot,.kpi-unit{font-size:9.5px!important;color:#82929c!important}
.compact-kpi-row>div,.balance-summary>div,.status-strip>div,.executive-stat-rail>div{
  border-radius:12px!important;
}

/* ---------- Tables: consistent toolbars, scanability and actions ---------- */
.table-card{overflow:hidden!important}
.table-card>.section-header,.business-card-heading,.operations-card-heading,.suite-card-heading{
  padding:15px 17px!important;
  margin:0!important;
  border-bottom:1px solid var(--ui-border-soft)!important;
  background:linear-gradient(180deg,#fff,#fbfcfd)!important;
}
.table-tools,.business-table-tools,.operations-table-tools,.suite-table-tools,.auto-table-tools{
  min-height:52px!important;
  padding:8px 11px!important;
  gap:8px!important;
  border-bottom:1px solid var(--ui-border-soft)!important;
  background:#f8fafb!important;
}
.search-input,.filter-select,.table-tools input,.table-tools select,
.business-table-tools input,.business-table-tools select,
.operations-table-tools input,.operations-table-tools select,
.searchable-combobox-input{
  min-height:37px!important;
  border-radius:9px!important;
  border:1px solid #dae4e9!important;
  background:#fff!important;
  color:#2b4858!important;
}
.table-wrap{
  border-radius:0 0 var(--ui-radius-lg) var(--ui-radius-lg)!important;
  background:#fff!important;
  scrollbar-color:#b9c9d2 transparent!important;
  scrollbar-width:thin!important;
}
.table-wrap::-webkit-scrollbar{width:10px;height:10px}
.table-wrap::-webkit-scrollbar-thumb{background:#c2d0d8;border:3px solid transparent;background-clip:padding-box;border-radius:999px}
table{border-collapse:separate!important;border-spacing:0!important}
thead th{
  position:sticky!important;
  top:0!important;
  z-index:4!important;
  padding:10px 11px!important;
  background:#f2f6f8!important;
  border-bottom:1px solid #d9e2e7!important;
  color:#5b707d!important;
  font-size:9px!important;
  line-height:1.3!important;
  font-weight:800!important;
  letter-spacing:.055em!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
}
tbody td{
  padding:10px 11px!important;
  border-bottom:1px solid #edf1f3!important;
  background:#fff;
  color:#2c4858!important;
  font-size:10.5px!important;
  line-height:1.45!important;
  vertical-align:middle!important;
}
tbody tr:nth-child(even) td{background:#fbfcfd}
tbody tr:hover td{background:#f1f6f9!important}
tbody tr:last-child td{border-bottom:0!important}
td.numeric,th.numeric{font-variant-numeric:tabular-nums lining-nums;text-align:right!important}
td.numeric{color:#183a4d!important;font-weight:620!important}
td strong{color:#18394a!important;font-weight:740!important}
.table-count-badge,.record-count{background:#ebf2f6!important;color:#246182!important;border-color:#d4e3eb!important}
.cloud-table-actions,.table-actions{white-space:nowrap!important}
.table-action-group{gap:5px!important}
.table-action-group .ghost-btn,.table-action-group .secondary-btn,
td>.ghost-btn,td>.icon-btn{
  min-height:30px!important;
  padding:5px 8px!important;
  border-radius:8px!important;
  font-size:9.5px!important;
}

/* ---------- Buttons, status, tabs ---------- */
.primary-btn,.secondary-btn,.danger-btn,.ghost-btn,.toolbar-button{
  border-radius:9px!important;
  font-size:10.5px!important;
  font-weight:740!important;
}
.primary-btn{background:linear-gradient(180deg,#196b97,#155c82)!important;border-color:#155c82!important;color:#fff!important}
.primary-btn:hover{background:linear-gradient(180deg,#165f87,#135172)!important}
.secondary-btn{background:#fff!important;border-color:#d8e2e7!important;color:#315061!important}
.secondary-btn:hover{background:#f6f9fa!important;border-color:#c0d2dc!important}
.ghost-btn{color:#166088!important}
.danger-btn{background:#fff5f5!important;border-color:#efcfd3!important;color:#a63c48!important}
.badge,.confidence,.probability-pill{
  border-radius:999px!important;
  padding:5px 8px!important;
  font-size:9px!important;
  line-height:1!important;
  font-weight:760!important;
}
.metric-switch,.tabs,.tab-list{border-radius:12px!important}
.metric-switch button,.tabs button,.tab-list button{border-radius:8px!important}

/* ---------- Forms ---------- */
.field label,.drawer-form label{font-size:10px!important;font-weight:740!important;color:#516b79!important}
.field input,.field select,.field textarea,.drawer-form input,.drawer-form select,.drawer-form textarea,
.auth-security-form input,.login-card input{
  min-height:40px!important;
  border:1px solid #d9e2e7!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#244253!important;
  padding:8px 10px!important;
}
.field textarea,.drawer-form textarea{min-height:92px!important;line-height:1.5!important}
.field input:focus,.field select:focus,.field textarea:focus,
.drawer-form input:focus,.drawer-form select:focus,.drawer-form textarea:focus,
.auth-security-form input:focus,.login-card input:focus{
  outline:0!important;border-color:#79adc9!important;box-shadow:var(--ui-focus)!important
}
.form-grid{gap:14px 15px!important}

/* ---------- Drawers / modal / confirmation ---------- */
.right-drawer{
  width:min(430px,94vw)!important;
  border-left:1px solid #d9e3e9!important;
  background:#fff!important;
  box-shadow:-22px 0 65px rgba(8,36,52,.16)!important;
}
.drawer-header{padding:18px!important;border-bottom:1px solid var(--ui-border-soft)!important;background:#fbfcfd!important}
.drawer-header h2{font-size:17px!important;letter-spacing:-.02em!important}.drawer-header p{font-size:10px!important;color:#7b8d98!important}
.drawer-list,.drawer-form,.profile-panel{padding:14px!important}
.drawer-link{border-radius:10px!important}
.modal,.confirm-dialog,.action-prompt-dialog{
  border-radius:20px!important;
  border:1px solid #d7e3e9!important;
  box-shadow:0 34px 95px rgba(6,34,49,.22)!important;
}
.modal-header{padding:17px 19px!important}.modal-header h2{font-size:18px!important}
.modal-form{padding:17px 19px 0!important}
.form-actions{margin:17px -19px 0!important;padding:12px 19px!important}
.modal-backdrop,.confirm-backdrop,.action-prompt-backdrop,.drawer-backdrop{backdrop-filter:blur(5px)!important;background:rgba(8,31,44,.42)!important}
.toast{border-radius:12px!important;box-shadow:var(--ui-shadow-md)!important}

/* ---------- Login ---------- */
.login-screen{background:linear-gradient(145deg,#eff4f7,#f8fafb)!important}
.login-visual{
  background:radial-gradient(circle at 18% 18%,rgba(32,181,205,.17),transparent 27%),linear-gradient(145deg,#052c43,#0f425e 58%,#14577b)!important;
}
.login-card{border-radius:22px!important;border-color:#d9e3e9!important;box-shadow:0 28px 80px rgba(8,42,60,.12)!important}
.login-card-head h2{font-size:22px!important;letter-spacing:-.03em!important}.login-card-head p{color:#748793!important}

/* ---------- Desktop / tablet tuning ---------- */
@media(max-width:1280px){
  :root{--ui-sidebar:232px;--ui-gutter:18px}
  .dashboard-kpi-grid,.executive-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .global-search-wrap{width:min(450px,40vw)!important}
}
@media(max-width:1024px){
  :root{--ui-sidebar:218px;--ui-gutter:15px}
  .page-toolbar{min-height:72px!important;align-items:flex-start!important}
  .page-heading{min-width:190px}
  .page-heading h1{font-size:18px!important}
  .toolbar-actions{overflow-x:auto;flex-wrap:nowrap!important;max-width:64vw;padding-bottom:2px}
  .dashboard-kpi-grid,.executive-kpi-grid,.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .content{padding-top:18px!important;padding-bottom:96px!important}
}

/* On mobile, sidebar becomes an overlay and the workspace owns full width. */
@media(max-width:820px){
  :root{--ui-sidebar:min(320px,88vw);--ui-gutter:11px}
  .app-shell{display:block!important}
  .sidebar,.sidebar.collapsed{
    position:fixed!important;left:0!important;top:0!important;bottom:0!important;
    width:min(320px,88vw)!important;
    transform:translate3d(-104%,0,0);
    box-shadow:22px 0 64px rgba(7,32,46,.2)!important;
  }
  .sidebar.open{transform:translate3d(0,0,0)!important}
  .app-shell.sidebar-is-collapsed{display:block!important}
  .sidebar.collapsed + .main{margin-left:0!important}
  .sidebar.collapsed .nav-group-toggle{display:flex!important}
  .sidebar.collapsed .nav-item{width:auto!important;margin:0!important;justify-content:flex-start!important}
  .sidebar.collapsed .nav-label{display:inline!important}
  .global-header{height:58px!important;padding:0 10px!important}
  .mobile-brand{font-size:11px!important;letter-spacing:.04em!important}
  .global-search-wrap{display:none!important}
  .sync-pill span{display:none}.sync-pill{width:36px!important;padding:0!important;justify-content:center!important}
  .profile-copy{display:none!important}
  .page-toolbar{position:sticky!important;top:58px!important;z-index:45!important;min-height:64px!important;padding:9px 10px!important;gap:8px!important}
  .page-heading{min-width:0!important;gap:8px!important}
  .page-icon{width:34px!important;height:34px!important;border-radius:10px!important}
  .page-heading h1{font-size:16px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:40vw}
  .page-heading p{display:none!important}
  .toolbar-actions{max-width:54vw!important;overflow-x:auto!important;justify-content:flex-start!important;gap:5px!important;scrollbar-width:none}
  .toolbar-actions::-webkit-scrollbar{display:none}
  .date-control{display:none!important}
  .toolbar-select{max-width:104px!important}
  .toolbar-button span{display:none!important}
  #primaryAction{width:36px!important;min-width:36px!important;padding:0!important;font-size:0!important}
  #primaryAction::before{content:"+";font-size:18px!important}
  .content{padding:13px 9px 88px!important}
  .dashboard-kpi-grid,.executive-kpi-grid,.kpi-grid,.two-col,.three-col,.four-col{grid-template-columns:1fr!important}
  .kpi-card{min-height:108px!important}
  .table-card>.section-header,.business-card-heading,.operations-card-heading,.suite-card-heading{padding:13px!important}
  .table-tools,.business-table-tools,.operations-table-tools,.suite-table-tools,.auto-table-tools{overflow-x:auto!important;flex-wrap:nowrap!important;padding:7px 8px!important;scrollbar-width:none}
  .table-tools::-webkit-scrollbar,.business-table-tools::-webkit-scrollbar,.operations-table-tools::-webkit-scrollbar,.suite-table-tools::-webkit-scrollbar{display:none}
  .search-input{min-width:185px!important}
  thead th,tbody td{padding-left:9px!important;padding-right:9px!important}
  .form-grid{grid-template-columns:1fr!important}
  .right-drawer{width:min(390px,94vw)!important}
  .modal{width:calc(100vw - 14px)!important;max-height:94dvh!important;border-radius:17px!important}
  .modal-header{padding:14px!important}.modal-form{padding:14px 14px 0!important}
  .form-actions{margin-left:-14px!important;margin-right:-14px!important;padding:11px 14px!important;overflow-x:auto;flex-wrap:nowrap!important}
  .mobile-bottom-nav{
    background:rgba(252,253,254,.96)!important;
    border-top:1px solid #dae4e9!important;
    box-shadow:0 -8px 28px rgba(8,39,55,.06)!important;
    backdrop-filter:blur(18px)!important;
  }
  .mobile-bottom-nav button{color:#71848f!important}.mobile-bottom-nav button.active{color:#165e84!important}
  .mobile-plus{box-shadow:0 6px 18px rgba(7,117,146,.2)!important}
}
@media(max-width:560px){
  .header-actions{gap:2px!important}.header-icon{width:34px!important;height:34px!important}
  #helpBtn{display:none!important}
  .page-heading h1{max-width:38vw;font-size:15px!important}
  .toolbar-select{display:none!important}
  .toolbar-actions{max-width:46vw!important}
  .card-pad{padding:14px!important}
  .section-header{flex-direction:column!important;gap:8px!important}
  .section-header>.actions,.section-header>button{align-self:flex-start}
  .kpi-value{font-size:21px!important}
}

/* ---------- Dark mode parity ---------- */
html[data-theme="dark"]{
  --ui-border:#2b414d;
  --ui-border-soft:#243842;
  --ui-canvas:#0a1720;
  --ui-surface:#11232d;
  --ui-surface-soft:#0e1e27;
  --ui-surface-tint:#142d3a;
  --ui-ink:#e7eff3;
  --ui-muted:#91a6b0;
  --ui-accent:#50a1cd;
  --ui-accent-strong:#78bade;
  --ui-accent-soft:#162f3d;
  --ui-shadow-xs:0 1px 2px rgba(0,0,0,.08);
  --ui-shadow-sm:0 8px 26px rgba(0,0,0,.13);
  --ui-shadow-md:0 24px 60px rgba(0,0,0,.28);
  --ui-focus:0 0 0 3px rgba(73,191,212,.18);
}
html[data-theme="dark"] .sidebar{background:rgba(13,29,38,.97)!important;border-right-color:var(--ui-border)!important}
html[data-theme="dark"] .brand-row,html[data-theme="dark"] .sidebar-footer{border-color:var(--ui-border-soft)!important}
html[data-theme="dark"] .nav-group-toggle{color:#78909b!important}
html[data-theme="dark"] .nav-item{color:#abbcc5!important}
html[data-theme="dark"] .nav-item:hover{background:#142a36!important;color:#c9e3f1!important}
html[data-theme="dark"] .nav-item.active{background:linear-gradient(90deg,#143242,#132a37)!important;color:#dbedf7!important;box-shadow:inset 0 0 0 1px #27495b!important}
html[data-theme="dark"] .global-header,html[data-theme="dark"] .page-toolbar{background:rgba(11,27,36,.91)!important;border-bottom-color:#2b404c!important}
html[data-theme="dark"] .global-search-wrap,html[data-theme="dark"] .sync-pill,html[data-theme="dark"] .date-control,html[data-theme="dark"] .toolbar-select,html[data-theme="dark"] .toolbar-button{background:#11232d!important;border-color:#2c4350!important;color:#c8d8e0!important}
html[data-theme="dark"] .global-search-wrap input{color:#e2ebf0!important}
html[data-theme="dark"] .page-icon{background:#15303e!important;border-color:#2c4a5a!important;color:#80bedf!important}
html[data-theme="dark"] .page-heading h1{color:#e9f0f4!important}html[data-theme="dark"] .page-heading p{color:#8ba1ac!important}
html[data-theme="dark"] .card,html[data-theme="dark"] .kpi-card,html[data-theme="dark"] .feature-tile,html[data-theme="dark"] .admin-card,html[data-theme="dark"] .security-card,html[data-theme="dark"] .cloud-card,html[data-theme="dark"] .settings-card{background:#11232d!important;border-color:#2b414d!important;box-shadow:var(--ui-shadow-sm)!important}
html[data-theme="dark"] .section-header h2,html[data-theme="dark"] .section-header h3,html[data-theme="dark"] .report-title h3,html[data-theme="dark"] .kpi-value,html[data-theme="dark"] td strong{color:#e5eef2!important}
html[data-theme="dark"] .section-header p,html[data-theme="dark"] .report-title p,html[data-theme="dark"] .kpi-label,html[data-theme="dark"] .kpi-foot,html[data-theme="dark"] .kpi-unit{color:#8fa5af!important}
html[data-theme="dark"] .business-screen-intro,html[data-theme="dark"] .suite-screen-intro,html[data-theme="dark"] .operations-screen-intro{background:linear-gradient(135deg,#11232d,#122733)!important;border-color:#2c4553!important}
html[data-theme="dark"] .business-intro-metric,html[data-theme="dark"] .suite-intro-metric,html[data-theme="dark"] .operations-intro-metric{background:#122733!important;border-color:#2d4856!important}
html[data-theme="dark"] .table-card>.section-header,html[data-theme="dark"] .business-card-heading,html[data-theme="dark"] .operations-card-heading,html[data-theme="dark"] .suite-card-heading{background:linear-gradient(180deg,#132630,#10212a)!important;border-bottom-color:#2b414d!important}
html[data-theme="dark"] .table-tools,html[data-theme="dark"] .business-table-tools,html[data-theme="dark"] .operations-table-tools,html[data-theme="dark"] .suite-table-tools,html[data-theme="dark"] .auto-table-tools{background:#0e1e27!important;border-color:#2b414d!important}
html[data-theme="dark"] .search-input,html[data-theme="dark"] .filter-select,html[data-theme="dark"] .table-tools input,html[data-theme="dark"] .table-tools select,html[data-theme="dark"] .searchable-combobox-input{background:#11232d!important;border-color:#2e4552!important;color:#d9e4ea!important}
html[data-theme="dark"] .table-wrap{background:#11232d!important}
html[data-theme="dark"] thead th{background:#162b36!important;border-bottom-color:#334c5a!important;color:#98abb5!important}
html[data-theme="dark"] tbody td{background:#11232d!important;border-bottom-color:#243944!important;color:#c9d7de!important}
html[data-theme="dark"] tbody tr:nth-child(even) td{background:#0f2029!important}
html[data-theme="dark"] tbody tr:hover td{background:#162f3c!important}
html[data-theme="dark"] td.numeric{color:#d8e5ec!important}
html[data-theme="dark"] .secondary-btn{background:#132630!important;border-color:#334d5b!important;color:#d5e1e8!important}
html[data-theme="dark"] .note,html[data-theme="dark"] .algorithm-note,html[data-theme="dark"] .workflow-helper{background:#122732!important;border-color:#2b4655!important;color:#b9cad3!important}
html[data-theme="dark"] .field input,html[data-theme="dark"] .field select,html[data-theme="dark"] .field textarea,html[data-theme="dark"] .drawer-form input,html[data-theme="dark"] .drawer-form select,html[data-theme="dark"] .drawer-form textarea{background:#0e1e27!important;border-color:#2f4653!important;color:#e2ebf0!important}
html[data-theme="dark"] .right-drawer,html[data-theme="dark"] .modal,html[data-theme="dark"] .confirm-dialog,html[data-theme="dark"] .action-prompt-dialog{background:#11232d!important;border-color:#334d5b!important}
html[data-theme="dark"] .drawer-header,html[data-theme="dark"] .modal-header{background:#12242e!important;border-color:#2b414d!important}
html[data-theme="dark"] .mobile-bottom-nav{background:rgba(13,29,38,.97)!important;border-top-color:#2b414d!important}

@media(prefers-reduced-motion:reduce){.content[data-view]{animation:none!important}}
