/* ============================================================
   REFINE.CSS — cohesive native-iOS refinement layer.
   Loaded LAST so it wins the cascade. Fully reversible: remove
   the <link> to revert. Retunes tokens + polishes components for
   a clean, calm, App-Store-grade look. Motion kept subtle on
   purpose — heavy blur/entrance animation broke touch on iOS
   (see polish.css history), so nothing here blurs or shifts
   tappable elements.
   ============================================================ */

/* ---- 1. Native font everywhere (kills the generic Inter look) ---- */
:root,
[data-theme="light"],
[data-theme="dark"] {
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', system-ui, sans-serif !important;
}
body, input, textarea, select, button {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- 2. Retuned LIGHT palette + depth tokens (what the operator uses) ---- */
[data-theme="light"] {
  --color-bg:        #F5F5F7;   /* calm grouped-background grey */
  --color-surface:   #FFFFFF;
  --color-surface-2: #F0F0F3;
  --color-surface-3: #E8E8ED;
  --color-border:    rgba(0,0,0,0.06);
  --color-border-2:  rgba(0,0,0,0.10);

  --color-primary:      #0A0A0A;   /* confident near-black accent */
  --color-primary-dark: #000000;
  --color-text:       #0B0B0F;
  --color-text-muted: #6B6B72;
  --color-text-faint: #6E6E76; /* was #A9A9B2 = 2.3:1; this is 4.9:1 on white, 4.6:1 on the grey ground */

  /* softer, more expensive shadows */
  --shadow-xs:   0 1px 2px rgba(17,17,26,0.05);
  --shadow-sm:   0 2px 6px rgba(17,17,26,0.06);
  --shadow-md:   0 6px 18px rgba(17,17,26,0.08);
  --shadow-lg:   0 12px 32px rgba(17,17,26,0.12);
  --shadow-card: 0 1px 2px rgba(17,17,26,0.04), 0 4px 16px rgba(17,17,26,0.06);

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 26px;
}

/* ---- 3. Base surface + rhythm ---- */
body { background: var(--color-bg); letter-spacing: -0.01em; }
main, .app-main, #app { background: var(--color-bg); }

/* tabular, tightly-tracked numerals wherever money/counts live */
.stat-num, .revenue-value, .balance-num, .chip-count, .tile-num,
.dashboard-revenue-value, .job-count, [class*="-num"], [class*="count"] {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ---- 4. Cards: one consistent, calm treatment ---- */
.card, .dash-card, .settings-section, .job-card, .report-card,
.revenue-card, .stat-card, .balance-card, .needs-attention,
.today-schedule, .kpi-card {
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-card) !important;
  border: 0.5px solid var(--color-border) !important;
  background: var(--color-surface);
}

/* iOS-style small caps section labels */
.section-label, .settings-section-title, .dash-section-title,
.card-label, .revenue-label, .report-section-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-faint);
}

/* ---- 5. Header: clean, hairline separation ---- */
.app-header, header.app-header, .header {
  background: rgba(245,245,247,0.82) !important;
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 0.5px solid var(--color-border) !important;
  box-shadow: none !important;
}
.app-header h1, .header-title, .page-title { letter-spacing: -0.03em; font-weight: 800; }

/* ---- 6. Bottom nav + FAB: crisp, floating ---- */
.bottom-nav, nav.bottom-nav, .app-nav {
  background: rgba(255,255,255,0.86) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--color-border) !important;
  box-shadow: 0 -1px 12px rgba(17,17,26,0.04) !important;
}
.nav-add, .nav-fab {
  box-shadow: 0 6px 18px rgba(0,0,0,0.28), 0 0 0 5px rgba(255,255,255,0.9) !important;
}

/* ---- 7. Job-card action buttons: kill the green gradient circles ---- */
.call-btn, .wa-btn {
  background: var(--color-surface-2) !important;
  border: 0.5px solid var(--color-border-2) !important;
  color: var(--color-text) !important;
  width: 42px; height: 42px;
  border-radius: var(--radius-full) !important;
  box-shadow: var(--shadow-xs) !important;
  transition: transform .12s ease, background .15s ease;
}
.call-btn:active, .wa-btn:active { transform: scale(0.92); background: var(--color-surface-3) !important; }
/* the WhatsApp/dispatch one gets the single confident accent */
.wa-btn { background: var(--color-primary) !important; color: #fff !important; border-color: transparent !important; }

/* ---- 8. Status pills: quiet, legible, colour + weight (not loud fills) ---- */
.status-badge, .job-status, [class*="status-"] {
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--radius-full);
}

/* ---- 9. Stat tiles (Open/Closed/Lost) + KPI tiles: unified white cards ---- */
.chip, .stat-tile, .job-stat, .status-strip > * {
  border-radius: var(--radius-md) !important;
}

/* ---- 10. Inputs, selects, dropdowns: tidy iOS field ---- */
.field-input, select.field-input, input, textarea, select {
  border-radius: var(--radius-sm) !important;
  border: 0.5px solid var(--color-border-2) !important;
  background: var(--color-surface) !important;
  font-size: 16px; /* prevents iOS zoom-on-focus */
}

/* ---- 11. Primary action buttons: solid, tactile ---- */
.btn-primary, .generate-report-btn, .btn-generate, button.primary {
  border-radius: var(--radius-md) !important;
  background: var(--color-primary) !important;
  color: #fff !important;
  font-weight: 700; letter-spacing: -0.01em;
  box-shadow: var(--shadow-sm) !important;
}
.btn-primary:active, .generate-report-btn:active { transform: scale(0.985); }

/* ---- 12. Replace the ugly grey silhouette on "Balance by Tech" ---- */
.report-avatar img, .balance-avatar img, .tech-report-icon img { display: none !important; }
.report-avatar, .balance-avatar, .tech-report-icon {
  width: 56px; height: 56px; border-radius: var(--radius-full);
  background: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.report-avatar::after, .balance-avatar::after, .tech-report-icon::after {
  content: "\1F4B5"; font-size: 26px;  /* 💵 — reads as "what techs owe" */
}

/* ---- 13. Theme toggle: crisp segmented control ---- */
.theme-toggle-pill { border-radius: var(--radius-full) !important; box-shadow: var(--shadow-xs) inset; }
.theme-toggle-opt { font-weight: 600; }

/* ============================================================
   REFINE v2 — targeted fixes to the real eyesores (verified
   selectors: .notification-banner, .status-strip/.stat-count,
   .section-title, .chip). Light theme.
   ============================================================ */

/* Section headers -> quiet iOS grouped-list labels */
.section-title {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-faint);
  margin: 22px 4px 10px;
}

/* Push-notification banner: was a heavy dark slab. Make it a calm, light card. */
.notification-banner {
  background: var(--color-surface) !important;
  border: 0.5px solid var(--color-border) !important;
  border-left: 3px solid var(--color-primary) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-card) !important;
  color: var(--color-text) !important;
}
.notification-banner * { color: var(--color-text) !important; }
.notification-banner button {
  background: var(--color-primary) !important;
  color: #fff !important;
  border-radius: var(--radius-full) !important;
  font-weight: 700;
  padding: 8px 18px !important;
}

/* Status strip (Open / Closed / Lost) -> crisp white cards, big coloured numbers */
.status-strip { gap: 10px; }
.status-strip > * {
  background: var(--color-surface) !important;
  border: 0.5px solid var(--color-border) !important;
  box-shadow: var(--shadow-card) !important;
  border-radius: var(--radius-md) !important;
  padding: 18px 10px !important;
}
.stat-count { font-size: 34px !important; letter-spacing: -0.03em; }
.stat-label { opacity: 1; color: var(--color-text-faint) !important; }
/* colour each number by status: 1st=open(blue) 2nd=closed(green) 3rd=lost(muted) */
.status-strip > *:nth-child(1) .stat-count { color: var(--color-text) !important; }
.status-strip > *:nth-child(2) .stat-count { color: var(--color-text) !important; }
.status-strip > *:nth-child(3) .stat-count { color: var(--color-text) !important; }
.status-strip > *:nth-child(4) .stat-count { color: var(--color-text-muted) !important; }

/* Jobs filter chips -> clean segmented pills */
.chip {
  border-radius: var(--radius-full) !important;
  border: 0.5px solid var(--color-border-2) !important;
  background: var(--color-surface) !important;
  font-weight: 600;
  box-shadow: var(--shadow-xs) !important;
}
.chip.active {
  background: var(--color-primary) !important;
  color: #fff !important;
  border-color: transparent !important;
}
.chip.active .chip-count { color: rgba(255,255,255,0.7) !important; }

/* Job card left accent + description box: quieter, cleaner */
.job-card { border-left: 3px solid var(--color-border-2) !important; }
.job-desc, .job-card-desc {
  background: var(--color-surface-2) !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  color: var(--color-text-muted) !important;
}

/* Add-job: top back button + hide legacy bulk (regex) button */
.btn-back-top {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--color-surface); border: 0.5px solid var(--color-border-2);
  color: var(--color-text); font-weight: 600; font-size: 15px;
  padding: 8px 16px; border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs); margin-bottom: 14px; cursor: pointer;
}
.btn-back-top:active { transform: scale(0.96); background: var(--color-surface-2); }
[onclick="App.bulkAddLeads()"] { display: none !important; }

/* ── Pointy AI chat tab ── */
#view-pointy { padding:0 !important; }
#view-pointy.active { display:flex; flex-direction:column; }
.pointy-messages { flex:1; overflow-y:auto; padding:16px 14px 8px; display:flex; flex-direction:column; gap:12px; -webkit-overflow-scrolling:touch; }
.pointy-msg { display:flex; gap:8px; max-width:90%; }
.pointy-user { align-self:flex-end; }
.pointy-bot { align-self:flex-start; }
.pointy-avatar { flex:0 0 28px; width:28px; height:28px; border-radius:50%; background:var(--color-primary); color:#fff; display:flex; align-items:center; justify-content:center; font-size:15px; }
.pointy-bubble { background:var(--color-surface); border:0.5px solid var(--color-border); border-radius:18px; padding:10px 14px; font-size:15px; line-height:1.45; box-shadow:var(--shadow-xs); }
.pointy-user .pointy-bubble { background:var(--color-primary); color:#fff; border-color:transparent; border-bottom-right-radius:6px; }
.pointy-bot .pointy-bubble { border-bottom-left-radius:6px; }
.pointy-typing { color:var(--color-text-muted); }
.pointy-warn { color:var(--color-warning); font-weight:600; display:inline-block; margin-top:4px; }
.pointy-card-t { font-weight:800; font-size:12px; text-transform:uppercase; letter-spacing:0.05em; color:var(--color-text-faint); margin-bottom:6px; }
.pointy-card-b { font-size:15px; line-height:1.5; }
.pointy-card-actions { display:flex; gap:8px; margin-top:12px; }
.pointy-btn-do, .pointy-btn-cancel { flex:1; padding:11px; border-radius:12px; font-weight:700; font-size:15px; border:none; cursor:pointer; }
.pointy-btn-do { background:var(--color-primary); color:#fff; }
.pointy-btn-cancel { background:var(--color-surface-2); color:var(--color-text); border:0.5px solid var(--color-border-2); }
.pointy-btn-do:active, .pointy-btn-cancel:active { transform:scale(0.97); }
.pointy-input-bar { display:flex; gap:8px; align-items:flex-end; padding:10px 12px calc(10px + var(--safe-bottom)); border-top:0.5px solid var(--color-border); background:var(--color-surface); }
.pointy-input { flex:1; resize:none; border:0.5px solid var(--color-border-2) !important; border-radius:20px !important; padding:10px 14px; font-size:16px !important; font-family:var(--font); background:var(--color-bg) !important; max-height:120px; }
.pointy-send { flex:0 0 40px; width:40px; height:40px; border-radius:50%; background:var(--color-primary); color:#fff; border:none; font-size:20px; font-weight:700; cursor:pointer; }
.pointy-send:active { transform:scale(0.92); }

/* tighter 6-item bottom nav so it doesn't look packed */
.bottom-nav .nav-item { padding-left:0 !important; padding-right:0 !important; gap:3px; min-width:0; }
.bottom-nav .nav-label { font-size:10px !important; letter-spacing:-0.02em; }
.bottom-nav .nav-icon { width:22px !important; height:22px !important; }
.pointy-bubble { font-size:14.5px; }

/* Schedule header: date on its own clean line, tech filter below */
.calendar-nav { flex-wrap: wrap; row-gap: 12px; align-items: center; }
.calendar-nav .calendar-date-label { flex: 1 1 auto; font-size: 16px !important; font-weight: 800; line-height: 1.2; white-space: nowrap; text-align: center; }
.calendar-nav .balance-select { flex: 1 0 100%; border-radius: var(--radius-sm) !important; }

/* ── Dashboard: clearer hierarchy, revenue as the hero ── */
#view-dashboard { padding-top: 10px; }
#view-dashboard .notification-banner { padding: 11px 13px !important; border-radius: var(--radius-md) !important; margin-bottom: 4px; }
#view-dashboard .notification-banner span[style*="24px"] { font-size: 18px !important; }
#view-dashboard .notification-banner div[style*="font-weight:600"] { font-size: 14px !important; }
.revenue-hero-main { padding: 22px 20px !important; }
.rev-amount-hero { font-size: 42px !important; font-weight: 800 !important; letter-spacing: -0.03em; line-height: 1; }
.rev-amount-side { font-size: 27px !important; font-weight: 800 !important; letter-spacing: -0.02em; }
.rev-label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px !important; font-weight: 700 !important; opacity: 0.6; }
.rev-count { opacity: 0.6; font-size: 12px; }
#view-dashboard .section-title { margin-top: 26px; margin-bottom: 12px; }
.status-strip { gap: 10px; }
.status-stat { padding: 20px 10px !important; }

/* ═══ POLISH PASS — depth, motion, tactile feel (black/white only) ═══ */
/* Smooth transitions (transform+shadow only — safe on iOS per polish.css history) */
.job-card, .status-stat, .chip, .settings-section, .revenue-hero-main, .revenue-hero-side,
.btn, button, .pointy-card, .tech-perf-card, .call-btn, .wa-btn, .notification-banner {
  transition: transform .16s cubic-bezier(.16,1,.3,1), box-shadow .16s cubic-bezier(.16,1,.3,1) !important;
}
/* Floating, elevated cards — premium depth */
.job-card, .status-stat, .settings-section, .revenue-hero-side, .pointy-card, .tech-perf-card {
  box-shadow: 0 1px 2px rgba(17,17,26,.05), 0 10px 26px -14px rgba(17,17,26,.18) !important;
}
/* Tactile press feedback */
.job-card:active, .status-stat:active, .tech-perf-card:active, .settings-item:active { transform: scale(.985); }
.chip:active, .btn:active, button:active { transform: scale(.94); }
/* Revenue TODAY — deep premium black card */
.revenue-hero-main { background: linear-gradient(145deg,#1c1c1e 0%,#000 100%) !important; box-shadow: 0 16px 38px -12px rgba(0,0,0,.5) !important; }
/* Bolder numbers + headings */
.stat-count, .rev-amount-hero, .rev-amount-side { font-weight: 800 !important; }
h1, .page-title { letter-spacing: -0.03em; font-weight: 800; }

/* dark mode: more readable muted text */
:root:not([data-theme="light"]) { --color-text-muted:#aeb6c2; --color-text-faint:#7c8593; }

/* Home: compact — drop the long recent-jobs list (Jobs tab covers it) */
#recent-jobs-wrap { display:none !important; }
/* Logo acts as Home */
#header-brand { cursor:pointer; }
.brand-home-label { font-size:10px; font-weight:700; letter-spacing:.02em; color:var(--color-text-muted); line-height:1; margin-top:1px; }

/* ── Balance: monochrome + compact (fit one screen) + sleek ── */
.rd-tile-today::before, .rd-tile-week::before, .rd-tile-month::before, .rd-tile-conv::before { background: var(--color-text) !important; opacity:.9; }
.balance-card-icon { color: var(--color-text) !important; }
.balance-card-icon svg { display:block; margin:0 auto; }
#view-balance { padding-top:6px !important; }
#view-balance > *:first-child, #view-balance .page-title { margin-top:2px !important; margin-bottom:8px !important; }
.rd-tiles { gap:8px !important; margin-bottom:10px !important; }
.rd-tile { padding:12px !important; }
.rd-pipeline { padding:12px !important; margin-bottom:10px !important; }
.balance-card { padding:14px !important; }
.balance-card-icon { width:44px !important; height:44px !important; margin-bottom:6px !important; }

/* ── Bottom nav: fill the safe area (kills the white strip on every page) ── */
.bottom-nav { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px) !important; background: var(--color-surface) !important; }

/* Balance pipeline: monochrome paid/lost numbers */
.rd-cell-good, .rd-cell-good b, .rd-cell-bad, .rd-cell-bad b { color: var(--color-text) !important; }
/* compact the balance-by-tech CTA so the page fits one screen */
.balance-card { padding:12px 14px !important; }
.balance-card-title, .balance-card h3 { font-size:17px !important; margin:4px 0 2px !important; }

/* Balance: hide unwanted company filter + final compacting to fit one screen */
.rd-source-filter { display:none !important; }
.rd-tile-value { font-size:21px !important; }
.rd-tile { padding:10px 12px !important; }
.rd-tiles { gap:7px !important; margin-bottom:8px !important; }
.rd-pipeline { padding:11px !important; margin-bottom:8px !important; }
.balance-card { padding:10px 14px !important; }

/* ── FIX: nav is #bottom-nav (id), not .bottom-nav — solid bar, no blur, fills safe area ── */
#bottom-nav {
  background: var(--color-surface) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border-top: 0.5px solid var(--color-border) !important;
  box-shadow: 0 -1px 10px rgba(17,17,26,.05) !important;
}
/* balance: shave a little more so it never scrolls */
.rd-pipeline { padding:9px !important; }
.balance-card { padding:8px 14px !important; }
.rd-tile { padding:9px 12px !important; }

/* status color tokens (for filter chips + status buttons) */
:root { --st-open:#2f6fed; --st-open-bg:rgba(47,111,237,.12); --st-estimate:#f59e0b; --st-estimate-bg:rgba(245,158,11,.16); --st-closed:#16a34a; --st-closed-bg:rgba(22,163,74,.12); --st-lost:#e11d48; --st-lost-bg:rgba(225,29,72,.12); }

/* Jobs filter chips: 4 big bold colored buttons, all fit — NO sliding */
#filter-chips { display:flex !important; gap:6px !important; overflow:visible !important; padding:4px 12px 10px !important; }
#filter-chips .chip { flex:1 1 0 !important; min-width:0 !important; padding:11px 3px !important; border-radius:14px !important; font-weight:800 !important; font-size:13px !important; display:flex !important; flex-direction:column; align-items:center; gap:1px; border:none !important; box-shadow:none !important; white-space:nowrap; }
#filter-chips .chip .chip-count { font-size:12px; font-weight:700; }
#filter-chips .chip[data-filter="open"]     { background:var(--st-open-bg) !important;     color:var(--st-open) !important; }
#filter-chips .chip[data-filter="estimate"] { background:var(--st-estimate-bg) !important; color:var(--st-estimate) !important; }
#filter-chips .chip[data-filter="closed"]   { background:var(--st-closed-bg) !important;   color:var(--st-closed) !important; }
#filter-chips .chip[data-filter="lost"]     { background:var(--st-lost-bg) !important;     color:var(--st-lost) !important; }
#filter-chips .chip.active[data-filter="open"]     { background:var(--st-open) !important;     color:#fff !important; }
#filter-chips .chip.active[data-filter="estimate"] { background:var(--st-estimate) !important; color:#fff !important; }
#filter-chips .chip.active[data-filter="closed"]   { background:var(--st-closed) !important;   color:#fff !important; }
#filter-chips .chip.active[data-filter="lost"]     { background:var(--st-lost) !important;     color:#fff !important; }
#filter-chips .chip.active .chip-count { color:rgba(255,255,255,.85) !important; }

/* Job detail: Estimate / Lost buttons — big, bold, colored */
.status-action-row { display:flex !important; gap:10px !important; margin:0 0 12px !important; }
.status-action-btn.sab-est, .status-action-btn.sab-lst, .status-action-btn.sab-reopen { flex:1 !important; padding:13px !important; border-radius:14px !important; font-weight:800 !important; font-size:15px !important; border:none !important; }
.sab-est { background:var(--st-estimate-bg) !important; color:#7c4a00 !important; } /* 6.3:1 on the cream chip; the token amber was 1.8:1 */
.sab-lst { background:var(--st-lost-bg) !important; color:var(--st-lost) !important; }
.sab-reopen { background:rgba(34,197,94,0.14) !important; color:#16a34a !important; }
.sab-est.current { background:var(--st-estimate) !important; color:#fff !important; }
.sab-lst.current { background:var(--st-lost) !important; color:#fff !important; }

/* Dispatch 100/50 choice bottom sheet */
.dispatch-choice-overlay { position:fixed; inset:0; z-index:200; background:rgba(0,0,0,.45); display:flex; align-items:flex-end; }
.dispatch-choice-sheet { width:100%; background:var(--color-surface); border-radius:22px 22px 0 0; padding:10px 18px calc(22px + var(--safe-bottom)); box-shadow:0 -8px 30px rgba(0,0,0,.25); }
.dispatch-choice-handle { width:38px; height:5px; border-radius:3px; background:var(--color-border-2); margin:4px auto 14px; }
.dispatch-choice-title { font-weight:800; font-size:19px; letter-spacing:-.02em; }
.dispatch-choice-sub { color:var(--color-text-muted); font-size:14px; margin:2px 0 14px; }
.dispatch-choice-btn { width:100%; text-align:left; border:0.5px solid var(--color-border-2); background:var(--color-surface-2); border-radius:16px; padding:14px 16px; margin-bottom:10px; cursor:pointer; display:flex; flex-direction:column; gap:2px; }
.dispatch-choice-btn b { font-size:22px; }
.dispatch-choice-btn span { color:var(--color-text-muted); font-size:13px; }
.dispatch-choice-btn:active { transform:scale(.985); }
.dispatch-choice-btn#dc-full { background:var(--color-primary); color:#fff; border-color:transparent; }
.dispatch-choice-btn#dc-full span { color:rgba(255,255,255,.82); }
.dispatch-choice-cancel { width:100%; padding:13px; border:none; background:none; color:var(--color-text-muted); font-weight:700; font-size:16px; cursor:pointer; }

/* Tech form: only Name + Payout % + Card Color (hide phone/Zelle/ZIP/tax toggle) */
.field-group:has(#m-tech-phone),
.field-group:has(#m-tech-zelle),
.field-group:has(#m-tech-zips),
.field-group:has(#m-tech-is-owner) { display:none !important; }

/* Settings gear: black + bold, clearly a settings button */
#btn-settings-top { color: var(--color-text) !important; opacity: 1 !important; }
#btn-settings-top svg { stroke-width: 2.4; }
#btn-settings-top:active { transform: scale(0.9); }

/* ── Calendar month picker ── */
.cal-picker-overlay { position:fixed; inset:0; z-index:210; background:rgba(0,0,0,.45); display:flex; align-items:flex-end; }
.cal-picker-sheet { width:100%; background:var(--color-surface); border-radius:22px 22px 0 0; padding:10px 14px calc(18px + var(--safe-bottom)); box-shadow:0 -8px 30px rgba(0,0,0,.25); }
.cal-picker-handle { width:38px; height:5px; border-radius:3px; background:var(--color-border-2); margin:4px auto 12px; }
.cal-picker-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.cal-picker-month { font-weight:800; font-size:17px; letter-spacing:-.02em; }
.cal-picker-arrow { background:var(--color-surface-2); border:none; width:34px; height:34px; border-radius:50%; font-size:20px; font-weight:700; color:var(--color-text); cursor:pointer; }
.cal-picker-arrow:active { transform:scale(.9); }
.cal-dow { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; margin-bottom:4px; }
.cal-dow div { text-align:center; font-size:11px; font-weight:800; color:var(--color-text-faint); text-transform:uppercase; }
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.cal-cell { position:relative; aspect-ratio:1; border:none; background:var(--color-surface-2); border-radius:11px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; cursor:pointer; padding:0; }
.cal-cell-empty { background:transparent; pointer-events:none; }
.cal-day-num { font-size:15px; font-weight:700; color:var(--color-text); line-height:1; }
.cal-day-count { font-size:10px; font-weight:800; min-width:15px; height:15px; line-height:15px; border-radius:8px; background:var(--color-primary); color:#fff; padding:0 4px; }
.cal-day-count-empty { background:transparent; }
.cal-cell.cal-today { outline:2px solid var(--color-text); outline-offset:-2px; }
.cal-cell.cal-selected { background:var(--color-primary); }
.cal-cell.cal-selected .cal-day-num { color:#fff; }
.cal-cell.cal-selected .cal-day-count { background:rgba(255,255,255,.9); color:var(--color-primary); }
.cal-cell:active { transform:scale(.93); }
.cal-picker-today { width:100%; margin-top:12px; padding:13px; border:none; border-radius:14px; background:var(--color-primary); color:#fff; font-weight:800; font-size:15px; cursor:pointer; }

/* Header date: token grey was 3.6:1 on white; this is 4.8:1 */
.header-date { color:#6b7280 !important; opacity:1 !important; }

/* Remaining WCAG AA contrast fixes from the axe run (2026-09-07) */
.urgent-addr span { color:#B45309 !important; }                 /* overdue tag: #FF9500 was 2.2:1 */
#rev-week-count { color:#6E6E76 !important; opacity:1 !important; }
.revenue-hero-side .rev-label { color:#6E6E76 !important; opacity:1 !important; }
