/* SiteBilly dashboard brand layer v449.
 * Loaded after app.css so the current charcoal, ivory and orange palette is
 * authoritative across both administrator and customer portals.
 */
:root{
  --sb449-charcoal:#182633;
  --sb449-deep:#101a23;
  --sb449-panel:#1d2c39;
  --sb449-panel-2:#243542;
  --sb449-line:#3a4a56;
  --sb449-text:#eef2f5;
  --sb449-muted:#aab6c1;
  --sb449-ivory:#fffaf2;
  --sb449-paper:#fffdf9;
  --sb449-orange:#ff7208;
  --sb449-gold:#ffab12;
}

html.theme-dark body.admin-body,
html.theme-dark body.customer-portal-body,
body.admin-body.theme-dark,
body.customer-portal-body.theme-dark{
  --ink:#f7f8fa!important;
  --text:var(--sb449-text)!important;
  --muted:var(--sb449-muted)!important;
  --muted-2:#83929f!important;
  --bg:var(--sb449-deep)!important;
  --surface:var(--sb449-charcoal)!important;
  --surface-2:var(--sb449-panel)!important;
  --line:var(--sb449-line)!important;
  --line-strong:#51616d!important;
  --sb-dark-bg:var(--sb449-deep)!important;
  --sb-dark-surface:var(--sb449-charcoal)!important;
  --sb-dark-surface-1:var(--sb449-charcoal)!important;
  --sb-dark-surface-2:var(--sb449-panel)!important;
  --sb-dark-surface-3:var(--sb449-panel-2)!important;
  --sb-dark-border:var(--sb449-line)!important;
  --sb-dark-text:var(--sb449-text)!important;
  --sb-dark-muted:var(--sb449-muted)!important;
  background:var(--sb449-deep)!important;
  background-image:none!important;
  color:var(--sb449-text)!important;
}

html.theme-dark body.admin-body :is(.admin-layout,.admin-main,.page),
html.theme-dark body.customer-portal-body :is(.customer-shell,.customer-main,.customer-page),
body.admin-body.theme-dark :is(.admin-layout,.admin-main,.page),
body.customer-portal-body.theme-dark :is(.customer-shell,.customer-main,.customer-page){
  background:var(--sb449-deep)!important;
  background-image:none!important;
  color:var(--sb449-text)!important;
}

html.theme-dark body.admin-body :is(.sidebar,.admin-head),
html.theme-dark body.customer-portal-body :is(.customer-sidebar,.customer-topbar),
body.admin-body.theme-dark :is(.sidebar,.admin-head),
body.customer-portal-body.theme-dark :is(.customer-sidebar,.customer-topbar){
  background:var(--sb449-charcoal)!important;
  background-image:none!important;
  border-color:var(--sb449-line)!important;
  box-shadow:none!important;
}

html.theme-dark body.admin-body :is(
  .card,.panel,.stat,.compact-stat,.page-hero,.ops-panel,.ops-metric,.ops-attention,
  .service-card,.service-meta,.table-wrap,.list-panel,.directory-panel,.settings-panel,
  .form-panel,.detail-panel,.summary-panel,.management-panel,.inventory-panel,.workspace-panel,
  .toolbar,.filter-bar,.search-bar,.filters,.form-card,.detail-card,.summary-card,.list-card,
  [class$="-card"],[class*="-card "],[class$="-panel"],[class*="-panel "],
  [class$="-metric"],[class*="-metric "],[class$="-toolbar"],[class*="-toolbar "]
),
body.admin-body.theme-dark :is(
  .card,.panel,.stat,.compact-stat,.page-hero,.ops-panel,.ops-metric,.ops-attention,
  .service-card,.service-meta,.table-wrap,.list-panel,.directory-panel,.settings-panel,
  .form-panel,.detail-panel,.summary-panel,.management-panel,.inventory-panel,.workspace-panel,
  .toolbar,.filter-bar,.search-bar,.filters,.form-card,.detail-card,.summary-card,.list-card,
  [class$="-card"],[class*="-card "],[class$="-panel"],[class*="-panel "],
  [class$="-metric"],[class*="-metric "],[class$="-toolbar"],[class*="-toolbar "]
),
html.theme-dark body.customer-portal-body :is(
  .card,.panel,.stat,.customer-hero,.customer-metric,.customer-dashboard-card,.customer-panel,
  .customer-form-panel,.customer-workspace-panel,.customer-command-bar,.customer-directory-row,
  .customer-directory-filter,.customer-health-strip>div,.customer-directory-metrics>div,
  .customer-service-row,.customer-invoice-row,.service-card,.service-meta,.table-wrap,
  .dashboard-mailbox-card,.dashboard-mailbox-empty,.portal-overview,.mailbox-portfolio-card
),
body.customer-portal-body.theme-dark :is(
  .card,.panel,.stat,.customer-hero,.customer-metric,.customer-dashboard-card,.customer-panel,
  .customer-form-panel,.customer-workspace-panel,.customer-command-bar,.customer-directory-row,
  .customer-directory-filter,.customer-health-strip>div,.customer-directory-metrics>div,
  .customer-service-row,.customer-invoice-row,.service-card,.service-meta,.table-wrap,
  .dashboard-mailbox-card,.dashboard-mailbox-empty,.portal-overview,.mailbox-portfolio-card
){
  background:var(--sb449-charcoal)!important;
  background-image:none!important;
  border-color:var(--sb449-line)!important;
  color:var(--sb449-text)!important;
  box-shadow:0 10px 26px rgba(0,0,0,.16)!important;
}

html.theme-dark body.admin-body :is(input,textarea,select,.input,.textarea,.select),
html.theme-dark body.customer-portal-body :is(input,textarea,select,.input,.textarea,.select),
body.admin-body.theme-dark :is(input,textarea,select,.input,.textarea,.select),
body.customer-portal-body.theme-dark :is(input,textarea,select,.input,.textarea,.select){
  background:var(--sb449-deep)!important;
  border-color:#485965!important;
  color:var(--sb449-text)!important;
}

html.theme-dark body.admin-body :is(.btn-primary,.application-action--manage,.side-nav a.active),
html.theme-dark body.customer-portal-body :is(.btn-primary,.customer-side-nav a.active),
body.admin-body.theme-dark :is(.btn-primary,.application-action--manage,.side-nav a.active),
body.customer-portal-body.theme-dark :is(.btn-primary,.customer-side-nav a.active){
  background:linear-gradient(135deg,var(--sb449-orange),var(--sb449-gold))!important;
  border-color:transparent!important;
  color:#fff!important;
  box-shadow:none!important;
}

html.theme-dark body.admin-body :is(.btn-light,.head-icon,.system-chip,.admin-head-quick-nav>a,.workspace-quick-menu>summary),
html.theme-dark body.customer-portal-body :is(.btn-light,.topbar-soft-link,.customer-topbar-chip,.customer-topbar-user),
body.admin-body.theme-dark :is(.btn-light,.head-icon,.system-chip,.admin-head-quick-nav>a,.workspace-quick-menu>summary),
body.customer-portal-body.theme-dark :is(.btn-light,.topbar-soft-link,.customer-topbar-chip,.customer-topbar-user){
  background:var(--sb449-panel)!important;
  background-image:none!important;
  border-color:#4a5b68!important;
  color:var(--sb449-text)!important;
  box-shadow:none!important;
}

html.theme-dark body.admin-body :is(thead,th),
html.theme-dark body.customer-portal-body :is(thead,th),
body.admin-body.theme-dark :is(thead,th),
body.customer-portal-body.theme-dark :is(thead,th){background:var(--sb449-panel)!important;color:#bdc7d0!important}
html.theme-dark body.admin-body :is(tbody,tr,td),
html.theme-dark body.customer-portal-body :is(tbody,tr,td),
body.admin-body.theme-dark :is(tbody,tr,td),
body.customer-portal-body.theme-dark :is(tbody,tr,td){background:var(--sb449-charcoal)!important;border-color:var(--sb449-line)!important}

html:not(.theme-dark) body.admin-body:not(.theme-dark),
html:not(.theme-dark) body.customer-portal-body:not(.theme-dark){
  --bg:#f7efe4!important;--surface:var(--sb449-paper)!important;--line:#e2d5c4!important;
  background:linear-gradient(145deg,var(--sb449-ivory),#f5ecdf)!important;
}
html:not(.theme-dark) body.admin-body:not(.theme-dark) :is(.admin-layout,.admin-main,.page),
html:not(.theme-dark) body.customer-portal-body:not(.theme-dark) :is(.customer-shell,.customer-main,.customer-page){
  background:linear-gradient(145deg,var(--sb449-ivory),#f5ecdf)!important;
}
html:not(.theme-dark) body.admin-body:not(.theme-dark) :is(.sidebar,.admin-head),
html:not(.theme-dark) body.customer-portal-body:not(.theme-dark) :is(.customer-sidebar,.customer-topbar){
  background:var(--sb449-charcoal)!important;background-image:none!important;border-color:var(--sb449-line)!important;
}
html:not(.theme-dark) body.admin-body:not(.theme-dark) .admin-head,
html:not(.theme-dark) body.customer-portal-body:not(.theme-dark) .customer-topbar{
  background:rgba(255,250,242,.97)!important;color:#172333!important;border-color:#e2d5c4!important;
}
html:not(.theme-dark) body.admin-body:not(.theme-dark) :is(.side-nav a.active,.btn-primary,.application-action--manage),
html:not(.theme-dark) body.customer-portal-body:not(.theme-dark) :is(.customer-side-nav a.active,.btn-primary){
  background:linear-gradient(135deg,var(--sb449-orange),var(--sb449-gold))!important;border-color:transparent!important;color:#fff!important;
}
