  /* Trip type toggle */
  .trip-toggle { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
  .trip-toggle-btn { flex: 1; padding: 10px; font-family: var(--sans); font-size: 13px; font-weight: 700; border: none; border-right: 1px solid #86efac; cursor: pointer; transition: all .15s; background: #dcfce7; color: #1E553C; }
  .trip-toggle-btn:last-child { border-right: none; }
  .trip-toggle-btn.active { background: var(--accent); color: white; border-right-color: var(--accent); }
  /* Address autocomplete dropdown */
  .ac-wrap { position: relative; }
  .ac-dropdown { position: absolute; top: calc(100% + 2px); left: 0; right: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 8px 32px #0003; z-index: 10000; overflow: hidden; }
  .ac-item { padding: 10px 14px; font-size: 13px; color: #0f172a; cursor: pointer; border-bottom: 1px solid #f1f5f9; line-height: 1.4; }
  .ac-item:last-child { border-bottom: none; }
  .ac-item:hover, .ac-item.focused { background: #eff6ff; }
  .ac-main { font-weight: 600; }
  .ac-sub { font-size: 11px; color: #64748b; font-family: var(--mono); margin-top: 1px; }
  /* Passenger CRM table */
  .pax-table-wrap { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
  .pax-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .pax-table thead tr { background: #f8fafc; border-bottom: 2px solid #e9eef4; }
  .pax-table th { padding: 11px 14px; text-align: left; font-family: var(--mono); font-size: 10px; color: #475569; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
  .pax-table td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: #0f172a; }
  .pax-table tbody tr:last-child td { border-bottom: none; }
  .pax-table tbody tr:hover td { background: #f8fafc; cursor: pointer; }
  .pax-mobility-chip { display: inline-flex; align-items: center; gap: 4px; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; border-radius: 6px; padding: 3px 8px; font-size: 11px; font-weight: 700; font-family: var(--mono); white-space: nowrap; }
  .pax-mobility-chip.wheelchair { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
  /* ── Trip ID badge ────────────────────────────────────── */
  .trip-id-badge { display:inline-flex;align-items:center;font-size:10px;font-family:var(--mono);font-weight:700;color:#94a3b8;letter-spacing:.3px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:5px;padding:1px 6px;line-height:1.6; }
  /* ── Trip lifecycle breadcrumb (detail modal) ──────────── */
  .lc-trail { display:flex;align-items:center;flex-wrap:wrap;gap:0;font-family:var(--mono);font-size:11px; }
  .lc-step { display:inline-flex;align-items:center;gap:3px;padding:3px 8px;border-radius:20px;font-weight:700;white-space:nowrap;border:1px solid transparent; }
  .lc-step.done { background:#f0fdf4;color:#166534;border-color:#bbf7d0; }
  .lc-step.pending { background:#f8fafc;color:#94a3b8;border-color:#e2e8f0; }
  .lc-step.cancelled { background:#fef2f2;color:#991b1b;border-color:#fecaca; }
  .lc-arrow { color:#e2e8f0;padding:0 4px;font-size:12px;line-height:1; }
  /* ── Client Center — Jobber-style CRM ──────────────────── */
  /* Insight metric cards */
  .cc-insights { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
  .cc-insight-card { background: #ffffff; border: 1px solid #f1f5f9; border-left: 4px solid #94a3b8; border-radius: 12px; padding: 16px 14px; box-shadow: 0 4px 12px rgba(0,0,0,0.03); cursor: pointer; transition: transform .15s, box-shadow .15s; }
  .cc-insight-card:hover { transform: scale(1.02); box-shadow: 0 6px 20px rgba(0,0,0,.08); }
  .cc-insight-label { font-size: 10px; font-weight: 700; color: #64748b; font-family: var(--mono); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
  .cc-insight-value { font-size: 22px; font-weight: 800; color: #0c1623; font-family: var(--mono); line-height: 1; letter-spacing: -0.5px; }
  .cc-insight-sub { font-size: 9px; font-family: var(--mono); color: #94a3b8; margin-top: 6px; letter-spacing: .5px; }
  .cc-insight-growth { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; font-family: var(--mono); color: #16a34a; margin-top: 7px; background: #f0fdf4; border-radius: 20px; padding: 2px 8px; }
  .cc-insight-growth.down { color: #dc2626; background: #fef2f2; }
  /* Action button row */
  .cc-btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
  .cc-add-btn { display: inline-flex; align-items: center; gap: 6px; background: #1E553C; color: white; border: none; border-radius: 999px; padding: 9px 18px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); transition: background .14s; box-shadow: 0 2px 8px rgba(30,85,60,.25); }
  .cc-add-btn:hover { background: #164d30; }
  .cc-import-btn { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #1E553C; border: 1.5px solid #bbf7d0; border-radius: 999px; padding: 9px 16px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); transition: all .14s; }
  .cc-import-btn:hover { background: #f0fdf4; border-color: #1E553C; }
  .pax-template-link { display: inline-flex; align-items: center; gap: 5px; color: #1E553C; font-size: 12px; font-weight: 600; font-family: var(--sans); cursor: pointer; text-decoration: none; margin-top: 12px; opacity: 0.75; transition: opacity .14s; }
  .pax-template-link:hover { opacity: 1; text-decoration: underline; }
  .cc-more-btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: #64748b; border: 1.5px solid #e2e8f0; border-radius: 999px; padding: 9px 18px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); transition: all .14s; }
  .cc-more-btn:hover { border-color: #94a3b8; color: #475569; background: #f8fafc; }
  .cc-more-btn.open { border-color: #0a1628; color: #0a1628; background: #f1f5f9; }
  /* More Actions dropdown */
  .cc-more-wrap { position: relative; }
  .cc-more-menu { display: none; position: absolute; top: calc(100% + 8px); right: 0; background: #ffffff; border: 1px solid #e8edf2; border-radius: 13px; padding: 6px; box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06); z-index: 1100; min-width: 210px; }
  .cc-more-menu.open { display: block; }
  .cc-more-menu-item { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border-radius: 8px; color: #0f172a; font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer; border: none; background: transparent; width: 100%; text-align: left; transition: background .12s; white-space: nowrap; }
  .cc-more-menu-item:hover { background: #f1f5f9; color: #0f172a; }
  .cc-more-menu-item svg { flex-shrink: 0; color: #64748b; }
  .cc-more-menu-item span { color: #0f172a; }
  .cc-more-menu-divider { height: 1px; background: #f1f5f9; margin: 4px 8px; }
  .cc-more-menu-section { font-size: 9px; font-weight: 800; color: #94a3b8; font-family: var(--mono); text-transform: uppercase; letter-spacing: 1px; padding: 6px 13px 2px; }
  /* Filter sub-header bar */
  .cc-filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
  .cc-filter-label { font-size: 13px; font-weight: 700; color: #0c1623; flex: none; }
  .cc-filter-count { font-size: 12px; color: #94a3b8; font-family: var(--mono); flex: none; }
  .cc-filter-divider { width: 1px; height: 16px; background: #e2e8f0; flex: none; }
  .cc-filter-tag-btn { display: inline-flex; align-items: center; gap: 5px; border: 1.5px dashed #cbd5e1; border-radius: 20px; padding: 4px 12px; font-size: 11px; font-weight: 700; color: #94a3b8; background: transparent; cursor: pointer; font-family: var(--mono); transition: all .14s; }
  .cc-filter-tag-btn:hover { border-color: #94a3b8; color: #475569; }
  .cc-status-filter { border: 1.5px solid #e2e8f0; border-radius: 20px; padding: 4px 12px; font-size: 11px; font-weight: 700; color: #475569; background: #f8fafc; cursor: pointer; font-family: var(--mono); transition: all .14s; }
  .cc-status-filter.sel { background: #0c1623; color: white; border-color: #0c1623; }
  .cc-search-compact { display: flex; align-items: center; gap: 7px; background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 20px; padding: 5px 14px; margin-left: auto; min-width: 210px; transition: border-color .14s, background .14s; }
  .cc-search-compact:focus-within { border-color: #94a3b8; background: #fff; }
  .cc-search-compact svg { flex-shrink: 0; color: #94a3b8; }
  .cc-search-compact input { border: none; outline: none; font-size: 12px; font-family: var(--sans); color: #0c1623; background: transparent; width: 100%; }
  .cc-search-compact input::placeholder { color: #b0bec5; }
  /* CRM table */
  .cc-table-wrap { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
  .cc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .cc-table thead tr { background: #f8fafc; border-bottom: 1.5px solid #e2e8f0; }
  .cc-table th { padding: 10px 16px; text-align: left; font-size: 10px; font-weight: 700; color: #64748b; font-family: var(--mono); text-transform: uppercase; letter-spacing: .6px; white-space: nowrap; }
  .cc-table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
  .cc-table tbody tr:last-child td { border-bottom: none; }
  .cc-table tbody tr:hover td { background: #f8fafc; cursor: pointer; }
  .cc-name-cell { display: flex; align-items: center; gap: 10px; }
  .pax-name-btn { all: unset; cursor: pointer; display: block; width: 100%; text-align: left; }
  .cc-av { width: 32px; height: 32px; border-radius: 50%; font-size: 12px; font-weight: 800; color: white; display: flex; align-items: center; justify-content: center; flex-shrink: 0; letter-spacing: -.3px; }
  .cc-name { font-size: 13px; font-weight: 700; color: #0c1623; }
  .cc-sub { font-size: 11px; color: #94a3b8; font-family: var(--mono); margin-top: 1px; }
  .cc-tag { display: inline-flex; align-items: center; gap: 3px; background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; border-radius: 6px; padding: 2px 8px; font-size: 10px; font-weight: 700; font-family: var(--mono); white-space: nowrap; margin-right: 4px; }
  .cc-tag.wc { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
  /* Status pills */
  .cc-pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 700; font-family: var(--mono); white-space: nowrap; }
  .cc-pill.active   { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
  .cc-pill.lead     { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
  .cc-pill.inactive { background: #f1f5f9; color: #64748b;  border: 1px solid #e2e8f0; }
  /* Keep legacy card styles for backward compat with modal etc */
  .pax-card { display: none; }
  .pax-maps-link { display: flex; align-items: center; gap: 4px; color: #1d4ed8; text-decoration: none; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--sans); }
  .pax-maps-link:hover { text-decoration: underline; }
  /* Empty state */
  .pax-empty-state { text-align: center; padding: 40px 24px; display: none; flex-direction: column; align-items: center; justify-content: center; }
  .pax-add-first-btn { display: inline-flex; align-items: center; gap: 8px; background: #1E553C; color: white; border: none; border-radius: 999px; padding: 14px 28px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: var(--sans); margin-top: 24px; transition: background .15s; box-shadow: 0 4px 20px rgba(30,85,60,.3); }
  .pax-add-first-btn:hover { background: #164d30; }
  @media (max-width: 640px) {
    .cc-insights { grid-template-columns: 1fr 1fr; }
    .cc-search-compact { margin-left: 0; min-width: 100%; order: 10; }
  }
  @media (max-width: 420px) {
    .cc-insights { grid-template-columns: 1fr; }
  }
  /* Passenger search autocomplete */
  .pas-ac-wrap { position: relative; }
  .pas-ac-dropdown { position: absolute; top: calc(100% + 2px); left: 0; right: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 8px 32px #0003; z-index: 20000; overflow: hidden; display: none; max-height: 240px; overflow-y: auto; }
  .pas-ac-dropdown.open { display: block; }
  .pas-ac-item { padding: 11px 14px; font-size: 13px; color: #0f172a; cursor: pointer; border-bottom: 1px solid #f1f5f9; }
  .pas-ac-item:last-child { border-bottom: none; }
  .pas-ac-item:hover, .pas-ac-item.focused { background: #eff6ff; }
  .pas-ac-name { font-weight: 700; }
  .pas-ac-sub { font-size: 11px; color: #64748b; font-family: var(--mono); margin-top: 2px; }
  .pas-ac-add { border-top: 1px solid #e2e8f0; background: #f8fafc; }
  .pas-ac-add:hover { background: #f0fdf4; }
  .pas-ac-add .pas-ac-name { color: #1E553C; font-weight: 700; }
  /* CRM Client autocomplete */
  .crm-ac-wrap { position: relative; }
  .crm-ac-dropdown { position: absolute; top: calc(100% + 2px); left: 0; right: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 8px 32px #0003; z-index: 20000; overflow: hidden; display: none; max-height: 260px; overflow-y: auto; }
  .crm-ac-dropdown.open { display: block; }
  .crm-ac-item { padding: 10px 14px; font-size: 13px; color: #0f172a; cursor: pointer; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; gap: 10px; }
  .crm-ac-item:last-child { border-bottom: none; }
  .crm-ac-item:hover { background: #eff6ff; }
  .crm-ac-item-icon { font-size: 15px; flex-shrink: 0; }
  .crm-ac-item-body { flex: 1; min-width: 0; }
  .crm-ac-item-name { font-weight: 700; color: #0f172a; }
  .crm-ac-item-sub { font-size: 11px; color: #64748b; font-family: var(--mono); margin-top: 1px; }
  .crm-ac-item-badge { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px; font-family: var(--mono); text-transform: uppercase; flex-shrink: 0; }
  .crm-client-link-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: #eff6ff; border: 1.5px solid #bfdbfe; border-radius: 7px; padding: 3px 9px; font-size: 11px; font-weight: 700; color: #1d4ed8; font-family: var(--sans); cursor: pointer; white-space: nowrap; line-height: 1.4; transition: background .12s; }
  .crm-client-link-btn:hover { background: #dbeafe; }
  /* CRM selected-contact info bar */
  .crm-info-bar { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
  .crm-info-chip { display: inline-flex; align-items: center; gap: 4px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px; padding: 3px 9px; font-size: 11px; color: #0a1628; font-family: var(--mono); }
  /* Add-to-CRM row */
  .crm-add-row { display: flex; align-items: center; gap: 8px; margin-top: 7px; padding: 7px 11px; background: #f8fafc; border: 1.5px dashed #cbd5e1; border-radius: 9px; font-size: 12px; font-weight: 600; color: #334155; font-family: var(--sans); cursor: pointer; transition: background .12s; }
  .crm-add-row:hover { background: #f0fdf4; border-color: #86efac; }
  .crm-add-row input[type=checkbox] { width: 14px; height: 14px; accent-color: #1E553C; cursor: pointer; flex-shrink: 0; }
  .crm-add-row-label { flex: 1; line-height: 1.3; }
  .crm-add-row-badge { font-size: 9px; font-weight: 800; color: #1E553C; font-family: var(--mono); text-transform: uppercase; letter-spacing: .6px; background: #dcfce7; padding: 1px 6px; border-radius: 5px; white-space: nowrap; }
  /* Communication Log */
  .comm-log-section { margin-top:20px; border-top:1px solid #e2e8f0; padding-top:16px; }
  .comm-log-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-bottom:12px; }
  .comm-log-title { font-size:14px; font-weight:800; color:#0f172a; }
  .comm-log-btn { display:inline-flex; align-items:center; gap:6px; background:#eff6ff; color:#1d4ed8; border:1.5px solid #bfdbfe; border-radius:8px; padding:9px 14px; font-size:13px; font-weight:700; cursor:pointer; font-family:var(--sans); transition:background .15s; }
  .comm-log-btn:hover { background:#dbeafe; }
  .comm-log-btn:disabled { opacity:.5; cursor:default; }
  .comm-log-empty { text-align:center; padding:18px; color:#94a3b8; font-size:12px; font-family:var(--mono); background:#f8fafc; border-radius:8px; border:1px dashed #e2e8f0; }
  .comm-log-entry { background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; padding:10px 14px; margin-bottom:6px; }
  .comm-log-entry-type { font-size:12px; font-weight:700; color:#0f172a; }
  .comm-log-entry-meta { font-size:11px; color:#64748b; font-family:var(--mono); margin-top:3px; }
  .comm-log-entry-notes { font-size:12px; color:#475569; margin-top:4px; font-style:italic; }
  /* Driver one-touch call buttons */
  .drf-call-row { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
  .call-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 12px 18px; border-radius: 10px; font-size: 14px; font-weight: 700; font-family: var(--sans); text-decoration: none; min-height: 48px; cursor: pointer; border: 1.5px solid; transition: all .15s; white-space: nowrap; }
  .call-btn.passenger { background: #1d4ed8; color: white; border-color: #1d4ed8; box-shadow: 0 4px 14px #1d4ed835; }
  .call-btn.passenger:hover { background: #1e40af; border-color: #1e40af; }
  .call-btn.dispatch { background: #f0fdf4; color: #1E553C; border-color: #86efac; }
  .call-btn.dispatch:hover { background: #dcfce7; }
  @media (max-width: 600px) {
    .drf-call-row { flex-direction: column; gap: 8px; }
    .call-btn { width: 100%; min-height: 52px; font-size: 15px; }
  }
  /* Mileage display */
  .mileage-chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border-radius: 8px; background: #F1F5F9; border: 1px solid #e2e8f0; font-family: var(--sans); font-size: 12px; font-weight: 500; color: #475569; box-sizing: border-box; white-space: nowrap; }
  .trip-type-chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border-radius: 8px; background: #F1F5F9; color: #475569; border: 1px solid #e2e8f0; font-size: 12px; font-weight: 500; font-family: var(--sans); white-space: nowrap; box-sizing: border-box; }
  .trip-type-chip .bi, .tl-chip .bi { font-size: 14px; line-height: 1; flex-shrink: 0; }
  :root {
    --bg: #0a0f1a;
    --surface: #111827;
    --surface2: #1a2335;
    --border: #1e3a5f;
    --sequoia-gradient: linear-gradient(135deg, #064E3B 0%, #022C22 100%);
    --sequoia-gradient-hover: linear-gradient(135deg, #065f48 0%, #033328 100%);
    --sequoia-glow: 0 0 24px rgba(6,78,59,.55), 0 4px 16px rgba(0,0,0,.28);
    --accent: #1E553C;
    --accent2: #166534;
    --sequoia: #1E553C;
    --green: #22c55e;
    --blue: #38bdf8;
    --red: #f87171;
    --text: #e6edf3;
    --muted: #6b8aa8;
    --mono: 'Inter', sans-serif;
    --sans: 'Inter', sans-serif;
    --sidebar-w: 260px;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { overflow: hidden; }
  body { background: #F8FAFC; color: #0f172a; font-family: var(--sans); overflow: hidden; }
  /* Light content area — Jobber-style #F8FAFC so white cards float above it */
  .tab-content { display: none; position: fixed; top: calc(56px + env(safe-area-inset-top, 20px)); bottom: calc(60px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; padding: 24px; background: #F8FAFC; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; z-index: 10; }
  .tab-content.active { display: block !important; }

/* ── LOGIN ─────────────────────────────────────── */
#login-screen {
position: fixed; inset: 0; z-index: 50;
display: flex; flex-direction: column; align-items: center; justify-content: center;
gap: 48px; padding: 24px;
background: #ffffff;
overflow-y: auto; -webkit-overflow-scrolling: touch;
}
#login-screen.join-active { justify-content: flex-start; padding-top: 48px; }
.login-logo { font-size: 13px; font-family: var(--mono); color: var(--accent); letter-spacing: 4px; text-transform: uppercase; }
.login-title { font-size: 42px; font-weight: 800; text-align: center; line-height: 1.1; color: #0f172a; }
.login-title span { color: var(--accent); }
.login-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; max-width: 520px; }
.login-card {
background: #f8fafc; border: 1px solid #dde3ea; border-radius: 8px;
padding: 28px 24px; cursor: pointer; transition: all .2s; text-align: center;
}
.login-card:hover { border-color: var(--accent); }
.login-card .icon { font-size: 36px; margin-bottom: 12px; }
.login-card .label { font-size: 18px; font-weight: 700; color: #0f172a; }
.login-card .sub { font-size: 12px; color: #64748b; margin-top: 4px; font-family: var(--mono); }
.login-form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; }
.login-form input {
background: #ffffff; border: 1px solid #E2E8F0; border-radius: 12px;
color: #0f172a; padding: 16px 20px; font-family: 'Inter', var(--sans); font-size: 17px;
outline: none; transition: border-color .15s, box-shadow .15s; width: 100%;
box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
}
.login-form input:focus { border-color: var(--accent); box-shadow: inset 0 2px 4px rgba(0,0,0,0.04), 0 0 0 3px rgba(44,160,28,0.12); }
.login-form input::placeholder { color: #94a3b8; }
.login-submit {
background: var(--sequoia-gradient) !important; color: white; border: none; border-radius: 12px;
padding: 18px; font-family: 'Inter', var(--sans); font-size: 18px; font-weight: 700;
cursor: pointer; transition: box-shadow .18s, transform .18s; width: 100%;
box-shadow: 0 4px 16px rgba(6,78,59,.40);
}
.login-submit:hover { box-shadow: var(--sequoia-glow); transform: translateY(-1px); }
.login-submit:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(6,78,59,.30); }
.login-error { color: #dc2626; font-size: 13px; font-family: var(--mono); text-align: center; min-height: 18px; }
.back-btn { background: none; border: none; color: #64748b; cursor: pointer; font-family: var(--sans); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.back-btn:hover { color: #0f172a; }

/* Manage credentials modal */
.cred-save-btn { background: var(--accent); color: white; border: none; border-radius: 8px; padding: 9px 18px; font-family: var(--sans); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.cred-save-btn:hover { background: #166534; }
.cred-save-btn:active { background: #14532d; }

/* ── USER EDIT DRAWER ───────────────────────────────── */
.user-edit-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 900; display: none; backdrop-filter: blur(2px); }
.user-edit-backdrop.open { display: block; }
.user-edit-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100vw; background: #fff; z-index: 901; box-shadow: -6px 0 40px #00000022; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1); }
.user-edit-drawer.open { transform: translateX(0); }
.ued-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid #e2e8f0; flex-shrink: 0; }
.ued-title { font-size: 17px; font-weight: 800; color: #0f172a; }
.ued-close-btn { background: none; border: none; cursor: pointer; color: #64748b; padding: 6px; border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.ued-close-btn:hover { background: #f1f5f9; color: #0f172a; }
.ued-body { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; -webkit-overflow-scrolling: touch; }
.ued-avatar-row { display: flex; align-items: center; gap: 14px; padding-bottom: 4px; }
.ued-avatar { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; color: white; flex-shrink: 0; letter-spacing: -0.5px; }
.ued-section-divider { height: 1px; background: #f1f5f9; margin: 2px 0; }
.ued-field-group { display: flex; flex-direction: column; gap: 5px; }
.ued-label { font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .7px; }
.ued-input { background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 11px 14px; font-size: 14px; color: #0f172a; font-family: var(--sans); outline: none; width: 100%; transition: border-color .15s, background .15s; }
.ued-input:focus { border-color: #1E293B; background: #fff; }
.ued-input-row { display: flex; gap: 10px; }
.ued-input-row .ued-field-group { flex: 1; }
.ued-roles-checkboxes { display: flex; flex-direction: column; gap: 6px; }
.ued-role-cb-label { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 9px 12px; border: 1.5px solid #e2e8f0; border-radius: 9px; background: #f8fafc; font-size: 13px; color: #374151; font-weight: 500; transition: border-color .15s, background .15s; user-select: none; }
.ued-role-cb-label:hover { border-color: #1E553C; background: #f0fdf4; }
.ued-role-cb-label input[type=checkbox] { accent-color: #1E553C; width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }
.ued-role-cb-label.is-checked { border-color: #1E553C; background: #f0fdf4; }
.ued-label-note { font-weight: 400; font-size: 10px; text-transform: none; letter-spacing: 0; color: #94a3b8; margin-left: 4px; }
.ued-footer { padding: 16px 22px; border-top: 1px solid #e2e8f0; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.ued-save-btn { background: var(--accent); color: white; border: none; border-radius: 10px; padding: 13px 20px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: var(--sans); transition: background .15s; width: 100%; }
.ued-save-btn:hover { background: var(--accent2); }
.ued-save-btn:disabled { opacity: .6; cursor: not-allowed; }
.ued-deactivate-btn { background: none; border: 1.5px solid #ef4444; color: #ef4444; border-radius: 10px; padding: 11px 20px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); transition: all .15s; width: 100%; }
.ued-deactivate-btn:hover { background: #ef4444; color: #fff; }
.ued-deactivate-btn.is-reactivate { border-color: #22c55e; color: #1E553C; }
.ued-deactivate-btn.is-reactivate:hover { background: #22c55e; color: #fff; }
.ued-pw-row { display: flex; gap: 8px; align-items: flex-end; }
.ued-pw-row .ued-field-group { flex: 1; }
.ued-generate-btn { background: #f1f5f9; border: 1px solid #e2e8f0; color: #475569; border-radius: 8px; padding: 11px 12px; font-size: 11px; font-weight: 700; cursor: pointer; font-family: var(--mono); white-space: nowrap; transition: all .15s; flex-shrink: 0; }
.ued-generate-btn:hover { border-color: #1E293B; color: #1E293B; background: #f8fafc; }
@media (max-width: 600px) {
  .user-edit-drawer { top: auto; left: 0; right: 0; width: 100%; height: auto; max-height: 92dvh; border-radius: 20px 20px 0 0; transform: translateY(100%); }
  .user-edit-drawer.open { transform: translateY(0); }
  .ued-body { padding-bottom: max(22px, env(keyboard-inset-height, 22px)); }
}
/* Clickable user row */
.urow-clickable { cursor: pointer; }
.urow-clickable:hover td { background: #f0f6ff !important; }
.urow-name-link { color: #1E293B; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.urow-chevron { color: #94a3b8; flex-shrink: 0; }

/* ── USER TABLE ─────────────────────────────────────── */
.user-table-wrap { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.04); width: 100%; }
.user-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.user-table thead tr { background: #f8fafc; border-bottom: 2px solid #e9eef4; }
.user-table th { padding: 11px 16px; font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .8px; text-align: left; white-space: nowrap; }
.user-table td { padding: 14px 16px; border-bottom: 1px solid #f1f5f9; font-size: 14px; color: #0f172a; vertical-align: middle; }
.user-table tbody tr:last-child td { border-bottom: none; }
.user-table tbody tr:hover td { background: #fafbfc; }
.user-table tbody tr.urow-editing td { background: #f0f6ff; }
/* Column distribution — Name expands, Role/Username fixed, Actions right-aligned */
.user-table th:nth-child(1), .user-table td:nth-child(1) { width: auto; min-width: 200px; }
.user-table th:nth-child(2), .user-table td:nth-child(2) { width: 160px; }
.user-table th:nth-child(3), .user-table td:nth-child(3) { width: 200px; }
.user-table th:nth-child(4), .user-table td:nth-child(4) { width: 180px; text-align: right; }
#map-settings-panel { width: 100%; box-sizing: border-box; }
.urow-expand { background: #f8fafc; border-top: 1px solid #e9eef4; }
.urow-expand td { padding: 20px 24px 24px; }
.dcard-avatar { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: white; flex-shrink: 0; letter-spacing: -0.5px; }
/* Role pills — unified Sequoia palette. We keep them visually distinct by
   varying tint intensity rather than swapping hues (no more rainbow). The
   pill ladder roughly maps to privilege: deepest green = highest authority. */
.role-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; font-family: var(--sans); padding: 4px 10px; border-radius: 20px; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.03em; }
.role-badge.superadmin { background: #064E3B; color: #ffffff; border: 1px solid #064E3B; }
.role-badge.owner      { background: #1E553C; color: #ffffff; border: 1px solid #1E553C; }
.role-badge.admin      { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.role-badge.dispatcher { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
.role-badge.biller     { background: #fefce8; color: #854d0e; border: 1px solid #fde68a; }
.role-badge.driver     { background: #ffffff; color: #475569; border: 1px solid #e2e8f0; }
.pw-display { font-family: var(--mono); font-size: 13px; color: #334155; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px 11px; display: inline-block; }
.pw-none { color: #f97316; font-size: 12px; font-family: var(--mono); font-style: italic; }
.dcard-del-btn { background: none; border: 1px solid var(--red); color: var(--red); border-radius: 8px; padding: 7px 14px; font-size: 12px; font-family: var(--sans); font-weight: 600; cursor: pointer; transition: all .15s; }
.dcard-del-btn:hover { background: var(--red); color: white; }
.utbl-edit-btn { background: var(--accent); color: white; border: none; border-radius: 8px; padding: 7px 14px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: var(--sans); transition: background .15s; }
.utbl-edit-btn:hover { background: #166534; }
.utbl-edit-btn.cancel { background: #f1f5f9; color: #475569; }
.utbl-edit-btn.cancel:hover { background: #e2e8f0; }

/* ── LAYOUT ─────────────────────────────────────── */
#app { display: none; flex-direction: column; height: 100vh; height: 100dvh; overflow: visible; background: #F4F7F9; }
/* Topbar uses a lighter brand-green gradient than the global sequoia-gradient
   so the header reads as forest-green, not near-black. White text/icons still
   pass contrast on the darker right edge. */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 200; background: linear-gradient(135deg, #1E553C 0%, #0F4D2E 100%); border-bottom: 1px solid rgba(255,255,255,.10); padding: 0 24px; padding-top: env(safe-area-inset-top, 20px); height: calc(56px + env(safe-area-inset-top, 20px)); display: flex; align-items: center; justify-content: space-between; color: white; }
.topbar .brand-logo { filter: none; }
.topbar-brand { font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.topbar-brand span { color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
/* Icons inside the dark topbar — white at 80% opacity */
.notif-bell { color: rgba(255,255,255,.8) !important; cursor: pointer; display: flex; align-items: center; position: relative; }
.notif-bell svg { stroke: rgba(255,255,255,.8); }
.notif-bell:hover { color: #fff !important; }
.chat-btn { color: rgba(255,255,255,.8) !important; background: none; border: none; cursor: pointer; font-size: 19px; padding: 0; border-radius: 50%; position: relative; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; transition: background .12s, color .12s; }
.chat-btn:hover { color: #fff !important; background: rgba(255,255,255,.1) !important; }
.user-chip { display: none !important; }
.logout-btn { display: none !important; }
.chat-btn { display: none !important; }
.notif-bell { display: none !important; }
.mobile-settings-btn { display: flex !important; }

/* ── TABS — Jobber-style white bottom nav ────────────────────────── */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 150; display: flex; gap: 0; border-top: 1px solid rgba(0,0,0,0.07); border-bottom: none; padding: 0; padding-bottom: env(safe-area-inset-bottom, 0px); background: #ffffff; overflow-x: auto; box-shadow: 0 -4px 12px rgba(0,0,0,0.06); }
.tab { flex: 1; min-width: 48px; height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px 4px; border-top: 2.5px solid transparent; border-bottom: none; border-left: none; border-right: none; background: transparent; letter-spacing: 0; color: #64748b; cursor: pointer; font-family: var(--sans); transition: color .15s, border-top-color .15s; white-space: nowrap; position: relative; }
.tab-icon { font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.tab-icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.1; fill: none; stroke-linecap: round; stroke-linejoin: round; display: block; }
.tab svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.1; fill: none; stroke-linecap: round; stroke-linejoin: round; display: block; }
.tab-label { font-size: 8.5px; font-weight: 700; letter-spacing: 0.01em; }
.tab.active { color: #0f172a; border-top-color: #1E553C; }

/* ── DESKTOP SIDEBAR (shown ≥1024px) ─────────────────────────── */
#desktop-sidebar {
  display: none;
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  z-index: 201;
  flex-direction: column;
  overflow: hidden; /* nav scrolls independently — sidebar itself must not scroll */
}
.dsb-logo-area {
  background: var(--sequoia-gradient);
  border-bottom: 1px solid rgba(255,255,255,.08);
  height: calc(56px + env(safe-area-inset-top, 20px));
  display: flex; align-items: flex-end;
  padding: 0 16px 10px; gap: 10px; flex-shrink: 0;
}
.dsb-brand-name { font-size: 13px; font-weight: 900; color: #ffffff; letter-spacing: 2px; font-family: 'Inter', var(--sans); line-height: 1.1; }
.dsb-brand-sub  { font-size: 7px; color: #94A3B8; font-family: var(--mono); letter-spacing: 3px; text-transform: uppercase; font-weight: 600; }
.dsb-create-wrap { padding: 14px 16px 8px; flex-shrink: 0; }
.role-driver .dsb-create-wrap,
.role-biller .dsb-create-wrap { display: none !important; }
.dsb-create-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 10px 14px;
  background: var(--sequoia-gradient); color: #fff;
  border: none; border-radius: 12px;
  font-size: 14px; font-weight: 700; font-family: var(--sans);
  cursor: pointer; transition: box-shadow .18s, transform .18s;
  box-shadow: 0 2px 10px rgba(6,78,59,.35);
}
.dsb-create-btn:hover { box-shadow: var(--sequoia-glow); transform: translateY(-1px); }
.dsb-create-btn:active { transform: scale(.97); }
.dsb-create-btn svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2.5; stroke-linecap: round; flex-shrink: 0; }
.dsb-ai-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 8px 14px; margin-top: 8px;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%); color: #fff;
  border: none; border-radius: 10px;
  font-size: 12px; font-weight: 700; font-family: var(--sans); letter-spacing: .2px;
  cursor: pointer; transition: box-shadow .18s, transform .18s;
  box-shadow: 0 2px 8px rgba(99,102,241,.32);
}
.dsb-ai-btn:hover { box-shadow: 0 4px 14px rgba(99,102,241,.45); transform: translateY(-1px); }
.dsb-ai-btn:active { transform: scale(.97); }
.ai-quick-btn {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
  color: #fff !important;
}
.ai-quick-btn:hover { background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%) !important; }
.ai-banner {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(139,92,246,.08) 0%, rgba(99,102,241,.08) 100%);
  border: 1px solid rgba(99,102,241,.25); border-radius: 10px;
  font-size: 12.5px; color: #4338ca; line-height: 1.45;
}
.ai-banner-icon { font-size: 18px; line-height: 1; flex-shrink: 0; margin-top: 1px; }
.ai-banner-title { font-weight: 800; color: #4f46e5; margin-bottom: 2px; font-size: 12px; letter-spacing: .2px; text-transform: uppercase; font-family: var(--mono); }
.ai-confidence-pill {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  font-size: 10px; font-weight: 800; font-family: var(--mono); letter-spacing: .4px;
  margin-left: 6px; vertical-align: middle;
}
.ai-conf-high { background: #dcfce7; color: #15803d; }
.ai-conf-medium { background: #fef3c7; color: #b45309; }
.ai-conf-low { background: #fee2e2; color: #b91c1c; }
.ai-prefilled { background: linear-gradient(0deg, rgba(139,92,246,.08), rgba(139,92,246,.08)) !important; border-color: rgba(139,92,246,.45) !important; }
/* AI features are restricted to owner / admin / dispatcher / superadmin. Hide for biller and driver. */
body.role-biller .ai-feature, body.role-driver .ai-feature { display: none !important; }
/* The AI Activity viewer is owner/admin/superadmin only */
body.role-dispatcher .ai-admin-only, body.role-biller .ai-admin-only, body.role-driver .ai-admin-only { display: none !important; }
body.role-driver .dispatch-only, body.role-biller .dispatch-only { display: none !important; }

/* ── Copilot Chat (slide-in sidebar) ─────────────────────── */
.copilot-fab {
  position: fixed; bottom: 22px; right: 22px; z-index: 9000;
  width: 56px; height: 56px; border-radius: 50%; border: none;
  /* Forest-green Sequoia brand. Subtle radial highlight in upper-left for depth. */
  background:
    radial-gradient(circle at 30% 28%, rgba(255,255,255,.18), transparent 55%),
    linear-gradient(135deg, #0b5d3b 0%, #064E3B 60%, #043a2c 100%);
  color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(6,78,59,.45), 0 2px 8px rgba(6,78,59,.3),
              inset 0 0 0 1px rgba(255,255,255,.06);
  transition: transform .15s, box-shadow .15s;
}
.copilot-fab > img { width: 60%; height: 60%; object-fit: contain; filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0,0,0,.25)); pointer-events: none; }
/* Neon-green AI pulse — signals "this is the intelligent assistant" */
.copilot-fab::after {
  content: ''; position: absolute; top: 6px; right: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,.7), 0 0 6px rgba(74,222,128,.9);
  animation: copilotPulse 2.2s ease-out infinite;
}
@keyframes copilotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,.7), 0 0 6px rgba(74,222,128,.9); }
  70%  { box-shadow: 0 0 0 10px rgba(74,222,128,0),  0 0 6px rgba(74,222,128,.9); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0),    0 0 6px rgba(74,222,128,.9); }
}
/* On mobile, stack ✨ directly above the + FAB and center-align with it.
   + FAB is 56px wide at right:20px. ✨ FAB is 48px wide → right offset must be
   20 + (56-48)/2 = 24px so the two buttons share a vertical centerline.
   + FAB sits at bottom:88px (mobile) and is 56px tall; bottom:156px gives a
   clean 12px gap above. */
@media (max-width: 540px) {
  .copilot-fab {
    right: 24px; left: auto;
    bottom: calc(156px + env(safe-area-inset-bottom, 0px));
    width: 48px; height: 48px;
  }
}
/* Hide ✨ while the + speed-dial is open so it doesn't overlap the menu items. */
body:has(#fab-speed-dial.open) .copilot-fab { opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.copilot-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 12px 30px rgba(6,78,59,.55), inset 0 0 0 1px rgba(255,255,255,.08); }
.copilot-fab:active { transform: scale(.96); }
.copilot-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw;
  background: linear-gradient(160deg, #f0f9f4 0%, #ffffff 45%);
  z-index: 9100; display: none; flex-direction: column;
  box-shadow: -8px 0 28px rgba(15,23,42,.18);
  transform: translateX(100%); transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.copilot-panel.open { display: flex; transform: translateX(0); }
/* Clean nav bar — no dark header */
.copilot-navbar {
  padding: 16px 18px 12px; display: flex; align-items: center;
  justify-content: space-between; gap: 10px; flex-shrink: 0;
}
.copilot-header-pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 6px rgba(74,222,128,.9); animation: copilotPulse 2.2s ease-out infinite; }
.copilot-title { font-weight: 700; font-size: 15px; color: #0f172a; letter-spacing: .2px; display: flex; align-items: center; gap: 7px; }
.copilot-close { background: #f1f5f9; border: none; color: #475569; width: 30px; height: 30px; border-radius: 50%; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; }
.copilot-close:hover { background: #e2e8f0; color: #0f172a; }
/* Hero avatar + greeting */
.copilot-hero { display: flex; flex-direction: column; align-items: center; padding: 8px 20px 24px; flex-shrink: 0; }
.copilot-avatar-wrap { position: relative; margin-bottom: 14px; }
.copilot-avatar {
  width: 68px; height: 68px; border-radius: 20px;
  background: linear-gradient(135deg, #1E553C, #2d8a57);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; box-shadow: 0 8px 20px rgba(30,85,60,.25);
}
.copilot-avatar-dot {
  position: absolute; bottom: -3px; right: -3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #4ade80; border: 2.5px solid #fff;
}
.copilot-greeting { font-size: 20px; font-weight: 800; color: #0f172a; letter-spacing: -.3px; text-align: center; margin-bottom: 4px; }
.copilot-subline { font-size: 13px; color: #94a3b8; text-align: center; }
/* Messages area — transparent so gradient shows when empty */
.copilot-messages { flex: 1; overflow-y: auto; padding: 0 16px 8px; display: flex; flex-direction: column; gap: 10px; }
.copilot-msg { max-width: 88%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; word-wrap: break-word; }
.copilot-msg-user { align-self: flex-end; background: linear-gradient(135deg, #0b5d3b, #064E3B); color: #fff; border-bottom-right-radius: 4px; }
.copilot-msg-ai { align-self: flex-start; background: #fff; color: #0f172a; border: 1px solid #e2e8f0; border-bottom-left-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.copilot-msg-ai table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12px; }
.copilot-msg-ai th, .copilot-msg-ai td { padding: 5px 8px; text-align: left; border-bottom: 1px solid #e2e8f0; }
.copilot-msg-ai th { background: #f1f5f9; font-weight: 700; color: #475569; }
.copilot-msg-ai code { background: #f1f5f9; padding: 1px 4px; border-radius: 3px; font-size: 11.5px; }
.copilot-msg-system { align-self: center; color: #64748b; font-size: 11.5px; font-style: italic; padding: 4px 10px; }
.copilot-thinking { align-self: flex-start; padding: 9px 13px; color: #64748b; font-size: 12.5px; font-style: italic; }
.copilot-thinking::after { content: ' ●●●'; animation: copilotDots 1.3s steps(4) infinite; }
@keyframes copilotDots { 0% { opacity: .2; } 50% { opacity: 1; } 100% { opacity: .2; } }
.copilot-tool-pill {
  display: inline-block; font-size: 10px; font-weight: 700; color: #4338ca;
  background: #e0e7ff; padding: 1px 6px; border-radius: 8px; margin-right: 4px; font-family: var(--mono);
}
/* Warm suggestion cards */
.copilot-suggestion {
  width: 100%; display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 16px; padding: 13px 14px;
  border: 1px solid #f1f5f9; box-shadow: 0 1px 4px rgba(0,0,0,.06);
  text-align: left; cursor: pointer; font-family: var(--sans);
  margin-bottom: 0; transition: border-color .15s, box-shadow .15s;
}
.copilot-suggestion:hover { border-color: #bbf7d0; box-shadow: 0 3px 10px rgba(30,85,60,.1); }
.copilot-sug-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 16px; }
.copilot-sug-body { flex: 1; min-width: 0; }
.copilot-sug-text { font-size: 13px; font-weight: 500; color: #334155; line-height: 1.35; }
.copilot-sug-sub { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.copilot-sug-arrow { width: 24px; height: 24px; border-radius: 50%; background: #f8fafc; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 12px; color: #94a3b8; }
/* Input bar */
.copilot-input-bar { padding: 12px 14px 16px; border-top: 1px solid #f1f5f9; background: #fff; box-shadow: 0 -2px 10px rgba(0,0,0,.04); display: flex; gap: 8px; align-items: flex-end; flex-shrink: 0; }
/* font-size MUST be >=16px so iOS Safari does not auto-zoom on focus */
.copilot-input { flex: 1; min-height: 40px; max-height: 120px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 12px; font-family: var(--sans); font-size: 16px; resize: none; outline: none; background: #f8fafc; }
.copilot-input:focus { border-color: #1E553C; box-shadow: 0 0 0 3px rgba(30,85,60,.1); background: #fff; }
.copilot-mic-btn { background: #f1f5f9; border: 1px solid #e2e8f0; color: #475569; width: 40px; height: 40px; border-radius: 12px; font-size: 17px; cursor: pointer; flex-shrink: 0; }
.copilot-mic-btn.listening { background: #fef2f2; border-color: #fca5a5; }
.copilot-send { background: #1E553C; color: #fff; border: none; border-radius: 12px; padding: 0 16px; height: 40px; font-weight: 700; cursor: pointer; font-family: var(--sans); font-size: 14px; flex-shrink: 0; }
.copilot-send:hover { background: #155230; transform: translateY(-1px); }
.copilot-send:disabled { opacity: .5; cursor: not-allowed; transform: none; }
/* Copilot chat is owner/admin/dispatcher/superadmin only. Hide for biller and driver. */
.copilot-fab, .copilot-panel { display: none; }
body.role-owner .copilot-fab, body.role-admin .copilot-fab,
body.role-dispatcher .copilot-fab, body.role-superadmin .copilot-fab { display: block; }
/* Never show the assistant FAB on the login/join screen (no authenticated user). */
body.on-login .copilot-fab, body.on-login .copilot-panel { display: none !important; }
body.role-owner .copilot-panel.open, body.role-admin .copilot-panel.open,
body.role-dispatcher .copilot-panel.open, body.role-superadmin .copilot-panel.open { display: flex; }
@media (max-width: 540px) {
  /* Use dynamic viewport height so the input bar stays visible when the iOS keyboard opens.
     bottom:0 + 100vh causes the input to be pushed below the visible viewport on iOS Safari. */
  .copilot-panel { width: 100vw; height: 100dvh; bottom: auto; }
  .copilot-input-bar { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
.ai-mic-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 8px;
  background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0;
  font-size: 11.5px; font-weight: 700; font-family: var(--sans);
  cursor: pointer; transition: background .15s, color .15s, box-shadow .15s, transform .12s;
  letter-spacing: .2px;
}
.ai-mic-btn:hover { background: #e2e8f0; color: #1e293b; }
.ai-mic-btn:active { transform: scale(.97); }
.ai-mic-btn.recording {
  background: #fee2e2; color: #b91c1c; border-color: #fecaca;
  box-shadow: 0 0 0 0 rgba(239,68,68,.5);
  animation: aiMicPulse 1.4s ease-out infinite;
}
@keyframes aiMicPulse {
  0% { box-shadow: 0 0 0 0 rgba(239,68,68,.45); }
  70% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
.dsb-nav { display: flex; flex-direction: column; padding: 4px 14px; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.dsb-section-label {
  font-size: 9px; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 1.2px;
  font-family: var(--mono); padding: 10px 8px 4px;
}
.dsb-nav-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 6px 12px;
  border: none; border-radius: 8px; background: transparent;
  color: #475569; font-size: 14px; font-weight: 500;
  font-family: var(--sans); cursor: pointer; text-align: left;
  transition: background .12s, color .12s; white-space: nowrap;
  flex-shrink: 0;
}
.dsb-nav-item:hover { background: #f1f5f9; color: #0f172a; }
.dsb-nav-item.active { background: #eef2f7; color: #0c1623; font-weight: 700; }
.dsb-nav-item svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.dsb-footer {
  border-top: 1px solid #f1f5f9; padding: 10px 16px;
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.dsb-footer-btn {
  display: flex; align-items: center; gap: 10px;
  flex: 1; min-width: 0; background: none; border: none;
  cursor: pointer; border-radius: 8px; padding: 6px 8px;
  text-align: left; transition: background .12s;
}
.dsb-footer-btn:hover { background: #f1f5f9; }
.dsb-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  background: #0c1623; color: #fff;
  font-size: 12px; font-weight: 800; font-family: var(--sans);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; letter-spacing: .5px;
}
.dsb-footer-name { font-size: 12px; font-weight: 700; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.dsb-footer-role { font-size: 10px; color: #94a3b8; font-family: var(--mono); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.dsb-signout-btn {
  width: 30px; height: 30px; flex-shrink: 0;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 7px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: #94a3b8; transition: all .12s;
}
.dsb-signout-btn:hover { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.dsb-signout-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
/* ── WORKSPACE IDENTITY CHIP (sidebar) ─────────────────────────────── */
.dsb-workspace-chip { padding: 8px 12px; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 10px; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.dsb-workspace-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dsb-workspace-name { font-size: 12px; font-weight: 700; color: #0c1623; font-family: 'Inter', var(--sans); line-height: 1.2; }
.dsb-workspace-role { font-size: 9px; color: #94a3b8; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
/* ── WORKSPACE SWITCHER DROPDOWN ────────────────────────────────────── */
.ws-switcher { position: relative; margin: 10px 12px 2px; flex-shrink: 0; }
.ws-switcher-btn { width: 100%; cursor: default; transition: border-color .15s, background .15s; }
.ws-switcher-btn.clickable { cursor: pointer; }
.ws-switcher-btn.clickable:hover { border-color: #CBD5E1; background: #F1F5F9; }
.ws-switcher-chevron { width: 14px; height: 14px; stroke: #94a3b8; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; margin-left: auto; transition: transform .2s; display: none; }
.ws-switcher-btn.clickable .ws-switcher-chevron { display: block; }
.ws-switcher-btn.open .ws-switcher-chevron { transform: rotate(180deg); }
.ws-dropdown { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.06); z-index: 500; overflow: hidden; display: none; }
.ws-dropdown.open { display: block; }
.ws-dropdown-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; transition: background .1s; border: none; background: none; width: 100%; text-align: left; }
.ws-dropdown-item:hover { background: #F8FAFC; }
.ws-dropdown-item.active-ws { background: #F0FDF4; }
.ws-dropdown-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ws-dropdown-label { min-width: 0; flex: 1; }
.ws-dropdown-name { font-size: 13px; font-weight: 700; color: #0c1623; font-family: 'Inter', var(--sans); white-space: nowrap; display: block; }
.ws-dropdown-sub { font-size: 10px; color: #94a3b8; font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; margin-top: 1px; display: block; }
.ws-dropdown-check { margin-left: auto; flex-shrink: 0; display: none; color: #1E553C; }
.ws-dropdown-item.active-ws .ws-dropdown-check { display: block; }
/* ── WORKSPACE PILL (topbar) ──────────────────────────────────────── */
.topbar-workspace { display: flex; align-items: center; }
.topbar-workspace-name { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.85); font-family: 'Inter', var(--sans); letter-spacing: .04em; padding: 4px 10px; background: rgba(255,255,255,.09); border-radius: 6px; border-left: 2px solid #1E553C; white-space: nowrap; transition: border-color .2s; display: flex; align-items: center; gap: 5px; }
.topbar-workspace-name.clickable { cursor: pointer; }
.topbar-workspace-name.clickable:hover { background: rgba(255,255,255,.16); }
.topbar-ws-chevron { width: 11px; height: 11px; stroke: rgba(255,255,255,.7); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; display: none; transition: transform .2s; }
.topbar-workspace-name.clickable .topbar-ws-chevron { display: block; }
@media (max-width: 700px) { .topbar-workspace { display: none !important; } }

/* ── Mobile workspace pill (topbar left) ──────────────────────── */
.mob-ws-pill { display: none; align-items: center; gap: 8px; background: rgba(255,255,255,.13); border: 1.5px solid rgba(255,255,255,.22); border-radius: 9px; padding: 7px 11px; cursor: pointer; font-family: var(--sans); transition: background .15s, border-color .15s; white-space: nowrap; }
.mob-ws-pill:active, .mob-ws-pill.open { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.38); }
.mob-ws-dot { width: 8px; height: 8px; border-radius: 50%; background: #0ea5e9; flex-shrink: 0; }
.mob-ws-name { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.95); letter-spacing: .01em; }
.mob-ws-chevron { width: 12px; height: 12px; stroke: rgba(255,255,255,.65); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .22s; flex-shrink: 0; }
.mob-ws-pill.open .mob-ws-chevron { transform: rotate(180deg); }

@media (max-width: 1023px) {
  .mob-ws-pill { display: flex; }
  .topbar-brand-logo { display: none; }
}

/* ── Mobile workspace picker sheet ────────────────────────────── */
.mob-ws-dropdown { position: fixed; top: calc(56px + env(safe-area-inset-top, 20px) + 8px); left: 12px; right: 12px; background: #fff; border-radius: 18px; box-shadow: 0 16px 56px rgba(0,0,0,.24), 0 2px 8px rgba(0,0,0,.08); z-index: 198; overflow: hidden; transform: translateY(-10px); opacity: 0; pointer-events: none; transition: transform .22s cubic-bezier(.32,.01,.25,1), opacity .18s; }
.mob-ws-dropdown.open { transform: translateY(0); opacity: 1; pointer-events: all; }
.mob-ws-dropdown-header { padding: 14px 18px 10px; border-bottom: 1px solid #f1f5f9; }
.mob-ws-dropdown-header-label { font-size: 10px; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; font-family: var(--mono); }
.mob-ws-item { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border: none; background: none; width: 100%; text-align: left; cursor: pointer; font-family: var(--sans); transition: background .12s; border-bottom: 1px solid #f1f5f9; }
.mob-ws-item:last-child { border-bottom: none; }
.mob-ws-item:active { background: #f8fafc; }
.mob-ws-item.active-ws { background: #f0fdf4; }
.mob-ws-item-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.mob-ws-item-text { flex: 1; min-width: 0; text-align: left; }
.mob-ws-item-name { font-size: 15px; font-weight: 700; color: #0f172a; }
.mob-ws-item-sub { font-size: 12px; color: #94a3b8; font-family: var(--mono); margin-top: 2px; }
.mob-ws-item-check { width: 18px; height: 18px; stroke: #1E553C; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; display: none; flex-shrink: 0; }
.mob-ws-item.active-ws .mob-ws-item-check { display: block; }
/* ── Desktop responsive overrides ─────────────────────────────── */
@media (min-width: 1024px) {
  #desktop-sidebar { display: flex; }
  .tabs { display: none !important; }
  .topbar { left: var(--sidebar-w); }
  .chat-btn { display: flex !important; }
  /* Main content area: shift right of sidebar, run full height.
     Background is #F8FAFC (Jobber light gray) — white cards then
     float visibly above it. Previously #ffffff caused white-on-white. */
  .tab-content {
    left: var(--sidebar-w) !important;
    bottom: 0 !important;
    background: #F8FAFC !important;
    min-height: calc(100dvh - 56px - env(safe-area-inset-top, 20px));
  }
  /* Force active tabs visible — beats the initial inline style="display:none" */
  .tab-content.active { display: block !important; }
  /* Schedule tabs need flex layout; #id specificity beats .class so this wins */
  #tab-schedule.active      { display: flex !important; }
  #tab-driver-schedule.active { display: flex !important; }
  .god-mode-banner { left: var(--sidebar-w); }
  .topbar-brand { display: none !important; }
  .mobile-settings-btn { display: none !important; }
  .toast-container { left: calc(var(--sidebar-w) + 20px); }
  .fab-container { bottom: 20px; }
  /* Board shell fills full desktop height — height:100% so board-main scroll works */
  .board-shell {
    height: 100%;
    overflow: hidden;
  }
  /* On desktop the nav sidebar replaces the board's own date-picker panel —
     hide it so board-main gets the full remaining width */
  #tab-board .board-sidebar { display: none !important; }
}

/* ── ULTRA-WIDE: 1440px content container centered in available space ── */
@media (min-width: 1700px) {
  .tab-content:not(#tab-board):not(#tab-schedule):not(#tab-driver-schedule) {
    padding-left: max(24px, calc((100% - 1440px) / 2));
    padding-right: max(24px, calc((100% - 1440px) / 2));
  }
  .topbar {
    padding-left: max(24px, calc((100% - 1440px) / 2));
    padding-right: max(24px, calc((100% - 1440px) / 2));
  }
}

/* ── BOARD COMMAND CENTER ─────────────────────────────────────── */
.board-shell { display: flex; margin: -24px; min-height: calc(100vh - 56px); min-height: calc(100dvh - 56px - env(safe-area-inset-top, 20px)); }
.board-sidebar { width: 216px; min-width: 216px; max-width: 216px; background: #ffffff; border-right: 1px solid #e2e8f0; display: flex; flex-direction: column; overflow-y: auto; padding: 18px 14px; flex-shrink: 0; }
.board-main { flex: 1; overflow-y: auto; padding: 24px 24px 96px; min-width: 0; background: #F8FAFC; }
#tab-passengers { padding-bottom: 96px !important; }
#tab-fleet { padding-bottom: 96px !important; }
#tab-all-rides { padding-bottom: 90px !important; }
.board-main { padding-bottom: 96px; }
.sidebar-day-name { font-size: 18px; font-weight: 800; color: #0f172a; line-height: 1.2; }
.sidebar-date-str { font-size: 12px; color: #64748b; font-family: var(--mono); margin-top: 2px; }
.sb-nav-row { display: flex; align-items: center; gap: 4px; margin-top: 12px; background: #ffffff; border: 1px solid #f1f5f9; border-radius: 10px; padding: 6px 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.sb-nav-btn { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; width: 28px; height: 28px; cursor: pointer; font-size: 16px; color: #475569; display: flex; align-items: center; justify-content: center; padding: 0; transition: all .1s; flex-shrink: 0; }
.sb-nav-btn:hover { background: #e9eef4; color: #0f172a; }
.sb-date-input { border: none; background: none; font-family: var(--mono); font-size: 12px; color: #64748b; cursor: pointer; outline: none; flex: 1; min-width: 0; width: 100px; }
.sb-today-btn { background: #1e3a5f; color: white; border: none; border-radius: 4px; padding: 5px 10px; font-size: 11px; font-weight: 700; cursor: pointer; font-family: var(--mono); margin-top: 8px; display: none; width: 100%; letter-spacing: .5px; }
.sidebar-stats { display: flex; flex-direction: column; gap: 6px; margin: 16px 0 14px; }
.sstat-pill { display: flex; align-items: center; padding: 11px 14px; border-radius: 10px; background: #ffffff; border: 1px solid #f1f5f9; border-left: 4px solid #cbd5e1; box-shadow: 0 1px 3px rgba(0,0,0,0.04); transition: box-shadow .18s, transform .15s; cursor: default; }
.sstat-pill:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.09); transform: translateY(-1px); }
.sstat-num { font-size: 24px; font-weight: 700; color: #111827; font-family: var(--sans); min-width: 36px; flex-shrink: 0; line-height: 1; }
.sstat-lbl { font-size: 10px; font-weight: 500; color: #4B5563; text-transform: uppercase; letter-spacing: 0.05em; margin-left: 8px; font-family: var(--sans); }
.sstat-pill.total    { border-left-color: #94a3b8; }
.sstat-pill.pending  { border-left-color: #f59e0b; }
.sstat-pill.enroute  { border-left-color: #3b82f6; }
.sstat-pill.waiting  { border-left-color: #8b5cf6; }
.sstat-pill.complete { border-left-color: #22c55e; }
.sstat-pill.ready    { border-left-color: #f97316; }
.sidebar-section-title { font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; color: #94a3b8; font-family: var(--mono); font-weight: 700; margin: 14px 0 7px; padding-bottom: 5px; border-bottom: 1px solid #f1f5f9; }
.avail-driver-chip { display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 4px; background: #f8fafc; border: 1px solid #e9eef4; margin-bottom: 4px; }
.avail-avatar { width: 24px; height: 24px; border-radius: 3px; font-size: 10px; font-weight: 800; color: white; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avail-name { font-size: 12px; font-weight: 600; color: #334155; line-height: 1.2; }
.avail-van { font-size: 11px; color: #94a3b8; font-family: var(--mono); }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex-shrink: 0; box-shadow: 0 0 0 2px #dcfce7; vertical-align: middle; margin-left: 2px; }
.tl-chip-rt { font-weight: 500; }
.user-inactive { opacity: 0.5; }
.inactive-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; font-family: var(--mono); margin-left: 6px; }
.toggle-active-btn { padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; cursor: pointer; font-family: var(--mono); border: 1px solid; transition: all .1s; white-space: nowrap; }
.toggle-active-btn.is-active { background: #f0fdf4; color: #1E553C; border-color: #86efac; }
.toggle-active-btn.is-active:hover { background: #dcfce7; }
.toggle-active-btn.is-inactive { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.toggle-active-btn.is-inactive:hover { background: #fca5a5; }
/* ── GOD MODE / RBAC ──────────────────────────────────────── */
.god-mode-btn { margin-left: auto; align-self: center; padding: 4px 13px; border-radius: 8px; font-size: 11px; font-weight: 700; cursor: pointer; font-family: var(--mono); border: 1.5px solid #1E553C; background: #f0fdf4; color: #1E553C; transition: all .15s; letter-spacing: .5px; white-space: nowrap; }
.god-mode-btn.active { background: #1E553C; color: #fff; border-color: #124027; box-shadow: 0 0 14px #1E553C60; }
.god-mode-banner { display: none; position: fixed; top: calc(56px + env(safe-area-inset-top, 20px)); left: 0; right: 0; z-index: 190; align-items: center; gap: 12px; padding: 7px 20px; background: #0c1623; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 11px; font-family: var(--sans); font-weight: 600; color: rgba(255,255,255,0.7); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.god-mode-banner.active { display: flex; }
/* Fleet tenant chip in topbar */
.fleet-tenant-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 8px; padding: 4px 10px; white-space: nowrap; cursor: default; }
.fleet-tenant-label { font-size: 7px; font-family: var(--mono); font-weight: 800; color: rgba(255,255,255,.4); letter-spacing: 1.5px; text-transform: uppercase; line-height: 1; }
.fleet-tenant-name { font-size: 10px; font-family: var(--mono); font-weight: 700; color: rgba(255,255,255,.85); letter-spacing: .5px; line-height: 1.2; }
.platform-admin-badge { display: none; align-items: center; gap: 5px; background: linear-gradient(135deg,#1a3a28,#0a2018); border: 1px solid #22c55e55; border-radius: 8px; padding: 4px 10px; font-size: 9px; font-family: var(--sans); font-weight: 800; color: #4ade80; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.platform-admin-badge::before { content: '⬡'; font-size: 11px; }
@media (max-width: 600px) { .fleet-tenant-chip { display: none; } .platform-admin-badge { display: none !important; } }
body.gm-active .tab-content { top: calc(56px + env(safe-area-inset-top, 20px) + 34px); }
@media (max-width: 600px) { body.gm-active .tab-content { padding-top: 10px; } }
.god-mode-tab { display: none !important; }
.god-mode-tab.visible { display: flex !important; }
.rbac-hidden { display: none !important; }
/* ── ROLE BADGE (topbar) ─────────────────────────────────── */
.role-badge { display:inline-flex; align-items:center; padding:3px 9px; border-radius:20px; font-size:12px; font-family:var(--sans); font-weight:700; letter-spacing:0.03em; text-transform:uppercase; white-space:nowrap; border:1px solid transparent; }
/* Same Sequoia palette for the in-row role pills (rb-*). */
.role-badge.rb-superadmin { background:#064E3B; color:#ffffff; border-color:#064E3B; }
.role-badge.rb-owner      { background:#1E553C; color:#ffffff; border-color:#1E553C; }
.role-badge.rb-admin      { background:#ecfdf5; color:#065f46; border-color:#a7f3d0; }
.role-badge.rb-dispatcher { background:#f1f5f9; color:#334155; border-color:#cbd5e1; }
.role-badge.rb-biller     { background:#fefce8; color:#854d0e; border-color:#fde68a; }
.role-badge.rb-driver     { background:#ffffff; color:#475569; border-color:#e2e8f0; }
/* Role badge & OWNER chip on dark header — subtle translucent pill */
.topbar .role-badge,
.topbar .role-badge.rb-superadmin,
.topbar .role-badge.rb-owner,
.topbar .role-badge.rb-admin,
.topbar .role-badge.rb-dispatcher,
.topbar .role-badge.rb-biller,
.topbar .role-badge.rb-driver { background: rgba(255,255,255,.1); color: rgba(255,255,255,.9); border-color: rgba(255,255,255,.22); }
@media (max-width:600px) { .role-badge { display:none; } }
/* ── SUPERADMIN COMPANY SWITCHER ─────────────────────────── */
.sa-banner-right { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.sa-company-label { font-size: 9px; font-family: var(--mono); color: rgba(74,222,128,.7); letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.sa-company-select { background: rgba(255,255,255,.08); border: 1px solid rgba(74,222,128,.35); border-radius: 6px; color: #4ade80; font-family: var(--mono); font-size: 11px; font-weight: 700; padding: 3px 10px 3px 8px; cursor: pointer; outline: none; max-width: 220px; }
.sa-company-select:focus { border-color: rgba(74,222,128,.7); }
.sa-company-select option { background: #0b2417; color: #e2e8f0; }
/* ── COMPANY PROFILE PAGE ────────────────────────────────── */
.cp-card { background: white; border: 1px solid #e2e8f0; border-radius: 14px; padding: 22px 24px; margin-bottom: 16px; }
.cp-card-title { font-size: 13px; font-weight: 600; color: #0c1623; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; gap: 8px; font-family: var(--sans); letter-spacing: -0.1px; }
.cp-field-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.cp-label { font-size: 12px; font-weight: 500; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; font-family: var(--sans); }
.cp-input { background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 11px 14px; font-size: 14px; color: #0f172a; font-family: var(--sans); outline: none; width: 100%; transition: border-color .15s; box-sizing: border-box; }
.cp-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.cp-color-row { display: flex; align-items: center; gap: 10px; }
.cp-color-input { width: 44px; height: 40px; border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 2px; cursor: pointer; flex-shrink: 0; background: none; }
.cp-color-hex { flex: 1; }
.cp-save-btn { background: var(--accent); color: white; border: none; border-radius: 10px; padding: 13px 20px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: var(--sans); transition: filter .15s; width: 100%; margin-top: 4px; }
.cp-save-btn:hover { filter: brightness(.9); }
.cp-save-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── BILLING / FINANCIAL SUITE ───────────────────────────── */
.billing-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; padding: 16px 16px 4px; }
.bsum-card { background: white; border-radius: 12px; padding: 16px 14px; border: 1px solid #f1f5f9; border-left: 4px solid #94a3b8; box-shadow: 0 4px 12px rgba(0,0,0,0.03); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.bsum-card:hover { transform: scale(1.02); box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.bsum-num { font-size: 22px; font-weight: 800; color: #0c1623; font-family: var(--mono); letter-spacing: -0.5px; }
.bsum-label { font-size: 10px; font-family: var(--mono); color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; font-weight: 700; }
.bsum-detail { font-size: 9px; font-family: var(--mono); color: #94a3b8; margin-top: 6px; letter-spacing: .5px; }
.billing-nav-row { display:flex; align-items:stretch; background:#fff; border-bottom:1px solid #e2e8f0; padding:0 12px; }
.billing-subnav { display: flex; flex:1; gap: 0; padding: 0; border-bottom: none; flex-wrap: nowrap; background: transparent; }
.billing-subnav-btn { flex:1; padding:11px 0; border:none; border-bottom:2px solid transparent; border-radius:0; background:transparent; font-size:13px; font-weight:500; color:#94a3b8; cursor:pointer; font-family:var(--sans); transition:all .15s; white-space:nowrap; }
.billing-subnav-btn:hover { color:#0f172a; border-bottom-color:#e2e8f0; background:transparent; }
.billing-subnav-btn.active { color:#1E553C; border-bottom-color:#1E553C; font-weight:700; background:transparent; }
.billing-subnav-btn.new-estimate { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius:8px; color: #15803d; margin-left: auto; flex:none; padding:6px 14px; }
.billing-subnav-btn.new-estimate:hover { background: var(--accent); border-color: var(--accent); color: white; }
#billing-list-area { overflow-y: auto; }
.bqueue-row { display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; border-bottom: 1px solid #f1f5f9; transition: background .1s; }
.bqueue-row:hover { background: #f8fafc; }
.bqueue-patient { font-size: 13px; font-weight: 700; color: #0f172a; }
.bqueue-meta { font-size: 11px; color: #64748b; font-family: var(--mono); margin-top: 1px; }
.bqueue-route { font-size: 11px; color: #94a3b8; font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.bqueue-actions { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.bqueue-est { font-size: 13px; font-weight: 800; color: #0f172a; }
.compliance-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; margin-top: 3px; }
.compliance-dot.ok { background: #22c55e; }
.compliance-dot.warn { background: #f59e0b; }
.compliance-dot.fail { background: #ef4444; }
.pay-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 10px; font-size: 9px; font-weight: 800; font-family: var(--mono); letter-spacing: .5px; text-transform: uppercase; border: 1px solid transparent; }
.pay-badge.unbilled { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.pay-badge.sent, .pay-badge.invoiced { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.pay-badge.paid { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.pay-badge.overdue { background: #fff7ed; color: #c2410c; border-color: #fdba74; }
.pay-badge.void { background: #f8fafc; color: #94a3b8; border-color: #e2e8f0; }
.pay-badge.disputed { background: #fdf2f8; color: #9d174d; border-color: #fbcfe8; }
.pay-badge.qb_batch { background: #fefce8; color: #854d0e; border-color: #fde68a; }
.inv-card { background: white; border-radius: 12px; border: 1px solid #e2e8f0; padding: 14px 16px; margin: 10px 16px 0; transition: box-shadow .15s; }
.inv-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.07); }
.inv-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.inv-num { font-size: 11px; font-family: var(--mono); font-weight: 700; color: #94a3b8; }
.inv-amount { font-size: 18px; font-weight: 900; color: #0f172a; font-family: var(--mono); }
.inv-patient { font-size: 13px; font-weight: 700; color: #0f172a; }
.inv-meta { font-size: 11px; color: #94a3b8; font-family: var(--mono); margin-top: 2px; }
.inv-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.btn-xs { background: white; border: 1px solid #e2e8f0; border-radius: 6px; padding: 4px 10px; font-size: 11px; font-weight: 600; cursor: pointer; color: #475569; font-family: var(--sans); white-space: nowrap; transition: all .12s; }
.btn-xs:hover { border-color: #94a3b8; color: #0f172a; }
.btn-xs.primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-xs.primary:hover { filter: brightness(.9); }
.btn-xs.danger { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.btn-xs.danger:hover { background: #fecdd3; }
.est-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 700; display: flex; align-items: center; justify-content: center; padding: 20px; }
.est-sheet { background: white; border-radius: 18px; width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.est-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 0; }
.est-title { font-size: 17px; font-weight: 800; color: #0f172a; }
.est-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #94a3b8; padding: 4px; }
.est-body { padding: 16px 20px; }
.est-breakdown { background: #f8fafc; border-radius: 12px; padding: 14px 16px; margin: 14px 0; }
.est-row { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.est-row:last-child { border-bottom: none; }
.est-row.total { padding: 10px 0 4px; }
.est-label { color: #64748b; }
.est-value { font-weight: 700; color: #0f172a; }
.est-total-val { font-size: 22px; font-weight: 900; color: var(--accent); font-family: var(--mono); }
.billing-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.billing-settings-grid .setting-row { background: white; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; }
.billing-settings-grid .setting-row label { font-size: 11px; font-weight: 700; color: #64748b; display: block; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.billing-settings-grid .setting-row input { width: 100%; font-size: 16px; font-weight: 800; color: #0f172a; border: none; outline: none; font-family: var(--mono); background: transparent; }
.integ-page { max-width: 640px; margin: 0 auto; padding: 20px 16px 40px; }
.integ-page-title { font-size: 22px; font-weight: 800; color: #0f172a; margin-bottom: 4px; }
.integ-page-sub { font-size: 13px; color: #64748b; font-family: var(--mono); margin-bottom: 24px; }
.integ-card { background: white; border: 1px solid #e2e8f0; border-radius: 14px; padding: 22px 24px; margin-bottom: 16px; }
.integ-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f1f5f9; }
.integ-card-title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; color: #0f172a; }
.integ-card-logo { width: 32px; height: 32px; border-radius: 8px; background: #635bff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.integ-status-badge { font-size: 10px; font-weight: 800; font-family: var(--mono); letter-spacing: 1px; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; }
.integ-status-badge.disconnected { background: #f1f5f9; color: #64748b; border: 1.5px solid #e2e8f0; }
.integ-status-badge.connected { background: #f0fdf4; color: #15803d; border: 1.5px solid #bbf7d0; }
.integ-field-label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px; display: block; }
.integ-field { width: 100%; padding: 10px 12px; border: 1.5px solid #e2e8f0; border-radius: 8px; font-size: 13px; font-family: var(--mono); outline: none; background: white; transition: border-color .15s; margin-bottom: 12px; }
.integ-field:focus { border-color: #635bff; }
.integ-field.has-value { border-color: #bbf7d0; background: #f0fdf4; }
.integ-save-btn { background: #635bff; color: white; border: none; border-radius: 8px; padding: 10px 20px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); transition: filter .15s; }
.integ-save-btn:hover { filter: brightness(.9); }
.integ-save-msg { font-size: 12px; font-family: var(--mono); color: var(--accent); margin-top: 8px; min-height: 16px; }
.integ-coming-card { background: #f8fafc; border: 1.5px dashed #e2e8f0; border-radius: 14px; padding: 20px 24px; margin-bottom: 12px; display: flex; align-items: center; gap: 14px; opacity: .7; }
.integ-coming-icon { width: 36px; height: 36px; border-radius: 10px; background: #e2e8f0; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.integ-coming-label { font-size: 13px; font-weight: 700; color: #475569; }
.integ-coming-tag { font-size: 10px; font-family: var(--mono); color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.est-paylink-btn { background: linear-gradient(135deg, #635bff, #4f46e5); color: white; border: none; border-radius: 10px; padding: 12px 20px; font-size: 13px; font-weight: 800; cursor: pointer; font-family: var(--sans); width: 100%; margin-top: 8px; transition: filter .15s; letter-spacing: .3px; }
.est-paylink-btn:hover { filter: brightness(.9); }
/* ── Leads Pipeline Tab ──────────────────────────────────────────────────── */
.leads-filter-strip { display: flex; gap: 6px; flex-wrap: wrap; }
.leads-filter-btn { background: #f1f5f9; color: #475569; border: 1.5px solid #e2e8f0; border-radius: 20px; padding: 5px 14px; font-size: 11px; font-weight: 700; font-family: var(--mono); cursor: pointer; transition: all .15s; text-transform: uppercase; letter-spacing: .5px; }
.leads-filter-btn.active { background: #0f172a; color: white; border-color: #0f172a; }
.leads-webhook-btn { background: #f1f5f9; color: #334155; border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 9px 14px; font-size: 12px; font-weight: 700; font-family: var(--sans); cursor: pointer; transition: all .14s; display: flex; align-items: center; gap: 6px; }
.leads-webhook-btn:hover { background: #e2e8f0; }
.leads-webhook-panel { background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.leads-table-wrap { background: #fff; border: 1px solid #e8edf2; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.leads-tbl { width: 100%; border-collapse: collapse; }
.leads-tbl th { padding: 11px 14px; font-family: var(--mono); font-size: 11px; color: #475569; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; background: #f8fafc; border-bottom: 1px solid #e8edf2; text-align: left; white-space: nowrap; }
.leads-tbl td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.leads-tbl tr:last-child td { border-bottom: none; }
.leads-tbl tr:hover td { background: #fafcfe; }
.lead-status-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; font-family: var(--mono); letter-spacing: .2px; white-space: nowrap; }
.ls-new       { background: #dbeafe; color: #1e40af; }
.ls-contacted { background: #fef3c7; color: #92400e; }
.ls-quoted    { background: #ede9fe; color: #5b21b6; }
.ls-converted { background: #dcfce7; color: #15803d; }
.ls-dead      { background: #f1f5f9; color: #94a3b8; }
.lead-src-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; font-family: var(--mono); white-space: nowrap; }
.lsrc-web    { background: #dcfce7; color: #15803d; }
.lsrc-google { background: #dbeafe; color: #1d4ed8; }
.lsrc-phone  { background: #fef3c7; color: #b45309; }
.lsrc-manual { background: #f1f5f9; color: #475569; }
.lead-type-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; font-family: var(--mono); white-space: nowrap; }
.lt-quote   { background: #fef3c7; color: #92400e; }
.lt-booking { background: #d1fae5; color: #065f46; }
/* Approve modal */
.approve-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 900; align-items: center; justify-content: center; padding: 16px; }
.approve-modal-overlay.open { display: flex; }
.approve-modal { background: white; border-radius: 18px; width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.approve-modal-header { padding: 20px 24px 0; display: flex; align-items: flex-start; justify-content: space-between; }
.approve-modal-title { font-size: 18px; font-weight: 800; color: #0f172a; }
.approve-modal-sub { font-size: 12px; color: #64748b; font-family: var(--mono); margin-top: 2px; }
.approve-modal-close { background: #f1f5f9; border: none; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.approve-modal-body { padding: 16px 24px 24px; }
.approve-section-label { font-size: 10px; font-weight: 800; color: #94a3b8; font-family: var(--mono); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; margin-top: 16px; }
.approve-trip-card { background: #f8fafc; border-radius: 10px; padding: 12px 14px; margin-bottom: 4px; }
.approve-field-row { display: flex; gap: 10px; margin-bottom: 10px; }
.approve-field { flex: 1; }
.approve-field label { font-size: 11px; font-weight: 700; color: #64748b; display: block; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .4px; }
.approve-field input, .approve-field select, .approve-field textarea { width: 100%; padding: 9px 11px; border: 1.5px solid #e2e8f0; border-radius: 8px; font-size: 13px; font-family: var(--sans); outline: none; background: white; }
.approve-field input:focus, .approve-field select:focus, .approve-field textarea:focus { border-color: var(--accent); }
.approve-price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.approve-price-input-wrap { position: relative; }
.approve-price-input-wrap span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #64748b; font-weight: 700; font-size: 14px; }
.approve-price-input-wrap input { padding-left: 22px; font-size: 15px; font-weight: 700; font-family: var(--mono); }
.approve-total-bar { background: #0f172a; color: white; border-radius: 10px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.approve-total-label { font-size: 11px; font-family: var(--mono); opacity: .7; }
.approve-total-amount { font-size: 22px; font-weight: 900; font-family: var(--mono); }
.approve-submit-btn { background: var(--accent); color: white; border: none; border-radius: 10px; padding: 13px 20px; font-size: 14px; font-weight: 800; cursor: pointer; font-family: var(--sans); width: 100%; letter-spacing: .3px; margin-bottom: 8px; }
.approve-submit-btn:hover { background: #166534; }
.approve-submit-btn:disabled { background: #94a3b8; cursor: default; }
.approve-cancel-btn { background: white; color: #64748b; border: 1px solid #e2e8f0; border-radius: 10px; padding: 11px 20px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); width: 100%; }
/* Add Lead modal */
.add-lead-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 900; align-items: center; justify-content: center; padding: 16px; }
.add-lead-overlay.open { display: flex; }
/* Legacy revenue hero — element replaced by .billing-hero */
.bsum-revenue-hero { display:none; }
.bsum-revenue-label { font-size: 10px; font-family: var(--mono); color: #64748b; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 4px; }
.bsum-revenue-amount { font-size: 48px; font-weight: 900; color: #0c1623; font-family: var(--mono); letter-spacing: -2px; line-height: 1; }
.bsum-revenue-sub { font-size: 11px; color: #94a3b8; font-family: var(--mono); margin-top: 4px; }
.bsum-revenue-right { text-align: right; flex-shrink: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
/* Billing hero — dark green gradient header */
.billing-hero { background: linear-gradient(135deg, #0f4c2a 0%, #1E553C 100%); padding: 16px 16px 14px; border-radius: 14px; margin: 10px 12px 0; overflow: hidden; }
.billing-hero-top { display:flex; align-items:flex-start; justify-content:space-between; }
.billing-hero-lbl { font-size:9px; font-weight:700; color:#a7f3d0; letter-spacing:.08em; text-transform:uppercase; margin-bottom:4px; font-family:var(--mono); }
.billing-hero-amt { font-size:26px; font-weight:900; color:#fff; font-family:var(--mono); letter-spacing:-1px; line-height:1; }
.billing-hero-sub { font-size:10px; color:#6ee7b7; margin-top:4px; font-family:var(--mono); }
.billing-hero-stats { display:flex; gap:6px; margin-top:14px; }
.bsum-badge { flex:1; text-align:center; background:rgba(255,255,255,.1); border-radius:8px; padding:8px 4px; cursor:pointer; transition:background .15s; }
.bsum-badge:hover { background:rgba(255,255,255,.2); }
.bsum-badge .bsum-num { font-size:18px; font-weight:800; color:#fff; line-height:1; margin-bottom:0; }
.bsum-badge .bsum-label { font-size:8px; color:rgba(255,255,255,.65); margin-top:3px; margin-bottom:0; }
.bsum-badge.invoiced .bsum-num { color:#93c5fd; }
.bsum-badge.overdue .bsum-num { color:#fbbf24; }
.bsum-badge.disputed .bsum-num { color:#f87171; }
.bsum-badge.paid .bsum-num { color:#4ade80; }
/* Date bar */
.billing-date-bar { display:flex;align-items:center;gap:10px;padding:10px 16px 6px;border-bottom:1px solid #f1f5f9; }
.bdb-nav { background:none;border:1px solid #e2e8f0;border-radius:8px;width:28px;height:28px;font-size:18px;line-height:1;cursor:pointer;color:#0f172a;display:flex;align-items:center;justify-content:center;transition:all .15s; }
.bdb-nav:hover { border-color:#1E553C;color:#1E553C; }
.bdb-label { font-size:14px;font-weight:800;color:#0f172a;font-family:var(--mono);min-width:90px;text-align:center; }
/* Period filter — segmented control inside billing-nav-row */
.billing-period-filters { display:flex;align-items:center;background:#f1f5f9;border-radius:8px;padding:3px;gap:2px;margin:8px 0 8px 10px;flex-shrink:0; }
.bpf-btn { background:transparent;border:none;border-radius:6px;padding:4px 9px;font-size:10px;font-weight:600;color:#94a3b8;cursor:pointer;font-family:var(--sans);transition:all .15s;letter-spacing:0;text-transform:none;box-shadow:none; }
.bpf-btn:hover { color:#0f172a;background:transparent; }
.bpf-btn.active { background:#fff;color:#0f172a;box-shadow:0 1px 3px rgba(0,0,0,.1);border:none; }
/* Invoice status filter row */
.billing-status-filters { display:flex;gap:6px;padding:8px 12px;background:#fff;border-bottom:1px solid #e2e8f0;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none; }
.billing-status-filters::-webkit-scrollbar { display:none; }
.bsf-btn { flex-shrink:0;padding:4px 12px;border-radius:16px;border:1.5px solid #e2e8f0;background:#fff;color:#64748b;font-size:11px;font-weight:600;cursor:pointer;transition:all .15s;font-family:var(--sans);white-space:nowrap; }
.bsf-btn:hover { border-color:#1E553C;color:#1E553C; }
.bsf-btn.active { border-color:#1E553C;background:#f0fdf4;color:#1E553C; }
.bdb-sync-note { font-size:10px;color:#94a3b8;font-family:var(--mono);letter-spacing:.4px;text-transform:uppercase;margin-left:4px; }
.bqueue-section-header { display: flex; align-items: center; gap: 8px; padding: 10px 16px 6px; font-size: 10px; font-weight: 800; color: #94a3b8; font-family: var(--mono); text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid #f1f5f9; margin-top: 4px; }
.bqueue-section-header.clean { color: #16a34a; }
.bqueue-section-header.incomplete { color: #d97706; }
/* ── Billing skeleton loader ──────────────────────────────── */
.bq-skel-wrap { padding: 8px 0; }
.bq-skel-row { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid #f1f5f9; }
.bq-skel-dot { width: 10px; height: 10px; border-radius: 50%; background: #e2e8f0; flex-shrink: 0; animation: bq-pulse 1.5s ease-in-out infinite; }
.bq-skel-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.bq-skel-line { height: 10px; border-radius: 5px; background: #e2e8f0; animation: bq-pulse 1.5s ease-in-out infinite; }
.bq-skel-line.wide  { width: 65%; }
.bq-skel-line.med   { width: 45%; }
.bq-skel-line.short { width: 30%; }
.bq-skel-line.l2 { animation-delay: .15s; }
.bq-skel-line.l3 { animation-delay: .30s; }
.bq-skel-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; align-items: flex-end; }
.bq-skel-btn { width: 60px; height: 26px; border-radius: 8px; background: #e2e8f0; animation: bq-pulse 1.5s ease-in-out infinite; }
.bq-skel-btn.l2 { animation-delay: .1s; }
.bq-skel-btn.l3 { animation-delay: .2s; }
@keyframes bq-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .38; } }
.board-estimate-btn { background: #f0fdf4; border: 1.5px solid #bbf7d0; border-radius: 8px; color: #1E553C; font-size: 13px; font-weight: 700; padding: 7px 14px; cursor: pointer; font-family: var(--sans); transition: all .15s; white-space: nowrap; }
.board-estimate-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }
.est-section-label { font-size: 10px; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; font-family: var(--mono); margin-bottom: 6px; display: block; }
.est-input { width: 100%; padding: 10px 12px; border: 1.5px solid #e2e8f0; border-radius: 8px; font-size: 13px; font-family: var(--sans); outline: none; background: white; transition: border-color .15s; }
.est-input:focus { border-color: var(--accent); }
.est-book-btn { background: var(--accent); color: white; border: none; border-radius: 10px; padding: 13px 20px; font-size: 14px; font-weight: 800; cursor: pointer; font-family: var(--sans); width: 100%; margin-top: 4px; transition: filter .15s; }
.est-book-btn:hover { filter: brightness(.9); }
.cp-save-msg { font-size: 12px; font-family: var(--mono); text-align: center; margin-top: 8px; min-height: 18px; color: var(--accent); }
.cp-logo-preview-wrap { margin-top: 8px; display: none; }
.cp-logo-preview { max-height: 52px; max-width: 200px; border-radius: 8px; border: 1px solid #e2e8f0; object-fit: contain; padding: 6px; background: white; }
.cp-preview-block { background: linear-gradient(135deg, #0a0f1a 0%, #1a2335 100%); border-radius: 12px; padding: 18px 20px; display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.cp-preview-logo { height: 32px; object-fit: contain; }
.cp-preview-name { font-size: 16px; font-weight: 900; color: white; letter-spacing: 1px; font-family: var(--sans); }
.cp-preview-tagline { font-size: 9px; color: rgba(255,255,255,.45); font-family: var(--mono); letter-spacing: 2px; text-transform: uppercase; margin-top: 2px; }
/* ── MOBILE NAV ICONS ─────────────────────────────────── */
.tab svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
button.tab { -webkit-appearance: none; appearance: none; outline: none; }
/* Mobile topbar settings gear */
.mobile-settings-btn { background: none; border: none; cursor: pointer; color: rgba(255,255,255,.8); padding: 4px; border-radius: 8px; width: 36px; height: 36px; align-items: center; justify-content: center; transition: background .15s; }
.mobile-settings-btn:hover { background: rgba(255,255,255,.12); color: #ffffff; }
.mobile-settings-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Mobile settings dropdown */
.mobile-settings-sheet { position: fixed; top: 60px; right: 12px; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 16px; box-shadow: 0 8px 32px #00000018; z-index: 260; padding: 14px; min-width: 210px; display: none; flex-direction: column; gap: 10px; }
.mobile-settings-sheet.open { display: flex; }
.msettings-name { font-size: 15px; font-weight: 700; color: #0f172a; text-align: center; padding: 2px 0 4px; }
.msettings-role { font-family: var(--mono); font-size: 10px; color: #475569; background: #f1f5f9; padding: 4px 12px; border-radius: 20px; border: 1px solid #dde3ea; text-align: center; letter-spacing: .5px; font-weight: 700; }
.msettings-divider { height: 1px; background: #f1f5f9; }
.msettings-signout { background: #fee2e2; border: 1px solid #fca5a5; color: #dc2626; padding: 10px 16px; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 700; font-family: var(--sans); transition: all .15s; width: 100%; }
.msettings-signout:hover { background: #dc2626; color: white; border-color: #dc2626; }
.msettings-godmode { background: #fffbeb; border: 1.5px solid #f59e0b; color: #b45309; padding: 10px 16px; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 700; font-family: var(--mono); transition: all .15s; width: 100%; }
.msettings-godmode:hover { background: #fde68a; }
.msettings-godmode.active { background: #f59e0b; color: #fff; border-color: #d97706; }
/* Fleet view */
.fleet-card { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.fleet-avatar { width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; color: white; flex-shrink: 0; }
.fleet-driver-name { font-size: 15px; font-weight: 700; color: #0f172a; }
.fleet-van { font-size: 12px; color: #64748b; font-family: var(--mono); margin-top: 2px; }
.fleet-rides { margin-left: auto; text-align: right; flex-shrink: 0; }
.fleet-ride-count { font-size: 26px; font-weight: 800; color: #1E293B; font-family: var(--mono); line-height: 1; }
.fleet-ride-label { font-size: 10px; color: #94a3b8; font-family: var(--mono); margin-top: 2px; font-weight: 600; }
/* Driver settings tab — two-pane desktop layout */
.dsettings-avatar { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; color: white; background: #1E293B; margin: 0 auto; border: 3px solid #1E293B; box-shadow: 0 4px 16px rgba(30,41,59,0.22); }
.dsettings-role-badge { font-family: var(--mono); font-size: 10px; color: #475569; background: #f1f5f9; padding: 3px 12px; border-radius: 20px; border: 1px solid #dde3ea; display: inline-block; margin-top: 6px; letter-spacing: .5px; font-weight: 700; }
/* Two-pane wrapper */
.us-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 20px; max-width: 1000px; margin: 0 auto; align-items: start; padding: 4px 0 40px; }
/* Left nav pane */
.us-nav { background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.05); overflow: hidden; position: sticky; top: 16px; }
.us-nav-avatar-block { padding: 24px 20px 18px; border-bottom: 1px solid #f1f5f9; text-align: center; }
.us-nav-name { font-size: 14px; font-weight: 800; color: #0c1623; margin-top: 10px; line-height: 1.3; }
.us-nav-links { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.us-nav-btn { width: 100%; text-align: left; background: transparent; border: none; border-radius: 8px; padding: 10px 12px; font-size: 13px; font-weight: 600; color: #475569; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: background .12s, color .12s; font-family: var(--sans); }
.us-nav-btn:hover:not(.active) { background: #f8fafc; color: #0c1623; }
.us-nav-btn.active { background: #ECFDF5; color: #1E553C; font-weight: 700; }
.us-signout-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; background: transparent; color: #64748b; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 14px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--sans); transition: background .12s, color .12s, border-color .12s; }
.us-signout-btn:hover { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
/* Right content pane */
.us-content { background: #fff; border: 1px solid #E2E8F0; border-radius: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.05); padding: 32px 36px; min-height: 420px; }
.us-section { display: none; }
.us-section.active { display: block; animation: fadeIn .18s ease-out; }
.us-section-title { font-size: 19px; font-weight: 800; color: #0c1623; letter-spacing: -.3px; margin-bottom: 4px; }
.us-section-sub { font-size: 12px; color: #94a3b8; font-family: var(--mono); margin-bottom: 28px; }
.us-field-group { display: flex; flex-direction: column; gap: 20px; }
.us-field { display: flex; flex-direction: column; gap: 7px; }
.us-field-label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); }
.us-info-rows { display: flex; flex-direction: column; gap: 8px; }
.us-info-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-radius: 8px; background: #f8fafc; border: 1px solid #f1f5f9; }
.us-info-label { font-size: 13px; font-weight: 600; color: #334155; display: flex; align-items: center; gap: 9px; }
.us-info-val { font-size: 13px; color: #1E553C; font-family: var(--mono); font-weight: 700; }
.us-save-btn { margin-top: 28px; background: #1E553C; color: #fff; border: none; border-radius: 8px; padding: 12px 28px; font-size: 14px; font-weight: 700; font-family: var(--sans); cursor: pointer; transition: background .15s; letter-spacing: .2px; }
.us-save-btn:hover { background: #064E3B; }
.us-save-btn:disabled { opacity: .5; cursor: not-allowed; }
/* Mobile: stack the panes vertically */
@media (max-width: 720px) {
  .us-wrap { grid-template-columns: 1fr; }
  .us-nav { position: static; }
  .us-content { padding: 24px 20px; }
}

/* ── CRM TAB ─────────────────────────────────────────────────── */
.crm-page { width: 100%; padding-bottom: 48px; }
.crm-header { display: flex; flex-direction: column; margin-bottom: 20px; gap: 10px; }
.crm-header-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.crm-page-title { font-size: 22px; font-weight: 800; color: #0f172a; font-family: var(--sans); }
.crm-page-sub { font-size: 12px; color: #64748b; font-family: var(--mono); margin-top: 2px; }
.crm-add-btn { background: #1E553C; color: white; border: none; border-radius: 10px; padding: 10px 18px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); display: flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; box-shadow: 0 2px 8px rgba(30,85,60,.25); transition: background .15s; }
.crm-add-btn:hover { background: #154d2e; }
.crm-add-btn-mobile { display: none; }
/* Header controls row */
.crm-header-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crm-search-wrap { position: relative; }
.crm-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.crm-search-input { background: #fff; border: 1.5px solid #e2e8f0; border-radius: 9px; padding: 8px 12px 8px 32px; font-size: 13px; font-family: var(--sans); font-weight: 500; color: #0a1628; width: 200px; outline: none; transition: border-color .15s; }
.crm-search-input::placeholder { color: #94a3b8; font-weight: 400; }
.crm-search-input:focus { border-color: #1E553C; }
.crm-type-select { background: #fff; border: 1.5px solid #e2e8f0; border-radius: 9px; padding: 8px 12px; font-size: 12px; font-family: var(--sans); font-weight: 600; color: #0a1628; cursor: pointer; outline: none; transition: border-color .15s; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.crm-type-select:focus { border-color: #1E553C; }
/* Metrics cards — 4 columns desktop, 2×2 mobile */
.crm-metrics-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 20px; align-items: stretch; }
@media (max-width: 640px) {
  .crm-metrics-row { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .crm-add-btn-mobile { display: flex; }
  .crm-add-btn-desktop { display: none !important; }
  .crm-search-input { width: 100%; min-width: 0; }
  .crm-search-wrap { flex: 1; min-width: 0; }
  .crm-header-controls { width: 100%; }
}
.crm-metric-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.04); cursor: pointer; display: flex; flex-direction: column; min-height: 110px; transition: box-shadow .15s, transform .12s; user-select: none; }
.crm-metric-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); transform: translateY(-2px); }
.crm-metric-card:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.crm-metric-card.crm-metric-danger { border-color: #fecaca; background: #fff5f5; }
.crm-metric-val { font-size: 28px; font-weight: 900; color: #0a1628; font-family: var(--sans); line-height: 1; letter-spacing: -.5px; }
.crm-metric-val-danger { color: #dc2626; }
.crm-metric-label { font-size: 10px; font-weight: 700; color: #64748b; font-family: var(--sans); text-transform: uppercase; letter-spacing: .8px; margin-top: 5px; }
.crm-metric-sub { font-size: 11px; color: #94a3b8; font-family: var(--mono); margin-top: 3px; flex: 1; }
.crm-metric-tap-hint { font-size: 9px; color: #cbd5e1; font-family: var(--mono); margin-top: 8px; text-transform: uppercase; letter-spacing: .6px; }
/* KPI detail drawer */
.crm-kpi-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9998; opacity: 0; pointer-events: none; transition: opacity .25s; }
.crm-kpi-overlay.open { opacity: 1; pointer-events: all; }
.crm-kpi-drawer { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(110%); width: min(480px,100vw); background: #fff; border-radius: 22px 22px 0 0; box-shadow: 0 -8px 40px rgba(0,0,0,.18); z-index: 9999; padding: 0 24px 36px; transition: transform .3s cubic-bezier(.32,1,.28,1); }
.crm-kpi-drawer.open { transform: translateX(-50%) translateY(0); }
.crm-kpi-drawer-handle { width: 40px; height: 4px; background: #e2e8f0; border-radius: 99px; margin: 14px auto 22px; }
.crm-kpi-drawer-icon { font-size: 32px; margin-bottom: 6px; }
.crm-kpi-drawer-title { font-size: 20px; font-weight: 800; color: #0a1628; margin-bottom: 4px; }
.crm-kpi-drawer-sub { font-size: 12px; color: #94a3b8; font-family: var(--mono); margin-bottom: 20px; }
.crm-kpi-drawer-bignum { font-size: 48px; font-weight: 900; color: #0a1628; line-height: 1; letter-spacing: -2px; margin-bottom: 18px; }
.crm-kpi-drawer-bignum span { font-size: 18px; font-weight: 600; color: #94a3b8; letter-spacing: 0; }
.crm-kpi-drawer-stat { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid #f1f5f9; }
.crm-kpi-drawer-stat:last-child { border-bottom: none; }
.crm-kpi-drawer-stat-label { font-size: 13px; color: #475569; font-family: var(--sans); }
.crm-kpi-drawer-stat-val { font-size: 14px; font-weight: 800; color: #0a1628; font-family: var(--sans); }
.crm-kpi-drawer-tip { margin-top: 18px; background: #f8fafc; border-radius: 10px; padding: 12px 14px; font-size: 12px; color: #64748b; font-family: var(--mono); line-height: 1.5; }
/* ── Client Rate Tables Drawer ───────────────────────────────────────────── */
.cr-drawer-overlay { position:fixed;inset:0;background:rgba(10,22,40,.55);z-index:9996;opacity:0;pointer-events:none;transition:opacity .25s; }
.cr-drawer-overlay.open { opacity:1;pointer-events:all; }
.cr-drawer { position:fixed;top:0;right:0;bottom:0;width:min(700px,100vw);background:#fff;z-index:9997;transform:translateX(110%);transition:transform .32s cubic-bezier(.32,1,.28,1);box-shadow:-8px 0 48px rgba(0,0,0,.18);display:flex;flex-direction:column; }
.cr-drawer.open { transform:translateX(0); }
.cr-drawer-header { background:#111827;padding:20px 24px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-shrink:0; }
.cr-drawer-title { font-size:18px;font-weight:800;color:#fff;letter-spacing:-.3px;font-family:'Inter',var(--sans); }
.cr-drawer-sub { font-size:11px;color:#9ca3af;font-family:var(--mono);margin-top:4px;letter-spacing:.3px; }
.cr-drawer-close { background:rgba(255,255,255,.12);border:none;color:#fff;width:32px;height:32px;border-radius:8px;font-size:18px;line-height:1;cursor:pointer;flex-shrink:0;transition:background .15s; }
.cr-drawer-close:hover { background:rgba(255,255,255,.22); }
.cr-drawer-body { flex:1;overflow-y:auto;padding:28px 24px; }
.cr-section-title { font-size:11px;font-weight:800;color:#111827;font-family:'Inter',var(--sans);text-transform:uppercase;letter-spacing:.9px;margin-bottom:12px;padding-bottom:8px;border-bottom:2px solid #111827; }
.cr-rate-table { width:100%;border-collapse:collapse;margin-bottom:28px;font-family:'Inter',var(--sans); }
.cr-rate-table thead tr { background:#111827; }
.cr-rate-table th { padding:11px 16px;font-size:10px;font-weight:700;color:#9ca3af;font-family:'Inter',var(--sans);text-transform:uppercase;letter-spacing:.7px;text-align:left;border:none; }
.cr-rate-table th:first-child { color:#fff;border-right:1px solid rgba(255,255,255,.08); }
.cr-rate-table tbody tr { border-bottom:1px solid #e5e7eb; }
.cr-rate-table tbody tr:last-child { border-bottom:none; }
.cr-rate-table td { padding:12px 16px;vertical-align:middle;border-right:1px solid #e5e7eb; }
.cr-rate-table td:last-child { border-right:none; }
.cr-rate-table td:first-child { font-size:13px;font-weight:600;color:#111827;background:#f9fafb;width:40%;border-right:1px solid #e5e7eb; }
.cr-rate-table-wrap { border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;margin-bottom:28px; }
.cr-rate-input { width:100%;border:1.5px solid #e5e7eb;border-radius:7px;padding:8px 12px;font-size:14px;font-weight:700;font-family:'Inter',var(--mono);color:#111827;text-align:right;outline:none;transition:border-color .15s;background:#fff; }
.cr-rate-input:focus { border-color:#1E553C;box-shadow:0 0 0 3px rgba(30,85,60,.08); }
/* Supplemental fee table (categorized) */
.cr-supp-table { width:100%;border-collapse:collapse;font-family:'Inter',var(--sans); }
.cr-supp-table-wrap { border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;margin-bottom:28px; }
.cr-supp-cat-row td { background:#111827;color:#9ca3af;font-size:10px;font-weight:700;letter-spacing:.8px;text-transform:uppercase;padding:8px 16px;font-family:'Inter',var(--sans); }
.cr-supp-cat-row td:last-child { color:#4b5563;font-size:9px;letter-spacing:.4px;text-align:right; }
.cr-supp-fee-row { border-bottom:1px solid #e5e7eb; }
.cr-supp-fee-row:last-child { border-bottom:none; }
.cr-supp-fee-row td { padding:10px 16px;vertical-align:middle; }
.cr-supp-fee-row td:first-child { font-size:13px;color:#374151;font-weight:500;background:#f9fafb;border-right:1px solid #e5e7eb;width:65%; }
.cr-supp-input { width:100%;border:1.5px solid #e5e7eb;border-radius:7px;padding:7px 12px;font-size:14px;font-weight:700;font-family:'Inter',var(--mono);color:#111827;text-align:right;outline:none;transition:border-color .15s;background:#fff; }
.cr-supp-input:focus { border-color:#1E553C;box-shadow:0 0 0 3px rgba(30,85,60,.08); }
.cr-drawer-footer { padding:16px 24px;border-top:1px solid #e5e7eb;background:#f9fafb;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0; }
.cr-save-btn { background:#1E553C;color:#fff;border:none;border-radius:10px;padding:12px 28px;font-size:14px;font-weight:700;font-family:'Inter',var(--sans);cursor:pointer;transition:background .15s;letter-spacing:.1px; }
.cr-save-btn:hover { background:#154d2e; }
.cr-save-msg { font-size:12px;color:#1E553C;font-family:var(--mono);font-weight:700; }
.cr-formula-note { background:#f0fdf4;border:1px solid #bbf7d0;border-radius:10px;padding:12px 16px;font-size:12px;color:#15803d;font-family:'Inter',var(--sans);line-height:1.6;margin-bottom:24px; }
.cr-formula-note strong { font-weight:800; }
/* Client rates active banner in estimate modal */
.est-cr-banner { background:#f0fdf4;border:1.5px solid #86efac;border-radius:10px;padding:10px 14px;display:none;align-items:center;gap:8px;font-size:12px;font-weight:700;color:#15803d;font-family:var(--sans);margin-bottom:14px; }
.est-cr-banner.visible { display:flex; }
.est-supp-row { padding:14px 0 0; }
.est-supp-title { font-size:10px;font-weight:800;color:#475569;font-family:var(--mono);text-transform:uppercase;letter-spacing:.6px;margin-bottom:10px; }
.est-supp-grid { display:grid;grid-template-columns:repeat(2,1fr);gap:6px; }
.est-supp-item { display:flex;align-items:center;gap:8px;padding:7px 10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;cursor:pointer;transition:background .12s; }
.est-supp-item:hover { background:#f0fdf4; }
.est-supp-item input { accent-color:#1E553C;width:14px;height:14px;flex-shrink:0;cursor:pointer; }
.est-supp-item-label { font-size:12px;font-weight:600;color:#334155;flex:1;font-family:var(--sans); }
.est-supp-item-amt { font-size:12px;font-weight:800;color:#1E553C;font-family:var(--mono); }
/* Pipeline bar */
.crm-pipeline-bar { display: flex; gap: 0; margin-bottom: 18px; height: 5px; border-radius: 999px; overflow: hidden; background: #e2e8f0; }
.crm-pipeline-seg { height: 100%; transition: width .4s; }
/* Ghost filter buttons */
.crm-filter-strip { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.crm-filter-btn { background: transparent; color: #64748b; border: 1.5px solid #e2e8f0; border-radius: 20px; padding: 5px 14px; font-size: 11px; font-weight: 700; font-family: var(--mono); cursor: pointer; transition: all .15s; text-transform: uppercase; letter-spacing: .5px; }
.crm-filter-btn:hover { background: #f8fafc; border-color: #cbd5e1; color: #334155; }
.crm-filter-btn.active { background: #0a1628; color: #fff; border-color: #0a1628; }
.crm-filter-won.active { background: #1E553C; border-color: #1E553C; color: #fff; }
.crm-filter-lost.active { background: #64748b; border-color: #64748b; color: #fff; }
/* CRM Table */
.crm-table-wrap { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.04); width: 100%; }
.crm-table { width: 100%; border-collapse: collapse; }
.crm-table th { padding: 10px 16px; font-size: 10px; font-weight: 700; color: #0a1628; text-transform: uppercase; letter-spacing: .8px; font-family: var(--sans); background: #f8fafc; border-bottom: 2px solid #e9eef4; text-align: left; white-space: nowrap; }
.crm-table td { padding: 13px 16px; border-bottom: 1px solid #f1f5f9; font-size: 13px; color: #0f172a; vertical-align: middle; font-family: var(--sans); }
.crm-table tbody tr:last-child td { border-bottom: none; }
.crm-table tbody tr:hover td { background: #fafbfc; }
.crm-table th:nth-child(1), .crm-table td:nth-child(1) { min-width: 180px; }
.crm-table th:last-child, .crm-table td:last-child { text-align: right; }
/* Cold lead */
.crm-cold-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ef4444; margin-right: 5px; flex-shrink: 0; animation: crm-pulse 1.8s ease-in-out infinite; }
@keyframes crm-pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.crm-cold-label { font-size: 9px; font-weight: 700; color: #ef4444; font-family: var(--mono); text-transform: uppercase; letter-spacing: .5px; vertical-align: middle; }
/* Lead type badge */
.crm-lead-type { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 6px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
/* Row stage accent */
.crm-table tbody tr.crm-row-won td { background: #f8fdf9; }
.crm-table tbody tr.crm-row-lost td { opacity: .65; }
/* Inline action buttons */
.crm-tbl-btn { border: none; border-radius: 6px; padding: 4px 9px; font-size: 11px; font-weight: 700; font-family: var(--sans); cursor: pointer; white-space: nowrap; transition: all .12s; }
.crm-card { background: #ffffff; border-radius: 14px; padding: 16px 18px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-left: 3px solid #e2e8f0; display: flex; align-items: flex-start; gap: 14px; }
.crm-card-prospect { border-left-color: #94a3b8; }
.crm-card-outreach  { border-left-color: #f59e0b; }
.crm-card-meeting   { border-left-color: #3b82f6; }
.crm-card-proposal  { border-left-color: #8b5cf6; }
.crm-card-won       { border-left-color: #1E553C; background: #f0fdf4; }
.crm-card-lost      { border-left-color: #e2e8f0; opacity: .65; }
.crm-card-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.crm-card-body { flex: 1; min-width: 0; }
.crm-org-name { font-size: 15px; font-weight: 800; color: #0f172a; }
.crm-contact-name { font-size: 12px; color: #64748b; margin-top: 1px; }
.crm-meta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.crm-meta-chip { font-size: 11px; color: #475569; font-family: var(--mono); display: flex; align-items: center; gap: 4px; }
.crm-notes { font-size: 12px; color: #64748b; margin-top: 8px; font-style: italic; line-height: 1.5; }
.crm-follow-up { font-size: 11px; font-weight: 700; color: #f59e0b; font-family: var(--mono); margin-top: 6px; }
.crm-follow-up-overdue { color: #dc2626; }
.crm-card-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.crm-action-btn { border: none; border-radius: 7px; padding: 6px 10px; font-size: 11px; font-weight: 700; font-family: var(--sans); cursor: pointer; white-space: nowrap; }
.crm-stage-btn { background: #f1f5f9; color: #334155; }
.crm-stage-btn:hover { background: #e2e8f0; }
/* ── Map View Toggle ─────────────────────────────────────────────── */
.map-view-toggle { display:inline-flex; gap:8px; flex-shrink:0; }
.map-view-btn { background:#fff; border:1px solid #CBD5E1; border-radius:8px; padding:8px 16px; font-size:12px; font-weight:700; color:#64748b; cursor:pointer; font-family:var(--sans); display:flex; align-items:center; gap:5px; line-height:1; transition:border-color .14s,background .14s,color .14s,box-shadow .14s; white-space:nowrap; }
.map-view-btn.active { background:#1E553C; color:#fff; border-color:#1E553C; box-shadow:0 1px 3px 0 rgb(0 0 0/0.1),0 1px 2px -1px rgb(0 0 0/0.1); }
.map-view-btn:not(.active):hover { border-color:#1E553C; box-shadow:0 0 0 3px rgba(30,85,60,.06); color:#1E553C; }
/* ── Geo Map containers ──────────────────────────────────────────── */
.geo-map-wrap { border-radius:14px; overflow:hidden; border:1px solid #e2e8f0; box-shadow:0 2px 12px rgba(0,0,0,.07); position:relative; display:none; margin-top:16px; }
.geo-map-wrap.active { display:block; }
.geo-map-canvas { width:100%; height:500px; }
.geo-map-legend { position:absolute; bottom:12px; left:12px; background:rgba(255,255,255,.96); border:1px solid #e2e8f0; border-radius:10px; padding:8px 13px; display:flex; gap:10px; align-items:center; box-shadow:0 2px 12px rgba(0,0,0,.12); flex-wrap:wrap; z-index:1; backdrop-filter:blur(4px); }
.geo-map-legend-item { display:flex; align-items:center; gap:6px; font-size:11px; font-weight:700; color:#334155; font-family:var(--sans); white-space:nowrap; }
.geo-map-legend-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.geo-map-no-geocode { position:absolute; top:12px; right:12px; background:rgba(255,248,230,.97); border:1px solid #fcd34d; border-radius:8px; padding:5px 11px; font-size:11px; color:#92400e; font-family:var(--mono); z-index:1; display:none; }
.geo-map-loading { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.88); font-size:13px; color:#64748b; font-family:var(--mono); gap:8px; z-index:2; pointer-events:none; }
.geo-map-empty { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; background:#f8fafc; gap:10px; }
.geo-map-empty-icon { font-size:40px; }
.geo-map-empty-text { font-size:13px; color:#64748b; font-family:var(--mono); text-align:center; line-height:1.5; }
.crm-edit-btn { background: #eff6ff; color: #1d4ed8; }
.crm-edit-btn:hover { background: #dbeafe; }
.crm-del-btn { background: #fef2f2; color: #dc2626; }
.crm-del-btn:hover { background: #fee2e2; }
.crm-stage-badge { display: inline-block; font-size: 10px; font-weight: 800; padding: 2px 9px; border-radius: 20px; text-transform: uppercase; letter-spacing: .06em; font-family: var(--mono); }
.crm-badge-prospect { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.crm-badge-outreach  { background: #fef3c7; color: #92400e; }
.crm-badge-meeting   { background: #eff6ff; color: #1d4ed8; }
.crm-badge-proposal  { background: #f5f3ff; color: #6d28d9; }
.crm-badge-won       { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.crm-badge-lost      { background: #fff1f2; color: #9f1239; border: 1px solid #fda4af; }
.crm-quick-note { font-size: 11px; color: #475569; margin-top: 8px; background: #f8fafc; border-left: 2px solid #e2e8f0; padding: 5px 9px; border-radius: 0 6px 6px 0; line-height: 1.45; font-family: var(--sans); }
.crm-quick-note-label { font-size: 9px; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: .8px; font-family: var(--mono); display: block; margin-bottom: 2px; }
.crm-won-banner { background: linear-gradient(135deg,#f0fdf4,#dcfce7); border: 1.5px solid #86efac; border-radius: 14px; padding: 16px 20px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-family: var(--sans); }
.crm-won-banner-left { }
.crm-won-banner-val { font-size: 30px; font-weight: 900; color: #1E553C; line-height: 1; }
.crm-won-banner-sub { font-size: 10px; font-weight: 700; color: #4ade80; font-family: var(--mono); text-transform: uppercase; letter-spacing: .6px; margin-top: 3px; }
.crm-won-banner-right { display: flex; flex-wrap: wrap; gap: 14px; }
.crm-won-stat { text-align: center; }
.crm-won-stat-val { font-size: 18px; font-weight: 800; color: #1E553C; }
.crm-won-stat-lbl { font-size: 9px; font-weight: 700; color: #64748b; font-family: var(--mono); text-transform: uppercase; letter-spacing: .5px; }
/* Mark as Signed button */
.crm-sign-btn { background: #d1fae5 !important; color: #065f46 !important; border: 1.5px solid #6ee7b7 !important; font-weight: 700 !important; }
.crm-sign-btn:hover { background: #a7f3d0 !important; }
/* Sign confirmation modal */
.crm-sign-overlay { position: fixed; inset: 0; background: rgba(10,22,40,.6); z-index: 800; display: flex; align-items: center; justify-content: center; padding: 24px; backdrop-filter: blur(3px); overflow-y: auto; }
.crm-sign-modal { background: #fff; border-radius: 20px; padding: 0; max-width: 600px; width: 100%; box-shadow: 0 24px 64px rgba(0,0,0,.22); text-align: left; max-height: 92vh; overflow-y: auto; display: flex; flex-direction: column; }
.crm-sign-header { padding: 28px 32px 20px; text-align: center; border-bottom: 1px solid #f1f5f9; flex-shrink: 0; }
.crm-sign-icon { font-size: 38px; margin-bottom: 10px; line-height: 1; }
.crm-sign-title { font-size: 20px; font-weight: 800; color: #0a1628; font-family: var(--sans); margin-bottom: 6px; }
.crm-sign-body { font-size: 14px; color: #334155; font-family: var(--sans); line-height: 1.6; }
.crm-sign-body strong { color: #0a1628; font-weight: 700; }
.crm-sign-sub { font-size: 12px; color: #94a3b8; font-family: var(--mono); margin-top: 4px; }
.crm-sign-form { padding: 22px 32px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; }
.crm-sign-section { display: flex; flex-direction: column; gap: 10px; }
.crm-sign-section-hd { font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: #94a3b8; font-family: var(--mono); padding-bottom: 6px; border-bottom: 1px solid #f1f5f9; }
.crm-sign-row { display: flex; gap: 10px; }
.crm-sign-field { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.crm-sign-field label { font-size: 11px; font-weight: 700; color: #475569; font-family: var(--sans); letter-spacing: .01em; }
.crm-sign-field label span { color: #ef4444; }
.crm-sign-field input, .crm-sign-field select { padding: 9px 12px; border: 1.5px solid #dde3ea; border-radius: 8px; font-family: var(--sans); font-size: 13px; color: #0f172a; background: #fff; outline: none; transition: border-color .14s; width: 100%; }
.crm-sign-field input:focus, .crm-sign-field select:focus { border-color: #1E553C; }
.crm-sign-field input.sign-required-err, .crm-sign-field select.sign-required-err { border-color: #ef4444; background: #fef2f2; }
.crm-sign-actions { padding: 18px 32px 26px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid #f1f5f9; flex-shrink: 0; }
.crm-sign-cancel-btn { background: transparent; color: #64748b; border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 10px 20px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); transition: all .14s; }
.crm-sign-cancel-btn:hover { border-color: #94a3b8; color: #334155; }
.crm-sign-confirm-btn { background: #1E553C; color: #fff; border: none; border-radius: 10px; padding: 10px 22px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); display: inline-flex; align-items: center; gap: 7px; box-shadow: 0 2px 10px rgba(30,85,60,.3); transition: background .14s; }
.crm-sign-confirm-btn:hover { background: #154d2e; }
.crm-sign-confirm-btn:disabled { opacity: .6; cursor: not-allowed; }
/* ── Client modal section dividers ─────────────────────────────── */
.ic-section-hd { font-size: 10px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase; color: #94a3b8; font-family: var(--mono); padding: 14px 0 8px; border-top: 1px solid #f1f5f9; margin-top: 6px; display: flex; align-items: center; gap: 7px; }
.ic-section-hd:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.ic-section-hd svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
/* ── Facility Type Pills & Filter Strip ───────────────────────────────────── */
.ft-pill { display:inline-flex; align-items:center; gap:3px; border-radius:5px; padding:1px 7px; font-size:10px; font-weight:700; font-family:var(--mono); white-space:nowrap; vertical-align:middle; border:1px solid transparent; }
.ftype-strip { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; align-items:center; }
.ftype-strip-label { font-size:10px; font-weight:700; color:#94a3b8; text-transform:uppercase; letter-spacing:.08em; font-family:var(--mono); flex-shrink:0; }
.ftype-pill-btn { background:#fff; border:1.5px solid #e2e8f0; border-radius:20px; padding:4px 12px; font-size:11px; font-weight:700; color:#64748b; cursor:pointer; font-family:var(--sans); transition:all .13s; white-space:nowrap; line-height:1.5; }
.ftype-pill-btn:hover { border-color:#94a3b8; color:#334155; background:#f8fafc; }
.ftype-pill-btn.active { color:#fff !important; border-color:transparent !important; }
/* Institutional Clients Tab */
.ic-type-badge { display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:20px;font-size:11px;font-weight:700;font-family:var(--mono);letter-spacing:.2px;border:1px solid transparent; }
.ic-type-facility  { background:#dbeafe;color:#1e40af;border-color:#bfdbfe; }
.ic-type-hospital  { background:#fce7f3;color:#9d174d;border-color:#fbcfe8; }
.ic-type-alf       { background:#fef3c7;color:#92400e;border-color:#fde68a; }
.ic-type-rehab     { background:#d1fae5;color:#065f46;border-color:#a7f3d0; }
.ic-type-insurance { background:#ede9fe;color:#5b21b6;border-color:#ddd6fe; }
.ic-type-other     { background:#f1f5f9;color:#475569;border-color:#e2e8f0; }
.ic-type-snf       { background:#e0f2fe;color:#0369a1;border-color:#bae6fd; }
.ic-type-dialysis  { background:#fdf4ff;color:#7e22ce;border-color:#e9d5ff; }
.ic-type-doctors   { background:#d1fae5;color:#065f46;border-color:#a7f3d0; }
.ic-type-ilf       { background:#f0fdf4;color:#15803d;border-color:#86efac; }
.ic-header-bar { display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:16px; }
.ic-search-row { display:flex;align-items:center;gap:10px;margin-bottom:16px;flex-wrap:wrap; }
.ic-search-input { flex:1;min-width:180px;padding:10px 14px;border:1.5px solid #e2e8f0;border-radius:10px;font-size:13px;font-family:var(--sans);outline:none;color:#0f172a; }
.ic-search-input:focus { border-color:#1E553C; }
.ic-type-select { padding:10px 12px;border:1.5px solid #e2e8f0;border-radius:10px;font-size:13px;font-family:var(--sans);color:#334155;outline:none;background:#fff;cursor:pointer; }
.ic-count-label { font-size:12px;color:#94a3b8;font-family:var(--mono);margin-left:auto; }
.ic-table-wrap { background:#fff;border:1px solid #e8edf2;border-radius:14px;overflow:hidden;box-shadow:0 1px 4px #0001; }
.ic-table { width:100%;border-collapse:collapse; }
.ic-table th { padding:11px 14px;font-family:var(--mono);font-size:11px;color:#475569;font-weight:600;text-transform:uppercase;letter-spacing:.5px;background:#f8fafc;border-bottom:1px solid #e8edf2;text-align:left; }
.ic-table td { padding:13px 14px;border-bottom:1px solid #f1f5f9;vertical-align:middle; }
.ic-table tr:last-child td { border-bottom:none; }
.ic-table tr:hover td { background:#fafcfe; }
.ic-empty-state { text-align:center;padding:64px 20px;color:#94a3b8; }
.ic-empty-state h3 { font-size:18px;font-weight:800;color:#0c1623;margin-bottom:6px; }
.ic-empty-state p { font-size:13px;font-family:var(--mono); }
.crm-type-toggle { display: flex; border: 1.5px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
.crm-type-btn { flex: 1; border: none; background: #f8fafc; color: #64748b; font-size: 13px; font-weight: 700; font-family: var(--sans); padding: 11px 8px; cursor: pointer; transition: all .15s; }
.crm-type-btn.active { background: #1E553C; color: #fff; }
.crm-empty { text-align: center; padding: 60px 20px; }
.crm-empty-icon { font-size: 44px; margin-bottom: 12px; }
.crm-empty-title { font-size: 16px; font-weight: 700; color: #475569; margin-bottom: 4px; }
.crm-empty-sub { font-size: 13px; color: #94a3b8; }
.crm-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.crm-stat-card { background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); text-align: center; }
.crm-stat-num { font-size: 22px; font-weight: 800; color: #0f172a; }
.crm-stat-label { font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); margin-top: 2px; }
/* CRM Modal */
.crm-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 950; display: flex; align-items: center; justify-content: center; padding: 24px; }
.crm-modal { background: #fff; border-radius: 20px; width: 100%; max-width: 540px; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(0,0,0,0.18); }
.crm-field { margin-bottom: 14px; }
.crm-label { font-size: 12px; font-weight: 700; color: #475569; font-family: var(--mono); text-transform: uppercase; letter-spacing: .05em; display: block; margin-bottom: 5px; }
.crm-input, .crm-select, .crm-textarea { width: 100%; padding: 11px 14px; border: 1.5px solid #e2e8f0; border-radius: 10px; font-size: 14px; font-family: var(--sans); color: #0f172a; background: #f8fafc; outline: none; box-sizing: border-box; transition: border-color .15s; }
.crm-input:focus, .crm-select:focus, .crm-textarea:focus { border-color: #1E553C; background: #fff; }
.crm-textarea { min-height: 72px; resize: vertical; }
.crm-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.crm-modal-title { padding: 20px 24px 0; font-size: 18px; font-weight: 800; color: #0f172a; flex-shrink: 0; }
.crm-modal-scroll { overflow-y: auto; overscroll-behavior: contain; flex: 1; padding: 16px 24px; -webkit-overflow-scrolling: touch; }
.crm-modal-actions { display: flex; gap: 10px; padding: 14px 24px 20px; border-top: 1px solid #f1f5f9; flex-shrink: 0; }
.crm-save-btn { flex: 1; background: #1E553C; color: white; border: none; border-radius: 12px; padding: 14px; font-size: 14px; font-weight: 700; font-family: var(--sans); cursor: pointer; }
.crm-save-btn:hover { background: #154d2e; }
.crm-cancel-btn { flex: 0 0 80px; background: #f1f5f9; color: #475569; border: none; border-radius: 12px; padding: 14px; font-size: 14px; font-weight: 700; font-family: var(--sans); cursor: pointer; }

/* ── DRIVER TIMESHEET TAB ────────────────────────────────────── */
.dts-period-bar { display: flex; gap: 8px; margin-bottom: 16px; background: transparent; padding: 0; border-radius: 0; }
.dts-period-btn { flex: 1; padding: 8px 16px; border: 1px solid #CBD5E1; background: #fff; border-radius: 8px; font-family: var(--sans); font-size: 12px; font-weight: 700; color: #64748b; cursor: pointer; transition: border-color .14s, background .14s, color .14s, box-shadow .14s; white-space: nowrap; }
.dts-period-btn:not(.active):hover { border-color: #1E553C; box-shadow: 0 0 0 3px rgba(30,85,60,.06); color: #1E553C; }
.dts-period-btn.active { background: #1E553C; color: #fff; border-color: #1E553C; box-shadow: 0 1px 3px 0 rgb(0 0 0/0.1), 0 1px 2px -1px rgb(0 0 0/0.1); }
.dts-summary-card { background: linear-gradient(135deg, #0a1628 0%, #1E553C 100%); border-radius: 20px; padding: 24px; margin-bottom: 20px; text-align: center; box-shadow: 0 8px 32px rgba(30,85,60,0.25); }
.dts-summary-label { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.65); text-transform: uppercase; letter-spacing: .1em; font-family: var(--mono); margin-bottom: 8px; }
.dts-summary-hours { font-size: 52px; font-weight: 800; color: #ffffff; line-height: 1; letter-spacing: -2px; font-family: var(--sans); }
.dts-summary-sub { font-size: 12px; color: rgba(255,255,255,0.55); font-family: var(--mono); margin-top: 8px; }
.dts-row { display: flex; align-items: center; gap: 12px; background: #ffffff; border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border-left: 3px solid transparent; }
.dts-row-active { border-left-color: #1E553C; }
.dts-row-date { min-width: 44px; text-align: center; }
.dts-day { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; font-family: var(--mono); }
.dts-date { font-size: 13px; font-weight: 800; color: #0f172a; }
.dts-row-times { flex: 1; min-width: 0; }
.dts-time-in { font-size: 13px; color: #0f172a; font-family: var(--mono); font-weight: 600; }
.dts-time-out { font-size: 13px; color: #64748b; font-family: var(--mono); margin-top: 2px; }
.dts-break-row { font-size: 11px; color: #94a3b8; font-family: var(--mono); margin-top: 3px; }
.dts-row-net { font-size: 15px; font-weight: 800; color: #1E553C; white-space: nowrap; text-align: right; }
.dts-live-badge { display: inline-block; background: #dcfce7; color: #1E553C; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 20px; letter-spacing: .05em; font-family: var(--mono); animation: pulse-green 2s infinite; }
@keyframes pulse-green { 0%,100% { opacity: 1; } 50% { opacity: .6; } }
.dts-empty { text-align: center; padding: 56px 24px; }
.dts-loading { text-align: center; padding: 40px; color: #94a3b8; font-family: var(--mono); font-size: 12px; }
.dts-error { text-align: center; padding: 24px; color: #dc2626; font-family: var(--mono); font-size: 13px; background: #fef2f2; border-radius: 12px; }
.dts-section-header { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 8px; }
.dts-section-label { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .08em; font-family: var(--mono); }
.dts-section-total { font-size: 13px; font-weight: 700; color: #475569; font-family: var(--mono); }
/* Nested collapsible timesheet accordion */
.dts-week { border-radius: 14px; margin-bottom: 10px; }
.dts-week-hdr { display: flex; align-items: center; gap: 10px; background: #F8FAFC; padding: 12px 16px; cursor: pointer; border-radius: 14px; border: 1px solid #e2e8f0; transition: background .14s; user-select: none; }
.dts-week.open > .dts-week-hdr { border-radius: 14px 14px 0 0; border-bottom-color: #f1f5f9; }
.dts-week-hdr:hover { background: #f1f5f9; }
.dts-week-label { flex: 1; font-size: 13px; font-weight: 700; font-family: var(--sans); color: #0f172a; }
.dts-week-total { font-size: 13px; font-weight: 700; font-family: var(--mono); color: #1E553C; white-space: nowrap; }
.dts-week-body { display: none; padding: 8px; border: 1px solid #e2e8f0; border-top: none; border-radius: 0 0 14px 14px; }
.dts-week.open > .dts-week-body { display: block; }
.dts-day { border-radius: 10px; margin-bottom: 6px; }
.dts-day-hdr { display: flex; align-items: center; gap: 8px; background: #fff; padding: 9px 12px; cursor: pointer; border-radius: 10px; border: 1px solid #f1f5f9; transition: background .14s; user-select: none; }
.dts-day.open > .dts-day-hdr { border-radius: 10px 10px 0 0; border-bottom-color: #f1f5f9; }
.dts-day-hdr:hover { background: #f8fafc; }
.dts-day-label { flex: 1; font-size: 12px; font-weight: 700; font-family: var(--sans); color: #334155; }
.dts-day-total { font-size: 12px; font-weight: 700; font-family: var(--mono); color: #475569; }
.dts-day-body { display: none; padding: 6px 4px 2px; border: 1px solid #f1f5f9; border-top: none; border-radius: 0 0 10px 10px; background: #fafcff; }
.dts-day.open > .dts-day-body { display: block; }
.dts-chevron { font-size: 13px; color: #94a3b8; transition: transform .18s; display: inline-block; width: 14px; flex-shrink: 0; line-height: 1; }
.dts-week.open > .dts-week-hdr > .dts-chevron,
.dts-day.open > .dts-day-hdr > .dts-chevron { transform: rotate(90deg); }
.dts-punch-row { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 8px; padding: 11px 12px; margin: 4px 0; box-shadow: 0 1px 3px rgba(0,0,0,0.04); border-left: 3px solid transparent; }
.dts-punch-row.active { border-left-color: #1E553C; background: #f0fdf4; }
.dts-punch-times { flex: 1; min-width: 0; }
.dts-punch-net { font-size: 14px; font-weight: 800; color: #1E553C; white-space: nowrap; }
/* ── AVATAR PICKER ──────────────────────────────────────── */
.avatar-picker-overlay { position:fixed; inset:0; background:#00000055; z-index:500; display:none; align-items:flex-end; justify-content:center; }
.avatar-picker-overlay.open { display:flex; }
.avatar-picker-sheet { background:#ffffff; border-radius:24px 24px 0 0; padding:24px 20px calc(24px + env(safe-area-inset-bottom,0px)); width:100%; max-width:520px; box-shadow:0 -8px 40px #00000020; }
.avatar-emoji-grid { display:grid; grid-template-columns:repeat(6,1fr); gap:8px; margin:14px 0 10px; }
.avatar-emoji-btn { font-size:26px; background:#f8fafc; border:2px solid transparent; border-radius:12px; padding:6px; cursor:pointer; text-align:center; transition:border .12s,background .12s; aspect-ratio:1; display:flex; align-items:center; justify-content:center; line-height:1; }
.avatar-emoji-btn.selected { border-color:var(--accent); background:#f0fdf4; }
.avatar-emoji-btn:active { background:#dbeafe; }
.avatar-upload-btn { background:#f1f5f9; border:1.5px dashed #94a3b8; border-radius:12px; padding:12px; font-size:13px; font-weight:600; color:#334155; cursor:pointer; width:100%; text-align:center; display:block; font-family:var(--sans); transition:background .12s; }
.avatar-upload-btn:hover { background:#e2e8f0; }
.avatar-edit-badge { position:absolute; bottom:-4px; right:-4px; background:var(--accent); color:white; border-radius:50%; width:26px; height:26px; display:flex; align-items:center; justify-content:center; font-size:12px; box-shadow:0 2px 8px #0004; border:2.5px solid #f8f9fa; pointer-events:none; }
/* Profile inputs */
.ds-profile-input { width:100%; padding:13px 14px; border:1.5px solid #e2e8f0; border-radius:10px; font-size:14px; font-family:var(--sans); color:#0f172a; background:#ffffff; outline:none; transition:border .15s,box-shadow .15s; box-sizing:border-box; }
.ds-profile-input:focus { border-color:var(--accent); box-shadow:0 0 0 3px #1E553C18; }
.ds-save-profile-btn { background:#0f172a; color:white; border:none; border-radius:12px; padding:15px; font-size:15px; font-weight:700; font-family:var(--sans); cursor:pointer; width:100%; transition:background .15s; }
.ds-save-profile-btn:disabled { opacity:.5; cursor:not-allowed; }
.msettings-editprofile { background:#eff6ff; border:1px solid #bfdbfe; color:#1d4ed8; padding:10px 16px; border-radius:10px; cursor:pointer; font-size:13px; font-weight:700; font-family:var(--sans); transition:all .15s; width:100%; text-align:left; }
.msettings-editprofile:hover { background:#dbeafe; }
/* ── CHAT PANEL ─────────────────────────────────────── */
.chat-btn { position: relative; background: none; border: none; cursor: pointer; font-size: 20px; padding: 0; display: flex; align-items: center; line-height: 1; }
.chat-badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; background: #ef4444; border-radius: 8px; border: 2px solid #ffffff; font-size: 9px; font-weight: 800; color: white; display: flex; align-items: center; justify-content: center; padding: 0 3px; font-family: var(--mono); }
.chat-panel { position: fixed; right: -360px; top: 56px; width: 340px; height: calc(100vh - 56px); background: #ffffff; border-left: 1px solid #dde3ea; box-shadow: -4px 0 24px #00000012; z-index: 600; display: flex; flex-direction: column; transition: right .25s cubic-bezier(.4,0,.2,1); }
.chat-panel.open { right: 0; }
@media (min-width: 1024px) {
  .chat-panel { width: min(960px, calc(100vw - var(--sidebar-w, 260px))); right: calc(-1 * min(960px, calc(100vw - var(--sidebar-w, 260px)))); box-shadow: -8px 0 40px rgba(0,0,0,.1); }
  .chat-panel.open { right: 0; }
}
@media (max-width: 640px) {
  .chat-panel { width: 100%; max-width: 100vw; right: 0; left: 0; top: auto; bottom: -100%; height: 72dvh; border-left: none; border-top: 1px solid #e2e8f0; border-radius: 20px 20px 0 0; box-shadow: 0 -8px 32px #00000020; z-index: 500; transition: bottom .28s cubic-bezier(.4,0,.2,1); overflow: hidden; }
  .chat-panel.open { bottom: 0; right: 0; left: 0; }
  .chat-panel-header { padding: 10px 16px 0; }
  .chat-panel-title { font-size: 15px; margin-bottom: 10px; }
  .chat-close-btn { font-size: 20px !important; padding: 4px 8px !important; }
  .chat-tab { font-size: 11px; padding: 7px 6px; border-radius: 20px; }
  .chat-subtabs { padding: 8px 12px; gap: 6px; }
  .chat-subtab-btn { font-size: 13px !important; padding: 6px 12px !important; }
  .chat-messages { padding: 10px 14px; gap: 8px; }
  .chat-input-row { padding: 8px 12px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .chat-input { font-size: 16px; padding: 10px 15px; border-radius: 20px; }
  .chat-bubble { font-size: 13px !important; padding: 9px 13px !important; }
  .chat-send-btn { width: 36px !important; height: 36px !important; border-radius: 10px !important; }
}
.chat-backdrop { display: none; position: fixed; inset: 0; background: #00000040; z-index: 499; }
.chat-backdrop.open { display: block; }
.chat-panel-header { padding: 14px 14px 0; flex-shrink: 0; }
.chat-panel-title { font-size: 16px; font-weight: 600; color: #0c1623; font-family: 'Inter', var(--sans); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; letter-spacing: -0.2px; }
.chat-close-btn { background: none; border: none; font-size: 18px; cursor: pointer; color: #94a3b8; padding: 0; line-height: 1; }
.chat-close-btn:hover { color: #475569; }
.chat-tabs { display: flex; padding: 10px 14px 10px; gap: 5px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.chat-tab { flex: 1; padding: 7px 8px; font-size: 11px; font-weight: 700; cursor: pointer; color: #64748b; border-radius: 20px; transition: all .15s; font-family: 'Inter', var(--sans); text-align: center; background: transparent; border: 1.5px solid transparent; letter-spacing: 0; line-height: 1.2; }
.chat-tab.active { background: #1E553C; color: #ffffff; border-color: #1E553C; }
.chat-tab:not(.active):hover { background: #e8edf2; color: #334155; }
/* Chat body layout */
.chat-body { flex: 1; display: flex; overflow: hidden; min-height: 0; }
.chat-driver-sidebar { width: 96px; border-right: 1px solid #e8edf3; overflow-y: auto; display: flex; flex-direction: column; gap: 0; padding: 8px 5px; background: #f8fafc; flex-shrink: 0; }
.chat-driver-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 3px; border-radius: 10px; border: 1.5px solid transparent; background: none; cursor: pointer; transition: all .15s; width: 100%; }
.chat-driver-btn .drv-avatar { width: 36px; height: 36px; border-radius: 10px; font-size: 12px; font-weight: 800; color: white; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-driver-btn .drv-label { font-size: 10px; color: #475569; font-weight: 600; font-family: var(--mono); text-align: center; line-height: 1.2; word-break: break-word; }
.chat-driver-btn.active { background: #f0fdf4; border-color: #1E553C; }
.chat-driver-btn.active .drv-label { color: #1E553C; }
.chat-convo-info { display: none; }
.chat-convo-meta { display: none; }
.chat-convo-list-hdr { display: none; }
@media (min-width: 1024px) {
  .chat-driver-sidebar { width: 320px; padding: 0; gap: 0; background: #fff; flex-shrink: 0; }
  .chat-convo-list-hdr { display: block; padding: 16px 16px 10px; font-size: 10px; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: 1px; font-family: var(--mono); border-bottom: 1px solid #f1f5f9; }
  .chat-driver-btn { flex-direction: row; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 0; border: none; border-bottom: 1px solid #f1f5f9; border-left: 3px solid transparent; background: #fff; }
  .chat-driver-btn:hover { background: #f8fafc; border-left-color: #e2e8f0; }
  .chat-driver-btn.active { background: #f0fdf4; border-left-color: #1E553C; }
  .chat-driver-btn .drv-avatar { width: 44px; height: 44px; border-radius: 12px; font-size: 15px; }
  .chat-driver-btn .drv-label { display: none; }
  .chat-convo-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
  .chat-convo-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
}
.chat-convo-name { font-size: 14px; font-weight: 600; color: #0f172a; font-family: 'Inter', var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-convo-preview { font-size: 12px; color: #94a3b8; font-family: 'Inter', var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-convo-time { font-size: 11px; color: #94a3b8; font-family: var(--mono); white-space: nowrap; }
.chat-main-col { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
/* Trip header */
.chat-trip-header { background: linear-gradient(90deg,#eff6ff,#f0fdf4); border-bottom: 1px solid #bfdbfe; padding: 7px 14px; flex-shrink: 0; }
.chat-trip-lbl { font-size: 9px; font-weight: 800; font-family: var(--mono); color: #3b82f6; letter-spacing: 1px; text-transform: uppercase; }
.chat-trip-val { font-size: 12px; font-weight: 700; color: #1e3a5f; margin-top: 1px; }
/* Driver dispatch bar — glassmorphism */
.driver-dispatch-bar { padding: 8px 14px; background: rgba(254,249,236,0.75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(253,230,138,0.8); flex-shrink: 0; }
/* Quick replies */
.chat-quick-replies { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid #f1f5f9; flex-wrap: wrap; flex-shrink: 0; background: #fafbff; }
.qr-btn { padding: 6px 12px; border-radius: 999px; border: none; font-size: 11px; font-weight: 700; cursor: pointer; font-family: var(--mono); transition: opacity .15s, transform .1s; white-space: nowrap; color: #fff; }
.qr-btn:hover { opacity: .85; transform: translateY(-1px); }
.qr-btn:active { transform: scale(.97); }
.chat-quick-replies .qr-btn:nth-child(1) { background: #1E293B; }
.chat-quick-replies .qr-btn:nth-child(2) { background: var(--accent); }
.chat-quick-replies .qr-btn:nth-child(3) { background: #0369a1; }
.chat-quick-replies .qr-btn:nth-child(4) { background: #7c3aed; }
/* Read receipt */
.chat-read-receipt { font-size: 9px; color: #94a3b8; font-family: var(--mono); margin-top: 1px; text-align: right; }
/* Broadcast */
.broadcast-btn { background: transparent; border: 1.5px solid #d97706; border-radius: 8px; padding: 5px 9px; cursor: pointer; font-size: 11px; font-weight: 700; line-height: 1; color: #d97706; font-family: 'Inter', var(--sans); letter-spacing: 0.02em; transition: all .15s; }
.broadcast-btn:hover { background: #fffbeb; border-color: #b45309; color: #b45309; }
.broadcast-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 600; display: flex; align-items: center; justify-content: center; padding: 20px; }
.broadcast-modal { background: white; border-radius: 16px; padding: 20px; width: 100%; max-width: 360px; box-shadow: 0 8px 32px #00000025; }
.broadcast-modal-title { font-size: 16px; font-weight: 800; color: #0f172a; margin-bottom: 4px; }
.broadcast-modal-sub { font-size: 11px; color: #64748b; font-family: var(--mono); margin-bottom: 12px; }
.broadcast-textarea { width: 100%; border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: var(--sans); resize: none; outline: none; box-sizing: border-box; min-height: 80px; }
.broadcast-textarea:focus { border-color: var(--accent); }
.broadcast-actions { display: flex; gap: 8px; margin-top: 12px; }
.broadcast-cancel-btn { flex: 1; padding: 10px; border: 1.5px solid #e2e8f0; border-radius: 10px; background: white; font-size: 13px; font-weight: 700; cursor: pointer; color: #64748b; }
.broadcast-send-btn { flex: 2; padding: 10px; border: none; border-radius: 10px; background: var(--accent); font-size: 13px; font-weight: 700; cursor: pointer; color: white; transition: background .15s; }
.broadcast-send-btn:hover { background: var(--accent2); }
/* Export button */
.chat-export-btn { background: #f0fdf4; border: 1.5px solid #86efac; border-radius: 8px; padding: 5px 9px; cursor: pointer; font-size: 12px; font-weight: 700; color: #1E553C; font-family: var(--mono); transition: background .15s; white-space: nowrap; }
.chat-export-btn:hover { background: #dcfce7; }
/* Biller read-only bar */
.chat-readonly-bar { padding: 7px 14px; background: #fefce8; border-top: 1px solid #fde68a; font-size: 11px; font-family: var(--mono); font-weight: 700; color: #92400e; text-align: center; flex-shrink: 0; }
/* Biller trip-log action bar */
.chat-biller-actions { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; background: #f0f9ff; border-top: 1px solid #bae6fd; flex-shrink: 0; gap: 10px; }
.trip-log-btn { background: #1d4ed8; border: none; border-radius: 9px; padding: 8px 14px; font-size: 12px; font-weight: 700; color: white; cursor: pointer; font-family: var(--mono); transition: background .15s; white-space: nowrap; flex-shrink: 0; }
.trip-log-btn:hover:not(:disabled) { background: #1e40af; }
.trip-log-btn:disabled { background: #93c5fd; cursor: not-allowed; }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
/* Print styles for transcript export */
@media print {
  body > *:not(#print-transcript):not(#sa-overlay) { display: none !important; }
  #print-transcript { display: block !important; font-family: monospace; font-size: 12px; padding: 20px; }
  #sa-overlay { display: block !important; position: static !important; background: none !important; padding: 0 !important; overflow: visible !important; }
  .sa-modal { box-shadow: none !important; max-height: none !important; overflow: visible !important; border-radius: 0 !important; }
  .sa-no-print { display: none !important; }
  .sa-doc { padding: 0 !important; }
}
/* ── Service Agreement Modal ────────────────────────────────────── */
#sa-overlay { position: fixed; inset: 0; background: rgba(10,22,40,.65); z-index: 900; display: none; align-items: flex-start; justify-content: center; padding: 32px 24px; backdrop-filter: blur(4px); overflow-y: auto; }
#sa-overlay.open { display: flex; }
.sa-modal { background: #fff; border-radius: 16px; width: 100%; max-width: 780px; box-shadow: 0 32px 80px rgba(0,0,0,.28); display: flex; flex-direction: column; max-height: 90vh; overflow: hidden; }
.sa-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid #f1f5f9; flex-shrink: 0; background: #fff; border-radius: 16px 16px 0 0; }
.sa-toolbar-title { font-size: 13px; font-weight: 800; color: #0a1628; font-family: var(--sans); }
.sa-toolbar-actions { display: flex; gap: 8px; align-items: center; }
.sa-print-btn { background: #1E553C; color: #fff; border: none; border-radius: 8px; padding: 8px 18px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); display: inline-flex; align-items: center; gap: 6px; }
.sa-print-btn:hover { background: #154d2e; }
.sa-close-btn { background: transparent; border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 700; color: #64748b; cursor: pointer; font-family: var(--sans); }
.sa-close-btn:hover { border-color: #94a3b8; color: #334155; }
.sa-doc { flex: 1; overflow-y: auto; padding: 40px 56px; font-family: 'Georgia', serif; color: #0f172a; }
.sa-letterhead { text-align: center; border-bottom: 3px double #111827; padding-bottom: 20px; margin-bottom: 28px; }
.sa-co-name { font-size: 22px; font-weight: 800; letter-spacing: -.3px; color: #111827; font-family: var(--sans); }
.sa-co-sub { font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: #1E553C; font-family: var(--sans); font-weight: 700; margin-top: 2px; }
.sa-doc-title { font-size: 16px; font-weight: 700; text-align: center; text-transform: uppercase; letter-spacing: 1px; margin: 20px 0 4px; font-family: var(--sans); color: #111827; }
.sa-doc-sub { font-size: 11px; text-align: center; color: #64748b; font-family: var(--sans); letter-spacing: .5px; margin-bottom: 0; }
.sa-sec { margin-bottom: 22px; }
.sa-sec-title { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: #1E553C; font-family: var(--sans); border-bottom: 1px solid #e2e8f0; padding-bottom: 5px; margin-bottom: 12px; }
.sa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.sa-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px 16px; }
.sa-field { display: flex; flex-direction: column; gap: 1px; }
.sa-field-full { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 1px; }
.sa-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #94a3b8; font-family: var(--sans); }
.sa-value { font-size: 13px; color: #0f172a; font-family: var(--sans); font-weight: 500; border-bottom: 1px solid #e2e8f0; padding-bottom: 3px; min-height: 22px; }
.sa-value-blank { font-size: 13px; color: #cbd5e1; font-style: italic; font-family: var(--sans); border-bottom: 1px solid #e2e8f0; padding-bottom: 3px; }
.sa-rate-table { width: 100%; border-collapse: collapse; font-size: 12px; font-family: var(--sans); margin-top: 6px; }
.sa-rate-table th { background: #111827; color: #fff; padding: 7px 12px; text-align: left; font-size: 10px; letter-spacing: .5px; text-transform: uppercase; }
.sa-rate-table td { padding: 6px 12px; border-bottom: 1px solid #f1f5f9; color: #334155; }
.sa-rate-table tr:nth-child(even) td { background: #f8fafc; }
.sa-sig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 16px; }
.sa-sig-block { border-top: 1.5px solid #0f172a; padding-top: 6px; }
.sa-sig-label { font-size: 10px; color: #64748b; font-family: var(--sans); }
.sa-sig-name { font-size: 12px; font-weight: 700; color: #0f172a; font-family: var(--sans); margin-top: 2px; }
.sa-sig-space { height: 36px; }
.sa-footer-note { font-size: 10px; color: #94a3b8; font-family: var(--sans); text-align: center; margin-top: 28px; line-height: 1.5; border-top: 1px solid #f1f5f9; padding-top: 16px; }
.chat-msg-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 0; }
.msg-avatar { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; font-weight: 800; color: white; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 14px; overflow: hidden; }
.tl-ride-avatar { width: 18px; height: 18px; border-radius: 5px; font-size: 9px; font-weight: 800; color: white; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.chat-msg { display: flex; flex-direction: column; max-width: 70%; }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg.theirs { align-self: flex-start; align-items: flex-start; }
.chat-bubble { padding: 12px 16px; border-radius: 18px; font-size: 15px; line-height: 1.55; word-break: break-word; font-family: 'Inter', var(--sans); }
.chat-msg.mine .chat-bubble { background: #1E553C; color: #fff; border-bottom-right-radius: 4px; box-shadow: 0 2px 8px rgba(30,85,60,.2); }
.chat-msg.theirs .chat-bubble { background: #F1F5F9; color: #0f172a; border-bottom-left-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.chat-meta { font-size: 11px; color: #94a3b8; font-family: var(--mono); margin-top: 3px; }
.chat-sender { font-size: 11px; font-weight: 700; color: #64748b; font-family: var(--mono); margin-bottom: 3px; }
.chat-empty { text-align: center; padding: 40px 16px; color: #94a3b8; font-size: 13px; font-family: 'Inter', var(--sans); }
.chat-date-sep { display: flex; align-items: center; gap: 10px; font-size: 11px; font-family: 'Inter', var(--sans); font-weight: 600; color: #94a3b8; margin: 10px 0; letter-spacing: .02em; }
.chat-date-sep::before, .chat-date-sep::after { content: ''; flex: 1; height: 1px; background: #e8edf3; }
.chat-input-row { padding: 12px 16px; border-top: 1px solid #f1f5f9; background: #fff; display: flex; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.chat-icon-btn { width: 36px; height: 36px; border-radius: 10px; border: none; background: transparent; color: #94a3b8; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: color .15s, background .15s; padding: 0; line-height: 1; }
.chat-icon-btn:hover { color: #1E553C; background: #f0fdf4; }
.chat-input { flex: 1; border: 1.5px solid #e2e8f0; border-radius: 14px; padding: 10px 16px; font-size: 15px; font-family: 'Inter', var(--sans); color: #0f172a; outline: none; resize: none; max-height: 120px; overflow-y: auto; background: #f8fafc; line-height: 1.5; transition: border-color .15s, background .15s, box-shadow .15s; }
.chat-input:focus { border-color: #1E553C; background: #fff; box-shadow: 0 0 0 3px rgba(30,85,60,.06); }
.chat-send-btn { width: 40px; height: 40px; border-radius: 12px; background: #cbd5e1; border: none; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .2s, transform .12s; }
.chat-send-btn.has-text { background: #1E553C; }
.chat-send-btn.has-text:hover { background: #164d30; transform: scale(1.05); }
.chat-send-btn:disabled { background: #cbd5e1; cursor: not-allowed; transform: none; }
@media (min-width: 1024px) {
  .chat-messages { padding: 24px 28px; gap: 12px; }
}
.chat-select { width: calc(100% - 24px); margin: 8px 12px 0; padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 10px; font-family: var(--mono); font-size: 12px; color: #0f172a; background: #f8fafc; outline: none; flex-shrink: 0; }
.chat-select:focus { border-color: var(--accent); }
.read-only-notice { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 8px; font-size: 11px; font-weight: 700; font-family: var(--mono); background: #f0fdf4; color: #1E553C; border: 1px solid #86efac; }
.timeline-section { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 6px; overflow: hidden; margin-bottom: 6px; }
.tl-driver-header { display: flex; align-items: center; gap: 8px; padding: 6px 14px; background: #f8fafc; border-bottom: 1px solid #e9eef4; }
.tl-driver-avatar { width: 26px; height: 26px; border-radius: 4px; font-size: 10px; font-weight: 800; color: white; display: flex; align-items: center; justify-content: center; flex-shrink: 0; letter-spacing: -.5px; }
.tl-driver-name { font-size: 13px; font-weight: 700; color: #0f172a; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-driver-meta { font-size: 10px; color: #64748b; font-family: var(--mono); margin-top: 1px; }
/* ── LIVE MAP ───────────────────────────────────────── */
.map-toggle-btn { display:inline-flex;align-items:center;gap:7px;padding:8px 16px;border-radius:999px;background:#f0fdf4;border:1.5px solid #bbf7d0;font-size:13px;font-weight:700;color:#1E553C;cursor:pointer;transition:all .15s;font-family:var(--sans);white-space:nowrap; }
.map-toggle-btn:hover { background:#dcfce7;border-color:#86efac; }
.map-toggle-btn.active { background:#1E553C;color:#fff;border-color:#1E553C; }
.map-toggle-btn.active svg { stroke:#fff; }
.map-toggle-btn.active .map-btn-live-dot { background:#fff;box-shadow:0 0 0 0 rgba(255,255,255,0.4); }
.map-btn-live-dot { width:7px;height:7px;border-radius:50%;background:#22c55e;flex-shrink:0;animation:map-dot-pulse 2s ease-in-out infinite;box-shadow:0 0 0 0 rgba(34,197,94,0.5); }
@keyframes map-dot-pulse { 0%,100%{box-shadow:0 0 0 0 rgba(34,197,94,0.5);} 50%{box-shadow:0 0 0 5px rgba(34,197,94,0);} }
.map-info-card { position:absolute;z-index:10;background:#fff;border:1px solid #e2e8f0;border-radius:14px;box-shadow:0 8px 32px #0000001a;padding:16px 18px;min-width:220px;max-width:280px;pointer-events:all; }
.map-info-card-name { font-size:15px;font-weight:800;color:#1E293B;margin-bottom:2px; }
.map-info-card-van { font-size:11px;color:#64748b;font-family:var(--mono);margin-bottom:10px; }
.map-info-card-row { display:flex;align-items:center;gap:8px;font-size:12px;color:#475569;margin-bottom:6px; }
.map-info-card-close { position:absolute;top:10px;right:12px;background:none;border:none;cursor:pointer;color:#94a3b8;font-size:16px;padding:0; }
.map-status-dot { width:8px;height:8px;border-radius:50%;flex-shrink:0; }
#live-map-panel { position:relative; }
/* ── HOURS BADGES (Overtime Traffic Light) ─────────── */
.hours-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 800; font-family: var(--mono); padding: 2px 8px; border-radius: 20px; background: #f1f5f9; color: #475569; cursor: default; white-space: nowrap; border: 1px solid #e2e8f0; letter-spacing: .3px; }
.hours-badge.hb-near { background: #fffbeb; color: #D97706; border-color: #fcd34d; }
.hours-badge.hb-over { background: #fef2f2; color: #B91C1C; border-color: #fca5a5; }
.hours-badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; opacity: .8; animation: hb-pulse 1.5s ease-in-out infinite; }
@keyframes hb-pulse { 0%,100%{opacity:.4} 50%{opacity:1} }
/* Available driver chip hours */
.avail-hours { margin-top: 2px; }
.tl-ride-row { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background .1s; }
.tl-ride-row:last-child { border-bottom: none; }
.tl-ride-row:hover { background: #f8fafc; }
.tl-time { font-family: var(--mono); font-size: 13px; font-weight: 800; color: #1E293B; min-width: 60px; }
.tl-status-bar { width: 3px; height: 42px; border-radius: 2px; flex-shrink: 0; }
.tl-status-bar.status-pending { background: #f59e0b; }
.tl-status-bar.status-enroute { background: #2b7fd4; }
.tl-status-bar.status-complete { background: #22c55e; }
.tl-status-bar.status-cancelled { background: #ef4444; }
.tl-content { flex: 1; min-width: 0; }
.tl-patient { font-size: 13px; font-weight: 700; color: #0f172a; }
.tl-addr { font-size: 12px; color: #64748b; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border-radius: 8px; background: #F1F5F9; color: #475569; border: 1px solid #e2e8f0; font-size: 12px; font-weight: 500; font-family: var(--sans); white-space: nowrap; box-sizing: border-box; }
.tl-badge { font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 50px; white-space: nowrap; flex-shrink: 0; letter-spacing: 0.05em; text-transform: uppercase; font-family: 'Inter', var(--sans); display: inline-flex; align-items: center; vertical-align: middle; }
.tl-badge.pending   { background: #f1f5f9; color: #64748b; }
.tl-badge.enroute   { background: #fef3c7; color: #d97706; }
.tl-badge.complete  { background: #dcfce7; color: #15803d; }
.tl-badge.cancelled { background: #fee2e2; color: #b91c1c; }
.tl-badge.waiting   { background: #ede9fe; color: #6d28d9; }
.tl-badge.ready     { background: #fff7ed; color: #c2410c; }
.tl-status-bar.status-waiting { background: #8b5cf6; }
.tl-status-bar.status-ready { background: #f97316; }
.badge-waiting { background: #ede9fe; color: #6d28d9; }
.badge-ready   { background: #fff7ed; color: #c2410c; }
.ride-card.status-waiting { border-left: 3px solid #8b5cf6; }
.ride-card.status-ready { border-left: 3px solid #f97316; }
.ready-pickup-btn { background: #f97316; color: white; border: none; border-radius: 8px; padding: 9px 18px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); transition: background .15s; white-space: nowrap; }
.ready-pickup-btn:hover { background: #ea6b0a; }
.btn-outreach { background: var(--accent); color: white; border: none; border-radius: 8px; padding: 9px 18px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); transition: background .15s; white-space: nowrap; }
.btn-outreach:hover { background: #166534; }
.btn-outreach:disabled { background: #94a3b8; cursor: not-allowed; }
/* Live indicator */
.live-dot { width:7px;height:7px;border-radius:50%;background:#10b981;display:inline-block;animation:live-pulse 2s ease-in-out infinite; }
@keyframes live-pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.8)} }
/* All Rides filter bar */
.ar-filter-bar { display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:16px;padding:10px 14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px; }
.ar-filter-pills { display:flex;gap:6px;flex-wrap:wrap; }
.ar-pill { background:white;border:1px solid #e2e8f0;color:#64748b;padding:5px 13px;border-radius:20px;font-size:12px;font-weight:600;cursor:pointer;font-family:var(--mono);transition:all .15s; }
.ar-pill:hover { border-color:#93c5fd;color:#1d4ed8; }
.ar-pill.active { background:#1d4ed8;border-color:#1d4ed8;color:white; }
.ar-status-select { border:1px solid #e2e8f0;border-radius:8px;padding:5px 10px;font-size:12px;font-family:var(--mono);color:#334155;background:white;cursor:pointer; }
/* Conflict badge */
.conflict-badge { background:#fef3c7;color:#92400e;border:1px solid #f59e0b;border-radius:5px;padding:2px 7px;font-size:11px;font-weight:700;font-family:var(--mono);margin-left:6px;vertical-align:middle; }
.waiting-notice { background: #f5f3ff; border: 1px solid #c4b5fd; border-radius: 8px; padding: 10px 14px; font-size: 13px; font-family: var(--mono); color: #6d28d9; display: flex; align-items: center; gap: 8px; }
.board-empty-state { text-align: center; padding: 64px 24px; color: #94a3b8; }
/* ── COMMAND CENTER ─────────────────────────────────────────── */
.cmd-overview { display: flex; flex-direction: column; gap: 24px; }
.cmd-greeting { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding-bottom: 4px; }
.cmd-greeting-title { font-size: 20px; font-weight: 700; color: #111827; letter-spacing: -0.02em; }
.cmd-greeting-sub { font-size: 11px; color: #94a3b8; font-family: var(--sans); font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.cmd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cmd-card { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 18px 20px; overflow: hidden; }
.cmd-card-title { font-size: 10px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px; font-family: var(--sans); display: flex; align-items: center; gap: 6px; }
/* Manager KPI drill-down cards */
.mgr-kpi-card { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.mgr-kpi-card:hover { transform: scale(1.02); box-shadow: 0 6px 20px rgba(0,0,0,.11); }
.mgr-kpi-card:active { transform: scale(0.97); }
/* Drill-down modal */
#mgr-drilldown-overlay { display:none; position:fixed; inset:0; z-index:1200; background:rgba(0,0,0,.5); backdrop-filter:blur(3px); align-items:center; justify-content:center; padding:16px; }
#mgr-drilldown-overlay.open { display:flex; }
#mgr-drilldown-sheet { background:#fff; border-radius:20px; width:100%; max-width:680px; max-height:88vh; display:flex; flex-direction:column; overflow:hidden; animation:mgrSheetUp .25s cubic-bezier(.2,.8,.4,1); }
@keyframes mgrSheetUp { from { transform:translateY(60px); opacity:0; } to { transform:translateY(0); opacity:1; } }
.mgr-drilldown-header { padding:20px 20px 14px; border-bottom:1px solid #f1f5f9; display:flex; align-items:flex-start; justify-content:space-between; flex-shrink:0; gap:12px; }
.mgr-drilldown-title { font-size:18px; font-weight:800; color:#0f172a; }
.mgr-drilldown-subtitle { font-size:11px; color:#94a3b8; font-family:var(--mono); margin-top:3px; }
.mgr-drilldown-close { width:34px; height:34px; border-radius:50%; background:#f1f5f9; border:none; cursor:pointer; font-size:15px; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.mgr-drilldown-close:hover { background:#e2e8f0; }
.mgr-drilldown-body { overflow-y:auto; flex:1; padding:4px 20px 20px; -webkit-overflow-scrolling:touch; }
.mgr-drilldown-summary { background:#f8fafc; border-radius:12px; padding:14px 16px; margin:12px 0 16px; display:flex; gap:20px; flex-wrap:wrap; }
.mgr-summary-pill strong { color:#0f172a; font-size:16px; font-weight:800; display:block; line-height:1.1; }
.mgr-summary-pill { font-size:10px; font-family:var(--mono); color:#64748b; text-transform:uppercase; letter-spacing:.5px; }
.mgr-drill-row { display:flex; align-items:center; justify-content:space-between; padding:12px 0; border-bottom:1px solid #f8fafc; gap:12px; }
.mgr-drill-row:last-child { border-bottom:none; }
.mgr-drill-left { flex:1; min-width:0; }
.mgr-drill-date { font-size:10px; font-family:var(--mono); color:#94a3b8; text-transform:uppercase; letter-spacing:.5px; margin-bottom:2px; }
.mgr-drill-name { font-size:14px; font-weight:700; color:#0f172a; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mgr-drill-sub { font-size:11px; color:#64748b; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mgr-drill-right { text-align:right; flex-shrink:0; }
.mgr-drill-val { font-size:16px; font-weight:800; }
.mgr-drill-badge { display:inline-block; font-size:9px; font-family:var(--mono); font-weight:700; letter-spacing:.5px; text-transform:uppercase; padding:3px 9px; border-radius:20px; }
.mgr-drill-badge.complete { background:#f0fdf4; color:#1E553C; }
.mgr-drill-badge.pending { background:#fffbeb; color:#92400e; }
.mgr-drill-badge.cancelled { background:#fef2f2; color:#b91c1c; }
.mgr-drill-badge.enroute { background:#eff6ff; color:#1d4ed8; }
.mgr-drill-empty { text-align:center; padding:48px 20px; color:#94a3b8; font-family:var(--mono); font-size:13px; }
.cmd-card-title-icon { font-size: 13px; }
.cmd-tomorrow-date { font-size: 15px; font-weight: 800; color: #0f172a; margin-bottom: 4px; }
.cmd-tomorrow-count { font-size: 28px; font-weight: 900; color: #1E293B; line-height: 1; }
.cmd-tomorrow-label { font-size: 11px; color: #64748b; font-family: var(--mono); margin-bottom: 10px; }
.cmd-tomorrow-first { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #475569; background: #f8fafc; border: 1px solid #e9eef4; border-radius: 8px; padding: 8px 12px; }
.cmd-tomorrow-first-time { font-family: var(--mono); font-weight: 700; color: #1E293B; }
.cmd-tomorrow-none { font-size: 13px; color: #94a3b8; font-family: var(--mono); padding: 10px 0; }
.cmd-labor-row { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #f1f5f9; }
.cmd-labor-row:last-child { border-bottom: none; }
.cmd-labor-name { font-size: 12px; font-weight: 600; color: #0f172a; }
.cmd-labor-bar-wrap { flex: 1; margin: 0 10px; height: 5px; background: #f1f5f9; border-radius: 3px; overflow: hidden; }
.cmd-labor-bar { height: 100%; border-radius: 3px; transition: width .4s ease; }
.cmd-labor-hrs { font-size: 11px; font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.cmd-fleet-panel { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 18px 20px; }
.cmd-fleet-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f8fafc; }
.cmd-fleet-row:last-child { border-bottom: none; }
.cmd-fleet-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cmd-fleet-name { font-size: 13px; font-weight: 600; color: #0f172a; flex: 1; }
.cmd-fleet-van { font-size: 11px; color: #94a3b8; font-family: var(--mono); }
.cmd-fleet-status { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.cmd-fleet-status.online { background: #dcfce7; color: #1E553C; }
.cmd-fleet-status.offline { background: #f1f5f9; color: #94a3b8; }
.cmd-no-data { font-size: 12px; color: #94a3b8; font-family: var(--mono); padding: 8px 0; }
@media (max-width: 600px) { .cmd-grid { grid-template-columns: 1fr; } .cmd-greeting-title { font-size: 17px; } }
@media (min-width: 1024px) and (orientation: landscape) {
  .cmd-grid { grid-template-columns: 1fr 1fr 1fr; }
  .cmd-fleet-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .cmd-fleet-panel .cmd-card-title { grid-column: 1 / -1; }
}
/* All Rides tab — consumer-grade information hierarchy */
.ride-card { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px 20px; cursor: pointer; transition: all .18s; box-shadow: 0 1px 4px #0000000a; }
.ride-card:hover { border-color: #94a3b8; box-shadow: 0 6px 20px #00000014; transform: translateY(-1px); }
.ride-card.status-pending { border-left: 4px solid var(--accent2); }
.ride-card.status-enroute { border-left: 4px solid var(--blue); }
.ride-card.status-complete { border-left: 4px solid var(--green); opacity: .85; }
.ride-card.status-cancelled { border-left: 4px solid var(--red); opacity: .5; }
.ride-time { font-family: var(--mono); font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.ride-patient { font-size: 20px; font-weight: 800; margin: 6px 0 8px; color: #0f172a; line-height: 1.1; letter-spacing: -.3px; }
.ride-addr { font-size: 13px; color: #475569; line-height: 1.6; }
/* ── Unified status pill — all ride/trip status badges ─────────── */
.ride-status-badge {
  display: inline-flex; align-items: center; vertical-align: middle;
  font-size: 11px; font-family: 'Inter', var(--sans); font-weight: 600;
  height: 28px; padding: 0 10px; border-radius: 8px;
  text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap; flex-shrink: 0; box-sizing: border-box;
}
/* Emerald — Done / Complete */
.badge-complete, .badge-completed, .badge-done { background: #dcfce7; color: #15803d; }
/* Indigo — Invoiced */
.badge-invoiced { background: #e0e7ff; color: #4338ca; }
/* Amber — En Route / Dispatched */
.badge-enroute, .badge-dispatched { background: #fef3c7; color: #d97706; }
/* Slate — Pending / New / No-show */
.badge-pending, .badge-noshow, .badge-no-show { background: #f1f5f9; color: #64748b; }
/* Red — Cancelled */
.badge-cancelled, .badge-cancel { background: #fee2e2; color: #b91c1c; }
/* Violet — Waiting */
.badge-waiting { background: #ede9fe; color: #6d28d9; }
/* Orange — Ready */
.badge-ready { background: #fff7ed; color: #c2410c; }

/* ── ADD RIDE FORM ─────────────────────────────────────── */
.add-ride-btn {
background: var(--accent) !important; color: white !important; border: none; border-radius: 999px;
padding: 10px 22px; font-family: var(--sans); font-size: 14px; font-weight: 700;
cursor: pointer; transition: all .15s; display: flex; align-items: center; gap: 6px;
}
.add-ride-btn:hover { background: var(--accent2) !important; }
.modal-overlay {
display: none; position: fixed; inset: 0; background: #000a; z-index: 200;
align-items: center; justify-content: center; padding: 24px;
overflow-x: hidden;
}
.modal-overlay.open { display: flex; }
.modal { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 16px; width: 100%; max-width: 750px; max-height: 90vh; overflow: hidden; box-shadow: 0 8px 40px rgba(0,0,0,0.12); display: flex; flex-direction: column; }
.modal-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 24px; flex: 1; -webkit-overflow-scrolling: touch; }
.modal-title { font-size: 22px; font-weight: 800; margin-bottom: 24px; color: #0f172a; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form-group label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b; font-family: var(--sans); font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
background: #F8FAFC; border: 1.5px solid #e2e8f0; border-radius: 12px;
color: #0f172a; padding: 11px 14px; font-family: 'Inter', var(--sans); font-size: 14px;
transition: border-color .15s, box-shadow .15s; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #0c1623; box-shadow: 0 0 0 3px rgba(12,22,35,0.08); }
.form-group textarea { resize: vertical; min-height: 72px; }
.form-group select option { background: #ffffff; color: #0f172a; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* ── Passenger modal — compact 2-col layout ──────────────────────── */
.pax-section-header {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: #94a3b8;
  margin: 14px 0 8px; padding-bottom: 5px;
  border-bottom: 1px solid #f1f5f9;
}
.pax-modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  align-items: center; flex-wrap: wrap;
  padding: 12px 16px 16px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 0 0 16px 16px;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .pax-modal-footer { gap: 8px; padding: 10px 12px 14px; }
  .pax-modal-footer .btn-cancel,
  .pax-modal-footer .btn-submit { flex: 1; text-align: center; min-width: 0; padding: 11px 8px; font-size: 13px; }
  .pax-modal-footer #pax-schedule-btn { margin-right: 0 !important; }
}
#passenger-modal .form-group { margin-bottom: 12px; }
#passenger-modal .form-group label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: #64748b; margin-bottom: 1px;
}
#passenger-modal .form-group input,
#passenger-modal .form-group select,
#passenger-modal .form-group textarea {
  padding: 8px 10px; font-size: 13px;
}
#passenger-modal .form-group textarea { min-height: 54px; resize: vertical; }
#passenger-modal .pax-section-header:first-of-type { margin-top: 6px; }
.btn-cancel { background: white; border: 1px solid #CBD5E1; color: #475569; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-family: var(--sans); font-size: 14px; font-weight: 600; transition: border-color .14s, background .14s, color .14s; }
.btn-cancel:hover { background: #f8fafc; border-color: #94a3b8; color: #0f172a; }
.btn-submit { background: var(--accent) !important; color: white; border: none; padding: 10px 24px; border-radius: 999px; cursor: pointer; font-family: var(--sans); font-size: 14px; font-weight: 700; }
.btn-submit:hover { background: var(--accent2) !important; }

/* Notification bell */
.notif-bell { position: relative; cursor: pointer; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.75); width: 36px; height: 36px; border-radius: 50%; transition: background .12s, color .12s; }
.notif-bell:hover { background: rgba(255,255,255,.1); color: #fff; }
.notif-dot { position: absolute; top: -2px; right: -2px; width: 8px; height: 8px; background: var(--red); border-radius: 50%; border: 2px solid var(--surface); }
.alert-count-badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; background: #ef4444; border-radius: 9px; border: 2px solid #1E293B; font-size: 9px; font-weight: 800; color: #fff; display: flex; align-items: center; justify-content: center; padding: 0 3px; font-family: var(--mono); line-height: 1; pointer-events: none; }
/* ── ALERT DRAWER ────────────────────────────────────────── */
.alert-drawer { position: fixed; top: calc(56px + env(safe-area-inset-top, 20px)); right: 0; width: min(100vw, 380px); background: #1E293B; z-index: 350; box-shadow: -6px 0 40px rgba(0,0,0,.4); transform: translateX(100%); transition: transform .26s cubic-bezier(.4,0,.2,1); overflow-y: auto; max-height: calc(100dvh - 56px - env(safe-area-inset-top, 20px)); border-left: 2px solid rgba(21,128,61,.3); }
.alert-drawer.open { transform: translateX(0); }
.alert-drawer-hd { padding: 16px 20px 13px; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: #1E293B; z-index: 1; }
.alert-drawer-title { font-size: 14px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 8px; letter-spacing: .3px; }
.alert-drawer-close { background: rgba(255,255,255,.1); border: none; color: #fff; border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 15px; line-height: 1; }
.alert-drawer-close:hover { background: rgba(255,255,255,.2); }
.alert-item { padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,.06); display: flex; align-items: flex-start; gap: 12px; cursor: pointer; transition: background .1s; }
.alert-item:hover { background: rgba(255,255,255,.04); }
.alert-item:last-child { border-bottom: none; }
.alert-item-body { flex: 1; min-width: 0; }
.alert-item-title { font-size: 13px; font-weight: 800; color: #fff; line-height: 1.4; }
.alert-item-sub { font-size: 11px; color: #94a3b8; font-family: var(--mono); margin-top: 3px; }
.alert-item.critical .alert-item-title { color: #fca5a5; }
.alert-item.warning .alert-item-title { color: #fbbf24; }
.alert-empty { padding: 48px 20px; text-align: center; color: #475569; font-family: var(--mono); font-size: 13px; }
.alert-empty-icon { font-size: 40px; margin-bottom: 12px; }

/* ── Tasks / Todos Drawer ───────────────────────────────────────────────────── */
.task-drawer { border-left-color: rgba(245,158,11,.4) !important; }
.task-section-hd { padding: 10px 20px 6px; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: #64748b; border-bottom: 1px solid rgba(255,255,255,.06); margin-top: 4px; }
.task-item { padding: 13px 20px; border-bottom: 1px solid rgba(255,255,255,.06); display: flex; align-items: flex-start; gap: 12px; cursor: pointer; transition: background .1s; }
.task-item:hover { background: rgba(255,255,255,.05); }
.task-item:last-child { border-bottom: none; }
.task-item-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; line-height: 1; }
.task-item-body { flex: 1; min-width: 0; }
.task-item-title { font-size: 13px; font-weight: 700; color: #f1f5f9; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-item-sub { font-size: 11px; color: #64748b; margin-top: 3px; font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-item-sub.urgent { color: #f87171; }
.task-item-sub.warning { color: #fbbf24; }
.task-item-chip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; margin-left: 6px; vertical-align: middle; }
.task-chip-overdue { background: rgba(239,68,68,.18); color: #f87171; }
.task-chip-today { background: rgba(245,158,11,.18); color: #fbbf24; }
.task-chip-stale { background: rgba(100,116,139,.18); color: #94a3b8; }
.task-chip-ride { background: rgba(59,130,246,.18); color: #93c5fd; }
.task-footer-note { padding: 14px 20px; font-size: 11px; color: #475569; text-align: center; font-family: var(--mono); }
/* ── COMPLIANCE DASHBOARD ───────────────────────────────── */
.comp-section { margin-top: 32px; padding-top: 24px; border-top: 1px solid #f1f5f9; }
.comp-section-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.comp-section-title { font-size: 14px; font-weight: 800; color: #0f172a; display: flex; align-items: center; gap: 8px; }
.comp-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: #fff; border: 1.5px solid #e2e8f0; margin-bottom: 8px; cursor: pointer; transition: box-shadow .12s; }
.comp-row:hover { box-shadow: 0 4px 12px rgba(0,0,0,.07); }
.comp-row.comp-ok { border-color: #86efac; }
.comp-row.comp-warn { border-color: #f59e0b; background: #fffbeb; }
.comp-row.comp-crit { border-color: #ef4444; background: #fef2f2; }
.comp-veh-name { font-size: 13px; font-weight: 800; color: #0f172a; font-family: var(--mono); letter-spacing: .5px; min-width: 60px; }
.comp-veh-type { font-size: 9px; color: #94a3b8; text-transform: uppercase; letter-spacing: .8px; font-family: var(--mono); margin-top: 1px; }
.comp-items { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.comp-item-line { font-size: 11px; font-family: var(--mono); }
.comp-item-line.ok { color: #1E553C; }
.comp-item-line.warn { color: #d97706; font-weight: 700; }
.comp-item-line.crit { color: #dc2626; font-weight: 800; }
.comp-badge { flex-shrink: 0; font-size: 9px; font-weight: 800; padding: 3px 9px; border-radius: 20px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .5px; }
.comp-badge.ok { background: #dcfce7; color: #1E553C; }
.comp-badge.warn { background: #fef3c7; color: #92400e; }
.comp-badge.crit { background: #fee2e2; color: #991b1b; animation: pulse-maint 1.4s ease-in-out infinite; }

/* ── DRIVER VIEW ─────────────────────────────────────── */
.driver-view-header { margin-bottom: 24px; }
.driver-greeting { font-size: 28px; font-weight: 700; color: #111827; letter-spacing: -0.02em; }
.driver-greeting .name { color: var(--accent); }
.driver-date { font-family: var(--sans); font-size: 15px; font-weight: 500; color: #475569; margin-top: 4px; }
.driver-ride-list { display: flex; flex-direction: column; gap: 14px; }
.weather-widget { background:#ffffff; border:1px solid #e2e8f0; border-radius:10px; padding:11px 14px; margin-bottom:14px; display:flex; align-items:flex-start; gap:11px; }
.weather-icon { font-size:30px; line-height:1; flex-shrink:0; margin-top:1px; }
.weather-temp { font-size:24px; font-weight:800; color:#0f172a; font-family:var(--sans); line-height:1.1; }
.weather-desc { font-size:12px; color:#475569; font-family:var(--mono); margin-left:2px; }
.weather-city { font-size:11px; color:#94a3b8; font-family:var(--mono); margin-top:3px; }
.weather-wind { font-size:11px; color:#64748b; font-family:var(--mono); }
.weather-alert-badge { background:#fee2e2; color:#b91c1c; border:1px solid #fca5a5; border-radius:6px; padding:3px 8px; font-size:10px; font-weight:700; font-family:var(--mono); letter-spacing:.2px; display:inline-flex; align-items:center; gap:3px; margin-top:5px; line-height:1.3; }
.weather-loading { font-size:11px; color:#94a3b8; font-family:var(--mono); padding:2px 0; }
.driver-ride-full {
background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px;
padding: 16px; transition: all .15s;
}
.driver-ride-full.status-pending { border-left: 4px solid #f97316; }
.driver-ride-full.status-enroute { border-left: 4px solid #2b7fd4; }
.driver-ride-full.status-complete { border-left: 4px solid #22c55e; opacity: .85; }
.driver-ride-full.status-cancelled { border-left: 4px solid #ef4444; opacity: .6; }
.drf-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.drf-time { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--accent); }
.drf-patient { font-size: 20px; font-weight: 800; margin: 6px 0 4px; color: #0f172a; }
.drf-addr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.drf-addr-block { background: #f8fafc; border-radius: 5px; padding: 9px 12px; border: 1px solid #e2e8f0; }
.drf-addr-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: #64748b; font-family: var(--mono); margin-bottom: 3px; font-weight: 700; }
.drf-addr-val { font-size: 13px; font-weight: 700; color: #0f172a; }
.drf-notes { font-size: 12px; color: #475569; margin-top: 6px; background: #f8fafc; border-radius: 8px; padding: 8px 12px; font-style: italic; border: 1px solid #dde3ea; }
.drf-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
/* ── Linear driver action button ──────────────────────────────── */
.dri-primary-btn {
  width: 100%; min-height: 60px; border-radius: 14px; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 17px; font-weight: 700; letter-spacing: -0.1px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: opacity .15s, transform .1s; -webkit-tap-highlight-color: transparent;
}
.dri-primary-btn:active { opacity: .85; transform: scale(.98); }
.dri-primary-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.dri-primary-btn.step-arrive  { background: #1e3a5f; color: #fff; }
.dri-primary-btn.step-board   { background: #1E553C; color: #fff; }
.dri-primary-btn.step-complete { background: #16a34a; color: #fff; }
.dri-primary-btn.step-return  { background: #ea580c; color: #fff; }
.dri-primary-btn.step-destination { background: #7c3aed; color: #fff; }
.dri-nav-secondary {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: #475569; font-size: 13px; font-family: var(--sans); text-decoration: none;
  padding: 10px 16px; border-radius: 10px; background: #f8fafc;
  border: 1.5px solid #e2e8f0; font-weight: 600; min-height: 44px;
}
.dri-nav-secondary:hover { background: #e9eef4; border-color: #94a3b8; }
/* ── Step progress dots ───────────────────────────────────────── */
.dri-step-progress {
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.dri-step-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #e2e8f0; flex-shrink: 0;
}
.dri-step-dot.done   { background: #86efac; }
.dri-step-dot.active { background: #1E553C; width: 20px; border-radius: 4px; }
.dri-step-label {
  font-size: 11px; font-family: var(--mono); color: #94a3b8;
  margin-left: 4px; letter-spacing: 0.5px;
}
/* ── Advanced Options toggle (Add Ride form) ─────────────────── */
.adv-options-toggle {
  display: flex; align-items: center; gap: 8px; background: none; border: none;
  cursor: pointer; color: #64748b; font-size: 13px; font-family: var(--sans);
  font-weight: 600; padding: 10px 0 6px; width: 100%; text-align: left;
  border-top: 1px solid #f1f5f9; margin-top: 4px;
}
.adv-options-toggle:hover { color: #1E553C; }
.adv-chevron { font-size: 9px; transition: transform .2s; display: inline-block; color: #94a3b8; }
.adv-options-toggle.open .adv-chevron { transform: rotate(90deg); }
.adv-options-section { display: none; }
.adv-options-section.open { display: block; }
.status-btn {
  padding: 13px 20px; border-radius: 10px; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 14px; font-weight: 700; transition: all .15s;
  min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
.status-btn.enroute { background: #1E553C; color: white; border: none; }
.status-btn.enroute:hover { background: #124027; }
.status-btn.complete { background: #22c55e; color: white; border: none; }
.status-btn.complete:hover { background: #1E553C; }
.status-btn.cancel { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }
.status-btn.cancel:hover { background: #ef4444; color: white; }
.status-btn.nav-btn { background: #f1f5f9; color: #334155; border: 1.5px solid #cbd5e1; text-decoration: none; }
.status-btn.nav-btn:hover { background: #e2e8f0; border-color: #94a3b8; }
.status-btn:disabled { opacity: 0.65; cursor: not-allowed; pointer-events: none; }
.btn-submit:disabled { opacity: 0.65; cursor: not-allowed; }
.drf-special-needs { background: #fffbeb; border: 1.5px solid #f59e0b; border-radius: 8px; padding: 10px 14px; margin-top: 10px; font-size: 13.5px; color: #92400e; line-height: 1.5; }
/* Landscape / tablet: 2-column ride card grid */
.drf-day-grid { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 769px) {
  .drf-day-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  .driver-ride-list { gap: 28px; }
  .drf-actions { gap: 12px; flex-wrap: nowrap; }
  .driver-ride-full { padding: 18px 20px; }
  /* Cockpit-grade action buttons — unmissable on an iPad landscape */
  .status-btn { min-height: 64px; font-size: 16px; border-radius: 12px; }
  .status-btn.enroute { min-height: 72px; font-size: 18px; font-weight: 800; flex: 1; }
  .status-btn.complete { min-height: 72px; font-size: 18px; font-weight: 800; flex: 1; }
  .status-btn.nav-btn { min-height: 64px; font-size: 16px; }
}
/* Driver sticky top panel — pins greeting + weather on iPad/tablet */
.driver-top-sticky { margin-bottom: 16px; }
@media (min-width: 769px) {
  .driver-top-sticky {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #F4F7F9;
    margin: -24px -24px 20px;
    padding: 20px 24px 14px;
    border-bottom: 1px solid #EEEEEE;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  }
  .driver-view-header { margin-bottom: 8px; }
  /* Prominent call buttons on iPad — full-width CTA strip */
  .drf-call-row { margin-top: 16px; gap: 14px; }
  .call-btn { min-height: 56px; font-size: 16px; flex: 1; justify-content: center; letter-spacing: -.1px; }
}
/* Landscape phone (short viewport) also triggers 2-col */
@media (orientation: landscape) and (max-height: 550px) {
  .drf-day-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .driver-view-header { margin-bottom: 14px; }
  .weather-widget { padding: 8px 12px; margin-bottom: 10px; }
}
/* Mobile: stack buttons full-width for easy cradle tapping */
@media (max-width: 600px) {
  .drf-actions { flex-direction: column; gap: 10px; }
  .status-btn { width: 100%; min-height: 52px; font-size: 15px; }
}

@keyframes sxnFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* Notification toast */
.toast-container {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  z-index: 9500; display: flex; flex-direction: column; align-items: center; gap: 10px;
  pointer-events: none;
}
.toast {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  padding: 16px 22px 16px 20px;
  min-width: 380px; max-width: 480px;
  box-shadow: 0 18px 48px -16px rgba(15, 23, 42, 0.28), 0 4px 12px rgba(15, 23, 42, 0.06);
  display: flex; align-items: flex-start; gap: 14px;
  animation: toastIn .35s cubic-bezier(.22,1,.36,1);
  transform-origin: top center;
  pointer-events: auto;
  overflow: hidden;
}
.toast.hide { animation: toastOut .22s ease forwards; }
/* Colored accent bar (left edge) — color set per type */
.toast::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: #1E553C;
}
.toast-icon-wrap {
  flex-shrink: 0;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(30, 85, 60, 0.10);
  color: #1E553C;
  font-size: 18px;
  font-weight: 700;
}
.toast-body { flex: 1; min-width: 0; padding-top: 2px; }
.toast-body .toast-title { font-size: 15px; font-weight: 700; color: #0c1623; line-height: 1.2; }
.toast-body .toast-msg { font-size: 13.5px; color: #475569; margin-top: 4px; line-height: 1.45; }
.toast-close {
  flex-shrink: 0; background: transparent; border: 0; cursor: pointer;
  color: #94a3b8; padding: 2px; margin: -2px -4px 0 0; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.toast-close:hover { color: #0c1623; background: #f1f5f9; }
/* Type variants — accent bar + icon tint */
.toast.t-success::before { background: #10b981; }
.toast.t-success .toast-icon-wrap { background: rgba(16, 185, 129, 0.12); color: #047857; }
.toast.t-error::before   { background: #ef4444; }
.toast.t-error   .toast-icon-wrap { background: rgba(239, 68, 68, 0.12);  color: #b91c1c; }
.toast.t-warn::before    { background: #f59e0b; }
.toast.t-warn    .toast-icon-wrap { background: rgba(245, 158, 11, 0.14); color: #b45309; }
.toast.t-info::before    { background: #3b82f6; }
.toast.t-info    .toast-icon-wrap { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }
.toast.t-loading::before { background: #64748b; }
.toast.t-loading .toast-icon-wrap { background: rgba(100, 116, 139, 0.12); color: #475569; }
.toast.t-loading .toast-icon-wrap svg { animation: spin 1s linear infinite; }
.toast.new-ride::before  { background: var(--accent, #1E553C); }
@keyframes toastIn  { from { transform: translateY(-24px) scale(.96); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes toastOut { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-16px); opacity: 0; } }
@media (max-width: 520px) {
  .toast-container { left: 12px; right: 12px; top: 12px; transform: none; }
  .toast { min-width: 0; max-width: 100%; width: 100%; padding: 14px 16px; }
  .toast-body .toast-title { font-size: 14px; }
  .toast-body .toast-msg   { font-size: 12.5px; }
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
#driver-refresh-btn:hover { background: #f1f5f9 !important; color: #1e40af !important; }
#driver-refresh-btn.spinning #driver-refresh-icon { animation: spin 0.6s linear; }

/* Week strip */
.jb-week-strip-sticky { position:sticky; top:0; z-index:50; background:#F8FAFC; padding:10px 0 8px; margin:0 -24px 12px; padding-left:24px; padding-right:24px; border-bottom:1px solid #f1f5f9; box-shadow:0 2px 8px rgba(0,0,0,0.04); }
.wdp { flex:1 1 0; min-width:0; display:flex; flex-direction:column; align-items:center; gap:2px; padding:5px 4px; border-radius:8px; cursor:pointer; border:1.5px solid #e2e8f0; background:#ffffff; transition:all .15s; }
.wdp:hover { background:#f0fdf4; border-color:#1E553C; }
.wdp.wdp-selected { border-color:#1E553C; background:#f0fdf4; }
.wdp.wdp-today .wdp-label { color:#1E553C; font-weight:800; }
.wdp-label { font-size:9px; font-family:var(--mono); text-transform:uppercase; letter-spacing:.5px; color:#64748b; font-weight:700; }
.wdp.wdp-today .wdp-label { color:#1E553C; }
.wdp-num { font-size:16px; font-weight:700; color:#0f172a; line-height:1; }
.wdp.wdp-selected .wdp-num { color:#1E553C; font-weight:900; }
.wdp-badge { background:#1E553C; color:white; font-size:10px; font-weight:800; font-family:var(--mono); border-radius:20px; padding:1px 7px; min-width:20px; text-align:center; }
.wdp-dot { width:5px; height:5px; border-radius:50%; background:transparent; }

/* Tidy native date/time inputs */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator { opacity: 0.4; cursor: pointer; }
input[type="date"], input[type="time"] { color-scheme: light; }

/* Ride detail modal */
.detail-field { margin-bottom: 14px; }
.detail-label { font-size: 11px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 4px; }
.detail-val { font-size: 15px; font-weight: 600; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.detail-actions button { padding: 11px 8px; font-size: 13px; font-weight: 700; font-family: var(--sans); border-radius: 10px; cursor: pointer; transition: all .14s; text-align: center; white-space: nowrap; min-height: 42px; box-sizing: border-box; }
.detail-actions .btn-outreach,
.detail-actions .ready-pickup-btn,
.detail-actions #dm-complete-btn { grid-column: 1 / -1; }
.detail-actions .btn-submit { border-radius: 10px !important; padding: 11px 8px !important; }
.detail-actions .btn-cancel { border-radius: 10px; padding: 11px 8px; font-size: 13px; }
.dm-quick-actions { display: flex; gap: 8px; margin-top: 20px; margin-bottom: 0; }
.dm-qa-btn { flex: 1; padding: 10px 6px; border-radius: 10px; border: 1.5px solid #e2e8f0; background: #f8fafc; color: #0f172a; font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .14s, border-color .14s, box-shadow .14s; white-space: nowrap; }
.dm-qa-btn:hover { background: #f1f5f9; border-color: #cbd5e1; box-shadow: 0 2px 6px rgba(0,0,0,.07); }
.dm-qa-call { background: #f0fdf4; color: #1E553C; border-color: #86efac; }
.dm-qa-call:hover { background: #dcfce7; border-color: #4ade80; }
.dm-qa-print { background: #f8fafc; color: #475569; border-color: #e2e8f0; }
/* Detail modal editable inputs */
.dm-field { width: 100%; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 12px; font-family: var(--sans); font-size: 14px; color: #0f172a; background: #f8fafc; outline: none; box-sizing: border-box; transition: border-color .15s, background .15s; -webkit-appearance: none; appearance: none; }
.dm-field:focus { border-color: #064E3B; background: #fff; box-shadow: 0 0 0 3px rgba(6,78,59,.08); }
.dm-field[readonly], .dm-field:disabled { background: #f1f5f9; color: #64748b; cursor: default; }
textarea.dm-field { resize: vertical; min-height: 58px; }
select.dm-field { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
#dm-edit-section { margin-bottom: 6px; }
#dm-edit-section .form-group { margin-bottom: 10px; }
.btn-danger { background: white; color: #dc2626; border: 1.5px solid #fca5a5; padding: 8px 16px; border-radius: 8px; cursor: pointer; font-family: var(--sans); font-size: 13px; font-weight: 700; transition: all .15s; }
.btn-danger:hover { background: #fef2f2; border-color: #f87171; }
.btn-delete { background: white; color: #dc2626; border: 1.5px solid #fca5a5; padding: 8px 16px; border-radius: 8px; cursor: pointer; font-family: var(--sans); font-size: 13px; font-weight: 700; transition: all .15s; }
.btn-delete:hover { background: #fef2f2; border-color: #f87171; }
.btn-primary { background: var(--accent); color: white; border: none; padding: 8px 16px; border-radius: 8px; cursor: pointer; font-family: var(--sans); font-size: 13px; font-weight: 700; }

/* Responsive */
@media (max-width: 800px) {
.board-sidebar { width: 180px; min-width: 180px; max-width: 180px; }
}
@media (max-width: 600px) {
.tab-content { padding: 12px 14px; }
.board-sidebar { display: none; }
.board-shell { margin: 0; min-height: 0; display: block; }
.board-main { overflow-y: visible; padding: 0 0 90px; }
.board-main-actions { margin-bottom: 12px; }
.form-row { grid-template-columns: 1fr; }
#add-driver-modal .modal-scroll > div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
.topbar { padding: 0 24px; padding-top: env(safe-area-inset-top, 20px); }
.rep-filter-grid { grid-template-columns: 1fr 1fr !important; }
.map-toggle-btn { font-size: 11px; padding: 6px 10px; }
.add-ride-btn { font-size: 12px; padding: 7px 12px; }

/* ── Full-screen sliding sheet modals on mobile ─────────────────── */
.modal-overlay { align-items: flex-end; padding: 0; }
.modal {
  width: 100%;
  max-width: 100%;
  max-height: 95vh;
  border-radius: 20px 20px 0 0 !important;
}
.modal-scroll {
  padding: 0 20px calc(20px + env(safe-area-inset-bottom, 0px));
}
.modal::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 2px;
  margin: 12px auto 20px;
}
/* ── Touch-friendly form controls inside mobile sheets ──────────── */
.modal-scroll input,
.modal-scroll select,
.modal-scroll textarea {
  min-height: 48px;
  font-size: 16px; /* prevents iOS auto-zoom on focus */
}
.modal-actions .btn,
.modal-actions button,
.modal-scroll .btn,
.modal-scroll button[type="submit"],
.modal-scroll button[type="button"] {
  min-height: 48px;
}

/* ── User table: hide Role column, compact cells ─────────────── */
.user-table th:nth-child(2),
.user-table td:nth-child(2) { display: none; }
.user-table th,
.user-table td { padding: 10px 10px; font-size: 13px; }
.user-table th:last-child,
.user-table td:last-child { padding-right: 10px; }
.toggle-active-btn { font-size: 10px; padding: 3px 6px; }
.dcard-del-btn { padding: 5px 8px; font-size: 11px; }

/* ── Role legend: hide on mobile (too wide) ──────────────────── */
#users-role-legend { display: none !important; }

/* ── Map banner: hide dev setup instructions on mobile ───────── */
#map-settings-panel .map-setup-hint { display: none; }
}

/* ── FLEET MODULE ─────────────────────────────────────────────── */
/* ── FLEET LAYOUT ────────────────────────────────────────────── */
.fleet-section-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.fleet-section-title { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 1.2px; font-family: var(--mono); padding-bottom: 8px; border-bottom: 1px solid #f1f5f9; margin-bottom: 12px; }
.fleet-roster-section { margin-top: 36px; padding-top: 28px; border-top: 1px solid #f1f5f9; }
/* ── VEHICLE CARDS ───────────────────────────────────────────── */
.veh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 16px; }
@media (max-width: 600px) { .veh-grid { grid-template-columns: 1fr; } }
@media (min-width: 768px) and (orientation: landscape) { .veh-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
.veh-card { background: #fff; border: 1.5px solid #e2e8f0; border-radius: 16px; overflow: hidden; cursor: pointer; transition: all .15s; display: flex; flex-direction: column; }
.veh-card:hover { border-color: #1E293B; box-shadow: 0 6px 20px rgba(0,0,0,.09); transform: translateY(-1px); }
.veh-card.maint-amber { border-color: #f59e0b; }
.veh-card.maint-red { border-color: #ef4444; }
.veh-card-head { background: #1E293B; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; }
.veh-card-num { font-size: 16px; font-weight: 900; color: #fff; font-family: var(--mono); letter-spacing: 1px; text-transform: uppercase; }
.veh-card-body { padding: 16px 18px; flex: 1; }
.veh-card-plate { font-size: 20px; font-weight: 800; color: #0f172a; font-family: var(--mono); letter-spacing: 1.5px; }
.veh-card-meta { font-size: 12px; color: #64748b; margin-top: 4px; }
.veh-card-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 14px 0; }
.veh-stat-mini { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; text-align: center; }
.veh-stat-mini-val { font-size: 14px; font-weight: 800; color: #0f172a; font-family: var(--mono); line-height: 1.1; }
.veh-stat-mini-label { font-size: 9px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.veh-driver-row { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; border-radius: 8px; padding: 6px 10px; }
.veh-driver-row.on { color: #1E553C; background: #f0fdf4; border: 1px solid #86efac; }
.veh-driver-row.off { color: #94a3b8; background: #f8fafc; border: 1px solid #e2e8f0; }
/* ── STATUS CHIPS ────────────────────────────────────────────── */
.veh-status-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 20px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
.veh-status-chip.active { background: #dcfce7; color: #1E553C; border: 1px solid #86efac; }
.veh-status-chip.service { background: #fef9c3; color: #92400e; border: 1px solid #fde047; }
.veh-status-chip.offduty { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.veh-status-chip.inactive { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
/* ── MAINTENANCE TRACKER (modal) ─────────────────────────────── */
.maint-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; }
.maint-title { font-size: 12px; font-weight: 700; color: #0f172a; margin-bottom: 10px; }
.maint-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #475569; margin-bottom: 6px; }
.maint-row strong { font-family: var(--mono); font-size: 12px; font-weight: 700; color: #0f172a; }
.maint-warn { background: #fef9c3; border: 1px solid #fde047; border-radius: 8px; padding: 8px 12px; font-size: 12px; font-family: var(--mono); color: #92400e; display: flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 700; }
.maint-ok { background: #f0fdf4; border: 1px solid #86efac; border-radius: 8px; padding: 8px 12px; font-size: 12px; font-family: var(--mono); color: #1E553C; display: flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 700; }
/* Shift vehicle selection modal */
.shift-modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
.shift-modal { background: #ffffff; border-radius: 20px; width: 100%; max-width: 420px; box-shadow: 0 24px 64px #00000030; }
.shift-modal-header { padding: 28px 24px 0; text-align: center; }
.shift-modal-title { font-size: 20px; font-weight: 800; color: #0f172a; }
.shift-modal-sub { font-size: 13px; color: #64748b; font-family: var(--mono); margin-top: 6px; }
.shift-modal-list { padding: 16px; display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.shift-veh-btn { display: flex; align-items: center; gap: 14px; background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: all .15s; text-align: left; width: 100%; }
.shift-veh-btn:hover { border-color: #1E293B; background: #f0f4ff; }
.shift-veh-icon { width: 40px; height: 40px; border-radius: 10px; background: #1E293B; color: white; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.shift-veh-name { font-size: 15px; font-weight: 700; color: #0f172a; }
.shift-veh-plate { font-size: 11px; color: #64748b; font-family: var(--mono); margin-top: 2px; }
.shift-skip-btn { width: 100%; padding: 10px; border: none; background: none; color: #94a3b8; font-size: 13px; cursor: pointer; font-family: var(--sans); margin-top: 4px; }
/* Invite code */
.invite-code-display { font-size: 34px; font-weight: 800; font-family: var(--mono); letter-spacing: 8px; color: #1E293B; text-align: center; padding: 18px; background: #f8fafc; border: 2px dashed #e2e8f0; border-radius: 12px; cursor: pointer; transition: background .15s; }
.invite-code-display:hover { background: #f1f5f9; }
/* Pending drivers */
.pending-badge { display: inline-flex; align-items: center; gap: 5px; background: #fef9c3; border: 1px solid #fde047; color: #92400e; border-radius: 20px; padding: 4px 10px; font-size: 10px; font-weight: 700; font-family: var(--mono); }
.pending-activate-btn { background: #1E553C; color: white; border: none; border-radius: 8px; padding: 7px 16px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: var(--sans); transition: background .15s; white-space: nowrap; }
.pending-activate-btn:hover { background: #166534; }
/* Join fleet form on login */
#join-fleet-section { display: none; width: 100%; max-width: 400px; flex-direction: column; gap: 12px; padding-bottom: 100px; }
#join-fleet-section.active { display: flex; }
#join-error.critical { font-size: 14px; font-weight: 700; background: #fef2f2; border: 1.5px solid #fca5a5; border-radius: 8px; padding: 12px 14px; min-height: 0; }
.join-back-btn { background: none; border: none; color: #1E553C; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); align-self: flex-start; padding: 0; }

/* ── INSPECTION GATE ──────────────────────────────────────── */
.inspection-gate { position: fixed; inset: 0; background: #f1f5f9; z-index: 800; overflow-y: auto; display: none; }
.inspection-gate.active { display: block; }
.insp-gate-inner { max-width: 860px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom, 0px); }
.insp-gate-header { background: #1E293B; padding: 24px 32px; }
.insp-gate-title { font-size: 24px; font-weight: 900; color: #ffffff; letter-spacing: -.3px; }
.insp-gate-sub { font-size: 13px; color: #94a3b8; font-family: var(--mono); margin-top: 6px; }
.insp-gate-body { flex: 1; padding: 24px 32px; display: flex; flex-direction: column; gap: 20px; }
.insp-section-label { font-size: 11px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 2px; font-family: var(--mono); margin-bottom: 10px; }
/* Odometer block */
.insp-odometer-block { background: #ffffff; border: 2px solid #e2e8f0; border-radius: 16px; padding: 20px 24px; }
.insp-odometer-block.warn { border-color: #ef4444; background: #fff1f2; }
.insp-odometer-label { font-size: 13px; font-weight: 800; color: #1E293B; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.insp-odometer-hint { font-size: 12px; color: #64748b; font-family: var(--mono); margin-bottom: 12px; }
.insp-odometer-input { width: 100%; font-size: 32px; font-weight: 800; color: #1E293B; font-family: var(--mono); border: 2px solid #e2e8f0; border-radius: 12px; padding: 14px 20px; background: #f8fafc; outline: none; box-sizing: border-box; transition: border-color .15s; text-align: center; -moz-appearance: textfield; }
.insp-odometer-input:focus { border-color: #1E293B; background: #fff; }
.insp-odometer-input.warn { border-color: #ef4444; background: #fff1f2; color: #dc2626; }
.insp-odometer-warn-msg { font-size: 12px; color: #dc2626; font-family: var(--mono); font-weight: 700; margin-top: 8px; display: none; }
.insp-odometer-warn-msg.visible { display: block; }
/* Check rows - landscape-optimized 2-col grid */
.insp-checks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.insp-check-card { background: #ffffff; border: 2px solid #e2e8f0; border-radius: 16px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; transition: border-color .15s; }
.insp-check-card.answered-yes { border-color: #22c55e; background: #f0fdf4; }
.insp-check-card.answered-no { border-color: #ef4444; background: #fff1f2; }
.insp-check-label { font-size: 15px; font-weight: 700; color: #0f172a; line-height: 1.3; flex: 1; }
.insp-toggle-pair { display: flex; gap: 8px; flex-shrink: 0; }
.insp-toggle { height: 56px; min-width: 90px; border-radius: 12px; border: 2px solid #e2e8f0; background: #f8fafc; font-size: 17px; font-weight: 800; cursor: pointer; font-family: var(--sans); transition: all .12s; color: #94a3b8; padding: 0 18px; }
.insp-toggle.yes-btn.active { background: #1E553C; border-color: #1E553C; color: #fff; }
.insp-toggle.no-btn.active { background: #dc2626; border-color: #dc2626; color: #fff; }
.insp-notes-block { background: #fff; border: 2px solid #fde047; border-radius: 16px; padding: 18px 22px; display: none; }
.insp-notes-block.visible { display: block; }
.insp-notes-block label { font-size: 11px; font-weight: 800; color: #92400e; text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 10px; font-family: var(--mono); }
.insp-notes-block textarea { width: 100%; background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; font-size: 15px; color: #0f172a; font-family: var(--sans); outline: none; resize: none; box-sizing: border-box; }
.insp-submit-btn { width: 100%; padding: 22px; background: #1E293B; color: white; border: none; border-radius: 16px; font-size: 19px; font-weight: 900; cursor: pointer; font-family: var(--sans); transition: background .15s, transform .1s; letter-spacing: .2px; }
.insp-submit-btn:active:not(:disabled) { transform: scale(.98); }
.insp-submit-btn:disabled { background: #cbd5e1; color: #94a3b8; cursor: not-allowed; }
.insp-gate-footer { padding: 0 32px 32px; }
@media (max-width: 600px) {
  .insp-gate-inner { max-width: 100%; }
  .insp-gate-body { padding: 18px 16px; }
  .insp-gate-footer { padding: 0 16px 24px; }
  .insp-checks-grid { grid-template-columns: 1fr; }
  .insp-toggle { height: 52px; min-width: 80px; font-size: 15px; }
}
/* Daily Reports */
.daily-reports-section { margin-top: 32px; }
.report-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.report-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.insp-pass-badge { display: inline-flex; align-items: center; gap: 5px; background: #dcfce7; border: 1px solid #86efac; color: #1E553C; border-radius: 20px; padding: 4px 14px; font-size: 12px; font-weight: 800; font-family: var(--mono); white-space: nowrap; }
.insp-fail-badge { display: inline-flex; align-items: center; gap: 5px; background: #fee2e2; border: 1px solid #fca5a5; color: #dc2626; border-radius: 20px; padding: 4px 14px; font-size: 12px; font-weight: 800; font-family: var(--mono); white-space: nowrap; }
.report-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.check-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px; font-family: var(--mono); }
.check-chip.ok { background: #f0fdf4; color: #1E553C; }
.check-chip.fail { background: #fff1f2; color: #dc2626; }
/* ── MAINTENANCE ALERT BADGES ────────────────────────────────── */
@keyframes pulse-maint { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.maint-alert-badge { font-size: 10px; font-weight: 800; font-family: var(--mono); padding: 3px 10px; border-radius: 20px; white-space: nowrap; display: inline-block; }
.maint-alert-badge.amber { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.maint-alert-badge.red { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; animation: pulse-maint 1.4s ease-in-out infinite; }

/* ── TIMECLOCK GATE ──────────────────────────────────────── */
.timeclock-gate { position: fixed; inset: 0; background: #1E293B; z-index: 900; display: none; flex-direction: column; align-items: center; justify-content: center; }
.timeclock-gate.active { display: flex; }
.tcg-inner { width: 100%; max-width: 500px; padding: 40px 32px; text-align: center; }
.tcg-date-str { font-size: 12px; color: #475569; font-family: var(--mono); text-transform: uppercase; letter-spacing: 2.5px; margin-bottom: 12px; }
.tcg-live-time { font-size: 72px; font-weight: 900; color: #ffffff; font-family: var(--mono); letter-spacing: -3px; line-height: 1; margin-bottom: 8px; }
.tcg-greeting { font-size: 18px; font-weight: 600; color: #64748b; margin-bottom: 48px; }
.tcg-clock-btn { width: 100%; padding: 30px; font-size: 24px; font-weight: 900; border: none; border-radius: 20px; cursor: pointer; font-family: var(--sans); letter-spacing: 2px; text-transform: uppercase; transition: transform .1s, box-shadow .15s; }
.tcg-clock-btn:active { transform: scale(.97); }
.tcg-clock-in-btn { background: var(--sequoia-gradient); color: #ffffff; box-shadow: 0 12px 40px rgba(6,78,59,.55); transition: box-shadow .18s, transform .1s; }
.tcg-clock-in-btn:hover:not(:disabled) { box-shadow: var(--sequoia-glow); }
.tcg-clock-in-btn:disabled { background: #334155; color: #64748b; box-shadow: none; cursor: not-allowed; }
.tcg-gps { font-size: 12px; color: #334155; font-family: var(--mono); margin-top: 20px; min-height: 18px; }
/* ── SHIFT TIMER CHIP (topbar) ─────────────────────────── */
.shift-timer-chip { display: none; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 10px; padding: 6px 12px; }
.shift-timer-chip.visible { display: flex; }
.shift-timer-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; flex-shrink: 0; animation: pulse-dot 2s infinite; }
.shift-timer-dot.break-dot { background: #f59e0b; animation: pulse-dot 1s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.85)} }
.shift-timer-display { font-size: 15px; font-weight: 800; color: #ffffff; font-family: var(--mono); min-width: 52px; }
.shift-break-btn { padding: 5px 11px; background: rgba(245,158,11,.15); border: 1.5px solid rgba(245,158,11,.4); color: #fbbf24; border-radius: 7px; font-size: 11px; font-weight: 800; cursor: pointer; font-family: var(--sans); white-space: nowrap; transition: background .12s; }
.shift-break-btn:hover { background: rgba(245,158,11,.28); }
.shift-break-btn.on-break { background: rgba(245,158,11,.3); border-color: #f59e0b; }
.shift-clkout-btn { padding: 5px 11px; background: rgba(239,68,68,.15); border: 1.5px solid rgba(239,68,68,.4); color: #fca5a5; border-radius: 7px; font-size: 11px; font-weight: 800; cursor: pointer; font-family: var(--sans); white-space: nowrap; transition: background .12s; }
.shift-clkout-btn:hover { background: rgba(239,68,68,.28); }
@media (max-width: 600px) {
  .shift-break-btn, .shift-clkout-btn { font-size: 10px; padding: 4px 8px; }
  .shift-timer-display { font-size: 13px; }
  .tcg-live-time { font-size: 56px; }
  .tcg-clock-btn { font-size: 20px; padding: 24px; }
}
/* ── DRIVER CLOCK-IN BANNER ─────────────────────────────── */
.dri-clockin-banner { margin: 8px 0 0; background: transparent; padding: 0; display: block; }
.dri-clockin-banner.hidden { display: none; }
/* Shift Status card */
.dri-shift-card { background: #ffffff; border-radius: 20px; box-shadow: 0 4px 24px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04); padding: 24px 20px 20px; margin: 0 0 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.dri-shift-card-title { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: #94a3b8; font-family: var(--sans); align-self: flex-start; }
.dri-shift-card-row { display: flex; align-items: center; gap: 20px; width: 100%; justify-content: center; }
.dri-shift-card-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.dri-shift-card-hint { font-size: 12px; color: #94a3b8; font-family: var(--sans); font-weight: 500; text-align: center; }
/* Weekly summary cards */
.drv-weekly-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 20px; }
.drv-weekly-card { background: #fff; border-radius: 16px; box-shadow: 0 2px 12px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04); padding: 14px 12px 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.drv-weekly-card-warn { background: #fff5f5; box-shadow: 0 2px 12px rgba(220,38,38,.1); }
.drv-weekly-icon { font-size: 20px; margin-bottom: 4px; line-height: 1; }
.drv-weekly-val { font-size: 22px; font-weight: 900; color: #0c1623; font-family: var(--sans); line-height: 1; letter-spacing: -.5px; }
.drv-weekly-val-sm { font-size: 16px; letter-spacing: -.3px; }
.drv-weekly-card-warn .drv-weekly-val { color: #dc2626; }
.drv-weekly-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: #64748b; font-family: var(--sans); margin-top: 3px; }
.drv-weekly-sub { font-size: 9px; color: #94a3b8; font-family: var(--mono); }
/* Progress ring */
.shift-ring-wrap { position: relative; width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.shift-ring-svg { position: absolute; top: 0; left: 0; transform: rotate(-90deg); }
.shift-ring-inner { text-align: center; z-index: 1; pointer-events: none; }
.shift-ring-name { font-size: 14px; font-weight: 900; color: #0f172a; letter-spacing: -0.3px; line-height: 1.1; max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shift-ring-status { font-size: 8px; font-family: var(--mono); color: #94a3b8; text-transform: uppercase; letter-spacing: 1.2px; margin-top: 3px; font-weight: 700; }
.shift-ring-status.active { color: var(--accent); }
.shift-ring-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin: 0 auto 5px; animation: pulse-dot 2s infinite; }
/* Clock-in pill CTA */
.dri-clockin-pill { background: var(--sequoia-gradient); color: #fff; border: none; border-radius: 999px; padding: 16px 44px; font-size: 16px; font-weight: 800; cursor: pointer; font-family: var(--sans); letter-spacing: .4px; box-shadow: 0 8px 32px rgba(6,78,59,.45); animation: dri-pill-pulse 2s ease-in-out infinite; transition: box-shadow .18s, transform .1s; }
.dri-clockin-pill:hover { box-shadow: var(--sequoia-glow); transform: translateY(-1px); }
.dri-clockin-pill:active { transform: scale(.97); }
.dri-clockin-pill:disabled { animation: none; background: #cbd5e1; color: #94a3b8; cursor: not-allowed; box-shadow: none; transform: none; }
@keyframes dri-pill-pulse { 0%,100%{ box-shadow:0 8px 32px rgba(6,78,59,.45) } 60%{ box-shadow:0 8px 48px rgba(6,78,59,.70) } }
@keyframes dri-pulse { 0%,100%{ box-shadow:0 0 0 0 rgba(21,128,61,.6) } 60%{ box-shadow:0 0 0 12px rgba(21,128,61,0) } }
/* Active shift ring actions */
.shift-ring-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.dri-shift-active-wrap { display: flex; align-items: center; gap: 10px; width: 100%; }
.dri-shift-label { font-size: 14px; font-weight: 800; color: #22c55e; display: flex; align-items: center; gap: 7px; }
.dri-shift-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; flex-shrink: 0; animation: pulse-dot 2s infinite; }
.dri-end-shift-btn { margin-left: auto; background: rgba(239,68,68,.15); border: 1.5px solid rgba(239,68,68,.4); color: #fca5a5; border-radius: 9px; padding: 9px 14px; font-size: 12px; font-weight: 800; cursor: pointer; font-family: var(--sans); white-space: nowrap; }
/* ── DRIVER DAY TOGGLE ────────────────────────────────────── */
.dri-day-toggle { display: flex; gap: 6px; margin-bottom: 16px; }
.dri-day-btn { flex: 1; padding: 10px 0; border: 1.5px solid #e2e8f0; border-radius: 10px; background: #fff; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); color: #64748b; transition: background .15s, color .15s, border-color .15s; }
.dri-day-btn.active { background: #ECFDF5; color: #065F46; border-color: #A7F3D0; }
/* ── DRIVER ACTION LOCK ───────────────────────────────────── */
.dri-action-lock { display: flex; align-items: center; gap: 8px; padding: 11px 14px; background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 10px; color: #94a3b8; font-size: 12px; font-family: var(--mono); margin-top: 14px; }
/* ── IPAD LANDSCAPE DRIVER DASH ─────────────────────────── */
@media (min-width: 900px) {
  .drf-time { font-size: 26px; }
  .drf-patient { font-size: 22px; }
  .drf-addr-val { font-size: 14px; }
  .dri-day-toggle { gap: 10px; }
  .dri-day-btn { font-size: 15px; padding: 12px 0; }
  .dri-clockin-banner { padding: 20px 24px; }
  .dri-clockin-btn { font-size: 16px; padding: 15px 24px; }
  .dri-clockin-banner-label { font-size: 17px; }
}
/* ── PAYROLL TAB ──────────────────────────────────────────── */
.payroll-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 20px; }
.payroll-filters .pf-group label { font-size: 10px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 1px; font-family: var(--mono); display: block; margin-bottom: 5px; }
.payroll-filters input[type=date], .payroll-filters select { border: 1.5px solid #e2e8f0; border-radius: 9px; padding: 9px 12px; font-size: 13px; font-family: var(--sans); color: #0f172a; background: #fff; outline: none; }
.ts-table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid #e2e8f0; background: #fff; }
.ts-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ts-table th { background: #f8fafc; padding: 10px 14px; text-align: left; font-size: 10px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 1px; font-family: var(--mono); border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.ts-table td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: #0f172a; white-space: nowrap; }
.ts-table tr:last-child td { border-bottom: none; }
.ts-table tr:hover td { background: #f8fafc; }
.ts-status-chip { display: inline-block; font-size: 10px; font-weight: 800; font-family: var(--mono); padding: 3px 9px; border-radius: 20px; }
.ts-status-chip.active { background: #dcfce7; color: #1E553C; }
.ts-status-chip.on_break { background: #fef3c7; color: #92400e; }
.ts-status-chip.completed { background: #f1f5f9; color: #475569; }
.ts-edit-btn { padding: 4px 10px; background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 6px; font-size: 11px; font-weight: 700; cursor: pointer; font-family: var(--sans); color: #475569; }
.ts-edit-btn:hover { border-color: #1E293B; color: #1E293B; }
.ts-export-btn { padding: 10px 20px; background: #1E553C; color: #fff; border: none; border-radius: 10px; font-size: 13px; font-weight: 800; cursor: pointer; font-family: var(--sans); }
.ts-export-btn:hover { background: #166534; }
.qb-export-btn { padding: 10px 20px; background: #ffffff; color: #0c1623; border: 2px solid #0c1623; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); display: inline-flex; align-items: center; gap: 7px; transition: background .15s, color .15s; }
.qb-export-btn:hover { background: #0c1623; color: #fff; }
.qb-export-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.date-presets { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.date-preset-pill { padding: 6px 14px; background: #f1f5f9; border: 1.5px solid #e2e8f0; border-radius: 20px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: var(--sans); color: #475569; white-space: nowrap; transition: background .1s, border-color .1s, color .1s; }
.date-preset-pill:hover { background: #1E293B; color: #fff; border-color: #1E293B; }
/* QB Settings panel */
.qb-settings-panel { margin-top: 32px; border: 1.5px solid #e2e8f0; border-radius: 16px; overflow: hidden; }
.qb-settings-header { background: #1E293B; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; }
.qb-settings-header-title { font-size: 13px; font-weight: 800; color: #fff; letter-spacing: .3px; display: flex; align-items: center; gap: 8px; }
.qb-settings-toggle { font-size: 11px; color: #94a3b8; font-family: var(--mono); }
.qb-settings-body { background: #fff; padding: 20px; display: none; }
.qb-settings-body.open { display: block; }
.qb-map-intro { font-size: 12px; color: #64748b; font-family: var(--mono); margin-bottom: 18px; line-height: 1.6; }
.qb-map-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.qb-map-row:last-of-type { border-bottom: none; }
.qb-map-sequoia { font-size: 13px; font-weight: 700; color: #0f172a; min-width: 160px; }
.qb-map-arrow { color: #94a3b8; font-size: 16px; }
.qb-map-input { flex: 1; border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 8px 12px; font-size: 13px; font-family: var(--sans); color: #0f172a; outline: none; }
.qb-map-input:focus { border-color: #2563eb; }
.qb-save-btn { margin-top: 18px; padding: 10px 24px; background: var(--accent); color: #fff; border: none; border-radius: 10px; font-size: 13px; font-weight: 800; cursor: pointer; font-family: var(--sans); }
.qb-save-btn:hover { background: var(--accent2); }
.qb-save-msg { font-size: 12px; font-family: var(--mono); color: #1E553C; margin-top: 10px; min-height: 16px; }

/* ── WEEKLY PERFORMANCE GRID ─────────────────────────────────── */
.weekly-perf-wrap { margin-bottom: 28px; }
.weekly-perf-title { font-size: 14px; font-weight: 800; color: #0f172a; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; letter-spacing: -.2px; }
.weekly-perf-title span.wpt-sub { font-size: 11px; font-weight: 500; color: #94a3b8; font-family: var(--mono); }
.weekly-chart-wrap { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 20px 20px 10px; margin-bottom: 16px; }
.weekly-chart-title { font-size: 10px; font-weight: 800; color: #64748b; font-family: var(--mono); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.weekly-chart-legend { display: flex; gap: 16px; margin-top: 8px; padding-top: 8px; }
.weekly-chart-legend-item { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #64748b; font-family: var(--mono); }
.weekly-chart-legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.weekly-grid-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid #e2e8f0; }
.weekly-grid { width: 100%; border-collapse: collapse; font-size: 12px; }
.weekly-grid th { background: #1E293B; color: #fff; padding: 10px 14px; text-align: center; font-size: 9px; font-weight: 800; font-family: var(--mono); text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
.weekly-grid th:first-child { text-align: left; min-width: 140px; }
.weekly-grid td { padding: 11px 14px; border-bottom: 1px solid #f1f5f9; text-align: center; color: #0f172a; font-family: var(--mono); font-size: 12px; }
.weekly-grid td:first-child { text-align: left; font-weight: 700; font-family: var(--sans); font-size: 13px; }
.weekly-grid tr:last-child td { border-bottom: none; }
.weekly-grid tr:hover td { background: #f8fafc; }
.wg-empty { color: #cbd5e1; font-size: 11px; }
.wg-hours { color: #334155; }
.wg-hours-ot { color: #dc2626 !important; font-weight: 900 !important; background: #fef2f2; border-radius: 5px; padding: 2px 6px; }
.ot-alerts-wrap { margin-top: 16px; border: 1.5px solid #fca5a5; border-radius: 12px; background: #fff7f7; overflow: hidden; }
.ot-alerts-title { padding: 10px 16px; font-size: 11px; font-weight: 800; font-family: var(--mono); text-transform: uppercase; letter-spacing: .8px; color: #dc2626; background: #fef2f2; border-bottom: 1px solid #fca5a5; }
.ot-alert-item { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-bottom: 1px solid #fee2e2; font-size: 12px; font-family: var(--mono); color: #374151; flex-wrap: wrap; }
.ot-alert-item:last-child { border-bottom: none; }
.ot-alert-driver { font-weight: 800; color: #111827; }
.ot-chip-daily { background: #fef2f2; color: #dc2626; border: 1px solid #fca5a5; border-radius: 5px; padding: 1px 7px; font-size: 10px; font-weight: 800; }
.ot-chip-weekly { background: #7f1d1d; color: #fff; border-radius: 5px; padding: 1px 7px; font-size: 10px; font-weight: 800; }
/* Overtime sentinel */
.ot-red { color: #dc2626 !important; font-weight: 900 !important; background: #fef2f2; border-radius: 6px; padding: 2px 8px; }
.ot-amber { color: #d97706 !important; font-weight: 900 !important; background: #fffbeb; border-radius: 6px; padding: 2px 8px; }
.ot-ok { color: #1E553C !important; font-weight: 800 !important; }
/* Timezone selector */
.tz-select-row { display: flex; align-items: center; gap: 14px; padding: 14px 0 18px; border-bottom: 1px solid #f1f5f9; margin-bottom: 14px; }
.tz-select-label { font-size: 12px; font-weight: 700; color: #374151; min-width: 160px; }
.tz-select { flex: 1; border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 8px 12px; font-size: 13px; font-family: var(--sans); color: #0f172a; outline: none; max-width: 300px; }
.tz-select:focus { border-color: #2563eb; }

/* ═══════════════════════════════════════════════════════════════
   SOFT DEPTH — Intuit-style design overhaul
   ═══════════════════════════════════════════════════════════════ */

/* ── GLOBAL APP BACKGROUND ──────────────────────────────────── */
#login-screen { background: #F4F7F9 !important; }
.login-card { background: #ffffff !important; border: none !important; box-shadow: 0 4px 20px rgba(0,0,0,0.06) !important; border-radius: 20px !important; }
.login-form input { border-radius: 12px !important; background: #ffffff !important; border-color: #E2E8F0 !important; }

/* ── CARD OVERHAUL: off-border, soft shadow, 20px radius ────── */
.ride-card { border: none !important; box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important; border-radius: 20px !important; }
.cmd-card { border: none !important; box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important; border-radius: 20px !important; }
.fleet-card { border: none !important; box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important; border-radius: 20px !important; }
/* .pax-card overrides consolidated into first style block */
.bsum-card { border: 1px solid #f1f5f9 !important; border-left: 4px solid #94a3b8 !important; box-shadow: 0 4px 12px rgba(0,0,0,0.03) !important; border-radius: 14px !important; }
.bsum-card.invoiced { border-left-color: #3b82f6 !important; }
.bsum-card.overdue { border-left-color: #f59e0b !important; }
.bsum-card.disputed { border-left-color: #ef4444 !important; }
.bsum-card.paid { border-left-color: #22c55e !important; }
.inv-card { border: none !important; box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important; border-radius: 20px !important; }
.lead-card { border: none !important; box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important; border-radius: 20px !important; }
.driver-ride-full { border: none !important; box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important; border-radius: 20px !important; }
.weather-widget { border: none !important; box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important; border-radius: 20px !important; }
.cmd-fleet-panel { border: none !important; box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important; border-radius: 20px !important; }
.cp-card { border: none !important; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.10) !important; border-radius: 16px !important; }
.integ-card { border: none !important; box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important; border-radius: 20px !important; }
.report-card { border: none !important; box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important; border-radius: 20px !important; }
.veh-card { border: none !important; box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important; border-radius: 20px !important; }

/* Status-bar rides keep their left accent strip */
.ride-card.status-pending { border-left: 4px solid var(--accent2) !important; }
.ride-card.status-enroute { border-left: 4px solid #38bdf8 !important; }
.ride-card.status-complete { border-left: 4px solid #22c55e !important; }
.ride-card.status-cancelled { border-left: 4px solid #f87171 !important; }
.ride-card.status-waiting { border-left: 4px solid #8b5cf6 !important; }
.ride-card.status-ready { border-left: 4px solid #f97316 !important; }
.driver-ride-full.status-pending { border-left: 4px solid #f97316 !important; }
.driver-ride-full.status-enroute { border-left: 4px solid #2b7fd4 !important; }
.driver-ride-full.status-complete { border-left: 4px solid #22c55e !important; opacity: .85; }
.driver-ride-full.status-cancelled { border-left: 4px solid #ef4444 !important; opacity: .6; }
/* Compliance rows keep semantic borders */
.comp-row { border: 1.5px solid #e2e8f0 !important; box-shadow: 0 2px 10px rgba(0,0,0,0.04) !important; border-radius: 16px !important; }
.comp-row.comp-ok { border-color: #86efac !important; }
.comp-row.comp-warn { border-color: #f59e0b !important; }
.comp-row.comp-crit { border-color: #ef4444 !important; }
/* Vehicle maintenance state borders */
.veh-card.maint-amber { border: 2px solid #f59e0b !important; }
.veh-card.maint-red { border: 2px solid #ef4444 !important; }

/* ── HOVER LIFT ──────────────────────────────────────────────── */
.ride-card:hover { box-shadow: 0 10px 40px rgba(0,0,0,0.10) !important; transform: translateY(-2px); }
.cmd-card:hover { box-shadow: 0 10px 40px rgba(0,0,0,0.10) !important; transform: translateY(-2px); }
.fleet-card:hover { box-shadow: 0 10px 40px rgba(0,0,0,0.10) !important; transform: translateY(-2px); }
/* .pax-card:hover consolidated into first style block */
.inv-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.09) !important; }
.lead-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.09) !important; }

/* ── MODAL ───────────────────────────────────────────────────── */
.modal { border: none !important; border-radius: 24px !important; box-shadow: 0 24px 64px rgba(0,0,0,0.15) !important; }
.est-sheet { border-radius: 24px !important; }
.approve-modal { border-radius: 24px !important; }

/* ── PRIMARY ACTION BUTTONS → PILL SHAPE + INTUIT GREEN ─────── */
/* Driver status CTAs use new green */
.status-btn.enroute { background: #2CA01C !important; }
.status-btn.enroute:hover { background: #228A18 !important; }
.approve-submit-btn { border-radius: 999px !important; }
.est-book-btn { border-radius: 999px !important; }
.leads-add-btn { border-radius: 999px !important; }
.lead-approve-btn { border-radius: 999px !important; }
.cp-save-btn { border-radius: 999px !important; }
.pending-activate-btn { border-radius: 999px !important; }
.ts-export-btn { border-radius: 999px !important; }
.board-estimate-btn { border-radius: 999px !important; }
.status-btn.enroute { border-radius: 999px !important; }
.status-btn.complete { border-radius: 999px !important; }
.cred-save-btn { border-radius: 999px !important; }
.utbl-edit-btn { border-radius: 999px !important; }
.billing-subnav-btn { border-radius: 0 !important; }
.billing-subnav-btn.new-estimate { border-radius: 8px !important; }
.ar-pill { border-radius: 999px !important; }
.date-preset-pill { border-radius: 999px !important; }

/* ── SECTION HEADER TYPOGRAPHY ──────────────────────────────── */
.cmd-greeting-title { font-size: 17px !important; font-weight: 700 !important; letter-spacing: -0.02em !important; color: #111827 !important; }
.leads-page-title { font-size: 18px !important; font-weight: 700 !important; }
.integ-page-title { font-size: 18px !important; font-weight: 700 !important; }
.cmd-card-title { font-size: 9px !important; font-weight: 600 !important; letter-spacing: 0.06em !important; }
.bsum-label { font-size: 9px !important; font-weight: 700 !important; letter-spacing: 0.07em !important; color: #94a3b8 !important; }
.bsum-badge .bsum-label { color: rgba(255,255,255,.65) !important; font-size: 8px !important; letter-spacing: 0.04em !important; }
.bsum-badge .bsum-num { color: #fff !important; }
.bsum-badge.invoiced .bsum-num { color: #93c5fd !important; }
.bsum-badge.overdue  .bsum-num { color: #fbbf24 !important; }
.bsum-badge.disputed .bsum-num { color: #f87171 !important; }
.bsum-badge.paid     .bsum-num { color: #4ade80 !important; }

/* ── BOARD SIDEBAR ───────────────────────────────────────────── */
.board-sidebar { border-right: none !important; box-shadow: 3px 0 24px rgba(0,0,0,0.07) !important; padding: 22px 16px !important; }
.avail-driver-chip { border-radius: 10px !important; border: none !important; box-shadow: 0 1px 4px rgba(0,0,0,0.05) !important; padding: 9px 12px !important; margin-bottom: 6px !important; }
.avail-name { font-size: 13px !important; }
.sb-nav-btn { border: none !important; background: #f1f5f9 !important; color: #475569 !important; border-radius: 8px !important; }
.sb-nav-btn:hover { background: #e2e8f0 !important; color: #0f172a !important; }
.sb-date-input { font-size: 13px !important; font-weight: 600 !important; color: #334155 !important; }
.sidebar-day-name { font-size: 20px !important; letter-spacing: -0.3px !important; }
.sidebar-section-title { margin-top: 18px !important; margin-bottom: 9px !important; }

/* ── BILLING REVENUE HERO ────────────────────────────────────── */
/* .bsum-revenue-hero replaced by .billing-hero */

/* ── TABLES WRAPPER ──────────────────────────────────────────── */
.pax-table-wrap { border: none !important; box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important; border-radius: 20px !important; }
.user-table-wrap { border: none !important; box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important; border-radius: 16px !important; }
.ts-table-wrap { border: none !important; box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important; border-radius: 16px !important; }

/* ── COMMAND CENTER GRID ─────────────────────────────────────── */
.cmd-grid { gap: 16px !important; }

/* ── FILTER BAR ──────────────────────────────────────────────── */
.ar-filter-bar { background: #ffffff !important; border: none !important; box-shadow: 0 2px 12px rgba(0,0,0,0.05) !important; border-radius: 16px !important; }

/* ── TAB FADE-IN TRANSITION ─────────────────────────────────── */
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tab-content.active { animation: tabFadeIn 0.22s ease-out; }

/* ── TRIP REPORTS MODULE ─────────────────────────────────────── */
.rpt-metric-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 640px) { .rpt-metric-row { grid-template-columns: 1fr 1fr; } }
.rpt-metric-card { background: #fff; border: 1px solid #E2E8F0; border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; }
.rpt-metric-num { font-size: 26px; font-weight: 900; color: #0c1623; font-family: var(--sans); line-height: 1.1; letter-spacing: -0.5px; }
.rpt-metric-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #94a3b8; font-family: var(--sans); margin-top: 5px; }
.rep-apply-btn { padding: 10px 22px; background: var(--sequoia-gradient); color: #fff; border: none; border-radius: 10px; font-size: 13px; font-weight: 700; font-family: var(--sans); cursor: pointer; transition: box-shadow .18s, transform .15s; box-shadow: 0 2px 10px rgba(6,78,59,.30); white-space: nowrap; }
.rep-apply-btn:hover { box-shadow: var(--sequoia-glow); transform: translateY(-1px); }
.rep-filter-input { width: 100%; border: 1.5px solid #E2E8F0; border-radius: 12px; background: #F8FAFC; padding: 9px 12px; font-size: 13px; font-family: var(--sans); color: #0f172a; outline: none; transition: border-color .15s; }
.rep-filter-input:focus { border-color: #064E3B; box-shadow: 0 0 0 3px rgba(6,78,59,.08); }
.rep-filter-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: #94a3b8; font-family: var(--sans); display: block; margin-bottom: 6px; }
.rpt-table-wrap { background:#fff; border:1px solid #E2E8F0; border-radius:16px; overflow:hidden; box-shadow:0 1px 4px rgba(0,0,0,.04); }
.rpt-table-wrap table { width:100%; border-collapse:collapse; font-size:13px; font-family:var(--sans); }
.rpt-table-wrap thead tr { background:#F8FAFC; border-bottom:2px solid #E2E8F0; text-align:left; }
.rpt-table-wrap thead th { padding:12px 14px; font-family:var(--sans); font-size:10px; font-weight:700; color:#94a3b8; text-transform:uppercase; letter-spacing:.8px; white-space:nowrap; border:none; }
.rpt-table-wrap tbody tr { border-bottom:1px solid #F1F5F9; background:#fff; transition:background .1s; }
.rpt-table-wrap tbody tr:last-child { border-bottom:none; }
.rpt-table-wrap tbody tr:hover { background:#F8FAFC; }
.rpt-table-wrap tbody td { padding:0 14px; height:64px; vertical-align:middle; border:none; }

/* ── DSETTINGS SECTION CARD (fallback for old-style sections) ── */
.dsettings-section { background: #ffffff; border-radius: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); padding: 16px 20px; }
/* ── ARRIVED AT PICKUP BUTTON ────────────────────────────── */
.dri-arrive-btn { width: 100%; padding: 15px; background: #0369a1; color: white; border: none; border-radius: 999px; font-size: 15px; font-weight: 800; cursor: pointer; font-family: var(--sans); letter-spacing: .3px; box-shadow: 0 4px 18px rgba(3,105,161,0.32); transition: background .15s, transform .1s; }
.dri-arrive-btn:hover { background: #0284c7; transform: translateY(-1px); }
.dri-arrive-btn:active { transform: scale(.97); }
/* Wait timer badge */
.wait-timer-display { background: #f0f9ff; border: 1.5px solid #bae6fd; border-radius: 14px; padding: 11px 16px; font-size: 13px; font-weight: 700; color: #0369a1; font-family: var(--mono); display: flex; align-items: center; gap: 8px; }
/* Large primary nav button for active rides */
.dri-nav-primary { background: #1E293B !important; color: #ffffff !important; border-radius: 999px !important; font-size: 15px !important; padding: 14px 22px !important; font-weight: 800 !important; box-shadow: 0 4px 18px rgba(30,41,59,0.22) !important; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 6px; }
.dri-nav-primary:hover { opacity: .9 !important; }
/* Signature capture modal */
.sig-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 700; display: none; align-items: flex-end; justify-content: center; }
.sig-modal-overlay.open { display: flex; }
.sig-modal-sheet { background: #fff; border-radius: 24px 24px 0 0; width: 100%; max-width: 600px; padding: 24px 20px calc(20px + env(safe-area-inset-bottom,0px)); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 -8px 40px rgba(0,0,0,.18); }
.sig-modal-title { font-size: 18px; font-weight: 900; color: #0f172a; }
.sig-modal-sub { font-size: 12px; color: #64748b; font-family: var(--mono); margin-top: 2px; }
.sig-canvas { width: 100%; height: 200px; background: #f8fafc; border: 2px dashed #cbd5e1; border-radius: 16px; touch-action: none; cursor: crosshair; display: block; }
.sig-canvas.has-drawing { border-style: solid; border-color: #1E293B; }
.sig-modal-actions { display: flex; gap: 10px; }
.sig-clear-btn { padding: 12px 22px; background: #f1f5f9; border: 1.5px solid #e2e8f0; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); color: #475569; transition: background .12s; }
.sig-clear-btn:hover { background: #e2e8f0; }
.sig-submit-btn { flex: 1; padding: 14px; background: #1E553C; color: white; border: none; border-radius: 999px; font-size: 15px; font-weight: 800; cursor: pointer; font-family: var(--sans); transition: background .15s; }
.sig-submit-btn:disabled { background: #cbd5e1; cursor: not-allowed; }
.sig-skip-btn { background: none; border: none; color: #94a3b8; font-size: 12px; cursor: pointer; font-family: var(--mono); text-align: center; padding: 4px; text-decoration: underline; }
/* Safe-to-operate master toggle in inspection gate */
.insp-safe-block { background: #fff; border: 2.5px solid #e2e8f0; border-radius: 20px; padding: 22px 24px; transition: border-color .15s, background .15s; }
.insp-safe-block.answered-yes { border-color: #22c55e; background: #f0fdf4; }
.insp-safe-block.answered-no { border-color: #dc2626; background: #fff1f2; }
.insp-safe-pair { display: flex; gap: 12px; margin-top: 14px; }
.insp-safe-btn { flex: 1; padding: 18px 12px; border: 2px solid #e2e8f0; border-radius: 16px; background: #f8fafc; font-size: 13px; font-weight: 800; cursor: pointer; font-family: var(--sans); text-align: center; transition: all .12s; color: #334155; }
.insp-safe-btn.yes.active { background: #1E553C; border-color: #1E553C; color: #fff; }
.insp-safe-btn.no.active { background: #dc2626; border-color: #dc2626; color: #fff; }

/* ── MI LEFT color states ─────────────────────────────── */
.maint-alert-badge.green { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.veh-stat-mini.mi-green { background: #f0fdf4; border-color: #bbf7d0; }
.veh-stat-mini.mi-green .veh-stat-mini-val { color: #16a34a; }
.veh-stat-mini.mi-amber { background: #fffbeb; border-color: #fde68a; }
.veh-stat-mini.mi-amber .veh-stat-mini-val { color: #d97706; }
.veh-stat-mini.mi-red { background: #fff1f2; border-color: #fecdd3; }
.veh-stat-mini.mi-red .veh-stat-mini-val { color: #dc2626; }

/* ── UNASSIGNED QUEUE SIDEBAR ─────────────────────────── */
.uqueue-chip { display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:9px; background:#fffbeb; border:1.5px solid #fcd34d; margin-bottom:5px; cursor:pointer; transition:all .12s; }
.uqueue-chip:hover { background:#fef3c7; border-color:#d97706; transform:translateX(2px); box-shadow:0 2px 8px rgba(217,119,6,.12); }
.uqueue-chip-time { font-size:10px; font-weight:800; color:#92400e; font-family:var(--mono); flex-shrink:0; }
.uqueue-chip-name { font-size:12px; font-weight:700; color:#0f172a; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.uqueue-chip-addr { font-size:10px; color:#94a3b8; font-family:var(--mono); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:130px; }
.uqueue-count-badge { background:#ef4444; color:#fff; border-radius:20px; padding:1px 6px; font-size:9px; font-weight:900; font-family:var(--mono); margin-left:4px; vertical-align:middle; }

/* ── QUICK ASSIGN DRAWER ──────────────────────────────── */
.qa-overlay { position:fixed; inset:0; background:rgba(15,23,42,.35); z-index:820; display:none; }
.qa-panel { position:fixed; top:0; right:0; bottom:0; width:min(480px,100vw); background:#fff; z-index:821; display:flex; flex-direction:column; box-shadow:-6px 0 40px rgba(0,0,0,.18); transform:translateX(100%); transition:transform .28s cubic-bezier(.4,0,.2,1); }
.qa-panel.open { transform:translateX(0); }
.qa-hd { background:#1E293B; padding:18px 20px; display:flex; align-items:center; justify-content:space-between; flex-shrink:0; }
.qa-hd-title { font-size:11px; font-weight:800; color:#fff; font-family:var(--mono); letter-spacing:1.2px; text-transform:uppercase; }
.qa-hd-close { background:rgba(255,255,255,.12); border:none; border-radius:50%; width:28px; height:28px; display:flex; align-items:center; justify-content:center; color:rgba(255,255,255,.8); cursor:pointer; font-size:15px; flex-shrink:0; transition:background .12s; }
.qa-hd-close:hover { background:rgba(255,255,255,.24); }
.qa-ride-card { margin:14px 16px 0; padding:14px 16px; background:#f8fafc; border:1.5px solid #e2e8f0; border-radius:14px; flex-shrink:0; }
.qa-ride-patient { font-size:16px; font-weight:800; color:#0f172a; margin-bottom:3px; }
.qa-ride-meta { font-size:11px; color:#64748b; font-family:var(--mono); }
.qa-ride-route { font-size:11px; color:#94a3b8; font-family:var(--mono); margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.qa-sec-label { font-size:10px; font-weight:800; color:#94a3b8; font-family:var(--mono); letter-spacing:1px; text-transform:uppercase; padding:14px 16px 6px; flex-shrink:0; }
.qa-drivers { flex:1; overflow-y:auto; padding:0 16px 24px; }
.qa-driver-card { display:flex; align-items:center; gap:11px; padding:12px 13px; border-radius:12px; border:1.5px solid #e2e8f0; background:#fff; margin-bottom:8px; cursor:pointer; transition:all .15s; }
.qa-driver-card:hover:not(.qa-unavail) { border-color:#1E293B; box-shadow:0 3px 12px rgba(0,0,0,.08); transform:translateY(-1px); }
.qa-driver-card.qa-best { border-color:#16a34a; background:#f0fdf4; }
.qa-driver-card.qa-unavail { opacity:.5; cursor:not-allowed; }
.qa-dname { font-size:13px; font-weight:700; color:#0f172a; }
.qa-dmeta { font-size:11px; color:#64748b; font-family:var(--mono); margin-top:2px; }
.qa-badge { font-size:9px; font-weight:800; padding:2px 7px; border-radius:20px; font-family:var(--mono); letter-spacing:.3px; text-transform:uppercase; white-space:nowrap; }
.qa-badge.best { background:#dcfce7; color:#15803d; border:1px solid #86efac; }
.qa-badge.avail { background:#eff6ff; color:#1d4ed8; border:1px solid #bfdbfe; }
.qa-badge.conflict { background:#fef3c7; color:#92400e; border:1px solid #fde68a; }
.qa-badge.ooc { background:#fee2e2; color:#991b1b; border:1px solid #fca5a5; }
.qa-badge.offshift { background:#f1f5f9; color:#64748b; border:1px solid #e2e8f0; }
.qa-assign-btn { margin-left:auto; background:#1E293B; color:#fff; border:none; border-radius:999px; padding:6px 14px; font-size:11px; font-weight:800; cursor:pointer; font-family:var(--mono); white-space:nowrap; transition:background .12s; flex-shrink:0; }
.qa-assign-btn:hover { background:#1E553C; }
.qa-assign-btn:disabled { background:#94a3b8; cursor:not-allowed; }

/* ── HIGH-CONTRAST STATUS BADGES ─────────────────────── */
.tl-badge { font-size:10px; font-weight:800; padding:3px 10px; border-radius:20px; white-space:nowrap; flex-shrink:0; letter-spacing:.4px; text-transform:uppercase; border:none; }
.tl-badge.pending  { background:#1E293B; color:#fff; }
.tl-badge.enroute  { background:#1d4ed8; color:#fff; }
.tl-badge.complete { background:#15803d; color:#fff; }
.tl-badge.cancelled{ background:#64748b; color:#fff; }
.tl-badge.waiting  { background:#7c3aed; color:#fff; }
.tl-badge.ready    { background:#ea580c; color:#fff; animation:pulse-badge .9s ease-in-out infinite; }
@keyframes pulse-badge { 0%,100%{opacity:1} 50%{opacity:.6} }

/* ── STEEL COMPLIANCE BLOCK ───────────────────────────── */
.steel-warn { display:none; background:#fff1f2; border:2px solid #ef4444; border-radius:10px; padding:11px 14px; font-size:12px; color:#991b1b; font-family:var(--mono); margin-top:6px; line-height:1.5; }
.steel-ooc-mark { font-size:9px; font-weight:800; background:#fee2e2; color:#991b1b; border:1px solid #fca5a5; border-radius:20px; padding:2px 6px; font-family:var(--mono); margin-left:4px; vertical-align:middle; }
.live-pulse-flash { animation:live-flash .6s ease-out; }
@keyframes live-flash { 0%{background:#dbeafe} 100%{background:transparent} }

/* ── Quick Assign button ──────────────────────────────── */
.quick-assign-btn { display: inline-flex; align-items: center; gap: 4px; background: #1E293B; color: #fff; border: none; border-radius: 20px; padding: 4px 11px; font-size: 10px; font-weight: 700; cursor: pointer; font-family: var(--mono); margin-left: 6px; white-space: nowrap; transition: background .12s, transform .1s; }
.quick-assign-btn:hover { background: #1E553C; transform: scale(1.04); }
.quick-assign-btn:disabled { background: #94a3b8; cursor: not-allowed; transform: none; }
.veh-driver-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 8px 0 4px; border-top: 1px solid #f1f5f9; margin-top: 10px; font-size: 11px; font-family: var(--mono); font-weight: 600; }
.veh-driver-row.on { color: #15803d; }
.veh-driver-row.off { color: #94a3b8; }

/* ── Broadcast chat card ──────────────────────────────── */
.broadcast-card { background: #fff; border: 2px solid #1E293B; border-radius: 16px; overflow: hidden; margin: 4px 0; box-shadow: 0 3px 14px rgba(30,41,59,.14); max-width: 94%; }
.broadcast-card-hd { background: #1E293B; padding: 9px 14px; display: flex; align-items: center; gap: 8px; }
.broadcast-card-hd-text { font-size: 10px; font-weight: 800; color: #fff; font-family: var(--mono); letter-spacing: .8px; text-transform: uppercase; }
.broadcast-card-body { padding: 11px 14px; font-size: 13px; color: #0f172a; line-height: 1.5; }
.broadcast-card-footer { padding: 4px 14px 9px; font-size: 10px; color: #94a3b8; font-family: var(--mono); display: flex; justify-content: space-between; align-items: center; }
.broadcast-read-badge { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; border-radius: 20px; padding: 2px 8px; font-size: 9px; font-weight: 700; font-family: var(--mono); letter-spacing: .3px; }

/* ── Estimate Fare Intuit-style ───────────────────────── */
.est-sheet { background: white; border-radius: 20px !important; width: 100%; max-width: 440px; max-height: 92vh; overflow: hidden !important; display: flex; flex-direction: column; box-shadow: 0 24px 80px rgba(0,0,0,.24) !important; }
.est-header { background: #fff; border-radius: 20px 20px 0 0; padding: 14px 18px 12px; flex-shrink: 0; border-bottom: 1px solid #f1f5f9; }
.est-header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0; }
.est-title { font-size: 11px !important; font-weight: 600 !important; color: #64748b !important; font-family: var(--sans) !important; letter-spacing: 0.06em; text-transform: uppercase; }
.est-close { background: #f1f5f9 !important; border: none; border-radius: 50% !important; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; color: #475569 !important; flex-shrink: 0; transition: background .12s; padding: 0; }
.est-close:hover { background: #e2e8f0 !important; }
.est-total-live { font-size: 44px; font-weight: 900; color: #16a34a; font-family: var(--mono); line-height: 1; letter-spacing: -2px; }
.est-total-live-label { display: none; }
.est-body { padding: 16px 18px 20px; overflow-y: auto; flex: 1; }
.est-breakdown { background: #f8fafc; border-radius: 12px; padding: 14px 16px; margin: 4px 0 10px; border: 1px solid #f1f5f9; }
.est-section-label { font-size: 10px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--sans); display: block; margin-bottom: 6px; }
.est-input { width: 100%; border: 1.5px solid #e2e8f0; border-radius: 12px !important; padding: 10px 13px; font-size: 14px; font-family: var(--sans); outline: none; box-sizing: border-box; background: #fff; transition: border-color .12s; }
.est-input:focus { border-color: #0c1623 !important; box-shadow: 0 0 0 3px rgba(12,22,35,0.08) !important; }
.est-book-btn { width: 100%; padding: 14px; background: #1E553C; color: white; border: none; border-radius: 999px !important; font-size: 14px; font-weight: 700; cursor: pointer; font-family: var(--sans); transition: background .15s; margin-bottom: 8px; margin-top: 14px; }
.est-book-btn:hover { background: #166534; }
.est-paylink-btn { width: 100%; padding: 13px; background: #fff; color: #1E553C; border: 2px solid #1E553C !important; border-radius: 999px !important; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); transition: all .15s; margin-bottom: 8px; }
.est-paylink-btn:hover { background: #1E553C; color: #fff; }
/* ── Estimate Hero, Input Cards, Trip Pills ──────────────────── */
.est-total-hero { background: #ecfdf5; border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #bbf7d0; }
.est-total-hero-label { font-size: 10px; font-weight: 600; color: #15803d; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 6px; font-family: var(--sans); }
.est-input-card { background: #fff; border: 1.5px solid #e2e8f0; border-radius: 14px; padding: 14px 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.est-input-card:focus-within { border-color: #0c1623 !important; box-shadow: 0 0 0 3px rgba(12,22,35,0.08) !important; }
.est-input-card-label { font-size: 10px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; font-family: var(--sans); }
.est-input-card input { width: 100%; border: none; outline: none; font-size: 24px; font-weight: 800; color: #0c1623; font-family: var(--mono); background: transparent; padding: 0; -moz-appearance: textfield; }
.est-input-card input::-webkit-outer-spin-button, .est-input-card input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.est-input-card input::placeholder { color: #e2e8f0; font-weight: 400; }
.est-trip-pills { display: flex; gap: 6px; margin-top: 6px; }
.est-trip-pill { flex: 1; padding: 9px 4px; border: 1.5px solid #cbd5e1; border-radius: 999px; font-size: 12px; font-weight: 600; color: #475569; cursor: pointer; background: transparent; font-family: var(--sans); transition: all .15s; text-align: center; white-space: nowrap; }
.est-trip-pill.active { background: #0c1623; border-color: #0c1623; color: white; }
.est-trip-pill:hover:not(.active) { border-color: #0c1623; color: #0c1623; background: #f8fafc; }
.est-example-box { background: #f8fafc; border-radius: 10px; padding: 12px 14px; font-size: 11px; font-family: var(--mono); color: #64748b; line-height: 1.7; border: 1px solid #f1f5f9; margin-top: 8px; }
#est-example-calc { display: block; background: #f8fafc; border-radius: 10px; padding: 12px 14px; font-size: 11px; font-family: var(--mono); color: #64748b; line-height: 1.7; border: 1px solid #f1f5f9; margin: 8px 18px 0; }
.est-sheet-close-bar { padding: 12px 18px 4px; display: flex; justify-content: center; }
.est-sheet-close-pill { background: #f1f5f9; border: none; border-radius: 24px; padding: 10px 32px; font-size: 15px; font-weight: 700; color: #475569; cursor: pointer; font-family: var(--sans); width: 100%; transition: background .12s; }
.est-sheet-close-pill:hover { background: #e2e8f0; }
.send-method-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 14px; cursor: pointer; text-align: left; transition: border-color .15s, background .15s; font-family: var(--sans); }
.send-method-btn:hover { background: #f1f5f9; border-color: #1E553C; }
.send-method-icon { font-size: 22px; flex-shrink: 0; }
.send-method-label { font-size: 15px; font-weight: 700; color: #0c1623; }
.send-method-sub { font-size: 12px; color: #94a3b8; margin-top: 1px; font-family: var(--mono); }

/* ── Jobber-style Invoice Sheet ───────────────────────────────── */
.est-overlay { align-items: flex-end !important; padding: 0 !important; }
.est-sheet { border-radius: 24px 24px 0 0 !important; max-width: 100% !important; max-height: 95vh !important; width: 100% !important; overflow: hidden !important; }
/* ── Estimator responsive stacking ─────────────────────────────── */
.inv-section-row { flex-wrap: wrap; gap: 6px; }
@media (max-width: 480px) {
  .board-main-actions { flex-wrap: nowrap !important; align-items: center !important; gap: 8px; }
  .board-main-actions > div:first-child { min-width: 0; flex: 1 1 auto; overflow: hidden; }
  .board-main-actions > div:last-child { padding-left: 8px !important; flex-shrink: 0; }
  .inv-section { padding-left: 14px !important; padding-right: 14px !important; }
  .inv-field-group, .inv-line-items-box { font-size: 13px; }
}
.inv-sheet-hd { background: #fff; padding: 16px 18px 14px; border-bottom: 1px solid #e2e8f0; flex-shrink: 0; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 10; }
.inv-sheet-hd-close { width: 32px; height: 32px; border-radius: 50%; background: #f1f5f9; border: none; cursor: pointer; font-size: 16px; color: #475569; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .12s; }
.inv-sheet-hd-close:hover { background: #e2e8f0; }
.inv-sheet-hd-title { font-size: 17px; font-weight: 800; color: #0c1623; flex: 1; font-family: var(--sans); letter-spacing: -.3px; }
.inv-sheet-hd-tag { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; border-radius: 20px; padding: 3px 10px; font-size: 10px; font-weight: 700; font-family: var(--mono); letter-spacing: .3px; flex-shrink: 0; }
.inv-body { padding: 0; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.inv-section { padding: 18px 18px 0; }
.inv-section-title { font-size: 10px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--sans); margin-bottom: 10px; }
.inv-section-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
/* Client search */
.inv-client-search-wrap { position: relative; margin-bottom: 10px; }
.inv-client-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #475569; pointer-events: none; }
.inv-client-search-input { width: 100%; padding: 11px 14px 11px 36px; background: #f1f5f9; border: 1.5px solid #cbd5e1; border-radius: 12px; font-size: 14px; font-family: var(--sans); color: #0c1623; outline: none; box-sizing: border-box; transition: background .12s, border-color .12s; }
.inv-client-search-input:focus { background: #e8edf3; border-color: #94a3b8; }
.inv-client-search-input::placeholder { color: #64748b; }
/* Darken inline SVG icons inside field rows */
.inv-field-icon svg { stroke: #64748b !important; }
.inv-client-dropdown { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.10); z-index: 20; max-height: 180px; overflow-y: auto; }
.inv-client-option { padding: 10px 14px; font-size: 13px; color: #0f172a; cursor: pointer; border-bottom: 1px solid #f8fafc; font-family: var(--sans); }
.inv-client-option:last-child { border-bottom: none; }
.inv-client-option:hover { background: #f8fafc; }
.inv-client-option-sub { font-size: 11px; color: #94a3b8; font-family: var(--mono); margin-top: 1px; }
/* Client field group */
.inv-field-group { background: #f8fafc; border-radius: 14px; overflow: hidden; border: 1.5px solid #cbd5e1; }
.inv-field-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #e2e8f0; }
.inv-field-row:last-child { border-bottom: none; }
.inv-field-icon { font-size: 16px; flex-shrink: 0; margin-top: 2px; display: flex; align-items: center; }
.inv-field-lbl { font-size: 10px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--sans); margin-bottom: 2px; }
.inv-field-val { font-size: 14px; font-weight: 600; color: #0c1623; font-family: var(--sans); line-height: 1.35; }
/* Line items */
.inv-add-line-btn { background: none; border: none; color: #1E553C; font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--sans); padding: 0; }
.inv-line-items-box { background: #f8fafc; border-radius: 14px; border: 1.5px solid #cbd5e1; overflow: hidden; }
.inv-line-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #e2e8f0; }
.inv-line-item:last-child { border-bottom: none; }
.inv-line-item-name { font-size: 13px; font-weight: 600; color: #0c1623; font-family: var(--sans); }
.inv-line-item-sub { font-size: 11px; color: #64748b; font-family: var(--mono); margin-top: 1px; }
.inv-line-item-amt { font-size: 14px; font-weight: 700; color: #0c1623; font-family: var(--mono); flex-shrink: 0; }
.inv-line-add-row { display: flex; align-items: center; padding: 11px 14px; gap: 10px; border-top: 2px dashed #cbd5e1; cursor: pointer; background: #f8fafc; margin-top: 2px; }
.inv-line-add-row:hover { background: #f0fdf4; border-top-color: #86efac; }
.inv-line-add-icon { width: 22px; height: 22px; background: #1E553C; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; flex-shrink: 0; line-height: 1; }
.inv-line-add-label { font-size: 13px; font-weight: 600; color: #1E553C; font-family: var(--sans); }
/* Total bar */
.inv-total-bar { margin: 16px 18px; background: #0c1623; border-radius: 14px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; }
.inv-total-lbl { font-size: 12px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--sans); }
.inv-total-amt { font-size: 36px; font-weight: 900; color: #fff; font-family: var(--mono); letter-spacing: -1.5px; line-height: 1; }
/* Trip section */
.inv-trip-section { padding: 14px 18px 0; }
/* Payment toggles */
.inv-toggles-card { background: #f8fafc; border-radius: 14px; border: 1.5px solid #cbd5e1; padding: 0 14px; overflow: hidden; }
.inv-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid #e2e8f0; }
.inv-toggle-row:last-child { border-bottom: none; }
.inv-toggle-info { flex: 1; min-width: 0; padding-right: 14px; }
.inv-toggle-lbl { font-size: 14px; font-weight: 600; color: #0c1623; font-family: var(--sans); }
.inv-toggle-sub { font-size: 11px; color: #64748b; font-family: var(--mono); margin-top: 2px; }
.inv-ios-toggle { position: relative; width: 44px; height: 26px; border-radius: 999px; background: #e2e8f0; border: none; cursor: pointer; transition: background .2s; flex-shrink: 0; outline: none; padding: 0; }
.inv-ios-toggle.on { background: #1E553C; }
.inv-ios-toggle::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .2s; }
.inv-ios-toggle.on::after { transform: translateX(18px); }
/* Notes */
.inv-notes-input { width: 100%; border: none; border-radius: 12px; padding: 12px 14px; font-size: 14px; font-family: var(--sans); outline: none; box-sizing: border-box; background: #f1f5f9; resize: none; color: #0c1623; transition: background .12s; }
.inv-notes-input:focus { background: #e8edf3; }
.inv-notes-input::placeholder { color: #94a3b8; }
/* Pinned Review & Send button */
.inv-review-bar { padding: 14px 18px calc(env(safe-area-inset-bottom,0px) + 14px); background: #fff; border-top: 1px solid #f1f5f9; flex-shrink: 0; }
.inv-review-btn { width: 100%; padding: 16px; background: #1E553C; color: white; border: none; border-radius: 14px; font-size: 16px; font-weight: 800; cursor: pointer; font-family: var(--sans); letter-spacing: .2px; transition: background .15s; }
.inv-review-btn:hover { background: #164d30; }
.inv-review-btn:disabled { background: #cbd5e1; color: #94a3b8; cursor: not-allowed; }
/* Line items mini-modal */
.inv-line-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); border-radius: 24px 24px 0 0; z-index: 10; display: flex; align-items: flex-end; }
.inv-line-modal-panel { background: #fff; border-radius: 20px 20px 0 0; width: 100%; padding: 24px 18px 32px; }
.inv-line-modal-title { font-size: 17px; font-weight: 800; color: #0c1623; font-family: var(--sans); margin-bottom: 20px; letter-spacing: -.3px; }
.inv-line-modal-field { margin-bottom: 14px; }
.inv-line-modal-field label { font-size: 10px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .07em; font-family: var(--sans); display: block; margin-bottom: 7px; }
.inv-line-modal-input { width: 100%; padding: 13px 14px; background: #f1f5f9; border: none; border-radius: 10px; font-size: 18px; font-family: var(--mono); font-weight: 700; color: #0c1623; outline: none; box-sizing: border-box; -moz-appearance: textfield; }
.inv-line-modal-input::-webkit-outer-spin-button, .inv-line-modal-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.inv-line-modal-input:focus { background: #e8edf3; }
.inv-line-modal-save { width: 100%; padding: 15px; background: #0c1623; color: white; border: none; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: var(--sans); margin-top: 8px; transition: background .15s; }
.inv-line-modal-save:hover { background: #1e3a5f; }
.inv-line-modal-cancel { width: 100%; padding: 11px; background: transparent; color: #94a3b8; border: none; font-size: 14px; font-weight: 600; cursor: pointer; font-family: var(--sans); margin-top: 4px; }

/* ── GLOBAL INPUT POLISH: Navy focus, 12px radius ─────────────── */
.cp-input, .est-input, .ds-profile-input, .ued-input,
.approve-field input, .approve-field select, .approve-field textarea,
.qb-map-input, .payroll-filters input[type=date], .payroll-filters select,
.integ-field { border-radius: 12px !important; }

.cp-input:focus, .est-input:focus, .ds-profile-input:focus, .ued-input:focus,
.approve-field input:focus, .approve-field select:focus, .approve-field textarea:focus,
.chat-input:focus, .chat-select:focus, .qb-map-input:focus, .tz-select:focus,
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: #0c1623 !important;
  box-shadow: 0 0 0 3px rgba(12,22,35,0.08) !important;
}
.login-form input:focus { border-color: #0c1623 !important; box-shadow: inset 0 2px 6px rgba(0,0,0,0.06), 0 0 0 3px rgba(12,22,35,0.10) !important; }

/* ── GLOBAL SECTION HEADER: Inter 600 + dark navy #112233 ──────── */
.cp-card-title, .cmd-greeting-title, .leads-page-title, .integ-page-title,
.cmd-card-title { font-weight: 600 !important; font-family: var(--sans) !important; color: #112233 !important; }

/* ── MORE MENU & FAB ────────────────────────────────────────────── */
.more-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); z-index: 400; background: rgba(0,0,0,0.45); display: none; align-items: flex-end; justify-content: center; }
.more-overlay.open { display: flex; }
.more-sheet { background: #fff; width: 100%; max-width: 480px; max-height: min(88vh, calc(100dvh - env(safe-area-inset-top, 20px) - env(safe-area-inset-bottom, 0px) - 64px)); border-radius: 24px 24px 0 0; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 -8px 40px rgba(0,0,0,0.14); animation: sheetUp .25s cubic-bezier(0.32,0.72,0,1); }
.more-top-bar { flex-shrink: 0; background: #fff; border-radius: 24px 24px 0 0; }
.more-scroll-body { flex: 1; overflow-y: auto; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
@keyframes sheetUp { from { transform: translateY(48px); opacity: 0; } to { transform: none; opacity: 1; } }
.more-drag-handle { width: 36px; height: 4px; background: #e2e8f0; border-radius: 2px; margin: 12px auto 0; }
.more-header { padding: 16px 20px 14px; display: flex; align-items: center; gap: 12px; }
.more-logo-badge { width: 42px; height: 42px; background: #0c1623; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 22px; }
.more-header-text { flex: 1; }
.more-header-brand { font-size: 15px; font-weight: 700; color: #112233; font-family: var(--sans); }
.more-header-user { font-size: 12px; color: #64748b; font-family: var(--sans); margin-top: 1px; }
.more-close-btn { width: 32px; height: 32px; border-radius: 50%; background: #f1f5f9; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #475569; font-size: 14px; transition: background .12s; flex-shrink: 0; }
.more-close-btn:hover { background: #e2e8f0; }
.more-section-label { font-size: 10px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.07em; padding: 0 20px 10px; display: block; font-family: var(--sans); }
.more-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 0 16px 20px; }
.people-seg { display:flex; gap:8px; background:transparent; padding:0; margin-bottom:18px; }
.people-seg-btn { flex:1; padding:8px 16px; border:1px solid #CBD5E1; border-radius:8px; font-size:13px; font-weight:600; color:#64748b; background:#fff; cursor:pointer; transition:border-color .14s, background .14s, color .14s, box-shadow .14s; font-family:var(--sans); }
.people-seg-btn:not(.active):hover { border-color:#1E553C; box-shadow:0 0 0 3px rgba(30,85,60,.06); color:#1E553C; }
.people-seg-btn.active { background:#1E553C; color:#fff; border-color:#1E553C; box-shadow:0 1px 3px 0 rgb(0 0 0/0.1), 0 1px 2px -1px rgb(0 0 0/0.1); }
.more-grid-card { background: #F3F3F1; border-radius: 16px; padding: 18px 14px 14px; cursor: pointer; transition: all .15s; border: none; text-align: left; width: 100%; }
.more-grid-card:hover { background: #eaeae8; transform: translateY(-1px); }
.more-grid-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(0,0,0,0.06); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.more-grid-icon svg { width: 18px; height: 18px; stroke: #334155; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.more-grid-title { font-size: 12px; font-weight: 700; color: #112233; font-family: var(--sans); line-height: 1.3; }
.more-list { padding: 0 8px 8px; }
.more-list-item { display: flex; align-items: center; gap: 14px; padding: 12px 12px; border-radius: 12px; cursor: pointer; transition: background .1s; }
.more-list-item:hover { background: #f8fafc; }
.more-list-icon { width: 38px; height: 38px; border-radius: 12px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.more-list-icon svg { width: 18px; height: 18px; stroke: #475569; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.more-list-text { flex: 1; font-size: 15px; font-weight: 500; color: #112233; font-family: var(--sans); }
.more-list-chevron svg { width: 16px; height: 16px; stroke: #cbd5e1; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.more-divider { height: 1px; background: #f1f5f9; margin: 4px 20px 4px; }
/* FAB speed dial container */
/* z-index sits just above .more-overlay (400) so Create Ride stays reachable
   from the mobile More menu, but stays below dialogs/drawers (500+) and
   modal backdrops (600/900/1200) so it never covers a focused modal. */
.fab-container { position: fixed; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); right: 20px; z-index: 450; display: none; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.fab-container.visible { display: flex; }
.fab-backdrop { position: fixed; inset: 0; z-index: 449; display: none; pointer-events: auto; background: rgba(0,0,0,0); transition: background .2s ease; }
.fab-backdrop.visible { display: block; background: rgba(0,0,0,0.28); }
.fab-speed-dial { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; opacity: 0; transform: translateY(12px); transition: opacity .18s ease, transform .18s ease; }
.fab-speed-dial.open { pointer-events: auto; opacity: 1; transform: none; }
.fab-speed-item { display: flex; align-items: center; gap: 0; cursor: pointer; background: #1E553C; border-radius: 100px; overflow: hidden; box-shadow: 0 4px 18px rgba(30,85,60,0.38); transition: transform .12s ease, box-shadow .12s ease; min-height: 48px; }
.fab-speed-item:hover { transform: scale(1.03); box-shadow: 0 6px 24px rgba(30,85,60,0.50); }
.fab-speed-item:nth-child(1) { transition-delay: .06s; }
.fab-speed-item:nth-child(2) { transition-delay: .03s; }
.fab-speed-label { background: transparent; color: #fff; font-size: 14px; font-weight: 500; font-family: var(--sans); padding: 0 14px 0 22px; white-space: nowrap; box-shadow: none; border-radius: 0; letter-spacing: 0; }
.fab-speed-btn-circle { width: 42px; height: 42px; border-radius: 50%; background: rgba(0,0,0,0.18); border: none; margin: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: none; flex-shrink: 0; transition: background .12s; }
.fab-speed-btn-circle:hover { background: rgba(0,0,0,0.30); }
.fab-speed-btn-circle svg { width: 18px; height: 18px; stroke: #fff; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fab-main-btn { width: 56px; height: 56px; border-radius: 50%; background: #112233; color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(17,34,51,0.30); transition: background .15s, box-shadow .15s; flex-shrink: 0; pointer-events: auto; }
.fab-main-btn:hover { background: #1e3a5f; box-shadow: 0 12px 32px rgba(17,34,51,0.42); }
.fab-main-btn svg { width: 24px; height: 24px; stroke: #fff; stroke-width: 2.5; fill: none; stroke-linecap: round; transition: transform .22s cubic-bezier(.34,1.56,.64,1); }
.fab-main-btn.open svg { transform: rotate(45deg); }
/* More menu: powered-by watermark */
.more-powered-by { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 10px; color: #b0bec5; font-family: var(--sans); letter-spacing: 0.07em; padding: 0 20px 12px; border-bottom: 1px solid #f1f5f9; margin-bottom: 4px; }
.more-powered-by svg { flex-shrink: 0; fill: #b0bec5; }
.more-logo-img { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; }
/* More menu: superadmin switch-tenant card */
.more-sa-wrapper { padding: 0 8px 8px; }
.more-sa-card { background: #0c1623; border-radius: 14px; padding: 11px 14px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: background .12s; }
.more-sa-card:hover { background: #1a2d47; }
.more-sa-icon { width: 34px; height: 34px; border-radius: 10px; background: rgba(74,222,128,0.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.more-sa-icon svg { width: 16px; height: 16px; stroke: #4ade80; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.more-sa-badge { font-size: 9px; font-weight: 800; color: #4ade80; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 2px; }
.more-sa-current { font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.9); font-family: var(--sans); }
.more-sa-chevron svg { flex-shrink: 0; }
.more-sa-picker { margin-top: 8px; background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 12px 14px; display: none; }
.more-sa-picker.open { display: block; }
.more-sa-picker select { width: 100%; padding: 9px 12px; border: 1.5px solid #cbd5e1; border-radius: 8px; font-family: var(--sans); font-size: 14px; color: #0f172a; background: #fff; outline: none; cursor: pointer; margin-bottom: 8px; }
.more-sa-picker-hint { font-size: 11px; color: #94a3b8; font-family: var(--sans); line-height: 1.45; }

/* Board greeting hero (floating card above ride list) */
.board-greeting-hero { background: #ffffff; border-radius: 20px; padding: 14px 18px; margin-bottom: 14px; box-shadow: 0 10px 40px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.06); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.board-greeting-left { flex: 1; min-width: 0; }
.board-greeting-period { font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.07em; font-family: var(--sans); margin-bottom: 3px; }
.board-greeting-name { font-size: 19px; font-weight: 800; color: #112233; font-family: var(--sans); line-height: 1.1; }
.board-greeting-meta { font-size: 12px; color: #64748b; font-family: var(--sans); margin-top: 4px; }
.board-greeting-avatar { width: 40px; height: 40px; border-radius: 50%; background: #0c1623; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; color: white; font-weight: 700; font-family: var(--sans); }

/* ── GLOBAL INPUT LABELS: 12px slate ──────────────────────────── */
.cp-label, .ued-label, .integ-field-label,
.approve-field label, .billing-settings-grid .setting-row label,
.payroll-filters .pf-group label {
  font-size: 12px !important; color: #64748b !important;
  font-weight: 500 !important; font-family: var(--sans) !important;
  letter-spacing: 0.04em !important;
}

/* ── Recently Completed board section ────────────────── */
.recently-completed-section { border-top: 2px dashed #e2e8f0; margin-top: 28px; padding-top: 4px; }
.recently-completed-section .tl-ride-row { cursor: pointer; }

/* ── SCHEDULE TAB ─────────────────────────────────────────────── */
/* ── Schedule tab: must be flex so the scroll area fills the remaining height ── */
#tab-schedule      { padding: 0 !important; background: #f8fafc !important; flex-direction: column; overflow: hidden !important; }
#tab-driver-schedule { padding: 0 !important; background: #f8fafc !important; flex-direction: column; overflow: hidden !important; }
/* Schedule tabs must be flex on ALL screen sizes so sch-scroll-area can flex:1 */
#tab-schedule.active, #tab-driver-schedule.active { display: flex !important; }
.sch-header { padding: 12px 16px 0; background: #fff; border-bottom: 1px solid #f1f5f9; flex-shrink: 0; }
.sch-view-switcher { display: flex; background: transparent; padding: 0; gap: 8px; margin-bottom: 10px; }
.sch-view-btn { flex: 1; padding: 8px 16px; border: 1px solid #CBD5E1; background: #fff; font-family: var(--sans); font-size: 14px; font-weight: 600; color: #64748b; border-radius: 8px; cursor: pointer; transition: border-color .14s, background .14s, color .14s, box-shadow .14s; }
.sch-view-btn:not(.active):hover { border-color: #1E553C; box-shadow: 0 0 0 3px rgba(30,85,60,.06); color: #1E553C; }
.sch-view-btn.active { background: #1E553C; color: #fff; border-color: #1E553C; box-shadow: 0 1px 3px 0 rgb(0 0 0/0.1), 0 1px 2px -1px rgb(0 0 0/0.1); }
.sch-date-strip { display: flex; overflow: hidden; padding: 0 0 10px; align-items: center; gap: 3px; }
.sch-day-cell { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; cursor: pointer; gap: 3px; padding: 4px 2px; border-radius: 10px; transition: background .12s; }
.sch-week-nav { flex-shrink: 0; background: none; border: 1px solid #e2e8f0; border-radius: 8px; width: 26px; height: 26px; cursor: pointer; font-size: 14px; color: #64748b; display: flex; align-items: center; justify-content: center; transition: background .12s, border-color .12s; padding: 0; font-family: var(--sans); font-weight: 700; line-height: 1; }
.sch-week-nav:hover { background: #f1f5f9; border-color: #cbd5e1; color: #0f172a; }
.sch-day-cell:active { background: #f1f5f9; }
.sch-day-dow { font-size: 10px; font-weight: 700; color: #94a3b8; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.04em; }
.sch-day-num { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: #0f172a; font-family: var(--sans); transition: background .15s, color .15s; }
.sch-day-cell.sch-today .sch-day-num { background: #1E553C; color: #fff; font-weight: 900; font-size: 16px; }
.sch-day-cell.sch-selected:not(.sch-today) .sch-day-num { background: #0c1623; color: #fff; font-weight: 900; }
.sch-day-dot { width: 4px; height: 4px; border-radius: 50%; background: #1E553C; opacity: 0; margin-top: 1px; }
.sch-day-cell.sch-has-rides .sch-day-dot { opacity: 1; }
/* Scroll area: flex:1 fills remaining height; min-height:0 prevents flexbox from
   expanding it to content size (the classic overflow-in-flex bug) */
.sch-scroll-area {
  flex: 1;
  min-height: 0;                      /* ← THE critical fix */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;  /* momentum scroll on iOS */
  scroll-behavior: smooth;
  position: relative;
}
/* Thin, unobtrusive scrollbar — desktop WebKit only */
.sch-scroll-area::-webkit-scrollbar { width: 4px; }
.sch-scroll-area::-webkit-scrollbar-track { background: transparent; }
.sch-scroll-area::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }
/* Hide scrollbar while keeping scroll functionality */
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.sch-scroll-area::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }
/* Firefox thin scrollbar */
.sch-scroll-area { scrollbar-width: thin; scrollbar-color: #e2e8f0 transparent; }
/* Timeline */
.sch-timeline { position: relative; padding-bottom: 48px; }
.sch-hour-row { display: flex; align-items: flex-start; height: 64px; }
.sch-hour-label { width: 80px; flex-shrink: 0; font-size: 11px; color: #64748b; font-family: 'Inter', var(--sans); font-weight: 700; text-align: right; padding-right: 12px; margin-top: -7px; background: #fff; position: relative; z-index: 2; }
.sch-hour-lane { flex: 1; height: 64px; border-left: 1px solid #E2E8F0; border-top: 1px solid #E2E8F0; position: relative; }
.sch-hour-row:first-child .sch-hour-lane { border-top: none; }
.sch-half-tick { position: absolute; top: 32px; left: 0; right: 0; border-top: 1px dashed #F1F5F9; pointer-events: none; }
/* Ride block — floating white card, status colour lives only in left accent */
.sch-ride-block { position: absolute; left: 88px; right: 16px; max-width: 560px; min-width: 120px; border-radius: 8px; padding: 0 10px 0 12px; cursor: pointer; pointer-events: auto; z-index: 4; min-height: 62px; overflow: hidden; border-left: 4px solid #94a3b8; background: #fff !important; color: #0f172a !important; box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.03); transition: transform .15s ease, box-shadow .15s ease; display: flex; flex-direction: column; justify-content: center; }
.sch-ride-block:hover { transform: scale(1.012); box-shadow: 0 6px 18px rgba(0,0,0,.10); }
.sch-ride-block:active { transform: scale(0.99); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.sch-rb-time { font-size: 13px; font-weight: 500; font-family: var(--sans); color: #64748b; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-rb-name { font-size: 13px; font-weight: 500; color: #0c1623; font-family: var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.sch-rb-driver { font-size: 11px; font-weight: 600; font-family: var(--sans); color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Current time indicator */
.sch-now-line { position: absolute; left: 80px; right: 0; z-index: 8; pointer-events: none; display: flex; align-items: center; }
.sch-now-dot { width: 9px; height: 9px; border-radius: 50%; background: #3b82f6; flex-shrink: 0; margin-left: -5px; }
.sch-now-bar { flex: 1; height: 2px; background: #3b82f6; }
/* List view */
.sch-list-section { padding: 8px 16px 32px; }
.sch-list-label { font-size: 10px; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--sans); padding: 12px 0 6px; }
.sch-list-card { background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); cursor: pointer; display: flex; align-items: center; gap: 12px; transition: box-shadow .12s; }
.sch-list-card:active { box-shadow: 0 4px 16px rgba(0,0,0,0.10); }
.sch-lc-time { text-align: center; min-width: 38px; flex-shrink: 0; }
.sch-lc-hr { font-size: 16px; font-weight: 800; color: #0c1623; font-family: var(--sans); line-height: 1.15; }
.sch-lc-ampm { font-size: 10px; color: #94a3b8; font-family: var(--sans); font-weight: 600; text-transform: uppercase; }
.sch-lc-sep { width: 3px; height: 38px; border-radius: 2px; flex-shrink: 0; }
.sch-lc-info { flex: 1; min-width: 0; }
.sch-lc-name { font-size: 14px; font-weight: 700; color: #0f172a; font-family: var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-lc-sub { font-size: 11px; color: #64748b; font-family: var(--sans); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-lc-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px; margin-top: 4px; display: inline-block; font-family: var(--sans); }
/* Empty state — floating card in the center of the visible area */
.sch-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; background: #fff; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04); padding: 36px 28px; max-width: 320px; width: 100%; }
.sch-empty-icon { font-size: 40px; margin-bottom: 2px; }
.sch-empty-title { font-size: 15px; font-weight: 700; color: #64748b; font-family: 'Inter', var(--sans); }
.sch-empty-sub { font-size: 12px; color: #94a3b8; font-family: 'Inter', var(--sans); line-height: 1.5; }
/* Mobile schedule grid: narrower label column → more room for ride cards */
@media (max-width: 700px) {
  .sch-hour-label { width: 52px; padding-right: 8px; font-size: 10px; }
  .sch-now-line   { left: 52px; }
  .sch-ride-block { left: 60px; right: 4px; }
  .sch-hour-lane  { border-left-width: 1px; }
}
/* Map placeholder */
.sch-map-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 360px; gap: 10px; padding: 40px 24px; }

/* ── JOBBER-STYLE WORKFLOW DASHBOARD ─────────────────────── */
.jb-dash { display: flex; flex-direction: column; gap: 24px; margin-bottom: 24px; }
.jb-section-label { font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.10em; font-family: 'Inter', var(--sans); margin-bottom: 8px; }
/* Header */
.jb-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: 4px; }
.jb-header-greeting { font-size: 24px; font-weight: 800; color: #0c1623; font-family: 'Inter', var(--sans); line-height: 1.15; letter-spacing: -0.5px; }
.jb-header-date { font-size: 12px; color: #94a3b8; font-family: 'Inter', var(--sans); font-weight: 500; margin-top: 3px; }
/* Pipeline */
.jb-pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.jb-col { background: #fff; border-radius: 16px; border: 1px solid #E2E8F0; box-shadow: 0 1px 3px 0 rgba(0,0,0,0.05); overflow: hidden; transition: box-shadow .18s, border-color .18s, transform .18s; cursor: default; }
.jb-col:hover { border-color: #CBD5E1; box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04); transform: translateY(-1px); }
.jb-col-link { cursor: pointer; }
.jb-col-link:hover { border-color: #1e40af; box-shadow: 0 4px 20px rgba(30,64,175,0.14), 0 1px 4px rgba(0,0,0,0.06); transform: translateY(-2px); }
.jb-col-link:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.jb-col-arrow { opacity: 0.5; font-size: 10px; }
.jb-col-strip { height: 4px; width: 100%; margin-top: -1px; }
.jb-col-body { padding: 20px 24px 24px; }
.jb-col-num { font-size: 40px; font-weight: 900; color: #0c1623; font-family: 'Inter', var(--sans); line-height: 1; letter-spacing: -2px; }
.jb-col-val { font-size: 14px; font-weight: 600; color: #64748b; font-family: 'Inter', var(--sans); margin-top: 5px; }
.jb-col-label { font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.08em; font-family: 'Inter', var(--sans); margin-top: 12px; }
/* Split row — alerts sidebar grows proportionally on wide screens */
.jb-split { display: grid; grid-template-columns: 1fr min(420px, 32%); gap: 24px; align-items: start; }
/* Performance card */
.jb-perf-card { background: #fff; border-radius: 16px; border: 1px solid #E2E8F0; box-shadow: 0 1px 3px 0 rgba(0,0,0,0.05); padding: 24px; transition: box-shadow .18s, border-color .18s; }
.jb-perf-card-link { cursor: pointer; transition: box-shadow .18s, border-color .18s, transform .18s; }
.jb-perf-card-link:hover { border-color: #CBD5E1; box-shadow: 0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04); transform: translateY(-1px); }
.jb-perf-row { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #f1f5f9; border-radius: 14px; overflow: hidden; margin-bottom: 16px; }
.jb-perf-stat { padding: 14px 16px; border-right: 1px solid #f1f5f9; }
.jb-perf-stat:last-child { border-right: none; }
.jb-perf-num { font-size: 22px; font-weight: 900; font-family: 'Inter', var(--sans); line-height: 1; letter-spacing: -0.5px; }
.jb-perf-lbl { font-size: 9px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.07em; font-family: 'Inter', var(--sans); margin-top: 5px; }
.jb-view-sch-btn { display: inline-flex; align-items: center; gap: 7px; background: transparent; color: #1E553C; border: 1.5px solid #1E553C; border-radius: 999px; padding: 8px 18px; font-size: 12px; font-weight: 700; font-family: 'Inter', var(--sans); cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.jb-view-sch-btn:hover { background: #1E553C; color: #fff; }
/* Alerts card */
.jb-alerts-card { background: #fff; border-radius: 16px; border: 1px solid #E2E8F0; box-shadow: 0 1px 3px 0 rgba(0,0,0,0.05); padding: 24px; position: sticky; top: 16px; }
.jb-alert-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f8fafc; }
.jb-alert-item:last-child { border-bottom: none; }
.jb-alert-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.jb-alert-dot.warn { background: #f59e0b; }
.jb-alert-dot.info { background: #3b82f6; box-shadow: 0 0 5px #3b82f680; }
.jb-alert-dot.err  { background: #ef4444; box-shadow: 0 0 5px #ef444480; }
.jb-alert-dot.ok   { background: #22c55e; }
.jb-alert-text { font-size: 12px; font-weight: 700; color: #0f172a; font-family: 'Inter', var(--sans); line-height: 1.4; }
.jb-alert-sub  { font-size: 11px; color: #94a3b8; font-family: 'Inter', var(--sans); margin-top: 2px; line-height: 1.4; }
.jb-alert-empty { text-align: center; padding: 8px 0 4px; font-size: 12px; color: #94a3b8; font-family: 'Inter', var(--sans); }
/* Supplementary cards below pipeline */
.jb-supp { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .jb-pipeline { grid-template-columns: repeat(2, 1fr); } .jb-split { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .jb-pipeline { grid-template-columns: repeat(2, 1fr); gap: 8px; } .jb-col-num { font-size: 30px; } .jb-perf-row { grid-template-columns: repeat(2, 1fr); } .jb-supp { grid-template-columns: 1fr; } }
/* ── JOBBER DASHBOARD — PRIORITY TRIPS & LOWER ROW ──────── */
.jb-perf-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.jb-lower { display: grid; grid-template-columns: 1fr min(380px, 34%); gap: 24px; align-items: start; }
.jb-priority-card { background: #fff; border-radius: 16px; border: 1px solid #E2E8F0; box-shadow: 0 1px 3px 0 rgba(0,0,0,0.05); padding: 24px; }
.jb-priority-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 8px; cursor: pointer; transition: background .12s; margin: 0 -8px; border-bottom: 1px solid #f8fafc; }
.jb-priority-row:hover { background: #f8fafc; }
.jb-priority-row:last-child { border-bottom: none; }
.jb-priority-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.jb-priority-dot.overdue { background: #ef4444; box-shadow: 0 0 0 3px #fee2e2; }
.jb-priority-dot.active  { background: #2563eb; box-shadow: 0 0 0 3px #dbeafe; }
.jb-priority-time { font-size: 11px; font-weight: 700; font-family: 'Inter', var(--sans); color: #64748b; min-width: 52px; flex-shrink: 0; }
.jb-priority-info { flex: 1; min-width: 0; }
.jb-priority-patient { font-size: 13px; font-weight: 700; color: #0c1623; font-family: 'Inter', var(--sans); }
.jb-priority-addr { font-size: 11px; color: #94a3b8; font-family: 'Inter', var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; margin-top: 2px; }
.jb-priority-driver { font-size: 11px; color: #475569; font-family: 'Inter', var(--sans); font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.jb-priority-badge { font-size: 10px; font-weight: 800; padding: 3px 10px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; font-family: 'Inter', var(--sans); letter-spacing: 0.04em; }
.jb-priority-badge.overdue { background: #fee2e2; color: #b91c1c; }
.jb-priority-badge.enroute { background: #dbeafe; color: #1d4ed8; }
.jb-priority-badge.waiting { background: #ede9fe; color: #6d28d9; }
.jb-priority-badge.ready   { background: #dcfce7; color: #1E553C; }
.jb-priority-empty { font-size: 12px; color: #94a3b8; font-family: 'Inter', var(--sans); padding: 6px 0 4px; text-align: center; }
.jb-priority-group-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em; font-family: 'Inter', var(--sans); padding: 8px 0 4px; }
.jb-priority-group-label.overdue { color: #ef4444; }
.jb-priority-group-label.active  { color: #2563eb; }
@media (max-width: 900px) { .jb-lower { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .jb-priority-addr { display: none; } .jb-priority-driver { display: none; } }

/* ── ACTIVITY FEED ──────────────────────────────────────────────── */
.af-card { background: #fff; border-radius: 16px; border: 1px solid #E2E8F0; box-shadow: 0 1px 3px 0 rgba(0,0,0,0.05); padding: 24px; }
.af-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.af-filters { display: flex; gap: 5px; flex-wrap: wrap; }
.af-filter-btn { font-size: 11px; font-weight: 700; font-family: 'Inter', var(--sans); padding: 5px 13px; border-radius: 999px; border: 1px solid #e2e8f0; background: #f8fafc; color: #64748b; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.af-filter-btn.active { background: #1E553C; color: #fff; border-color: #1E553C; }
.af-filter-btn:hover:not(.active) { background: #f1f5f9; border-color: #cbd5e1; }
.af-list { max-height: 340px; overflow-y: auto; }
.af-item { display: flex; align-items: flex-start; gap: 11px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.af-item:last-child { border-bottom: none; }
.af-icon { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.af-icon.ride    { background: #EFF6FF; }
.af-icon.staff   { background: #ECFDF5; }
.af-icon.billing { background: #FFFBEB; }
.af-body { flex: 1; min-width: 0; }
.af-text { font-size: 12px; font-weight: 600; color: #0f172a; font-family: 'Inter', var(--sans); line-height: 1.5; }
.af-text b { color: #1e3a5f; font-weight: 800; }
.af-time { font-size: 11px; color: #94a3b8; font-family: 'Inter', var(--sans); margin-top: 3px; }
.af-empty { text-align: center; padding: 16px 0 8px; font-size: 12px; color: #94a3b8; font-family: 'Inter', var(--sans); }

/* ── EXPENSE REIMBURSEMENTS ─────────────────────────────────────── */
.exp-section { margin-top: 32px; padding-top: 28px; border-top: 2px solid #e2e8f0; }
.exp-section-hd { font-size: 20px; font-weight: 800; color: #111827; margin-bottom: 4px; }
.exp-section-sub { font-size: 12px; color: #64748b; font-family: var(--mono); margin-bottom: 18px; }
.exp-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.04); transition: box-shadow .15s; margin-bottom: 10px; }
.exp-card:hover { box-shadow: 0 6px 22px rgba(0,0,0,.09); }
.exp-card-top { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.exp-driver-name { font-size: 14px; font-weight: 700; color: #0f172a; }
.exp-driver-van { font-size: 11px; color: #94a3b8; font-family: var(--mono); margin-top: 1px; }
.exp-amount { font-size: 22px; font-weight: 800; color: #111827; font-family: var(--mono); text-align: right; }
.exp-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.exp-cat-badge { background: #f1f5f9; color: #475569; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 700; font-family: var(--mono); text-transform: uppercase; letter-spacing: .5px; }
.exp-method-badge { background: #f0fdf4; color: #1E553C; border: 1px solid #bbf7d0; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 700; font-family: var(--mono); }
.exp-date { font-size: 11px; color: #94a3b8; font-family: var(--mono); }
.exp-notes { font-size: 12px; color: #475569; font-style: italic; }
.exp-status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 10px; font-weight: 800; font-family: var(--mono); text-transform: uppercase; letter-spacing: .8px; border: 1px solid transparent; }
.exp-status.pending  { background: #fef9c3; color: #713f12; border-color: #fde047; }
.exp-status.approved { background: #dcfce7; color: #1E553C; border-color: #86efac; }
.exp-status.paid     { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; }
.exp-receipt-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1.5px solid #e2e8f0; cursor: pointer; flex-shrink: 0; }
.exp-card-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid #f1f5f9; margin-top: 2px; }
.exp-approve-btn { background: #1E553C; color: #fff; border: none; border-radius: 8px; padding: 8px 16px; font-size: 12px; font-weight: 700; font-family: var(--sans); cursor: pointer; transition: background .15s; }
.exp-approve-btn:hover { background: #14532d; }
.exp-paid-btn { background: #1d4ed8; color: #fff; border: none; border-radius: 8px; padding: 8px 16px; font-size: 12px; font-weight: 700; font-family: var(--sans); cursor: pointer; transition: background .15s; }
.exp-paid-btn:hover { background: #1e40af; }
.exp-filter-row { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.exp-filter-pill { background: #f1f5f9; border: 1.5px solid #e2e8f0; border-radius: 20px; padding: 5px 14px; font-size: 12px; font-weight: 700; font-family: var(--mono); cursor: pointer; transition: all .12s; color: #475569; }
.exp-filter-pill.active { background: #111827; color: #fff; border-color: #111827; }
.exp-empty { text-align: center; padding: 40px 20px; color: #94a3b8; font-family: var(--mono); font-size: 13px; }
/* Expense submit form */
.exp-form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.exp-form-label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .7px; font-family: var(--mono); }
.exp-form-input { background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 11px 14px; font-size: 14px; color: #0f172a; font-family: var(--sans); outline: none; width: 100%; transition: border-color .15s; }
.exp-form-input:focus { border-color: #111827; background: #fff; }
.exp-receipt-upload-btn { display: flex; align-items: center; justify-content: center; gap: 8px; background: #f8fafc; border: 1.5px dashed #cbd5e1; border-radius: 10px; padding: 14px; font-size: 13px; font-weight: 600; color: #475569; cursor: pointer; width: 100%; font-family: var(--sans); transition: all .15s; }
.exp-receipt-upload-btn:hover { border-color: #1E553C; color: #1E553C; background: #f0fdf4; }
.exp-receipt-preview-wrap { position: relative; display: none; margin-top: 8px; }
.exp-receipt-preview-img { width: 100%; max-height: 180px; object-fit: contain; border-radius: 10px; border: 1.5px solid #e2e8f0; }
.exp-receipt-remove-btn { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center; }

/* ── Receipt Submission Sheet (driver mobile modal) ── */
#expense-modal { align-items: flex-end; }
.rcpt-sheet { background: #fff; border-radius: 24px 24px 0 0; width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; box-shadow: 0 -8px 48px rgba(0,0,0,.18); transform: translateY(12px); transition: transform .3s cubic-bezier(.32,.01,.25,1); }
#expense-modal.open .rcpt-sheet { transform: translateY(0); }
.rcpt-drag-handle { width: 40px; height: 4px; background: #e2e8f0; border-radius: 2px; margin: 14px auto 4px; }
.rcpt-header { display: flex; align-items: center; justify-content: space-between; padding: 6px 20px 14px; border-bottom: 1px solid #f1f5f9; }
.rcpt-title { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 800; color: #0f172a; font-family: var(--sans); }
.rcpt-close-btn { background: #f1f5f9; border: none; border-radius: 50%; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #475569; font-size: 16px; font-weight: 700; transition: background .15s; flex-shrink: 0; }
.rcpt-close-btn:hover { background: #e2e8f0; color: #0f172a; }
.rcpt-body { padding: 18px 20px 32px; display: flex; flex-direction: column; gap: 16px; }
.rcpt-photo-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); border: 2px dashed #4ade80; border-radius: 18px; padding: 30px 20px; cursor: pointer; transition: all .15s; text-align: center; user-select: none; }
.rcpt-photo-zone:hover, .rcpt-photo-zone:active { background: linear-gradient(135deg, #dcfce7, #bbf7d0); border-color: #22c55e; }
.rcpt-photo-icon-wrap { width: 60px; height: 60px; background: #fff; border-radius: 18px; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 12px rgba(6,78,59,.14); margin-bottom: 4px; }
.rcpt-photo-main-text { font-size: 15px; font-weight: 800; color: #15803d; font-family: var(--sans); }
.rcpt-photo-sub-text { font-size: 12px; color: #4ade80; font-family: var(--mono); margin-top: 2px; }
.rcpt-preview-wrap { position: relative; border-radius: 14px; overflow: hidden; }
.rcpt-preview-img { width: 100%; max-height: 240px; object-fit: contain; border-radius: 14px; border: 1.5px solid #e2e8f0; display: block; background: #f8fafc; }
.rcpt-preview-retake { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.62); color: #fff; border: none; border-radius: 20px; padding: 6px 14px; font-size: 12px; font-weight: 700; font-family: var(--sans); cursor: pointer; transition: background .15s; }
.rcpt-preview-retake:hover { background: rgba(0,0,0,.82); }
.rcpt-field-group { display: flex; flex-direction: column; gap: 6px; }
.rcpt-label { font-size: 11px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: .7px; font-family: var(--mono); }
.rcpt-req { color: #ef4444; }
.rcpt-amount-wrap { position: relative; display: flex; align-items: center; }
.rcpt-dollar { position: absolute; left: 14px; font-size: 18px; font-weight: 700; color: #94a3b8; font-family: var(--mono); pointer-events: none; z-index: 1; }
.rcpt-amount-input { background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 14px 14px 14px 32px; font-size: 26px; font-weight: 800; color: #0f172a; font-family: var(--mono); width: 100%; outline: none; transition: border-color .15s, background .15s; }
.rcpt-amount-input:focus { border-color: #064E3B; background: #fff; }
.rcpt-select { background: #f8fafc url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") no-repeat right 12px center / 20px; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 13px 40px 13px 14px; font-size: 14px; font-weight: 600; color: #0f172a; font-family: var(--sans); width: 100%; outline: none; cursor: pointer; appearance: none; transition: border-color .15s; }
.rcpt-select:focus { border-color: #064E3B; }
.rcpt-textarea { background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 13px 14px; font-size: 14px; color: #0f172a; font-family: var(--sans); width: 100%; outline: none; resize: vertical; min-height: 80px; line-height: 1.55; transition: border-color .15s, background .15s; }
.rcpt-textarea:focus { border-color: #064E3B; background: #fff; }
.rcpt-submit-btn { background: linear-gradient(135deg, #064E3B 0%, #022C22 100%); color: #fff; border: none; border-radius: 14px; padding: 17px; font-size: 16px; font-weight: 800; font-family: var(--sans); cursor: pointer; width: 100%; transition: opacity .15s, transform .1s; box-shadow: 0 4px 18px rgba(6,78,59,.38); letter-spacing: .2px; margin-top: 2px; }
.rcpt-submit-btn:hover { opacity: .9; }
.rcpt-submit-btn:active { transform: scale(.98); }
.rcpt-submit-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.rcpt-cancel-link { background: none; border: none; color: #94a3b8; font-size: 13px; font-family: var(--sans); cursor: pointer; text-align: center; padding: 4px; font-weight: 600; transition: color .15s; width: 100%; }
.rcpt-cancel-link:hover { color: #475569; }

/* ── DARK MODE ─────────────────────────────────────────────────────── */
body.dark-mode { background: #0f172a !important; }
/* Settings pane */
body.dark-mode .us-wrap { background: #0f172a; }
body.dark-mode .us-nav { background: #1e293b; border-color: #334155 !important; }
body.dark-mode .us-nav-btn { color: #94a3b8; }
body.dark-mode .us-nav-btn.active { background: #0f172a; color: #4ade80 !important; }
body.dark-mode .us-content { background: #1e293b !important; border-color: #334155 !important; }
body.dark-mode .us-section-title { color: #f1f5f9 !important; }
body.dark-mode .us-section-sub { color: #475569 !important; }
body.dark-mode .us-info-row { background: #0f172a !important; border-color: #1e293b !important; }
body.dark-mode .us-info-label { color: #94a3b8 !important; }
body.dark-mode .us-info-val { color: #4ade80 !important; }
body.dark-mode .ds-profile-input { background: #0f172a !important; border-color: #334155 !important; color: #e2e8f0 !important; }
body.dark-mode .us-field-label { color: #64748b !important; }
body.dark-mode .us-signout-btn { background: #1e293b !important; border-color: #334155 !important; color: #94a3b8 !important; }
/* Driver hub areas */
body.dark-mode #tab-driver-settings { background: #0f172a; }
body.dark-mode .driver-view-header { background: #0f172a; }
/* Toggle switch */
.us-toggle-row { display: flex; align-items: center; gap: 10px; }
.us-toggle-label { font-size: 12px; font-weight: 600; font-family: var(--mono); color: #64748b; min-width: 34px; text-align: right; }
.us-toggle-btn { position: relative; width: 44px; height: 24px; border-radius: 12px; border: none; background: #e2e8f0; cursor: pointer; transition: background .2s; padding: 0; flex-shrink: 0; }
.us-toggle-btn.active { background: #1E553C; }
.us-toggle-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; display: block; }
.us-toggle-btn.active .us-toggle-thumb { transform: translateX(20px); }
body.dark-mode .us-toggle-btn:not(.active) { background: #334155; }
body.dark-mode .us-toggle-label { color: #94a3b8 !important; }

/* ── Support Modal ────────────────────────────────────────────────── */
.support-modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 600; display: flex; align-items: center; justify-content: center; padding: 24px; backdrop-filter: blur(4px); animation: fadeIn .18s ease; }
.support-modal-card { background: #fff; border-radius: 20px; width: 100%; max-width: 360px; box-shadow: 0 24px 64px rgba(0,0,0,.22); overflow: hidden; animation: scaleIn .2s cubic-bezier(0.32,0.72,0,1); }
.support-modal-header { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px; border-bottom: 1px solid #f1f5f9; }
.support-modal-icon { width: 40px; height: 40px; border-radius: 12px; background: rgba(30,85,60,0.1); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.support-modal-title { flex: 1; font-size: 17px; font-weight: 700; color: #0c1623; font-family: var(--sans); }
.support-modal-close { width: 32px; height: 32px; border-radius: 50%; background: #f1f5f9; border: none; cursor: pointer; font-size: 13px; color: #475569; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .12s; }
.support-modal-close:hover { background: #e2e8f0; }
.support-modal-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.support-modal-tagline { margin: 0; font-size: 14px; color: #475569; font-family: var(--sans); line-height: 1.5; }
.support-modal-link { display: flex; align-items: center; gap: 8px; padding: 14px 16px; background: #f0fdf4; border: 1px solid rgba(30,85,60,.15); border-radius: 12px; color: #1E553C; font-size: 14px; font-weight: 600; font-family: var(--sans); text-decoration: none; transition: background .12s; }
.support-modal-link:hover { background: #dcfce7; }

/* ── iOS Safari auto-zoom prevention ──────────────────────────────────────────
   iOS zooms any focused input with font-size < 16px. Override to 16px on
   mobile so the viewport never jumps. Visual size is controlled by padding/
   transform; the font-size floor just suppresses the zoom.                  */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}
@keyframes scaleIn { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.support-modal-action-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 14px 16px; background: #1E553C; border: none; border-radius: 12px; color: #fff; font-size: 14px; font-weight: 600; font-family: var(--sans); cursor: pointer; transition: background .12s; }
.support-modal-action-btn:hover { background: #155230; }
.support-modal-version-badge { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: #f0fdf4; border: 1px solid rgba(30,85,60,.15); border-radius: 20px; color: #1E553C; font-size: 13px; font-weight: 600; font-family: var(--sans); }

/* ── Superadmin styles ────────────────────────────────────────── */
.sa-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 20px;
}

.sa-kpi-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #dde3ec;
  padding: 18px;
}

.sa-kpi-value {
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  font-family: var(--sans);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 6px;
}

.sa-kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--sans);
}

.sa-tenant-list {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sa-tenant-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #dde3ec;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.sa-tenant-card:hover {
  border-color: #1E553C;
  box-shadow: 0 2px 12px rgba(30,85,60,.1);
}

.sa-tenant-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f0fdf4;
  color: #1E553C;
  font-size: 18px;
  font-weight: 800;
  font-family: var(--sans);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sa-tenant-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  font-family: var(--sans);
  margin-bottom: 3px;
}

.sa-tenant-meta {
  font-size: 12px;
  color: #64748b;
  font-family: var(--sans);
}

.sa-status-badge {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--sans);
  flex-shrink: 0;
}

.sa-status-active   { background: #f0fdf4; color: #16a34a; }
.sa-status-trial    { background: #fffbeb; color: #d97706; }
.sa-status-expired  { background: #fef2f2; color: #dc2626; }
.sa-status-cancelled { background: #f8fafc; color: #94a3b8; }

.sa-manage-btn {
  padding: 8px 16px;
  background: #1E553C;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--sans);
  cursor: pointer;
  flex-shrink: 0;
}

.sa-back-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  padding: 0;
  margin-bottom: 8px;
}

.sa-section-title {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-family: var(--sans);
  padding: 0 20px;
  margin-bottom: 10px;
  margin-top: 20px;
}
.sa-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding: 16px 20px;
}
.sa-detail-table {
  margin: 0 20px 16px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #dde3ec;
  overflow: hidden;
}
.sa-detail-row {
  display: flex;
  padding: 11px 16px;
  border-bottom: 1px solid #f1f5f9;
  gap: 12px;
  align-items: center;
}
.sa-detail-row:last-child { border-bottom: none; }
.sa-detail-row-label {
  width: 160px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  font-family: var(--sans);
  flex-shrink: 0;
}
.sa-detail-row-value {
  font-size: 13px;
  color: #0f172a;
  font-family: var(--sans);
}
.sa-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 20px 20px;
}
.sa-action-btn {
  padding: 11px 20px;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--sans);
}
.sa-action-primary   { background: #1E553C; color: #fff; }
.sa-action-secondary { background: #d97706; color: #fff; }
.sa-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  padding: 16px 20px;
}
.sa-scheduler-table {
  margin: 0 20px 16px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #dde3ec;
  overflow: hidden;
}
