/* Screen-only night theme. Labels, barcodes and print styles remain untouched. */
@media screen {
:root[data-theme=dark] {
  color-scheme: dark;
  --night-base:#1f1e25;
  --night-well:#22212a;
  --night-panel:#2d2b35;
  --night-raised:#36333f;
  --night-border:#51495e;
  --night-accent:#d9a5ff;
  --night-active:#453052;
  --night-text:#f2edf7;
  --night-muted:#c4bbcf;
  --night-gradient:linear-gradient(148deg,#34313d,#292731 80%);
  --night-shadow:inset 0 1px #ffffff0d,0 6px 14px #110e1890;
  --night-inset:inset 2px 3px 6px #12101790,inset -1px -1px 3px #ffffff0a;
  --bg:var(--night-base);--panel:var(--night-panel);--surface:var(--night-panel);
  --surface-raised:var(--night-raised);--soft:var(--night-active);
  --text:var(--night-text);--ink:var(--night-text);--muted:var(--night-muted);
  --line:var(--night-border);--blue:var(--night-accent);--blue-dark:#ebcbff;
  --rlb-nav:#2f2d37;--rlb-nav-end:#222129;--rlb-nav-hover:var(--night-border);
  --rlb-nav-active:var(--night-active);--rlb-accent:var(--night-accent);
  --rlb-bg:var(--night-base);--rlb-surface:var(--night-panel);--rlb-tint:var(--night-raised);
  --rlb-border:var(--night-border);--rlb-text:var(--night-text);
  --rlb-muted:var(--night-muted);--rlb-focus:var(--night-accent);
  --chart-blue:#c98af8;--chart-ink:#c4bbcf;--chart-grid:#494253;
  --chart-tooltip:#312839;--chart-title:#f6ecff;
  --chart-profit:#58cec0;
  accent-color:#b66ce7;
}
html[data-theme=dark] body .app-shell {
  color:var(--night-text);
}
html[data-theme=dark] body .app-shell .main-area {
  background:radial-gradient(ellipse at 18% 0%,#34303c 0%,transparent 70%) var(--night-base);
  color:var(--night-text);
}
html[data-theme=dark] body .app-shell :is(.top-header,.sidebar,.sidebar-footer) {
  background:linear-gradient(150deg,#30303a,#23222a)!important;
  border-color:var(--night-border)!important;
  box-shadow:var(--night-shadow);
}
html[data-theme=dark] body .app-shell :is(.dash-panel,.dash-metric,.coverage-card,.attention-card,.decision-filters,.kpi-card,.panel,.card,.editor-sheet,.product-detail-section,dialog) {
  background:var(--night-gradient)!important;
  border-color:var(--night-border)!important;
  box-shadow:var(--night-shadow)!important;
}
html[data-theme=dark] body .app-shell :is(.dash-panel,.dash-metric,.coverage-card,.attention-card,.decision-filters) {
  border:1px solid #715584!important;
}
html[data-theme=dark] body .app-shell :is(.panel-title,th,dialog>header,dialog>footer) {
  background:#383341!important;color:var(--night-text)!important;border-color:var(--night-border)!important;
}
html[data-theme=dark] body .app-shell .main-area .btn:not(.secondary,.danger,.warning,.success):not(:disabled),
html[data-theme=dark] body .app-shell .btn:not(.secondary,.danger,.warning,.success):not(:disabled) {
  background:linear-gradient(140deg,#77469d,#513468)!important;
  color:#fff!important;border-color:#ad78d3!important;
  box-shadow:inset 0 1px #ffffff25,0 3px 9px #160d21a0;
}
html[data-theme=dark] body .app-shell .btn:not(.danger,.warning,.success):hover:not(:disabled) {
  border-color:var(--night-accent)!important;
  box-shadow:0 0 10px #c17bef40;
}
html[data-theme=dark] body .app-shell .btn.secondary:not(.danger,.warning,.success) {
  background:linear-gradient(148deg,#37323f,#2a2732)!important;
  color:#ead6fa!important;border-color:#665671!important;
}
html[data-theme=dark] body .app-shell :is(input:not([type=checkbox],[type=radio],[type=color],[type=range]),select,textarea) {
  box-shadow:var(--night-inset)!important;
}
html[data-theme=dark] body .app-shell .sidebar :is(.side-link.active,.side-link[aria-current=page],.side-link:hover,.side-parent:hover,.cascade-group.open>.side-parent,.cascade-group:has(.side-link.active)>.side-parent) {
  background:linear-gradient(120deg,#463153,#312737)!important;
  color:#f0dcff!important;box-shadow:inset 2px 0 var(--night-accent),0 0 11px #c17bef25!important;
}
html[data-theme=dark] body .app-shell .top-header .menu-toggle {
  background:var(--night-active)!important;color:var(--night-accent)!important;
}
html[data-theme=dark] body .app-shell .theme-options {
  background:var(--night-well);border-color:#675673;box-shadow:var(--night-inset);
  border-radius:20px;
}
html[data-theme=dark] body .app-shell .theme-options button {
  border-radius:16px;
}
html[data-theme=dark] body .app-shell .theme-options button[aria-pressed=true] {
  background:#493455;color:#f1d9ff;
  box-shadow:inset 0 0 0 1px #ae78cd,0 0 9px #bd75ee42;
}
html[data-theme=dark] body .app-shell .rlb-dashboard {
  --dash-blue:var(--night-accent);--dash-ink:var(--night-text);--dash-muted:var(--night-muted);
}
html[data-theme=dark] body .app-shell .workspace-tabs .selected {
  border-color:var(--night-accent)!important;
}
html[data-theme=dark] body .app-shell :is(.catalog-suggest-list,.dropdown-menu) {
  background:var(--night-panel);border-color:var(--night-border);box-shadow:var(--night-shadow);
}
}

@media screen {
:root[data-theme=dark]{
 --primary:var(--night-accent);--primary-hover:#ebcbff;
 --night-chip:#493655;--night-accent-text:#efd6ff;
}
html[data-theme=dark] body .app-shell a:not(.btn,.side-link,.user-name,.logout-link){
 color:var(--night-accent);
}
html[data-theme=dark] body .app-shell :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible{
 outline-color:var(--night-accent)!important;
}
html[data-theme=dark] body .app-shell :is(.filter-reset,.dash-data summary,.dash-method summary,.dash-sync-history summary){
 color:var(--night-accent-text)!important;
}
html[data-theme=dark] body .app-shell :is(.dash-tab.active,.workspace-tabs .selected,.product-jumpnav a.active){
 color:var(--night-accent-text)!important;border-color:var(--night-accent)!important;
}
html[data-theme=dark] body .app-shell .rlb-phosphor:not(.sidebar *){
 background-color:currentColor;
}
html[data-theme=dark] body .app-shell #product-detail-v68 :is(.product-integration,.product-cost-details,.product-notes,.product-breadcrumb,.product-price-card>span,.product-price-card>small,.product-detail-section h2 small,.product-stock-grid span,.product-rule-grid p){
 color:var(--night-muted)!important;
}
html[data-theme=dark] body .app-shell #product-detail-v68 :is(.product-rule-grid strong,.rule-chip b,.product-jumpnav a,.product-integration>summary){
 color:var(--night-accent-text)!important;
}
html[data-theme=dark] body .app-shell #product-detail-v68 .product-price-card .product-profit:not(.negative){
 color:var(--night-accent-text)!important;background:var(--night-chip)!important;
}
html[data-theme=dark] body .app-shell #product-detail-v68 .product-price-card .product-profit.negative{
 color:var(--danger)!important;background:var(--danger-bg)!important;
}
html[data-theme=dark] body .app-shell .product-history>summary{
 color:var(--night-accent-text)!important;background:var(--night-gradient)!important;
 border-color:var(--night-border)!important;
}
html[data-theme=dark] body .app-shell .product-history>summary:hover{
 border-color:var(--night-accent)!important;
}
html[data-theme=dark] body .app-shell .rlb-product-option:is(:hover,.active,:focus-visible){
 background:var(--night-active)!important;border-color:var(--night-accent)!important;color:var(--night-text)!important;
}
html[data-theme=dark] body .app-shell :is(.rlb-arrow-action,.dash-card-detail span,.product-badge.transit){
 background:var(--night-chip)!important;color:var(--night-accent-text)!important;
}
}

@media screen {
html[data-theme=dark] body .app-shell #product-detail-v68 .product-saved-notice{
 background:#382644!important;color:#f5e6ff!important;
 border:2px solid #c98af8!important;border-inline-start-width:5px!important;
}
}

@media screen {
html[data-theme=dark] body .app-shell #rlb-nav-toggle .brand-logo-wrap{
 background:transparent!important;border-color:transparent!important;mix-blend-mode:screen;
}
html[data-theme=dark] body .app-shell #rlb-nav-toggle .sidebar-logo{
 background:transparent!important;filter:grayscale(1) invert(1);
}
}

/* Shared surfaces for disclosures and dialogs, including div-based headers and footers. */
@media screen {
:root[data-theme=dark]{
 --night-overlay:#15121bcc;
 --night-dialog-surface:var(--night-panel);
 --night-dialog-section:var(--night-raised);
 --night-dialog-divider:var(--night-border);
}
html[data-theme=dark] body :is(dialog,[role=dialog]){
 color-scheme:dark;color:var(--night-text);background:var(--night-dialog-surface);
 border-color:var(--night-dialog-divider);
}
html[data-theme=dark] body dialog::backdrop{
 background:var(--night-overlay)!important;
}
html[data-theme=dark] body .app-shell :is(dialog,[role=dialog]) :is(
 .price-rules-heading,.price-rules-footer,.label-modal-heading,.label-modal-footer,
 .excel-dialog-head,.bulk-dialog-header,.bulk-dialog-footer,.modal-header,.modal-footer
){
 background:var(--night-dialog-section)!important;color:var(--night-text)!important;
 border-color:var(--night-dialog-divider)!important;
}
html[data-theme=dark] body .app-shell :is(dialog,[role=dialog]) :is(
 .price-rules-heading p,.price-rules-hint,.label-modal-heading p,label
),html[data-theme=dark] body .app-shell .product-history :is(label,.empty,.muted){
 color:var(--night-muted)!important;
}
html[data-theme=dark] body .app-shell dialog .price-mode.manual{
 background:var(--night-raised)!important;color:var(--night-text)!important;
}
html[data-theme=dark] body .app-shell dialog .price-mode.automatic{
 background:var(--night-chip)!important;color:var(--night-accent-text)!important;
}
}

@media screen {
html[data-theme=dark] body .app-shell .rlb-switch.state-switch button[data-switch-value="1"][aria-pressed=true]{
 background:#146c43!important;color:#fff!important;box-shadow:inset 0 0 0 1px #55b18a;
}
html[data-theme=dark] body .app-shell .rlb-switch.origin-switch button[aria-pressed=true],
html[data-theme=dark] body .app-shell #product-refresh-contifico:not(:disabled){
 background:#704498!important;color:#fff!important;border-color:#b77add!important;
}
}

@media screen {
html[data-theme=dark] body .app-shell .notice.profitability-exclusions{
 background:#382e22!important;color:#ffe1ac!important;border-color:#a6773d!important;
}
}
