/* Clearset Service Dispatch - Styles */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0891b2;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --surface: #ffffff;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.06);
  --shadow-md: 0 8px 24px rgba(15,23,42,0.08);
  --shadow-lg: 0 18px 45px rgba(15,23,42,0.12);
  --radius: 12px;
  --sidebar-w: 220px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: var(--gray-800);
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0f172a 0%, #111827 55%, #0b1220 100%);
  color: #fff;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 8px 0 24px rgba(15,23,42,0.16);
}
.main { flex: 1; margin-left: var(--sidebar-w); padding: 28px 32px; min-width: 0; }

/* Sidebar */
.sidebar-brand {
  padding: 20px 16px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  border-bottom: 1px solid var(--gray-700);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-brand:hover { color: #fff; cursor: pointer; }
.brand-icon { font-size: 18px; }
.brand-text { font-size: 14px; font-weight: 800; letter-spacing: 1.5px; }

.sidebar-nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  margin: 2px 10px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s;
  border-left: 3px solid transparent;
  border-radius: 9px;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-nav a.active { background: rgba(37,99,235,0.18); color: #fff; border-left-color: var(--primary); box-shadow: inset 0 0 0 1px rgba(96,165,250,0.12); }

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--gray-700);
  font-size: 13px;
}
.sidebar-footer .user-name { color: #fff; font-weight: 600; }
.sidebar-footer .user-role { color: var(--gray-500); font-size: 12px; }
.sidebar-footer .sidebar-link { color: var(--gray-400); text-decoration: none; font-size: 13px; transition: color 0.15s; }
.sidebar-footer .sidebar-link:hover { color: #fff; }

/* ── Navigation Sections ── */
.nav-section {
  padding: 6px 0;
  margin-bottom: 4px;
}
.nav-section + .nav-section {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 10px;
  margin-top: 4px;
}
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #4b5563;
  padding: 4px 16px 6px;
  user-select: none;
}
.nav-section-portals {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1) !important;
}
.nav-portal-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  color: #fbbf24 !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s;
  border-left: 3px solid transparent;
  background: rgba(251,191,36,0.06);
  border-radius: 0 6px 6px 0;
  margin: 2px 8px 2px 0;
}
.nav-portal-link:hover {
  background: rgba(251,191,36,0.12);
  color: #fde68a !important;
}
.nav-portal-link.active {
  background: rgba(251,191,36,0.15);
  color: #fde68a !important;
  border-left-color: #fbbf24;
}

/* Page heading */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--gray-900); }
.page-header p { color: var(--gray-500); font-size: 14px; margin-top: 3px; }
.page-header-row { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; }
.page-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(226,232,240,0.9);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(248,250,252,0.7);
}
.card-body { padding: 18px; }

/* KPI Cards */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid rgba(226,232,240,0.9);
  box-shadow: var(--shadow-sm);
}
.kpi-card .label { font-size: 12px; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; }
.kpi-card .value { font-size: 28px; font-weight: 700; margin-top: 4px; }
.kpi-card .sub { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge-scheduled { background: #dbeafe; color: #1d4ed8; }
.badge-dispatched { background: #ede9fe; color: #5b21b6; }
.badge-en-route { background: #cffafe; color: #0e7490; }
.badge-on-site { background: #fef3c7; color: #92400e; }
.badge-in-progress { background: #fef3c7; color: #92400e; }
.badge-completed { background: #dcfce7; color: #166534; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-draft { background: var(--gray-200); color: var(--gray-600); }
.badge-sent { background: #dbeafe; color: #1e40af; }
.badge-paid { background: #dcfce7; color: #166534; }
.badge-partial { background: #fef3c7; color: #92400e; }
.badge-ready { background: #dcfce7; color: #166534; }
.badge-needs_attention { background: #fef3c7; color: #92400e; }
.badge-reviewed { background: #e0e7ff; color: #3730a3; }
.badge-overdue { background: #fee2e2; color: #991b1b; }

/* Service type badges */
.svc-septic { background: #e0e7ff; color: #3730a3; }
.svc-hydrovac { background: #fce7f3; color: #9d174d; }
.svc-rv-service { background: #dbeafe; color: #1e3a8a; }
.svc-grease-trap { background: #fef3c7; color: #92400e; }
.svc-portable-toilet-service { background: #d1fae5; color: #065f46; }
.svc-portable-toilet-deliver { background: #ede9fe; color: #5b21b6; }
.svc-portable-toilet-remove { background: #fee2e2; color: #991b1b; }
.svc-water-delivery { background: #cffafe; color: #0e7490; }
.svc-catch-basin { background: #e0e7ff; color: #3730a3; }
.svc-tire-shop { background: #f3e8ff; color: #6b21a8; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px; font-weight: 600;
  border: none; cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 3px 10px rgba(37,99,235,0.18); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline {
  background: #fff;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
}
.btn-outline:hover { background: var(--gray-50); border-color:#cbd5e1; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { padding: 6px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--gray-700); }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* Pricing picker on job forms */
.pricing-panel {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(59,130,246,0.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(56,189,248,0.28), transparent 34%),
    linear-gradient(145deg, #0f172a 0%, #1e3a8a 54%, #2563eb 100%);
  box-shadow: 0 18px 38px rgba(15,23,42,0.16);
  color: #fff;
}
.pricing-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
  pointer-events: none;
}
.pricing-panel > * { position: relative; z-index: 1; }
.pricing-panel__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 16px 12px;
}
.pricing-panel__identity { display:flex; gap:10px; align-items:flex-start; min-width:0; }
.pricing-panel__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.18);
  color: #e0f2fe;
  font-size: 19px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}
.pricing-panel__title {
  display: block;
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #fff;
}
.pricing-panel .pricing-panel__title { color: #fff; }
.pricing-panel__help { margin-top: 2px; font-size: 12px; line-height:1.35; color: #dbeafe; }
.pricing-panel__actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.pricing-panel__optional {
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:4px 9px;
  background: rgba(255,255,255,0.14);
  border:1px solid rgba(255,255,255,0.18);
  color:#e0f2fe;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.pricing-catalog-link {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(255,255,255,0.96);
  color:#1e3a8a;
  font-size:12px;
  font-weight:800;
  text-decoration:none;
  box-shadow:0 8px 18px rgba(15,23,42,0.18);
}
.pricing-catalog-link:hover { background:#fff; color:#1d4ed8; transform:translateY(-1px); }
.pricing-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 0 14px 10px;
}
.pricing-search-field { position:relative; min-width:0; }
.pricing-search-field__icon {
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  color:#64748b;
  font-size:16px;
  z-index:2;
}
.pricing-search-field .form-control {
  min-height: 42px;
  padding-left: 36px;
  border: 0;
  border-radius: 13px;
  box-shadow: 0 8px 22px rgba(15,23,42,0.16);
}
.pricing-search-button {
  min-height: 42px;
  border: 0;
  border-radius: 13px;
  padding: 0 14px;
  background: #38bdf8;
  color: #082f49;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(8,47,73,0.28);
}
.pricing-search-button:hover { background:#7dd3fc; transform:translateY(-1px); }
.pricing-status { font-size: 12px; color: #dbeafe; margin: 0 14px 11px; }
.pricing-suggestions { display: grid; gap: 9px; padding: 0 14px 12px; }
.pricing-suggestions:empty { padding:0; }
.pricing-suggestions__header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:#e0f2fe;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.pricing-suggestions__header small { color:#bae6fd; font-size:11px; font-weight:800; }
.pricing-suggestion {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  background: rgba(255,255,255,0.97);
  color: var(--gray-900);
  border: 1px solid rgba(219,234,254,0.95);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 8px 20px rgba(15,23,42,0.12);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.pricing-suggestion:hover { border-color: #7dd3fc; box-shadow: 0 12px 26px rgba(15,23,42,0.18); transform: translateY(-1px); }
.pricing-suggestion.is-selected { border-color: #4ade80; background: #f0fdf4; }
.pricing-suggestion__rank {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:900;
}
.pricing-suggestion__body { min-width:0; }
.pricing-suggestion__desc {
  font-size: 13px;
  font-weight: 850;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pricing-suggestion__meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.pricing-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 800;
}
.pricing-muted { color: #64748b; font-size: 12px; }
.pricing-suggestion__price { text-align:right; white-space:nowrap; }
.pricing-suggestion__price strong {
  display:block;
  color:#047857;
  font-size:15px;
  font-weight:900;
  line-height:1.1;
}
.pricing-suggestion__price span { display:block; margin-top:1px; color:#64748b; font-size:10px; text-transform:uppercase; letter-spacing:.04em; }
.pricing-use-button {
  border:0;
  border-radius:10px;
  padding:8px 10px;
  min-width:48px;
  background:var(--primary);
  color:#fff;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(37,99,235,0.28);
}
.pricing-use-button:hover { background:var(--primary-dark); transform:translateY(-1px); }
.pricing-use-button.is-selected { background:var(--success); box-shadow:0 6px 14px rgba(22,163,74,0.24); }
.pricing-selected-card {
  display: none;
  align-items: center;
  gap: 10px;
  background: rgba(240,253,244,0.98);
  border: 1px solid #86efac;
  border-radius: 14px;
  padding: 10px;
  margin: 0 14px 12px;
  color: var(--gray-900);
  box-shadow: 0 8px 20px rgba(15,23,42,0.12);
}
.pricing-selected-card.is-active { display: flex; }
.pricing-selected-card__check {
  width:30px;
  height:30px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  background:#16a34a;
  color:#fff;
  font-size:16px;
  font-weight:900;
}
.pricing-selected-card__content { min-width:0; flex:1; }
.pricing-selected-card__label {
  font-size: 10px;
  color: #166534;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pricing-selected-card__title {
  display: block;
  margin-top: 2px;
  color: var(--gray-900);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}
.pricing-selected-card__meta { margin-top: 2px; color: #166534; font-size: 12px; font-weight: 800; }
.pricing-clear-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #cbd5e1;
  border-radius:10px;
  padding:6px 10px;
  background:#fff;
  color:var(--gray-700);
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}
.pricing-clear-button:hover { background:#f8fafc; border-color:#94a3b8; }
.pricing-overrides {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 14px;
  padding: 0;
  margin: 0 14px 14px;
}
.pricing-overrides summary {
  list-style: none;
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  color:#fff;
  font-size:13px;
  font-weight:800;
}
.pricing-overrides summary::-webkit-details-marker { display:none; }
.pricing-overrides summary::after {
  content: '+';
  width:22px;
  height:22px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,0.16);
  color:#e0f2fe;
  font-weight:900;
  flex:0 0 auto;
}
.pricing-overrides[open] summary::after { content:'−'; }
.pricing-overrides__icon {
  width:24px;
  height:24px;
  border-radius:8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,0.16);
  color:#e0f2fe;
  flex:0 0 auto;
}
.pricing-overrides summary > span:last-of-type { display:grid; gap:1px; min-width:0; margin-right:auto; }
.pricing-overrides summary small { color:#bfdbfe; font-weight:600; font-size:11px; }
.pricing-override-body {
  margin: 0 8px 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.96);
  color: var(--gray-800);
}
.pricing-total-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.pricing-total { font-size: 13px; color: #14532d; font-weight: 900; }
.pricing-adjust-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:8px;
}
.pricing-checkbox-row {
  display:flex;
  align-items:flex-start;
  gap:8px;
  font-size:12px;
  color:#334155;
  font-weight:700;
  margin-top:8px;
}
.pricing-checkbox-row small { display:block; color:#64748b; font-weight:500; }
.pricing-breakdown {
  margin-top:10px;
  padding:10px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#f8fafc;
  font-size:12px;
}
.pricing-breakdown__row {
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:3px 0;
  color:#475569;
}
.pricing-breakdown__row.is-total {
  border-top:1px solid #e2e8f0;
  margin-top:4px;
  padding-top:7px;
  color:#14532d;
  font-size:14px;
  font-weight:900;
}
@media (max-width: 768px) {
  .pricing-search-row, .pricing-suggestion, .pricing-adjust-grid { grid-template-columns: 1fr; }
  .pricing-suggestion__rank { display:none; }
  .pricing-suggestion__price { text-align:left; }
  .pricing-use-button { justify-self:start; }
  .pricing-selected-card { align-items: flex-start; flex-direction: column; }
  .pricing-selected-card__title { max-width: 100%; }
}

.pricing-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  padding: 0 14px 10px;
}
.pricing-context .form-group { margin-bottom: 0; }
.pricing-panel .pricing-context label { color: #dbeafe; font-size: 12px; font-weight: 800; }
.call-pricing-panel { margin-top: 4px; }
.call-price-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 11px;
  font-weight: 800;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-pill-success { background:#dcfce7; color:#047857; }
.invoice-tax-box {
  margin:16px 0;
  padding:14px;
  border:1px solid #dbeafe;
  border-radius:14px;
  background:#f8fafc;
}
.invoice-total-grid {
  display:grid;
  grid-template-columns:1fr auto;
  gap:6px 14px;
  align-items:center;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid #e2e8f0;
  color:#475569;
  font-size:14px;
}
.invoice-grand-label, .invoice-grand-total { color:#0f172a; font-size:18px; font-weight:900; }
@media (max-width: 768px) { .pricing-context { grid-template-columns: 1fr; } }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}
.table th { background: #f8fafc; font-weight: 800; color: var(--gray-600); font-size: 12px; text-transform: uppercase; letter-spacing: 0.02em; }
.table tr:hover { background: #f8fafc; }
.table tbody tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; }
.table-summary { color: var(--gray-500); font-size: 13px; margin-top: 12px; }
.table-footer { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 18px; border-top:1px solid var(--border); background:#f8fafc; color:var(--gray-500); font-size:13px; }
.pagination-controls { display:flex; gap:8px; align-items:center; }
.row-actions { display:flex; justify-content:flex-end; gap:6px; flex-wrap:wrap; }
.muted-small { color: var(--gray-400); font-size: 12px; }
.text-warning { color:#b45309; font-weight:700; }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Filters bar */
.filters {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.filter-btn {
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid var(--gray-300);
  background: #fff;
  cursor: pointer;
  color: var(--gray-600);
  text-decoration: none;
  transition: all 0.15s;
}
.filter-btn:hover { background: var(--gray-50); border-color:#cbd5e1; }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 3px 10px rgba(37,99,235,0.16); }

/* Job cards board */
.job-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.job-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 16px;
  border-left: 4px solid var(--gray-300);
  transition: box-shadow 0.15s;
}
.job-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.job-card.status-scheduled { border-left-color: var(--primary); }
.job-card.status-in-progress { border-left-color: var(--warning); }
.job-card.status-completed { border-left-color: var(--success); }

.job-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.job-card .meta { font-size: 13px; color: var(--gray-500); margin-bottom: 6px; }
.job-card .meta span { margin-right: 8px; }
.job-card .controls { margin-top: 12px; display: flex; gap: 8px; align-items: center; }
.job-card .controls select { font-size: 12px; padding: 4px 8px; border-radius: 4px; border: 1px solid var(--gray-300); }

/* Schedule */
.schedule-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.schedule-day {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  min-height: 120px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.schedule-day .day-header {
  font-size: 12px; font-weight: 600; color: var(--gray-500);
  margin-bottom: 8px; padding-bottom: 4px;
  border-bottom: 1px solid var(--gray-200);
}
.schedule-day .day-header.today { color: var(--primary); }
.schedule-day .day-job {
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
  background: var(--gray-100);
  cursor: pointer;
}
.schedule-day .day-job:hover { background: var(--gray-200); }

/* Charts placeholder */
.chart-container { height: 200px; display: flex; align-items: flex-end; gap: 8px; padding: 10px 0; }
.chart-bar {
  flex: 1;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
  position: relative;
  min-height: 4px;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.chart-bar:hover { opacity: 1; }
.chart-bar .bar-label {
  position: absolute; bottom: -20px; left: 50%;
  transform: translateX(-50%);
  font-size: 10px; color: var(--gray-500);
  white-space: nowrap;
}
.chart-bar .bar-value {
  position: absolute; top: -18px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px; font-weight: 600; color: var(--gray-700);
}

/* Reports grid */
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }

/* Invoice line items */
.line-items { margin: 16px 0; }
.line-item-row { display: grid; grid-template-columns: 2fr 80px 100px 100px 30px; gap: 8px; margin-bottom: 8px; align-items: center; }

/* Alerts / Flash messages */
.flash { padding: 10px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-info { background: #dbeafe; color: #1e3a8a; border: 1px solid #bfdbfe; }
.flash-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Search bar */
.search-bar {
  display: flex; gap: 8px; margin-bottom: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.search-bar input { flex: 1; }

/* Customer directory, profile, and forms */
.customer-page-header { margin-bottom:14px; }
.customer-page-header .page-actions { align-items:center; }
.button-count { display:inline-flex; min-width:22px; height:22px; align-items:center; justify-content:center; margin-left:7px; padding:0 6px; border-radius:999px; background:#fef3c7; color:#92400e; font-size:11px; font-weight:800; }
.customer-overview { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.customer-overview > div { min-width:0; padding:13px 15px; border:1px solid #dbe3ed; border-radius:11px; background:#fff; box-shadow:0 1px 2px rgba(15,23,42,.04); }
.customer-overview strong { display:block; color:#0f172a; font-size:21px; line-height:1.1; font-variant-numeric:tabular-nums; }
.customer-overview span { display:block; margin-top:4px; color:#66758a; font-size:11px; }
.customer-overview .needs-attention strong { color:#b45309; }
.customer-overview .is-restricted strong { color:#b91c1c; }
.customer-list-card { overflow:hidden; margin-bottom:20px; }
.customer-browser-tools { padding:15px 18px 12px; border-bottom:1px solid #e7edf4; }
.customer-search-form { display:grid; grid-template-columns:minmax(260px,1fr) auto auto; gap:8px; align-items:center; }
.customer-search-input { position:relative; min-width:0; }
.customer-search-input > span { position:absolute; left:13px; top:50%; z-index:1; transform:translateY(-50%); color:#8392a8; font-size:18px; }
.customer-search-input .form-control { width:100%; padding-left:40px; }
.customer-filter-row { display:flex; gap:7px; flex-wrap:wrap; margin-top:12px; }
.customer-filter-row .filter-btn { min-height:34px; padding:6px 11px; }
.customer-filter-row .filter-btn strong { margin-left:4px; font-variant-numeric:tabular-nums; }
.customer-filter-row .filter-danger.active { background:#b91c1c; border-color:#b91c1c; }
.customer-table-wrap { width:100%; }
.customer-table { min-width:940px; table-layout:fixed; }
.customer-table th:nth-child(1) { width:30%; }
.customer-table th:nth-child(2) { width:20%; }
.customer-table th:nth-child(3) { width:24%; }
.customer-table th:nth-child(4) { width:16%; }
.customer-table th:nth-child(5) { width:10%; }
.customer-table td { padding-top:11px; padding-bottom:11px; }
.customer-row { transition:background .12s ease; }
.customer-row-restricted { background:#fff7f7; }
.customer-main-cell, .customer-name-wrap { min-width:0; }
.customer-name-link { display:-webkit-box; overflow:hidden; color:var(--primary); font-weight:800; line-height:1.3; text-decoration:none; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.customer-name-link:hover { color:var(--primary-dark); text-decoration:underline; }
.customer-badges { display:flex; gap:5px; flex-wrap:wrap; margin-top:5px; }
.customer-contact-cell { min-width:0; }
.customer-contact-link { display:block; overflow:hidden; color:#24364e; font-size:12px; text-decoration:none; text-overflow:ellipsis; white-space:nowrap; }
.customer-contact-link:hover, .customer-map-link:hover { color:var(--primary); text-decoration:underline; }
.customer-email { margin-top:4px; color:#66758a; }
.customer-location-cell { color:#334155; font-size:12px; }
.customer-map-link { display:inline; color:var(--primary); line-height:1.4; text-decoration:underline; text-underline-offset:2px; overflow-wrap:anywhere; }
.customer-map-link:focus-visible { outline:2px solid var(--primary); outline-offset:3px; border-radius:2px; }
.customer-services-cell .badge { margin:2px 3px 2px 0; }
.customer-actions-cell { text-align:right; }
.customer-actions-cell .row-actions { flex-wrap:nowrap; }
.mini-pill { display:inline-flex; align-items:center; border-radius:999px; padding:2px 7px; font-size:10px; font-weight:750; line-height:1.4; }
.mini-pill-purple { background:#ede9fe; color:#6d28d9; }
.mini-pill-warning { background:#fef3c7; color:#92400e; }
.mini-pill-danger { background:#fee2e2; color:#b91c1c; }
.customer-empty-state { padding:52px 20px; }
.customer-empty-state h3 { margin:0 0 6px; color:#1e293b; font-size:17px; }
.customer-empty-state p { max-width:480px; margin:0 auto 16px; }
.empty-state-mark { display:grid; place-items:center; width:44px; height:44px; margin:0 auto 12px; border-radius:12px; background:#eff6ff; color:#2563eb; font-weight:850; }

.back-link { display:inline-flex; margin-bottom:9px; color:#66758a; font-size:12px; font-weight:700; text-decoration:none; }
.back-link:hover { color:var(--primary); }
.customer-profile-hero { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom:14px; padding:18px 20px; border:1px solid #dbe3ed; border-radius:13px; background:#fff; box-shadow:0 1px 2px rgba(15,23,42,.05); }
.customer-profile-identity { min-width:0; }
.customer-profile-title-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.customer-profile-title-row h1 { margin:0; overflow-wrap:anywhere; font-size:23px; line-height:1.18; }
.customer-contact-strip { display:flex; gap:8px 16px; flex-wrap:wrap; margin-top:10px; }
.customer-contact-strip a { display:inline-flex; align-items:flex-start; gap:6px; min-width:0; color:#526176; font-size:12px; line-height:1.4; text-decoration:none; overflow-wrap:anywhere; }
.customer-contact-strip a:hover { color:var(--primary); text-decoration:underline; }
.customer-contact-warning { color:#b45309!important; font-weight:750; }
.customer-profile-alert { display:flex; align-items:center; gap:8px; width:fit-content; margin-top:11px; padding:8px 10px; border:1px solid #fcd34d; border-radius:9px; background:#fffbeb; color:#92400e; text-decoration:none; }
.customer-profile-alert span { color:#a16207; font-size:11px; }
.customer-service-badges { display:flex; gap:5px; flex-wrap:wrap; margin-top:10px; }
.customer-profile-actions { display:flex; justify-content:flex-end; gap:7px; flex-wrap:wrap; flex:none; }
.customer-sites-panel { overflow:hidden; margin-bottom:14px; }
.customer-panel-heading, .customer-section-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.customer-panel-heading h2, .customer-section-heading h2 { margin:0; color:#1e293b; font-size:14px; }
.customer-panel-heading p, .customer-section-heading p { margin:2px 0 0; color:#66758a; font-size:11px; font-weight:500; }
.customer-site-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:10px; padding:12px 14px 14px; }
.customer-site-card { display:grid; gap:5px; min-width:0; padding:11px 12px; border:1px solid #dbe3ed; border-radius:10px; background:#f8fafc; }
.customer-site-card > div { display:flex; justify-content:space-between; gap:8px; }
.customer-site-card strong { color:#1e293b; font-size:13px; }
.customer-site-card span, .customer-site-card a { color:#66758a; font-size:11px; text-decoration:none; overflow-wrap:anywhere; }
.customer-site-card > div span { flex:none; }
.customer-site-address { margin:0; min-width:0; }
.customer-address-contact { min-width:0; color:#526176; font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.customer-contact-strip .customer-map-link, .customer-site-card .customer-map-link { display:inline; color:var(--primary); text-decoration:underline; text-underline-offset:2px; }
.customer-site-card strong a { color:var(--primary); font-size:13px; }
.customer-site-card strong a:hover { text-decoration:underline; }
.customer-kpi-grid { margin-bottom:14px; }
.value-success { color:#15803d!important; }
.value-danger { color:#b91c1c!important; }
.customer-tabs { display:flex; gap:3px; overflow-x:auto; padding:3px; border:1px solid #dbe3ed; border-bottom:0; border-radius:11px 11px 0 0; background:#eef2f7; scrollbar-width:thin; }
.customer-tab { display:inline-flex; align-items:center; justify-content:center; gap:6px; flex:none; min-height:40px; padding:8px 14px; border:0; border-radius:8px; background:transparent; color:#526176; font:inherit; font-size:12px; font-weight:750; cursor:pointer; }
.customer-tab span { display:inline-flex; min-width:20px; height:20px; align-items:center; justify-content:center; padding:0 5px; border-radius:999px; background:#dbe3ed; color:#526176; font-size:10px; }
.customer-tab:hover { background:#f8fafc; color:#1e293b; }
.customer-tab.active { background:#fff; color:#2563eb; box-shadow:0 1px 4px rgba(15,23,42,.12); }
.customer-tab.active span { background:#dbeafe; color:#1d4ed8; }
.tab-panel[hidden] { display:none!important; }
.tab-panel > .card { overflow-x:auto; margin-top:0!important; border-radius:0 0 11px 11px!important; }
.customer-tab-card { overflow:hidden!important; }
.customer-history-table { min-width:900px; }

.customer-form-header { margin-bottom:14px; }
.customer-form-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:14px; max-width:1040px; }
.customer-form-card { overflow:hidden; margin:0; }
.customer-services-form, .customer-sites-form, .customer-form-actions { grid-column:1/-1; }
.customer-section-heading > div { display:flex; align-items:flex-start; gap:10px; }
.section-step { display:grid; place-items:center; flex:none; width:25px; height:25px; border-radius:8px; background:#eff6ff; color:#2563eb; font-size:11px; font-weight:850; }
.customer-form-card .card-body { display:grid; gap:2px; }
.customer-form-card .form-group { margin-bottom:13px; }
.customer-form-card .form-group:last-child { margin-bottom:0; }
.field-help { display:block; margin-top:5px; color:#66758a; font-size:11px; }
.customer-postal-field { max-width:220px; }
.service-choice-fieldset { min-width:0; padding:0; border:0; }
.service-choice-fieldset legend { margin-bottom:8px; color:#334155; font-size:12px; font-weight:750; }
.service-choice-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
.service-choice { display:flex; align-items:center; gap:8px; min-height:40px; padding:8px 10px; border:1px solid #dbe3ed; border-radius:9px; background:#fff; color:#334155; font-size:12px; font-weight:650; cursor:pointer; }
.service-choice:hover { border-color:#93c5fd; background:#f8fbff; }
.service-choice:has(input:checked) { border-color:#60a5fa; background:#eff6ff; color:#1d4ed8; }
.service-choice input { width:16px; height:16px; accent-color:#2563eb; }
.customer-sites-heading { flex-wrap:wrap; }
.customer-sites-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.site-entry { min-width:0; padding:12px; border:1px solid #dbe3ed; border-radius:11px; background:#f8fafc; }
.site-entry-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:9px; }
.site-entry-header strong { color:#334155; font-size:12px; }
.site-remove-button { min-height:32px; padding:4px 8px; border:0; border-radius:7px; background:transparent; color:#b91c1c; font:inherit; font-size:11px; font-weight:750; cursor:pointer; }
.site-remove-button:hover { background:#fee2e2; }
.site-entry .form-group { margin-bottom:7px; }
.site-entry .grid-2, .site-entry .grid-3 { gap:7px; }
.site-name-input { font-weight:750; }
.customer-sites-empty { padding:24px; border:1px dashed #cbd5e1; border-radius:10px; background:#f8fafc; text-align:center; }
.customer-sites-empty p { margin:0; color:#66758a; font-size:12px; }
.is-hidden { display:none!important; }
.customer-form-actions { display:flex; gap:8px; padding:2px 0 6px; }
.customer-danger-zone { display:flex; justify-content:space-between; align-items:center; gap:18px; max-width:1040px; margin-top:24px; padding:15px 17px; border:1px solid #fecaca; border-radius:11px; background:#fff7f7; }
.customer-danger-zone h2 { margin:0; color:#991b1b; font-size:14px; }
.customer-danger-zone p { margin:3px 0 0; color:#7f1d1d; font-size:11px; }

/* Customer duplicate review */
.duplicate-page-header { margin-bottom:14px; }
.duplicate-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.duplicate-summary-card { display:flex; flex-direction:column; min-width:0; padding:13px 15px; border:1px solid #dbe3ed; border-radius:11px; background:#fff; color:#526176; text-decoration:none; box-shadow:0 1px 2px rgba(15,23,42,.04); }
.duplicate-summary-card:hover, .duplicate-summary-card.active { border-color:#93c5fd; background:#eff6ff; }
.duplicate-summary-card strong { color:#0f172a; font-size:21px; line-height:1.1; font-variant-numeric:tabular-nums; }
.duplicate-summary-card span { margin-top:4px; font-size:11px; font-weight:700; }
.duplicate-summary-high strong { color:#b45309; }
.duplicate-guidance { display:flex; align-items:flex-start; gap:11px; margin-bottom:14px; padding:12px 14px; border:1px solid #bfdbfe; border-radius:11px; background:#eff6ff; color:#1e3a5f; }
.duplicate-guidance-icon { display:grid; place-items:center; flex:none; width:27px; height:27px; border-radius:8px; background:#dbeafe; color:#1d4ed8; font-weight:850; }
.duplicate-guidance strong { display:block; font-size:12px; }
.duplicate-guidance p { margin:3px 0 0; color:#46617f; font-size:11px; line-height:1.5; }
.duplicate-review-card { overflow:hidden; margin-bottom:20px; }
.duplicate-toolbar { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:14px 16px; border-bottom:1px solid #e7edf4; }
.duplicate-search-form { display:grid; grid-template-columns:minmax(280px,1fr) auto auto; gap:8px; flex:1; max-width:720px; }
.duplicate-pair-list { display:grid; gap:12px; padding:14px; background:#f5f7fa; }
.duplicate-pair-card { position:relative; overflow:hidden; border:1px solid #dbe3ed; border-radius:12px; background:#fff; box-shadow:0 1px 3px rgba(15,23,42,.05); }
.duplicate-pair-high { border-color:#f6c453; }
.duplicate-pair-high::before { position:absolute; top:0; bottom:0; left:0; width:4px; background:#f59e0b; content:""; }
.duplicate-pair-header { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:11px 14px; border-bottom:1px solid #e7edf4; background:#f8fafc; }
.duplicate-pair-header > div { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.duplicate-reason { color:#526176; font-size:11px; font-weight:650; }
.duplicate-record-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.duplicate-record { min-width:0; padding:14px 16px; }
.duplicate-record + .duplicate-record { border-left:1px solid #e7edf4; }
.duplicate-record-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.duplicate-primary-choice { display:inline-flex; align-items:center; gap:7px; min-height:34px; color:#1d4ed8; font-size:11px; font-weight:800; cursor:pointer; }
.duplicate-primary-choice input { width:17px; height:17px; accent-color:#2563eb; }
.customer-record-id { color:#8392a8; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:10px; }
.duplicate-record h2 { margin:7px 0 11px; font-size:16px; line-height:1.3; overflow-wrap:anywhere; }
.duplicate-record h2 a { color:#1e293b; text-decoration:none; }
.duplicate-record h2 a:hover { color:#2563eb; text-decoration:underline; }
.duplicate-fields { display:grid; gap:0; margin:0; }
.duplicate-fields > div { display:grid; grid-template-columns:94px minmax(0,1fr); gap:9px; padding:7px 8px; border-top:1px solid #eef2f7; }
.duplicate-fields > div.is-match { border-radius:7px; background:#fffbeb; }
.duplicate-fields dt { color:#66758a; font-size:10px; font-weight:750; }
.duplicate-fields dd { min-width:0; margin:0; color:#334155; font-size:11px; overflow-wrap:anywhere; }
.duplicate-fields a { color:#2563eb; text-decoration:none; }
.duplicate-record-actions { display:flex; gap:6px; margin-top:11px; }
.duplicate-pair-actions { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:11px 14px; border-top:1px solid #e7edf4; background:#f8fafc; }
.duplicate-merge-note { max-width:680px; color:#66758a; font-size:10px; line-height:1.45; }
.duplicate-secondary-action { display:flex; justify-content:flex-end; padding:0 14px 11px; background:#f8fafc; }
.duplicate-empty-state { padding:56px 20px; }

@media (max-width: 760px) {
  .duplicate-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .duplicate-toolbar { align-items:stretch; flex-direction:column; }
  .duplicate-search-form { grid-template-columns:1fr auto; width:100%; max-width:none; }
  .duplicate-search-form .form-control { grid-column:1/-1; }
  .duplicate-record-grid { grid-template-columns:1fr; }
  .duplicate-record + .duplicate-record { border-top:1px solid #e7edf4; border-left:0; }
  .duplicate-pair-actions { align-items:stretch; flex-direction:column; }
  .duplicate-pair-actions .btn { width:100%; }
  .duplicate-secondary-action .btn { width:100%; }
}

/* Employee avatar */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  flex-shrink: 0;
}

/* Empty state */
.empty-state {
  text-align: center; padding: 40px 20px;
  color: var(--gray-400);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

/* Map placeholder */
.map-placeholder {
  height: 400px;
  background: linear-gradient(135deg, #e5e7eb 25%, #f3f4f6 25%, #f3f4f6 50%, #e5e7eb 50%, #e5e7eb 75%, #f3f4f6 25%);
  background-size: 20px 20px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400);
  font-size: 16px;
}

/* ===== Dashboard Mini Calendar ===== */
.dash-cal-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.dash-cal-table thead th {
  padding: 10px 6px 6px;
  text-align: center;
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
  border-right: 1px solid #f3f4f6;
}
.dash-cal-table thead th:last-child { border-right: none; }
.dash-cal-table tbody td {
  padding: 0;
  border-right: 1px solid #f3f4f6;
  vertical-align: top;
  height: 1%;
}
.dash-cal-table tbody td:last-child { border-right: none; }

.dash-cal-dayname { font-size: 10px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px; }
.dash-cal-date { font-size: 18px; font-weight: 700; color: #374151; line-height: 1.2; margin-top: 1px; }

.dash-cal-today { background: #eff6ff; }
.dash-cal-today-date { color: #2563eb !important; }

.dash-cal-cell-link {
  display: block;
  padding: 8px;
  text-decoration: none;
  color: inherit;
  min-height: 80px;
  transition: background 0.15s;
}
.dash-cal-cell-link:hover { background: #f3f4f6; }
.dash-cal-today .dash-cal-cell-link:hover { background: #dbeafe; }

.dash-cal-job {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  margin-bottom: 3px;
  border-radius: 4px;
  border-left: 3px solid #6b7280;
  background: #fff;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.dash-cal-job-time { font-weight: 700; color: #374151; flex-shrink: 0; }
.dash-cal-job-name { color: #6b7280; overflow: hidden; text-overflow: ellipsis; }

.dash-cal-more { font-size: 10px; color: #2563eb; font-weight: 600; padding: 2px 6px; }
.dash-cal-empty { font-size: 12px; color: #d1d5db; text-align: center; padding-top: 20px; }

/* ===== Clearset Modern Application Shell ===== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --page: #f3f6fa;
  --text: #0f172a;
  --text-muted: #526176;
  --border: #dbe3ed;
  --radius: 12px;
  --sidebar-w: 236px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow-md: 0 8px 26px rgba(15,23,42,.08);
}
html { scroll-behavior:smooth; }
body { background:var(--page); color:var(--text); }
a, button, input, select, textarea { font:inherit; }
button, a { -webkit-tap-highlight-color:transparent; }
:focus-visible { outline:3px solid rgba(37,99,235,.32); outline-offset:2px; }
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.mobile-app-bar, .mobile-bottom-nav { display:none; }
.sidebar-backdrop[hidden], .search-modal[hidden] { display:none!important; }
.sidebar {
  width:var(--sidebar-w);
  background:#0f172a;
  box-shadow:none;
  border-right:1px solid rgba(255,255,255,.06);
}
.sidebar-brand { min-height:64px; padding:0 18px; border-bottom:1px solid rgba(255,255,255,.08); text-decoration:none; color:#fff; }
.sidebar-brand:hover { background:rgba(255,255,255,.035); }
.brand-icon { font-size:20px; }
.brand-text { font-size:14px; letter-spacing:.14em; }
.sidebar-search { position:relative; margin:12px; }
.sidebar-search input { width:100%; height:38px; padding:0 42px 0 34px; border-radius:10px; border:1px solid rgba(255,255,255,.12); background:rgba(255,255,255,.07); color:#f8fafc; font-size:13px; }
.sidebar-search input::placeholder { color:#9aa8ba; }
.sidebar-search-icon { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:#94a3b8; }
.search-shortcut { position:absolute; right:9px; top:50%; transform:translateY(-50%); color:#94a3b8; font-size:10px; border:1px solid rgba(255,255,255,.12); padding:2px 4px; border-radius:5px; }
.sidebar-nav { padding:2px 0 12px; scrollbar-width:thin; scrollbar-color:#334155 transparent; }
.sidebar-nav a { position:relative; min-height:38px; padding:9px 12px; margin:2px 10px; border:0; border-radius:9px; color:#cbd5e1; font-size:13px; }
.sidebar-nav .nav-icon { flex:0 0 20px; width:20px; text-align:center; font-size:14px; line-height:1; filter:saturate(.9); }
.sidebar-nav .nav-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nav-unread-badge { margin-left:auto; min-width:19px; height:19px; padding:0 6px; display:inline-grid; place-items:center; border-radius:999px; background:#ef4444; color:#fff; font-size:10px; font-weight:800; line-height:1; }
.nav-unread-badge[hidden] { display:none; }
.sidebar-nav a:hover { background:rgba(255,255,255,.07); }
.sidebar-nav a.active { background:#1d3768; color:#fff; border:0; box-shadow:none; }
.sidebar-nav a.active::before { content:''; position:absolute; left:-10px; top:9px; bottom:9px; width:3px; border-radius:0 4px 4px 0; background:#60a5fa; }
.nav-section { padding:2px 0; margin:0; }
.nav-section + .nav-section { border:0; margin:0; padding:2px 0; }
.nav-section-label { color:#8392a8; font-size:10px; letter-spacing:.11em; padding:9px 17px 5px; }
.nav-group { border-top:1px solid rgba(255,255,255,.055); }
.nav-group summary { list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; }
.nav-group summary::-webkit-details-marker { display:none; }
.nav-group summary::after { content:'›'; font-size:15px; transition:transform .16s ease; }
.nav-group[open] summary::after { transform:rotate(90deg); }
.nav-section-group { padding-bottom:5px; }
.sidebar-footer { padding:12px 14px; border-top:1px solid rgba(255,255,255,.08); }
.sidebar-user { display:flex; align-items:center; gap:9px; margin-bottom:8px; }
.sidebar-user-copy { min-width:0; flex:1; }
.sidebar-footer .user-role { color:#9aa8ba; }
.sidebar-footer .sidebar-link { display:inline-flex; color:#b8c3d2; padding:5px 0; }
.main { margin-left:var(--sidebar-w); padding:28px 30px 56px; }
.page-header { margin-bottom:20px; }
.page-header h1 { font-size:28px; font-weight:750; letter-spacing:-.035em; }
.page-header p { color:var(--text-muted); font-size:14px; }
.card, .kpi-card { border:1px solid var(--border); border-radius:var(--radius); box-shadow:var(--shadow-sm); }
.card-header { background:var(--surface-muted); border-color:var(--border); min-height:48px; }
.btn { min-height:38px; border-radius:9px; font-weight:650; }
.btn-primary { box-shadow:none; }
.btn-primary:hover { transform:none; }
.btn-outline { border-color:#cbd5e1; }
.btn-sm { min-height:32px; }
.form-control { min-height:42px; border-color:#cbd5e1; border-radius:9px; color:var(--text); }
.form-control:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(37,99,235,.13); }
.table th { color:#526176; }
.muted-small, .kpi-card .sub, .kpi-card .label { color:#66758a; }
.flash-stack { position:relative; z-index:10; }
.icon-button { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border:0; border-radius:10px; background:transparent; color:inherit; cursor:pointer; }
.icon-button:hover { background:rgba(148,163,184,.14); }
.search-modal { position:fixed; inset:0; z-index:3000; display:flex; align-items:flex-start; justify-content:center; padding:8vh 16px 16px; background:rgba(15,23,42,.62); backdrop-filter:blur(7px); }
.search-dialog { width:min(620px,100%); overflow:hidden; border-radius:16px; border:1px solid #334155; background:#111c30; color:#e2e8f0; box-shadow:0 28px 90px rgba(0,0,0,.42); }
.search-dialog-head { display:flex; align-items:center; justify-content:space-between; padding:14px 16px 8px; }
.search-dialog-head h2 { font-size:16px; }
.search-dialog-input { width:calc(100% - 28px); height:48px; margin:0 14px 12px; padding:0 14px; border:1px solid #3b4d66; border-radius:11px; background:#1b2940; color:#fff; font-size:15px; }
.search-dialog-input:focus { outline:none; border-color:#60a5fa; box-shadow:0 0 0 3px rgba(96,165,250,.14); }
.search-results { max-height:430px; overflow:auto; border-top:1px solid rgba(255,255,255,.07); }
.search-empty { padding:26px 18px; text-align:center; color:#9aa8ba; }
.search-error { color:#fca5a5; }
.search-result { display:flex; align-items:center; gap:12px; padding:12px 16px; color:inherit; text-decoration:none; border-bottom:1px solid rgba(255,255,255,.055); }
.search-result:hover { background:rgba(255,255,255,.055); }
.search-result-icon { width:30px; text-align:center; }
.search-result-copy { min-width:0; flex:1; display:grid; gap:2px; }
.search-result-copy strong { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:14px; }
.search-result-copy small { color:#9aa8ba; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.search-result-type { color:#8392a8; font-size:10px; text-transform:uppercase; }
.search-all { display:block; padding:12px; text-align:center; color:#93c5fd; text-decoration:none; }
.search-dialog-foot { display:flex; justify-content:space-between; padding:9px 16px; color:#8392a8; font-size:11px; border-top:1px solid rgba(255,255,255,.06); }
.job-action-modal { position:fixed; inset:0; z-index:3000; display:grid; place-items:center; padding:16px; background:rgba(15,23,42,.6); }
.job-action-modal[hidden] { display:none!important; }
.job-action-dialog { width:min(440px,100%); overflow:hidden; border-radius:14px; background:#fff; color:#0f172a; box-shadow:0 24px 70px rgba(15,23,42,.32); }
.job-action-dialog > header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:15px 17px; border-bottom:1px solid #e7edf4; }
.job-action-dialog h2 { margin:0; font-size:18px; }
.job-action-dialog p { margin:3px 0 0; color:#66758a; font-size:11px; }
.job-action-details { padding:14px 17px; color:#334155; font-size:12px; line-height:1.55; }
.job-action-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:0 17px 17px; }
.job-action-grid .btn { justify-content:center; text-decoration:none; }

@media (max-width: 900px) {
  body { padding-top:56px; padding-bottom:68px; }
  body.nav-open { overflow:hidden; }
  .mobile-app-bar { position:fixed; inset:0 0 auto 0; z-index:1300; height:56px; display:flex; align-items:center; gap:8px; padding:0 10px; background:#0f172a; color:#fff; border-bottom:1px solid rgba(255,255,255,.08); }
  .mobile-brand { flex:1; color:#fff; text-decoration:none; font-weight:800; letter-spacing:.08em; font-size:13px; }
  .mobile-menu-button { color:#fff; }
  .layout { display:block; min-height:auto; }
  .sidebar { position:fixed; top:0; bottom:0; left:0; z-index:1500; width:min(86vw,300px); transform:translateX(-105%); transition:transform .2s ease; box-shadow:18px 0 50px rgba(15,23,42,.35); }
  .sidebar.open { transform:translateX(0); }
  .sidebar-backdrop { position:fixed; inset:0; z-index:1400; background:rgba(15,23,42,.55); }
  .sidebar-brand { min-height:56px; }
  .main { margin-left:0; padding:20px 16px 34px; }
  .page-header { margin-bottom:16px; }
  .page-header h1 { font-size:24px; }
  .page-header-row { align-items:stretch; }
  .page-actions { width:100%; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .page-actions .btn { width:100%; }
  .mobile-bottom-nav { position:fixed; inset:auto 0 0; z-index:1200; height:64px; display:grid; grid-template-columns:repeat(4,1fr); padding:5px 8px max(5px,env(safe-area-inset-bottom)); background:rgba(255,255,255,.97); backdrop-filter:blur(10px); border-top:1px solid var(--border); box-shadow:0 -6px 22px rgba(15,23,42,.08); }
  .mobile-bottom-nav a, .mobile-bottom-nav button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; border:0; background:none; color:#64748b; text-decoration:none; font-size:18px; border-radius:9px; }
  .mobile-bottom-nav small { font-size:10px; font-weight:700; }
  .mobile-bottom-nav .active { color:var(--primary); background:#eff6ff; }
  .grid-2, .grid-3 { grid-template-columns:1fr; }
  .kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .kpi-card { padding:14px; }
  .kpi-card .value { font-size:24px; }
  .customer-search-form { grid-template-columns:1fr; }
  .customer-profile-hero { flex-direction:column; }
  .customer-profile-actions { justify-content:flex-start; }
  .customer-form-layout { grid-template-columns:1fr; }
  .customer-services-form, .customer-sites-form, .customer-form-actions { grid-column:1; }
  .service-choice-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .customer-sites-list { grid-template-columns:1fr; }
  .table-footer { align-items:flex-start; flex-direction:column; }
  .search-modal { padding-top:16px; align-items:flex-start; }
  .search-dialog { max-height:calc(100dvh - 32px); }
}

@media (max-width: 720px) {
  .customer-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .customer-browser-tools { padding:13px 14px 10px; }
  .customer-filter-row { flex-wrap:nowrap; overflow-x:auto; padding-bottom:3px; scrollbar-width:thin; }
  .customer-filter-row .filter-btn { flex:none; }
  .customer-table-wrap { overflow:visible; padding:0 10px 12px; background:#f8fafc; }
  .customer-table { min-width:0; border-collapse:separate; border-spacing:0 9px; }
  .customer-table thead { display:none; }
  .customer-table, .customer-table tbody, .customer-table tr, .customer-table td { display:block; width:100%; }
  .customer-table tr { overflow:hidden; border:1px solid #dbe3ed; border-radius:11px; background:#fff; box-shadow:0 1px 2px rgba(15,23,42,.05); }
  .customer-table tr.customer-row-restricted { border-color:#fecaca; background:#fff7f7; }
  .customer-table td { display:grid; grid-template-columns:84px minmax(0,1fr); gap:8px; padding:9px 12px; border-bottom:1px solid #edf1f6; text-align:left; white-space:normal; }
  .customer-table td::before { content:attr(data-label); color:#66758a; font-size:9px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
  .customer-table .customer-main-cell { display:block; padding:13px 12px; }
  .customer-table .customer-main-cell::before { display:none; }
  .customer-table .customer-contact-link { white-space:normal; overflow-wrap:anywhere; }
  .customer-table .customer-actions-cell { border-bottom:0; }
  .customer-table .row-actions { justify-content:flex-start; }
  .customer-table .row-actions .btn { flex:1; }
  .customer-profile-title-row h1 { font-size:21px; }
  .customer-contact-strip { flex-direction:column; gap:7px; }
  .customer-profile-actions { display:grid; grid-template-columns:1fr 1fr; width:100%; }
  .customer-profile-actions .btn:first-child { grid-column:1/-1; }
  .customer-site-grid { grid-template-columns:1fr; }
  .customer-tabs { margin:0 -1px; }
  .customer-tab { min-height:42px; padding:8px 12px; }
  .customer-history-table { min-width:0; border-collapse:separate; border-spacing:0 9px; padding:0 9px 8px; background:#f8fafc; }
  .customer-history-table thead { display:none; }
  .customer-history-table, .customer-history-table tbody, .customer-history-table tr, .customer-history-table td { display:block; width:100%; }
  .customer-history-table tr { overflow:hidden; border:1px solid #dbe3ed; border-radius:10px; background:#fff; }
  .customer-history-table td { display:grid; grid-template-columns:78px minmax(0,1fr); gap:8px; padding:8px 10px; border-bottom:1px solid #edf1f6; white-space:normal!important; }
  .customer-history-table td::before { content:attr(data-label); color:#66758a; font-size:9px; font-weight:800; text-transform:uppercase; }
  .customer-history-table td:last-child { border-bottom:0; }
  .service-choice-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .customer-danger-zone { align-items:flex-start; flex-direction:column; }
}

@media (max-width: 520px) {
  .main { padding:16px 12px 28px; }
  .kpi-grid { grid-template-columns:1fr 1fr; }
  .page-actions { grid-template-columns:1fr; }
  .btn { min-height:42px; }
  .btn-sm { min-height:36px; }
  .form-control { min-height:44px; font-size:16px; }
  .customer-overview > div { padding:11px 12px; }
  .customer-overview strong { font-size:19px; }
  .customer-browser-tools { padding:12px; }
  .customer-profile-hero { padding:15px; }
  .customer-profile-alert { align-items:flex-start; flex-direction:column; gap:2px; }
  .customer-profile-actions .btn { width:100%; }
  .customer-section-heading { align-items:flex-start; }
  .customer-section-heading p { line-height:1.35; }
  .customer-form-actions { display:grid; grid-template-columns:1fr 1fr; }
  .customer-danger-zone, .customer-danger-zone form, .customer-danger-zone .btn { width:100%; }
}

.eyebrow { margin-bottom:4px; color:#64748b; font-size:11px; font-weight:750; letter-spacing:.08em; text-transform:uppercase; }
.decision-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.decision-stat { display:grid; gap:2px; min-height:92px; padding:13px 15px; border:1px solid var(--border); border-radius:var(--radius); background:#fff; color:inherit; text-decoration:none; box-shadow:var(--shadow-sm); }
.decision-stat:hover { border-color:#b8c6d8; box-shadow:var(--shadow-md); }
.decision-stat span { color:#526176; font-size:12px; font-weight:700; }
.decision-stat strong { font-size:28px; line-height:1.05; letter-spacing:-.04em; }
.decision-stat small { color:#66758a; font-size:11px; }
.decision-stat.is-warning { border-left:4px solid #f59e0b; }
.decision-stat.is-danger { border-left:4px solid #ef4444; }
.dashboard-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,320px); gap:16px; align-items:start; }
.dashboard-header--compact { margin-bottom:16px; }
.section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:12px; }
.section-heading h2 { font-size:17px; margin:0; }
.section-heading p { margin:3px 0 0; color:var(--text-muted); font-size:12px; }
.driver-day-list { display:grid; gap:12px; }
.driver-day-card { overflow:hidden; border:1px solid var(--border); border-radius:var(--radius); background:#fff; box-shadow:var(--shadow-sm); }
.driver-day-card.is-unassigned { border-left:4px solid #f59e0b; }
.driver-day-card > header { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; background:#f8fafc; border-bottom:1px solid var(--border); }
.driver-day-identity { display:flex; align-items:center; gap:9px; }
.driver-dot { width:9px; height:9px; border-radius:50%; background:#2563eb; box-shadow:0 0 0 4px #dbeafe; }
.driver-day-card.is-unassigned .driver-dot { background:#f59e0b; box-shadow:0 0 0 4px #fef3c7; }
.driver-day-identity h3 { margin:0; font-size:14px; }
.driver-day-identity small { color:#66758a; font-size:11px; }
.quiet-link { color:#2563eb; font-size:12px; font-weight:700; text-decoration:none; }
.driver-stop-list { display:grid; }
.driver-stop { display:grid; grid-template-columns:52px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:58px; padding:8px 14px; border-bottom:1px solid #edf1f6; color:inherit; text-decoration:none; }
.driver-stop:last-child { border-bottom:0; }
.driver-stop:hover { background:#f8fafc; }
.driver-stop time { color:#334155; font-size:12px; font-weight:750; font-variant-numeric:tabular-nums; }
.driver-stop-copy { min-width:0; display:grid; gap:2px; }
.driver-stop-copy strong, .driver-stop-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.driver-stop-copy strong { font-size:13px; }
.driver-stop-copy small { color:#66758a; font-size:11px; }
.driver-stop-more { padding:10px 14px; color:#2563eb; font-size:12px; font-weight:700; text-align:center; text-decoration:none; }
.dashboard-side-column { display:grid; gap:14px; }
.attention-total { display:inline-flex; align-items:center; justify-content:center; min-width:24px; height:24px; border-radius:20px; background:#e2e8f0; color:#334155; font-size:11px; }
.attention-list { display:grid; }
.attention-list > a { display:grid; grid-template-columns:30px minmax(0,1fr) auto; align-items:center; gap:8px; min-height:46px; padding:8px 13px; color:inherit; text-decoration:none; border-bottom:1px solid #edf1f6; }
.attention-list > a:last-child { border-bottom:0; }
.attention-list > a:hover { background:#f8fafc; }
.attention-list > a strong { font-size:16px; }
.attention-list > a span { font-size:12px; }
.attention-list > a b { color:#2563eb; font-size:11px; }
.all-clear { display:flex; align-items:center; gap:10px; padding:18px 14px; }
.all-clear > span { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:#dcfce7; color:#15803d; }
.all-clear div { display:grid; gap:2px; }
.all-clear small { color:#66758a; }
.followup-list { display:grid; }
.followup-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; min-height:54px; padding:9px 13px; color:inherit; text-decoration:none; border-bottom:1px solid #edf1f6; }
.followup-row:last-child { border-bottom:0; }
.followup-row:hover { background:#f8fafc; }
.followup-row > span { min-width:0; display:grid; gap:2px; }
.followup-row strong, .followup-row small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.followup-row strong { font-size:12px; }
.followup-row small { color:#66758a; font-size:10px; }
.followup-row > b { padding:3px 7px; border-radius:999px; background:#eff6ff; color:#1d4ed8; font-size:10px; }
.followup-row > b.is-urgent { background:#fff1f2; color:#be123c; }
.call-attention { border-top:1px solid #dbe3ed; background:#fff7ed; }
.call-attention-heading { display:flex; justify-content:space-between; gap:8px; padding:10px 13px 6px; }
.call-attention-heading strong { color:#9a3412; font-size:11px; text-transform:uppercase; letter-spacing:.05em; }
.call-attention-heading a { color:#2563eb; font-size:10px; text-decoration:none; }
.call-attention-item { display:grid; gap:2px; padding:8px 13px; color:inherit; text-decoration:none; border-top:1px solid #ffedd5; }
.call-attention-item span { font-size:12px; font-weight:750; }
.call-attention-item small { color:#7c5b45; font-size:10px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.workflow-links { display:grid; grid-template-columns:1fr 1fr; }
.workflow-links a { display:grid; gap:3px; min-height:102px; padding:13px; color:inherit; text-decoration:none; border-right:1px solid #edf1f6; border-bottom:1px solid #edf1f6; }
.workflow-links a:nth-child(2n) { border-right:0; }
.workflow-links a:nth-last-child(-n+2) { border-bottom:0; }
.workflow-links a:hover { background:#f8fafc; }
.workflow-links span { color:#526176; font-size:11px; font-weight:700; }
.workflow-links strong { font-size:20px; letter-spacing:-.03em; }
.workflow-links small { color:#66758a; font-size:10px; }
.week-strip-card { margin-top:20px; }
.week-strip { display:grid; grid-template-columns:repeat(7,1fr); }
.week-strip-day { display:grid; gap:3px; padding:12px 10px; color:inherit; text-align:center; text-decoration:none; border-right:1px solid #edf1f6; }
.week-strip-day:last-child { border-right:0; }
.week-strip-day span { color:#66758a; font-size:10px; text-transform:uppercase; }
.week-strip-day strong { font-size:19px; }
.week-strip-day small { color:#66758a; font-size:10px; }
.week-strip-day.is-today { background:#eff6ff; color:#1d4ed8; }
.compact-empty { padding:36px; }

@media (min-width: 1180px) {
  .dashboard-main-column .driver-day-list { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; }
}

@media (max-width: 1100px) {
  .decision-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-layout { grid-template-columns:1fr; }
  .dashboard-side-column { grid-template-columns:1fr 1fr; }
}
@media (max-width: 700px) {
  .decision-stats { grid-template-columns:1fr 1fr; gap:8px; }
  .decision-stat { min-height:88px; padding:12px; }
  .decision-stat strong { font-size:25px; }
  .dashboard-side-column { grid-template-columns:1fr; order:-1; }
  .driver-stop { grid-template-columns:44px minmax(0,1fr); }
  .driver-stop .badge { grid-column:2; justify-self:start; }
  .week-strip { overflow-x:auto; grid-template-columns:repeat(7,minmax(82px,1fr)); }
}

/* Invoice collections workspace */
.page-header-row { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; }
.invoice-collections { margin-bottom:18px; }
.invoice-section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin-bottom:10px; }
.invoice-section-heading h2, .invoice-browser-tools h2 { margin:0; font-size:18px; }
.invoice-section-heading p { margin:3px 0 0; color:var(--text-muted); font-size:12px; }
.collection-quick-filters, .invoice-status-filters { display:flex; flex-wrap:wrap; gap:6px; }
.collection-quick-filters .filter-btn strong { margin-left:4px; }
.invoice-aging-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:9px; }
.invoice-aging-card { display:grid; gap:3px; min-height:108px; padding:14px; border:1px solid var(--border); border-radius:var(--radius); background:#fff; color:inherit; text-decoration:none; box-shadow:var(--shadow-sm); }
.invoice-aging-card:hover, .invoice-aging-card.active { border-color:#60a5fa; background:#eff6ff; }
.invoice-aging-card span { color:#526176; font-size:11px; font-weight:750; text-transform:uppercase; letter-spacing:.03em; }
.invoice-aging-card strong { font-size:22px; letter-spacing:-.03em; }
.invoice-aging-card small { color:#64748b; }
.invoice-browser { overflow:hidden; }
.invoice-browser-tools { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; padding:15px 16px; border-bottom:1px solid var(--border); }
.invoice-browser-tools > div { display:grid; gap:9px; }
.invoice-search-form { display:flex; gap:7px; width:min(460px,100%); }
.invoice-search-form .form-control { min-width:0; }
.invoice-active-filter { padding:8px 16px; border-bottom:1px solid #bfdbfe; background:#eff6ff; color:#1e40af; font-size:12px; }
.invoice-active-filter a { margin-left:5px; font-weight:750; }
.invoice-table-wrap { border:0; border-radius:0; }
.invoice-table { min-width:1080px; }
.invoice-table td { vertical-align:top; }
.invoice-table tr.invoice-follow-up-due { background:#fffaf0; }
.invoice-primary-link { display:block; color:#2563eb; font-size:12px; font-weight:800; text-decoration:none; }
.invoice-customer-name { display:block; margin-top:2px; font-size:13px; }
.invoice-contact-links { display:flex; gap:8px; margin-top:6px; }
.invoice-contact-links a { color:#2563eb; font-size:11px; font-weight:700; text-decoration:none; }
.invoice-aging-label, .invoice-follow-up, .invoice-promise, .invoice-last-note { margin-top:5px; color:#64748b; font-size:10px; line-height:1.35; }
.invoice-aging-label.is-overdue, .invoice-follow-up.is-due { color:#b91c1c; font-weight:750; }
.invoice-promise { color:#6d28d9; }
.invoice-balance { display:block; font-size:15px; }
.invoice-balance.is-due { color:#b45309; }
.invoice-table td > small, .invoice-table td small { display:block; margin-top:3px; color:#64748b; font-size:10px; }
.invoice-last-note { max-width:230px; display:-webkit-box; overflow:hidden; -webkit-line-clamp:2; -webkit-box-orient:vertical; color:#475569; }
.muted-small { color:#94a3b8; font-size:11px; }
.invoice-actions-cell { display:flex; flex-wrap:wrap; gap:5px; min-width:220px; }
.collection-modal[hidden] { display:none; }
.collection-modal { position:fixed; inset:0; z-index:2000; display:grid; place-items:center; padding:16px; background:rgba(15,23,42,.55); }
.collection-dialog { width:min(560px,100%); max-height:calc(100vh - 32px); overflow:auto; border-radius:15px; background:#fff; box-shadow:0 24px 70px rgba(15,23,42,.3); }
.collection-dialog > header { position:sticky; top:0; z-index:2; display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:17px 18px; border-bottom:1px solid var(--border); background:#fff; }
.collection-dialog h2 { margin:0; font-size:18px; }
.collection-dialog header p { margin:4px 0 0; color:#64748b; font-size:12px; }
.collection-contact-shortcuts { display:flex; gap:7px; padding:12px 18px 0; }
.collection-contact-shortcuts [hidden] { display:none; }
.collection-dialog form { padding:14px 18px 18px; }
.collection-dialog form footer { display:flex; justify-content:flex-end; gap:8px; margin-top:16px; }
#collectionFormStatus { min-height:18px; color:#b91c1c; font-size:12px; }
.icon-button { display:grid; place-items:center; width:34px; height:34px; border:1px solid var(--border); border-radius:9px; background:#fff; color:#334155; font-size:22px; cursor:pointer; }
.invoice-collection-edit-card { box-shadow:none; border:1px solid var(--border); margin:14px 0; }
.collection-history { display:grid; gap:8px; margin-top:10px; }
.collection-history h3 { margin:0; font-size:13px; }
.collection-history article { padding:10px 11px; border:1px solid #e2e8f0; border-radius:9px; background:#f8fafc; }
.collection-history article > div { display:flex; justify-content:space-between; gap:10px; }
.collection-history article strong { font-size:12px; }
.collection-history article time, .collection-history article small { color:#64748b; font-size:10px; }
.collection-history article p { margin:5px 0; color:#334155; font-size:12px; }

@media (max-width: 900px) {
  .invoice-aging-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .invoice-browser-tools, .invoice-section-heading { align-items:stretch; flex-direction:column; }
  .invoice-search-form { width:100%; }
}
@media (max-width: 700px) {
  .page-header-row { align-items:stretch; flex-direction:column; }
  .invoice-aging-grid { grid-template-columns:1fr 1fr; }
  .invoice-aging-card { min-height:92px; padding:11px; }
  .invoice-aging-card strong { font-size:18px; }
  .collection-quick-filters .filter-btn { flex:1; justify-content:center; }
  .invoice-browser-tools { padding:13px; }
  .invoice-search-form { display:grid; grid-template-columns:minmax(0,1fr) auto; }
  .invoice-table-wrap { overflow:visible; }
  .invoice-table { display:block; min-width:0; width:100%; }
  .invoice-table thead { display:none; }
  .invoice-table tbody { display:grid; gap:10px; padding:10px; }
  .invoice-table tr { display:grid; padding:7px 10px; border:1px solid #dbe3ed; border-radius:11px; background:#fff; box-shadow:var(--shadow-sm); }
  .invoice-table tr.invoice-follow-up-due { background:#fffaf0; }
  .invoice-table td { display:grid; grid-template-columns:108px minmax(0,1fr); align-items:start; gap:8px; min-width:0; padding:7px 0; border:0; border-bottom:1px solid #edf1f6; }
  .invoice-table td:last-child { border-bottom:0; }
  .invoice-table td::before { content:attr(data-label); color:#64748b; font-size:9px; font-weight:800; letter-spacing:.03em; text-transform:uppercase; }
  .invoice-table .invoice-actions-cell { display:flex; flex-wrap:wrap; gap:6px; min-width:0; }
  .invoice-table .invoice-actions-cell::before { flex:0 0 100%; }
  .invoice-table .invoice-actions-cell .btn { min-height:38px; }
  .invoice-last-note { max-width:none; }
  .collection-dialog { border-radius:13px; }
}

/* Driver field exceptions and closeout status on Dispatch */
.driver-attention-banner { display:flex; align-items:center; flex-wrap:wrap; gap:5px; margin:6px 0; padding:6px 7px; border:1px solid #fecaca; border-radius:7px; background:#fef2f2; color:#991b1b; font-size:10px; line-height:1.3; }
.driver-attention-banner button { margin-left:auto; border:0; border-radius:6px; padding:4px 7px; background:#991b1b; color:#fff; font-size:9px; font-weight:800; cursor:pointer; }
.driver-closeout-badge { display:inline-flex; margin-left:5px; padding:2px 6px; border-radius:999px; background:#dcfce7; color:#166534; font-size:8px; font-weight:850; white-space:nowrap; }
.driver-route-ack-badge { display:inline-flex; margin-left:5px; padding:2px 6px; border-radius:999px; font-size:8px; font-weight:850; white-space:nowrap; }
.driver-route-ack-badge.is-acknowledged { background:#dbeafe; color:#1d4ed8; }
.driver-route-ack-badge.needs-ack { background:#ffedd5; color:#9a3412; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto!important; animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
}

/* ===== 2026 Rollout Operations Design System ===== */
:root {
  --sidebar-w:232px;
  --primary:#2457d6;
  --primary-dark:#193fa7;
  --accent:#0f9f91;
  --surface-muted:#f7f9fc;
  --border:#dce4ee;
  --text:#172033;
  --text-muted:#627086;
  --radius:14px;
  --shadow-sm:0 1px 2px rgba(23,32,51,.05),0 6px 18px rgba(23,32,51,.035);
  --shadow-md:0 12px 34px rgba(23,32,51,.10);
}
body { background:radial-gradient(circle at 78% -10%,rgba(36,87,214,.09),transparent 30%),linear-gradient(180deg,#f8fafc 0%,#f1f5f9 100%); color:var(--text); }
.sidebar { background:linear-gradient(180deg,#10192d 0%,#111c31 58%,#0c1527 100%); box-shadow:10px 0 38px rgba(15,23,42,.12); }
.sidebar-brand { background:linear-gradient(90deg,rgba(36,87,214,.15),transparent); }
.sidebar-brand .brand-icon { display:grid; place-items:center; width:34px; height:34px; border:1px solid rgba(255,255,255,.10); border-radius:10px; background:rgba(255,255,255,.07); }
.sidebar-nav a { letter-spacing:.005em; }
.sidebar-nav a.active { background:linear-gradient(90deg,#24447d,#1c3767); }
.sidebar-nav a.active::before { background:linear-gradient(#72b7ff,#48dfc9); }
.sidebar-footer .avatar { background:linear-gradient(135deg,#315dd2,#0f9f91); }
.main { min-height:100vh; }
.page-header h1 { color:#152039; font-size:30px; }
.command-header { position:relative; padding:3px 0 4px; }
.command-header::after { content:''; position:absolute; left:0; right:0; bottom:-12px; height:1px; background:linear-gradient(90deg,var(--border),transparent); }
.card,.kpi-card,.decision-stat { border-color:rgba(203,213,225,.82); box-shadow:var(--shadow-sm); }
.card-header { background:linear-gradient(180deg,#fbfcfe,#f6f8fb); }
.btn { letter-spacing:.005em; }
.btn-primary { background:linear-gradient(135deg,#2d63e2,#204ebd); box-shadow:0 6px 14px rgba(36,87,214,.18); }
.btn-primary:hover { background:linear-gradient(135deg,#2457d6,#193fa7); }
.btn-quiet { border:0; background:transparent; color:#64748b; }
.btn-quiet:hover { background:#eef2f7; color:#334155; }
.btn-disabled,.btn:disabled { cursor:not-allowed; background:#e2e8f0; color:#94a3b8; box-shadow:none; }
.btn-block { width:100%; }
.soft-count { display:inline-flex; min-height:24px; align-items:center; padding:3px 9px; border:1px solid #dce4ee; border-radius:999px; background:#fff; color:#65748a; font-size:10px; font-weight:750; }
.mini-empty { padding:28px 18px; color:#7a8799; text-align:center; font-size:12px; }

/* Decision-first business analytics */
.business-pulse { margin-top:34px; }
.business-pulse-heading { align-items:center; }
.business-pulse-heading p { margin-top:4px; color:#718096; font-size:12px; }
.pulse-metric-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.pulse-metric { position:relative; overflow:hidden; min-height:112px; padding:17px 18px; border:1px solid #dce4ee; border-radius:14px; background:linear-gradient(145deg,#fff,#f7faff); box-shadow:var(--shadow-sm); }
.pulse-metric::after { content:''; position:absolute; width:92px; height:92px; right:-34px; top:-38px; border-radius:50%; background:rgba(36,87,214,.09); }
.pulse-metric--green::after { background:rgba(15,159,145,.12); }
.pulse-metric--amber::after { background:rgba(245,158,11,.14); }
.pulse-metric--violet::after { background:rgba(124,58,237,.11); }
.pulse-metric > span { display:block; color:#65748a; font-size:11px; font-weight:750; text-transform:uppercase; letter-spacing:.055em; }
.pulse-metric strong { display:block; margin-top:7px; color:#172033; font-size:27px; letter-spacing:-.04em; }
.pulse-metric small { display:block; margin-top:4px; color:#78869a; font-size:10px; }
.analytics-grid { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr); gap:14px; }
.analytics-card { min-height:286px; }
.analytics-card .card-header { min-height:48px; }
.chart-legend { display:flex; align-items:center; gap:6px; color:#718096; font-size:9px; font-weight:650; }
.chart-legend i { width:7px; height:7px; border-radius:2px; }
.chart-legend i.is-billed { margin-left:6px; background:#315ed4; }
.chart-legend i.is-paid { margin-left:5px; background:#18a999; }
.revenue-chart { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); align-items:end; gap:10px; height:235px; padding:28px 20px 15px; background:repeating-linear-gradient(to top,transparent 0,transparent 49px,#edf1f6 50px); }
.revenue-month { display:grid; grid-template-rows:145px auto auto; gap:4px; min-width:0; text-align:center; }
.revenue-bars { display:flex; justify-content:center; align-items:flex-end; gap:4px; height:145px; }
.revenue-bar { width:min(16px,38%); min-height:4px; border-radius:5px 5px 2px 2px; box-shadow:inset 0 1px rgba(255,255,255,.25); }
.revenue-bar.is-billed { background:linear-gradient(#4a78e8,#2856ca); }
.revenue-bar.is-paid { background:linear-gradient(#38c7b6,#0e9286); }
.revenue-month strong { overflow:hidden; color:#344158; font-size:10px; text-overflow:ellipsis; }
.revenue-month small { color:#7a8799; font-size:9px; }
.revenue-chart--report { height:285px; }
.revenue-chart--report .revenue-month { grid-template-rows:190px auto auto; }
.revenue-chart--report .revenue-bars { height:190px; }
.aging-list { display:grid; gap:14px; padding:18px; }
.aging-row { display:block; color:inherit; text-decoration:none; border-radius:8px; }
.aging-row:hover { background:#f8fafc; }
.aging-row > div:first-child { display:flex; justify-content:space-between; gap:10px; margin-bottom:5px; font-size:11px; }
.aging-row > div:first-child span { color:#5f6e83; font-weight:650; }
.aging-row > div:first-child strong { color:#29364b; }
.aging-row small { display:block; margin-top:4px; color:#8a96a7; font-size:9px; }
.aging-track { height:7px; overflow:hidden; border-radius:999px; background:#edf1f6; }
.aging-track span { display:block; min-width:0; height:100%; border-radius:inherit; background:#4f76d9; }
.aging-row--days_1_30 .aging-track span { background:#f1ad38; }
.aging-row--days_31_60 .aging-track span { background:#ed7d31; }
.aging-row--days_61_90 .aging-track span { background:#dc6a42; }
.aging-row--days_90_plus .aging-track span { background:#c83f4b; }
.workload-card { margin-top:20px; }
.workload-legend { display:flex; align-items:center; gap:7px; color:#66758a; font-size:10px; font-weight:650; }
.workload-legend i { width:8px; height:8px; border-radius:2px; }
.workload-legend .is-assigned,.workload-track .is-assigned { background:#4f76d9; }
.workload-legend .is-unassigned,.workload-track .is-unassigned { background:#f1ad38; }
.workload-legend .is-completed,.workload-track .is-completed { background:#2aa876; }
.workload-chart { display:grid; gap:4px; padding:12px 18px 18px; }
.workload-row { display:grid; grid-template-columns:72px minmax(160px,1fr) 180px; align-items:center; gap:14px; min-height:44px; padding:6px 8px; border-radius:10px; color:inherit; text-decoration:none; }
.workload-row:hover,.workload-row.is-today { background:#f2f6ff; }
.workload-row > strong { font-size:12px; color:#34435a; }
.workload-row > small { color:#66758a; font-size:10px; }
.workload-track { display:flex; height:12px; overflow:hidden; border-radius:999px; background:#edf1f6; }
.workload-track i { display:block; height:100%; }
.service-mix-list { display:grid; gap:13px; padding:18px; }
.service-mix-row > div:first-child { display:flex; justify-content:space-between; gap:10px; margin-bottom:5px; color:#526176; font-size:11px; }
.service-mix-row > div:last-child { height:8px; overflow:hidden; border-radius:999px; background:#edf1f6; }
.service-mix-row > div:last-child span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#2857ca,#27b8a7); }
.automation-preview-card { display:flex; flex-direction:column; }
.automation-preview-list { display:grid; }
.automation-preview-row { display:grid; grid-template-columns:7px minmax(0,1fr) auto; align-items:center; gap:10px; padding:11px 15px; border-bottom:1px solid #eef2f6; color:inherit; text-decoration:none; }
.automation-preview-row:hover { background:#f8fafc; }
.automation-preview-row i { width:7px; height:7px; border-radius:50%; background:#f59e0b; box-shadow:0 0 0 4px #fef3c7; }
.automation-preview-row.is-critical i { background:#dc3545; box-shadow:0 0 0 4px #fee2e2; }
.automation-preview-row span { min-width:0; }
.automation-preview-row strong,.automation-preview-row small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.automation-preview-row strong { color:#29364b; font-size:11px; }
.automation-preview-row small { margin-top:2px; color:#7a8799; font-size:9px; }
.automation-preview-row b { color:#315ed4; font-size:9px; }
.automation-preview-footer { margin-top:auto; padding:10px 15px; border-top:1px solid #eef2f6; color:#315ed4; text-decoration:none; font-size:10px; font-weight:750; }
.analytics-all-clear { margin:24px 18px; }
.analytics-report-grid { grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr); }
.analytics-report-grid .analytics-card--revenue { min-width:0; }
.report-breakdown { display:grid; gap:15px; min-height:210px; align-content:center; }
.report-breakdown-row > div:first-child { display:flex; justify-content:space-between; gap:12px; margin-bottom:6px; color:#526176; font-size:11px; }
.report-breakdown-row > div:first-child strong { color:#29364b; }
.report-breakdown-track { height:9px; overflow:hidden; border-radius:999px; background:#edf1f6; }
.report-breakdown-track span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#315ed4,#28b4a4); }

/* Shared safety and connection language */
.safety-banner { display:flex; align-items:flex-start; gap:12px; margin:18px 0; padding:14px 16px; border:1px solid #cfe1ef; border-radius:13px; background:linear-gradient(135deg,#f6fbff,#edf7fb); color:#27445a; }
.safety-banner--calm { border-color:#bfe5dd; background:linear-gradient(135deg,#f1fbf8,#e8f8f4); color:#175b52; }
.safety-banner--neutral { border-color:#dce4ee; background:linear-gradient(135deg,#fbfcfe,#f3f6f9); color:#4a586d; }
.safety-banner__icon { display:grid; flex:0 0 34px; place-items:center; width:34px; height:34px; border-radius:10px; background:rgba(255,255,255,.8); box-shadow:0 1px 4px rgba(15,23,42,.08); }
.safety-banner strong { display:block; font-size:12px; }
.safety-banner p { margin:3px 0 0; font-size:11px; line-height:1.5; }
.status-pill { display:inline-flex; align-items:center; min-height:22px; padding:3px 8px; border-radius:999px; background:#e8edf4; color:#526176; font-size:9px; font-weight:800; letter-spacing:.02em; text-transform:uppercase; white-space:nowrap; }
.status-pill--open,.status-pill--queued { background:#e8efff; color:#244fad; }
.status-pill--acknowledged,.status-pill--warning { background:#fff2cc; color:#8a5a00; }
.status-pill--resolved,.status-pill--synced { background:#dcf6ed; color:#137261; }
.status-pill--dismissed,.status-pill--off,.status-pill--failed { background:#f0f2f5; color:#6c788a; }

/* Automation center */
.pulse-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:18px 0; }
.pulse-kpi { min-height:105px; padding:15px 16px; border:1px solid #dce4ee; border-radius:13px; background:#fff; box-shadow:var(--shadow-sm); }
.pulse-kpi span,.pulse-kpi small { display:block; color:#718096; font-size:10px; }
.pulse-kpi span { font-weight:750; text-transform:uppercase; letter-spacing:.05em; }
.pulse-kpi strong { display:block; margin:5px 0; font-size:26px; }
.pulse-kpi--critical { border-top:3px solid #dc4d56; }
.pulse-kpi--warning { border-top:3px solid #e7a12d; }
.automation-layout { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(320px,.7fr); gap:16px; align-items:start; }
.automation-side-stack,.integration-main-stack,.integration-side-stack { display:grid; gap:16px; }
.automation-alert-list { display:grid; }
.automation-alert { display:grid; grid-template-columns:8px minmax(0,1fr) auto; gap:12px; padding:15px 17px; border-bottom:1px solid #edf1f6; }
.automation-alert:last-child { border-bottom:0; }
.automation-alert.is-muted { opacity:.55; }
.automation-alert__signal { width:8px; height:8px; margin-top:5px; border-radius:50%; background:#e9a22e; box-shadow:0 0 0 4px #fef3c7; }
.automation-alert--critical .automation-alert__signal { background:#d94b55; box-shadow:0 0 0 4px #fee2e2; }
.automation-alert--info .automation-alert__signal { background:#3970d8; box-shadow:0 0 0 4px #dbeafe; }
.automation-alert__meta { display:flex; justify-content:space-between; gap:10px; color:#8692a3; font-size:8px; font-weight:750; text-transform:uppercase; letter-spacing:.04em; }
.automation-alert h3 { margin-top:4px; font-size:13px; }
.automation-alert p { margin-top:3px; color:#65748a; font-size:10px; line-height:1.45; }
.automation-alert__state { display:flex; align-items:center; gap:7px; margin-top:8px; }
.automation-alert__state small { color:#8793a4; font-size:9px; }
.automation-alert__actions { display:flex; align-items:center; justify-content:flex-end; gap:5px; flex-wrap:wrap; max-width:220px; }
.automation-alert__actions form { margin:0; }
.automation-empty { padding:50px 20px; }
.automation-settings { padding:8px 16px 16px; }
.automation-rule { display:grid; grid-template-columns:18px minmax(0,1fr); gap:9px; padding:10px 0; border-bottom:1px solid #edf1f6; cursor:pointer; }
.automation-rule input { margin-top:3px; accent-color:var(--primary); }
.automation-rule strong,.automation-rule small { display:block; }
.automation-rule strong { color:#344158; font-size:11px; }
.automation-rule small { margin-top:2px; color:#8490a1; font-size:9px; line-height:1.35; }
.automation-settings-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:14px 0; }
.automation-settings-grid label > span,.integration-settings label > span { display:block; margin-bottom:4px; color:#5f6e83; font-size:10px; font-weight:750; }
.run-list { display:grid; }
.run-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 15px; border-bottom:1px solid #edf1f6; }
.run-row:last-child { border-bottom:0; }
.run-row strong,.run-row small { display:block; }
.run-row strong { color:#445269; font-size:10px; }
.run-row small { margin-top:2px; color:#8a96a7; font-size:8px; }
.run-row b { color:#315ed4; font-size:13px; }

/* QuickBooks dormant connector */
.connection-chip { display:inline-flex; align-items:center; gap:7px; min-height:34px; padding:6px 11px; border:1px solid #dce4ee; border-radius:999px; background:#fff; color:#68768a; font-size:10px; font-weight:750; }
.connection-chip > span { width:8px; height:8px; border-radius:50%; background:#94a3b8; }
.connection-chip.is-connected > span { background:#18a88f; box-shadow:0 0 0 4px #d9f6ee; }
.integration-readiness { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:18px 0; }
.readiness-step { display:flex; align-items:center; gap:10px; min-height:74px; padding:12px; border:1px solid #dce4ee; border-radius:12px; background:#fff; }
.readiness-step > span { display:grid; flex:0 0 30px; place-items:center; width:30px; height:30px; border-radius:9px; background:#edf1f6; color:#6d7a8c; font-size:11px; font-weight:850; }
.readiness-step.is-ready > span { background:#d9f5ed; color:#117363; }
.readiness-step strong,.readiness-step small { display:block; }
.readiness-step strong { color:#344158; font-size:10px; }
.readiness-step small { margin-top:3px; color:#8793a4; font-size:9.5px; }
.integration-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr); gap:16px; align-items:start; }
.qb-queue-list,.qb-candidate-list { display:grid; }
.qb-queue-row { display:grid; grid-template-columns:34px minmax(0,1fr) auto auto; align-items:center; gap:11px; padding:13px 16px; border-bottom:1px solid #edf1f6; }
.qb-mark { display:grid; place-items:center; width:34px; height:34px; border-radius:10px; background:#2ca01c; color:#fff; font-size:9px; font-weight:900; }
.qb-queue-row strong,.qb-queue-row small,.qb-candidate-row strong,.qb-candidate-row small { display:block; }
.qb-queue-row strong,.qb-candidate-row strong { color:#344158; font-size:12px; }
.qb-queue-row small,.qb-candidate-row small { margin-top:3px; color:#8490a1; font-size:10px; }
.qb-queue-row p { margin-top:4px; color:#b4232c; font-size:10px; line-height:1.4; }
.qb-candidate-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:12px; padding:13px 16px; border-bottom:1px solid #edf1f6; }
.qb-candidate-state { justify-self:end; }
.qb-blockers { grid-column:1/-1; color:#9a5b10; font-size:10.5px; line-height:1.5; }
.qb-mapping-form { grid-column:1/-1; display:grid; grid-template-columns:minmax(180px,1fr) auto; gap:8px; align-items:center; }
.qb-safety-check { display:grid; grid-template-columns:18px minmax(0,1fr); gap:8px; align-items:start; padding:10px; border:1px solid #fed7aa; border-radius:9px; background:#fff7ed; }
.qb-safety-check input { margin-top:2px; accent-color:var(--primary); }

/* Monday.com transition sync */
.monday-layout .stack { display:grid; gap:16px; }
.monday-safety-banner { margin-bottom:16px; }
.monday-action-panel { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:16px; }
.monday-action-panel strong,.monday-action-panel p { display:block; }
.monday-action-panel strong { color:#263248; font-size:13px; }
.monday-action-panel p { max-width:660px; margin:4px 0 0; color:#718096; font-size:11px; line-height:1.5; }
.monday-summary-grid { display:grid; grid-template-columns:repeat(6,1fr); border-top:1px solid #e8edf4; border-bottom:1px solid #e8edf4; }
.monday-summary-grid article { min-width:0; padding:14px; border-right:1px solid #e8edf4; }
.monday-summary-grid article:last-child { border-right:0; }
.monday-summary-grid strong,.monday-summary-grid span { display:block; }
.monday-summary-grid strong { color:#152238; font-size:20px; }
.monday-summary-grid span { margin-top:3px; color:#7b8798; font-size:9px; }
.monday-preview-note { padding:10px 16px; background:#f8fafc; color:#64748b; font-size:10px; }
.monday-preview-list { max-height:560px; overflow:auto; }
.monday-preview-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px 12px; padding:12px 16px; border-top:1px solid #edf1f6; }
.monday-preview-row:first-child { border-top:0; }
.monday-preview-row strong,.monday-preview-row small { display:block; }
.monday-preview-row strong { color:#344158; font-size:11px; }
.monday-preview-row small { margin-top:3px; color:#8490a1; font-size:9px; }
.monday-preview-row p { grid-column:1/-1; margin:0; color:#9a5b10; font-size:9px; }
.monday-preview-row .monday-customer-map { grid-column:1/-1; }
.monday-preview-row.is-error { background:#fff7f7; }
.monday-attention-list { display:grid; }
.monday-attention-row { padding:14px 16px; border-top:1px solid #edf1f6; }
.monday-attention-row:first-child { border-top:0; }
.monday-attention-row > div > strong,.monday-attention-row > div > small { display:block; }
.monday-attention-row > div > strong { color:#344158; font-size:11px; }
.monday-attention-row > div > small { margin-top:3px; color:#9a5b10; font-size:9px; }
.monday-customer-map { position:relative; display:grid; grid-template-columns:minmax(180px,1fr) auto; gap:8px; margin-top:10px; }
.monday-customer-results { position:absolute; z-index:5; top:44px; left:0; right:110px; overflow:hidden; border:1px solid #d8e0eb; border-radius:10px; background:#fff; box-shadow:0 12px 30px rgba(15,23,42,.16); }
.monday-customer-result { width:100%; display:block; padding:9px 11px; border:0; border-bottom:1px solid #edf1f6; background:#fff; color:#344158; text-align:left; cursor:pointer; }
.monday-customer-result:last-child { border-bottom:0; }
.monday-customer-result:hover { background:#f0f6ff; }
.monday-customer-result strong,.monday-customer-result small { display:block; }
.monday-customer-result strong { font-size:10px; }
.monday-customer-result small { margin-top:2px; color:#8490a1; font-size:8px; }
.monday-apply-box { margin:12px; padding:12px; border:1px solid #bfdbfe; border-radius:11px; background:#eff6ff; }
.monday-apply-box strong { color:#1e4f9a; font-size:11px; }
.monday-apply-box p { margin:4px 0 10px; color:#57749b; font-size:9px; line-height:1.45; }
.monday-apply-box .btn { width:100%; }
.monday-rule-list { margin:0; padding:14px 16px 14px 30px; color:#5f6f84; font-size:10px; line-height:1.75; }
.qb-safety-check span { margin:0!important; color:#8a4b0f!important; font-size:9px!important; line-height:1.4; }
.connection-panel { display:grid; gap:14px; }
.integration-facts { display:grid; gap:0; }
.integration-facts > div { display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid #edf1f6; }
.integration-facts dt { color:#7b8798; font-size:9px; }
.integration-facts dd { color:#3d4a60; font-size:10px; font-weight:750; text-align:right; }
.integration-settings { display:grid; gap:12px; }
.inline-warning { padding:9px 10px; border:1px solid #fed7aa; border-radius:9px; background:#fff7ed; color:#9a3412; font-size:9px; line-height:1.4; }
.admin-launch-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.admin-launch-card { display:grid; grid-template-columns:38px minmax(0,1fr) auto; align-items:center; gap:11px; padding:14px 15px; border:1px solid #dce4ee; border-radius:13px; background:linear-gradient(145deg,#fff,#f7f9fc); color:inherit; text-decoration:none; box-shadow:var(--shadow-sm); }
.admin-launch-card > span { display:grid; place-items:center; width:38px; height:38px; border-radius:11px; background:#edf3ff; }
.admin-launch-card strong,.admin-launch-card small { display:block; }
.admin-launch-card strong { font-size:12px; }
.admin-launch-card small { margin-top:3px; color:#7a8799; font-size:9px; }
.admin-launch-card b { color:#315ed4; font-size:10px; }

@media (max-width:1100px) {
  .pulse-metric-grid,.pulse-kpis { grid-template-columns:1fr 1fr; }
  .analytics-grid,.automation-layout,.integration-layout { grid-template-columns:1fr; }
  .integration-readiness { grid-template-columns:1fr 1fr; }
}
@media (max-width:720px) {
  .business-pulse { margin-top:26px; }
  .business-pulse-heading { align-items:flex-start; }
  .pulse-metric-grid,.pulse-kpis { grid-template-columns:1fr 1fr; gap:8px; }
  .pulse-metric,.pulse-kpi { min-height:96px; padding:13px; }
  .pulse-metric strong,.pulse-kpi strong { font-size:22px; }
  .analytics-grid { gap:10px; }
  .analytics-card { min-height:0; }
  .revenue-chart { gap:5px; height:210px; padding:22px 10px 12px; }
  .revenue-month { grid-template-rows:125px auto auto; }
  .revenue-bars { height:125px; gap:2px; }
  .revenue-bar { width:min(12px,42%); }
  .chart-legend { font-size:8px; }
  .workload-legend { flex-wrap:wrap; justify-content:flex-end; }
  .workload-chart { padding:10px 12px 14px; }
  .workload-row { grid-template-columns:60px minmax(90px,1fr); gap:8px; }
  .workload-row > small { grid-column:1/-1; padding-left:68px; }
  .automation-alert { grid-template-columns:7px minmax(0,1fr); }
  .automation-alert__actions { grid-column:2; justify-content:flex-start; max-width:none; }
  .automation-alert__actions .btn,.qb-queue-row .btn,.qb-candidate-row .btn { min-height:40px; padding-inline:12px; }
  .integration-readiness { grid-template-columns:1fr 1fr; }
  .qb-queue-row { grid-template-columns:34px minmax(0,1fr) auto; }
  .qb-queue-row .row-actions { grid-column:2/-1; justify-content:flex-start; }
  .qb-candidate-row { grid-template-columns:minmax(0,1fr) auto; }
  .qb-candidate-row form { grid-column:1/-1; }
  .qb-mapping-form { grid-template-columns:1fr; }
  .monday-action-panel { display:grid; }
  .monday-action-panel form,.monday-action-panel .btn { width:100%; }
  .monday-summary-grid { grid-template-columns:repeat(3,1fr); }
  .monday-summary-grid article:nth-child(3n) { border-right:0; }
  .monday-summary-grid article:nth-child(-n+3) { border-bottom:1px solid #e8edf4; }
  .monday-preview-row { padding:12px; }
  .monday-customer-map { grid-template-columns:1fr; }
  .monday-customer-results { right:0; }
  .admin-launch-grid { grid-template-columns:1fr; }
}
@media (max-width:440px) {
  .pulse-metric-grid,.pulse-kpis,.integration-readiness { grid-template-columns:1fr 1fr; }
  .pulse-metric > span { font-size:9px; }
  .pulse-metric small { font-size:9px; }
  .automation-settings-grid { grid-template-columns:1fr; }
  .revenue-month strong { display:none; }
}
