/* ===== MistriSP — partner portal design system (Figma: node 16:7) ===== */
:root {
  --navy: #1B2A4A; --teal: #0D9488; --teal-700: #0F766E; --teal-800: #115E59; --teal-900: #134E4A;
  --teal-tint: #CCFBF1; --sky: #0EA5E9; --sky-tint: #E0F2FE;
  --slate: #475569; --slate-lt: #94A3B8; --line: #E2E8F0; --line-lt: #F1F5F9; --bg: #F8FAFC;
  --amber: #F59E0B; --amber-tint: #FEF3C7;
  --green: #16A34A; --green-tint: #DCFCE7;
  --red: #DC2626; --red-tint: #FEE2E2;
  --r: 12px;
  --shadow: 0 6px 9px rgba(15,23,42,.05);
  --font-display: "Outfit", "Plus Jakarta Sans", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Plus Jakarta Sans", system-ui, sans-serif; background: var(--bg); color: var(--navy); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.boot { padding: 100px 24px; text-align: center; color: var(--slate); }
.dim { color: var(--slate-lt); font-size: 0.86rem; font-weight: 600; }
h1, h2, h3, h4 { font-family: var(--font-display); }

.logo { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; color: var(--navy); }
.logo span { color: var(--teal); }

/* ===== Shell: sidebar + main (matches MistriHQ pattern) ===== */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--bg); border-right: 1px solid var(--line); padding: 32px 16px; display: flex; flex-direction: column; gap: 40px; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 12px; }
.sidebar-brand .mark { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; gap: 2px; flex-shrink: 0; }
.sidebar-brand .mark span { display: block; width: 5px; height: 20px; border-radius: 2px; }
.sidebar-brand .wordmark { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--navy); letter-spacing: -0.01em; white-space: nowrap; }
.nav-list { display: flex; flex-direction: column; gap: 6px; }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 8px;
  color: var(--slate-lt); font-weight: 500; font-size: 14px; cursor: pointer; border: none; background: none;
  font-family: inherit; text-align: left; width: 100%; transition: all .15s ease;
}
.side-link .ic { width: 18px; height: 18px; flex-shrink: 0; }
.side-link:hover { background: #fff; color: var(--navy); }
.side-link.on { background: var(--teal-tint); color: var(--teal-800); font-weight: 700; }
.side-link .count { margin-left: auto; font-weight: 800; font-size: 11px; }
.sidebar-footer { margin-top: auto; padding: 0 12px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.sidebar-footer .co { display: flex; align-items: center; gap: 10px; }
.sidebar-footer .co .avatar { width: 32px; height: 32px; border-radius: 16px; background: var(--teal); color: #fff; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar-footer .co strong { font-size: 13px; color: var(--navy); display: block; }
.sidebar-footer .co span { font-size: 11px; color: var(--slate-lt); }
.sidebar-footer .logout-link { background: none; border: none; color: var(--slate-lt); font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 4px 0; text-align: left; display: flex; align-items: center; gap: 6px; }
.sidebar-footer .logout-link:hover { color: var(--red); }

/* Topbar */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); min-height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 16px 40px; flex-shrink: 0; flex-wrap: wrap; gap: 12px; }
.topbar h1 { font-size: 20px; font-weight: 800; color: var(--navy); font-family: "Plus Jakarta Sans"; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.verified-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--teal-tint); color: var(--teal-800); border-radius: 100px; padding: 4px 12px; font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.topbar-actions { display: flex; align-items: center; gap: 24px; }
.topbar-bell { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--slate); position: relative; border: none; background: none; cursor: pointer; }
.topbar-bell:hover { background: var(--bg); }
.topbar-bell .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); border: 1.5px solid #fff; }
.topbar-divider { width: 1px; height: 24px; background: var(--line); }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.topbar-user .avatar { width: 36px; height: 36px; border-radius: 18px; background: var(--teal); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.topbar-user .who { display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.topbar-user .who strong { font-size: 14px; font-weight: 700; color: var(--navy); }
.topbar-user .who span { font-size: 11px; font-weight: 500; color: var(--slate-lt); }

.content { padding: 40px; display: flex; flex-direction: column; gap: 24px; flex: 1; }
.main-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.main-head h2 { font-size: 22px; font-weight: 800; color: var(--navy); }
.main-head p { color: var(--slate); font-size: 12px; margin-top: 4px; }
.portal-footer { background: #fff; border-top: 1px solid var(--line); padding: 24px 40px; display: flex; justify-content: space-between; font-size: 13px; color: var(--slate-lt); flex-wrap: wrap; gap: 8px; }
.portal-footer .links { display: flex; gap: 24px; }

/* ===== KPI cards ===== */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpis.cols-3 { grid-template-columns: repeat(3, 1fr); }
.kpis.cols-5 { grid-template-columns: repeat(5, 1fr); }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.kpi .kpi-label { color: var(--slate); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.kpi .kpi-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.kpi .kpi-value { font-size: 32px; font-weight: 800; color: var(--navy); font-family: var(--font-display); }
.kpi .kpi-tag { background: var(--teal-tint); color: var(--teal-800); border-radius: 6px; padding: 4px 8px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.kpi .kpi-tag.green { background: var(--green-tint); color: var(--navy); }
.kpi .kpi-tag.amber { background: var(--amber-tint); color: var(--teal-800); }
.kpi .kpi-tag.sky { background: var(--sky-tint); color: var(--sky); }

/* ===== Panels ===== */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.panel-pad { padding: 24px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.panel h3 { color: var(--navy); font-size: 16px; font-weight: 800; }
.panel .sub { font-size: 12px; color: var(--slate); }
.empty { padding: 32px; text-align: center; color: var(--slate-lt); font-size: 13px; }

/* Filter / segmented pill tabs */
.pill-tabs { display: flex; gap: 4px; background: var(--line); border-radius: 100px; padding: 4px; }
.pill-tabs.plain { background: none; padding: 0; gap: 8px; }
.pill-tab { border: none; background: none; color: var(--slate); font-family: inherit; font-weight: 600; font-size: 13px; padding: 8px 16px; border-radius: 100px; cursor: pointer; white-space: nowrap; }
.pill-tab.on { background: #fff; color: var(--teal); font-weight: 700; }
.pill-tabs.plain .pill-tab { border: 1px solid var(--line); background: #fff; }
.pill-tabs.plain .pill-tab.on { background: var(--teal); border-color: var(--teal); color: #fff; }

/* Status badges */
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 11px; white-space: nowrap; }
.status-badge.pending { background: var(--amber-tint); color: var(--teal); }
.status-badge.approved { background: var(--sky-tint); color: var(--sky); }
.status-badge.in_progress { background: var(--sky-tint); color: var(--sky); }
.status-badge.completed { background: var(--green-tint); color: var(--navy); }
.status-badge.rejected, .status-badge.on_leave { background: var(--red-tint); color: var(--red); }
.status-badge.active { background: var(--green-tint); color: var(--navy); }

/* ===== Buttons & forms ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: 8px;
  font-weight: 700; font-size: 13px; text-decoration: none; border: 1.5px solid transparent;
  cursor: pointer; font-family: inherit; transition: all .15s ease; white-space: nowrap;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-700); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: #16233d; }
.btn-ghost { border-color: var(--line); color: var(--slate); background: #fff; }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-soft { background: var(--line-lt); color: var(--navy); border-color: transparent; }
.btn-soft:hover { background: var(--line); }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn.full { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: default; }

input, select, textarea {
  padding: 11px 14px; border-radius: 10px; border: 1.5px solid var(--line); font-family: inherit;
  font-size: 0.9rem; width: 100%; background: #fff; color: var(--navy); transition: border-color .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-tint); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-weight: 600; font-size: 0.85rem; color: var(--slate); }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > * { flex: 1 1 160px; }
.form-note { font-weight: 700; min-height: 1.3em; font-size: 0.9rem; }
.form-note.ok { color: var(--green); }
.form-note.err { color: var(--red); }

/* Inline-edit profile rows */
.edit-row { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.edit-row .k { font-size: 12px; font-weight: 700; color: var(--slate); display: block; margin-bottom: 2px; }
.edit-row .v { font-size: 14px; font-weight: 600; color: var(--navy); }
.edit-row.editing input { background: #fff; }
.edit-row .icon-btn { background: none; border: none; color: var(--slate-lt); cursor: pointer; padding: 4px; }
.edit-row .icon-btn:hover { color: var(--teal); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line-lt); }
.toggle-row:last-child { border-bottom: none; }
.toggle-row .label { font-size: 14px; font-weight: 600; color: var(--navy); }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-tag { background: var(--teal-tint); color: var(--teal-800); border-radius: 6px; padding: 6px 12px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chip-tag button { background: none; border: none; color: var(--teal-800); cursor: pointer; font-weight: 800; padding: 0; }
.chip-add { border: 1.5px dashed var(--line); color: var(--slate-lt); border-radius: 6px; padding: 6px 12px; font-size: 13px; font-weight: 600; background: none; cursor: pointer; }

.toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider { position: absolute; inset: 0; background: var(--line); border-radius: 999px; cursor: pointer; transition: all .15s ease; }
.toggle .slider::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: all .15s ease; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked + .slider { background: var(--teal); }
.toggle input:checked + .slider::before { transform: translateX(18px); }

/* ===== Login (split screen) ===== */
.login-split { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-showcase { background: var(--navy); color: #fff; padding: 64px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.login-showcase .lockup { display: flex; align-items: center; gap: 12px; }
.login-showcase h1 { font-size: 40px; font-weight: 800; line-height: 1.15; margin: 24px 0 12px; }
.login-showcase .sub { font-size: 17px; opacity: .75; line-height: 1.5; max-width: 440px; }
.login-photo { width: 100%; max-height: 260px; object-fit: cover; border-radius: 16px; border: 1px solid rgba(255,255,255,.12); }
.login-stats { display: flex; gap: 16px; }
.login-stats .stat-card { flex: 1; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 20px; }
.login-stats .stat-card .lab { font-size: 13px; font-weight: 600; opacity: .8; margin-bottom: 6px; }
.login-stats .stat-card .val { font-size: 26px; font-weight: 800; }
.login-form-side { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-form-inner { width: 100%; max-width: 400px; }
.login-form-inner h2 { font-size: 26px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.login-form-inner .sub { color: var(--slate); font-size: 14px; margin-bottom: 24px; }
.login-form-inner .form-foot { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; font-size: 13px; }
.login-form-inner .form-foot a { color: var(--teal); font-weight: 700; text-decoration: none; }
.login-form-inner > p { color: var(--slate); font-size: 0.9rem; margin-top: 18px; text-align: center; }
.login-form-inner a { color: var(--teal); font-weight: 700; text-decoration: none; }

/* ===== Jobs feed (dashboard) ===== */
.job-list { display: flex; flex-direction: column; gap: 12px; }
.job-row { background: #fff; border-radius: 12px; box-shadow: var(--shadow); border-left: 4px solid var(--teal); padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.job-row.completed { border-left-color: var(--navy); }
.job-row .jr-left { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.job-row .jr-time { min-width: 90px; }
.job-row .jr-time .t { font-weight: 800; font-size: 16px; color: var(--navy); }
.job-row .jr-time .d { font-size: 11px; color: var(--slate-lt); text-transform: uppercase; }
.job-row .jr-cust { min-width: 180px; }
.job-row .jr-cust .n { font-weight: 700; font-size: 15px; color: var(--navy); }
.job-row .jr-cust .veh { font-size: 13px; color: var(--slate); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.job-row .jr-pkg { min-width: 200px; }
.job-row .jr-pkg .p { font-weight: 700; font-size: 14px; color: var(--navy); }
.job-row .jr-pkg .addon { display: inline-block; margin-top: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; font-size: 11px; font-weight: 600; color: var(--slate); }
.recurring-chip { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; margin-left: 6px; background: var(--teal-tint); border-radius: 4px; padding: 3px 8px; font-size: 11px; font-weight: 700; color: var(--teal-800); }
.job-row .jr-addr { min-width: 140px; font-size: 13px; color: var(--slate); display: flex; align-items: center; gap: 6px; }
.job-row .jr-right { display: flex; align-items: center; gap: 24px; }
.job-row .jr-price { text-align: right; }
.job-row .jr-price .cur { font-size: 13px; font-weight: 600; color: var(--slate); }
.job-row .jr-price .amt { font-size: 22px; font-weight: 800; color: var(--navy); }

/* ===== Job detail ===== */
.detail-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.detail-head .titlebar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.detail-head h1 { font-size: 22px; font-weight: 800; color: var(--navy); }
.detail-head .sub { font-size: 12px; color: var(--slate); }
.back-link { display: flex; align-items: center; gap: 6px; background: none; border: none; color: var(--slate); font-family: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.back-link:hover { color: var(--teal); }
.detail-cols { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.detail-left { flex: 1 1 480px; display: flex; flex-direction: column; gap: 24px; min-width: 320px; }
.detail-right { flex: 0 0 380px; display: flex; flex-direction: column; gap: 24px; min-width: 280px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.card.navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.card h3 { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 16px; }
.card.navy h3 { color: var(--teal-tint); }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.info-grid .lab { font-size: 12px; font-weight: 700; color: var(--slate-lt); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.info-grid .val { font-size: 14px; font-weight: 600; color: var(--navy); }

.stepper { display: flex; gap: 8px; }
.stepper .step { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.stepper .bar { height: 6px; border-radius: 3px; background: var(--line); }
.stepper .step.done .bar { background: var(--teal); }
.stepper .step.active .bar { background: var(--sky); }
.stepper .step .lab { font-size: 11px; font-weight: 700; color: var(--slate); }
.stepper .step.done .lab, .stepper .step.active .lab { color: var(--navy); }
.stepper .step .t { font-size: 10px; color: var(--slate-lt); }

.cust-block .name { font-size: 18px; font-weight: 800; color: #fff; }
.cust-block .phone { font-size: 13px; color: var(--slate-lt); margin-top: 4px; }
.cust-block .addr { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #fff; margin-top: 14px; }

/* ===== Earnings ===== */
.earn-chart-row { display: flex; gap: 24px; flex-wrap: wrap; align-items: stretch; }
.earn-chart-row .chart-card { flex: 1 1 400px; }
.earn-chart-row .tier-card { flex: 0 0 340px; }
.chart-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.chart-card h4 { font-size: 14px; font-weight: 700; color: var(--slate); margin-bottom: 16px; }
.plot-area { height: 160px; display: flex; align-items: flex-end; }
.bars-row { display: flex; align-items: flex-end; gap: 10px; height: 100%; width: 100%; }
.bars-row .bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 6px; }
.bars-row .bar-val { font-size: 11px; font-weight: 700; color: var(--navy); }
.bars-row .bar { width: 100%; max-width: 28px; background: var(--teal); border-radius: 6px 6px 0 0; }
.bars-row .bar-lab { font-size: 11px; color: var(--slate-lt); }
.tier-card { background: var(--navy); border-radius: var(--r); padding: 32px; color: #fff; }
.tier-card h4 { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 16px; }
.tier-pills { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.tier-pills span { padding: 6px 14px; border-radius: 100px; font-weight: 700; font-size: 12px; }
.tier-pills .a { background: rgba(255,255,255,.1); color: #fff; }
.tier-pills .b { background: var(--teal); color: #fff; }
.tier-card p { font-size: 14px; color: var(--teal-tint); line-height: 1.55; }

/* ===== Calendar ===== */
.cal-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.cal-layout { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.cal-grid-card { flex: 1 1 500px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.cal-grid-card h4 { font-size: 16px; font-weight: 800; color: var(--navy); margin-bottom: 16px; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 8px; }
.cal-weekdays span { text-align: center; font-size: 12px; font-weight: 700; color: var(--slate-lt); }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-cell { min-height: 70px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; }
.cal-cell.out { color: var(--slate-lt); }
.cal-cell .num { font-size: 13px; font-weight: 600; color: var(--navy); }
.cal-cell.out .num { color: var(--slate-lt); }
.cal-cell.selected { background: var(--teal-tint); border: 2px solid var(--teal); }
.cal-cell.selected .num { font-weight: 800; }
.cal-dots { display: flex; gap: 3px; flex-wrap: wrap; }
.cal-dots span { width: 6px; height: 6px; border-radius: 50%; }
.cal-day-panel { flex: 0 0 360px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.cal-day-panel h4 { font-size: 16px; font-weight: 800; color: var(--navy); }
.cal-day-panel .sub { font-size: 12px; color: var(--slate-lt); margin-top: 2px; }
.cal-job-mini { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.cal-job-mini .top { display: flex; justify-content: space-between; align-items: center; }
.cal-job-mini .time { font-size: 13px; font-weight: 700; color: var(--navy); }
.cal-job-mini .name { font-size: 14px; font-weight: 700; color: var(--navy); }
.cal-job-mini .line { font-size: 12px; color: var(--slate); }
.cal-job-mini .manage { font-size: 12px; font-weight: 700; color: var(--teal); background: none; border: none; cursor: pointer; display: flex; align-items: center; gap: 4px; padding: 0; }
.cal-metrics { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; justify-content: space-around; flex-wrap: wrap; gap: 16px; text-align: center; }
.cal-metrics .m { display: flex; flex-direction: column; gap: 4px; }
.cal-metrics .m .lab { font-size: 13px; font-weight: 700; color: var(--slate); }
.cal-metrics .m .val { font-size: 18px; font-weight: 800; color: var(--navy); }
.cal-metrics .m .val.teal { color: var(--teal); }

/* ===== Team ===== */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 14px 20px; background: var(--bg); color: var(--slate); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 800; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 20px; border-bottom: 1px solid var(--line-lt); vertical-align: middle; color: var(--navy); }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }
.avatar-circle { width: 40px; height: 40px; border-radius: 50%; background: var(--teal-tint); color: var(--teal-800); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }

/* ===== Employee Allocation (Figma: node 113:990) ===== */
.alloc-filters { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.alloc-filters .field { margin-bottom: 0; min-width: 160px; }
.alloc-columns { display: flex; gap: 32px; align-items: flex-start; flex-wrap: wrap; }
.alloc-unallocated { flex: 1 1 620px; min-width: 320px; }
.alloc-table-head { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: 12px; }
.alloc-bulk-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.alloc-select-all { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; color: var(--slate); cursor: pointer; }
.alloc-checkbox { width: 18px; height: 18px; accent-color: var(--teal); cursor: pointer; flex-shrink: 0; }
.alloc-assign-select { width: auto; padding: 8px 12px; font-size: 13px; font-weight: 700; border-radius: 6px; background: var(--teal); color: #fff; border: none; cursor: pointer; }
.alloc-assign-select:disabled { background: var(--line); color: var(--slate-lt); cursor: not-allowed; }
tr.alloc-row.selected td { background: var(--teal-tint); }
.alloc-row .veh-name { font-weight: 600; color: var(--navy); }
.alloc-row .veh-cat { font-size: 12px; color: var(--slate-lt); }
.alloc-time-badge { display: inline-block; background: var(--bg); border-radius: 6px; padding: 4px 10px; font-size: 12px; font-weight: 700; color: var(--slate); white-space: nowrap; }
.alloc-workload { flex: 0 0 380px; min-width: 300px; display: flex; flex-direction: column; gap: 16px; }
.alloc-workload > h3 { font-size: 18px; font-weight: 800; color: var(--navy); font-family: var(--font-display); }
.staff-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.staff-card.has-jobs { border-color: var(--teal); border-width: 1.5px; }
.staff-card .sc-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.staff-card .sc-profile { display: flex; gap: 12px; align-items: center; }
.staff-card .sc-name { font-size: 16px; font-weight: 700; color: var(--navy); font-family: var(--font-display); }
.staff-card .sc-sub { font-size: 12px; color: var(--slate-lt); margin-top: 2px; }
.staff-card .sc-badge { display: inline-block; background: var(--teal-tint); color: var(--teal-800); border-radius: 4px; padding: 2px 8px; font-size: 11px; font-weight: 700; margin-top: 2px; }
.staff-card .sc-count { font-size: 20px; font-weight: 800; color: var(--navy); white-space: nowrap; }
.staff-card .sc-count .of { font-size: 12px; font-weight: 400; color: var(--slate); }
.staff-progress-track { background: var(--bg); height: 8px; border-radius: 4px; overflow: hidden; }
.staff-progress-fill { background: var(--teal); height: 100%; border-radius: 4px; }
.staff-progress-labels { display: flex; justify-content: space-between; font-size: 12px; margin-top: 6px; }
.staff-progress-labels .a { color: var(--slate); }
.staff-progress-labels .b { color: var(--slate-lt); }
.staff-empty-drop { background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; padding: 16px; text-align: center; color: var(--slate); font-size: 13px; }
.staff-card .sc-footer { border-top: 1px solid var(--line); padding-top: 8px; }
.staff-card .sc-view { color: var(--teal); font-weight: 700; font-size: 13px; background: none; border: none; cursor: pointer; padding: 0; }
.alloc-bottom-row { border-top: 1px solid var(--line); padding-top: 16px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.btn-outline-teal { border: 1.5px solid var(--teal); color: var(--teal); background: #fff; }
.btn-outline-teal:hover { background: var(--teal-tint); }
.btn-outline-amber { border: 1.5px solid var(--amber); color: var(--amber); background: #fff; }
.btn-outline-amber:hover { background: var(--amber-tint); }
.btn-outline-amber:disabled:hover { background: #fff; }

/* Jobs-by-area breakdown (Daily Workload Dashboard, Figma node 113:2642) */
.area-density { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.area-item { display: flex; flex-direction: column; gap: 8px; }
.area-item .name { font-weight: 700; font-size: 13px; color: var(--navy); }
.area-item .track { height: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.area-item .track .fill { height: 100%; border-radius: 999px; }
.area-item .count { font-size: 11px; color: var(--slate); }
@media (max-width: 1100px) { .area-density { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .area-density { grid-template-columns: 1fr; } }
.alloc-confirm-note { font-size: 13px; font-weight: 700; color: var(--teal-800); }

/* ===== Reviews ===== */
.reviews-layout { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.reviews-side { flex: 0 0 320px; display: flex; flex-direction: column; gap: 16px; }
.reviews-main { flex: 1 1 480px; display: flex; flex-direction: column; gap: 12px; min-width: 320px; }
.stat-row { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line-lt); }
.stat-row:last-child { border-bottom: none; }
.stat-row .lab { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--slate-lt); }
.stat-row .val { font-size: 20px; font-weight: 800; color: var(--navy); }
.hist-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.hist-row .star-lab { font-size: 13px; font-weight: 700; color: var(--slate); width: 30px; }
.hist-row .track { flex: 1; height: 8px; background: var(--line-lt); border-radius: 4px; overflow: hidden; }
.hist-row .fill { height: 100%; border-radius: 4px; }
.hist-row .pct { font-size: 12px; font-weight: 700; color: var(--navy); width: 32px; text-align: right; }
.review-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.review-card .rc-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.review-card .rc-name { font-weight: 800; font-size: 14px; color: var(--navy); }
.review-card .rc-stars { color: var(--amber); font-size: 13px; margin: 0 8px; }
.review-card .rc-pkg { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; font-size: 11px; font-weight: 600; color: var(--slate); }
.review-card .rc-time { font-size: 12px; color: var(--slate-lt); }
.review-card .rc-text { font-size: 14px; color: var(--slate); line-height: 1.5; margin-bottom: 10px; }
.review-card .rc-reply { background: var(--bg); border-radius: 8px; padding: 12px 14px; margin-top: 10px; font-size: 13px; color: var(--navy); }
.review-card .rc-reply .lab { font-weight: 800; color: var(--teal-800); font-size: 11px; text-transform: uppercase; margin-bottom: 4px; display: block; }
.replied-badge { background: var(--teal-tint); color: var(--teal-800); border-radius: 6px; padding: 6px 12px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

/* ===== Settings ===== */
.settings-layout { display: flex; gap: 32px; align-items: flex-start; flex-wrap: wrap; }
.settings-tabs { flex: 0 0 220px; display: flex; flex-direction: column; gap: 4px; }
.settings-tabs button { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 8px; border: 1px solid transparent; background: none; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--slate); text-align: left; cursor: pointer; }
.settings-tabs button.on { background: #fff; border-color: var(--line); color: var(--teal); font-weight: 800; }
.settings-content { flex: 1; min-width: 320px; display: flex; flex-direction: column; gap: 16px; }

/* ===== Notifications ===== */
.notif-list { display: flex; flex-direction: column; gap: 12px; }
.notif-section-label { font-size: 12px; font-weight: 800; color: var(--slate-lt); text-transform: uppercase; letter-spacing: .05em; margin: 8px 0 -2px; }
.notif-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.notif-card.read { opacity: .7; }
.notif-card .nc-left { display: flex; gap: 14px; align-items: center; }
.notif-card .nc-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-card .nc-title { font-size: 14px; font-weight: 700; color: var(--navy); }
.notif-card .nc-body { font-size: 13px; color: var(--slate); margin-top: 2px; }
.notif-card .nc-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.notif-card .nc-time { font-size: 12px; color: var(--slate-lt); white-space: nowrap; }
.notif-card .nc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; align-items: center; overflow-x: auto; padding: 12px; gap: 16px; }
  .sidebar-brand { padding: 0; }
  .nav-list { flex-direction: row; }
  .sidebar-footer { display: none; }
  .content { padding: 22px 18px; }
  .kpis, .kpis.cols-3, .kpis.cols-5 { grid-template-columns: 1fr 1fr; }
  .login-split { grid-template-columns: 1fr; }
  .login-showcase { display: none; }
  .detail-cols { flex-direction: column; }
  .detail-right { flex: 1 1 auto; width: 100%; }
  .info-grid { grid-template-columns: 1fr; }
}

/* --- Global error/status popup system (Figma: node 20:4109, "Desktop Modal Overlays & Popups") --- */
.modal-scrim { position: fixed; inset: 0; background: rgba(27,42,74,0.4); display: flex; align-items: center; justify-content: center; z-index: 500; padding: 24px; }
.modal-card { background: #fff; border-radius: 16px; padding: 32px; width: 480px; max-width: 100%; box-shadow: 0 12px 12px rgba(15,23,42,0.08); display: flex; flex-direction: column; gap: 24px; }
.modal-icon-header { display: flex; align-items: center; gap: 16px; }
.modal-icon-bg { width: 48px; height: 48px; border-radius: 999px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.modal-icon-bg.red { background: var(--red-tint); color: var(--red); }
.modal-icon-bg.amber { background: var(--amber-tint); color: var(--amber); }
.modal-icon-bg.green { background: #E7F9F4; color: var(--teal-700); }
.modal-credential-row { margin-top: 14px; }
.modal-credential-row label { display: block; font-size: 12px; font-weight: 700; color: var(--slate-lt); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }
.modal-credential-box { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.modal-credential-box code { flex: 1; font-size: 14px; font-weight: 700; color: var(--navy); word-break: break-all; }
.modal-copy-btn { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 5px 10px; font-size: 12px; font-weight: 700; color: var(--teal); cursor: pointer; flex-shrink: 0; }
.modal-copy-btn:hover { background: var(--tealSurface, #F0FDFA); }
.modal-title-block { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.modal-title { font-weight: 800; font-size: 20px; color: var(--navy); }
.modal-subtitle { font-size: 14px; color: var(--slate-lt); }
.modal-message { font-size: 14px; line-height: 1.5; color: var(--slate); }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; }
.btn-modal-secondary { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 600; color: var(--slate); cursor: pointer; }
.btn-modal-secondary:hover { background: var(--bg); }
.btn-modal-primary { border: none; background: var(--teal); border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 700; color: #fff; cursor: pointer; }
.btn-modal-primary:hover { background: var(--teal-700); }
.btn-modal-destructive { border: none; background: var(--red); border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 700; color: #fff; cursor: pointer; }
.btn-modal-destructive:hover { background: #B91C1C; }
@media (max-width: 560px) { .modal-card { padding: 24px; gap: 18px; } }
