/* ============================================================
   RhoamOS Dashboard — styles.css
   Color system matches rhoamos.com. GPU-safe transitions only.
   ============================================================ */

:root {
  /* Light mode (default) */
  --bg:          #F5F6FA;
  --card:        #FFFFFF;
  --bg-surface-2: #EDEEF5;
  --border:      #E2E4EF;
  --border-light: #EDEEF5;

  --text-primary:   #0E0E12;
  --text-secondary: #5A5A72;
  --text-muted:     #9898AE;

  --accent:       #3B64F8;
  --accent-light: #EEF2FF;

  --red:    #DC2626;
  --red-bg: #fef2f2;
  --red-border: #f87171;

  --blue:    #3B64F8;
  --blue-bg: #EEF2FF;

  --green:    #16A364;
  --green-bg: #f0fdf4;
  --green-border: #86efac;

  --amber:   #D97706;
  --amber-bg: #fffbeb;

  --white:   #FFFFFF;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 2px 8px rgba(0,0,0,0.08);

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --t: 150ms ease;

  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Dark mode */
[data-theme="dark"] {
  --bg:          #0E0E12;
  --card:        #1A1A24;
  --bg-surface-2: #1F1F28;
  --border:      #25252E;
  --border-light: #1F1F28;

  --text-primary:   #FFFFFF;
  --text-secondary: #8B8B9A;
  --text-muted:     #55556A;

  --accent:       #3B64F8;
  --accent-light: #6B8FFF;

  --red:    #EF4444;
  --red-bg: #1a0f0f;
  --red-border: #f87171;

  --blue:    #3B64F8;
  --blue-bg: #151930;

  --green:    #22C77A;
  --green-bg: #0f1a14;
  --green-border: #34d399;

  --amber:   #F59E0B;
  --amber-bg: #1a1508;

  --white:   #18181F;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow:    0 2px 8px rgba(0,0,0,0.4);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, textarea { font-family: var(--font); }
a { text-decoration: none; color: inherit; }

/* ---- Views ---- */
.view {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
}
.view.active { display: flex; }

/* ============================================================
   LOGIN
   ============================================================ */
#view-login {
  background: var(--bg);
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}
.login-wrap { width: 100%; max-width: 340px; }
.login-logo-container {
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}

/* Theme toggle */
.theme-toggle {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: #8B8B9A; background: none; border: none;
  cursor: pointer; z-index: 10;
  transition: color var(--t);
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover { color: var(--text-primary); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
.login-title {
  font-size: 22px; font-weight: 700;
  text-align: center; letter-spacing: -0.4px;
  margin-bottom: 2px;
}
.login-sub {
  font-size: 14px; color: var(--text-muted);
  text-align: center; margin-bottom: 32px;
}
.login-form { display: flex; flex-direction: column; gap: 12px; }
.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.field-input {
  height: 48px; padding: 0 14px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 16px; color: var(--text-primary);
  outline: none; transition: border-color var(--t); -webkit-appearance: none;
}
.field-input:focus { border-color: var(--accent); }
.login-error {
  font-size: 13px; color: var(--red);
  text-align: center; min-height: 0;
  opacity: 0; transition: opacity 0.2s ease;
  overflow: hidden; max-height: 0;
}
.login-error.visible {
  opacity: 1; max-height: 40px; margin-top: 8px;
}
.login-error.success { color: var(--green); }
.login-forgot {
  text-align: center; margin-top: 12px;
}
.login-forgot a {
  font-size: 13px; color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t);
}
.login-forgot a:hover { color: var(--text-primary); text-decoration: underline; }
.btn-login {
  height: 48px; background: var(--accent); color: #fff;
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
  margin-top: 4px; transition: opacity var(--t); -webkit-tap-highlight-color: transparent;
}
.btn-login:active { opacity: 0.8; }
.btn-login:disabled { opacity: 0.45; cursor: not-allowed; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35);
  z-index: 40; opacity: 0; pointer-events: none;
  transition: opacity 0.28s ease;
}
.sidebar-overlay.open { opacity: 1; pointer-events: auto; }

.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 270px;
  background: var(--card); z-index: 50;
  display: flex; flex-direction: column;
  padding-top: var(--safe-top);
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  isolation: isolate;
  transform: translateX(-100%) translateZ(0);
}
.sidebar.open { transform: translateX(0) translateZ(0); }

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-light);
}
.sidebar-logo-icon {
  width: 40px; height: 40px;
  background: #4A6CF7; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-logo-wordmark { font-size: 17px; font-weight: 700; }

.sidebar-client {
  font-size: 12px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.6px; padding: 12px 20px 8px;
}

.sidebar-nav { flex: 1; padding: 6px 10px; }
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  transition: background var(--t), color var(--t);
  -webkit-tap-highlight-color: transparent;
}
.sidebar-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.sidebar-item:active { background: var(--bg); }
.sidebar-item.active {
  background: var(--bg-surface-2);
  color: var(--accent);
  font-weight: 600;
  border-left: 3px solid var(--accent);
  padding-left: 9px;
}
.sidebar-item.active svg { opacity: 1; stroke: var(--accent); }

.sidebar-signout {
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 22px;
  margin: 0 10px; margin-bottom: calc(16px + var(--safe-bottom));
  border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-muted);
  -webkit-tap-highlight-color: transparent;
  transition: color var(--t);
}
.sidebar-signout svg { width: 18px; height: 18px; }
.sidebar-signout:active { color: var(--red); }

.sidebar-open .dashboard-scroll,
.sidebar-open #al-list,
.sidebar-open .analytics-scroll,
.sidebar-open .notif-scroll,
.sidebar-open .settings-scroll { pointer-events: none; }

/* ============================================================
   DASHBOARD VIEW
   ============================================================ */
#view-dashboard { background: var(--bg); }

/* Header */
.header {
  flex-shrink: 0;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--safe-top) 16px 0;
  height: calc(52px + var(--safe-top));
}
.header-left { display: flex; align-items: center; gap: 12px; }
.hamburger {
  display: flex; flex-direction: column; justify-content: center;
  width: 32px; height: 32px; gap: 4px;
  -webkit-tap-highlight-color: transparent;
}
.hamburger span {
  display: block; height: 2px; width: 18px;
  background: var(--text-primary); border-radius: 2px;
  transition: opacity var(--t);
}
.header-title { font-size: 15px; font-weight: 500; color: var(--text-primary); }

.header-right { display: flex; align-items: center; gap: 8px; }
.header-last-lead { font-size: 12px; color: var(--text-muted); }
.live-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--green);
  background: var(--green-bg); padding: 3px 8px;
  border-radius: var(--radius-pill, 999px);
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* Dashboard scroll */
.dashboard-scroll {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 0;
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateZ(0);
}

/* ---- Stat Grid ---- */
.stat-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
  padding: 0 16px;
  margin-bottom: 12px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.stat-filter {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--t), background var(--t);
}
.stat-filter:active { opacity: 0.8; }

.stat-card.stat-action {
  border: 1px solid var(--border);
}
.stat-card.stat-action.active {
  border: 2px solid var(--red-border);
  background: var(--red-bg);
}
.stat-card.stat-contacted.active {
  border: 2px solid #3B64F8;
  background: var(--accent-light);
}
.stat-card.stat-booked.active {
  border: 2px solid #22C77A;
  background: var(--green-bg);
}
.stat-number {
  font-size: 34px; font-weight: 700;
  letter-spacing: -1.5px; line-height: 1;
  margin-bottom: 4px;
}
.stat-action .stat-number { color: var(--red); }
.stat-contacted .stat-number { color: var(--accent); }
.stat-booked .stat-number { color: var(--green); }
.stat-number.blue  { color: var(--accent); }
.stat-number.green { color: var(--green); }
.stat-number.amber { color: var(--amber); }
.stat-number.red   { color: var(--red); }
.stat-label {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.4px;
}
.stat-sublabel { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---- Widget ---- */
.widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 0 16px 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.widget-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border-light);
}
.widget-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.unread-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700;
  border-radius: 999px;
}

/* ---- Lead Row ---- */
.lead-row {
  border-bottom: 1px solid var(--border-light);
  position: relative;
  contain: content;
  transition: opacity .3s ease;
  animation: card-fade-in .25s ease both;
}
.lead-row.no-animate { animation: none; }
.lead-row:nth-child(1) { animation-delay: 0ms; }
.lead-row:nth-child(2) { animation-delay: 40ms; }
.lead-row:nth-child(3) { animation-delay: 80ms; }
.lead-row:nth-child(4) { animation-delay: 120ms; }
.lead-row:nth-child(5) { animation-delay: 160ms; }
.lead-row:nth-child(6) { animation-delay: 200ms; }
.lead-row:nth-child(7) { animation-delay: 240ms; }
.lead-row:nth-child(8) { animation-delay: 280ms; }
@keyframes card-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.lead-row:last-child { border-bottom: none; }

/* Status-based left border + inset shadow */
.lead-row.ls-new { border-left: 4px solid #EF4444; box-shadow: inset 0 0 0 1px rgba(239,68,68,0.18); }
.lead-row.ls-contacted { border-left: 4px solid #3B64F8; box-shadow: inset 0 0 0 1px rgba(59,100,248,0.18); }
.lead-row.ls-booked { border-left: 4px solid #22C77A; box-shadow: inset 0 0 0 1px rgba(34,199,122,0.18); }
.lead-row.ls-not_interested { border-left: 4px solid #55556A; box-shadow: inset 0 0 0 1px rgba(85,85,106,0.18); opacity: 0.55; }

.lead-row-inner {
  display: flex; align-items: stretch;
  padding: 14px 14px 14px 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  gap: 0;
}

/* Lead content */
.lead-main { flex: 1; min-width: 0; }

/* Row 1 — Name + Score box + Chevron */
.row-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.row-header-left { flex: 1; min-width: 0; }
/* Three-dot menu */
.lead-menu-wrap {
  position: relative; flex-shrink: 0;
}
.lead-menu-btn {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; letter-spacing: 1px; line-height: 1;
  color: var(--text-muted);
  background: none; border: none; cursor: pointer;
  transition: background var(--t);
  -webkit-tap-highlight-color: transparent;
}
.lead-menu-btn:hover { background: var(--bg-surface-2); }

.lead-menu-dropdown {
  position: absolute; top: 100%; right: 0;
  width: 180px;
  background: var(--card); border: 0.5px solid var(--border);
  border-radius: 12px; padding: 6px;
  z-index: 20;
  opacity: 0; pointer-events: none;
  transform: scale(0.92); transform-origin: top right;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.lead-menu-dropdown.open {
  opacity: 1; pointer-events: auto;
  transform: scale(1);
}
.lead-menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: 40px; padding: 0 12px;
  border-radius: 8px; border: none; background: none;
  font-size: 14px; font-weight: 500; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--t);
}
.lead-menu-item:active { background: var(--bg-surface-2); }
.lead-menu-item.delete-item {
  color: var(--red);
  background: rgba(239, 68, 68, 0.12);
  border: 0.5px solid rgba(239, 68, 68, 0.35);
  border-radius: 8px;
}
.delete-icon-circle {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(239, 68, 68, 0.3);
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--red);
  flex-shrink: 0;
}

/* Delete confirm modal */
.delete-confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 110;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 20px;
}
.delete-confirm-overlay.open {
  opacity: 1; pointer-events: auto;
}
.delete-confirm-card {
  width: 100%; max-width: 340px;
  background: var(--card); border-radius: 20px;
  padding: 24px 20px;
  transform: scale(0.92); opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}
.delete-confirm-overlay.open .delete-confirm-card {
  transform: scale(1); opacity: 1;
}
.delete-confirm-title {
  font-size: 16px; font-weight: 700; color: var(--text-primary);
  text-align: center; margin-bottom: 6px;
}
.delete-confirm-sub {
  font-size: 12px; color: var(--text-muted);
  text-align: center; margin-bottom: 20px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.delete-confirm-btns {
  display: flex; gap: 10px;
}
.delete-confirm-btn {
  flex: 1; height: 44px; border-radius: 12px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: opacity var(--t);
  -webkit-tap-highlight-color: transparent;
}
.delete-confirm-btn:active { opacity: 0.8; }
.cancel-btn {
  background: var(--bg); border: 0.5px solid var(--border);
  color: var(--text-secondary);
}
.confirm-btn {
  background: var(--red); border: none; color: #fff;
}
.lead-name {
  font-size: 20px; font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2;
}
.lead-time {
  font-size: 11px; color: var(--text-muted); margin-top: 2px;
}

/* Score box */
.score-box {
  width: 52px; height: 52px;
  border-radius: 10px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.score-box.green  { background: var(--green-bg); color: var(--green); }
.score-box.amber  { background: var(--amber-bg); color: var(--amber); }
.score-box.red    { background: var(--red-bg); color: var(--red); }
.score-box.muted  { background: var(--bg-surface-2); color: var(--text-muted); }
.score-num {
  font-size: 22px; font-weight: 700; line-height: 1;
}
.score-lbl {
  font-size: 9px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.3px; opacity: 0.7; margin-top: 2px;
}

/* Chips — all neutral, identical */
.row-chips {
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-bottom: 12px;
}
.chip {
  padding: 8px 14px; border-radius: 10px; min-width: 0;
  background: #EDEEF5; border: 0.5px solid #E2E4EF;
}
[data-theme="dark"] .chip {
  background: #252535; border-color: #35354A;
}
.chip-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; display: block; margin-bottom: 2px;
  color: #9898AE;
}
[data-theme="dark"] .chip-label { color: #7070A0; }
.chip-value {
  font-size: 13px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block; color: #0E0E12;
}
[data-theme="dark"] .chip-value { color: #E0E0F0; }
.chip-phone {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 150ms ease;
}
.chip-phone:active { opacity: 0.7; }

/* Status badge */
.row-bottom {
  display: flex; align-items: center; justify-content: space-between;
}
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 8px;
}
.status-badge.st-new { background: rgba(239,68,68,0.08); color: #EF4444; border: 0.5px solid rgba(239,68,68,0.19); }
.status-badge.st-contacted { background: rgba(59,100,248,0.08); color: #3B64F8; border: 0.5px solid rgba(59,100,248,0.19); }
.status-badge.st-booked { background: rgba(34,199,122,0.08); color: #22C77A; border: 0.5px solid rgba(34,199,122,0.19); }
.status-badge.st-not_interested { background: rgba(85,85,106,0.08); color: #55556A; border: 0.5px solid rgba(85,85,106,0.19); }
.status-icon { font-weight: 700; font-size: 12px; }
.status-dot { font-size: 8px; }

/* Action icons */
.row-actions {
  display: flex; gap: 8px; justify-content: flex-end;
}
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:active { transform: scale(0.88); }
.icon-btn svg { width: 15px; height: 15px; }

/* Phone button */
.icon-btn.phone {
  background: rgba(34,199,122,0.07); border: 0.5px solid rgba(34,199,122,0.21);
}
.icon-btn.phone svg { stroke: #22C77A; }

/* Check button states */
.icon-btn.check {
  background: #1F1F2C; border: 0.5px solid #2E2E3A;
}
:root .icon-btn.check { background: var(--bg-surface-2); border-color: var(--border); }
.icon-btn.check svg { stroke: #55556A; }
.icon-btn.check.filled-blue {
  background: #3B64F8; border-color: #3B64F8;
}
.icon-btn.check.filled-blue svg { stroke: #fff; }
.icon-btn.check.filled-green {
  background: #22C77A; border-color: #22C77A;
}
.icon-btn.check.filled-green svg { stroke: #fff; }

/* X button states */
.icon-btn.xmark {
  background: #1F1F2C; border: 0.5px solid rgba(239,68,68,0.19);
}
:root .icon-btn.xmark { background: var(--bg-surface-2); }
.icon-btn.xmark svg { stroke: #EF4444; }
.icon-btn.xmark.filled-red {
  background: #EF4444; border-color: #EF4444;
}
.icon-btn.xmark.filled-red svg { stroke: #fff; }

/* ---- Detail Panel ---- */
.detail-panel {
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: none;
  flex-direction: column;
  height: 0;
  opacity: 0;
  overflow: hidden;
  will-change: height, opacity;
}

.detail-body {
  display: flex; flex-direction: column;
  padding: 16px;
}

.detail-card {
  background: var(--card);
  border: 0.5px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.detail-card:last-child { margin-bottom: 0; }

/* detail-card-action uses same styling as other cards */

.detail-label {
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-bottom: 6px;
}
.detail-value {
  font-size: 13px; color: var(--text-primary); line-height: 1.6;
  word-wrap: break-word;
}

/* Score progress bar */
.score-bar {
  display: flex; gap: 6px; margin-top: 10px;
}
.score-seg {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--border);
}
.score-seg.filled.green  { background: var(--green); }
.score-seg.filled.amber  { background: var(--amber); }
.score-seg.filled.red    { background: var(--red); }
.score-seg.filled.muted  { background: var(--text-muted); }

/* Notes */
.notes-list {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 12px;
}
.note-bubble {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 0 10px 10px 10px;
  padding: 10px 12px;
}
.note-meta {
  font-size: 10px; color: var(--text-muted); margin-bottom: 3px;
}
.note-text { font-size: 13px; color: var(--text-primary); line-height: 1.45; }
.notes-empty, .notes-loading {
  font-size: 13px; color: var(--text-muted); font-style: italic;
}
.note-empty {
  font-size: 13px; color: var(--text-muted); font-style: italic;
  margin-bottom: 10px;
}

.note-input-row {
  display: flex; gap: 8px; align-items: center;
}
.note-input {
  flex: 1; height: 38px;
  padding: 0 14px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 20px; font-size: 13px; color: var(--text-primary);
  outline: none;
  transition: border-color var(--t);
  -webkit-appearance: none;
}
.note-input:focus { border-color: var(--accent); }
.note-save-btn {
  height: 38px; padding: 0 18px;
  background: var(--accent); color: #fff; border: none;
  border-radius: 20px; font-size: 13px; font-weight: 600;
  white-space: nowrap; flex-shrink: 0; cursor: pointer;
  transition: opacity var(--t);
}
.note-save-btn:active { opacity: 0.8; }

/* Next Action info row */
.next-action-row { display: flex; gap: 12px; align-items: flex-start; }
.next-action-icon {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: rgba(59,100,248,0.1); border: 0.5px solid rgba(59,100,248,0.2);
  display: flex; align-items: center; justify-content: center;
}
.next-action-icon svg { width: 14px; height: 14px; stroke: var(--accent); }
.next-action-content { flex: 1; min-width: 0; }

/* Score grid */
.score-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.score-grid-box {
  background: var(--bg-surface-2); border-radius: 8px;
  padding: 8px 10px; text-align: center;
  border: 0.5px solid transparent;
  transition: border-color var(--t);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.score-grid-letter { font-size: 10px; color: var(--text-muted); font-weight: 600; margin-bottom: 2px; }
.score-grid-value { font-size: 16px; font-weight: 700; }
.score-grid-tooltip {
  font-size: 10px; color: var(--text-muted); font-weight: 400;
  margin-top: 3px; display: none;
}
.score-grid-box.active { border-color: var(--accent); }
.score-grid-box.active .score-grid-tooltip { display: block; }
.score-reasoning-text {
  font-size: 12px; color: var(--text-muted); line-height: 1.5;
  margin-bottom: 10px;
}

/* Score total bar */
.score-total-bar { height: 4px; background: var(--border); border-radius: 2px; margin-bottom: 6px; }
.score-total-fill { height: 4px; border-radius: 2px; transition: width 0.3s ease; }
.score-total-text { font-size: 13px; color: var(--text-secondary); text-align: right; }

/* Detail card variant for next action */
.detail-card-next {
  background: var(--bg-surface-2);
  border-color: rgba(59,100,248,0.15);
}

/* ---- Skeleton ---- */
.skeleton-row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  display: flex; gap: 10px; align-items: center;
}
.sk-bar {
  border-radius: 4px;
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
.sk-content { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.sk-name  { height: 13px; width: 50%; }
.sk-meta  { height: 11px; width: 75%; }
.sk-score { height: 20px; width: 20px; border-radius: 4px; flex-shrink: 0; }

/* ---- Empty state ---- */
.empty-state {
  padding: 32px 16px; text-align: center;
}
.empty-icon { font-size: 36px; margin-bottom: 10px; opacity: 0.4; }
.empty-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.empty-sub { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ---- Bottom Grid ---- */
.bottom-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; padding: 0 16px; margin-bottom: 12px;
}
.bottom-card { text-align: center; }
.bottom-card .stat-number { font-size: 28px; }
.bottom-card.warn-border { border: 1.5px solid var(--red-border); background: var(--red-bg); }
.bottom-card.warn-border .stat-number { color: var(--red); }

/* ---- Call Outcome Modal ---- */
.call-outcome-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.call-outcome-overlay.open {
  opacity: 1; pointer-events: auto;
}

.call-outcome-sheet {
  width: 100%; max-width: 400px;
  background: #0E0E12;
  border: 0.5px solid #25252E;
  border-radius: 24px 24px 16px 16px;
  padding: 8px 20px calc(28px + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
.call-outcome-overlay.open .call-outcome-sheet {
  transform: translateY(0);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.call-outcome-handle {
  width: 36px; height: 4px;
  background: #2C2C38; border-radius: 2px;
  margin: 10px auto 20px;
}

.call-outcome-eyebrow {
  font-size: 13px; font-weight: 500; color: #55556A;
  text-align: center; letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 6px;
}

.call-outcome-title {
  font-size: 20px; font-weight: 700; color: #fff;
  text-align: center; letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.call-outcome-actions {
  display: flex; flex-direction: column;
}

.call-outcome-divider {
  height: 1px; background: #1A1A22;
  margin: 4px 0 14px;
}

.call-outcome-btn {
  height: 52px; width: 100%;
  border-radius: 14px;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  margin-bottom: 10px;
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.call-outcome-btn:active { transform: scale(0.97); }

.outcome-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}

.call-outcome-btn.outcome-booked {
  background: #3B64F8; border: 0.5px solid #3B64F8; color: #fff;
}
.call-outcome-btn.outcome-booked .outcome-icon {
  background: rgba(255,255,255,0.2); color: #fff;
}

.call-outcome-btn.outcome-reached {
  background: rgba(34,199,122,0.07); border: 0.5px solid rgba(34,199,122,0.25); color: #22C77A;
}
.call-outcome-btn.outcome-reached .outcome-icon {
  background: rgba(34,199,122,0.2); color: #22C77A;
}

.call-outcome-btn.outcome-noanswer {
  background: rgba(245,158,11,0.07); border: 0.5px solid rgba(245,158,11,0.25); color: #F59E0B;
}
.call-outcome-btn.outcome-noanswer .outcome-icon {
  background: rgba(245,158,11,0.2); color: #F59E0B;
}

/* ---- Logo Animations ---- */
@keyframes logo-glow {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 8px 2px rgba(59,100,248,0.4), 0 0 20px 6px rgba(59,100,248,0.15); }
}

@keyframes logo-enter {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: no-preference) {
  .sidebar-logo-icon {
    animation: logo-glow 2.5s ease-in-out infinite;
  }
}

/* ============================================================
   ALL LEADS VIEW
   ============================================================ */
.al-scroll {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 0;
  padding-bottom: env(safe-area-inset-bottom);
}
.al-search-wrap {
  padding: 0 16px; margin-bottom: 12px;
}
.al-search {
  width: 100%; height: 48px; padding: 0 14px;
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: 12px; font-size: 16px; color: var(--text-primary);
  outline: none; transition: border-color var(--t);
  -webkit-appearance: none;
}
.al-search:focus { border-color: var(--accent); }
.al-filters {
  display: flex; gap: 6px; padding: 0 16px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin-bottom: 14px;
}
.al-pill {
  height: 34px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); color: var(--text-secondary);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  flex-shrink: 0; cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t);
  -webkit-tap-highlight-color: transparent;
}
.al-pill:active { opacity: 0.8; }
.al-pill.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.al-count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 999px;
  margin-left: 6px;
}
#al-list {
  padding: 0 16px;
  transform: translateZ(0);
}
#al-list .lead-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
#al-list .lead-row.expanded {
  overflow: visible;
}
#al-list .lead-row:last-child { border-bottom: 1px solid var(--border); }
#al-list .lead-row.ls-new { border-left: 4px solid #EF4444; box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(239,68,68,0.18); }
#al-list .lead-row.ls-contacted { border-left: 4px solid #3B64F8; box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(59,100,248,0.18); }
#al-list .lead-row.ls-booked { border-left: 4px solid #22C77A; box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(34,199,122,0.18); }
#al-list .lead-row.ls-not_interested { border-left: 4px solid #55556A; box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(85,85,106,0.18); opacity: 0.55; }
.al-empty {
  padding: 32px 16px; text-align: center;
  font-size: 14px; color: var(--text-muted);
}
.al-load-more-wrap {
  padding: 12px 16px; text-align: center;
}
.al-load-more-btn {
  height: 44px; padding: 0 24px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; font-size: 14px; font-weight: 600;
  color: var(--accent); cursor: pointer;
  transition: background var(--t);
  -webkit-tap-highlight-color: transparent;
}
.al-load-more-btn:active { opacity: 0.8; }

/* ============================================================
   ANALYTICS VIEW
   ============================================================ */
.analytics-scroll {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 0;
  padding-bottom: env(safe-area-inset-bottom);
}
.analytics-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; padding: 0 16px; margin-bottom: 12px;
}
.analytics-stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px;
  box-shadow: var(--shadow-sm); text-align: center;
}
.analytics-stat-num {
  font-size: 28px; font-weight: 700; color: var(--accent);
  letter-spacing: -1px; line-height: 1; margin-bottom: 4px;
}
.analytics-stat-label {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.4px;
}
.analytics-chart-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  margin: 0 16px 12px; box-shadow: var(--shadow-sm);
}
.analytics-chart-title {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  margin-bottom: 16px;
}
.analytics-chart {
  display: flex; gap: 6px; align-items: flex-end;
  min-height: 100px;
}
.analytics-bar {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 4px;
}
.analytics-bar-fill {
  width: 100%; border-radius: 4px 4px 0 0;
  background: var(--accent);
  min-height: 2px; max-height: 80px;
}
.analytics-bar-fill.empty { background: var(--border); height: 2px; }
.analytics-bar-count {
  font-size: 11px; font-weight: 600; color: var(--text-primary);
}
.analytics-bar-label {
  font-size: 11px; color: var(--text-muted);
}
.analytics-insights {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; padding: 0 16px;
}
.analytics-insight-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px;
  box-shadow: var(--shadow-sm);
}
.analytics-insight-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.analytics-insight-value {
  font-size: 15px; font-weight: 600; color: var(--text-primary);
}

/* ============================================================
   NOTIFICATIONS VIEW
   ============================================================ */
.notif-scroll {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 16px;
  padding-bottom: env(safe-area-inset-bottom);
}

.notif-section {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
}

.notif-section-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 4px;
}

.notif-section-sub {
  font-size: 12px; color: var(--text-muted);
  margin-bottom: 16px;
}

.notif-note {
  font-size: 11px; color: var(--amber);
  margin-bottom: 16px;
}

.notif-add-form {
  display: flex; flex-direction: column; gap: 0;
}

.notif-add-row {
  display: flex; gap: 8px; margin-bottom: 8px;
}

.notif-add-row .notif-input { flex: 1; }

.notif-input {
  height: 44px; padding: 0 14px;
  background: var(--bg-surface-2);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  font-size: 14px; color: var(--text-primary);
  outline: none;
  transition: border-color var(--t);
  -webkit-appearance: none;
  width: 100%;
  margin-bottom: 8px;
}
.notif-input:focus { border-color: var(--accent); }

.notif-add-btn {
  width: 100%; height: 44px;
  background: var(--accent); color: #fff; border: none;
  border-radius: 12px; font-size: 14px; font-weight: 600;
  cursor: pointer; margin-top: 8px;
  transition: opacity var(--t), background 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.notif-add-btn:active { opacity: 0.8; }
.notif-add-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.recip-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-surface-2);
  border-radius: 10px;
  margin-bottom: 8px;
}

.recip-info { flex: 1; min-width: 0; }
.recip-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.recip-meta {
  font-size: 11px; color: var(--text-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.recip-remove-btn {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(239,68,68,0.1);
  border: 0.5px solid rgba(239,68,68,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--red);
  cursor: pointer; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.recip-remove-btn:active { opacity: 0.7; }

#recip-list {
  margin-top: 16px;
  border-top: 0.5px solid var(--border);
  padding-top: 16px;
}
.recip-empty {
  font-size: 12px; color: var(--text-muted);
  text-align: center; padding: 20px 0;
}

/* Alert settings within notification */
.notif-field-group { margin-bottom: 12px; }
.notif-label {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 6px; display: block;
}
.notif-input-row { display: flex; gap: 8px; }
.notif-save-btn {
  height: 44px; padding: 0 18px;
  background: var(--accent); color: #fff; border: none;
  border-radius: 12px; font-size: 13px; font-weight: 600;
  white-space: nowrap; flex-shrink: 0; cursor: pointer;
  transition: opacity var(--t), background 0.3s ease;
}
.notif-save-btn:active { opacity: 0.8; }

/* ============================================================
   SETTINGS VIEW
   ============================================================ */
.settings-scroll {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 16px;
  padding-bottom: env(safe-area-inset-bottom);
}
.settings-section {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 4px 0;
  box-shadow: var(--shadow-sm); margin-bottom: 12px;
  overflow: hidden;
}
.settings-section-title {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 12px 16px 4px;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; min-height: 48px;
  border-bottom: 1px solid var(--border-light);
}
.settings-row:last-child { border-bottom: none; }
.settings-3col {
  display: flex; align-items: center; gap: 8px;
}
.settings-3col .settings-row-label {
  width: 130px; flex-shrink: 0;
}
.settings-3col .settings-row-value {
  flex: 1; min-width: 0; text-align: left; max-width: none;
}
.settings-row-spacer { width: 42px; flex-shrink: 0; }
@media (max-width: 480px) {
  .settings-3col .settings-row-label { width: 110px; }
}
.settings-row-label {
  font-size: 14px; font-weight: 500; color: var(--text-primary);
}
.settings-row-value {
  font-size: 14px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.settings-btn {
  width: calc(100% - 48px); margin: 0 24px; display: block;
  height: 44px; padding: 0 20px;
  background: var(--bg-surface-2); border: 0.5px solid var(--border);
  border-radius: 12px; font-size: 14px; font-weight: 500;
  color: var(--text-primary); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.settings-btn:active { opacity: 0.7; }

.settings-signout {
  width: 100%; height: 48px;
  background: var(--card); border: 1px solid var(--red);
  border-radius: 12px; font-size: 15px; font-weight: 600;
  color: var(--red); cursor: pointer;
  margin-top: 8px;
  transition: opacity var(--t);
  -webkit-tap-highlight-color: transparent;
}
.settings-signout:active { opacity: 0.8; }

/* ---- Toggle Switch ---- */
.toggle-switch {
  position: relative; display: inline-block;
  width: 44px; height: 24px; flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--border); border-radius: 12px;
  transition: background 0.2s ease;
}
.toggle-track::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--card); box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}
.toggle-switch input:checked + .toggle-track {
  background: var(--accent);
}
.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(20px);
}

/* ============================================================
   ADMIN VIEW
   ============================================================ */
.admin-scroll {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 16px;
  padding-bottom: env(safe-area-inset-bottom);
}
.admin-health-badge {
  font-size: 11px; font-weight: 600; color: var(--green);
}
.admin-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 16px;
}
.admin-stat-card {
  background: var(--card); border: 0.5px solid var(--border);
  border-radius: 12px; padding: 14px; text-align: center;
}
.admin-stat-num {
  font-size: 22px; font-weight: 700; color: var(--text-primary);
  letter-spacing: -0.5px;
}
.admin-stat-label {
  font-size: 11px; color: var(--text-muted); margin-top: 2px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.admin-section-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 10px; margin-top: 8px;
}
.admin-clients-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
}
.admin-client-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer;
  background: var(--card); border: 0.5px solid var(--border);
  border-radius: 10px; margin-bottom: 6px;
  transition: opacity var(--t);
  -webkit-tap-highlight-color: transparent;
}
.admin-client-row:active { opacity: 0.7; }
.admin-client-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.admin-client-info { flex: 1; min-width: 0; }
.admin-client-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.admin-client-meta {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-client-status {
  font-size: 10px; font-weight: 600; padding: 3px 8px;
  border-radius: 6px; flex-shrink: 0;
}
.admin-client-status.active { background: var(--green-bg); color: var(--green); }
.admin-client-status.pending { background: var(--bg-surface-2); color: var(--text-muted); }
.admin-client-calls { font-size: 13px; font-weight: 600; color: var(--text-secondary); min-width: 20px; text-align: center; }
.admin-client-mrr { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.admin-charts {
  display: grid; grid-template-columns: 1fr; gap: 12px;
  margin-bottom: 16px;
}
.admin-chart-card {
  background: var(--card); border: 0.5px solid var(--border);
  border-radius: 12px; padding: 16px;
}
.admin-chart-title { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.admin-ring {
  width: 100px; height: 100px; border-radius: 50%;
  margin: 0 auto 10px;
  position: relative;
}
.admin-ring::after {
  content: ''; position: absolute; inset: 20px;
  background: var(--card); border-radius: 50%;
}
.admin-ring-legend { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.admin-legend-item { font-size: 11px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; }
.admin-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.admin-bars {
  display: flex; gap: 4px; align-items: flex-end; height: 100px;
}
.admin-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; justify-content: flex-end; }
.admin-bar-fill { width: 100%; border-radius: 3px 3px 0 0; min-height: 2px; }
.admin-bar-count { font-size: 10px; font-weight: 600; color: var(--text-primary); min-height: 14px; }
.admin-bar-label { font-size: 10px; color: var(--text-muted); }
.admin-health-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 16px;
}
.admin-health-card {
  background: var(--card); border: 0.5px solid var(--border);
  border-radius: 10px; padding: 12px; text-align: center;
}
.admin-health-dot {
  width: 10px; height: 10px; border-radius: 50%;
  margin: 0 auto 6px;
}
.admin-health-dot.green { background: var(--green); }
.admin-health-dot.red { background: var(--red); }
.admin-health-dot.amber { background: var(--amber); }
.admin-health-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.admin-health-status { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.admin-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }
.admin-back {
  font-size: 13px; color: var(--accent); cursor: pointer;
  margin-bottom: 12px; -webkit-tap-highlight-color: transparent;
}
.admin-drill-hero {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.admin-drill-info { flex: 1; min-width: 0; }
.admin-drill-name { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.admin-drill-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.admin-tabs { display: flex; gap: 0; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.admin-tab {
  flex: 1; padding: 10px 0; text-align: center;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color var(--t);
  -webkit-tap-highlight-color: transparent;
}
.admin-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.admin-lead-row {
  padding: 12px 14px;
  border-left: 4px solid transparent;
  border-bottom: 0.5px solid var(--border);
  background: var(--card);
  margin-bottom: 6px;
  border-radius: 10px;
  border: 0.5px solid var(--border);
}
.admin-lead-row.ls-new { border-left: 4px solid #EF4444; }
.admin-lead-row.ls-contacted { border-left: 4px solid #3B64F8; }
.admin-lead-row.ls-booked { border-left: 4px solid #22C77A; }
.admin-lead-row.ls-not_interested { border-left: 4px solid #55556A; opacity: 0.55; }
.admin-lead-main { min-width: 0; }
.admin-lead-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 6px;
}
.admin-lead-name {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.admin-lead-chips {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px;
}
.admin-lead-chip {
  font-size: 11px; color: var(--text-muted);
  background: var(--bg-surface-2); padding: 3px 8px;
  border-radius: 6px;
}
.admin-config {
  background: var(--card); border: 0.5px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.admin-config-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--border);
}
.admin-config-row:last-child { border-bottom: none; }
.admin-config-label { font-size: 12px; color: var(--text-muted); }
.admin-config-value { font-size: 12px; color: var(--text-primary); font-weight: 500; text-align: right; max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.admin-deactivate-btn {
  width: 100%; height: 44px; border-radius: 12px; margin-top: 16px;
  background: rgba(239,68,68,0.08); border: 0.5px solid rgba(239,68,68,0.3);
  color: var(--red); font-size: 14px; font-weight: 600; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.admin-deactivate-btn:active { opacity: 0.7; }
.admin-reactivate-btn {
  width: 100%; height: 44px; border-radius: 12px; margin-top: 16px;
  background: rgba(34,199,122,0.08); border: 0.5px solid rgba(34,199,122,0.3);
  color: var(--green); font-size: 14px; font-weight: 600; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.admin-reactivate-btn:active { opacity: 0.7; }
.admin-client-row.row-inactive { opacity: 0.5; }
.admin-client-status.inactive { background: var(--bg-surface-2); color: var(--text-muted); }

/* Mark As sheet — Booked=green, Contacted=blue */
.outcome-booked-green { background: #22C77A; border: 0.5px solid #22C77A; color: #fff; }
.outcome-booked-green .outcome-icon { background: rgba(255,255,255,0.2); color: #fff; }
.outcome-contacted-blue { background: rgba(59,100,248,0.07); border: 0.5px solid rgba(59,100,248,0.4); color: #6B8FFF; }
.outcome-contacted-blue .outcome-icon { background: rgba(59,100,248,0.2); color: #6B8FFF; }

/* Provision form */
.admin-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; margin-top: 8px;
}
.admin-add-btn {
  height: 36px; padding: 0 16px;
  background: var(--accent); color: #fff;
  border-radius: 10px; border: none;
  font-size: 13px; font-weight: 600;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.admin-add-btn:active { opacity: 0.8; }

.provision-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.provision-overlay.open { opacity: 1; pointer-events: auto; }

.provision-sheet {
  width: 100%; max-width: 500px;
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: 24px 24px 0 0;
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
  max-height: 85vh;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
.provision-overlay.open .provision-sheet {
  transform: translateY(0);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.provision-title {
  font-size: 18px; font-weight: 700; color: var(--text-primary);
  text-align: center; margin: 12px 0 16px;
}

.prov-section-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin: 16px 0 8px;
}

.prov-input {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--bg-surface-2);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  font-size: 14px; color: var(--text-primary);
  outline: none; margin-bottom: 8px;
  -webkit-appearance: none;
  transition: border-color var(--t);
}
.prov-input:focus { border-color: var(--accent); }
.prov-select { color: var(--text-secondary); }

.prov-day-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}
.prov-day-label {
  width: 32px; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); flex-shrink: 0;
}
.prov-time-select {
  flex: 1; height: 36px; padding: 0 6px;
  background: var(--bg-surface-2);
  border: 0.5px solid var(--border);
  border-radius: 8px; font-size: 12px;
  color: var(--text-primary);
  appearance: auto !important; -webkit-appearance: auto !important;
  overflow: hidden; outline: none;
}
.prov-time-dash { color: var(--text-muted); font-size: 12px; }

.prov-hours-preview {
  font-size: 12px; color: var(--text-muted);
  background: var(--bg-surface-2);
  padding: 8px 12px; border-radius: 8px;
  margin: 8px 0 4px;
}

.prov-warning {
  font-size: 11px; color: var(--amber);
  margin: -4px 0 8px 2px;
}

.prov-field-error {
  font-size: 11px; color: var(--red);
  margin: -4px 0 8px 2px;
}
.prov-error {
  font-size: 13px; color: var(--red);
  margin: 4px 0 8px;
  min-height: 0;
}

.prov-submit {
  width: 100%; height: 48px;
  background: var(--accent); color: #fff; border: none;
  border-radius: 12px; font-size: 15px; font-weight: 600;
  cursor: pointer; margin-top: 8px;
  -webkit-tap-highlight-color: transparent;
}
.prov-submit:active { opacity: 0.8; }
.prov-submit.prov-green { background: var(--green); }

.prov-cancel {
  width: 100%; height: 44px;
  background: none; color: var(--text-muted);
  border: none; font-size: 14px; font-weight: 500;
  cursor: pointer; margin-top: 4px;
  -webkit-tap-highlight-color: transparent;
}

.prov-confirm-card {
  background: var(--bg-surface-2);
  border-radius: 12px; padding: 14px 16px;
  margin-bottom: 16px;
}
.prov-confirm-row {
  display: flex; justify-content: space-between;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--border);
}
.prov-confirm-row:last-child { border-bottom: none; }
.prov-confirm-label { font-size: 12px; color: var(--text-muted); }
.prov-confirm-value {
  font-size: 12px; color: var(--text-primary); font-weight: 500;
  text-align: right; max-width: 60%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.prov-result-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700;
  margin: 16px auto 12px;
}
.prov-result-icon.green { background: var(--green-bg); color: var(--green); }
.prov-result-icon.red { background: var(--red-bg); color: var(--red); }
.prov-result-sub {
  font-size: 13px; color: var(--text-muted);
  text-align: center; margin-bottom: 20px; line-height: 1.5;
}
.prov-error-text { color: var(--red); }
.provision-loading {
  padding: 40px 0; text-align: center;
  font-size: 14px; color: var(--text-muted);
}

/* Onboarding checklist */
.onboarding-card {
  background: var(--card); border: 0.5px solid var(--border);
  border-radius: 14px; padding: 16px; margin: 0 16px 16px;
  transition: opacity 0.3s ease;
}
.checklist-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.checklist-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.checklist-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.checklist-pct { font-size: 12px; font-weight: 700; color: var(--green); }
.checklist-progress { height: 4px; background: var(--bg-surface-2); border-radius: 2px; margin-bottom: 12px; }
.checklist-progress-fill { height: 4px; border-radius: 2px; background: var(--green); transition: width 0.3s ease; }
.checklist-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 0.5px solid var(--border);
}
.checklist-item:last-of-type { border-bottom: none; }
.checklist-item-content { flex: 1; min-width: 0; }
.checklist-item-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.checklist-item-desc { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.checklist-check {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.checklist-check.done { background: var(--green); border: none; color: #fff; }
.checklist-check.action { background: rgba(59,100,248,0.1); border: 1.5px solid var(--accent); color: var(--accent); }
.checklist-check.pending { background: transparent; border: 1.5px solid var(--border); color: transparent; }
.checklist-action-btn {
  font-size: 11px; font-weight: 600; color: var(--accent);
  background: rgba(59,100,248,0.1); border: 0.5px solid rgba(59,100,248,0.3);
  border-radius: 6px; padding: 4px 10px; flex-shrink: 0;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.checklist-action-btn:active { opacity: 0.7; }
.checklist-dismiss {
  font-size: 11px; color: var(--text-muted); text-align: center;
  margin-top: 10px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.checklist-dismiss:active { color: var(--text-secondary); }
@media (max-width: 480px) { .checklist-item-desc { display: none; } }

/* Services confirm */
.services-title { font-size: 18px; font-weight: 700; color: var(--text-primary); text-align: center; margin: 12px 0 16px; }
.services-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 0.5px solid var(--border);
  font-size: 14px; color: var(--text-primary);
}
.services-row:last-child { border-bottom: none; }
.services-check { color: var(--green); font-size: 14px; font-weight: 700; }

/* Settings hours editor */
.settings-edit-btn {
  font-size: 12px; font-weight: 600; color: var(--accent);
  background: rgba(59,100,248,0.1); border: 0.5px solid rgba(59,100,248,0.3);
  border-radius: 6px; padding: 4px 10px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.settings-edit-btn:active { opacity: 0.7; }

.settings-hours-editor {
  background: var(--bg-surface-2); border: 0.5px solid var(--border);
  border-radius: 12px; padding: 14px; margin-top: 10px;
}
.settings-hours-day-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 0.5px solid var(--border);
}
.settings-hours-day-row:last-of-type { border-bottom: none; }
.settings-hours-day {
  font-size: 12px; font-weight: 600; color: var(--text-primary);
  width: 36px; flex-shrink: 0;
}
.settings-hours-select {
  height: 32px; background: var(--card); border: 0.5px solid var(--border);
  border-radius: 8px; padding: 0 8px; font-size: 12px; color: var(--text-primary);
  outline: none; appearance: auto !important; -webkit-appearance: auto !important;
}
.settings-hours-select:focus { border-color: var(--accent); }
.settings-hours-sep { font-size: 12px; color: var(--text-muted); }
.settings-hours-closed { font-size: 12px; color: var(--text-muted); margin-left: 8px; }
.settings-hours-tz-label {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-bottom: 6px; margin-top: 12px;
}
.settings-hours-tz-select {
  width: 100%; height: 32px; background: var(--card);
  border: 0.5px solid var(--border); border-radius: 8px;
  padding: 0 8px; font-size: 12px; color: var(--text-primary);
  outline: none; appearance: auto !important; -webkit-appearance: auto !important;
}
.settings-hours-preview {
  background: var(--card); border: 0.5px solid var(--border);
  border-radius: 8px; padding: 10px 12px; margin-top: 10px;
}
.settings-hours-preview-label {
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 4px;
}
.settings-hours-preview-text { font-size: 12px; color: var(--text-primary); }
.settings-btn-row { display: flex; gap: 8px; margin-top: 12px; }
.settings-btn-cancel {
  flex: 1; height: 40px; border-radius: 10px;
  background: var(--bg-surface-2); border: 0.5px solid var(--border);
  color: var(--text-muted); font-size: 13px; font-weight: 600;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.settings-btn-save {
  flex: 2; height: 40px; border-radius: 10px;
  background: var(--accent); border: none; color: #fff;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.settings-btn-cancel:active, .settings-btn-save:active { opacity: 0.8; }

/* Settings info editor */
.settings-info-editor {
  background: var(--bg-surface-2); border: 0.5px solid var(--border);
  border-radius: 12px; padding: 14px; margin-top: 10px;
}
.settings-info-field { margin-bottom: 14px; }
.settings-info-field:last-of-type { margin-bottom: 0; }
.settings-info-label {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-bottom: 6px; display: block;
}
.settings-info-input {
  width: 100%; height: 44px; border-radius: 12px;
  border: 0.5px solid var(--border); background: var(--card);
  padding: 0 14px; font-size: 14px; color: var(--text-primary);
  outline: none; box-sizing: border-box;
  -webkit-appearance: none;
}
.settings-info-input:focus { border-color: var(--accent); }
.settings-info-note {
  font-size: 11px; color: var(--text-muted);
  margin-top: 4px; display: block;
}
.settings-info-error {
  font-size: 12px; color: var(--red); margin-top: 8px;
}

/* CSV Export button */
.leads-export-btn {
  height: 32px; padding: 0 12px;
  background: rgba(59,100,248,0.1); border: 0.5px solid rgba(59,100,248,0.3);
  border-radius: 8px; font-size: 12px; font-weight: 600;
  color: var(--accent); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.leads-export-btn:active { opacity: 0.7; }
.leads-export-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Date range pills */
.al-date-filters {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0 16px; margin-bottom: 8px;
}
.al-date-pill {
  padding: 5px 11px; border-radius: 999px;
  border: 0.5px solid var(--border); background: transparent;
  font-size: 13px; color: var(--text-secondary);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color var(--t), background var(--t);
}
.al-date-pill:active { opacity: 0.7; }
.al-date-pill.active {
  border-color: var(--accent); background: var(--accent-light);
  color: var(--accent); font-weight: 500;
}
.al-date-custom-link {
  padding: 4px 10px; border: none; background: transparent;
  font-size: 13px; color: var(--accent); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.al-date-custom-link.active {
  padding: 5px 11px; border-radius: 999px;
  border: 0.5px solid var(--accent); background: var(--accent-light);
  font-weight: 500;
}

/* Custom range picker */
.al-custom-picker {
  padding: 10px 16px; margin-bottom: 8px;
  background: var(--bg-surface-2); border-radius: 10px;
  margin: 0 16px 8px;
}
.al-custom-row { display: flex; gap: 8px; margin-bottom: 8px; }
.al-custom-field { flex: 1; }
.al-custom-label {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  display: block; margin-bottom: 4px;
}
.al-custom-input {
  width: 100%; height: 36px; border-radius: 8px;
  border: 0.5px solid var(--border); background: var(--card);
  padding: 0 8px; font-size: 13px; color: var(--text-primary);
  outline: none; -webkit-appearance: none;
}
.al-custom-input:focus { border-color: var(--accent); }
.al-custom-error {
  font-size: 12px; color: var(--red); margin-bottom: 8px;
}
.al-custom-actions { display: flex; gap: 8px; align-items: center; }
.al-custom-apply {
  padding: 5px 16px; border-radius: 999px;
  border: 0.5px solid var(--accent); background: var(--accent);
  color: #fff; font-size: 13px; font-weight: 500; cursor: pointer;
}
.al-custom-apply:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 480px) {
  .al-custom-row { flex-direction: column; }
}

/* Hours editor C+ hybrid */
.he-day-row {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 0; border-bottom: 0.5px solid var(--border);
}
.he-day-row:last-child { border-bottom: none; }
.he-day-label {
  width: 42px; font-size: 14px; font-weight: 500;
  color: var(--text-primary); flex-shrink: 0;
}
.he-time-group {
  display: flex; align-items: center; gap: 6px; flex: 1;
}
.he-time-control {
  display: inline-flex; align-items: center;
  border: 0.5px solid var(--border); border-radius: 999px;
  overflow: hidden; background: var(--card);
}
.he-time-control.invalid { border-color: var(--red); }
.he-step-btn {
  padding: 6px 12px;
  background: transparent; border: none;
  font-size: 14px; color: var(--text-secondary);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease;
}
.he-step-btn.he-minus { border-right: 0.5px solid var(--border); }
.he-step-btn.he-plus { border-left: 0.5px solid var(--border); }
.he-step-btn:hover { background: var(--bg-surface-2); }
.he-step-btn:active { opacity: 0.5; }
.he-time-display {
  padding: 6px 0; font-size: 13px; font-weight: 500;
  color: var(--text-primary); width: 80px;
  text-align: center; cursor: text;
  -webkit-tap-highlight-color: transparent;
}
.he-time-input {
  width: 80px; border: none; background: transparent;
  font-size: 13px; font-weight: 500; color: var(--text-primary);
  text-align: center; outline: none; padding: 0;
}
.he-sep { font-size: 13px; font-weight: 400; color: var(--text-muted); padding: 0 2px; }
.he-closed-label {
  font-size: 13px; color: var(--text-muted); font-style: italic;
  margin-left: 8px;
}
@media (max-width: 480px) {
  .he-time-group { flex-wrap: wrap; }
}
