/* ============================================
   Guac Lead Plus — Guac Digital brand
   Lime green #E0FF8A — all green
   Light mode only
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* Backgrounds */
  --bg-deep: #FFFFFF;
  --bg-surface: #FFFFFF;
  --bg-card: #F4F4F5;
  --bg-card-hover: #E4E4E7;
  --bg-input: #FFFFFF;
  --bg-input-focus: #FFFFFF;

  /* Guac brand palette */
  --lime: #E0FF8A;
  --lime-dark: #acdb27;
  --lime-medium: #d0f568;
  --lime-light: #E6FFA3;
  --lime-pale: #f4ffe0;
  --lime-bg: #e8ffb5;
  --gold: #fccb3a;

  /* Functional greens (for status badges) */
  --green-600: #16a34a;
  --green-700: #15803d;

  /* Text */
  --text-primary: #0A0A0B;
  --text-secondary: #18181B;
  --text-muted: #52525B;
  --text-accent: #acdb27;

  /* Borders */
  --border-subtle: rgba(0, 0, 0, 0.05);
  --border-default: rgba(0, 0, 0, 0.09);
  --border-focus: rgba(172, 219, 39, 0.5);

  /* Effects */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.1);

  /* Typography */
  --font-display: "Instrument Serif", "Georgia", serif;
  --font-body: "Outfit", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Fira Code", monospace;

  /* Sizing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

/* ---- Reset ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--lime-dark); text-decoration: none; }
a:hover { color: var(--green-700); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D4D4D8; border-radius: 3px; }

/* ============================================
   LAYOUT
   ============================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-deep);
}

/* ── Client Sidebar (light lime gradient) ── */
.app-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #f0ffc7 0%, #e8ffb5 40%, #f0ffc7 100%);
  border-radius: 0 20px 20px 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 8px;
  left: 0;
  bottom: 8px;
  z-index: 100;
  overflow: visible;
  transition: width 0.3s var(--ease-out), transform 0.25s var(--ease-out);
  box-shadow: 4px 0 24px rgba(172,219,39,0.08), inset -1px 0 0 rgba(172,219,39,0.2);
  overflow-y: auto;
  overflow-x: hidden;
}

/* ── Admin Sidebar (dark) ── */
.app-sidebar.admin-sidebar {
  background: linear-gradient(180deg, #0f2918 0%, #0a1f12 50%, #071a0d 100%);
  box-shadow: 4px 0 24px rgba(172,219,39,0.06), inset -1px 0 0 rgba(172,219,39,0.12);
}

/* Brand */
.app-sidebar-brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(172,219,39,0.2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-sidebar .app-sidebar-brand {
  border-bottom-color: rgba(172,219,39,0.15);
}

.app-sidebar-brand-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.app-sidebar-brand-logo img {
  height: 38px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* When the client has a custom logo, render it larger (up to 52px) and replace the
   "LEADS PLUS" tag line with the business name rendered in a soft-uppercase caption.
   If the image 404s, a JS onerror handler adds .logo-failed and we fall back to
   text-only branding so the sidebar never breaks. */
.app-sidebar-brand-logo.client-logo img {
  height: 52px;
  max-height: 52px;
  max-width: 140px;
}
.app-sidebar-brand-logo.client-logo .client-biz {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lime);
  margin-top: 8px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-sidebar-brand-logo.client-logo.logo-failed .client-biz {
  font-size: 13px;
  color: #fff;
  text-transform: none;
  letter-spacing: -0.01em;
  margin-top: 0;
}

.app-sidebar-brand-sub {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--lime-dark);
  margin-top: 4px;
}

.admin-sidebar .app-sidebar-brand-sub {
  color: var(--lime);
}

/* Nav */
.app-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 12px 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-sidebar-nav::-webkit-scrollbar { display: none; }

.app-sidebar-section-label {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 10px 2px;
  opacity: 0.5;
}

.admin-sidebar .app-sidebar-section-label {
  /* Section labels on the dark admin sidebar were barely visible (0.45 alpha white).
     Bumping to full white + 0.7 opacity reads clearly while still feeling secondary
     to the active nav item. Lime tint on hover cue elsewhere in the sidebar. */
  color: #ffffff;
  opacity: 0.78;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 12px 10px 4px;
  border-top: 1px solid rgba(172,219,39,0.22);
  margin-top: 8px;
}

/* Two-section sidebar — Active Client on top (frequency wins), Agency below.
   Active Client header includes a live pill showing what's active so users
   always know what scope every page below is filtered to.
   Agency section gets the divider since it's the secondary group. */
.admin-sidebar .app-sidebar-section-label--client {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--lime-pale);
  opacity: 1;
}
/* When Active Client is the FIRST section in the nav (current layout): no
   top border, tighter spacing — flows directly under the switcher. */
.admin-sidebar .app-sidebar-section-label--client-top {
  border-top: none;
  margin-top: 0;
  padding-top: 4px;
}
.admin-sidebar .app-sidebar-section-label--agency {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 14px;
  padding-top: 14px;
  color: #ffffff;
  opacity: 0.78;
}
.sb-scope-pill {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  background: rgba(172,219,39,0.16);
  color: var(--lime-pale);
  border: 1px solid rgba(172,219,39,0.34);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-scope-pill[data-active="true"] {
  background: var(--lime-dark);
  color: #1a1a1a;
  border-color: var(--lime-dark);
}

/* "Viewing: <Client>" header badge — rendered into every account-scoped page
   header by base.html so the user always knows what scope they're looking at. */
.scope-banner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  background: var(--lime-pale);
  border: 1px solid var(--lime-dark);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -.005em;
  vertical-align: middle;
  font-family: var(--font-body);
}
.scope-banner-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--lime-dark); color: #1a1a1a;
  font-size: 9px; font-weight: 800;
  flex-shrink: 0;
}
.scope-banner-label { color: var(--text-muted); font-weight: 500; margin-right: 2px; }
.scope-banner.is-aggregate {
  background: #f3f4f6; border-color: #d1d5db; color: #52525b;
}
.scope-banner.is-aggregate .scope-banner-avatar {
  background: #6b7280; color: #fff;
}

.app-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: #3f3f46;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.app-sidebar-link:hover {
  background: rgba(172,219,39,0.15);
  color: var(--text-primary);
}

.app-sidebar-link.active {
  background: linear-gradient(135deg, var(--lime-dark), var(--lime-medium));
  color: #1a1a1a !important;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(172,219,39,0.35);
}

.app-sidebar-link svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  opacity: 0.6;
  color: #52525B;
}

.app-sidebar-link:hover svg { opacity: 0.9; }
.app-sidebar-link.active svg { opacity: 1 !important; color: #1a1a1a !important; }

/* Admin sidebar links */
.admin-sidebar .app-sidebar-link {
  color: rgba(255,255,255,0.85);
}
.admin-sidebar .app-sidebar-link:hover {
  background: rgba(172,219,39,0.1);
  color: #fff;
}
.admin-sidebar .app-sidebar-link.active {
  background: linear-gradient(135deg, var(--lime-dark), var(--lime-medium));
  color: #1a1a1a !important;
  box-shadow: 0 2px 12px rgba(172,219,39,0.35);
}
.admin-sidebar .app-sidebar-link svg { color: var(--lime); opacity: 0.7; }
.admin-sidebar .app-sidebar-link:hover svg { opacity: 0.9; color: var(--lime-medium); }
.admin-sidebar .app-sidebar-link.active svg { color: #1a1a1a !important; opacity: 1 !important; }

/* Footer / user */
.app-sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid rgba(172,219,39,0.15);
}

.admin-sidebar .app-sidebar-footer {
  border-top-color: rgba(172,219,39,0.12);
}

.app-sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--lime-dark);
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.admin-sidebar .app-sidebar-user-avatar {
  background: var(--lime-dark);
  color: #1a1a1a;
}

.app-sidebar-user-info { flex: 1; min-width: 0; }

.app-sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sidebar .app-sidebar-user-name { color: #fff; }

.app-sidebar-user-email {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sidebar .app-sidebar-user-email { color: rgba(255,255,255,0.6); }

.btn-logout {
  display: block;
  width: 100%;
  padding: 7px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0,0,0,0.08);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  background: none;
  transition: all 0.15s;
  font-family: var(--font-body);
  margin-top: 8px;
  text-decoration: none;
}

.btn-logout:hover {
  background: rgba(0,0,0,0.04);
  color: var(--text-primary);
}

.admin-sidebar .btn-logout {
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.15);
}
.admin-sidebar .btn-logout:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

/* ── Main ── */
.app-main {
  flex: 1;
  margin-left: 220px;
  min-height: 100vh;
  padding: 8px 0 0 0;
  transition: margin-left 0.3s var(--ease-out);
  /* Hard cap so children can never make the page horizontally scroll */
  min-width: 0;
  max-width: calc(100vw - 220px);
  overflow-x: hidden;
}
@media (max-width: 768px) {
  .app-main { max-width: 100vw; }
}

.page-header {
  padding: 24px 24px 0;
}
@media (max-width: 1100px) {
  .page-header { padding: 20px 16px 0; }
}

.page-header h2 {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}

.page-content {
  padding: 20px 24px 40px;
  /* Hard cap: never exceed the available width inside the main column.
     Children (cards, tables) inherit this constraint via min-width:0. */
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;  /* prevents the page itself from scrolling sideways */
}
@media (max-width: 1100px) {
  .page-content { padding: 16px 16px 32px; }
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1.5px solid #d4d4d8;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: all 0.2s var(--ease-out);
}

.card:hover {
  border-color: var(--lime-dark);
  box-shadow: 0 4px 12px rgba(172,219,39,0.15), 0 1px 4px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body { padding: 20px; }

/* ============================================
   STAT CARDS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1.5px solid #d4d4d8;
  padding: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: all 0.2s var(--ease-out);
}

.stat-card:hover {
  border-color: var(--lime-dark);
  box-shadow: 0 4px 12px rgba(172,219,39,0.15), 0 1px 4px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.stat-card .stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card .stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.stat-card .stat-change { font-size: 11px; margin-top: 4px; font-weight: 500; }
.stat-card .stat-change.up { color: var(--green-600); }
.stat-card .stat-change.down { color: #ef4444; }

.stat-card.accent {
  background: linear-gradient(135deg, var(--lime-dark) 0%, var(--lime-medium) 100%);
  border-color: transparent;
  color: #1a1a1a;
  box-shadow: 0 4px 16px rgba(172,219,39,0.3);
}

.stat-card.accent .stat-label { color: rgba(0,0,0,0.5); }
.stat-card.accent .stat-value { color: #1a1a1a; }

/* Admin accent card */
.admin-accent {
  background: linear-gradient(135deg, var(--lime-dark) 0%, var(--lime-medium) 100%) !important;
  color: #1a1a1a !important;
  box-shadow: 0 4px 16px rgba(172,219,39,0.3) !important;
}
.admin-accent .stat-label { color: rgba(0,0,0,0.5) !important; }
.admin-accent .stat-value { color: #1a1a1a !important; }

/* ============================================
   LEAD CARDS
   ============================================ */
.leads-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lead-card {
  background: var(--bg-surface);
  border: 1.5px solid #d4d4d8;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s var(--ease-out);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.lead-card:hover {
  border-color: var(--lime-dark);
  box-shadow: 0 4px 12px rgba(172,219,39,0.15), 0 1px 4px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.lead-card.new {
  border-left: 4px solid var(--lime-dark);
  background: linear-gradient(90deg, var(--lime-pale) 0%, var(--bg-surface) 15%);
  animation: leadPulse 2s ease-out;
}

@keyframes leadPulse {
  0% { background: var(--lime-pale); box-shadow: 0 0 0 0 rgba(172,219,39,0.2); }
  70% { box-shadow: 0 0 0 8px rgba(172,219,39,0); }
  100% { background: var(--bg-surface); }
}

.lead-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lime-dark), var(--lime-medium));
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(172,219,39,0.25);
}

.lead-info { flex: 1; min-width: 0; }

.lead-name { font-weight: 700; font-size: 15px; color: var(--text-primary); }

.lead-detail {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-meta { text-align: right; flex-shrink: 0; }

.lead-cost {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.lead-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ============================================
   UNIFIED PILL SYSTEM
   One shape/size for every badge across admin + client.
   Variants: .lead-source / .status-badge / .call-quality-pill / .call-booked-pill
   ============================================ */
.lead-source {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.5;
  border: 1px solid transparent;
  white-space: nowrap;
}
/* Brand-color icons render at full color (google/meta/bing SVGs have their own fills).
   Monochrome icons (call/form/direct/etc.) inherit the badge's text color via currentColor. */
.lead-source-ic { width:14px; height:14px; flex-shrink:0; }

.lead-source.google, .lead-source.google_ads, .lead-source.google_organic { background: #dcfce7; color: #166534; border-color: #86efac; }
.lead-source.meta, .lead-source.meta_ads, .lead-source.meta_organic { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.lead-source.bing, .lead-source.bing_ads, .lead-source.bing_organic { background: #fff7ed; color: #c2410c; border-color: #fdba74; }
.lead-source.call { background: #fce7f3; color: #be185d; border-color: #f9a8d4; }
.lead-source.call_ai_agent, .lead-source.ai_agent {
  background: linear-gradient(135deg, #f3f0ff 0%, #e4defc 100%);
  color: #4f3fcc;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: inset 0 0 0 1px rgba(124,106,255,.28), 0 1px 2px rgba(124,106,255,.08);
}
/* Breathing outer ring + faint sparkle twinkle on the AI Agent source icon */
.lead-source.call_ai_agent .lead-source-ic .lead-src-ai-ring,
.lead-source.ai_agent .lead-source-ic .lead-src-ai-ring {
  transform-origin: 12px 12px;
  animation: lead-src-ai-breath 2.8s ease-in-out infinite;
}
.lead-source.call_ai_agent .lead-source-ic .lead-src-ai-spark,
.lead-source.ai_agent .lead-source-ic .lead-src-ai-spark {
  transform-origin: 19px 5.75px;
  animation: lead-src-ai-spark 3.6s ease-in-out infinite;
}
@keyframes lead-src-ai-breath { 0%, 100% { opacity: .5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes lead-src-ai-spark  { 0%, 48%, 100% { opacity: 1; transform: scale(1); } 60% { opacity: .35; transform: scale(.72); } }
@media (prefers-reduced-motion: reduce) {
  .lead-source.call_ai_agent .lead-source-ic *, .lead-source.ai_agent .lead-source-ic * { animation: none; }
}

/* Recording column — Transcript pill (for AI calls with no audio) */
.mini-transcript-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: #4f3fcc;
  background: linear-gradient(135deg, #f3f0ff 0%, #e9e4ff 100%);
  border: 1px solid #ddd8ff;
  border-radius: 999px;
  padding: 5px 11px 5px 9px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.mini-transcript-btn:hover { background: #eae4ff; border-color: #c7bfff; box-shadow: 0 2px 6px rgba(124,106,255,.2); }
.mini-transcript-btn svg { width: 12px; height: 12px; flex-shrink: 0; }
/* Chat-widget variant — same shape, blue palette instead of purple */
.mini-transcript-btn.is-chat {
  color: #1e40af;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #bfdbfe;
}
.mini-transcript-btn.is-chat:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  box-shadow: 0 2px 6px rgba(59,130,246,.22);
}
.mini-transcript-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: #7c6aff;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
}
.lead-source.form { background: var(--lime-pale); color: #52600a; border-color: var(--lime-dark, #acdb27); }
.lead-source.chat_widget { background: #e0f2fe; color: #075985; border-color: #7dd3fc; }
.lead-source.direct { background: #f4f4f5; color: #52525b; border-color: #d4d4d8; }
.lead-source.referral { background: #f3e8ff; color: #6b21a8; border-color: #d8b4fe; }
.lead-source.organic { background: #ecfdf5; color: #047857; border-color: #6ee7b7; }
.lead-source.email { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.lead-source.linkedin, .lead-source.linkedin_ads { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.lead-source.tiktok, .lead-source.tiktok_ads { background: #fce7f3; color: #be185d; border-color: #f9a8d4; }
.lead-source.youtube, .lead-source.youtube_ads { background: #fef2f2; color: #dc2626; border-color: #fca5a5; }
.lead-source.paid { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.lead-source.manual { background: #f4f4f5; color: #52525b; border-color: #d4d4d8; }
.lead-source.ghl { background: #fef3c7; color: #92400e; border-color: #fcd34d; }

/* ============================================
   STAGE PILL — unified lead status with dropdown edit
   ============================================ */
.stage-pill-wrap { position: relative; display: inline-block; }
.stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 9px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.5;
  border: 1px solid transparent;
  cursor: pointer;
  transition: box-shadow .12s, transform .08s;
}
.stage-pill:hover { box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.stage-pill:active { transform: scale(.97); }
.stage-pill-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.stage-pill-ai {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(124,106,255,.18);
  color: #4f3fcc;
  line-height: 1.3;
  margin-left: 1px;
}
.stage-pill-caret { display: flex; align-items: center; opacity: .55; margin-left: -1px; }
.stage-pill:hover .stage-pill-caret { opacity: 1; }

.stage-pill-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1.5px solid #e4e4e7;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  padding: 4px;
  z-index: 90;
  min-width: 130px;
}
.stage-pill-menu.is-open { display: block; }
.stage-pill-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #1a1a1a;
  cursor: pointer;
  text-align: left;
  transition: background .1s;
}
.stage-pill-opt:hover { background: #f4f4f5; }
.stage-pill-opt.is-selected { background: #fafafa; }
.stage-pill-opt-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ============================================
   STATUS BADGES — matches the pill system above (same shape, size, dot).
   Applied to: leads tables, lead detail popup, dashboards, reports.
   ============================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.5;
  border: 1px solid transparent;
  white-space: nowrap;
}
.status-badge::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,.55);
}
.status-badge.new       { background: #f0fdc4; color: #3f6212; border-color: #bef264; }
.status-badge.new::before       { background: #84cc16; }
.status-badge.contacted { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.status-badge.contacted::before { background: #3b82f6; }
.status-badge.won       { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.status-badge.won::before       { background: #10b981; animation: pillPulseWon 2.4s ease-in-out infinite; }
.status-badge.lost      { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.status-badge.lost::before      { background: #ef4444; }
.status-badge.no_answer { background: #ede9fe; color: #5b21b6; border-color: #c4b5fd; }
.status-badge.no_answer::before { background: #8b5cf6; }
.status-badge.spam      { background: #f4f4f5; color: #52525b; border-color: #d4d4d8; }
.status-badge.spam::before      { background: #a1a1aa; }

/* Won status pulses — a tiny celebration signal on the dashboard */
@keyframes pillPulseWon {
  0%,100% { box-shadow: 0 0 0 2px rgba(255,255,255,.55), 0 0 0 0 rgba(16,185,129,.55); }
  50%     { box-shadow: 0 0 0 2px rgba(255,255,255,.55), 0 0 0 4px rgba(16,185,129,0); }
}

/* Global date picker — Today / Yesterday / 7D / 30D / 90D / All / Custom.
   Uses the same pill-in-a-gradient-bar pattern as .filters-bar so every page
   (Leads, Dashboard, Campaigns, Reports, etc.) has a consistent look. */
.gp-date-wrap, [id$="DatePicker"] {
  padding: 6px; border-radius: 14px; gap: 4px !important;
  background:
    radial-gradient(90% 140% at 0% 0%, rgba(172,219,39,.10) 0%, transparent 55%),
    radial-gradient(90% 140% at 100% 100%, rgba(124,106,255,.14) 0%, transparent 55%),
    linear-gradient(180deg, #fff 0%, #fcfbff 100%);
  border: 1.5px solid rgba(124,106,255,.32);
  box-shadow: 0 3px 12px rgba(124,106,255,.09), 0 1px 2px rgba(0,0,0,.03);
  width: fit-content; max-width: 100%;
}
.gp-date {
  padding: 8px 14px; border-radius: 10px; font-size: 12.5px; font-weight: 600;
  font-family: var(--font-body); border: none; background: transparent;
  color: var(--text-muted); cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
  display: inline-flex; align-items: center; letter-spacing: -.01em; white-space: nowrap;
}
.gp-date:hover:not(.active) {
  color: var(--text-primary); background: rgba(255,255,255,.75);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.gp-date.active {
  background: linear-gradient(135deg, #c5eb5c 0%, var(--lime-dark, #acdb27) 100%);
  color: #1a1a1a; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 2px 8px rgba(172,219,39,.32);
}
.gp-cust-panel {
  display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 50;
  background: #fff; border: 1.5px solid #e4e4e7; border-radius: 12px;
  padding: 16px 20px; box-shadow: 0 8px 30px rgba(0,0,0,.12); min-width: 340px;
}
.gp-cust-panel.open { display: block; }
.gp-cust-input {
  width: 100%; font-size: 13px; font-family: var(--font-body); padding: 9px 12px;
  border: 1.5px solid #e4e4e7; border-radius: 8px; background: #fff; color: var(--text-primary);
}
.gp-cust-input:focus { border-color: var(--lime-dark); outline: none; box-shadow: 0 0 0 3px rgba(172,219,39,.15); }
.gp-cust-apply {
  padding: 9px 18px; border-radius: 8px; font-size: 12px; font-weight: 700;
  font-family: var(--font-body); border: none; background: var(--lime-dark); color: #1a1a1a;
  cursor: pointer; white-space: nowrap;
}
.gp-cust-apply:hover { background: var(--lime-medium); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  min-height: 38px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.005em;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  text-align: center;
  white-space: nowrap;
  transition: all 0.15s var(--ease-out);
}
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: linear-gradient(135deg, var(--lime-dark) 0%, var(--lime-medium) 100%);
  color: #1a1a1a;
  box-shadow: 0 1px 2px rgba(172,219,39,0.3);
  font-weight: 600;
}

.btn-primary:hover {
  box-shadow: 0 2px 8px rgba(172,219,39,0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  color: var(--text-secondary);
  border: 1.5px solid rgba(124,106,255,.28);
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: -.01em;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}

.btn-secondary:hover {
  background: rgba(124,106,255,.06);
  border-color: rgba(124,106,255,.5);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(124,106,255,.1);
}

.btn-sm { padding: 7px 14px; min-height: 32px; font-size: 12.5px; border-radius: 10px; }

.btn-call {
  background: var(--lime-dark);
  color: #1a1a1a;
  border-radius: 8px;
  padding: 8px 20px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(172,219,39,0.3);
}

.btn-call:hover {
  background: var(--lime-medium);
  box-shadow: 0 4px 12px rgba(172,219,39,0.3);
  color: #1a1a1a !important;
}

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 14px; }

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--bg-input);
  color: var(--text-primary);
}

.form-input:focus {
  outline: none;
  border-color: var(--lime-dark);
  box-shadow: 0 0 0 3px rgba(172,219,39,0.12);
}

.form-select {
  width: 100%;
  padding: 10px 36px 10px 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  background: var(--bg-input);
  cursor: pointer;
  color: var(--text-primary);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2371717a' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.form-select:focus {
  outline: none;
  border-color: var(--lime-dark);
  box-shadow: 0 0 0 3px rgba(172,219,39,0.12);
}

/* Toggle Switch (global) */
.toggle-switch, .ntf-switch, .fb-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input, .ntf-switch input, .fb-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-slider, .ntf-slider, .fb-slider {
  position: absolute;
  inset: 0;
  background: #d4d4d8;
  border-radius: 24px;
  cursor: pointer;
  transition: background .2s;
}
.toggle-slider::before, .ntf-slider::before, .fb-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.toggle-switch input:checked + .toggle-slider,
.ntf-switch input:checked + .ntf-slider,
.fb-switch input:checked + .fb-slider {
  background: var(--lime-dark);
}
.toggle-switch input:checked + .toggle-slider::before,
.ntf-switch input:checked + .ntf-slider::before,
.fb-switch input:checked + .fb-slider::before {
  transform: translateX(20px);
}

/* ============================================
   FILTERS
   ============================================ */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* ============================================
   Compact filter dropdowns — used on Leads page to keep the filter row tidy.
   Each button shows "Label: Value ▾" and opens a small panel of options.
   ============================================ */
.filter-drop { position: relative; display: inline-block; }
.filter-drop-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 10px 8px 14px; border-radius: 10px;
  border: 1.5px solid rgba(124,106,255,.28);
  background: #fff; cursor: pointer;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600;
  color: #1a1a1a; letter-spacing: -.01em; white-space: nowrap;
  transition: border-color .15s, background .15s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.filter-drop-btn:hover { border-color: rgba(124,106,255,.5); background: rgba(124,106,255,.06); box-shadow: 0 2px 8px rgba(124,106,255,.1); }
.filter-drop-btn.has-value {
  border-color: var(--lime-dark, #acdb27);
  background: var(--lime-pale, #f4ffe0);
  color: #1a1a1a;
}
.filter-drop-btn-label { color: #71717a; font-weight: 500; }
.filter-drop-btn.has-value .filter-drop-btn-label { color: #52600a; }
.filter-drop-btn-value { color: inherit; font-weight: 700; }
.filter-drop-btn-caret { margin-left: 2px; opacity: .55; display: inline-flex; transition: transform .15s; }
.filter-drop.is-open .filter-drop-btn-caret { transform: rotate(180deg); }
.filter-drop-btn-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 2px; flex-shrink: 0;
}

.filter-drop-panel {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 220px; max-height: 360px; overflow-y: auto;
  background: #fff;
  border: 1.5px solid rgba(124,106,255,.28);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0,0,0,.14), 0 4px 10px rgba(0,0,0,.05);
  padding: 6px;
  z-index: 500;
  display: none;
  animation: filterDropIn .16s cubic-bezier(.4,0,.2,1);
}
.filter-drop.is-open .filter-drop-panel { display: block; }
@keyframes filterDropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.filter-drop-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 500;
  color: #1a1a1a; letter-spacing: -.01em;
  cursor: pointer;
  transition: background .1s;
  border: none; background: transparent; width: 100%; text-align: left;
}
.filter-drop-opt:hover { background: rgba(124,106,255,.08); }
.filter-drop-opt.is-selected {
  background: var(--lime-pale, #f4ffe0); color: #1a1a1a; font-weight: 700;
}
.filter-drop-opt-check {
  margin-left: auto; color: var(--lime-dark, #acdb27);
  opacity: 0; flex-shrink: 0;
}
.filter-drop-opt.is-selected .filter-drop-opt-check { opacity: 1; }

/* ============================================
   Call Intelligence — HOT/WARM/COLD/SPAM quality tier badges + detail card.
   Used on the Leads page "Quality" column + the lead-detail "Call Intelligence"
   card. Same visual language as the chat-widget/AI-agent transcript cards.
   ============================================ */
.call-quality-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px 3px 8px; border-radius: 999px;
  font-family: var(--font-body);
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; line-height: 1.5;
  border: 1px solid transparent; white-space: nowrap;
}
.call-quality-pill .cq-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,.55);
}
.call-quality-pill .cq-score {
  font-size: 9.5px; font-weight: 700; opacity: .75;
  margin-left: 2px;
}
.call-quality-pill.tier-hot   { background:#dcfce7; color:#166534; border-color:#86efac; }
.call-quality-pill.tier-hot   .cq-dot { background:#22c55e; animation: cq-pulse 2s ease-in-out infinite; }
.call-quality-pill.tier-warm  { background:#fef3c7; color:#92400e; border-color:#fcd34d; }
.call-quality-pill.tier-warm  .cq-dot { background:#f59e0b; }
.call-quality-pill.tier-cold  { background:#f1f5f9; color:#475569; border-color:#cbd5e1; }
.call-quality-pill.tier-cold  .cq-dot { background:#94a3b8; }
.call-quality-pill.tier-spam  { background:#fee2e2; color:#991b1b; border-color:#fca5a5; }
.call-quality-pill.tier-spam  .cq-dot { background:#dc2626; }

/* BOOKED chip — shown inline with the quality pill when an appointment was accepted.
   Matches the unified pill system: same radius + font metrics as status + quality.
   Uses flex-gap from the parent wrapper instead of margin-left so the layout
   stays clean when the chip wraps to a new line in a narrow column. */
.call-booked-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; line-height: 1.5;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  border: 1px solid #6ee7b7;
  box-shadow: 0 1px 3px rgba(16,185,129,.25), inset 0 0 0 1px rgba(255,255,255,.4);
  white-space: nowrap;
}
.call-booked-pill svg { width: 10px; height: 10px; flex-shrink: 0; }
/* Parent container that holds Quality pill + BOOKED pill.
   flex-wrap handles the case where both don't fit on one line in a narrow
   column — they stack neatly with a consistent 4px vertical gap. */
.call-pill-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
@keyframes cq-pulse {
  0%,100% { transform: scale(1); opacity: 1; }
  50%     { transform: scale(1.3); opacity: .6; }
}

/* Call intelligence card shown at the top of a voice lead's detail popup */
.call-intel-card {
  position: relative;
  background:
    radial-gradient(90% 140% at 0% 0%, rgba(172,219,39,.08) 0%, transparent 55%),
    radial-gradient(90% 140% at 100% 100%, rgba(124,106,255,.12) 0%, transparent 55%),
    linear-gradient(180deg, #fff 0%, #fcfbff 100%);
  border: 1.5px solid rgba(124,106,255,.28);
  border-radius: 18px; padding: 20px 22px; margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(124,106,255,.06);
}
.call-intel-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.call-intel-label { font-size: 11px; font-weight: 800; color: #4f3fcc; text-transform: uppercase; letter-spacing: .07em; display: flex; align-items: center; gap: 6px; }
.call-intel-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #7c6aff; box-shadow: 0 0 0 3px rgba(124,106,255,.2); }
.call-intel-summary { font-size: 14px; line-height: 1.5; color: #1a1a1a; font-weight: 600; letter-spacing: -.01em; margin-bottom: 14px; }
.call-intel-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 16px; margin-bottom: 14px; }
.call-intel-fact { display: flex; flex-direction: column; gap: 2px; }
.call-intel-fact-l { font-size: 10px; font-weight: 800; color: #71717a; text-transform: uppercase; letter-spacing: .06em; }
.call-intel-fact-v { font-size: 13px; font-weight: 600; color: #1a1a1a; letter-spacing: -.01em; }
.call-intel-points { display: flex; flex-direction: column; gap: 8px; }
.call-intel-point {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; line-height: 1.55; color: #1a1a1a;
  padding: 10px 14px 10px 12px;
  background: linear-gradient(90deg, rgba(172,219,39,.14) 0%, rgba(172,219,39,.04) 100%);
  border: 1px solid rgba(172,219,39,.35);
  border-radius: 10px;
  position: relative;
  transition: transform .15s, box-shadow .15s;
}
.call-intel-point:hover { transform: translateX(2px); box-shadow: 0 2px 8px rgba(172,219,39,.18); }
.call-intel-point-num {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, #c5eb5c, var(--lime-dark, #acdb27));
  color: #1a1a1a;
  font-size: 11px; font-weight: 800;
  box-shadow: 0 1px 3px rgba(172,219,39,.4), inset 0 1px 0 rgba(255,255,255,.5);
  margin-top: 1px;
}
.call-intel-point-text { flex: 1; padding-top: 1px; }

/* Red flag variant — salmon gradient + warning triangle icon */
.call-intel-point.red {
  background: linear-gradient(90deg, rgba(239,68,68,.10) 0%, rgba(239,68,68,.03) 100%);
  border-color: rgba(239,68,68,.28);
}
.call-intel-point.red:hover { box-shadow: 0 2px 8px rgba(239,68,68,.2); }
.call-intel-point-icon-warn {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, #fca5a5, #ef4444);
  color: #fff;
  box-shadow: 0 1px 3px rgba(239,68,68,.4), inset 0 1px 0 rgba(255,255,255,.35);
  margin-top: 1px;
}
.call-intel-point-icon-warn svg { width: 12px; height: 12px; }

/* Section headings — pill style matching the rest of the card */
.call-intel-section-t {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 800; color: #52525b;
  text-transform: uppercase; letter-spacing: .08em;
  margin: 16px 0 10px;
  padding: 4px 10px 4px 8px;
  background: #f4f4f5;
  border-radius: 999px;
}
.call-intel-section-t.red {
  background: rgba(239,68,68,.09); color: #991b1b;
}
.call-intel-section-t-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  background: #18181b; color: #fff;
}
.call-intel-section-t.red .call-intel-section-t-icon {
  background: #dc2626;
}
.call-intel-section-t-icon svg { width: 8px; height: 8px; }

/* Next Best Action — prominent action card */
.call-intel-nba {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 14px 0 18px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1.5px solid #f59e0b;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(245,158,11,.18);
}
.call-intel-nba-icon {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 2px 6px rgba(245,158,11,.35), inset 0 1px 0 rgba(255,255,255,.4);
}
.call-intel-nba-icon svg { width: 16px; height: 16px; }
.call-intel-nba-wrap { flex: 1; }
.call-intel-nba-lbl {
  font-size: 10px; font-weight: 800; color: #92400e;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 3px;
}
.call-intel-nba-tx {
  font-size: 14px; font-weight: 600; color: #78350f;
  line-height: 1.5; letter-spacing: -.01em;
}

/* Signal chips — buy/stall/competitor quotes pulled straight from the call */
.call-intel-signals { display: flex; flex-direction: column; gap: 6px; }
.call-intel-signal {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 12px;
  font-size: 12.5px; line-height: 1.45; color: #1a1a1a;
  border-radius: 8px;
  border: 1px solid transparent;
  font-style: italic;
}
.call-intel-signal-ic {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  margin-top: 1px;
}
.call-intel-signal-ic svg { width: 10px; height: 10px; }
.call-intel-signal.buy {
  background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.22); color: #064e3b;
}
.call-intel-signal.buy .call-intel-signal-ic { background: #10b981; color: #fff; }
.call-intel-signal.stall {
  background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.25); color: #78350f;
}
.call-intel-signal.stall .call-intel-signal-ic { background: #f59e0b; color: #fff; }
.call-intel-signal.comp {
  background: rgba(124,106,255,.08); border-color: rgba(124,106,255,.25); color: #4f3fcc;
}
.call-intel-signal.comp .call-intel-signal-ic { background: #7c6aff; color: #fff; }

/* "Show more insights" toggle — collapsible footer for the deep-dive sections */
.call-intel-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 7px 14px 7px 12px;
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  letter-spacing: -.01em; color: #4f3fcc;
  background: transparent;
  border: 1.5px solid rgba(124,106,255,.28);
  border-radius: 999px; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.call-intel-toggle:hover {
  background: rgba(124,106,255,.06);
  border-color: rgba(124,106,255,.5);
  box-shadow: 0 2px 8px rgba(124,106,255,.1);
}
.call-intel-toggle svg {
  width: 12px; height: 12px; transition: transform .2s cubic-bezier(.4,0,.2,1);
}
.call-intel-toggle.is-open svg { transform: rotate(180deg); }
.call-intel-details {
  display: none;
  margin-top: 12px; padding-top: 14px;
  border-top: 1px dashed rgba(124,106,255,.22);
  animation: ciFadeDown .22s cubic-bezier(.4,0,.2,1);
}
.call-intel-details.is-open { display: block; }
@keyframes ciFadeDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Coaching tip — subtle lavender card at the bottom */
.call-intel-coach {
  display: flex; align-items: flex-start; gap: 12px;
  margin-top: 18px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #ede9fe 0%, #f5f3ff 100%);
  border: 1.5px solid #c4b5fd;
  border-radius: 12px;
}
.call-intel-coach-ic {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: #7c6aff; color: #fff;
  box-shadow: 0 2px 6px rgba(124,106,255,.3);
}
.call-intel-coach-ic svg { width: 14px; height: 14px; }
.call-intel-coach-wrap { flex: 1; }
.call-intel-coach-lbl {
  font-size: 10px; font-weight: 800; color: #6d28d9;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 3px;
}
.call-intel-coach-tx {
  font-size: 13px; font-weight: 500; color: #4c1d95;
  line-height: 1.5; letter-spacing: -.01em;
}

/* Segmented-pill container — groups filter chips on a soft gradient bar.
   Shared across admin + client: Leads, Dashboard, Campaigns, etc. */
.filters-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 6px;
  border-radius: 14px;
  background:
    radial-gradient(90% 140% at 0% 0%, rgba(172,219,39,.10) 0%, transparent 55%),
    radial-gradient(90% 140% at 100% 100%, rgba(124,106,255,.14) 0%, transparent 55%),
    linear-gradient(180deg, #fff 0%, #fcfbff 100%);
  border: 1.5px solid rgba(124,106,255,.32);
  box-shadow: 0 3px 12px rgba(124,106,255,.09), 0 1px 2px rgba(0,0,0,.03);
  width: fit-content;
  max-width: 100%;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: background .15s, color .15s, box-shadow .15s;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.filter-chip:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255,255,255,.75);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.filter-chip.active {
  background: linear-gradient(135deg, #c5eb5c 0%, var(--lime-dark, #acdb27) 100%);
  color: #1a1a1a;
  font-weight: 700;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.45),
    0 2px 8px rgba(172,219,39,.32);
}

/* ============================================
   TABLE
   ============================================ */
.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  /* Force the horizontal scrollbar to always be visible so users know they
     can scroll to see clipped columns (macOS hides scrollbars by default). */
  scrollbar-width: thin;
  scrollbar-color: rgba(124,106,255,.35) transparent;
}
.table-wrap::-webkit-scrollbar { height: 10px; background: transparent; }
.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(124,106,255,.35);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.table-wrap::-webkit-scrollbar-thumb:hover { background: rgba(124,106,255,.55); background-clip: padding-box; border: 2px solid transparent; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }

/* Tables fill their container but can grow beyond it when content demands more
   room (the parent .table-wrap has overflow-x:auto to provide a horizontal
   scroll when that happens). Without min-width the browser squeezes columns
   into a fixed 100% width and clips the last column on wide screens. */
table { min-width: 100%; border-collapse: collapse; }

th {
  text-align: left;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-default);
}

td {
  padding: 11px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

tr:hover td { background: var(--bg-card); }

.margin-positive { color: var(--green-600); font-weight: 600; }
.margin-negative { color: #ef4444; font-weight: 600; }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-default);
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 { font-size: 16px; font-weight: 600; }

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  transition: all 0.15s;
}

.modal-close:hover { background: var(--bg-card-hover); }

.modal-body { padding: 22px; }

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.modal-footer .btn { min-width: 110px; }
.modal-footer .btn-primary,
.btn.btn-block { padding-left: 22px; padding-right: 22px; }
.btn.btn-block { width: 100%; min-height: 44px; font-size: 14px; }

/* ============================================
   LEAD DETAIL
   ============================================ */
.lead-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.lead-detail-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--lime-pale);
  color: #52600a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
}

.lead-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.lead-detail-field {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.lead-detail-field .field-label { font-size: 12px; color: var(--text-muted); }
.lead-detail-field .field-value { font-size: 13px; font-weight: 500; color: var(--text-primary); }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state svg { width: 40px; height: 40px; color: var(--text-muted); opacity: 0.3; margin-bottom: 12px; }
.empty-state h3 { font-size: 15px; color: var(--text-secondary); margin-bottom: 4px; }
.empty-state p { font-size: 13px; color: var(--text-muted); }

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
}

.pagination button {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--text-secondary);
}

.pagination button.active {
  background: var(--lime-dark);
  color: #1a1a1a;
  border-color: transparent;
  font-weight: 600;
}

.pagination button:hover:not(.active) { background: var(--bg-card); }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--lime-pale) 0%, #fff 50%, var(--lime-pale) 100%);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px;
  border: 1px solid var(--border-default);
}

.login-card .brand { text-align: center; margin-bottom: 28px; }

.login-card .brand h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
}

.login-card .brand h1 span { color: var(--lime-dark); }

.login-card .brand p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.login-error {
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  color: #dc2626;
  font-size: 12px;
  margin-bottom: 14px;
}

.login-btn {
  width: 100%;
  padding: 11px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--lime-dark) 0%, var(--lime-medium) 100%);
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s;
  box-shadow: 0 2px 8px rgba(172,219,39,0.3);
}

.login-btn:hover {
  box-shadow: 0 4px 12px rgba(172,219,39,0.4);
  transform: translateY(-1px);
}

/* ============================================
   LANDING PAGE
   ============================================ */
.landing-page { min-height: 100vh; background: #fff; }

.landing-hero {
  padding: 80px 20px 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--lime-pale) 0%, #fff 100%);
}

.landing-hero h1 {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  max-width: 600px;
  margin: 0 auto;
}

.landing-hero p {
  font-size: 17px;
  color: var(--text-muted);
  margin-top: 12px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.landing-form-wrap {
  max-width: 440px;
  margin: 36px auto 0;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  border: 1px solid var(--border-default);
}

.landing-form-wrap h2 { font-size: 18px; font-weight: 600; margin-bottom: 18px; text-align: center; }

.landing-trust {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 28px;
  color: var(--text-muted);
  font-size: 12px;
}

.landing-trust span { display: flex; align-items: center; gap: 5px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s var(--ease-out);
    border-radius: 0;
    top: 0; bottom: 0;
    z-index: 200;
  }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; padding-top: 56px; /* room for mobile-toggle */ }
  .page-header { padding: 16px 16px 0; }
  .page-content { padding: 12px 16px 32px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  /* Anything that pretends to be a multi-column flex/grid by inline style
     should still flow correctly on small screens — most pages use
     flex-wrap:wrap, but tables and forms can blow out without help. */
  .form-group, .form-row { width: 100%; }
  .modal-content, .modal-card { width: calc(100% - 24px); max-width: 100%; }
  .btn { min-height: 38px; }  /* touch target */
  .mobile-toggle {
    display: flex !important;
    position: fixed;
    top: 12px; left: 12px;
    z-index: 201;
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    background: var(--lime-dark);
    color: #1a1a1a;
    border: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(172,219,39,0.3);
  }
  /* Mobile sidebar backdrop — taps close the sidebar */
  .app-sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 199;
    backdrop-filter: blur(2px);
  }
  .app-sidebar.open ~ .app-sidebar-backdrop,
  body.sidebar-open .app-sidebar-backdrop { display: block; }
}

.mobile-toggle { display: none; }
.app-sidebar-backdrop { display: none; }

/* ============================================
   CLIENT SWITCHER (admin sidebar)
   ============================================ */
.app-sidebar-switcher {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(172,219,39,0.1);
  position: relative;
}

.app-sidebar-switcher-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(172,219,39,0.15);
  background: rgba(172,219,39,0.04);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
  text-align: left;
  color: inherit;
}

.app-sidebar-switcher-btn:hover {
  background: rgba(172,219,39,0.08);
  border-color: rgba(172,219,39,0.25);
}

.app-sidebar-switcher-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(172,219,39,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--lime);
}

.app-sidebar-switcher-info { flex: 1; min-width: 0; }

.app-sidebar-switcher-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar-switcher-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar-switcher-arrow {
  flex-shrink: 0;
  opacity: 0.4;
  color: inherit;
  transition: transform 0.2s;
}

.app-sidebar-switcher-dropdown {
  display: none;
  position: absolute;
  left: 10px;
  right: 10px;
  top: calc(100% + 4px);
  z-index: 200;
  /* Match the dark green admin sidebar instead of popping in white. */
  background: #1a2818;
  border: 1px solid rgba(172,219,39,0.18);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  padding: 6px;
  max-height: 300px;
  overflow-y: auto;
}

.app-sidebar-switcher-dropdown.is-open { display: block; }

.app-sidebar-switcher-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  color: #f4f4f5;
  font-size: 13px;
  font-weight: 500;
}

.app-sidebar-switcher-item:hover { background: rgba(172,219,39,0.12); }

.app-sidebar-switcher-item.is-active {
  background: rgba(172,219,39,0.18);
}

.app-sidebar-switcher-item-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #f4f4f5;
  overflow: hidden;
}

.app-sidebar-switcher-item.is-active .app-sidebar-switcher-item-icon {
  background: var(--lime-dark);
  color: #1a1a1a;
}

.app-sidebar-switcher-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar-switcher-check {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--lime-dark);
  display: none;
}

.app-sidebar-switcher-item.is-active .app-sidebar-switcher-check { display: block; }

.app-sidebar-switcher-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 6px;
}

/* ============================================
   USER DROPDOWN
   ============================================ */
.app-sidebar-user-wrap {
  position: relative;
}

.app-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  font-family: var(--font-body);
  color: inherit;
}

.app-sidebar-user:hover {
  background: rgba(172,219,39,0.08);
}

.app-sidebar-user-arrow {
  flex-shrink: 0;
  opacity: 0.4;
  transition: transform 0.2s;
  color: inherit;
}

.app-sidebar-dropdown {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 10px;
  right: 10px;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 6px;
  z-index: 200;
}

.app-sidebar-dropdown.is-open { display: block; }

.app-sidebar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary) !important;
  transition: background 0.12s;
  text-decoration: none;
}

.app-sidebar-dropdown-item:hover {
  background: var(--bg-card);
}

.app-sidebar-dropdown-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.5;
}

.app-sidebar-dropdown-item--logout {
  color: #dc2626 !important;
}

.app-sidebar-dropdown-item--logout svg { color: #dc2626; }

.app-sidebar-dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 6px;
}

/* ============================================
   PLAN BADGE (sidebar)
   ============================================ */
.app-sidebar-plan {
  padding: 8px 12px;
}

.app-sidebar-plan-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(172,219,39,0.12);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.app-sidebar-plan-badge svg {
  width: 14px;
  height: 14px;
}

/* ============================================
   COLLAPSED SIDEBAR
   ============================================ */
.app-sidebar-collapse-btn {
  position: fixed;
  top: 50%;
  left: 208px; /* 220 - 12 */
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 101;
  transition: all 0.3s var(--ease-out);
  opacity: 0;
  padding: 0;
}

.app-sidebar:hover ~ .app-sidebar-collapse-btn,
.app-sidebar-collapse-btn:hover { opacity: 1; }

.app-sidebar-collapse-btn:hover {
  background: var(--lime-dark);
  color: #1a1a1a;
  border-color: var(--lime-dark);
  box-shadow: 0 0 12px rgba(172,219,39,0.3);
  transform: translateY(-50%) scale(1.15);
}

.app-sidebar-collapse-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s;
}

/* Collapsed state */
.app-sidebar.is-collapsed {
  width: 64px;
  overflow: hidden;
}

.app-sidebar.is-collapsed .app-sidebar-brand-logo img {
  height: 24px;
}

.app-sidebar.is-collapsed .app-sidebar-brand-sub,
.app-sidebar.is-collapsed .app-sidebar-section-label,
.app-sidebar.is-collapsed .app-sidebar-user-info,
.app-sidebar.is-collapsed .app-sidebar-user-arrow,
.app-sidebar.is-collapsed .app-sidebar-plan {
  display: none;
}

.app-sidebar.is-collapsed .app-sidebar-nav {
  padding: 8px;
}

.app-sidebar.is-collapsed .app-sidebar-link {
  justify-content: center;
  padding: 11px 0;
}

.app-sidebar.is-collapsed .app-sidebar-link span {
  display: none;
}

.app-sidebar.is-collapsed .app-sidebar-link svg {
  margin: 0;
  width: 20px;
  height: 20px;
}

.app-sidebar.is-collapsed .app-sidebar-user {
  justify-content: center;
  padding: 8px 0;
}

.app-sidebar.is-collapsed .app-sidebar-user-avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.app-sidebar.is-collapsed .app-sidebar-dropdown {
  position: fixed;
  left: 72px;
  right: auto;
  bottom: 16px;
  width: 200px;
  border-radius: 12px;
}

.app-sidebar.is-collapsed ~ .app-sidebar-collapse-btn {
  left: 52px;
}

.app-sidebar.is-collapsed ~ .app-sidebar-collapse-btn svg {
  transform: rotate(180deg);
}

.app-sidebar.is-collapsed + .app-sidebar-collapse-btn + .app-main,
.app-sidebar.is-collapsed ~ .app-main {
  margin-left: 64px;
}

/* Tooltip on collapsed sidebar */
.app-sidebar.is-collapsed .app-sidebar-link {
  position: relative;
}

.app-sidebar.is-collapsed .app-sidebar-link:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #1a1a1a;
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 200;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
