/* esmartbooks dark theme — single source, loaded last. Light CSS must not override this. */
html[data-theme="dark"]{
  color-scheme:only dark;
  --ink:#eef4fb;
  --muted:#9eb4c9;
  --line:#2a4560;
  --bg:#071422;
  --panel:#0e2136;
  --green:#d6e6f7;
  --green-dark:#b7cce6;
  --blue:#5cadff;
  --danger:#ff7a72;
  --shadow:0 12px 28px rgba(0,0,0,.35);
  --soft-blue:#14324d;
  --soft-green:#0c2340;
  --soft-amber:#3d2f16;
  --soft-purple:#2a2550;
  --v72-surface:#0e2136;
  --v72-text:#eef4fb;
  --v72-border:#2a4560;
  --v72-hover:#17324c;
  --v72-muted:#9eb4c9;
  --navy:#061525;
  --border:#2a4560;
  --surface:#0e2136;
  --text:#eef4fb;
  --hover:#17324c;
}
html[data-theme="dark"]:not([data-public-surface="1"]) body,
html[data-theme="dark"]:not([data-public-surface="1"]) main,
html[data-theme="dark"]:not([data-public-surface="1"]) #app,
html[data-theme="dark"]:not([data-public-surface="1"]) #app.content,
html[data-theme="dark"]:not([data-public-surface="1"]) .content{
  background:var(--bg)!important;
  color:var(--ink)!important;
}
html[data-theme="dark"] .topbar{
  background:#081a2c!important;
  border-color:#243d56!important;
  color:var(--ink)!important;
}
html[data-theme="dark"] .topbar h1,
html[data-theme="dark"] #page-title{color:#f4f8ff!important}
html[data-theme="dark"] .topbar p,
html[data-theme="dark"] #page-subtitle{color:#9eb4c9!important}
html[data-theme="dark"] .sb-search,
html[data-theme="dark"] .search,
html[data-theme="dark"]:not([data-public-surface="1"]) input.search{
  background:#0b1c2e!important;
  color:#f4f8ff!important;
  border-color:#3d5d7a!important;
}

html[data-theme="dark"] #global-menubar,
html[data-theme="dark"] #global-menubar.global-menubar,
html[data-theme="dark"] #global-menubar.topbar-topbar,
html[data-theme="dark"] #global-menubar.ownermenu-owner-menu,
html[data-theme="dark"] #global-menubar.topmenu-topmost-menu,
html[data-theme="dark"] #global-menubar.menubar-global-menubar{
  background:#061525!important;
  border-bottom-color:#1c3852!important;
  color:#f4f8ff!important;
  box-shadow:none!important;
}
html[data-theme="dark"] #global-menubar .global-menu-button,
html[data-theme="dark"] #global-menubar .global-menu-direct{
  color:#f4f8ff!important;
}
html[data-theme="dark"] #global-menubar .global-menu-button:hover,
html[data-theme="dark"] #global-menubar .global-menu.open>.global-menu-button,
html[data-theme="dark"] #global-menubar .global-menu-direct:hover{
  background:rgba(255,255,255,.1)!important;
  color:#fff!important;
}
html[data-theme="dark"] .global-menu-popup{
  background:#12283e!important;
  border-color:#35506b!important;
  color:#f4f8ff!important;
}
html[data-theme="dark"] .global-menu-item,
html[data-theme="dark"] .global-menu-subheading{
  color:#eaf3ff!important;
}
html[data-theme="dark"] .global-menu-item:hover{background:#24425e!important}

html[data-theme="dark"] .panel,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .metric,
html[data-theme="dark"] .kpi,
html[data-theme="dark"] .stat,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .commercial-page .page-actions,
html[data-theme="dark"] .commercial-page .panel,
html[data-theme="dark"] .commercial-register .commercial-summary-card,
html[data-theme="dark"] .report-kpi,
html[data-theme="dark"] .report-main-panel,
html[data-theme="dark"] .board-kpi,
html[data-theme="dark"] .board-panel{
  background:var(--panel)!important;
  border-color:var(--line)!important;
  color:var(--ink)!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .commercial-summary-card small,
html[data-theme="dark"] .report-kpi span,
html[data-theme="dark"] .report-kpi small,
html[data-theme="dark"]:not([data-public-surface="1"]) .muted,
html[data-theme="dark"]:not([data-public-surface="1"]) small{
  color:var(--muted)!important;
}
html[data-theme="dark"] .commercial-summary-card strong,
html[data-theme="dark"] .report-kpi b,
html[data-theme="dark"]:not([data-public-surface="1"]) h1,html[data-theme="dark"]:not([data-public-surface="1"]) h2,html[data-theme="dark"]:not([data-public-surface="1"]) h3{
  color:#f4f8ff!important;
}

html[data-theme="dark"]:not([data-public-surface="1"]) .btn,
html[data-theme="dark"]:not([data-public-surface="1"]) .icon-btn{
  background:#143049!important;
  color:#eaf3ff!important;
  border-color:#3d5d7a!important;
}
html[data-theme="dark"]:not([data-public-surface="1"]) .btn:hover,
html[data-theme="dark"]:not([data-public-surface="1"]) .icon-btn:hover{background:#1b3d5c!important}
html[data-theme="dark"]:not([data-public-surface="1"]) .btn.primary,
html[data-theme="dark"] .commercial-primary,
html[data-theme="dark"] .report-primary{
  background:#16365c !important;
  border-color:#63829e !important;
  color:#fff !important;
}
html[data-theme="dark"]:not([data-public-surface="1"]) select,
html[data-theme="dark"]:not([data-public-surface="1"]) input:not([type=checkbox]):not([type=radio]):not([type=date]):not([type=datetime-local]):not([type=month]):not([type=time]),
html[data-theme="dark"]:not([data-public-surface="1"]) textarea,
html[data-theme="dark"]:not([data-public-surface="1"]) .field input:not([type=checkbox]):not([type=radio]):not([type=date]):not([type=datetime-local]):not([type=month]):not([type=time]),
html[data-theme="dark"]:not([data-public-surface="1"]) .field select,
html[data-theme="dark"]:not([data-public-surface="1"]) .field textarea{
  background:var(--panel,#0e2136)!important;
  color:var(--ink,#f4f8ff)!important;
  border-color:var(--line,#3d5d7a)!important;
}
html[data-theme="dark"]:not([data-public-surface="1"]) select option,
html[data-theme="dark"]:not([data-public-surface="1"]) optgroup{
  background:var(--panel,#0e2136)!important;
  color:var(--ink,#f4f8ff)!important;
}
html[data-theme="dark"]:not([data-public-surface="1"]) input[type=checkbox]:not(.sb-switch),
html[data-theme="dark"]:not([data-public-surface="1"]) input[type=radio]{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  max-width:18px!important;
  flex:0 0 18px!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  accent-color:#1d4e89;
}
html[data-theme="dark"]:not([data-public-surface="1"]) label,
html[data-theme="dark"]:not([data-public-surface="1"]) .field>span{color:#b7c9db!important}

html[data-theme="dark"] table,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .commercial-page table,
html[data-theme="dark"] .commercial-register table,
html[data-theme="dark"] .report-main-table,
html[data-theme="dark"] .report-table-wrap{
  background:var(--panel)!important;
  color:var(--ink)!important;
  border-color:var(--line)!important;
}
html[data-theme="dark"] th,
html[data-theme="dark"] .commercial-page th,
html[data-theme="dark"] .report-main-table th,
html[data-theme="dark"] .sb-col-head,
html[data-theme="dark"] .sb-col-sort{
  background:#13283f!important;
  color:#c5d6e8!important;
  border-color:#2a4560!important;
}
html[data-theme="dark"] td,
html[data-theme="dark"] .commercial-page td{
  background:transparent!important;
  color:#e8f0f8!important;
  border-color:#243d56!important;
}
html[data-theme="dark"] .qr-document,
html[data-theme="dark"] .qr-document *{
  color-scheme:light!important;
}
html[data-theme="dark"] .qr-document{
  background:#fff!important;
  color:#111827!important;
  -webkit-print-color-adjust:exact!important;
  print-color-adjust:exact!important
}
html[data-theme="dark"] .qr-document .qr-table thead th{
  background:transparent!important;
  color:#1b2836!important;
  -webkit-text-fill-color:#1b2836!important;
  -webkit-print-color-adjust:exact!important;
  print-color-adjust:exact!important
}
html[data-theme="dark"] .qr-document .qr-table tbody td,
html[data-theme="dark"] .qr-document .qr-party,
html[data-theme="dark"] .qr-document .qr-meta,
html[data-theme="dark"] .qr-document .qr-meta>div,
html[data-theme="dark"] .qr-document .qr-totals-main,
html[data-theme="dark"] .qr-document .qr-total-row{
  background:#fff!important;
  color:#111827!important;
  -webkit-text-fill-color:#111827!important
}
html[data-theme="dark"] .qr-document .qr-title{
  background:transparent!important;
  color:#111827!important;
  border-color:var(--qr-accent,#12324c)!important
}
html[data-theme="dark"] tbody tr:hover,
html[data-theme="dark"] .commercial-register tbody tr:hover{background:#15324c!important}
html[data-theme="dark"] .commercial-status{
  background:#16324c!important;
  color:#d6e6f7!important;
}
html[data-theme="dark"] .empty,
html[data-theme="dark"] .loading{color:#9eb4c9!important}
html[data-theme="dark"] .sb-col-pop{
  background:#12283e!important;
  border-color:#35506b!important;
  color:#f4f8ff!important;
}

html[data-theme="dark"] .quote-price-tabs{border-bottom-color:#2a4560!important}
html[data-theme="dark"] .quote-price-tabs .btn{color:#c5d6e8!important;background:transparent!important}
html[data-theme="dark"] .quote-price-tabs .btn.primary{color:#d6e6f7!important}

html[data-theme="dark"] .modal-head,
html[data-theme="dark"] .modal-foot,
html[data-theme="dark"] .modal-body{
  background:var(--panel)!important;
  color:var(--ink)!important;
  border-color:var(--line)!important;
}
html[data-theme="dark"] .sb-win-btns button:hover,
html[data-theme="dark"] .sb-win-controls button:hover,
html[data-theme="dark"] .im-window-controls button:hover,
html[data-theme="dark"] .im-so-win-controls button:hover{background:#243d56!important}
html[data-theme="dark"] .sb-window.sb-win-max [data-sb-max]::after,
html[data-theme="dark"] .im-so-window.max [data-so-max]::after,
html[data-theme="dark"] .im-txn-window.im-max [data-win-max]::after{background:#0d2238}

html[data-theme="dark"] .im-so-window,
html[data-theme="dark"] .im-txn-window,
html[data-theme="dark"] .docform-toolbar,
html[data-theme="dark"] .docform-main-card,
html[data-theme="dark"] .docform-lines thead th,
html[data-theme="dark"] .docform-lines tbody td{
  background:var(--panel)!important;
  color:var(--ink)!important;
  border-color:var(--line)!important;
}

html[data-theme="dark"]:not([data-public-surface="1"]) .link,html[data-theme="dark"]:not([data-public-surface="1"]) a{color:#68b4ff!important}
html[data-theme="dark"] .avatar{background:#133b63!important;color:#8dcbff!important}
html[data-theme="dark"] .sb-search-select>select{background:transparent!important;color:transparent!important}

html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .sidebar #nav,
html[data-theme="dark"] #nav .nav-item,
html[data-theme="dark"] .sidebar #nav .nav-item,
html[data-theme="dark"] #nav .nav-item b,
html[data-theme="dark"] #nav .nav-item span,
html[data-theme="dark"] .sidebar .brand strong{
  color:#eaf3ff!important;
}
html[data-theme="dark"] .sidebar .brand small,
html[data-theme="dark"] .sidebar .sidebar-foot,
html[data-theme="dark"] .sidebar .sidebar-foot small,
html[data-theme="dark"] #nav .nav-section-label,
html[data-theme="dark"] #nav .nav-group-title,
html[data-theme="dark"] #nav .nav-group-toggle{
  color:#9eb4c9!important;
}
html[data-theme="dark"] #nav .nav-item>span:first-child svg,
html[data-theme="dark"] #nav .nav-item .nav-svg,
html[data-theme="dark"] .sidebar .nav-item .nav-svg{
  color:#cfe0f0!important;
  stroke:#cfe0f0!important;
  fill:none!important;
}
html[data-theme="dark"] #nav .nav-item:hover,
html[data-theme="dark"] .sidebar .nav-item:hover{
  background:#15324e!important;
  color:#fff!important;
}
html[data-theme="dark"] #nav .nav-item.active,
html[data-theme="dark"] .sidebar .nav-item.active{
  background:#0c2340!important;
  color:#c5d4e6!important;
}
html[data-theme="dark"] #nav .nav-item.active b,
html[data-theme="dark"] #nav .nav-item.active span{
  color:#c5d4e6!important;
}

@media print{
  html[data-theme="dark"] body,
  html[data-theme="dark"] .doc-print,
  html[data-theme="dark"] .doc-print *,
  html[data-theme="dark"] .qr-document,
  html[data-theme="dark"] .qr-document *{
    background:#fff!important;color:#111!important
  }
  html[data-theme="dark"] .qr-document .qr-table thead th{
    background:transparent!important;color:#1b2836!important;-webkit-text-fill-color:#1b2836!important
  }
}
html[data-theme="dark"] #global-menubar,
html[data-theme="dark"] #global-menubar.topbar-topbar{
  z-index:30000!important;}

/* Last-wins chrome, amounts, and light settings (loaded after every other stylesheet). */
:root{--sidebar-width:246px;--sb-menubar-h:36px;--sb-topbar-h:48px;--sb-chrome-h:84px;--sidebar-rail-width:246px}
@media screen and (min-width:1001px){
  body{padding-top:0!important}
  .sidebar{
    position:fixed!important;top:0!important;left:0!important;bottom:auto!important;
    height:100vh!important;width:var(--sidebar-width)!important;z-index:200!important;
    overflow-x:hidden!important;overflow-y:auto!important;transform:none!important
  }
  
  
  #global-menubar,
  #global-menubar.global-menubar,
  #global-menubar.topbar-topbar,
  #global-menubar.center-topmost-menu,
  #global-menubar.topmenu-topmost-menu,
  #global-menubar.authmenu-authorized-menu,
  #global-menubar.menubar-global-menubar{
    position:fixed!important;top:0!important;left:var(--sidebar-width)!important;right:0!important;width:auto!important;
    height:var(--sb-menubar-h)!important;min-height:var(--sb-menubar-h)!important;max-height:none!important;
    z-index:30000!important;overflow:visible!important;flex-wrap:nowrap!important;
    display:flex!important;align-items:center!important
  }
  
  
  
  .topbar{
    position:fixed!important;top:var(--sb-menubar-h)!important;left:var(--sidebar-width)!important;right:0!important;
    z-index:150!important;min-height:var(--sb-topbar-h)!important
  }
  
  main{
    margin-left:var(--sidebar-width)!important;padding-top:var(--sb-chrome-h)!important;width:auto!important
  }
  
  .sb-dc-bar{position:static!important;top:auto!important}
}
@media print{
  .sidebar,.topbar,#global-menubar{
    display:none!important;visibility:hidden!important;position:static!important
  }
  main,#app,.content{
    margin-left:0!important;padding-top:0!important;overflow:visible!important;height:auto!important
  }
}
.num,th.num,td.num,td.num input,td.num b,th.num input,
.ex-register .num,.dashMain .num,.sb-report-result .num,.financial-statement .num,
.metric strong,.kpi strong,.dash-kpis strong,.home-kpis strong,.dash-pulse b,
.docform-summary-row b,.sb-dc-summary b,.totals .total-row b,.im-so-totals b,
[data-so-amount-orderline],[data-so-rate-orderline],[data-so-qty-orderline],[data-so-shelf],
.sb-dc-lines .doc-lines td.num input,.sb-dc-lines .doc-lines td.num b,
.doc-lines td.num,.doc-print td.num,.live-sheet td.num,.template-preview td.num,
.commercial-register td.num,.app-table td.num{
  text-align:right!important;font-variant-numeric:tabular-nums
}

/* Menubar lists open under the item. If the right edge is short, they open left. */
@media screen and (min-width:1001px){
  #global-menubar,
  #global-menubar.global-menubar,
  #global-menubar.topbar-topbar,
  #global-menubar.center-topmost-menu,
  #global-menubar.topmenu-topmost-menu,
  #global-menubar.authmenu-authorized-menu,
  #global-menubar.menubar-global-menubar{
    overflow:visible!important;max-height:none!important;height:auto!important;
    min-height:var(--sb-menubar-h,36px)!important;flex-wrap:nowrap!important
  }
  #global-menubar .global-menu,
  #global-menubar.topbar-topbar .global-menu{
    position:relative!important;overflow:visible!important;flex:0 0 auto!important
  }
  #global-menubar .global-menu:not(.reports-menu)>.global-menu-popup,
  #global-menubar.topbar-topbar .global-menu:not(.reports-menu)>.global-menu-popup,
  #global-menubar .lists-menu>.global-menu-popup,
  #sb-menu-more>.global-menu-popup{
    position:absolute!important;top:100%!important;left:0!important;right:auto!important;
    z-index:40050!important;display:none;min-width:240px!important;
    max-width:min(320px,calc(100vw - 16px))!important;
    max-height:min(70vh,560px)!important;overflow-x:hidden!important;overflow-y:auto!important;
    visibility:hidden!important;clip:auto!important;clip-path:none!important
  }
  #global-menubar .global-menu.has-menu-cols>.global-menu-popup,
  #global-menubar .global-menu.has-menu-cols[data-sb-popup="fixed"]>.global-menu-popup,
  #sb-menu-more>.global-menu-popup>.global-menu.has-menu-cols>.global-menu-popup{
    min-width:0!important;
    max-width:min(920px,calc(100vw - 16px))!important;
    width:max-content!important;
    flex-wrap:nowrap!important;
    overflow:visible!important;
    max-height:none!important
  }
  #global-menubar .global-menu-popup:has(> .menu-col:only-child),
  #global-menubar .global-menu[data-sb-popup="fixed"]>.global-menu-popup:has(> .menu-col:only-child){
    min-width:0!important;
    max-width:min(280px,var(--sb-popup-max-w,280px))!important;
    width:max-content!important
  }
  #global-menubar .global-menu.open:not(.reports-menu)>.global-menu-popup,
  #global-menubar .lists-menu.open>.global-menu-popup,
  #sb-menu-more.open>.global-menu-popup{display:block!important;visibility:visible!important}
  #global-menubar .global-menu.has-menu-cols.open>.global-menu-popup{display:grid!important;visibility:visible!important}
  #global-menubar .global-menu.open[data-sb-popup="fixed"]:not(.reports-menu)>.global-menu-popup,
  #global-menubar .lists-menu.open[data-sb-popup="fixed"]>.global-menu-popup,
  #sb-menu-more.open[data-sb-popup="fixed"]>.global-menu-popup,
  #sb-menu-more.open[data-sb-popup="fixed"]>.global-menu-popup>.global-menu.open>.global-menu-popup{
    position:fixed!important;top:var(--sb-popup-top,36px)!important;left:var(--sb-popup-left,8px)!important;
    right:auto!important;width:auto!important;min-width:240px!important;
    max-width:var(--sb-popup-max-w,320px)!important;max-height:var(--sb-popup-max-h,70vh)!important
  }
  #global-menubar .global-menu.open.has-menu-cols[data-sb-popup="fixed"]>.global-menu-popup,
  #sb-menu-more.open[data-sb-popup="fixed"]>.global-menu-popup>.global-menu.has-menu-cols.open>.global-menu-popup{
    max-width:var(--sb-popup-max-w,920px)!important;
    width:max-content!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:auto!important
  }
  #global-menubar.sb-menu-tight .global-menu-button,
  #global-menubar.sb-menu-tight .global-menu-direct{
    padding:0 7px!important;font-size:12px!important
  }
  #global-menubar.sb-menu-tighter .global-menu-button,
  #global-menubar.sb-menu-tighter .global-menu-direct{
    padding:0 5px!important;font-size:11px!important
  }
  #global-menubar.sb-menu-tight .global-menu-popup,
  #global-menubar.sb-menu-tighter .global-menu-popup,
  #global-menubar.sb-menu-tight .global-menu[data-sb-popup="fixed"]>.global-menu-popup,
  #global-menubar.sb-menu-tighter .global-menu[data-sb-popup="fixed"]>.global-menu-popup{
    min-width:180px!important;padding:4px!important
  }
  #global-menubar.sb-menu-tight .global-menu-item,
  #global-menubar.sb-menu-tighter .global-menu-item,
  #global-menubar.sb-menu-tight .lists-menu-link,
  #global-menubar.sb-menu-tighter .lists-menu-link{
    padding:6px 8px!important;font-size:12px!important
  }
  #global-menubar.sb-menu-tighter .global-menu-item,
  #global-menubar.sb-menu-tighter .lists-menu-link{
    padding:5px 7px!important;font-size:11px!important
  }
  body.sb-menu-compact #global-menubar .global-menu-popup,
  #sb-menu-more>.global-menu-popup{
    min-width:180px!important;max-width:min(240px,calc(100vw - 16px))!important;
    overflow:auto!important;max-height:var(--sb-popup-max-h,60vh)!important
  }
  body.sb-menu-compact #global-menubar .global-menu-item,
  body.sb-menu-compact #global-menubar .lists-menu-link,
  #sb-menu-more .global-menu-button{
    padding:5px 8px!important;font-size:12px!important
  }
}

html[data-theme="dark"] #global-menubar .global-menu-button:hover,
html[data-theme="dark"] #global-menubar .global-menu-direct:hover,
html[data-theme="dark"] #global-menubar .global-menu.open>.global-menu-button,
body.dark #global-menubar .global-menu-button:hover,
body.dark #global-menubar .global-menu-direct:hover,
body.dark #global-menubar .global-menu.open>.global-menu-button{
  background:rgba(255,255,255,.16)!important;color:#fff!important
}
.sidebar-toggle,#sidebar-toggle{
  display:grid!important;visibility:visible!important;opacity:1!important;
  pointer-events:auto!important;position:fixed!important;z-index:2147483000!important;
  top:118px!important;cursor:pointer!important
}
.top-actions #sb-search,.sb-search{
  display:block!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important
}
#app .sb-legacy-search-hidden,
.ex-search.sb-legacy-search-hidden{
  position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;
  overflow:hidden!important;clip:rect(0,0,0,0)!important;border:0!important;opacity:0!important;
  pointer-events:none!important;left:-9999px!important
}
html[data-theme="dark"] #app .sb-search-row-hit,
html[data-theme="dark"] #app tr.sb-search-row-hit,
body.dark #app .sb-search-row-hit,
body.dark #app tr.sb-search-row-hit{
  outline-color:#1d4e89;background:rgba(12,35,64,.22)
}
html[data-theme="dark"] .dash-ranges,
body.dark .dash-ranges{
  background:#0f1c2b!important
}
html[data-theme="dark"] .dash-ranges button,
body.dark .dash-ranges button{
  background:transparent!important;color:#d7e0ea!important
}
html[data-theme="dark"] .dash-ranges button.active,
body.dark .dash-ranges button.active{
  background:#1a2d42!important;color:#d5e4f7!important;box-shadow:0 0 0 1px #16365c!important
}

html[data-theme="dark"] header.topbar,
html[data-theme="dark"] .topbar,
body.dark header.topbar,
body.dark .topbar{
  display:flex!important;visibility:visible!important;opacity:1!important;
  background:#081a2c!important;color:#f4f8ff!important;
  border-bottom-color:#243d56!important
}
html[data-theme="dark"] .topbar h1,
html[data-theme="dark"] #page-title,
body.dark .topbar h1,
body.dark #page-title{color:#f4f8ff!important}
html[data-theme="dark"] .topbar p,
html[data-theme="dark"] #page-subtitle,
body.dark .topbar p,
body.dark #page-subtitle{color:#9eb4c9!important}
html[data-theme="dark"] header.topbar .icon-btn,
html[data-theme="dark"] header.topbar .theme-toggle,
body.dark header.topbar .icon-btn{
  background:#0b1c2e!important;color:#f4f8ff!important;border-color:#3d5d7a!important
}
html[data-theme="dark"] .sb-search-wrap,
body.dark .sb-search-wrap{background:#0b1c2e!important;border-color:#3d5d7a!important}
html[data-theme="dark"] .sb-search-mark,body.dark .sb-search-mark{background:#d5e4f7!important}
html[data-theme="dark"] .sb-search-scope,
body.dark .sb-search-scope{color:#d7e6f8!important;background:#16324a!important}
html[data-theme="dark"] .sb-search,
html[data-theme="dark"] .top-actions #sb-search,
body.dark .sb-search{
  background:transparent!important;color:#f4f8ff!important;border-color:transparent!important
}
html[data-theme="dark"] #global-menubar,
html[data-theme="dark"] #global-menubar.global-menubar,
html[data-theme="dark"] #global-menubar.topbar-topbar,
html[data-theme="dark"] #global-menubar.center-topmost-menu,
html[data-theme="dark"] #global-menubar.topmenu-topmost-menu,
html[data-theme="dark"] #global-menubar.authmenu-authorized-menu,
html[data-theme="dark"] #global-menubar.menubar-global-menubar,
body.dark #global-menubar{
  background:#061525!important;color:#f4f8ff!important;
  border-bottom-color:#1c3852!important
}
html[data-theme="dark"] #global-menubar .global-menu-button,
html[data-theme="dark"] #global-menubar .global-menu-direct,
html[data-theme="dark"] #global-menubar.topbar-topbar .global-menu-button,
html[data-theme="dark"] #global-menubar.topbar-topbar .global-menu-direct,
html[data-theme="dark"] #global-menubar .topbar-tools .icon-btn,
html[data-theme="dark"] #global-menubar .topbar-tools .theme-toggle,
body.dark #global-menubar .global-menu-button,
body.dark #global-menubar .global-menu-direct{
  color:#f4f8ff!important;background:transparent!important
}
html[data-theme="dark"] #global-menubar .global-menu-button:hover,
html[data-theme="dark"] #global-menubar .global-menu-direct:hover,
html[data-theme="dark"] #global-menubar .global-menu.open>.global-menu-button,
body.dark #global-menubar .global-menu-button:hover{
  color:#fff!important;background:rgba(255,255,255,.12)!important
}
html[data-theme="dark"] #global-menubar .global-menu-popup,
body.dark #global-menubar .global-menu-popup{
  background:#12283e!important;color:#f4f8ff!important;border-color:#35506b!important
}
html[data-theme="dark"] #global-menubar .global-menu-item,
body.dark #global-menubar .global-menu-item{color:#f4f8ff!important}
html[data-theme="dark"] #global-menubar .global-menu-item:hover,
body.dark #global-menubar .global-menu-item:hover{background:#24425e!important}



/* Mobile workspace authority — consolidated */



/* ESB_MOBILE_REBUILD_START */

@media screen and (max-width:1000px){

  :root{
    --esb-mobile-menu-h:36px;
    --esb-mobile-toolbar-h:44px;
    --esb-mobile-chrome-h:80px;
    --esb-mobile-drawer-w:210px;
    --esb-mobile-gap:5px;
  }


  /* ==========================================================
     VIEWPORT
     ========================================================== */

  html,
  body{
    width:100%!important;
    max-width:100%!important;

    margin:0!important;
    padding:0!important;

    overflow-x:hidden!important;

    -webkit-text-size-adjust:100%;
    text-size-adjust:100%;
  }


  body[data-auth-state="authenticated"] main{

    width:100%!important;
    max-width:100%!important;
    min-width:0!important;

    margin-left:0!important;

    padding-top:
      var(--esb-mobile-chrome-h)!important;

    min-height:100dvh!important;

    overflow-x:hidden!important;

    box-sizing:border-box!important;
  }


  body[data-auth-state="authenticated"]
  #app,

  body[data-auth-state="authenticated"]
  #app.content{

    width:100%!important;
    max-width:100%!important;
    min-width:0!important;

    margin:0!important;

    padding:5px!important;

    overflow-x:hidden!important;

    box-sizing:border-box!important;
  }


  body[data-auth-state="authenticated"]
  #app > *{

    max-width:100%!important;
    min-width:0!important;

    box-sizing:border-box!important;
  }


  /* ==========================================================
     SLIM MOBILE DRAWER
     ========================================================== */

  body[data-auth-state="authenticated"]
  aside.sidebar{

    position:fixed!important;

    top:0!important;
    left:0!important;
    bottom:0!important;

    width:
      min(
        var(--esb-mobile-drawer-w),
        68vw
      )!important;

    max-width:68vw!important;

    padding:8px 7px!important;

    display:flex!important;

    flex-direction:column!important;

    transform:
      translateX(-105%)!important;

    transition:
      transform .18s ease!important;

    overflow-x:hidden!important;
    overflow-y:auto!important;

    overscroll-behavior:contain!important;

    border-right:
      1px solid
      rgba(255,255,255,.12)!important;

    box-shadow:
      7px 0 22px
      rgba(0,0,0,.18)!important;

    z-index:12000!important;
  }


  body[data-auth-state="authenticated"]
  aside.sidebar.open{

    transform:
      translateX(0)!important;
  }


  /* ==========================================================
     LOGO / BRAND
     ========================================================== */

  body[data-auth-state="authenticated"]
  aside.sidebar .brand{

    display:grid!important;

    grid-template-columns:
      32px minmax(0,1fr)!important;

    align-items:center!important;

    gap:7px!important;

    min-height:42px!important;

    margin:0 0 6px!important;

    padding:4px 4px 7px!important;

    border-bottom:
      1px solid
      rgba(255,255,255,.13)!important;
  }


  body[data-auth-state="authenticated"]
  aside.sidebar .brandmark{

    display:block!important;

    width:32px!important;
    min-width:32px!important;
    max-width:32px!important;

    height:32px!important;
    min-height:32px!important;
    max-height:32px!important;

    margin:0!important;
    padding:0!important;

    object-fit:contain!important;

    border-radius:50%!important;

    background:transparent!important;

    visibility:visible!important;
    opacity:1!important;

    filter:none!important;
    mix-blend-mode:normal!important;
    forced-color-adjust:none;

    box-shadow:none!important;
  }


  body[data-auth-state="authenticated"]
  aside.sidebar .brand > div{

    min-width:0!important;

    overflow:hidden!important;
  }


  body[data-auth-state="authenticated"]
  aside.sidebar .brand strong{

    display:block!important;

    margin:0!important;

    font-size:11.5px!important;

    line-height:1.05!important;

    white-space:nowrap!important;

    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }


  body[data-auth-state="authenticated"]
  aside.sidebar .brand small{

    display:block!important;

    margin:2px 0 0!important;

    font-size:8px!important;

    line-height:1.1!important;

    white-space:nowrap!important;

    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }


  /* ==========================================================
     CREATE BUTTON
     ========================================================== */

  body[data-auth-state="authenticated"]
  aside.sidebar .create-btn{

    width:100%!important;

    min-height:29px!important;

    margin:0 0 6px!important;

    padding:4px 7px!important;

    border-radius:4px!important;

    font-size:9.5px!important;

    line-height:1!important;

    box-shadow:none!important;
  }


  /* ==========================================================
     MOBILE NAVIGATION
     ========================================================== */

  body[data-auth-state="authenticated"]
  aside.sidebar #nav{

    width:100%!important;

    min-width:0!important;

    display:grid!important;

    gap:1px!important;

    padding:0!important;
  }


  body[data-auth-state="authenticated"]
  aside.sidebar #nav .nav-section-label,

  body[data-auth-state="authenticated"]
  aside.sidebar #nav .nav-group-title{

    margin:6px 4px 2px!important;

    padding:0!important;

    font-size:7.5px!important;

    font-weight:700!important;

    letter-spacing:.08em!important;
  }


  body[data-auth-state="authenticated"]
  aside.sidebar #nav .nav-item{

    width:100%!important;

    min-height:29px!important;

    display:grid!important;

    grid-template-columns:
      20px minmax(0,1fr)!important;

    align-items:center!important;

    gap:6px!important;

    padding:4px 5px!important;

    border-radius:4px!important;

    font-size:9.5px!important;

    line-height:1.1!important;

    overflow:hidden!important;
  }


  body[data-auth-state="authenticated"]
  aside.sidebar #nav
  .nav-item > span:first-child{

    width:20px!important;
    min-width:20px!important;

    height:20px!important;

    display:grid!important;

    place-items:center!important;
  }


  body[data-auth-state="authenticated"]
  aside.sidebar #nav .nav-svg{

    width:15px!important;
    height:15px!important;

    max-width:15px!important;
    max-height:15px!important;
  }


  body[data-auth-state="authenticated"]
  aside.sidebar #nav .nav-item b{

    min-width:0!important;

    font-size:9.5px!important;

    font-weight:600!important;

    white-space:nowrap!important;

    overflow:hidden!important;

    text-overflow:ellipsis!important;
  }


  body[data-auth-state="authenticated"]
  aside.sidebar #nav .nav-item.active{

    font-weight:700!important;

    box-shadow:
      inset 3px 0 0
      var(--green,#0c2340)!important;
  }


  body[data-auth-state="authenticated"]
  aside.sidebar .sidebar-foot{

    margin-top:auto!important;

    padding:7px 4px 3px!important;

    font-size:8px!important;

    line-height:1.2!important;
  }


  body[data-auth-state="authenticated"]
  aside.sidebar .sidebar-foot small{

    font-size:7.5px!important;
  }


  body[data-auth-state="authenticated"]
  #sidebar-toggle,

  body[data-auth-state="authenticated"]
  .sidebar-toggle{

    display:none!important;

    visibility:hidden!important;

    opacity:0!important;

    pointer-events:none!important;
  }


  /* ==========================================================
     TOP APPLICATION MENU
     ========================================================== */

  body[data-auth-state="authenticated"]
  #global-menubar,

  body[data-auth-state="authenticated"]
  #global-menubar.global-menubar{

    position:fixed!important;

    top:0!important;
    left:0!important;
    right:0!important;

    width:100%!important;
    max-width:100%!important;

    height:
      var(--esb-mobile-menu-h)!important;

    min-height:
      var(--esb-mobile-menu-h)!important;

    max-height:
      var(--esb-mobile-menu-h)!important;

    display:flex!important;

    align-items:center!important;

    flex-direction:row!important;
    flex-wrap:nowrap!important;

    gap:1px!important;

    padding:2px 4px!important;

    overflow-x:auto!important;
    overflow-y:hidden!important;

    white-space:nowrap!important;

    scrollbar-width:none!important;

    -webkit-overflow-scrolling:touch!important;

    overscroll-behavior-x:contain!important;

    scroll-snap-type:x proximity!important;

    visibility:visible!important;
    opacity:1!important;

    background:
      var(--panel,#fff)!important;

    border-bottom:
      1px solid
      var(--line,#d5dee8)!important;

    box-sizing:border-box!important;

    z-index:8000!important;
  }


  body[data-auth-state="authenticated"]
  #global-menubar::-webkit-scrollbar{

    display:none!important;
  }


  body[data-auth-state="authenticated"]
  #global-menubar > .global-menu,

  body[data-auth-state="authenticated"]
  #global-menubar > .global-menu-direct{

    flex:0 0 auto!important;

    min-width:max-content!important;

    scroll-snap-align:start!important;
  }


  body[data-auth-state="authenticated"]
  #global-menubar .global-menu-button,

  body[data-auth-state="authenticated"]
  #global-menubar .global-menu-direct{

    height:29px!important;

    min-height:29px!important;

    padding:0 7px!important;

    border-radius:4px!important;

    font-size:10px!important;

    line-height:29px!important;

    white-space:nowrap!important;
  }


  /* ==========================================================
     TOP MENU DROPDOWN
     ========================================================== */

  body[data-auth-state="authenticated"]
  #global-menubar
  .global-menu.open >
  .global-menu-popup{

    position:fixed!important;

    top:
      var(--esb-mobile-chrome-h)!important;

    left:4px!important;

    width:
      calc(100vw - 8px)!important;

    min-width:0!important;

    max-width:
      calc(100vw - 8px)!important;

    max-height:
      calc(
        100dvh -
        var(--esb-mobile-chrome-h) -
        6px
      )!important;

    padding:5px!important;

    display:block!important;

    overflow-x:hidden!important;
    overflow-y:auto!important;

    white-space:normal!important;

    border-radius:6px!important;

    box-sizing:border-box!important;

    z-index:12500!important;
  }


  body[data-auth-state="authenticated"]
  #global-menubar
  .global-menu.has-menu-cols.open >
  .global-menu-popup{

    display:grid!important;

    grid-template-columns:1fr!important;

    grid-auto-flow:row!important;

    column-count:1!important;
  }


  body[data-auth-state="authenticated"]
  #global-menubar .global-menu-item{

    width:100%!important;

    min-height:35px!important;

    padding:5px 8px!important;

    font-size:10.5px!important;

    white-space:normal!important;
  }


  /* ==========================================================
     SECOND TOOLBAR
     ========================================================== */

  body[data-auth-state="authenticated"]
  header.topbar{

    position:fixed!important;

    top:
      var(--esb-mobile-menu-h)!important;

    left:0!important;
    right:0!important;

    width:100%!important;

    height:
      var(--esb-mobile-toolbar-h)!important;

    min-height:
      var(--esb-mobile-toolbar-h)!important;

    max-height:
      var(--esb-mobile-toolbar-h)!important;

    display:flex!important;

    align-items:center!important;

    gap:3px!important;

    padding:4px!important;

    overflow:hidden!important;

    background:
      var(--panel,#fff)!important;

    border-bottom:
      1px solid
      var(--line,#d5dee8)!important;

    box-sizing:border-box!important;

    z-index:7900!important;
  }


  body[data-auth-state="authenticated"]
  header.topbar > div:first-child{

    flex:0 0 30px!important;

    width:30px!important;
    min-width:30px!important;
    max-width:30px!important;

    overflow:visible!important;
  }


  body[data-auth-state="authenticated"]
  #mobile-menu{

    display:inline-grid!important;

    place-items:center!important;

    width:30px!important;
    min-width:30px!important;
    max-width:30px!important;

    height:30px!important;

    margin:0!important;

    padding:0!important;

    border-radius:4px!important;

    font-size:16px!important;
  }


  body[data-auth-state="authenticated"]
  header.topbar #page-title,

  body[data-auth-state="authenticated"]
  header.topbar #page-subtitle{

    display:none!important;
  }


  body[data-auth-state="authenticated"]
  header.topbar .top-actions{

    flex:1 1 auto!important;

    min-width:0!important;

    display:flex!important;

    align-items:center!important;

    gap:3px!important;

    margin-left:auto!important;

    overflow:hidden!important;
  }


  body[data-auth-state="authenticated"]
  header.topbar #sb-search,

  body[data-auth-state="authenticated"]
  header.topbar .sb-search{

    flex:1 1 auto!important;

    width:auto!important;

    min-width:0!important;
    max-width:none!important;

    height:28px!important;

    padding:0 7px!important;

    border-radius:4px!important;

    font-size:10.5px!important;

    box-sizing:border-box!important;
  }


  body[data-auth-state="authenticated"]
  header.topbar .sb-privacy-bar{

    flex:0 0 30px!important;

    width:30px!important;
    min-width:30px!important;

    display:flex!important;

    align-items:center!important;

    justify-content:center!important;

    overflow:hidden!important;

    font-size:0!important;
  }


  body[data-auth-state="authenticated"]
  header.topbar #sb-privacy-toggle{

    transform:
      scale(.78)!important;

    transform-origin:center!important;
  }


  body[data-auth-state="authenticated"]
  header.topbar #theme-toggle,

  body[data-auth-state="authenticated"]
  header.topbar .theme-toggle,

  body[data-auth-state="authenticated"]
  header.topbar .avatar{

    flex:0 0 27px!important;

    width:27px!important;
    min-width:27px!important;
    max-width:27px!important;

    height:27px!important;
    min-height:27px!important;
    max-height:27px!important;

    padding:0!important;
  }


  /* ==========================================================
     OWNER DASHBOARD
     Desktop-like layout scaled to phone width.
     ========================================================== */

  body[data-auth-state="authenticated"]
  #app .esb-owner-hero{

    width:100%!important;

    margin:0 0 5px!important;

    padding:6px 7px!important;

    border:
      1px solid
      var(--line,#d5dee8)!important;

    border-radius:6px!important;

    background:
      var(--panel,#fff)!important;

    box-shadow:none!important;

    overflow:hidden!important;
  }


  body[data-auth-state="authenticated"]
  #app .esb-owner-hero .eyebrow{

    display:block!important;

    margin:0 0 1px!important;

    font-size:7.5px!important;

    font-weight:700!important;

    color:
      var(--green,#0c2340)!important;
  }


  body[data-auth-state="authenticated"]
  #app .esb-owner-hero h2{

    margin:0 0 5px!important;

    font-size:14px!important;

    line-height:1.08!important;
  }


  body[data-auth-state="authenticated"]
  #app .esb-owner-hero p{

    display:none!important;
  }


  /* Five owner actions visible together. */

  body[data-auth-state="authenticated"]
  #app .esb-owner-hero
  .hero-actions{

    display:grid!important;

    grid-template-columns:
      repeat(5,minmax(0,1fr))!important;

    gap:3px!important;

    width:100%!important;

    margin:0!important;

    overflow:visible!important;
  }


  body[data-auth-state="authenticated"]
  #app .esb-owner-hero
  .hero-actions .btn{

    width:100%!important;

    min-width:0!important;

    height:28px!important;
    min-height:28px!important;

    padding:0 3px!important;

    border-radius:4px!important;

    font-size:8px!important;

    line-height:26px!important;

    white-space:nowrap!important;

    overflow:hidden!important;

    text-overflow:ellipsis!important;
  }


  /* ==========================================================
     OTHER ACTION ROWS
     ========================================================== */

  body[data-auth-state="authenticated"]
  #app .page-actions,

  body[data-auth-state="authenticated"]
  #app .tabs,

  body[data-auth-state="authenticated"]
  #app .tab-row{

    width:100%!important;

    min-width:0!important;

    display:flex!important;

    flex-direction:row!important;
    flex-wrap:nowrap!important;

    align-items:center!important;

    gap:4px!important;

    overflow-x:auto!important;
    overflow-y:hidden!important;

    scrollbar-width:none!important;

    -webkit-overflow-scrolling:touch!important;
  }


  body[data-auth-state="authenticated"]
  #app .page-actions::-webkit-scrollbar,

  body[data-auth-state="authenticated"]
  #app .tabs::-webkit-scrollbar,

  body[data-auth-state="authenticated"]
  #app .tab-row::-webkit-scrollbar{

    display:none!important;
  }


  /* ==========================================================
     OWNER KPI STRIP
     Four cards in ONE row, like desktop but scaled down.
     ========================================================== */

  html body[data-auth-state="authenticated"]
  #app .cards.dashboard-kpis.esb-kpi-row,

  html body[data-auth-state="authenticated"]
  #app .esb-owner-hero +
  .cards.dashboard-kpis{

    display:grid!important;

    grid-template-columns:
      repeat(4,minmax(0,1fr))!important;

    grid-auto-flow:row!important;

    gap:4px!important;

    width:100%!important;

    margin:0 0 6px!important;

    padding:0!important;

    overflow:visible!important;

    box-sizing:border-box!important;
  }


  html body[data-auth-state="authenticated"]
  #app .cards.dashboard-kpis.esb-kpi-row
  > .metric,

  html body[data-auth-state="authenticated"]
  #app .esb-owner-hero +
  .cards.dashboard-kpis > .metric{

    width:100%!important;

    min-width:0!important;
    max-width:100%!important;

    height:58px!important;
    min-height:58px!important;
    max-height:58px!important;

    margin:0!important;

    padding:5px!important;

    border-radius:5px!important;

    box-shadow:none!important;

    overflow:hidden!important;

    box-sizing:border-box!important;
  }


  html body[data-auth-state="authenticated"]
  #app .cards.dashboard-kpis
  .metric small{

    display:block!important;

    margin:0 0 2px!important;

    font-size:11px!important;

    font-weight:700!important;

    line-height:1!important;

    white-space:nowrap!important;

    overflow:hidden!important;

    text-overflow:ellipsis!important;
  }


  html body[data-auth-state="authenticated"]
  #app .cards.dashboard-kpis
  .metric strong{

    display:block!important;

    margin:0 0 2px!important;

    font-size:14px!important;

    line-height:1!important;

    font-variant-numeric:
      tabular-nums!important;
  }


  html body[data-auth-state="authenticated"]
  #app .cards.dashboard-kpis
  .metric em{

    display:block!important;

    font-size:11px!important;

    line-height:1!important;

    white-space:nowrap!important;

    overflow:hidden!important;

    text-overflow:ellipsis!important;
  }


  /* ==========================================================
     GENERAL KPIs ON OTHER PAGES
     ========================================================== */

  html body[data-auth-state="authenticated"]
  #app .platform-kpis,

  html body[data-auth-state="authenticated"]
  #app .ex-summary,

  html body[data-auth-state="authenticated"]
  #app .sb-funnel,

  html body[data-auth-state="authenticated"]
  #app .center-kpis{

    display:grid!important;

    grid-template-columns:
      repeat(2,minmax(0,1fr))!important;

    gap:5px!important;

    width:100%!important;

    overflow:visible!important;
  }


  /* ==========================================================
     PANELS
     ========================================================== */

  html body[data-auth-state="authenticated"]
  #app .panel,

  html body[data-auth-state="authenticated"]
  #app .form-card{

    width:100%!important;
    max-width:100%!important;

    min-width:0!important;

    margin:0 0 6px!important;

    border-radius:6px!important;

    box-shadow:none!important;

    overflow:hidden!important;

    box-sizing:border-box!important;
  }


  html body[data-auth-state="authenticated"]
  #app .panel-head{

    display:grid!important;

    grid-template-columns:
      minmax(0,1fr) auto!important;

    align-items:center!important;

    gap:3px 5px!important;

    min-height:36px!important;

    padding:5px 7px!important;
  }


  html body[data-auth-state="authenticated"]
  #app .panel-head h2,

  html body[data-auth-state="authenticated"]
  #app .panel-head h3{

    min-width:0!important;

    margin:0!important;

    font-size:11px!important;

    line-height:1.1!important;
  }


  html body[data-auth-state="authenticated"]
  #app .panel-head .panel-subtitle{

    display:none!important;
  }


  html body[data-auth-state="authenticated"]
  #app .panel-head .btn{

    height:27px!important;

    min-height:27px!important;

    padding:0 7px!important;

    font-size:8.75px!important;
  }


  /* ==========================================================
     GENERAL TABLES
     ========================================================== */

  html body[data-auth-state="authenticated"]
  #app .table-wrap,

  html body[data-auth-state="authenticated"]
  #app .qr-table-wrap,

  html body[data-auth-state="authenticated"]
  #app .table-scroll{

    position:relative!important;

    width:100%!important;
    max-width:100%!important;
    min-width:0!important;

    overflow-x:auto!important;
    overflow-y:visible!important;

    -webkit-overflow-scrolling:touch!important;

    overscroll-behavior-x:contain!important;

    scrollbar-width:thin!important;

    box-sizing:border-box!important;
  }


  html body[data-auth-state="authenticated"]
  #app .table-wrap table:not([data-esb-preserve-format]),

  html body[data-auth-state="authenticated"]
  #app .qr-table-wrap table:not([data-esb-preserve-format]),

  html body[data-auth-state="authenticated"]
  #app .table-scroll table:not([data-esb-preserve-format]){

    width:100%!important;

    min-width:0!important;
    max-width:none!important;

    margin:0!important;

    table-layout:auto!important;

    border-collapse:separate!important;
    border-spacing:0!important;

    font-size:13px!important;

    font-variant-numeric:
      tabular-nums!important;
  }


  html body[data-auth-state="authenticated"]
  #app .table-wrap thead th,

  html body[data-auth-state="authenticated"]
  #app .qr-table-wrap thead th,

  html body[data-auth-state="authenticated"]
  #app .table-scroll thead th{

    position:sticky!important;

    top:0!important;

    z-index:4!important;

    height:auto!important;

    min-height:25px!important;

    padding:4px 8px!important;

    font-size:11px!important;

    font-weight:700!important;

    line-height:1.2!important;

    white-space:nowrap!important;

    overflow-wrap:normal!important;

    word-break:normal!important;
  }


  html body[data-auth-state="authenticated"]
  #app .table-wrap tbody td,

  html body[data-auth-state="authenticated"]
  #app .qr-table-wrap tbody td,

  html body[data-auth-state="authenticated"]
  #app .table-scroll tbody td{

    height:auto!important;

    min-height:28px!important;

    padding:4px 8px!important;

    font-size:13px!important;

    line-height:1.35!important;

    white-space:nowrap!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }


  html body[data-auth-state="authenticated"]
  #app table .num,

  html body[data-auth-state="authenticated"]
  #app table .amount,

  html body[data-auth-state="authenticated"]
  #app table .money,

  html body[data-auth-state="authenticated"]
  #app table .sb-amt{

    text-align:right!important;

    font-variant-numeric:
      tabular-nums!important;
  }


  /* ==========================================================
     OWNER INBOX TABLE
     Desktop-like preview scaled to fit phone.
     Keep five information columns; hide delete action.
     ========================================================== */

  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox
  .table-wrap{

    width:100%!important;
    max-width:100%!important;

    max-height:190px!important;

    overflow-x:hidden!important;
    overflow-y:auto!important;

    scrollbar-width:none!important;
  }


  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox
  .table-wrap::-webkit-scrollbar{

    display:none!important;
  }


  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox table{

    width:100%!important;

    min-width:0!important;
    max-width:100%!important;

    table-layout:fixed!important;
  }


  /* Hide dashboard-only delete action.
     Full Inbox keeps all actions. */

  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox
  th:nth-child(6),

  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox
  td:nth-child(6){

    display:none!important;
  }


  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox
  th:nth-child(1),

  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox
  td:nth-child(1){

    position:static!important;

    width:16%!important;
  }


  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox
  th:nth-child(2),

  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox
  td:nth-child(2){

    width:15%!important;
  }


  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox
  th:nth-child(3),

  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox
  td:nth-child(3){

    width:20%!important;
  }


  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox
  th:nth-child(4),

  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox
  td:nth-child(4){

    width:31%!important;
  }


  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox
  th:nth-child(5),

  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox
  td:nth-child(5){

    width:18%!important;
  }


  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox th{

    height:23px!important;

    padding:3px!important;

    font-size:6.25px!important;

    overflow:hidden!important;

    text-overflow:ellipsis!important;

    white-space:nowrap!important;
  }


  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox td{

    height:26px!important;

    padding:3px!important;

    font-size:7.25px!important;

    overflow:hidden!important;

    text-overflow:ellipsis!important;

    white-space:nowrap!important;
  }


  html body[data-auth-state="authenticated"]
  #app .esb-owner-inbox
  td .muted{

    display:none!important;
  }


  /* ==========================================================
     FORMS / SPLITS
     ========================================================== */

  html body[data-auth-state="authenticated"]
  #app .split,

  html body[data-auth-state="authenticated"]
  #app .split-layout,

  html body[data-auth-state="authenticated"]
  #app .form-grid,

  html body[data-auth-state="authenticated"]
  #app .two-col,

  html body[data-auth-state="authenticated"]
  #app .three-col{

    grid-template-columns:
      1fr!important;

    min-width:0!important;
    max-width:100%!important;
  }


  html body[data-auth-state="authenticated"]
  #app input,

  html body[data-auth-state="authenticated"]
  #app select,

  html body[data-auth-state="authenticated"]
  #app textarea{

    max-width:100%!important;

    box-sizing:border-box!important;
  }


  /* ==========================================================
     VERY SMALL PHONE
     ========================================================== */

  @media(max-width:340px){

    :root{
      --esb-mobile-drawer-w:198px;
    }


    body[data-auth-state="authenticated"]
    header.topbar .sb-privacy-bar{

      display:none!important;
    }


    body[data-auth-state="authenticated"]
    #app .esb-owner-hero
    .hero-actions .btn{

      font-size:7.25px!important;
    }


    html body[data-auth-state="authenticated"]
    #app .cards.dashboard-kpis
    .metric small,

    html body[data-auth-state="authenticated"]
    #app .cards.dashboard-kpis
    .metric em{

      font-size:6.25px!important;
    }

  }

}

/* ESB_MOBILE_REBUILD_END */


/* Account and settings — same navy as the rest of dark theme */
html[data-theme="dark"] .sb-settings,
html[data-theme="dark"] .sb-settings-cover .sb-settings{
  background:var(--panel,#0e2136)!important;
  border-color:var(--line,#2a4560)!important;
  color:var(--ink,#eef4fb)!important
}
html[data-theme="dark"] .sb-settings-cover{
  background:var(--bg,#071422)!important
}
html[data-theme="dark"] .sb-settings-nav{
  background:#061525!important;
  border-color:var(--line,#2a4560)!important;
  color:var(--ink,#eef4fb)!important
}
html[data-theme="dark"] .sb-settings-nav button{
  color:#c5d6e8!important;
  background:transparent!important
}
html[data-theme="dark"] .sb-settings-nav button:hover{
  background:#12324d!important;
  color:#f4f8ff!important
}
html[data-theme="dark"] .sb-settings-nav button.active{
  background:var(--panel,#0e2136)!important;
  color:#c5d4e6!important;
  border-left-color:#0c2340!important
}
html[data-theme="dark"] .sb-settings-main,
html[data-theme="dark"] .sb-pref-card,
html[data-theme="dark"] .sb-pref-body,
html[data-theme="dark"] .sb-settings .cap-section,
html[data-theme="dark"] .sb-settings .form-card,
html[data-theme="dark"] .sb-settings .capability-card,
html[data-theme="dark"] .sb-settings .panel{
  background:var(--panel,#0e2136)!important;
  color:var(--ink,#eef4fb)!important;
  border-color:var(--line,#2a4560)!important
}
html[data-theme="dark"] .sb-settings-title,
html[data-theme="dark"] .sb-settings h2,
html[data-theme="dark"] .sb-settings h3,
html[data-theme="dark"] .sb-row-label,
html[data-theme="dark"] .sb-pref-row,
html[data-theme="dark"] .sb-pref-row > label,
html[data-theme="dark"] .sb-pref-row > span,
html[data-theme="dark"] .sb-settings label,
html[data-theme="dark"] .sb-settings .field>label,
html[data-theme="dark"] .sb-settings .field>span{
  color:#f4f8ff!important
}
html[data-theme="dark"] .sb-settings-lede,
html[data-theme="dark"] .sb-settings .side-note,
html[data-theme="dark"] .sb-pref-row > small,
html[data-theme="dark"] .sb-settings .field > small,
html[data-theme="dark"] .sb-settings .muted{
  color:var(--muted,#9eb4c9)!important
}
html[data-theme="dark"] .sb-pref-card>.panel-head,
html[data-theme="dark"] .sb-pref-card>h2,
html[data-theme="dark"] .sb-pref-card>h3,
html[data-theme="dark"] .sb-pref-head,
html[data-theme="dark"] .sb-pref-foot,
html[data-theme="dark"] .sb-settings .cap-section>h3{
  background:#12324d!important;
  border-color:var(--line,#2a4560)!important;
  color:#f4f8ff!important
}
html[data-theme="dark"] .sb-pref-row,
html[data-theme="dark"] .sb-settings .check-grid label.sb-pref-row,
html[data-theme="dark"] .sb-settings .form-grid > .field.sb-pref-row{
  border-bottom-color:var(--line,#2a4560)!important;
  color:#eef4fb!important;
  background:transparent!important
}
html[data-theme="dark"] .sb-settings .sb-pref-card .side-note,
html[data-theme="dark"] .sb-settings .cap-section .side-note{
  background:#071422!important;
  color:var(--muted,#9eb4c9)!important;
  border:0!important
}
html[data-theme="dark"] .sb-settings input:not([type=checkbox]):not([type=radio]),
html[data-theme="dark"] .sb-settings select,
html[data-theme="dark"] .sb-settings textarea,
html[data-theme="dark"] .sb-settings .sb-search-select-input{
  background:#071422!important;
  color:#eef4fb!important;
  border-color:#3d5d7a!important
}
html[data-theme="dark"] .sb-settings select:disabled,
html[data-theme="dark"] .sb-settings input:disabled{
  background:#12324d!important;
  color:#9eb4c9!important
}
html[data-theme="dark"] .sb-settings-savebar{
  background:linear-gradient(transparent,#0e2136 28%)!important
}
html[data-theme="dark"] .sb-chip{
  background:#12324d!important;
  border-color:#3d5d7a!important;
  color:#eef4fb!important
}
html[data-theme="dark"] .sb-chip-home{
  background:#0c2340!important;
  border-color:#16365c!important;
  color:#c5d4e6!important
}
html[data-theme="dark"] .sb-settings .check-grid input[type=checkbox],
html[data-theme="dark"] .sb-settings .sb-pref-row input[type=checkbox]{
  appearance:none!important;-webkit-appearance:none!important;
  width:42px!important;height:24px!important;min-width:42px!important;max-width:42px!important;
  flex:none!important;background:#3d5d7a!important;border:0!important;border-radius:999px!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.14)!important;accent-color:#0c2340
}
html[data-theme="dark"] .sb-settings .check-grid input[type=checkbox]:checked,
html[data-theme="dark"] .sb-settings .sb-pref-row input[type=checkbox]:checked{
  background:#0c2340!important
}
html[data-theme="dark"] .sb-settings .check-grid input[type=checkbox]::after,
html[data-theme="dark"] .sb-settings .sb-pref-row input[type=checkbox]::after{
  background:#fff!important
}

html[data-theme="dark"] .dashMain{
  --ink:#eef4fb;
  --muted:#b4c3d4;
  --panel:#0e2136;
  --line:#2a4560;
  color:var(--ink)
}
html[data-theme="dark"] .dash-hero{
  color:#fff!important
}
html[data-theme="dark"] .dash-hero h2,
html[data-theme="dark"] .dash-hero p{
  color:#fff!important
}
html[data-theme="dark"] .dash-hero .btn{
  background:rgba(255,255,255,.16)!important;
  color:#fff!important;
  border-color:transparent!important
}
html[data-theme="dark"] .dash-hero .btn.primary{
  background:#16365c !important;
  border-color:#63829e !important;
  color:#fff !important;
}
html[data-theme="dark"] .dash-ranges{
  background:rgba(255,255,255,.16)!important;
  border:0!important;
  box-shadow:none!important
}
html[data-theme="dark"] .dash-ranges button{
  color:#e8f1ff!important;
  background:transparent!important
}
html[data-theme="dark"] .dash-ranges button.active{
  background:#fff!important;
  color:#0b2744!important
}
html[data-theme="dark"] .dash-block>h3{
  color:#b4c3d4!important
}
html[data-theme="dark"] .dash-head h2,
html[data-theme="dark"] .dashMain .panel h2{
  color:#f4f8ff!important
}
html[data-theme="dark"] .dashMain .panel{
  background:var(--panel)!important;
  border-color:var(--line)!important;
  color:var(--ink)!important
}
html[data-theme="dark"] .dashMain .panel .btn{
  background:#143049!important;
  color:#eaf3ff!important;
  border-color:#2a4560!important
}
html[data-theme="dark"] .dash-kpis button,
html[data-theme="dark"] .dash-pulse button{
  background:var(--panel)!important;
  border-color:var(--line)!important;
  color:var(--ink)!important
}
html[data-theme="dark"] .dash-kpis small,
html[data-theme="dark"] .dash-pulse small,
html[data-theme="dark"] .dash-kpis em,
html[data-theme="dark"] .dash-head p{
  color:#b4c3d4!important
}
html[data-theme="dark"] .dash-kpis strong,
html[data-theme="dark"] .dash-pulse b{
  color:#f4f8ff!important
}
html[data-theme="dark"] .dash-delta.up{color:#c5d4e6!important}
html[data-theme="dark"] .dash-delta.down{color:#fb7185!important}
html[data-theme="dark"] .dash-donut-hole{fill:var(--sb-chart-hole,#0e2136)!important}
html[data-theme="dark"] .dash-donut-label{fill:var(--sb-chart-tick,#b4c3d4)!important}
html[data-theme="dark"] .dash-svg text,
html[data-theme="dark"] .dash-tick,
html[data-theme="dark"] .dash-col text,
html[data-theme="dark"] .dash-col-label,
html[data-theme="dark"] .dash-donut-value,
html[data-theme="dark"] .dash-bar text,
html[data-theme="dark"] .dash-bar-val{
  fill:var(--sb-chart-tick,#e8f1ff)!important;
  stroke:none!important;
  color:var(--sb-chart-tick,#e8f1ff)!important
}
html[data-theme="dark"] .dash-area{fill:color-mix(in srgb,var(--sb-chart-sales,#1d4e89) 32%,transparent)!important}
html[data-theme="dark"] .dash-line.sales{stroke:var(--sb-chart-sales,#1d4e89)!important}
html[data-theme="dark"] .dash-line.receipts{stroke:var(--sb-chart-receipts,#93c5fd)!important}
html[data-theme="dark"] .dash-hit{fill:var(--sb-chart-sales,#1d4e89)!important}
html[data-theme="dark"] .dash-legend i.sales{background:var(--sb-chart-sales,#1d4e89)!important}
html[data-theme="dark"] .dash-legend i.receipts{background:var(--sb-chart-receipts,#93c5fd)!important}
html[data-theme="dark"] .dash-legend i.income{background:var(--sb-chart-sales,#1d4e89)!important}
html[data-theme="dark"] .dash-legend i.cogs{background:var(--sb-chart-s3,#60a5fa)!important}
html[data-theme="dark"] .dash-legend i.exp{background:var(--sb-chart-s4,#fb7185)!important}
html[data-theme="dark"] .dash-col.income rect{fill:var(--sb-chart-sales,#1d4e89)!important}
html[data-theme="dark"] .dash-col.cogs rect{fill:var(--sb-chart-s3,#60a5fa)!important}
html[data-theme="dark"] .dash-col.exp rect{fill:var(--sb-chart-s4,#fb7185)!important}
html[data-theme="dark"] .dash-bar rect{fill:var(--sb-chart-sales,#1d4e89)!important}
html[data-theme="dark"] .dash-slice.s0,html[data-theme="dark"] .dash-key.s0 i{fill:var(--sb-chart-s0,#1d4e89)!important;background:var(--sb-chart-s0,#1d4e89)!important}
html[data-theme="dark"] .dash-slice.s1,html[data-theme="dark"] .dash-key.s1 i{fill:var(--sb-chart-s1,#7dd3fc)!important;background:var(--sb-chart-s1,#7dd3fc)!important}
html[data-theme="dark"] .dash-slice.s2,html[data-theme="dark"] .dash-key.s2 i{fill:var(--sb-chart-s2,#c5d4e6)!important;background:var(--sb-chart-s2,#c5d4e6)!important}
html[data-theme="dark"] .dash-slice.s3,html[data-theme="dark"] .dash-key.s3 i{fill:var(--sb-chart-s3,#60a5fa)!important;background:var(--sb-chart-s3,#60a5fa)!important}
html[data-theme="dark"] .dash-slice.s4,html[data-theme="dark"] .dash-key.s4 i{fill:var(--sb-chart-s4,#fb923c)!important;background:var(--sb-chart-s4,#fb923c)!important}
html[data-theme="dark"] .dash-legend,
html[data-theme="dark"] .dash-empty,
html[data-theme="dark"] .dash-key,
html[data-theme="dark"] .dash-key span,
html[data-theme="dark"] .dash-key b{
  color:#d7e6f8!important
}
html[data-theme="dark"] .dash-key{background:transparent!important}
html[data-theme="dark"] .dashMain th,
html[data-theme="dark"] .dashMain td{
  color:var(--ink)!important;
  border-color:#2a4560!important
}
html[data-theme="dark"] .dashMain th{color:#b4c3d4!important}
html[data-theme="dark"] .dashMain tbody tr:hover{background:#15324c!important}
html[data-theme="dark"] .dashMain .badge{
  color:#eef4fb!important
}

html[data-theme="dark"] #app .ex-summary article,
html[data-theme="dark"] #app .ex-toolbar,
html[data-theme="dark"] #app .ex-register,
html[data-theme="dark"] #app .sb-inv-register,
html[data-theme="dark"] #app .sb-inv-register .panel-head{
  background:var(--panel,#0e2136)!important;
  border-color:var(--line,#2a4560)!important;
  color:var(--ink,#eef4fb)!important
}
html[data-theme="dark"] #app .ex-summary small,
html[data-theme="dark"] #app .ex-summary em{
  color:#b4c3d4!important
}
html[data-theme="dark"] #app .ex-summary strong{
  color:#f4f8ff!important
}
html[data-theme="dark"] #app .ex-toolbar,
html[data-theme="dark"] #app .sb-inv-toolbar{
  background:#0c1d30!important;
  border-color:#2a4560!important
}
html[data-theme="dark"] #app .ex-search span{color:#9eb4c9!important}
html[data-theme="dark"] #app .ex-toolbar label{
  color:#b4c3d4!important
}
html[data-theme="dark"] #app .ex-toolbar input:not([type=date]),
html[data-theme="dark"] #app .ex-toolbar select,
html[data-theme="dark"] #app .ex-search input{
  background:#0a1a2c!important;
  color:#e8f0f8!important;
  border-color:#35506b!important
}


html[data-theme="dark"] #app .ex-register table,
html[data-theme="dark"] #app .sb-inv-register table{
  background:transparent!important;
  color:#e8f0f8!important
}
html[data-theme="dark"] #app .ex-register th,
html[data-theme="dark"] #app .sb-inv-register th{
  background:#13283f!important;
  color:#c5d6e8!important;
  border-color:#2a4560!important
}
html[data-theme="dark"] #app .ex-register td,
html[data-theme="dark"] #app .sb-inv-register td{
  background:transparent!important;
  color:#e8f0f8!important;
  border-color:#243d56!important
}
html[data-theme="dark"] #app .ex-register tbody tr:hover,
html[data-theme="dark"] #app .sb-inv-register tbody tr:hover{
  background:#15324c!important
}
html[data-theme="dark"] #app .sb-inv-link{
  color:#c5d4e6!important;
  background:none!important;
  border:0!important
}
html[data-theme="dark"] #app .sb-more{
  color:#d7e6f8!important
}
html[data-theme="dark"] #app .sb-more:hover,
html[data-theme="dark"] #app .sb-row-act.open .sb-more{
  background:#1b3d5c!important;
  color:#fff!important
}
html[data-theme="dark"] #app .sb-more-menu{
  background:#12283e!important;
  border-color:#35506b!important;
  color:#f4f8ff!important
}
html[data-theme="dark"] #app .sb-more-menu button{
  color:#e8f0f8!important;
  background:transparent!important
}
html[data-theme="dark"] #app .sb-more-menu button:hover{
  background:#1b3d5c!important
}
html[data-theme="dark"] #app .sb-more-menu button.danger{
  color:#fb7185!important
}
html[data-theme="dark"] #app .ex-register .status,
html[data-theme="dark"] #app .sb-inv-register .status{
  background:#24384f!important;
  color:#d7e6f8!important
}
html[data-theme="dark"] #app .ex-register .status.paid,
html[data-theme="dark"] #app .ex-register .status.posted{
  background:#16324c!important;
  color:#d6e6f7!important
}
html[data-theme="dark"] #app .ex-register .status.open,
html[data-theme="dark"] #app .ex-register .status.approved{
  background:#163a5c!important;
  color:#8dcbff!important
}
html[data-theme="dark"] #app .ex-register .status.overdue,
html[data-theme="dark"] #app .ex-register .status.pending{
  background:#3d2f16!important;
  color:#fbbf24!important
}
html[data-theme="dark"] #app .ex-register .status.draft{
  background:#24384f!important;
  color:#c5d6e8!important
}
html[data-theme="dark"] #app .ex-register .status.void,
html[data-theme="dark"] #app .ex-register .status.cancelled{
  background:#4b2528!important;
  color:#ffaaa5!important
}
html[data-theme="dark"] #app .ex-register td.empty{
  color:#9eb4c9!important
}

html[data-theme="dark"] #app .tx-register,
html[data-theme="dark"] #app .coa-register,
html[data-theme="dark"] #app .coa-register .panel-head{
  background:#0e2136!important;
  border-color:#2a4560!important;
  color:#e8f0f8!important
}
html[data-theme="dark"] #app .coa-register h2,
html[data-theme="dark"] #app .panel-head h2,
html[data-theme="dark"] #app .panel.empty h2{
  color:#f4f8ff!important
}
html[data-theme="dark"] #app .panel-subtitle,
html[data-theme="dark"] #app .coa-register small,
html[data-theme="dark"] #app .tx-register small,
html[data-theme="dark"] #app .panel.empty p{
  color:#b4c3d4!important
}
html[data-theme="dark"] #app .tx-register th,
html[data-theme="dark"] #app .coa-register th,
html[data-theme="dark"] #app .panel .table-wrap th{
  background:#13283f!important;
  color:#c5d6e8!important;
  border-color:#2a4560!important
}
html[data-theme="dark"] #app .tx-register td,
html[data-theme="dark"] #app .coa-register td,
html[data-theme="dark"] #app .panel .table-wrap td{
  background:transparent!important;
  color:#e8f0f8!important;
  border-color:#243d56!important
}
html[data-theme="dark"] #app .tx-register tbody tr:hover td,
html[data-theme="dark"] #app .coa-register tbody tr:hover td,
html[data-theme="dark"] #app .panel .table-wrap tbody tr:hover td{
  background:#15324c!important
}
html[data-theme="dark"] #app .badge{
  background:#24384f!important;
  color:#d7e6f8!important
}
html[data-theme="dark"] #app .badge.paid{
  background:#16324c!important;
  color:#d6e6f7!important
}
html[data-theme="dark"] #app .badge.cancelled,
html[data-theme="dark"] #app .badge.danger{
  background:#4b2528!important;
  color:#ffaaa5!important
}
html[data-theme="dark"] #app .coa-used button{
  background:#0e2136!important;
  border-color:#2a4560!important;
  color:#e8f0f8!important
}
html[data-theme="dark"] #app .coa-used small,
html[data-theme="dark"] #app .coa-used em{color:#b4c3d4!important}
html[data-theme="dark"] #app .coa-used b{color:#f4f8ff!important}
html[data-theme="dark"] #modal-root .modal.im-journal-modal,
html[data-theme="dark"] #modal-root .modal.im-journal-modal .modal-head,
html[data-theme="dark"] #modal-root .modal.im-journal-modal .modal-body,
html[data-theme="dark"] #modal-root .modal.im-journal-modal .modal-foot{
  background:#0e2136!important;
  color:#e8f0f8!important;
  border-color:#2a4560!important
}
html[data-theme="dark"] #ja-lines th{
  background:#13283f!important;
  color:#c5d6e8!important
}
html[data-theme="dark"] #ja-lines td{
  background:transparent!important;
  color:#e8f0f8!important
}
html[data-theme="dark"] .ja-totals b,
html[data-theme="dark"] .ja-balanced{color:#d5e4f7!important}
html[data-theme="dark"] .ja-unbalanced{color:#fb7185!important}
html[data-theme="dark"] .sb-health-card{
  background:#0e2136!important;
  border-color:#2a4560!important;
  color:#e8f0f8!important
}
html[data-theme="dark"] .sb-health-card h3{color:#f4f8ff!important}
html[data-theme="dark"] .sb-health-card p,
html[data-theme="dark"] .sb-health-card small,
html[data-theme="dark"] .sb-health-card span{color:#b4c3d4!important}
html[data-theme="dark"] .sb-health-card.fail{
  background:#3d1c20!important;
  border-color:#7f3b42!important
}
html[data-theme="dark"] .sb-health-card.fail span{color:#ffaaa5!important}
html[data-theme="dark"] .sb-health-card.ok span{color:#d5e4f7!important}
html[data-theme="dark"] .sb-paper,
html[data-theme="dark"] .sb-report-result,
html[data-theme="dark"] .sb-report-result #sb-report-output,
html[data-theme="dark"] .sb-report-result .panel-head,
html[data-theme="dark"] .financial-sheet{
  background:#0e2136!important;
  color:#e8f0f8!important;
  border-color:#2a4560!important
}
html[data-theme="dark"] .sb-report-result .report-table th,
html[data-theme="dark"] .sb-report-result .report-table tfoot td,
html[data-theme="dark"] .sb-report-result .financial-statement thead th{
  background:#13283f!important;
  color:#e8f0f8!important;
  border-color:#2a4560!important
}
html[data-theme="dark"] .sb-report-result .report-table td,
html[data-theme="dark"] .sb-report-result .financial-statement td{
  background:transparent!important;
  color:#e8f0f8!important;
  border-color:#243d56!important
}
html[data-theme="dark"] .sb-report-kpis b,
html[data-theme="dark"] .sb-masthead,
html[data-theme="dark"] .sb-masthead h1{color:#f4f8ff!important}
html[data-theme="dark"] .fs-account-no{color:#68b4ff!important}

html[data-theme="dark"] .pos-catalog,
html[data-theme="dark"] .pos-totals,
html[data-theme="dark"] .pos-enable{
  background:#0e2136!important;
  border-color:#2a4560!important;
  color:#e8f0f8!important
}
html[data-theme="dark"] .pos-catalog button{color:#e8f0f8!important;border-color:#243d56!important}
html[data-theme="dark"] .pos-catalog button:hover{background:#15324c!important}
html[data-theme="dark"] .pos-catalog small{color:#b4c3d4!important}
html[data-theme="dark"] .pos-shift-banner{background:#16324c!important;color:#d6e6f7!important}
html[data-theme="dark"] .pos-shift-banner.warn{background:#3d2f16!important;color:#fbbf24!important}

html[data-theme="dark"] .emphub-section,
html[data-theme="dark"] .emphub-card,
html[data-theme="dark"] .emphub-split,
html[data-theme="dark"] .emphub-detail{
  background:#0e2136!important;
  border-color:#2a4560!important;
  color:#e8f0f8!important
}
html[data-theme="dark"] .emphub-form-tabs{border-color:#2a4560!important}
html[data-theme="dark"] .emphub-form-tabs button{color:#b4c3d4!important}
html[data-theme="dark"] .emphub-form-tabs button.active{color:#d5e4f7!important;border-bottom-color:#0c2340!important}
html[data-theme="dark"] .emphub-card small,
html[data-theme="dark"] .emphub-emp small{color:#b4c3d4!important}
html[data-theme="dark"] .emphub-emp{color:#e8f0f8!important;border-color:#243d56!important}
html[data-theme="dark"] .emphub-emp.active,
html[data-theme="dark"] .emphub-emp:hover{background:#15324c!important}
html[data-theme="dark"] .emphub-divider{background:#243d56!important}

html[data-theme="dark"] .sb-insight-card,
html[data-theme="dark"] .sb-flow-card,
html[data-theme="dark"] .sb-crm-step,
html[data-theme="dark"] .sb-crm-card,
html[data-theme="dark"] .sb-crm-col{
  background:#0e2136!important;
  border-color:#2a4560!important;
  color:#e8f0f8!important
}
html[data-theme="dark"] .sb-insight-card small,
html[data-theme="dark"] .sb-flow-card small,
html[data-theme="dark"] .sb-crm-step span,
html[data-theme="dark"] .sb-crm-card small,
html[data-theme="dark"] .sb-crm-col h3,
html[data-theme="dark"] .sb-dc-meta .sb-meta-row label,
html[data-theme="dark"] .sb-dc-address label,
html[data-theme="dark"] .sb-dc-vendor>label,
html[data-theme="dark"] .sb-dc-docrow label{color:#b4c3d4!important}
html[data-theme="dark"] .sb-dc-vendor{background:#0e2136!important;border-color:#2a4560!important;color:#e8f0f8!important}
html[data-theme="dark"] .sb-dc-vendor p,
html[data-theme="dark"] .sb-dc-address p{color:#b4c3d4!important}
html[data-theme="dark"] .sb-dc-docrow{background:#0e2136!important;border-color:#2a4560!important}
html[data-theme="dark"] .sb-dc-docrow>.field{border-color:#2a4560!important}
html[data-theme="dark"] .sb-dc-docrow input{background:#0b1a2c!important;border-color:#2a4560!important;color:#e8f0f8!important}
html[data-theme="dark"] .sb-dc-docrow input[readonly]{background:#15324c!important}
html[data-theme="dark"] .sb-dc-narration{background:#0e2136;border-color:#2a4560}
html[data-theme="dark"] .sb-dc-narration label,html[data-theme="dark"] .sb-doc-code span{color:#d6e4f0}
html[data-theme="dark"] body #app .sb-doc-code input[type=checkbox]{appearance:none!important;-webkit-appearance:none!important;width:42px!important;height:24px!important;min-width:42px!important;max-width:42px!important;flex:0 0 42px!important;border:0!important;border-radius:999px!important;background:var(--esb-switch-off)!important;position:relative!important;cursor:pointer!important;accent-color:auto!important}
html[data-theme="dark"] body #app .sb-doc-code input[type=checkbox]::after{content:""!important;position:absolute!important;top:3px!important;left:3px!important;width:18px!important;height:18px!important;border-radius:50%!important;background:#fff!important;box-shadow:0 1px 2px rgba(0,0,0,.35)!important}
html[data-theme="dark"] body #app .sb-doc-code input[type=checkbox]:checked{background:var(--esb-switch-on)!important}
html[data-theme="dark"] body #app .sb-doc-code input[type=checkbox]:checked::after{transform:translateX(18px)!important}
html[data-theme="dark"] .sb-insight-card strong{color:#f4f8ff!important}
html[data-theme="dark"] .sb-suite-banner{background:#3d2f16!important;border-color:#b45309!important;color:#fbbf24!important}
html[data-theme="dark"] .sb-suite-banner.paid{background:#16324c!important;border-color:#2f6b45!important;color:#bbf7d0!important}

html[data-theme="dark"] .add-new-card,
html[data-theme="dark"] .add-new-modal .add-new-card{
  background:#0e2136!important;
  border-color:#2a4560!important;
  color:#e8f0f8!important
}
html[data-theme="dark"] .add-new-card span,
html[data-theme="dark"] .add-new-groups h3{color:#b4c3d4!important}
html[data-theme="dark"] .add-new-card b{color:#f4f8ff!important}
html[data-theme="dark"] .add-new-card:hover{background:#15324c!important;border-color:#0c2340!important}
html[data-theme="dark"] .add-new-card svg{color:#8dcbff!important}

html[data-theme="dark"] .commercial-designer,
html[data-theme="dark"] .commercial-designer>summary,
html[data-theme="dark"] .commercial-column-row,
html[data-theme="dark"] .commercial-upload,
html[data-theme="dark"] .commercial-secondary{
  background:#0e2136!important;
  border-color:#2a4560!important;
  color:#e8f0f8!important
}
html[data-theme="dark"] .commercial-column-row input[type=text],
html[data-theme="dark"] .commercial-column-row input[type=number],
html[data-theme="dark"] .commercial-column-row input:not([type]),
html[data-theme="dark"] .commercial-upload input[type=file]{
  background:#0a1a2c!important;
  color:#e8f0f8!important;
  border-color:#35506b!important
}
html[data-theme="dark"] .commercial-designer-head b:after{color:#9eb4c9!important}

html[data-theme="dark"] .sb-search-select-input,
html[data-theme="dark"] .sb-search-select-list{
  background:#0a1a2c!important;
  color:#e8f0f8!important;
  border-color:#35506b!important
}
html[data-theme="dark"] .sb-search-select-option{
  color:#e8f0f8!important;
  background:transparent!important
}
html[data-theme="dark"] .sb-search-select-option:hover,
html[data-theme="dark"] .sb-search-select-option.active,
html[data-theme="dark"] .sb-search-select-option.selected{
  background:#16324c!important;
  color:#f4f8ff!important
}
html[data-theme="dark"] .sb-search-select-empty,
html[data-theme="dark"] .sb-search-select:after{color:#9eb4c9!important}

html[data-theme="dark"] .adaptive-section{
  background:#0e2136!important;
  border-color:#35506b!important;
  color:#e8f0f8!important
}
html[data-theme="dark"] .adaptive-section h3{
  color:#f4f8ff!important
}
html[data-theme="dark"] .adaptive-section .side-note,
html[data-theme="dark"] .adaptive-section p{
  color:#9eb4c9!important
}
html[data-theme="dark"] .check-grid label,
html[data-theme="dark"] .modal-body > label{
  color:#e8f0f8!important
}
html[data-theme="dark"] .adaptive-section input,
html[data-theme="dark"] .adaptive-section select,
html[data-theme="dark"] .adaptive-section textarea{
  background:#0a1a2c!important;
  color:#f4f8ff!important;
  border-color:#35506b!important
}

html[data-theme="dark"] .sb-form-styles-head p,
html[data-theme="dark"] .sb-form-group h3,
html[data-theme="dark"] .sb-form-card footer small{color:#b4c3d4!important}
html[data-theme="dark"] .sb-form-card footer strong{color:#f4f8ff!important}

html[data-theme="dark"] .esb-help-wrap,
html[data-theme="dark"] .esb-help-body{
  background:transparent!important;
  color:#e8f0f8!important
}
html[data-theme="dark"] .esb-help-nav button,
html[data-theme="dark"] .esb-help-nav small{color:#c5d6e8!important}
html[data-theme="dark"] .esb-help-search,
html[data-theme="dark"] .esb-help-task{
  background:#0e2136!important;
  border-color:#2a4560!important;
  color:#e8f0f8!important
}
html[data-theme="dark"] .esb-help-task span{color:#b4c3d4!important}
html[data-theme="dark"] .esb-help-body th,
html[data-theme="dark"] .esb-help-body td{border-color:#243d56!important;color:#e8f0f8!important}

html[data-theme="dark"] .sb-report-result .report-table th:first-child,
html[data-theme="dark"] .sb-report-result .report-table td:first-child,
html[data-theme="dark"] .sb-report-result .financial-statement thead th,
html[data-theme="dark"] .sb-report-result .report-table thead th{
  background:#13283f!important;
  color:#e8f0f8!important
}

html[data-theme="dark"] .price-list-scope{background:#163a5c!important;color:#8dcbff!important}
html[data-theme="dark"] .module-launch,
html[data-theme="dark"] .center-list,
html[data-theme="dark"] .center-detail{
  background:#0e2136!important;
  border-color:#2a4560!important;
  color:#e8f0f8!important
}
html[data-theme="dark"] .module-launch span{color:#b4c3d4!important}
html[data-theme="dark"] .module-launch b{color:#f4f8ff!important}

html[data-theme="dark"] .extracted-customer-editor{
  background:#3d2f16!important;
  border-color:#b45309!important;
  color:#e8f0f8!important
}
html[data-theme="dark"] .extracted-customer-head small{color:#fbbf24!important}

html[data-theme="dark"] #quotefmt-list .empty,
html[data-theme="dark"] #quotefmt-list .empty b{color:#b4c3d4!important}

html[data-theme="dark"] .sb-col-pop button,
html[data-theme="dark"] .sb-col-pop label{color:#e8f0f8!important}

html[data-theme="dark"] .center-center,
html[data-theme="dark"] .center-center-head,
html[data-theme="dark"] .center-toolbar,
html[data-theme="dark"] .center-split,
html[data-theme="dark"] .center-list,
html[data-theme="dark"] .center-detail,
html[data-theme="dark"] .center-pager{
  background:#0e2136!important;
  border-color:#2a4560!important;
  color:#e8f0f8!important
}
html[data-theme="dark"] .center-center-head h2,
html[data-theme="dark"] .center-detail-head h2,
html[data-theme="dark"] .center-party b,
html[data-theme="dark"] .center-balance strong,
html[data-theme="dark"] .center-kpis b{
  color:#f4f8ff!important
}
html[data-theme="dark"] .center-center-head p,
html[data-theme="dark"] .center-detail-head p,
html[data-theme="dark"] .center-detail-head small,
html[data-theme="dark"] .center-scale-note,
html[data-theme="dark"] .center-party span,
html[data-theme="dark"] .center-party small,
html[data-theme="dark"] .center-balance span,
html[data-theme="dark"] .center-kpis span,
html[data-theme="dark"] .center-pager{
  color:#b4c3d4!important
}
html[data-theme="dark"] .center-toolbar .search{
  background:#0a1a2c!important;
  color:#e8f0f8!important;
  border-color:#35506b!important
}
html[data-theme="dark"] .center-party{
  background:transparent!important;
  color:#e8f0f8!important;
  border-color:#243d56!important
}
html[data-theme="dark"] .center-party:hover,
html[data-theme="dark"] .center-party.active{
  background:#15324c!important
}



html[data-theme="dark"] .center-kpis>div{
  background:#13283f!important;
  border-color:#2a4560!important
}
html[data-theme="dark"] .center-ledger th{
  background:#13283f!important;
  color:#c5d6e8!important;
  border-color:#2a4560!important
}
html[data-theme="dark"] .center-ledger td{
  background:transparent!important;
  color:#e8f0f8!important;
  border-color:#243d56!important
}
html[data-theme="dark"] .center-ledger tbody tr:hover td{
  background:#15324c!important
}
html[data-theme="dark"] .center-ledger .center-ledger-link{color:#7cbcff!important}
html[data-theme="dark"] .sb-fig{color:#7cbcff!important}
html[data-theme="dark"] .im-customer-open-dcs{
  background:#0e2136!important;
  border-color:#2a4560!important
}

html[data-theme="dark"] .sb-customer-modal,
html[data-theme="dark"] .sb-customer-modal .modal-head,
html[data-theme="dark"] .sb-customer-modal .modal-body,
html[data-theme="dark"] .sb-customer-modal .modal-foot{
  background:#0c1d30!important;
  color:#e8f0f8!important;
  border-color:#2a4560!important
}
html[data-theme="dark"] .sb-customer-hero,
html[data-theme="dark"] .sb-customer-section{
  background:#0e2136!important;
  border-color:#2a4560!important;
  color:#e8f0f8!important
}
html[data-theme="dark"] .sb-customer-hero h3,
html[data-theme="dark"] .sb-customer-section-head-main h4,
html[data-theme="dark"] .sb-customer-status b{
  color:#f4f8ff!important
}
html[data-theme="dark"] .sb-customer-hero small,
html[data-theme="dark"] .sb-customer-hero p,
html[data-theme="dark"] .sb-customer-section-head-main p,
html[data-theme="dark"] .sb-customer-status small{
  color:#b4c3d4!important
}
html[data-theme="dark"] .sb-customer-avatar{
  background:#16324c!important;
  color:#d5e4f7!important
}
html[data-theme="dark"] .sb-customer-section-head-main>div>small{
  background:#163a5c!important;
  color:#8dcbff!important
}
html[data-theme="dark"] .sb-customer-modal .field label{
  color:#b4c3d4!important
}
html[data-theme="dark"] .sb-customer-modal .field input:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=time]),
html[data-theme="dark"] .sb-customer-modal .field textarea,
html[data-theme="dark"] .sb-customer-modal .field select{
  background:#0a1a2c!important;
  color:#e8f0f8!important;
  border-color:#35506b!important
}
html[data-theme="dark"] .sb-customer-accounting{
  background:#16324c!important;
  border-color:#0c2340!important
}
html[data-theme="dark"] .sb-customer-accounting span,
html[data-theme="dark"] .sb-customer-accounting small{
  color:#b4c3d4!important
}
html[data-theme="dark"] .sb-customer-accounting b{
  color:#d5e4f7!important
}
html[data-theme="dark"] .sb-customer-modal .sb-inline-check{
  color:#e8f0f8!important;
  border-color:#35506b!important
}

html[data-theme="dark"] #global-menubar .global-menu-item svg,
html[data-theme="dark"] #global-menubar .global-menu-item .nav-svg,
html[data-theme="dark"] #global-menubar .global-menu-item .menu-svg,
html[data-theme="dark"] #global-menubar .global-menu-item .im-menu-icon{
  color:#d5e4f7!important;stroke:#d5e4f7!important;fill:none!important;
  stroke-width:2.2!important;opacity:1!important
}
html[data-theme="dark"] #global-menubar .global-menu-item:hover svg{
  color:#d6e6f7!important;stroke:#d6e6f7!important
}
html[data-theme="dark"] header.topbar .icon-btn svg,
html[data-theme="dark"] header.topbar .theme-toggle svg{
  color:#e8f0f8!important;stroke:#e8f0f8!important;fill:none!important
}

@media print{
  html[data-theme="dark"] .sb-dc-paper,
  html[data-theme="dark"] .doc-print,
  html[data-theme="dark"] .chq-leaf,
  html[data-theme="dark"] .sb-paper{
    background:#fff!important;
    color:#111!important
  }
}

#global-menubar .global-menu:not(.open) > .global-menu-popup{
  display:none!important;visibility:hidden!important;pointer-events:none!important
}
html[data-theme="dark"] #app .sb-dc .doc-lines thead th{background:#0e2136!important}
  html[data-theme="dark"] #app .ex-register thead th,
  html[data-theme="dark"] #app .tx-register thead th{
    background:#13283f!important
  }

/* Printed invoices stay on white paper with the form-style accent, including dark UI theme. */
.qr-document,
.qr-document .qr-table,
.qr-document .qr-table tbody td{
  background:#fff!important;
  color:#111827!important;
  color-scheme:light
}
.qr-document .qr-table thead th{
  background:transparent!important;
  color:#1b2836!important;
  -webkit-text-fill-color:#1b2836!important;
  font-weight:800!important;
  -webkit-print-color-adjust:exact!important;
  print-color-adjust:exact!important
}
@media print{
  .qr-document,.qr-document *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
  .qr-document .qr-table thead th{
    background:transparent!important;
    color:#1b2836!important;
    -webkit-text-fill-color:#1b2836!important
  }
}

/* Authenticated workspace dark-surface authority — must remain last.
   Mirrors the high-specificity workspace shell without affecting print paper. */
@media screen {
  html[data-theme="dark"] body[data-auth-state="authenticated"],
  html[data-theme="dark"] body[data-auth-state="authenticated"] main,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app.content {
    background: var(--bg, #071422) !important;
    color: var(--ink, #eef4fb) !important;
  }

  html[data-theme="dark"] body[data-auth-state="authenticated"] header.topbar,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #global-menubar .global-menu-popup,
  html[data-theme="dark"] body[data-auth-state="authenticated"] .sb-account-menu,
  html[data-theme="dark"] body[data-auth-state="authenticated"] .sb-search-hits {
    background: var(--panel, #0e2136) !important;
    color: var(--ink, #eef4fb) !important;
    border-color: var(--line, #2a4560) !important;
  }
  html[data-theme="dark"] body[data-auth-state="authenticated"] .sb-search-hit,
  html[data-theme="dark"] body[data-auth-state="authenticated"] .sb-search-hit b {
    color: #eef4fb !important;
    -webkit-text-fill-color: #eef4fb !important;
    background: transparent;
  }
  html[data-theme="dark"] body[data-auth-state="authenticated"] .sb-search-hit small {
    color: #b7c9dc !important;
    -webkit-text-fill-color: #b7c9dc !important;
  }
  html[data-theme="dark"] body[data-auth-state="authenticated"] .sb-search-hit:hover,
  html[data-theme="dark"] body[data-auth-state="authenticated"] .sb-search-hit.is-active {
    background: #16324a !important;
    color: #eef4fb !important;
  }
  html[data-theme="dark"] body[data-auth-state="authenticated"] .sb-search-hit mark {
    background: #16365c !important;
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc !important;
  }

  html[data-theme="dark"] body[data-auth-state="authenticated"] header.topbar #sb-search,
  html[data-theme="dark"] body[data-auth-state="authenticated"] header.topbar .theme-toggle,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #sidebar-toggle,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .dash-create button {
    background: #0b1c2e !important;
    color: var(--ink, #eef4fb) !important;
    border-color: var(--line, #2a4560) !important;
  }

  html[data-theme="dark"] body[data-auth-state="authenticated"] #app :is(
    .panel,
    .form-card,
    .card,
    .table-wrap,
    .page-actions,
    .ex-toolbar,
    .metric,
    .ex-summary article,
    .sbpay-card,
    .sbpay-hero,
    .sbpay-setup,
    .sbpay-setup-row,
    .sbpay-runpage,
    .sbpay-done,
    .sbpay-empty,
    .sbpay-cost div,
    .sb-emp-pay-card,
    .sb-emp-paycheck-sum div,
    .sb-emp-rail,
    .sb-funnel-card,
    .sb-bank-card,
    .dash-ranges
  ) {
    background: var(--panel, #0e2136) !important;
    color: var(--ink, #eef4fb) !important;
    border-color: var(--line, #2a4560) !important;
    box-shadow: none !important;
  }

  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sbpay,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sbpay-brand,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sbpay-head,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sbpay-body {
    background: var(--bg, #071422) !important;
    color: var(--ink, #eef4fb) !important;
    border-color: var(--line, #2a4560) !important;
  }

  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-emp-pay-head h2,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-emp-pay-head p,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-emp-pay-card h3,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-emp-pay-meta b,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-emp-paycheck-sum b,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-emp-method b,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sbpay-name b {
    color: #f4f8fc !important;
  }
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-emp-kicker,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-emp-pay-meta span,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-emp-hint,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-emp-empty,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-emp-method span,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sbpay-name small {
    color: #9fb4c8 !important;
  }
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-emp-workspace-body,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-emp-profile {
    background: var(--bg, #071422) !important;
    color: var(--ink, #eef4fb) !important;
  }

  html[data-theme="dark"] body[data-auth-state="authenticated"] #app table,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app table tbody,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app table tbody td {
    background: var(--panel, #0e2136) !important;
    color: var(--ink, #eef4fb) !important;
    border-color: var(--line, #2a4560) !important;
  }

  html[data-theme="dark"] body[data-auth-state="authenticated"] #app table thead th {
    background: #13283f !important;
    color: #c5d6e8 !important;
    border-color: var(--line, #2a4560) !important;
  }

  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-doc-paper table,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-doc-paper table tbody,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-doc-paper table tbody td,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-doc-paper table thead,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .sb-doc-paper table thead th,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .doc-print table,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .doc-print table tbody td,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #app .doc-print table thead th {
    background: #fff !important;
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
    border-color: #c5d0da !important;
  }

  html[data-theme="dark"] body[data-auth-state="authenticated"] #modal-root .modal,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #modal-root .modal-head,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #modal-root .modal-body,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #modal-root .modal-foot,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #modal-root .sb-window,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #modal-root .im-txn-window,
  html[data-theme="dark"] body[data-auth-state="authenticated"] #modal-root .im-so-window {
    background: var(--panel, #0e2136) !important;
    color: var(--ink, #eef4fb) !important;
    border-color: var(--line, #2a4560) !important;
  }
}



/* KPI geometry moved to books-ui.css (short tiles). Keep sidebar toggle. */
@media screen and (min-width:1001px){


/* ============================================================
   EXISTING SIDEBAR TOGGLE
   Keep arrow SVG visible even when sidebar is hidden.
   ============================================================ */

html body[data-auth-state="authenticated"]
#sidebar-toggle.sidebar-toggle{

    display:grid !important;

    place-items:center !important;

    visibility:visible !important;

    opacity:1 !important;

    pointer-events:auto !important;

    position:fixed !important;

    z-index:2147483000 !important;

    width:31px !important;

    height:31px !important;

    min-width:31px !important;

    min-height:31px !important;

    padding:0 !important;

    overflow:visible !important;
}


html body[data-auth-state="authenticated"]
#sidebar-toggle svg{

    display:block !important;

    visibility:visible !important;

    opacity:1 !important;

    width:17px !important;

    height:17px !important;

    min-width:17px !important;

    min-height:17px !important;

    fill:none !important;

    stroke:currentColor !important;

    stroke-width:2.2 !important;

    stroke-linecap:round !important;

    stroke-linejoin:round !important;

    pointer-events:none !important;
}


/* OFF state:
   move existing button to left edge;
   keep arrow visible.
*/







/* mobile keeps normal hamburger behavior */
}

/* ESB FINAL KPI SIDEBAR CSS END */



/* ESB PRIVACY SINGLE SOURCE START */


/* Privacy label */

.sb-privacy-bar{
    display:flex !important;
    align-items:center !important;
    gap:7px !important;

    margin:0 !important;

    white-space:nowrap !important;

    font-size:12px !important;
    font-weight:600 !important;
}


/* Existing real Privacy button */

#sb-privacy-toggle[data-privacy]{
    position:relative !important;

    display:inline-flex !important;

    align-items:center !important;

    justify-content:flex-start !important;

    flex:0 0 38px !important;

    width:38px !important;
    min-width:38px !important;
    max-width:38px !important;

    height:22px !important;
    min-height:22px !important;
    max-height:22px !important;

    margin:0 !important;

    padding:2px !important;

    border:1px solid rgba(0,0,0,.18) !important;

    border-radius:999px !important;

    background:#8b9298 !important;

    box-shadow:none !important;

    outline:none !important;

    cursor:pointer !important;

    overflow:hidden !important;

    appearance:none !important;

    transition:
        background-color .18s ease,
        border-color .18s ease !important;
}


/* Actual round knob */

#sb-privacy-toggle[data-privacy] > i{
    position:relative !important;

    left:auto !important;
    right:auto !important;
    top:auto !important;
    bottom:auto !important;

    display:block !important;

    visibility:visible !important;
    opacity:1 !important;

    flex:0 0 16px !important;

    width:16px !important;
    min-width:16px !important;
    max-width:16px !important;

    height:16px !important;
    min-height:16px !important;
    max-height:16px !important;

    margin:0 !important;
    padding:0 !important;

    border:0 !important;
    border-radius:50% !important;

    background:#ffffff !important;

    box-shadow:
        0 1px 3px rgba(0,0,0,.32) !important;

    transform:translateX(0) !important;

    transition:
        transform .18s ease !important;

    pointer-events:none !important;
}


/* Privacy ON */

#sb-privacy-toggle[data-privacy].on,
#sb-privacy-toggle[data-privacy][aria-pressed="true"]{
    background:#008b8b !important;
    border-color:#008b8b !important;
}


/* Move knob right */

#sb-privacy-toggle[data-privacy].on > i,
#sb-privacy-toggle[data-privacy][aria-pressed="true"] > i{
    transform:translateX(16px) !important;
}


/* Privacy OFF */

#sb-privacy-toggle[data-privacy]:not(.on)[aria-pressed="false"]{
    background:#8b9298 !important;
}


/* Keyboard focus */

#sb-privacy-toggle[data-privacy]:focus-visible{
    outline:
        2px solid #0c2340 !important;

    outline-offset:2px !important;
}


/* ============================================================
   DASHBOARD PRIVACY
   Existing dashboard uses dash-private.
   ============================================================ */

.dashMain.dash-private .amount-display,
.dashMain.dash-private .dash-hero-amt,
.dashMain.dash-private .dash-money,
.dashMain.dash-private [data-money],
.dashMain.dash-private .money,

html.sb-privacy-on .amount-display,
html.sb-privacy-on .dash-hero-amt,
html.sb-privacy-on .dash-money{

    filter:blur(6px) !important;

    user-select:none !important;
}


/* Keep layout width unchanged while hidden */

.dashMain.dash-private .amount-display,
.dashMain.dash-private .dash-hero-amt{

    opacity:.72 !important;
}


/* ESB PRIVACY SINGLE SOURCE END */

/* ESB DASHBOARD FLUID WIDTH START */

/*
   Business Overview uses all AVAILABLE horizontal space.

   Sidebar open:
   dashboard begins after full sidebar.

   Sidebar collapsed:
   dashboard begins after 68px icon rail.

   No dashboard content is allowed underneath sidebar/icons.
*/


@media (min-width:1001px){

    /* FULL SIDEBAR */

    body:not(.im-sidebar-collapsed)
    main:has(#app.route-dashboard){

        margin-left:var(--sidebar-width,246px) !important;

        width:auto !important;

        max-width:none !important;

        min-width:0 !important;
    }


    /* COLLAPSED 68px ICON RAIL */

    body.im-sidebar-collapsed
    main:has(#app.route-dashboard){

        margin-left:68px !important;

        width:auto !important;

        max-width:none !important;

        min-width:0 !important;
    }

}


/* Dashboard fills its complete main-content area */

#app.route-dashboard{

    width:100% !important;

    max-width:none !important;

    min-width:0 !important;

    box-sizing:border-box !important;
}


#app.route-dashboard > .dashMain{

    width:100% !important;

    max-width:none !important;

    min-width:0 !important;

    box-sizing:border-box !important;
}


#app.route-dashboard .dash-board{

    width:100% !important;

    max-width:none !important;

    min-width:0 !important;

    box-sizing:border-box !important;
}


/* Cards grow/shrink with available dashboard width */

#app.route-dashboard .dash-card{

    min-width:0 !important;

    max-width:100% !important;

    box-sizing:border-box !important;
}


/* Prevent charts themselves from forcing dashboard wider */

#app.route-dashboard .dash-card svg,
#app.route-dashboard .dash-card canvas,
#app.route-dashboard .dash-chart,
#app.route-dashboard .dash-line-wrap,
#app.route-dashboard .dash-donut-wrap{

    max-width:100% !important;

    min-width:0 !important;

    box-sizing:border-box !important;
}


/* ESB DASHBOARD FLUID WIDTH END */

/* Logo stays readable on dark theme and Windows contrast themes */
html[data-theme="dark"] aside.sidebar .brandmark,
html[data-theme="dark"] .sidebar .brand img,
html[data-theme="dark"] .topbar .esb-top-logo{
  --esb-logo-background:#e8eef7;
  --esb-logo-shadow:0 0 0 2px #a8bdd7;
  --esb-logo-filter:brightness(1.3) contrast(1.08);
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  filter:brightness(1.3) contrast(1.08) !important;
  mix-blend-mode:normal !important;
  background:#e8eef7 !important;
  border-radius:50% !important;
  box-shadow:0 0 0 2px #a8bdd7,0 2px 6px rgba(0,0,0,.2) !important;
  forced-color-adjust:none;
}

@media (forced-colors: active), (prefers-contrast: more){
  aside.sidebar .brandmark,
  .sidebar .brand img{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    filter:none !important;
    mix-blend-mode:normal !important;
    background:Canvas !important;
    outline:2px solid CanvasText !important;
    outline-offset:2px !important;
    forced-color-adjust:none;
  }
}

/* esmartbooks wordmark: gold e stays; “esmartbooks” must not follow --navy (#061525) on dark rails */
html[data-theme="dark"] .sidebar .brand .esb-sb,
html[data-theme="dark"] .sidebar .brand .esb-word,
html[data-theme="dark"] .sidebar .brand strong,
html[data-theme="dark"] body[data-auth-state="authenticated"] aside.sidebar .esb-sb,
html[data-theme="dark"] body[data-auth-state="authenticated"] aside.sidebar .esb-word,
html[data-theme="dark"] body[data-auth-state="authenticated"] aside.sidebar .brand strong{
  color:#f4f6f8 !important;
  -webkit-text-fill-color:#f4f6f8 !important;
  visibility:visible !important;
  opacity:1 !important;
  overflow:visible !important;
  text-overflow:clip !important;
}
html[data-theme="dark"] .sidebar .brand .esb-e,
html[data-theme="dark"] body[data-auth-state="authenticated"] aside.sidebar .esb-e{
  color:#e8c85a !important;
  -webkit-text-fill-color:#e8c85a !important;
}
html[data-theme="dark"] body[data-auth-state="authenticated"] aside.sidebar .brand{
  background:#0c2340 !important;
  border-bottom-color:rgba(255,255,255,.12) !important;
}

/* Collapsed rail: keep stroke icons visible; hide labels/scrollbar that clip them. */
@media (min-width:1001px){
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar,
  html.im-sidebar-collapsed body[data-auth-state="authenticated"] aside.sidebar{
    width:68px !important;
    min-width:68px !important;
    max-width:68px !important;
    padding:12px 6px 10px !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    scrollbar-width:none !important;
  }
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar::-webkit-scrollbar{
    width:0 !important;
    height:0 !important;
    display:none !important;
  }
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar .brand > div,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar .esb-word,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar .esb-tag,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar .nav-section-label,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar .nav-group-title,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar .nav-group-toggle,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar #nav.esb-owner-nav .nav-section-label,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar #nav .nav-item > b,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar .sidebar-foot{
    display:none !important;
    visibility:hidden !important;
    width:0 !important;
    height:0 !important;
    overflow:hidden !important;
    margin:0 !important;
    padding:0 !important;
  }
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar .brand{
    justify-content:center !important;
    padding:0 0 8px !important;
    gap:0 !important;
  }
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar .brandmark{
    width:36px !important;
    height:36px !important;
    margin:0 auto !important;
  }
  
  
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar #nav,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar #nav.sb-rail,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar #nav.esb-owner-nav,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar #nav .nav-group,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar #nav .nav-group-items{
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    width:100% !important;
    gap:2px !important;
    margin:0 !important;
    padding:0 !important;
  }
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar #nav .nav-item,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar #nav.esb-owner-nav .nav-item,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar #nav.sb-rail .nav-item{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:44px !important;
    min-width:44px !important;
    max-width:44px !important;
    height:40px !important;
    min-height:40px !important;
    margin:0 auto !important;
    padding:0 !important;
    gap:0 !important;
    overflow:visible !important;
    box-shadow:none !important;
  }
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar #nav .nav-item > span:first-child,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar #nav .nav-svg,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar #nav .nav-item svg,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar #nav .nav-item svg.nav-svg{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    width:20px !important;
    height:20px !important;
    min-width:20px !important;
    min-height:20px !important;
    max-width:20px !important;
    max-height:20px !important;
    margin:0 !important;
    padding:0 !important;
    overflow:visible !important;
    color:#eef3f8 !important;
    fill:none !important;
    stroke:currentColor !important;
    stroke-width:1.9 !important;
  }
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar #nav .nav-item.active,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar #nav .nav-item.active .nav-svg,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] aside.sidebar #nav .nav-item.active svg{
    color:#ffffff !important;
    stroke:#ffffff !important;
    background:rgba(255,255,255,.12) !important;
  }
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] main,
  html.im-sidebar-collapsed body[data-auth-state="authenticated"] main{
    margin-left:68px !important;
  }
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] #global-menubar,
  html body.im-sidebar-collapsed[data-auth-state="authenticated"] header.topbar{
    left:68px !important;
  }
}

/* Section number badges (01, 02 …) on the Employee, Vendor and Customer forms. The dark theme turns every <small>
   light grey (theme-final.css), but these kept their light-blue box, so the number was light grey on near-white.
   Repeated class names: this must outrank that rule. */
html[data-theme="dark"] body[data-auth-state] :is(#app,#modal-root,.modal) :is(.sb-vendor-section-head.sb-vendor-section-head small,.sb-vendor-section-head-main.sb-vendor-section-head-main>div>small,.sb-customer-section-head-main.sb-customer-section-head-main>div>small){
  background:#163a5c !important;
  color:#9fd4ff !important;
  border:1px solid #2f6690;
}
