/* Zentro redesign, first pass (local prototype, 27 Oct 2026 PHT). Josh approved the mix:
   plum menu throughout, comfortable spacing on CSR home and the EOD form, compact tables on the manager tracker.
   Maps the app's existing class names onto Frieren's kit tokens (zentro-kit.css). Styling only.
   Scoped to the light theme: dark mode is not designed yet and keeps theme.css as is. */
html[data-theme="light"]{--L:1}

/* Manager (compact) zones: the tracker parts of Team daily activity. Same tokens as the kit's .density-compact. */
html[data-theme="light"] :is(.eod-live-team-panel,.eod-review-layout,#eodOperationsDashboard){
  --z-pad-card:14px;--z-gap:12px;--z-card-r:8px;--z-card-shadow:none;--z-card-border:1px solid var(--z-border);--z-cell:7px 8px;--z-body:14px;--z-stat:22px}

/* Base type */
html[data-theme="light"] body{font-family:var(--z-font);color:var(--z-text);background:var(--z-cream)}
html[data-theme="light"] :is(button,input,select,textarea){font-family:inherit}
html[data-theme="light"] .workspace :is(h1,h2,h3){font-family:var(--z-font);font-weight:700;letter-spacing:var(--z-tracking-head);color:var(--z-text)}
html[data-theme="light"] .eyebrow{color:var(--z-orange);font-size:var(--z-fs-xs);font-weight:700;letter-spacing:.08em;text-transform:uppercase}
html[data-theme="light"] :is(.muted,.panel-intro,.ops-field-help){color:var(--z-text-muted)}
html[data-theme="light"] :focus-visible{outline:3px solid var(--z-focus);outline-offset:2px}

/* Shell: plum side menu (kit), cream canvas */
html[data-theme="light"] .app-shell,html[data-theme="light"] .workspace{background:var(--z-cream)}
html[data-theme="light"] .sidebar{background:var(--z-plum-deep);color:var(--z-text-on-dark)}
html[data-theme="light"] .sidebar :is(.nav-item,.nav-group-toggle,.nav-child){color:var(--z-text-on-dark);min-height:40px;border-radius:var(--z-r-sm);border-left:3px solid transparent}
html[data-theme="light"] .sidebar :is(.nav-item,.nav-child):hover{background:rgba(255,249,242,.08)}
html[data-theme="light"] .sidebar :is(.nav-item,.nav-child).active{background:var(--z-plum);border-left-color:var(--z-terracotta);font-weight:700;color:var(--z-text-on-dark)}
html[data-theme="light"] .sidebar .brand-lockup-copy em{color:var(--z-terracotta)}
html[data-theme="light"] .topbar{background:transparent}
html[data-theme="light"] .topbar h2{font-size:var(--z-fs-xl)}
html[data-theme="light"] .privacy-banner{background:var(--z-cream-2);color:var(--z-text);border:0;border-left:4px solid var(--z-plum);border-radius:var(--z-r-md);padding:10px 14px;font-size:var(--z-fs-sm)}

/* Cards */
html[data-theme="light"] .workspace :is(.panel,.metric-card,.practice-profile-card,.eod-live-person,.day-report-card){
  background:var(--z-surface);border:var(--z-card-border);border-radius:var(--z-card-r);box-shadow:var(--z-card-shadow)}
html[data-theme="light"] .workspace .panel{padding:var(--z-pad-card)}
html[data-theme="light"] :is(.dashboard-grid,.dashboard-ops-grid,.metric-grid){gap:var(--z-gap)}
html[data-theme="light"] .metric-card strong,html[data-theme="light"] :is(.eod-metrics strong,.day-report-card b,.agent-report-call-count,.active-csr-total strong,.ops-metrics strong){
  font-family:var(--z-font);font-weight:700;font-variant-numeric:tabular-nums;color:var(--z-plum)}
html[data-theme="light"] .metric-card strong{font-size:var(--z-stat)}

/* Buttons */
html[data-theme="light"] .workspace .button{min-height:var(--z-tap);border-radius:var(--z-r-md);font-weight:700;font-family:var(--z-font);border:1.5px solid transparent}
html[data-theme="light"] .workspace .button.primary{background:var(--z-orange);color:#fff;border-color:var(--z-orange)}
html[data-theme="light"] .workspace .button.primary:hover{background:var(--z-orange-hover);border-color:var(--z-orange-hover)}
html[data-theme="light"] .workspace .button.secondary{background:var(--z-surface);color:var(--z-text);border-color:var(--z-text)}
html[data-theme="light"] .workspace .button:disabled{background:var(--z-grey-bg);color:var(--z-grey-text);border-color:var(--z-grey-bg)}
html[data-theme="light"] .workspace .text-button{color:var(--z-orange);font-weight:600}

/* Forms */
html[data-theme="light"] .workspace :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea){
  font:inherit;color:var(--z-text);background:#fff;border:1.5px solid var(--z-border-strong);border-radius:var(--z-r-md);min-height:var(--z-tap)}
html[data-theme="light"] .workspace :is(input[type=checkbox],input[type=radio]){accent-color:var(--z-plum);width:20px;height:20px}
html[data-theme="light"] .workspace label{font-weight:600}
html[data-theme="light"] .workspace fieldset{border:1px solid var(--z-border);border-radius:var(--z-r-lg)}
html[data-theme="light"] .ops-field-status{color:var(--z-text-muted)}
html[data-theme="light"] .form-message{color:var(--z-text)}

/* Segmented controls and filter chips */
html[data-theme="light"] .workspace .segmented{border:1.5px solid var(--z-text);border-radius:var(--z-r-md);overflow:hidden;background:var(--z-surface)}
html[data-theme="light"] .workspace .segmented button{color:var(--z-text);background:transparent;min-height:40px}
html[data-theme="light"] .workspace .segmented button.active{background:var(--z-plum-deep);color:var(--z-text-on-dark)}

/* Badges: lead statuses use kit badge colours */
html[data-theme="light"] .badge{border-radius:var(--z-r-pill);padding:3px 10px;font-size:var(--z-fs-sm);font-weight:700;white-space:nowrap}
html[data-theme="light"] .badge.lead-open{background:var(--z-grey-bg);color:var(--z-grey-text)}
html[data-theme="light"] .badge.lead-in_progress{background:var(--z-blue-bg);color:var(--z-blue-text)}
html[data-theme="light"] .badge.lead-follow_up{background:var(--z-amber-bg);color:var(--z-amber-text)}
html[data-theme="light"] .badge.lead-booked{background:var(--z-teal-bg);color:var(--z-teal-text)}
html[data-theme="light"] .badge.lead-not_booked{background:var(--z-red-bg);color:var(--z-red-text)}

/* Tables: compact manager tables with plum headers (kit compact) */
html[data-theme="light"] .ops-table{width:100%;border-collapse:collapse}
html[data-theme="light"] .ops-table :is(th,td){padding:var(--z-cell);border-bottom:1px solid var(--z-border);font-size:var(--z-fs-sm);text-align:left}
html[data-theme="light"] .ops-table th{background:var(--z-plum-deep);color:var(--z-text-on-dark);font-size:var(--z-fs-xs);text-transform:uppercase;letter-spacing:.05em}
html[data-theme="light"] .ops-table tbody tr:nth-child(even) td{background:#FBF7F2}
html[data-theme="light"] .ops-table-wrap{overflow-x:auto;max-width:100%}

/* Tracker list and live team (compact) */
html[data-theme="light"] .day-report-card.active{border:2px solid var(--z-plum)}
html[data-theme="light"] .eod-live-person b.status-offline{color:var(--z-grey-text)}

/* Phones: kit top bar (56px, plum) on the clean-up branch's phone menu markup, 44px targets */
@media (max-width:767px){
  html[data-theme="light"] .sidebar{background:var(--z-plum-deep)}
  html[data-theme="light"] .phone-menu-button{width:var(--z-tap);height:var(--z-tap);border:1.5px solid var(--z-text-on-dark);border-radius:var(--z-r-md);color:var(--z-text-on-dark);background:transparent}
  html[data-theme="light"] .phone-menu-button:focus-visible{outline:3px solid var(--z-text-on-dark);outline-offset:2px}
  html[data-theme="light"] .sidebar :is(.nav-item,.nav-child,.nav-group-toggle){min-height:var(--z-tap)}
  html[data-theme="light"] .workspace :is(.segmented button,.ops-filters button,.ops-filters select,.ops-filters input,.text-button){min-height:var(--z-tap)}
  html[data-theme="light"] .workspace .panel{padding:16px}
  html[data-theme="light"] .workspace{overflow-x:clip}
}

/* Contrast fixes found by the build check (WCAG AA 4.5:1) */
html[data-theme="light"] .button.clock-in{background:var(--z-teal-bg);color:var(--z-teal-text);border-color:var(--z-teal-bg)}
html[data-theme="light"] .agent-eod-booking-count{background:var(--z-rust-bg);color:var(--z-rust-text)}
html[data-theme="light"] .eod-evidence-panel{background:var(--z-cream-2);border-color:var(--z-border)}
html[data-theme="light"] .eod-evidence-panel .eyebrow{color:var(--z-rust-text)}
html[data-theme="light"] :is(.agent-report-avatar,.agent-eod-profile-avatar){background:var(--z-plum);color:var(--z-text-on-dark)}
html[data-theme="light"] .calendar-day.outside{color:var(--z-text-muted)}
html[data-theme="light"] .calendar-day strong{background:var(--z-rust-text);color:#fff}

/* Review fixes (Frieren, PR #25) */
/* 1. Desktop: plum sidebar runs the full viewport height and stays put while the page scrolls */
@media (min-width:768px){
  html[data-theme="light"] .app-shell{align-items:start}
  html[data-theme="light"] .sidebar{position:sticky;top:0;height:100vh;min-height:100vh;overflow-y:auto;align-self:start}
}
/* 2. Menu labels left-aligned next to their icons (desktop and phone) */
html[data-theme="light"] .sidebar :is(.nav-item,.nav-child,.nav-group-toggle){justify-content:flex-start;text-align:left}
html[data-theme="light"] .sidebar :is(.nav-route-label,.nav-group-label){text-align:left;margin-right:auto}
/* 3. Pay-run reminder: full-width banner under the header, in the page flow */
html[data-theme="light"] .payrun-banner{display:flex;align-items:center;gap:var(--z-s3);margin:0 0 var(--z-s4);padding:10px 14px;background:var(--z-amber-bg);color:var(--z-amber-text);border-left:4px solid var(--z-amber-text);border-radius:var(--z-r-md);font-size:var(--z-fs-sm)}
.payrun-banner.hidden{display:none!important}
html[data-theme="light"] .payrun-banner p{margin:0;flex:1;min-width:0}
html[data-theme="light"] .payrun-dismiss{flex:none;min-height:var(--z-tap);padding:0 14px;border:1.5px solid var(--z-amber-text);border-radius:var(--z-r-md);background:transparent;color:var(--z-amber-text);font:700 var(--z-fs-sm) var(--z-font);cursor:pointer}
html[data-theme="dark"] .payrun-banner{display:flex;gap:12px;align-items:center;margin:0 0 16px;padding:10px 14px;border-radius:10px;background:#3a302c;color:#f2e5e2}
html[data-theme="dark"] .payrun-banner p{margin:0;flex:1}
html[data-theme="dark"] .payrun-dismiss{min-height:44px;background:transparent;color:inherit;border:1.5px solid currentColor;border-radius:10px;padding:0 14px}
/* 4. Collapsible tracker sections */
html[data-theme="light"] .ops-collapsible{margin:var(--z-s3) 0;border:1px solid var(--z-border);border-radius:8px;background:var(--z-surface)}
.ops-collapsible-heading{margin:0}
.ops-collapse-toggle{display:flex;width:100%;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:8px 12px;border:0;background:transparent;color:inherit;font:700 15px var(--z-font, inherit);text-align:left;cursor:pointer}
html[data-theme="light"] .ops-collapse-action{color:var(--z-orange);font-size:var(--z-fs-sm)}
.ops-collapsible-body{padding:0 12px 12px}
.ops-collapsible-body[hidden]{display:none}
/* Phones: Notifications and the dark mode (moon) button share one row under the attendance card */
@media (max-width:767px){
  .topbar-actions{flex-direction:row!important;flex-wrap:wrap;align-items:center!important}
  .topbar-actions > #timeClockWidget{flex:1 1 100%}
  .topbar-actions > #notificationWidget{flex:1 1 auto;min-width:0}
  .topbar-actions > .theme-toggle{flex:none}
}

/* Chat bubble and preview (Frieren spec, 27 Oct 2026) */
/* 1. Room at the bottom so the last card scrolls clear of the floating bubble */
.workspace > main#mainContent{padding-bottom:88px}
/* Reduced motion: the preview appears and hides without animation */
@media (prefers-reduced-motion:reduce){.toast{transition:none!important;animation:none!important}}
@media (max-width:767px){
  .workspace > main#mainContent{padding-bottom:80px}
  /* 2. Phones: 48px bubble (overrides the clean-up branch's 40px), hidden while the phone menu is open */
  .zc-chat-bubble{width:48px;min-width:48px;height:48px;min-height:48px}
  body:has(.sidebar.phone-nav-open) .zc-floating-layer{display:none}
}
