/* NextEst visual theme isolation v2: role-aware light palettes.
   Role headers / metric cards intentionally retain colorful dark gradients. */
html[data-color-mode="light"] body[data-nextest-role]{
  --nx-light-bg:#eaf3fd;--nx-light-ink:#153b61;--nx-light-sub:#466683;
  --nx-light-line:#bbd7f0;--nx-light-card:#ffffff;--nx-light-raised:#e7f3ff;
  background:radial-gradient(circle at 12% 0%,#d0edff,transparent 38%),linear-gradient(155deg,#edf7ff,#e2effc 57%,#f6fbff)!important;
  color:var(--nx-light-ink)!important;
}
html[data-color-mode="light"] body[data-nextest-role]:not([data-nextest-role="rep"],[data-nextest-role="warehouse"]) #roleContent{color:var(--nx-light-ink)!important}
html[data-color-mode="light"] body[data-nextest-role]:not([data-nextest-role="rep"],[data-nextest-role="warehouse"]) #roleContent :is(.meta,.sub){color:var(--nx-light-sub)}
html[data-color-mode="light"] body[data-nextest-role]:not([data-nextest-role="rep"],[data-nextest-role="warehouse"]) #roleContent :is(input,select,textarea){
  background:#f8fcff!important;color:#173a5d!important;
  border:1px solid #9fc6e9!important;color-scheme:light!important;
  box-shadow:inset 0 1px 0 #fff,0 4px 12px #0b467515!important;
}
html[data-color-mode="light"] body[data-nextest-role]:not([data-nextest-role="rep"],[data-nextest-role="warehouse"]) #roleContent :is(input,textarea)::placeholder{color:#637e99!important}
html[data-color-mode="light"] body[data-nextest-role]:not([data-nextest-role="rep"],[data-nextest-role="warehouse"]) #roleContent :is(input,select,textarea):focus-visible{outline:3px solid #3093ee!important;outline-offset:2px!important}
/* Keep the high-contrast color cards and hero on their designed deep surfaces. */
html[data-color-mode="light"] body[data-nextest-role]:not([data-nextest-role="rep"],[data-nextest-role="warehouse"]) #roleContent :is(.pa-hero,.pa-metric,.mgr-welcome,.mgr-metric-box,.mgr-hero-kpi,.stat-icon-card,.ac-hero,.ac-metrics>.card){color:#f7fbff!important}
html[data-color-mode="light"] body[data-nextest-role]:not([data-nextest-role="rep"],[data-nextest-role="warehouse"]) #roleContent :is(.pa-hero,.pa-metric,.mgr-welcome,.mgr-metric-box,.mgr-hero-kpi,.stat-icon-card,.ac-hero,.ac-metrics>.card) :is(.meta,.sub,.label,.name,p,small){color:#d9edff!important}
/* Light presentation surfaces: text colors are coordinated with card brightness. */
html[data-color-mode="light"] body[data-nextest-role="admin"] #roleContent :is(.pa-section,.pa-company,.pa-limits,.pa-toolbar,.pa-create-grid,.pa-event-row,.pa-pending-row),
html[data-color-mode="light"] body[data-nextest-role="accountant"] #roleContent :is(.ac-section,.ac-secondary-details,.ne-acc-cash-form,.ne-acc-cash-expected,.ac-analytics>.card),
html[data-color-mode="light"] body[data-nextest-role="manager"] #roleContent :is(.mgr-detail-section,.mgr-detail-heading){
 background:linear-gradient(150deg,#fff,#eaf4ff 95%)!important;
 color:#16395c!important;
 border-color:#b7d4ed!important;
 box-shadow:0 8px 21px #1d568025,inset 0 1px 0 #fff!important;
}
html[data-color-mode="light"] body[data-nextest-role="admin"] #roleContent :is(.pa-section,.pa-company,.pa-limits,.pa-toolbar,.pa-event-row,.pa-pending-row) :is(h2,h3,h4,strong,.name,.meta,.sub,p,span),
html[data-color-mode="light"] body[data-nextest-role="accountant"] #roleContent :is(.ac-section,.ac-secondary-details,.ne-acc-cash-form,.ne-acc-cash-expected) :is(h2,h3,h4,strong,.name,.meta,.sub,p),
html[data-color-mode="light"] body[data-nextest-role="manager"] #roleContent .mgr-detail-section :is(h2,h3,h4,strong,.name,.meta,.sub,p){color:#1b4369!important}
/* Table heads remain deep for contrast; rows use light background and dark ink. */
html[data-color-mode="light"] body[data-nextest-role]:not([data-nextest-role="rep"],[data-nextest-role="warehouse"]) #roleContent :is(table,.tbl) td{color:#234868!important;border-color:#c6dff3!important}
html[data-color-mode="light"] body[data-nextest-role]:not([data-nextest-role="rep"],[data-nextest-role="warehouse"]) #roleContent :is(table,.tbl) tbody tr:nth-child(even){background:rgba(60,137,206,.075)!important}
html[data-color-mode="light"] body[data-nextest-role]:not([data-nextest-role="rep"],[data-nextest-role="warehouse"]) #roleContent :is(table,.tbl) th{background:linear-gradient(130deg,#144c89,#0d3770)!important;color:#f5faff!important}
/* Buttons and badges use unambiguous readable contrast in light panels. */
html[data-color-mode="light"] body[data-nextest-role]:not([data-nextest-role="rep"],[data-nextest-role="warehouse"]) #roleContent :is(.secondary,button.secondary){color:#11508b!important;background:linear-gradient(135deg,#e4f3ff,#d1eaff)!important;border-color:#a4cee9!important}
html[data-color-mode="light"] body[data-nextest-role]:not([data-nextest-role="rep"],[data-nextest-role="warehouse"]) #roleContent :is(.danger,button.danger){color:#fff!important;background:linear-gradient(130deg,#c92d4e,#a81b3b)!important}
html[data-color-mode="light"] body[data-nextest-role]:not([data-nextest-role="rep"],[data-nextest-role="warehouse"]) #roleContent :is(.pa-hero,.ac-hero,.mgr-welcome) :is(h1,h2,h3,strong,.name,p,small){color:#f5fbff!important}
/* Date/time and navigation controls are still dark, by design. */
html[data-color-mode="light"] body[data-nextest-role] :is(#sideDrawer,#mgrCommandBar){color:#f5faff!important}
@media(max-width:700px){html[data-color-mode="light"] body[data-nextest-role]:not([data-nextest-role="rep"],[data-nextest-role="warehouse"]) #roleContent :is(.pa-section,.ac-section){box-shadow:0 5px 14px #124c7820!important}}
