/* ═══ PORTAL RESKIN — Monday.com / White Sidebar ═══ */

@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #323338;
  --paper: #f6f7fb;
  --surface: #ffffff;
  --border: #e6e9ef;
  --border2: #d0d4e4;
  --muted: #676879;
  --accent: #00c875;
  --accent2: #00a562;
  --amber: #fdab3d;
  --amber-light: #fff4e2;
  --green: #00c875;
  --green-light: #d4f7e6;
  --red: #e2445c;
  --red-light: #fce4e8;
  --blue: #0073ea;
  --blue-light: #d9eeff;
  --purple: #a25ddc;
  --purple-light: #f0e3fa;
  --r: 8px;
  --r2: 8px;
  --sans: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: 'Figtree', -apple-system, sans-serif;
  --mono: 'Figtree', -apple-system, sans-serif;
}

body {
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  background: var(--paper);
}

/* ── SIDEBAR (white) ── */
.sidebar {
  background: #fff;
  width: 240px;
  border-right: 1px solid var(--border);
}
.main { margin-left: 240px; }
.sidebar-logo {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
}
.logo-mark {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.logo-sub {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.nav-label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  padding: 14px 10px 6px;
}
.nav-item {
  font-size: 14px;
  font-weight: 400;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink);
  gap: 10px;
}
.nav-item:hover {
  background: var(--paper);
  color: var(--ink);
}
.nav-item.active {
  background: #e6f7ef;
  color: #00854d;
}
.nav-icon { opacity: 0.6; font-size: 15px; }
.nav-item.active .nav-icon { opacity: 1; }
.nav-badge {
  background: #e2445c;
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 12px;
}
.sidebar-footer {
  border-top: 1px solid var(--border);
}
.user-avatar {
  border-radius: 50%;
  background: #00c875;
  color: #fff;
}
.user-name {
  font-weight: 500;
  color: var(--ink);
}
.user-role {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
}
.logout-btn {
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
}
.logout-btn:hover {
  background: var(--paper);
  color: var(--ink);
}

/* ── TOPBAR ── */
.topbar {
  height: 52px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.topbar-title {
  font-family: var(--sans);
  font-style: normal;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

/* ── CONTENT ── */
.content { padding: 24px; }

/* ── BUTTONS ── */
.btn {
  font-family: var(--sans);
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn-dark {
  background: #00c875;
  color: #fff;
}
.btn-dark:hover { background: #00a562; }
.btn-outline {
  background: #fff;
  border: 1px solid var(--border2);
  color: var(--ink);
}
.btn-outline:hover { background: var(--paper); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-amber { background: #fdab3d; }
.btn-amber:hover { background: #e8991e; }
.btn-green { background: #00c875; }
.btn-green:hover { background: #00a562; }
.btn-red { background: #e2445c; }
.btn-red:hover { background: #c93a50; }

/* ── INPUTS ── */
.input, .search-wrap input {
  font-family: var(--sans);
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .search-wrap input:focus {
  border-color: #00c875;
  box-shadow: 0 0 0 3px rgba(0,200,117,0.12);
}
.label {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

/* ── STAT CARDS ── */
.stat-card {
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  border: 1px solid var(--border);
  background: #fff;
}
.stat-label {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}
.stat-value {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 700;
  font-size: 28px;
  color: var(--ink);
}
.stat-sub { font-size: 13px; }

/* ── CARDS & TABLES ── */
.card, .table-wrap, .detail-panel {
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  background: #fff;
}
.card-title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.table th, thead th {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  padding: 10px 16px;
  background: #f6f7fb;
}
.table td, tbody td {
  padding: 12px 16px;
  font-size: 14px;
}
.table tr:hover td, tbody tr:hover td {
  background: #f6f7fb;
}

/* ── BADGES (coloured pills) ── */
.badge {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  border-radius: 20px;
  padding: 3px 10px;
}
.badge-survey { background: #e6e9ef; color: #676879; }
.badge-quoted { background: #fff4e2; color: #7f5700; }
.badge-booked { background: #d9eeff; color: #003d7a; }
.badge-assigned { background: #f0e3fa; color: #6b21a8; }
.badge-inprogress { background: #fff3e0; color: #b45309; }
.badge-completed { background: #d4f7e6; color: #006644; }
.badge-invoiced { background: #d4f7e6; color: #006644; }
.badge-cancelled { background: #fce4e8; color: #b91c33; }
.badge-paid { background: #d4f7e6; color: #006644; }
.badge-pending { background: #fff4e2; color: #7f5700; }
.badge-overdue { background: #fce4e8; color: #b91c33; }
.badge-active { background: #d4f7e6; color: #006644; }

/* ── PIPELINE ── */
.pipe-stage { border-radius: 8px; }
.pipe-stage:hover, .pipe-stage.active {
  border-color: #00c875;
  background: #00c875;
}
.pipe-name {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.pipe-count {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 700;
  font-size: 22px;
}

/* ── MODAL ── */
.modal {
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  background: #fff;
}
.modal-title {
  font-family: var(--sans);
  font-style: normal;
  font-size: 18px;
  font-weight: 700;
}
.modal-section-title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

/* ── TABS (underline style) ── */
.tabs {
  background: transparent;
  padding: 0;
  gap: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  width: 100%;
  margin-bottom: 24px;
}
.tab {
  border-radius: 0;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab.active {
  background: transparent;
  color: #00c875;
  border-bottom-color: #00c875;
  box-shadow: none;
}

/* ── DETAIL PANEL ── */
.detail-section-title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

/* ── STEPPER ── */
.step.done .step-dot { background: #00c875; border-color: #00c875; }
.step.current .step-dot { background: #0073ea; border-color: #0073ea; }
.step-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

/* ── CALENDAR ── */
.cal-day-name {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}
.cal-day { border-radius: 8px; }
.cal-day.today { border-color: #00c875; }
.cal-date { font-family: var(--sans); font-size: 12px; font-weight: 500; }
.cal-day.today .cal-date { color: #00c875; }

/* ── TIMELINE ── */
.tl-dot.done { background: #00c875; }
.tl-dot.current { background: #0073ea; }
.tl-meta { font-family: var(--sans); font-size: 12px; }

/* ── TOASTS ── */
.toast { border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.toast-ok { background: #00c875; }
.toast-err { background: #e2445c; }
.toast-warn { background: #fdab3d; }

/* ── EMPTY STATE ── */
.empty-title {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 600;
}

/* ── LOGIN ── */
.login-brand {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 700;
  font-size: 36px;
  letter-spacing: -0.5px;
}
.login-brand span {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 1px;
  opacity: 0.5;
  margin-top: 8px;
}
.login-tagline {
  font-family: var(--sans);
  font-style: normal;
  font-size: 22px;
  font-weight: 400;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}
.login-welcome {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.3px;
}
.login-sub { font-size: 14px; color: var(--muted); }
.login-right { background: #fff; }
.login-form .btn-dark {
  background: #00c875;
  height: 42px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
}
.login-form .btn-dark:hover { background: #00a562; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .sidebar { width: 0; border-right: none; }
  .main { margin-left: 0; }
}

/* ── VIEW SWITCHER ── */
.jobs-view-btn.active {
  background: #e6f7ef;
  color: #00854d;
}

/* ── JOB DETAIL SIDE PANEL ── */
#job-detail-panel .tabs {
  border-bottom: 1px solid var(--border);
}
#job-detail-panel .tab {
  font-size: 13px;
  padding: 8px 14px;
}

/* ── MONO/SERIF OVERRIDES ── */
.text-mono { font-family: var(--sans); }
.font-serif { font-family: var(--sans); font-style: normal; font-weight: 700; }

/* ══════════════════════════════════════════════════════ */
/* ── REDESIGNED MODALS — Monday.com Quality Standard ── */
/* ══════════════════════════════════════════════════════ */

/* Modal overlay & container */
.modal-overlay { backdrop-filter: blur(4px); background: rgba(0,0,0,0.45); }
.modal {
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.18);
  border: 1px solid #e6e9ef;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Modal header */
.modal-header {
  padding: 20px 24px !important;
  border-bottom: 1px solid #e6e9ef !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: #fff !important;
  position: sticky; top: 0; z-index: 2;
}
.modal-title {
  font-family: var(--sans) !important;
  font-style: normal !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  letter-spacing: -0.4px !important;
  color: #323338 !important;
}
.modal-close {
  width: 32px !important; height: 32px !important;
  border-radius: 8px !important;
  background: #f5f6f8 !important;
  border: 1px solid #e6e9ef !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  cursor: pointer !important;
  font-size: 16px !important;
  color: #676879 !important;
  transition: all 0.15s;
}
.modal-close:hover { background: #e6e9ef !important; color: #323338 !important; }

/* Modal body */
.modal-body {
  padding: 24px !important;
  overflow-y: auto;
  max-height: 60vh;
}

/* Modal footer */
.modal-footer {
  padding: 16px 24px !important;
  border-top: 1px solid #e6e9ef !important;
  display: flex !important;
  gap: 10px !important;
  justify-content: flex-end !important;
  background: #f8f9fb !important;
}

/* Footer buttons */
.modal-footer .btn-outline,
.modal-footer .btn-cancel {
  background: #f5f6f8; color: #323338;
  border: 1px solid #e6e9ef; border-radius: 8px;
  padding: 10px 20px; font-size: 14px; font-weight: 600;
  cursor: pointer; min-width: 80px;
}
.modal-footer .btn-outline:hover,
.modal-footer .btn-cancel:hover { background: #e6e9ef; }
.modal-footer .btn-dark,
.modal-footer .btn-primary {
  background: #00c875 !important; color: #fff !important;
  border: none !important; border-radius: 8px !important;
  padding: 10px 20px !important; font-size: 14px !important; font-weight: 700 !important;
  cursor: pointer; min-width: 100px;
}
.modal-footer .btn-dark:hover,
.modal-footer .btn-primary:hover { background: #00a85e !important; }

/* ── REDESIGNED FORM FIELDS ── */
.modal .label, .modal .m-label {
  font-family: var(--sans) !important;
  font-size: 11px !important; font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  color: #676879 !important;
  margin-bottom: 6px;
}
.modal .input, .modal select.input, .modal textarea.input {
  padding: 11px 14px !important;
  border: 1.5px solid #e6e9ef !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  color: #323338 !important;
  background: #ffffff !important;
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 44px;
  font-family: var(--sans) !important;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.modal .input:hover, .modal select.input:hover { border-color: #d0d4e4 !important; }
.modal .input:focus, .modal select.input:focus, .modal textarea.input:focus {
  border-color: #00c875 !important;
  box-shadow: 0 0 0 3px rgba(0,200,117,0.1) !important;
  outline: none !important;
}
.modal .input::placeholder { color: #afb2c0 !important; }

/* ── SECTION TITLES ── */
.modal .m-section-title {
  font-family: var(--sans);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #afb2c0;
  border-bottom: 1px solid #e6e9ef;
  padding-bottom: 8px;
  margin-bottom: 16px;
  margin-top: 4px;
}
.modal .modal-section-title {
  font-family: var(--sans) !important;
  font-size: 11px !important; font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  color: #afb2c0 !important;
  border-bottom: 1px solid #e6e9ef !important;
  padding-bottom: 8px !important;
  margin-bottom: 16px !important;
}

/* ── TWO-COLUMN GRID ── */
.m-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}
.m-grid .m-full { grid-column: span 2; }
.m-section { padding: 0; margin-bottom: 24px; }
.m-section:last-child { margin-bottom: 0; }
.m-field { display: flex; flex-direction: column; gap: 5px; }

/* ── MODAL TABS (redesigned) ── */
.modal .tabs, #job-detail-panel .tabs {
  padding: 0 24px !important;
  border-bottom: 1px solid #e6e9ef !important;
  display: flex !important;
  gap: 4px !important;
  background: transparent !important;
  border-radius: 0 !important;
  width: 100% !important;
  margin-bottom: 0 !important;
}
.modal .tab, #job-detail-panel .tab {
  padding: 12px 16px !important;
  font-size: 13px !important; font-weight: 600 !important;
  color: #676879 !important;
  border-bottom: 2px solid transparent !important;
  margin-bottom: -1px !important;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.modal .tab.active, #job-detail-panel .tab.active {
  color: #00c875 !important;
  border-bottom-color: #00c875 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.modal .tab:hover { color: #323338 !important; }

/* ── STATUS PILL SELECTOR ── */
.status-pill-selector {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0;
}
.status-pill-opt {
  padding: 7px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
  color: #fff; cursor: pointer;
  opacity: 0.5; transition: all 0.15s;
  user-select: none;
}
.status-pill-opt:hover { opacity: 0.8; }
.status-pill-opt.selected {
  opacity: 1;
  outline: 3px solid #323338;
  outline-offset: 2px;
}

/* ── STAR PRIORITY SELECTOR ── */
.star-priority-selector {
  display: flex; gap: 4px; padding: 8px 0;
}
.priority-star {
  font-size: 24px; cursor: pointer;
  color: #e2e4ed; transition: color 0.1s;
  user-select: none;
}
.priority-star.lit { color: #fdab3d; }
.priority-star:hover { color: #fdab3d; }

/* ── PARSE BANNER ── */
.parse-banner {
  background: linear-gradient(135deg, #f0fff8, #e8f4ff);
  border: 1px solid #00c875;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 12px;
}
.parse-banner-left { display: flex; align-items: center; gap: 10px; }
.parse-icon { font-size: 20px; }
.parse-banner-title { font-size: 13px; font-weight: 700; color: #323338; }
.parse-banner-sub { font-size: 12px; color: #676879; margin-top: 2px; }
.parse-banner-btn {
  background: #00c875; color: #fff; border: none; border-radius: 6px;
  padding: 8px 16px; font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.parse-banner-btn:hover { background: #00a85e; }

/* ── DISTANCE DISPLAY ── */
.distance-display {
  background: #f8f9fb; border: 1px solid #e6e9ef;
  border-radius: 8px; padding: 14px 18px;
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
}
.distance-icon { font-size: 18px; }
.distance-val { font-size: 18px; font-weight: 700; color: #323338; }
.distance-label { font-size: 12px; color: #676879; }

/* ── PARSE MODAL ── */
.modal-subtitle {
  font-size: 13px; color: #676879; margin-top: 4px;
}
.parse-result-header {
  font-size: 13px; font-weight: 700; color: #323338;
  margin-bottom: 8px; padding-bottom: 8px;
  border-bottom: 1px solid #e6e9ef;
}
.parse-result-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px;
}
.parse-result-item {
  background: #f8f9fb; border: 1px solid #e6e9ef;
  border-radius: 8px; padding: 12px 14px;
}
.parse-result-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: #afb2c0; margin-bottom: 4px;
}
.parse-result-input {
  border: none; background: transparent;
  font-size: 14px; font-weight: 500; color: #323338;
  width: 100%; outline: none; padding: 0;
  font-family: var(--sans);
}
.btn-parse-run {
  background: #00c875; color: #fff; border: none; border-radius: 8px;
  padding: 10px 20px; font-size: 14px; font-weight: 700;
  cursor: pointer; min-width: 100px;
}
.btn-parse-run:hover { background: #00a85e; }
.btn-parse-apply {
  background: #0073ea; color: #fff; border: none; border-radius: 8px;
  padding: 10px 20px; font-size: 14px; font-weight: 700;
  cursor: pointer; min-width: 100px;
}
.btn-parse-apply:hover { background: #0060c0; }

/* ── CUSTOMER NOTE HINT ── */
.customer-note-hint {
  font-size: 11px; color: #afb2c0; margin-top: 4px; font-style: italic;
}

/* ── CREW ASSIGN CARD ── */
.crew-assign-card {
  padding: 12px 14px !important;
  border: 1.5px solid #e6e9ef !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: all 0.15s;
}
.crew-assign-card:hover { border-color: #d0d4e4 !important; background: #f8f9fb !important; }

/* ── TOPBAR SECONDARY BTN ── */
.topbar-btn.secondary {
  background: #f5f6f8; color: #323338;
  border: 1px solid #e6e9ef; border-radius: 8px;
  padding: 6px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.topbar-btn.secondary:hover { background: #e6e9ef; }

/* ── QUOTE/INVOICE TOTALS BOX ── */
.totals-box {
  background: #f8f9fb; border: 1px solid #e6e9ef;
  border-radius: 8px; padding: 16px 18px;
}
.totals-row {
  display: flex; justify-content: space-between;
  font-size: 13px; margin-bottom: 6px; color: #676879;
}
.totals-row span:last-child { color: #323338; font-weight: 500; }
.totals-row.total {
  font-size: 15px; font-weight: 700; color: #323338;
  border-top: 1px solid #e6e9ef; padding-top: 10px; margin-top: 4px; margin-bottom: 0;
}
.totals-row.total span:last-child { color: #323338; font-weight: 700; }

/* ── LINE ITEM ROW ── */
.line-item-row {
  display: grid; grid-template-columns: 1fr 120px 32px;
  gap: 8px; margin-bottom: 8px; align-items: center;
}
.line-item-row .input { font-size: 13px !important; }
.line-item-remove {
  width: 32px; height: 32px; border-radius: 6px;
  background: transparent; border: 1px solid #e6e9ef;
  color: #e2445c; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.line-item-remove:hover { background: #fce4e8; border-color: #e2445c; }

/* ── JOB DETAIL SIDE PANEL (redesigned) ── */
#job-detail-panel {
  box-shadow: -8px 0 40px rgba(0,0,0,0.1) !important;
}
#job-detail-panel .detail-label {
  font-size: 11px !important; font-weight: 700 !important;
  text-transform: uppercase !important; letter-spacing: 0.6px !important;
  color: #676879 !important;
}
#job-detail-panel .detail-value {
  font-size: 14px !important; font-weight: 500 !important; color: #323338 !important;
}

/* ══════════════════════════════════════════════════════ */
/* ── CRM REDESIGN — Client List & Profile              */
/* ══════════════════════════════════════════════════════ */

/* ── CRM STAT CARDS ── */
.crm-stat-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 20px;
  border-left: 4px solid #0073ea;
  border-top: none; border-right: none; border-bottom: none;
}
.crm-stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #676879;
  margin-bottom: 8px;
}
.crm-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #323338;
  line-height: 1;
}
.crm-stat-sub {
  font-size: 12px;
  color: #676879;
  margin-top: 4px;
}

/* ── CRM TABLE ── */
.crm-table-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
}
.crm-table thead th {
  background: #f8f9fb;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px;
  color: #676879 !important;
  height: 48px;
}
.crm-table tbody tr {
  height: 64px;
  border-bottom: 1px solid #e6e9ef;
  transition: background 0.1s;
}
.crm-table tbody tr:hover {
  background: #f8f9fb;
}
.crm-table tbody tr:hover .crm-row-actions { opacity: 1; }

/* ── CLIENT AVATAR ── */
.crm-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.crm-avatar-lead { background: #c4c4c4; }
.crm-avatar-quoted { background: #0073ea; }
.crm-avatar-booked { background: #fdab3d; }
.crm-avatar-active, .crm-avatar-completed { background: #00c875; }
.crm-avatar-vip { background: #a25ddc; }
.crm-avatar-inactive { background: #c4c4c4; }

/* ── STATUS PILLS ── */
.crm-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.crm-status-lead { background: #f0f0f0; color: #676879; }
.crm-status-quoted { background: #dff0ff; color: #0073ea; }
.crm-status-booked { background: #fff8e6; color: #fdab3d; }
.crm-status-active, .crm-status-completed { background: #e6f9f1; color: #00c875; }
.crm-status-vip { background: #f4eeff; color: #a25ddc; }
.crm-status-inactive { background: #f0f0f0; color: #676879; }

/* ── ROW HOVER ACTIONS ── */
.crm-row-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}
.crm-row-action {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f8f9fb;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.1s, color 0.1s;
}
.crm-row-action:hover { background: #0073ea; color: #fff; }

/* ══ CLIENT PROFILE ══ */

/* Header Card */
.cp-header-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cp-header-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.cp-avatar-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #00c875;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  flex-shrink: 0;
}
.cp-header-name {
  font-size: 22px;
  font-weight: 700;
  color: #323338;
}
.cp-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.cp-status-pill:hover { opacity: 0.8; }
.cp-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: #f0f0f0;
  color: #676879;
}
.cp-header-contact {
  margin-top: 8px;
  font-size: 13px;
  color: #676879;
  display: flex;
  gap: 16px;
  align-items: center;
}
.cp-header-contact a {
  color: #0073ea;
  text-decoration: none;
}
.cp-header-contact a:hover { text-decoration: underline; }
.cp-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.cp-mini-stats {
  display: flex;
  gap: 8px;
}
.cp-mini-stat {
  background: #fff;
  border: 1px solid #e6e9ef;
  border-radius: 8px;
  padding: 8px 16px;
  text-align: center;
  min-width: 90px;
}
.cp-mini-stat-label {
  font-size: 11px;
  color: #676879;
  margin-bottom: 2px;
}
.cp-mini-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #323338;
}
.cp-header-actions {
  display: flex;
  gap: 6px;
}
.cp-action-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #e6e9ef;
  background: #fff;
  color: #323338;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--sans);
}
.cp-action-btn:hover { background: #f8f9fb; border-color: #d0d4e4; }
.cp-action-btn-danger:hover { background: #fce4e8; border-color: #e2445c; color: #e2445c; }

/* AI Summary Card */
.cp-ai-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-left: 4px solid #a25ddc;
  padding: 20px;
  margin-top: 16px;
}
.cp-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cp-ai-content {
  font-size: 14px;
  line-height: 1.6;
  color: #323338;
}
.cp-ai-timestamp {
  font-size: 12px;
  color: #676879;
  margin-top: 8px;
}

/* ── Profile Overview Tab ── */
.cp-overview-grid {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 16px;
  margin-top: 16px;
}
.cp-detail-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 20px;
}
.cp-detail-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #323338;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cp-detail-row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}
.cp-detail-row:last-child { border-bottom: none; }
.cp-detail-label {
  width: 130px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #676879;
  padding-top: 2px;
}
.cp-detail-val {
  font-size: 14px;
  color: #323338;
  flex: 1;
}

/* ── Recent items in sidebar ── */
.cp-recent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  transition: background 0.1s;
  cursor: default;
}
.cp-recent-item:hover { background: #f8f9fb; }
.cp-recent-ref {
  font-size: 12px;
  font-weight: 600;
  color: #0073ea;
  background: #dff0ff;
  padding: 2px 8px;
  border-radius: 4px;
}
.cp-recent-meta {
  font-size: 12px;
  color: #676879;
}
.cp-change-item {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}
.cp-change-item:last-child { border-bottom: none; }

/* ── Notes Tab ── */
.cp-note-form {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 20px;
  margin-bottom: 16px;
}
.cp-note-types {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.cp-note-type-chip {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: #f0f0f0;
  color: #676879;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  font-family: var(--sans);
}
.cp-note-type-chip.selected {
  background: #0073ea;
  color: #fff;
}
.cp-note-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 16px 20px;
  margin-bottom: 8px;
}
.cp-note-pinned {
  border-left: 3px solid #fdab3d;
}

/* ── Timeline Tab ── */
.cp-timeline-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  position: relative;
}
.cp-timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
  position: relative;
}
.cp-timeline-dot::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 4px;
  width: 2px;
  height: calc(100% + 16px);
  background: #e6e9ef;
}
.cp-timeline-item:last-child .cp-timeline-dot::after { display: none; }
.cp-timeline-dot-blue { background: #0073ea; }
.cp-timeline-dot-green { background: #00c875; }
.cp-timeline-dot-grey { background: #c4c4c4; }
.cp-timeline-dot-amber { background: #fdab3d; }
.cp-timeline-dot-red { background: #e2445c; }
.cp-timeline-dot-purple { background: #a25ddc; }
.cp-timeline-title {
  font-size: 14px;
  font-weight: 500;
  color: #323338;
}
.cp-timeline-desc {
  font-size: 13px;
  color: #676879;
  margin-top: 2px;
}
.cp-timeline-time {
  font-size: 12px;
  color: #676879;
  margin-top: 2px;
}

/* ── Add Client Modal Pills ── */
.cust-modal-tabs {
  display: flex;
  gap: 0;
  border-bottom: none;
}
.cust-modal-tab {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #676879;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}
.cust-modal-tab.active {
  color: #0073ea;
  border-bottom-color: #0073ea;
}
.crm-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0;
}
.crm-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.45;
  transition: all 0.15s;
  user-select: none;
}
.crm-pill:hover { opacity: 0.7; }
.crm-pill.selected { opacity: 1; outline: 2px solid #323338; outline-offset: 2px; }
.crm-pill-lead { background: #f0f0f0; color: #676879; }
.crm-pill-quoted { background: #dff0ff; color: #0073ea; }
.crm-pill-booked { background: #fff8e6; color: #b87a00; }
.crm-pill-completed { background: #e6f9f1; color: #00854d; }
.crm-pill-vip { background: #f4eeff; color: #a25ddc; }
.crm-pill-type { background: #f0f0f0; color: #323338; }

/* ── Duplicate Warning ── */
.cust-dup-warning {
  background: #fff8e6;
  border: 1px solid #fdab3d;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.cust-dup-match {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(253,171,61,0.2);
}
.cust-dup-match:last-child { border-bottom: none; }

/* ── Finance Summary Chips ── */
.cp-finance-chips {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.cp-finance-chip {
  flex: 1;
  background: #fff;
  border: 1px solid #e6e9ef;
  border-radius: 8px;
  padding: 12px 16px;
  text-align: center;
}
.cp-finance-chip-label {
  font-size: 11px;
  color: #676879;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.cp-finance-chip-value {
  font-size: 20px;
  font-weight: 700;
  color: #323338;
}

/* ── Shimmer for AI loading ── */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.cp-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  height: 16px;
  margin-bottom: 8px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .cp-overview-grid { grid-template-columns: 1fr; }
  .cp-header-card { flex-direction: column; }
  .cp-header-right { align-items: flex-start; }
  .cp-mini-stats { flex-wrap: wrap; }
}
