/* OROX Light presentation only; preserve the original pre-NEXUS Dark visuals.
   Loaded last for Light compatibility. Base Dark paint remains authoritative. */
html[data-theme="light"]{
  /* V4 consumes the canonical semantic Light palette in app.css. No duplicate base colors. */
  --nexus-vivid-blue:var(--brand-royal);--nexus-vivid-teal:#23b79c;--nexus-vivid-cyan:#26b9df;
  --nexus-vivid-purple:#9e72ec;--nexus-vivid-amber:#e8a53e;--nexus-vivid-rose:#e76286;
  --nexus-glass:rgba(255,255,255,.98);--nexus-border:var(--line);
  --nexus-shadow:var(--shadow-2);
  color-scheme:only light;
}
html[data-theme="light"] #app{color:var(--text);background:var(--bg)}
html[data-theme="light"] #app .shell{background:transparent}
html[data-theme="light"] #app .main{position:relative;isolation:isolate}
html[data-theme="light"] #app .main:before{
  content:"";position:fixed;inset:var(--nexus-ambient-inset,-10% -5% auto -5%);
  height:320px;z-index:-1;pointer-events:none;
  background:radial-gradient(ellipse at 25% 4%,color-mix(in srgb,var(--blue) 10%,transparent),transparent 60%);
  opacity:.6
}
html[data-theme="light"] #app .main:before{opacity:.33}

/* Authentication shares the theme tokens: prevent light-on-white login and signup forms. */
html[data-theme="light"] :is(#login,#signup,#setup,#recovery){
  background:radial-gradient(circle at 72% 16%,rgba(41,121,255,.09),transparent 35%),#f7f9fc
}
html[data-theme="light"] :is(#login,#signup,#setup,#recovery) .login-card{
  background:linear-gradient(150deg,#fff,#f6f9fe);
  color:#122744;border-color:#d5e3f2;box-shadow:0 25px 64px rgba(29,63,103,.13)
}
html[data-theme="light"] :is(#login,#signup,#setup,#recovery) :is(.login-card>p,.signup-head p,.auth-note){
  color:#52647d
}
html[data-theme="light"] :is(#login,#signup,#setup,#recovery) :is(input:not([type="checkbox"]),select,textarea){
  background:#fff;border-color:#cadbee;color:#122744
}
html[data-theme="light"] :is(#login,#signup,#setup,#recovery) :is(input,textarea)::placeholder{color:#708299}
html[data-theme="light"] :is(#login,#signup,#setup,#recovery) .auth-field-required{color:#b82e47}
html[data-theme="light"] :is(#login,#signup,#setup,#recovery) .btn:not(.primary):not(.red){
  background:#eff5fd;color:#173d6a;border-color:#cadbee
}

/* A clear floating header; a solid fallback applies without backdrop-filter support. */
html[data-theme="light"] #app .topbar{
  background:var(--nexus-glass);
  border-bottom:1px solid var(--nexus-border);
  box-shadow:0 3px 16px color-mix(in srgb,var(--navy) 8%,transparent);
  -webkit-backdrop-filter:blur(9px);backdrop-filter:blur(9px)
}
html[data-theme="light"] #app .topbar{
  border-bottom-color:var(--line);box-shadow:0 4px 20px rgba(17,53,103,.13)
}
html[data-theme="light"] #app :is(.card,.panel,.metric,.executive-kpi,.executive-card,.section-card){
  border-color:var(--line);
  box-shadow:var(--nexus-shadow)
}
html[data-theme="light"] #app :is(.card,.panel,.metric,.executive-kpi,.executive-card,.section-card){
  border-color:var(--nexus-border);
  background-color:var(--elevated-card);
  background-image:linear-gradient(140deg,color-mix(in srgb,var(--tone,var(--blue)) 12%,#fff),#fff 77%);
  box-shadow:var(--shadow-1)
}
/* Distinct panel tier; no white-on-white nesting in Light. */
html[data-theme="light"] #app :is(.panel,.section-card){
  background-color:var(--panel-surface);
  background-image:linear-gradient(145deg,#fff,var(--panel-surface))
}
html[data-theme="light"] #app :is(.metric,.executive-kpi,.executive-card){
  border-color:color-mix(in srgb,var(--tone,var(--blue)) 43%,var(--line));
  background-image:linear-gradient(135deg,color-mix(in srgb,var(--tone,var(--blue)) 19%,#fff),#fff 74%);
  box-shadow:var(--shadow-2)
}
html[data-theme="light"] #app :is(.card,.panel,.metric,.executive-kpi,.executive-card,.section-card):hover{
  border-color:color-mix(in srgb,var(--blue) 34%,var(--line))
}
html[data-theme="light"] #app :is(.card-head,.section-title,.executive-card-head){
  border-color:var(--line);
  color:var(--text-primary);
  background:linear-gradient(110deg,var(--tinted-surface),var(--elevated-card) 90%)
}
html[data-theme="light"] #app :is(.hero,.page-head) :is(h1,h2,h3){color:var(--text)}
html[data-theme="light"] #app :is(.btn,.tab,.nav-item){
  transition:background-color .2s ease,border-color .2s ease,color .2s ease,box-shadow .2s ease
}
html[data-theme="light"] #app :is(.btn,.tab){
  background:var(--interactive-surface);border-color:var(--line);
  color:var(--text-primary);box-shadow:inset 0 1px 0 #fff
}
html[data-theme="light"] #app .btn.primary,
html[data-theme="light"] #app .tab.active{background:var(--blue);border-color:var(--blue);color:white}
html[data-theme="light"] #app .btn.red{background:#bf344e;border-color:#bf344e;color:white}
html[data-theme="light"] #app .btn.ghost{background:transparent}
html[data-theme="light"] #app .btn:hover{
  background:var(--state-hover);
  border-color:var(--border-strong)
}
html[data-theme="light"] #app .btn.primary:hover{background:var(--blue-2);border-color:var(--blue-2)}
html[data-theme="light"] :is(button,input,select,textarea,a):focus-visible{
  outline:2px solid var(--blue);outline-offset:2px
}
html[data-theme="light"] #app :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),select,textarea){
  background-color:var(--surface-1);border-color:var(--line);color:var(--text)
}
html[data-theme="light"] #app :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),select,textarea){
  background-color:var(--elevated-card);
  border-color:var(--border-strong);color:var(--text-primary)
}
html[data-theme="light"] #app :is(input,textarea)::placeholder{color:#6b7e95}
html[data-theme="light"] #app :is(input,select,textarea):disabled{
  background-color:var(--state-disabled);color:var(--text-subtle)
}
html[data-theme="light"] #app :is(.user-chip,.global-search-box,.toolbar,.focus-item){
  color:var(--text);border-color:var(--line)
}
html[data-theme="light"] #app .user-chip{background:rgba(255,255,255,.85)}

/* Table and report surfaces must never inherit a dark tint in Light mode. */
html[data-theme="light"] #app :is(th,thead td,.table-head){
  background:var(--tinted-surface);color:#294868
}
html[data-theme="light"] #app :is(td,th){
  border-color:var(--line)
}
html[data-theme="light"] #app tr:hover td{
  background:var(--state-hover)
}
html[data-theme="light"] #app :is(.table-wrap,.section-content,.modal-body){color:var(--text)}
html[data-theme="light"] #app :is(.empty,.muted,.subtle-text){color:var(--muted)}
html[data-theme="light"] #app :is(.badge,.status-badge){
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--border-strong) 55%,transparent)
}

/* Re-skin the existing sidebar without touching navigation order, size or nesting. */
html[data-theme="light"] body:not(.platform-mode) #sidebar{
  background:linear-gradient(157deg,#fff,#edf5ff 95%);
  border-inline-end:1px solid var(--line);
  box-shadow:3px 0 23px rgba(19,55,102,.14);color:var(--text-primary)
}
html[data-theme="light"] body:not(.platform-mode) #sidebar :is(.sidebar-brand,.sidebar-help){border-color:#dbe6f4}
html[data-theme="light"] body:not(.platform-mode) #sidebar :is(.sidebar-brand-title,.sidebar-brand-title strong){color:#0b2550}
html[data-theme="light"] body:not(.platform-mode) #sidebar .sidebar-brand-title small{color:#61738c}
html[data-theme="light"] body:not(.platform-mode) #sidebar :is(.sidebar-collapse-btn,.sidebar-close-btn){
  background:#f2f7fd;border-color:#d3e3f5;color:#235799
}
html[data-theme="light"] body:not(.platform-mode) #sidebar .nav-scroll{scrollbar-color:#aebfd2 transparent}
html[data-theme="light"] body:not(.platform-mode) #sidebar :is(.nav-quick,.nav-section,.sidebar-help .nav-item){
  border-color:var(--line);
  background:linear-gradient(130deg,#fff,var(--panel-surface));
  box-shadow:var(--shadow-1);
  color:#193a63
}
html[data-theme="light"] body:not(.platform-mode) #sidebar :is(.nav-quick,.nav-section-toggle,.nav-item){
  color:#25405f;text-shadow:none
}
html[data-theme="light"] body:not(.platform-mode) #sidebar :is(.nav-quick,.nav-section):hover{
  background:#eaf3ff;border-color:#a9c9f3
}
html[data-theme="light"] body:not(.platform-mode) #sidebar :is(.nav-quick.active,.nav-section.open,.nav-section.has-active){
  background:linear-gradient(125deg,var(--state-active),#edf5ff);
  border-color:#79a9e7;
  box-shadow:inset 3px 0 var(--brand-royal),0 5px 15px rgba(29,103,210,.17)
}
html[data-theme="light"] body:not(.platform-mode) #sidebar :is(.nav-quick.active,.nav-section.open,.nav-section.has-active) :is(.nav-section-label,.nav-section-toggle,.nav-item){
  color:#103d82
}
html[data-theme="light"] body:not(.platform-mode) #sidebar :is(.nav-quick .ico,.nav-section-icon){
  background:color-mix(in srgb,var(--nav-accent,var(--brand-royal)) 17%,#fff);
  color:color-mix(in srgb,var(--nav-accent,var(--brand-royal)) 68%,#10345c);
  border-color:color-mix(in srgb,var(--nav-accent,var(--brand-royal)) 36%,var(--line));
  box-shadow:inset 0 1px 0 #fff
}
html[data-theme="light"] body:not(.platform-mode) #sidebar .nav-submenu{border-inline-start-color:#bed3eb}
html[data-theme="light"] body:not(.platform-mode) #sidebar .nav-submenu .nav-item{color:#38516c;background:transparent}
html[data-theme="light"] body:not(.platform-mode) #sidebar .nav-submenu .nav-item.active{
  color:#1052b9;background:#dcecff;border-color:#a2c5f5;box-shadow:inset 2px 0 #2979ff
}
html[dir="rtl"][data-theme="light"] body:not(.platform-mode) #sidebar .nav-submenu .nav-item.active{box-shadow:inset -2px 0 #2979ff}
html[data-theme="light"] body:not(.platform-mode) :is(.sidebar-collapsed-flyout,.sidebar-icon-tooltip){
  background:#fff;border-color:#bfd5f0;color:#193754;box-shadow:0 12px 30px rgba(18,55,110,.15)
}
html[data-theme="light"] body:not(.platform-mode) .sidebar-collapsed-flyout .nav-item{background:#f2f7fd;color:#224267}
html[data-theme="light"] body:not(.platform-mode) .sidebar-collapsed-flyout .nav-item.active{background:#e1efff;color:#1154b6}
html[data-theme="light"] body:not(.platform-mode) #sidebar .sidebar-foot,
html[data-theme="light"] body:not(.platform-mode) #sidebar .sidebar-foot strong{color:#56718e}

/* Dashboard/finance charts keep genuine data and only change their visual skin. */
html[data-theme="light"] #dashboardView :is(.executive-card,.executive-kpi,.dashboard-secondary-section){
  border-color:color-mix(in srgb,var(--tone,var(--blue)) 36%,var(--line));
  background:linear-gradient(130deg,color-mix(in srgb,var(--tone,var(--blue)) 15%,#fff),#fff 76%);
  box-shadow:var(--shadow-2)
}
html[data-theme="light"] #dashboardView :is(.executive-kpi-icon,.executive-card-icon){
  color:color-mix(in srgb,var(--tone,var(--blue)) 65%,#10345c);
  background:color-mix(in srgb,var(--tone,var(--blue)) 22%,#fff);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--tone,var(--blue)) 35%,var(--line))
}
html[data-theme="light"] #dashboardView .executive-kpi-value{color:var(--text-primary)}
html[data-theme="light"] #dashboardView :is(.executive-kpi-head,.executive-kpi-foot,.executive-card-head p){color:var(--text-secondary)}
html[data-theme="light"] #dashboardVisuals .dashboard-visual{
  background:linear-gradient(125deg,#fff,var(--tinted-surface));color:var(--text-primary);
  border-color:var(--line);box-shadow:var(--shadow-2)
}
html[data-theme="light"] #dashboardVisuals .dashboard-visual :is(h3,p){color:var(--text)}
html[data-theme="light"] #dashboardVisuals .dashboard-visual-stat{
  background:#f5f9ff;border-color:#dae8f8;color:var(--text)
}
html[data-theme="light"] #dashboardVisuals .dashboard-visual-stat :is(b,small){color:var(--text)}
html[data-theme="light"] #dashboardVisuals .dashboard-visual.visual-manufacturing{
  background:linear-gradient(125deg,#fff,#e5f8f2)
}
html[data-theme="light"] #dashboardVisuals .dashboard-visual.visual-maintenance{
  background:linear-gradient(125deg,#fff,#efeaff)
}
html[data-theme="light"] #dashboardVisuals .dashboard-visual:before{opacity:.3}
html[data-theme="light"] #app :is(.exec-y-axis,.exec-x-axis,.exec-chart-legend){color:var(--muted)}

/* Invoice/quotation/form dialogs: limited glass only around the modal, not the input area. */
html[data-theme="light"] :is(dialog.dialog,dialog.workspace-library-dialog){
  background:var(--card);color:var(--text);border-color:var(--line);
  box-shadow:0 22px 64px color-mix(in srgb,var(--navy) 30%,transparent)
}
html[data-theme="light"] :is(dialog.dialog,dialog.workspace-library-dialog)::backdrop{
  background:rgba(11,24,48,.56)
}
html[data-theme="light"] :is(.dlg-head,.dlg-foot){
  background:var(--panel-surface);border-color:var(--line)
}
html[data-theme="light"] :is(.dlg-body,.form-grid){color:var(--text)}
/* Readable controls and clear hierarchy in the existing compact item editor. */
html[data-theme="light"] #entityDialog:has(.orox-product-form){
  border:1px solid #96b7df;
  box-shadow:0 26px 72px rgba(20,55,103,.22)
}
html[data-theme="light"] #entityDialog .orox-product-form .product-form-basic{
  background:linear-gradient(150deg,#e9f2ff,#fff 78%);
  border-color:#7caaff;
  box-shadow:var(--shadow-1)
}
html[data-theme="light"] #entityDialog .orox-product-form .form-field label{
  color:var(--text-secondary);font-size:12px;line-height:1.5
}
html[data-theme="light"] #entityDialog .orox-product-form :is(.product-form-section-head small,.product-form-details>details>summary small,.product-form-behavior-details>summary){
  color:var(--text-secondary);font-size:12px;line-height:1.5
}
html[data-theme="light"] #entityDialog .orox-product-form .form-section-kicker{font-size:11px}
html[data-theme="light"] #entityDialog .orox-product-form :is(input:not([type="checkbox"]),select,textarea){
  border-color:var(--border-strong)
}

/* Existing Smart POS layout is approved. Only its paint changes, not sizing or placement. */
html[data-theme="light"] #moduleView:has(.pos-workspace-v2[data-pos-premium-v5="ready"]){
  --pos-v5-bg:#f7f9fc;--pos-v5-panel:#fff;--pos-v5-tile:#f3f8fe;
  --pos-v5-stroke:#d4e4f4;--pos-v5-white:#132b4a;
}
html[data-theme="light"] #moduleView:has(.pos-workspace-v2[data-pos-premium-v5="ready"]) .hero{
  background:linear-gradient(120deg,#fff,#edf5ff);border-color:#dce7f3;
  color:#163455;box-shadow:0 4px 16px rgba(28,70,125,.07)
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"]{
  --bg:#f7f9fc;--card:#fff;--text:#172e4c;--muted:#526782;--line:#d6e3f2;
  --surface-1:#f6faff;--surface-soft:#edf4fc;
  --pos-deep:#f0f6fc;--pos-panel:#fff;--pos-border:#d6e3f2;--pos-muted:#526782;
  color:var(--text);background:linear-gradient(145deg,#f7fbff,#edf4fc);
  border-color:#d5e3f2;box-shadow:0 10px 25px rgba(33,76,133,.075)
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] :is(.pos-v5-toolbar,.pos-shift-details,.pos-layout>.section-card,.pos-filters,.pos-panel-title,.pos-v4-catalog,.pos-cart-totals,.pos-checkout,.pos-extra-options,.pos-cash-calculator){
  background:#fff;border-color:#d7e4f4;color:#193452;
  box-shadow:0 3px 10px rgba(24,61,107,.045)
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] :is(.pos-product,.pos-v5-product-tile,.pos-cart-row,.pos-v4-category,.pos-shift-strip,.pos-quantity-control button,.pos-secondary-tools,.pos-tool-grid .btn){
  background:#f5f9ff;border-color:#d6e5f5;color:#173552
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] :is(.pos-product-name,.pos-product-price,.pos-header-total,.pos-cart-grand,.pos-cart-row strong,.pos-v5-terminal,.pos-checkout-title){
  color:#152c4a
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] :is(.pos-product-subtitle,.pos-product-stock,.pos-cart-empty,.pos-quote-status){
  color:#566c86
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] :is(.pos-cart-row input,.pos-checkout input,.pos-checkout select,#posSearch,#posCategory){
  background:#fff;border-color:#cadcf0;color:#15304e
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] .pos-fast-actions{
  background:#f5f9ff;border-color:#d7e6f4
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] :is(.pos-product-add,[data-pos-sell],.pos-mobile-paybar [data-pos-sell]){
  color:#fff
}

/* POS V5/V6 uses literal dark paint in nested tiles; neutralize that paint only. */
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] :is(.pos-sale,.pos-cart,.pos-v4-categories,.pos-catalog-shortcuts,.pos-shift-head,.pos-add-notice,.pos-v4-payment-details,.pos-v6-cart-serial,.pos-control-details){
  background:#f7faff;border-color:#d5e4f4;color:#193452
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] :is(.pos-shift-strip,.pos-cart-totals){
  background:#f3f8fe;border-color:#d7e6f4;color:#193452
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] :is(.pos-shift-head,.pos-shift-strip b,.pos-panel-title h3,.pos-cart-totals>div b,.pos-v5-terminal b){
  color:#153250
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] :is(.pos-shift-strip small,.pos-cart-field>span,.pos-cart-totals>div:not(.pos-cart-grand),.pos-v6-cart-unit,.pos-v6-cart-serial>small){
  color:#536a85
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] .pos-v5-product-tile{
  background:linear-gradient(150deg,#fff,#f0f7ff);border-color:#d5e5f5;
  box-shadow:0 4px 12px rgba(26,70,121,.065)
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] .pos-v5-product-tile:focus-within,
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] .pos-v5-product-tile:hover{
  border-color:#8bb9fa;box-shadow:0 5px 17px rgba(41,121,255,.10)
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] .pos-v5-product-tile>.pos-product{
  color:#193452
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] .pos-v5-product-tile .pos-product-media{
  background:radial-gradient(ellipse at 50% 45%,#e8f2ff,#f7faff 75%)
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] .pos-v5-product-tile :is(.pos-product-name,.pos-product-price){color:#153250}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] .pos-v5-product-tile .pos-product-subtitle{color:#5a6e86}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] .pos-v5-product-tile .pos-product-stock{
  background:#e2f7f0;color:#087956;border-color:#a3e3d1
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] .pos-v5-product-tile .pos-product-stock.is-out{
  background:#fff0f2;color:#b82e47;border-color:#efbcc5
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] :is(.pos-v5-favorite,.pos-cart-thumb,.pos-v6-cart-line .pos-cart-thumb,.pos-v6-cart-edit>summary,.pos-v6-cart-controls .pos-quantity-control button,.pos-v5-method,.pos-fast-actions .btn,.pos-cart-row-actions .btn,.pos-catalog-shortcuts .btn){
  background:#edf5ff;border-color:#cbdff4;color:#1e518c
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] :is(.pos-v5-method.is-active,.pos-v4-category.is-active){
  background:#2067e6;border-color:#2067e6;color:#fff
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] :is(.pos-cart-field input,.pos-v6-cart-edit-fields input,.pos-v6-cart-controls .pos-quantity-control input,.pos-v6-cart-serial [data-pos-serial-input]){
  background:#fff;border-color:#c7dbee;color:#173452
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] .pos-v6-cart-line .pos-cart-item>b{color:#153250}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] :is(.pos-cart-grand strong,.pos-line-total){color:#087d74;text-shadow:none}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] .pos-v6-cart-serial .pos-serial-selected>span{
  background:#eaf6fc;color:#244766;border-color:#c6e3ef
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] .pos-v5-network:not([data-connection="offline"]){
  background:#e0f8f1;color:#08664f;border-color:#a6e0cf
}
html[data-theme="light"] #moduleView .pos-mobile-view.pos-workspace-v2[data-pos-premium-v5="ready"] > .pos-mobile-paybar{
  background:linear-gradient(110deg,#fff,#ecf5ff);
  border-top-color:#c9a66b;color:#153250;box-shadow:0 -5px 20px rgba(18,65,118,.12)
}
html[data-theme="light"] #moduleView .pos-mobile-view.pos-workspace-v2[data-pos-premium-v5="ready"] > .pos-mobile-paybar.is-visible{
  background:linear-gradient(110deg,#fff,#ecf5ff);color:#153250
}

/* Cashboxes V2 uses its own dark palette; adapt visuals without changing money actions. */
html[data-theme="light"] .cb2-workspace{
  --cb2-b:#d9e5f3;--cb2-bg:linear-gradient(155deg,#ffffff,#f4f9ff);--cb2-muted:#536981;
  color:#163250
}
html[data-theme="light"] .cb2-workspace :is(.cb2-heading h2,.cb2-kpi>strong,.cb2-board-head h3,.cb2-aside-head h3,.cb2-account-cell strong,.cb2-preview-title strong){
  color:#163250
}
html[data-theme="light"] .cb2-workspace :is(.cb2-kpi,.cb2-board,.cb2-aside){
  box-shadow:0 7px 22px rgba(28,67,117,.07)
}
html[data-theme="light"] .cb2-workspace :is(.cb2-flow-strip,.cb2-mobile-card,.cb2-statement-head,.cb2-statement-kpis>div,.cb2-preview-facts>div){
  background:#f3f8fe;border-color:#d9e5f3;color:#183653
}
html[data-theme="light"] .cb2-workspace .cb2-preview-balance{
  background:linear-gradient(125deg,#ebf5ff,#f9fcff);border-color:#bcd9f3
}
html[data-theme="light"] .cb2-workspace :is(.cb2-preview-balance strong,.cb2-preview-balance small,.cb2-preview-facts small,.cb2-statement-kpis small,.cb2-statement-filter label,.cb2-empty){
  color:#3b5876
}
html[data-theme="light"] .cb2-workspace :is(.cb2-table th,.cb2-statement-list th){
  background:#ecf4ff;color:#34516d
}
html[data-theme="light"] .cb2-workspace :is(.cb2-toolbar input,.cb2-toolbar select,.cb2-statement-filter input,.cb2-statement-filter select){
  background:#fff;border-color:#c9ddee;color:#183652
}
html[data-theme="light"] .cb2-workspace :is(.cb2-actions .btn,.cb2-row-actions .btn){
  background:#e8f3ff;border-color:#bad6f2;color:#205da2
}
html[data-theme="light"] .cb2-workspace .cb2-actions .cb2-btn-receive{
  background:#ddf8f2;border-color:#9cdacb;color:#08715e
}
html[data-theme="light"] .cb2-workspace .cb2-actions .cb2-btn-pay{
  background:#fff0f1;border-color:#edb4c0;color:#ac3147
}
html[data-theme="light"] .cb2-workspace .cb2-actions .cb2-btn-reconcile{
  background:#fff5e5;border-color:#e9cc98;color:#835c17
}
html[data-theme="light"] .cb2-workspace .cb2-positive{color:#087956!important}
html[data-theme="light"] .cb2-workspace .cb2-negative{color:#b82e47!important}
html[data-theme="light"] .cb2-workspace :is(.cb2-status,.cb2-message){color:#835c17}
html[data-theme="light"] .cb2-workspace .cb2-status.active{color:#087956}
html[data-theme="light"] .cb2-workspace :is(.cb2-tone-bank .cb2-kpi-icon,.cb2-icon-bank){color:#205da2}
html[data-theme="light"] .cb2-workspace :is(.cb2-tone-wallet .cb2-kpi-icon,.cb2-icon-wallet){color:#087b9e}
html[data-theme="light"] .cb2-workspace :is(.cb2-tone-activity .cb2-kpi-icon,.cb2-account-icon){color:#87601e}

/* Keep semantic status and per-component colored headings; never force all bold text to inherit. */

/* Project workspaces V2 have a self-contained dark skin; keep both list and detail genuinely light. */
html[data-theme="light"] .orox-projects-v2{
  --pv2-bg:#f7f9fc;--pv2-card:#fff;--pv2-line:#d7e5f4;--pv2-dim:#546b85;
  --pv2-purple:#6351c5;--pv2-blue:#2067e6;--pv2-green:#087956;--pv2-cyan:#087b9e;--pv2-amber:#916117;--pv2-red:#b82e47;
  color:#163250;background:linear-gradient(150deg,#f9fbfe,#eef5fd);border-color:#d6e4f3
}
html[data-theme="light"] .orox-projects-v2 :is(.pv2-metric,.pv2-panel,.pv2-section,.pv2-project-card,.pv2-file,.pv2-doc,.pv2-member,.pv2-more-actions){
  background:#fff;color:#163250;border-color:var(--pv2-line);
  box-shadow:0 5px 15px rgba(19,66,121,.055)
}
html[data-theme="light"] .orox-projects-v2 :is(.pv2-metric strong,.pv2-panel>header h3,.pv2-section>header h3,.pv2-follow-row,.pv2-legend-row strong,.pv2-head-title h2,.pv2-project-link,.pv2-table-wrap table,.pv2-card-main strong){
  color:#163250
}
html[data-theme="light"] .orox-projects-v2 :is(.pv2-metric em,.pv2-head-title small,.pv2-head-title p,.pv2-detail-meta,.pv2-card-main small,.pv2-card-main em,.pv2-empty,.pv2-progress-unknown){
  color:#526985
}
html[data-theme="light"] .orox-projects-v2 :is(.pv2-status-nav button,.pv2-tabs button,.pv2-pagination button){
  background:#f1f7fe;border-color:#d5e3f3;color:#274a70
}
html[data-theme="light"] .orox-projects-v2 :is(.pv2-status-nav button.active,.pv2-tabs button.active){
  background:#2067e6;color:#fff;border-color:#2067e6
}
html[data-theme="light"] .orox-projects-v2 :is(thead,.pv2-section thead){
  background:#edf4fc;color:#38526f
}
html[data-theme="light"] .orox-projects-v2 :is(.pv2-badge,.pv2-list-symbol){color:#205da2;background:#e9f3ff}
html[data-theme="light"] .orox-projects-v2 .pv2-badge.tone-green{color:#087956;background:#e5f7f1}
html[data-theme="light"] .orox-projects-v2 .pv2-badge.tone-red{color:#b82e47;background:#fff0f2}
html[data-theme="light"] .orox-projects-v2 .pv2-badge.tone-amber{color:#835c17;background:#fff5e7}
html[data-theme="light"] .orox-projects-v2 .pv2-badge.tone-purple{color:#604dbb;background:#f2edff}
html[data-theme="light"] .orox-projects-v2 .pv2-progress{color:#163250}
html[data-theme="light"] .orox-projects-v2 .pv2-progress:before{background:#fff}
html[data-theme="light"] .orox-projects-v2 .pv2-detail .pv2-next{
  background:linear-gradient(125deg,#eef2ff,#f9fbff);border-color:#cdd6f8
}
html[data-theme="light"] .orox-projects-v2 .pv2-detail .pv2-next :is(h4,p){color:#183954}
html[data-theme="light"] .orox-projects-v2 .pv2-detail .pv2-blocker{
  background:#fff3e5;color:#835c17;border-color:#edcf9b
}
html[data-theme="light"] .orox-projects-v2 .pv2-detail .pv2-more-actions>summary{color:#234967}
html[data-theme="light"] .orox-projects-v2 .pv2-section td::before{color:#506b8a}

/* Non-financial section hero banners match Light without changing their controls or grids. */
html[data-theme="light"] .sales-premium .sales-v2-head,
html[data-theme="light"] .sp-workspace .sp-page-lead,
html[data-theme="light"] .sp-supplier-center .sp-center-hero,
html[data-theme="light"] .service-v1 .service-v1-hero,
html[data-theme="light"] .accounting-general-v2 .ga2-hero{
  background:linear-gradient(125deg,#fff,#eaf4ff);
  color:#173553;border-color:#d3e5f5;box-shadow:0 5px 18px rgba(30,66,113,.065)
}
html[data-theme="light"] .sales-premium .sales-v2-head :is(h2,p,.sales-v2-filters label,.sales-v2-period-value,.sales-v2-updated),
html[data-theme="light"] .sp-workspace .sp-page-lead :is(h2,p,.sp-eyebrow),
html[data-theme="light"] .sp-supplier-center .sp-center-hero :is(h3,small),
html[data-theme="light"] .service-v1 .service-v1-hero :is(h2,p,.service-v1-eyebrow),
html[data-theme="light"] .accounting-general-v2 .ga2-hero :is(h2,p,.ga2-eyebrow){
  color:#1c4165
}
html[data-theme="light"] .sales-premium .sales-v2-head :is(.sales-v2-filters select,.sales-v2-custom input,.sales-v2-quick button){
  background:#fff;color:#20476b;border-color:#bed6f0
}
html[data-theme="light"] .sales-premium .sales-v2-head .sales-v2-quick button:hover{
  background:#2067e6;color:#fff
}
html[data-theme="light"] .accounting-general-v2 .ga2-hero .ga2-integrity-link{
  background:#e9f2ff;color:#205da2;border-color:#bed7f3
}
html[data-theme="light"] .sp-workspace .sp-lead-mark{
  background:#e9f3ff;color:#205da2;border-color:#c8def5
}

/* The header control is a single direct switch, not a popup. */
#themeControl{display:inline-flex;align-items:center}
#themeBtn .ui-icon{width:18px;height:18px}
html[data-theme="light"] #themeBtn{
  color:#195bba;background:#eaf3ff;border-color:#afcff4;
  box-shadow:inset 0 1px 0 #fff,0 2px 8px rgba(31,84,143,.09)
}
html[data-theme="light"] #themeBtn:hover{background:#dcecff;border-color:#86b6f4}

/* V4 shared interaction states: a single Light definition per component. */
html[data-theme="light"] #app :is(.filters,.toolbar,.search-toolbar,.filter-bar){
  border-color:var(--line);color:var(--text-primary)
}
html[data-theme="light"] #app :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea):focus-visible{
  outline-color:var(--brand-royal);outline-offset:1px;
  box-shadow:0 0 0 3px var(--focus-ring)
}
html[data-theme="light"] #app :is(input,textarea)::placeholder{color:var(--text-subtle)}
html[data-theme="light"] #app :is(.btn,.tab):disabled{
  background:var(--state-disabled);color:var(--text-subtle);
  opacity:.68;cursor:not-allowed
}
html[data-theme="light"] #app :is(.tab.active,.btn.primary){
  box-shadow:0 4px 13px rgba(32,103,230,.23)
}
html[data-theme="light"] #app :is(.badge.good,.status-badge.good){
  background:var(--state-success-bg);color:#075c43;border-color:#8ad3b6
}
html[data-theme="light"] #app :is(.badge.warn,.status-badge.warn){
  background:var(--state-warning-bg);color:#80520e;border-color:#e1bd78
}
html[data-theme="light"] #app :is(.badge.bad,.status-badge.bad){
  background:var(--state-danger-bg);color:#a92a42;border-color:#e8a1af
}
html[data-theme="light"] :is(dialog.dialog,dialog.workspace-library-dialog){
  border-color:var(--line);box-shadow:var(--shadow-3)
}
html[data-theme="light"] #toast:not(.hidden){
  background:#113b6b;color:#fff;border:1px solid #3678bd;
  box-shadow:var(--shadow-3)
}

/* The sidebar's unique plan CTA keeps its gold identity in Light. */
html[data-theme="light"] body:not(.platform-mode) #sidebar .sidebar-plan-button{
  background:linear-gradient(115deg,#fff7e7,#f5e2bb);border-color:#d9b77f;
  color:var(--gold-text);box-shadow:var(--shadow-1)
}
html[data-theme="light"] body:not(.platform-mode) #sidebar .sidebar-plan-button :is(strong,small,.sidebar-plan-label){
  color:var(--gold-text)
}
html[data-theme="light"] body:not(.platform-mode) #sidebar .sidebar-plan-symbol{
  color:var(--gold-text);background:linear-gradient(135deg,#fffaf0,#edd49e);
  border-color:#d5b274
}

/* Attendance status ink originally assumed a dark card. */
html[data-theme="light"] .hr-v3-location-status[data-state="error"]{
  color:#a92a42;background:var(--state-danger-bg);border-color:#de9fac
}
html[data-theme="light"] .hr-v3-location-status[data-state="error"] .ui-icon{color:#a92a42}
html[data-theme="light"] .hr-v3-location-status[data-state="success"]{
  color:#08644c;background:var(--state-success-bg);border-color:#8bd5b8
}
/* Attendance V4 Light surfaces: preserve V7 layout, make each metric and nested card distinct. */
html[data-theme="light"] .hr-v7-overview .hr-v7-metric{
  border-color:color-mix(in srgb,var(--v7-accent) 48%,var(--line));
  background:linear-gradient(135deg,color-mix(in srgb,var(--v7-accent) 21%,#fff),#fff 81%);
  box-shadow:var(--shadow-1),inset 0 3px 0 color-mix(in srgb,var(--v7-accent) 77%,#fff)
}
html[data-theme="light"] .hr-v7-overview .hr-v7-metric-icon{
  color:color-mix(in srgb,var(--v7-accent) 60%,#10345c);
  background:color-mix(in srgb,var(--v7-accent) 24%,#fff);
  border:1px solid color-mix(in srgb,var(--v7-accent) 43%,var(--line))
}
html[data-theme="light"] .hr-v7-overview .hr-v7-card{
  border-color:var(--line);
  background:linear-gradient(150deg,#fff,var(--panel-surface));
  box-shadow:var(--shadow-2)
}
html[data-theme="light"] .hr-v7-overview .hr-v7-mobile-card{
  border-color:#8acdb9;background:linear-gradient(145deg,#fff,#e7f8f2)
}
html[data-theme="light"] .hr-v7-overview .hr-v7-map-card{
  border-color:#91bae8;background:linear-gradient(145deg,#fff,#e8f3ff)
}
html[data-theme="light"] .hr-v7-overview .hr-v7-mobile-status{
  border-color:#8acdb9;background:var(--state-success-bg)
}
html[data-theme="light"] .hr-v7-overview .hr-v7-mobile-status b{color:var(--teal)}
html[data-theme="light"] .hr-v7-overview :is(.hr-v7-location,.hr-v7-branch){
  background:var(--interactive-surface);border-color:var(--line)
}
html[data-theme="light"] .hr-v7-overview :is(.hr-v7-location,.hr-v7-branch):hover{
  background:var(--state-hover);border-color:var(--border-strong)
}
html[data-theme="light"] .hr-v7-overview .hr-v7-location-pin{
  color:color-mix(in srgb,#0aa998 60%,#10345c)
}
html[data-theme="light"] .hr-v7-overview .hr-v7-location-out .hr-v7-location-pin{
  color:#80520e
}
html[data-theme="light"] .hr-v7-overview .hr-v7-location-site .hr-v7-location-pin{
  color:#185db4
}
html[data-theme="light"] .hr-v7-overview .hr-v7-ring>div{background:var(--elevated-card)}
html[data-theme="light"] .hr-v7-overview .hr-v7-trend-track{
  background:color-mix(in srgb,var(--brand-royal) 15%,var(--panel-surface))
}

/* Settings and activity cards retain colorful section icons with accessible ink. */
html[data-theme="light"] :is(.settings-v2-tile,.settings-v2-block,.al-metric,.tc-metric){
  border-color:var(--line);box-shadow:var(--shadow-1)
}
html[data-theme="light"] .settings-v2-tile-icon{
  color:color-mix(in srgb,var(--tile-color,var(--blue)) 64%,#10345c)
}
html[data-theme="light"] .settings-v2-primary-card:not(.is-onboarding) .settings-v2-primary-icon{
  color:var(--gold-text)
}

/* Modules with hardcoded dark hero/inner tiles from their original scoped CSS. */
html[data-theme="light"] :is(.so-heading,.so-detail-banner,.so-create-intro){
  background:linear-gradient(110deg,#fff,#eaf3ff 72%,#e8f9fa);
  color:#143353;border:1px solid #c4dff0;box-shadow:0 6px 18px rgba(20,66,123,.075)
}
html[data-theme="light"] :is(.so-heading h3,.so-detail-banner h3,.so-detail-banner strong,.so-create-intro h4){
  color:#143353
}
html[data-theme="light"] :is(.so-heading p,.so-detail-banner small,.so-create-intro p){color:#485e78}
html[data-theme="light"] .so-heading .so-eyebrow{color:#11679b}
html[data-theme="light"] .so-detail-banner :is(.btn,a){color:var(--blue)}
html[data-theme="light"] .sales-premium .sales-v2-title-icon{
  background:#e3f5ff;color:#087b9e
}
html[data-theme="light"] :is(.sp-workspace,.sales-premium,.so-workspace,.smart-invoices-v1,.smart-collections-v1){
  color:var(--text)
}
html[data-theme="light"] :is(.sp-workspace,.smart-collections-v1) :is(.sp-kpi,.cv1-kpi){
  background:linear-gradient(130deg,#fff,#f0f7ff);border-color:#cbddeb;
  box-shadow:0 4px 16px rgba(19,62,107,.07)
}
html[data-theme="light"] .cb2-workspace :is(.cb2-kpi,.cb2-board,.cb2-aside){
  background:linear-gradient(150deg,#fff,#f1f7ff);border-color:#c9dbec;
  box-shadow:0 6px 20px rgba(17,54,100,.08)
}
html[data-theme="light"] .cb2-workspace :is(.cb2-flow-strip,.cb2-shift-row,.cb2-statement-head,.cb2-preview-facts>div){
  background:#eef6ff;color:#143553;border-color:#c8ddee
}
html[data-theme="light"] .cb2-workspace :is(.cb2-account-icon,.cb2-kpi-icon){
  background:color-mix(in srgb,currentColor 9%,#fff)
}
html[data-theme="light"] .orox-projects-v2 .pv2-detail .pv2-section tbody tr{
  background:#f2f7ff;color:#153551
}
html[data-theme="light"] .orox-projects-v2 :is(.pv2-progress,.pv2-status-nav,.pv2-detail .pv2-more-actions){
  border-color:#c9ddeb;color:#183653
}
html[data-theme="light"] :is(.tc-metric,.al-metric,.settings-v2-primary-card,.invoice-v1-kpi,.hr-v7-card){
  border-color:color-mix(in srgb,var(--tc-accent,var(--al-tone,var(--blue))) 22%,#cfdfed);
  background:linear-gradient(135deg,color-mix(in srgb,var(--tc-accent,var(--al-tone,var(--blue))) 7%,#fff),#fff 70%);
  box-shadow:0 4px 17px rgba(20,60,108,.075)
}
html[data-theme="light"] .reports-v2 :is(.reports-v2-hero,.reports-v2-chart-card){
  border-color:#c8d8ed;
  background:linear-gradient(125deg,#fff,#f1f5ff 78%,#f8f1ff);
  box-shadow:0 6px 22px rgba(22,62,114,.075)
}
html[data-theme="light"] .reports-v2 :is(.reports-v2-search,.reports-v2-section,.reports-v2-card){
  color:var(--text)
}
html[data-theme="light"] .platform-admin :is(.platform-kpi,.platform-role-card,.platform-tenant-page-head,.platform-timeline-event){
  border-color:#c9dceb;background:linear-gradient(135deg,#fff,#f1f7ff);
  box-shadow:0 4px 17px rgba(21,62,109,.065)
}
html[data-theme="light"] .orox-ai-character{
  background:linear-gradient(135deg,#f5f2ff,#ecf7ff);color:var(--text);border-color:#d1dced
}
html[data-theme="light"] .orox-ai-character :is(h3,p,small,strong){color:#1d3f66}
html[data-theme="light"] .orox-ai-panel{
  background:#fff;border-color:#bfd4eb;box-shadow:0 20px 58px rgba(12,49,97,.2)
}
html[data-theme="light"] .orox-ai-input{background:#f4f8fe;color:var(--text);border-color:#c3d6eb}

/* POS V5 uses local dark variables. Complete its Light-only interactive exceptions here. */
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] .pos-shift-strip>div{
  background:var(--interactive-surface);border-color:var(--line);color:var(--text-primary)
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] .pos-panel-title .badge{
  background:var(--state-info-bg);color:#185992;border-color:#91bcea
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] .pos-v5-terminal span{
  color:var(--text-secondary)
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] .pos-v5-network[data-connection="offline"]{
  background:var(--state-danger-bg);border-color:#dc9eab;color:#9b2a40
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] :is(.pos-cart-row.pos-v6-cart-line.is-last-added,.pos-v6-cart-edit[open]>summary){
  background:var(--state-active);border-color:#8eb8e9;color:var(--text-primary)
}

/* Stay compact on mobile. Backdrop blur is deliberately omitted for POS. */
@media(max-width:900px){
  html[data-theme="light"][data-orox-mobile-native-v2="1"] body:not(.platform-mode) #sidebar .nav-section{
    background:linear-gradient(145deg,#fff,#f1f7fe);border-color:#dbe6f4
  }
  html[data-theme="light"][data-orox-mobile-native-v2="1"] body:not(.platform-mode) #sidebar .nav-section.open,
  html[data-theme="light"][data-orox-mobile-native-v2="1"] body:not(.platform-mode) #sidebar .nav-section.has-active{
    background:#e3efff;border-color:#83b5fa
  }
  html[data-theme="light"] body:not(.platform-mode) #sidebar .sidebar-close-btn{
    background:#f1f7fe;border-color:#cfdff0;color:#1858ad
  }
}
@media(max-width:680px){
  html[data-theme="light"] #app .main:before{display:none}
  html[data-theme="light"] #app :is(.card,.panel,.metric,.executive-kpi,.executive-card,.section-card){
    box-shadow:0 3px 12px rgba(12,42,84,.075)
  }
}
@media(prefers-reduced-motion:reduce){
  html[data-theme="light"] #app :is(.btn,.tab,.nav-item){transition:none!important}
}

/* OROX Light True Colors V1 — internal module paint only.
   Keep the approved Dashboard, Sidebar, Dark Mode, sizing and behavior intact.
   Strong action hues are intentionally separate from readable text/status inks. */
html[data-theme="light"] #moduleView{
  --blue:#2979ff;--blue-2:#1557c4;--red:#dc3545;--green:#138642;
  --surface-2:#f7f9fc;--surface-3:#f0f4fa;--panel:#fff;--panel-2:#f2f6fc;
  --surface-soft:#f7f9fc;--line:#cedbea;--border:var(--line);--border-strong:#8da8c7;
  --panel-surface:#fff;--tinted-surface:#f2f6fb;--interactive-surface:#f8fbff;
  --state-hover:#eef4ff;--state-active:#e0ecff;--state-success-bg:#e8f7ed;
  --state-warning-bg:#fff3df;--state-danger-bg:#fce9ed;--state-info-bg:#e9f2ff;
  --shadow-1:0 3px 12px rgba(11,24,48,.065);
  --shadow-2:0 6px 18px rgba(11,24,48,.085);
  --accent:var(--blue);--success:var(--green);--danger:var(--red);--info:var(--blue);
  --chart-1:#2979ff;--chart-2:#16a34a;--chart-3:#f59e0b;
  --chart-4:#dc3545;--chart-5:#8b5cf6;--chart-6:#0ea5e9;
}
/* Remove the inherited all-blue gradients from standard module surfaces.
   Preserve stage-coded CRM cards and POS-specific operational surfaces. */
html[data-theme="light"] #moduleView:not(:has(.pos-workspace-v2[data-pos-premium-v5="ready"])) :is(.card,.panel,.section-card,.metric,.executive-card,.executive-kpi){
  background-color:#fff;background-image:none;border-color:var(--line);
  box-shadow:var(--shadow-1)
}
html[data-theme="light"] #moduleView:not(:has(.pos-workspace-v2[data-pos-premium-v5="ready"])) :is(.card-head,.section-title,.executive-card-head){
  background:#f4f7fb;border-color:var(--line)
}
html[data-theme="light"] #moduleView :is(th,thead td,.table-head){
  background:#f0f5fa;color:#284763
}
/* Saturated actions with white text meeting 4.5:1; brand-royal remains for accents. */
html[data-theme="light"] #moduleView :is(.btn.primary,.tab.active){
  background:#1b60d4;border-color:#1b60d4;color:#fff
}
html[data-theme="light"] #moduleView .btn.primary:hover{
  background:#1557c4;border-color:#1557c4
}
html[data-theme="light"] #moduleView .btn.red{
  background:#dc3545;border-color:#dc3545;color:#fff
}
html[data-theme="light"] #moduleView .btn.red:hover{
  background:#b52336;border-color:#b52336
}
/* State surfaces stay calm; the meaning stays explicit and the ink stays legible. */
html[data-theme="light"] #moduleView :is(.badge.good,.status-badge.good){
  background:#e8f7ed;color:#096b39;border-color:#9eddb7
}
html[data-theme="light"] #moduleView :is(.badge.warn,.status-badge.warn){
  background:#fff3df;color:#825509;border-color:#edc784
}
html[data-theme="light"] #moduleView :is(.badge.bad,.status-badge.bad){
  background:#fce9ed;color:#a92032;border-color:#eaa5b1
}
/* CRM customers and leads: white lists/metrics instead of blue-on-blue panels. */
html[data-theme="light"] #moduleView :is(.orox-customer-v3,.orox-crm-v3){
  --crm-border:var(--line);--crm-panel:#fff
}
html[data-theme="light"] #moduleView :is(.orox-crm-page-lead,.orox-customer-v3 .health-tile,.orox-crm-v3 .health-tile,.orox-customer-list-panel,.orox-crm-aside-card,.orox-crm-filters,.orox-crm-v3 .section-card){
  background:#fff;border-color:var(--line);box-shadow:var(--shadow-1)
}
html[data-theme="light"] #moduleView .orox-crm-page-lead{
  background:linear-gradient(115deg,#fff,#f7faff)
}
html[data-theme="light"] #moduleView .orox-customer-desktop-table tbody tr:nth-child(even){
  background:#f8fafd
}
html[data-theme="light"] #moduleView .orox-customer-desktop-table tbody tr:hover{
  background:#eef4ff
}
html[data-theme="light"] #moduleView :is(.orox-crm-filters .orox-crm-reset,.orox-crm-count){
  color:#1758bc
}
/* Quotes, invoices, collections and finance: keep semantic accents, clean the canvas. */
html[data-theme="light"] #moduleView .quote-v4-stat{
  background:color-mix(in srgb,var(--quote-v4-tone) 7%,#fff)
}
html[data-theme="light"] #moduleView :is(.invoice-v1-kpi,.sp-kpi,.cv1-kpi,.cb2-kpi,.cb2-board,.cb2-aside){
  background:#fff;border-color:var(--line);box-shadow:var(--shadow-1)
}
html[data-theme="light"] #moduleView .smart-collections-v1{
  --cv1-panel:#fff;--cv1-soft:#f8fafd;--cv1-border:var(--line)
}
/* POS: no layout or checkout changes; neutralize only the blue-tinted canvas/tiles. */
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"]{
  background:#f7f9fc
}
html[data-theme="light"] #moduleView .pos-workspace-v2[data-pos-premium-v5="ready"] :is(.pos-product,.pos-v5-product-tile,.pos-cart-row){
  background:#fff;border-color:var(--line)
}
