/* Unified light system for every selectable light palette. Current Roast remains intentionally dark. */
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]){
  --light-ink:var(--theme-text);
  --light-muted:var(--theme-muted);
  --light-deep:color-mix(in srgb,var(--theme-text) 78%,var(--theme-accent));
  --light-border:color-mix(in srgb,var(--theme-accent) 52%,#fff);
  --light-soft:color-mix(in srgb,var(--theme-card-alt) 72%,#fff);
  background:#fff!important;
  color:var(--light-ink)!important;
}
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .portal,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .workspace,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .page-view{background:#fff!important;color:var(--light-ink)!important}
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .topbar,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .sidebar{--ink:var(--light-ink);--muted:var(--light-muted);--line:var(--light-border);--soft:var(--light-soft);--white:#fff;background:#fff!important;color:var(--light-ink)!important;border-color:var(--light-border)!important}
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .sidebar{box-shadow:8px 0 26px color-mix(in srgb,var(--theme-panel),transparent 91%)}
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .sidebar-brand strong,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .sidebar-brand span,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .sidebar-foot span,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .sidebar .nav-item{color:var(--light-ink)!important}
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .sidebar .nav-item:hover,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .sidebar .nav-item.active{background:var(--light-soft)!important;color:var(--light-deep)!important;box-shadow:inset -4px 0 0 var(--light-deep)}
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .sidebar-logout{background:#fff!important;border-color:var(--light-border)!important;color:var(--light-deep)!important}

body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .surface,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .metric,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .metric-card,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .command-banner,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .period-toolbar,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .table-wrap,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) dialog,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) dialog form{--ink:var(--light-ink);--muted:var(--light-muted);--line:var(--light-border);--soft:var(--light-soft);--white:#fff;--navy:var(--theme-panel);--navy-2:var(--theme-panel-2);background:#fff!important;color:var(--light-ink)!important;border-color:var(--light-border)!important;box-shadow:0 12px 28px color-mix(in srgb,var(--theme-panel),transparent 90%)!important}
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .surface h1,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .surface h2,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .surface h3,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .surface h4,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .surface strong,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .surface b,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .metric strong,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .command-banner h2{color:var(--light-ink)!important}
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .surface p,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .surface small,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .metric>span,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .metric>small,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .command-banner p{color:var(--light-muted)!important}
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .surface-title,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .dialog-head,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .dialog-actions{background:#fff!important;border-color:var(--light-border)!important}

body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) input,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) select,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) textarea,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .search-box,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .button.ghost,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .icon-button{background:#fff!important;border-color:var(--light-border)!important;color:var(--light-ink)!important}
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) option{background:#fff!important;color:var(--light-ink)!important}
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .button.primary,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .button.success,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .period-selector button.active{background:var(--light-deep)!important;border-color:var(--light-deep)!important;color:#fff!important}

body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) table td{background:#fff!important;color:var(--light-ink)!important;border-color:var(--light-border)!important}
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) table th{background:var(--light-soft)!important;color:var(--light-deep)!important;border-color:var(--light-border)!important}
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) table tbody tr:hover td{background:var(--light-soft)!important}
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .decision-item,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .approval-card,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .timeline-item,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .team-card,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .team-comparison-row,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .operation-rep-select,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .operation-inline-card,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .route-point,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .executive-brief-item,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .customer-segment,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .customer-area-cell,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .report-catalog-card,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .report-summary-chip,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .rep-extra-kpi-card,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .pending-approval-popup-card{background:#fff!important;border-color:var(--light-border)!important;color:var(--light-ink)!important}
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .pulse-tabs button,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .rep-card-style-picker button,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .rep-kpi-menu-actions button,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .rep-kpi-extra-option{background:#fff!important;border-color:var(--light-border)!important;color:var(--light-ink)!important}
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .pulse-tabs button.active,
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .rep-card-style-picker button.active{background:var(--light-deep)!important;color:#fff!important}
body[data-dashboard-theme]:not([data-dashboard-theme="current-roast"]) .motion-mode-cinematic .dashboard-motion-controls button.active{background:var(--light-deep)!important;border-color:var(--light-deep)!important;color:#fff!important}

/* Keep every management value visible inside the half-width dashboard card. */
.rep-performance-list{min-width:0;overflow:visible}
.rep-performance-row{grid-template-columns:36px minmax(105px,1.15fr) repeat(5,minmax(55px,.7fr)) 24px;gap:6px;padding-inline:4px;overflow:visible;font-size:11px}
.rep-performance-row>div{min-width:0;overflow-wrap:anywhere}
.rep-performance-row strong{font-size:11px;line-height:1.4}
.rep-performance-row small{font-size:8px;line-height:1.35}
@media(max-width:1180px) and (min-width:801px){.secondary-grid{grid-template-columns:1fr}.rep-performance-row{grid-template-columns:38px minmax(130px,1.15fr) repeat(5,minmax(70px,.7fr)) 28px;gap:8px}}
@media(max-width:800px){.rep-performance-row{grid-template-columns:38px 1fr 90px 25px}.rep-performance-row>div:nth-child(4),.rep-performance-row>div:nth-child(5),.rep-performance-row>div:nth-child(6){display:none}}

/* Current Roast final dark contract.
   Keep this block last: the performance layer intentionally shares palette aliases
   across themes and must never turn the original dark workspace light. */
body[data-dashboard-theme="current-roast"]{
  --theme-bg:#14100c;
  --theme-card:#21150d;
  --theme-card-alt:#382317;
  --theme-line:#5b4330;
  --theme-text:#f2dfc7;
  --theme-muted:#c6aa8d;
  --theme-muted-2:#9e8268;
  --ink:#f2dfc7;
  --muted:#c6aa8d;
  --line:#5b4330;
  --border:#5b4330;
  --soft:#382317;
  --surface:#21150d;
  --surface-soft:#382317;
  --white:#21150d;
  --navy:#21150d;
  --navy-2:#382317;
  background:
    radial-gradient(ellipse 920px 560px at 12% -8%,rgba(193,68,46,.20),transparent 60%),
    radial-gradient(ellipse 700px 520px at 100% 12%,rgba(204,154,74,.12),transparent 58%),
    #14100c!important;
  color:#f2dfc7!important;
  color-scheme:dark;
}
body[data-dashboard-theme="current-roast"] .portal,
body[data-dashboard-theme="current-roast"] .workspace,
body[data-dashboard-theme="current-roast"] .page-view,
body[data-dashboard-theme="current-roast"] main{
  background:transparent!important;
  color:#f2dfc7!important;
}
body[data-dashboard-theme="current-roast"] .topbar{
  background:rgba(24,17,12,.96)!important;
  color:#f2dfc7!important;
  border-color:#5b4330!important;
  box-shadow:0 5px 18px rgba(0,0,0,.24)!important;
}
body[data-dashboard-theme="current-roast"] .surface,
body[data-dashboard-theme="current-roast"] .metric,
body[data-dashboard-theme="current-roast"] .metric-card,
body[data-dashboard-theme="current-roast"] .command-banner,
body[data-dashboard-theme="current-roast"] .period-toolbar,
body[data-dashboard-theme="current-roast"] .table-wrap,
body[data-dashboard-theme="current-roast"] dialog,
body[data-dashboard-theme="current-roast"] dialog form{
  --ink:#f2dfc7;
  --muted:#c6aa8d;
  --line:#5b4330;
  --soft:#382317;
  --white:#21150d;
  --navy:#21150d;
  --navy-2:#382317;
  background:linear-gradient(145deg,#21150d,#382317)!important;
  color:#f2dfc7!important;
  border-color:#5b4330!important;
  box-shadow:0 12px 28px rgba(0,0,0,.24)!important;
}
body[data-dashboard-theme="current-roast"] .metric strong,
body[data-dashboard-theme="current-roast"] .metric b,
body[data-dashboard-theme="current-roast"] .metric-card strong,
body[data-dashboard-theme="current-roast"] .surface h1,
body[data-dashboard-theme="current-roast"] .surface h2,
body[data-dashboard-theme="current-roast"] .surface h3,
body[data-dashboard-theme="current-roast"] .surface h4,
body[data-dashboard-theme="current-roast"] .surface strong{
  color:#f7eadb!important;
}
body[data-dashboard-theme="current-roast"] .metric>span,
body[data-dashboard-theme="current-roast"] .metric>small,
body[data-dashboard-theme="current-roast"] .surface p,
body[data-dashboard-theme="current-roast"] .surface small{
  color:#cbb398!important;
}
body[data-dashboard-theme="current-roast"] .surface-title,
body[data-dashboard-theme="current-roast"] .dialog-head,
body[data-dashboard-theme="current-roast"] .dialog-actions{
  background:transparent!important;
  border-color:#5b4330!important;
}
body[data-dashboard-theme="current-roast"] table td{
  background:#21150d!important;
  color:#f2dfc7!important;
  border-color:#5b4330!important;
}
body[data-dashboard-theme="current-roast"] table th{
  background:#382317!important;
  color:#f7eadb!important;
  border-color:#5b4330!important;
}
body[data-dashboard-theme="current-roast"] table tbody tr:hover td{
  background:#432a1b!important;
  color:#fff7ed!important;
}

/* Maseer delivery portal: one stable light contract shared with the Android app. */
body[data-dashboard-theme="maseer-sky"]{
  --theme-bg:#ffffff;--theme-card:#ffffff;--theme-card-alt:#f5f7f8;--theme-line:#cfe5ee;
  --theme-text:#26323a;--theme-muted:#63727b;--theme-muted-2:#7c8990;
  --light-bg:#ffffff;--light-card:#ffffff;--light-soft:#f5f7f8;--light-border:#cfe5ee;
  --light-ink:#26323a;--light-muted:#63727b;--light-deep:#0b8fac;
  --ink:#26323a;--muted:#63727b;--line:#cfe5ee;--border:#cfe5ee;--soft:#f5f7f8;
  --white:#ffffff;--navy:#0b8fac;--navy-2:#087d98;--blue:#0b8fac;
  background:#fff!important;color:#26323a!important;color-scheme:light;
}
body.maseer-delivery-portal .auth-shell{min-height:100vh;background:#fff!important;padding:24px}
body.maseer-delivery-portal .auth-panel{width:min(100%,480px);background:#fff!important;color:#26323a!important;border:1px solid #cfe5ee!important;border-radius:24px!important;box-shadow:0 20px 55px rgba(11,143,172,.10)!important;padding:32px!important}
body.maseer-delivery-portal .auth-panel .brand-mark{width:88px;height:88px;object-fit:contain;border-radius:22px;box-shadow:0 8px 24px rgba(11,143,172,.12)}
body.maseer-delivery-portal .auth-panel h1{color:#26323a!important}
body.maseer-delivery-portal .auth-panel .eyebrow{color:#0b8fac!important}
body.maseer-delivery-portal .auth-panel .muted,body.maseer-delivery-portal .security-note{color:#63727b!important}
body.maseer-delivery-portal .auth-panel input{background:#fff!important;color:#26323a!important;border:1px solid #cfe5ee!important;min-height:48px}
body.maseer-delivery-portal .auth-panel input:focus{border-color:#13a9d5!important;box-shadow:0 0 0 4px rgba(19,169,213,.13)!important}
body.maseer-delivery-portal .auth-panel .button.primary{background:#0b8fac!important;border-color:#0b8fac!important;color:#fff!important;min-height:48px}
body.maseer-delivery-portal .login-company-field[hidden],body.maseer-delivery-portal .dashboard-theme-control{display:none!important}
body.maseer-delivery-portal .portal,body.maseer-delivery-portal .workspace,body.maseer-delivery-portal main,body.maseer-delivery-portal .page-view{background:#fff!important}
body.maseer-delivery-portal .sidebar,body.maseer-delivery-portal .topbar{background:#f5f7f8!important;color:#26323a!important;border-color:#cfe5ee!important}
body.maseer-delivery-portal .sidebar-brand,body.maseer-delivery-portal .topbar-brand-home{color:#26323a!important}
body.maseer-delivery-portal .sidebar-brand img{background:#fff;border:1px solid #cfe5ee;border-radius:12px}
body.maseer-delivery-portal .nav-item{color:#42515a!important;border-radius:12px}
body.maseer-delivery-portal .nav-item:hover{background:#e9f7fb!important;color:#0b8fac!important}
body.maseer-delivery-portal .nav-item.active{background:#13a9d5!important;color:#fff!important;box-shadow:0 8px 20px rgba(19,169,213,.18)}
body.maseer-delivery-portal .surface,body.maseer-delivery-portal .metric,body.maseer-delivery-portal .metric-card,body.maseer-delivery-portal .command-banner,body.maseer-delivery-portal .period-toolbar,body.maseer-delivery-portal .table-wrap{background:#fff!important;border:1px solid #cfe5ee!important;color:#26323a!important;box-shadow:0 8px 24px rgba(11,143,172,.06)!important}
body.maseer-delivery-portal table th{background:#0b8fac!important;color:#fff!important;border-color:#cfe5ee!important}
body.maseer-delivery-portal table td{background:#fff!important;color:#26323a!important;border-color:#cfe5ee!important}
body.maseer-delivery-portal table tbody tr:nth-child(even) td{background:#f5f7f8!important}
body.maseer-delivery-portal table tbody tr:hover td{background:#e9f7fb!important}
body.maseer-delivery-portal .delivery-portal-only{display:flex}
body:not(.maseer-delivery-portal) .delivery-portal-only{display:none!important}
.delivery-operations-view{padding:0!important;min-height:calc(100vh - 88px)}
.delivery-operations-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 0 12px;padding:18px 20px;background:#fff;border:1px solid #cfe5ee;border-radius:18px}
.delivery-operations-heading h2{margin:2px 0 0;color:#26323a}.delivery-operations-heading>p{max-width:580px;margin:0;color:#63727b;line-height:1.7}
.delivery-operations-frame{display:block;width:100%;height:calc(100vh - 188px);min-height:640px;border:1px solid #cfe5ee;border-radius:18px;background:#fff}
@media(max-width:760px){body.maseer-delivery-portal .auth-shell{padding:16px}.delivery-operations-heading{align-items:flex-start;flex-direction:column}.delivery-operations-frame{height:calc(100vh - 210px);min-height:560px}}

/* White controls remain intentionally light, so their content must be dark. */
body[data-dashboard-theme="current-roast"] input,
body[data-dashboard-theme="current-roast"] select,
body[data-dashboard-theme="current-roast"] textarea,
body[data-dashboard-theme="current-roast"] option,
body[data-dashboard-theme="current-roast"] .search-box{
  background:#fffdfb!important;
  color:#2f241d!important;
  border-color:#cfc0b4!important;
  color-scheme:light;
}
