/* ════════════════════════════════════════════════════════════════
   Concept Plus Holding — main stylesheet
   Mobile-first responsive, Apple-style, tested on:
   - iPhone SE (375px)
   - iPhone 13/14/15 (390-393px)
   - iPhone 14/15 Pro Max (430px)
   - iPad portrait (768px)
   - iPad landscape (1024px)
   - Desktop (1440px+)
   ════════════════════════════════════════════════════════════════ */

/* ─── RESET ─────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  background: #000;
  color: #f5f5f7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;  /* dynamic viewport for iOS Safari */
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
input, textarea { font-family: inherit; }

/* ─── TOP NAV ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 48px;
  background: rgba(0,0,0,0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
}
.nav-inner {
  width: 100%;
  max-width: 1024px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #f5f5f7;
  padding: 8px 0;  /* bigger tap target */
}
.nav-logo span { color: #999; font-weight: 400; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-link {
  font-size: 12px;
  color: #f5f5f7;
  opacity: 0.85;
  padding: 14px 10px;  /* 14px vertical = full nav height tap zone */
  transition: opacity 0.2s;
  font-weight: 400;
}
.nav-link:hover { opacity: 1; }
.nav-link.active { opacity: 1; font-weight: 500; }
.nav-burger {
  display: none;
  font-size: 22px;
  line-height: 1;
  padding: 12px;  /* 22+24 = 46px tap target */
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

/* Mobile slide-out menu */
.nav-mobile {
  position: fixed;
  top: 48px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 999;
  padding: 30px 22px;
  transform: translateY(-100%);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  overflow-y: auto;
}
.nav-mobile.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.nav-mobile a {
  display: block;
  font-size: 22px;
  font-weight: 500;
  padding: 16px 0;  /* 22 + 32 = 54px tap height */
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
  color: #f5f5f7;
}

@media (max-width: 833px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}

/* ─── PAGE LAYOUT ───────────────────────────────────────────── */
.page { display: none; min-height: 100vh; animation: fadeIn 0.4s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
main { padding-top: 48px; }

/* ─── HERO ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: calc(100vh - 48px);
  height: calc(100dvh - 48px);  /* dynamic viewport — accounts for iOS chrome */
  min-height: 580px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* Sunset-over-Dubai gradient fallback */
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 35%, #0f3460 70%, #1a1a2e 100%);
}
.hero-bg-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
  animation: kenburns 18s ease-out infinite;
}
.hero-bg-img.active { opacity: 1; }
@keyframes kenburns {
  0%   { transform: scale(1.0); }
  100% { transform: scale(1.12); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.4) 0%,
    rgba(0,0,0,0.15) 35%,
    rgba(0,0,0,0.6) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 22px;
  max-width: 900px;
}
.hero-eyebrow {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  opacity: 0.85;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.hero-title {
  font-size: clamp(36px, 7vw, 80px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 18px;
  color: #fff;
}
.hero-sub {
  font-size: clamp(17px, 2.2vw, 24px);
  font-weight: 400;
  color: rgba(255,255,255,0.92);
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  display: inline-block;
  padding: 14px 26px;  /* 14+15+14 = 43-45px height, meets 44pt minimum */
  border-radius: 980px;
  font-size: 15px;
  font-weight: 400;
  transition: all 0.2s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: #0071e3; color: #fff; }
.btn-primary:hover, .btn-primary:active { background: #0077ed; }
.btn-secondary { color: #2997ff; padding: 14px 6px; }
.btn-secondary::after {
  content: ' ›';
  display: inline-block;
  transition: transform 0.2s;
}
.btn-secondary:hover::after { transform: translateX(2px); }

.hero-location {
  position: absolute;
  bottom: 32px;
  left: 0; right: 0;
  text-align: center;
  z-index: 2;
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: opacity 0.6s;
  padding: 0 22px;
}

/* Short viewports (landscape phones) — relax hero */
@media (max-height: 600px) {
  .hero { min-height: 0; padding: 50px 0 30px; height: auto; }
  .hero-location { display: none; }
  .hero-title { font-size: clamp(32px, 6vw, 64px); }
  .hero-sub { font-size: 16px; margin-bottom: 20px; }
}

/* ─── PRODUCT GRID (home page) ──────────────────────────────── */
.product-grid {
  padding: 80px 22px;
  max-width: 1200px;
  margin: 0 auto;
}
.grid-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 12px;
}
.product-card {
  background: #1d1d1f;
  border-radius: 18px;
  padding: 50px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  transition: transform 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.product-card:hover { transform: translateY(-2px); }
.product-card.light { background: #f5f5f7; color: #1d1d1f; }
.pc-eyebrow {
  font-size: 14px;
  font-weight: 500;
  color: #2997ff;
  margin-bottom: 8px;
}
.product-card.light .pc-eyebrow { color: #0071e3; }
.pc-title {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.pc-sub {
  font-size: clamp(15px, 1.6vw, 20px);
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
  max-width: 480px;
}
.product-card.light .pc-sub { color: rgba(29,29,31,0.85); }
.pc-links { display: flex; gap: 24px; font-size: 15px; flex-wrap: wrap; justify-content: center; }
.pc-links a { color: #2997ff; padding: 6px 0; }
.product-card.light .pc-links a { color: #0071e3; }
.pc-visual {
  margin-top: auto;
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  font-size: 110px;
}
.product-card .pc-visual { color: rgba(255,255,255,0.5); }
.product-card.light .pc-visual { color: rgba(29,29,31,0.3); }

/* PHONES (≤640): grid → 1 col, smaller cards */
@media (max-width: 640px) {
  .product-grid { padding: 50px 16px; }
  .grid-row { grid-template-columns: 1fr; }
  .product-card { padding: 40px 22px; min-height: 360px; }
  .pc-visual { height: 130px; font-size: 80px; }
}

/* ─── INNER PAGES ──────────────────────────────────────────── */
.page-hero {
  padding: 100px 22px 60px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}
.page-eyebrow {
  font-size: 20px;
  font-weight: 600;
  color: #2997ff;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.page-title {
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.page-sub {
  font-size: clamp(18px, 2.2vw, 24px);
  color: rgba(255,255,255,0.85);
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.section {
  padding: 60px 22px;
  max-width: 1024px;
  margin: 0 auto;
}
.section-light {
  background: #f5f5f7;
  color: #1d1d1f;
  padding: 80px 22px;
}
.section-light-inner { max-width: 1024px; margin: 0 auto; }
.section-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  line-height: 1.15;
}
.section-body {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.65;
  color: rgba(245,245,247,0.85);
  max-width: 720px;
}
.section-light .section-body { color: rgba(29,29,31,0.85); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.feature {
  padding: 28px 24px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.section-light .feature { background: #fff; border: 1px solid rgba(0,0,0,0.06); }
.feature-icon { font-size: 32px; margin-bottom: 14px; line-height: 1; color: #2997ff; }
.section-light .feature-icon { color: #0071e3; }
.feature-title { font-size: 18px; font-weight: 500; margin-bottom: 8px; letter-spacing: -0.01em; }
.feature-body { font-size: 14px; line-height: 1.5; color: rgba(245,245,247,0.7); }
.section-light .feature-body { color: rgba(29,29,31,0.7); }

/* TABLET (641-833): feature grid → 2 cols */
@media (max-width: 833px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .page-hero { padding: 80px 22px 50px; }
}
/* PHONE (≤640): feature grid → 1 col */
@media (max-width: 640px) {
  .feature-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 70px 16px 40px; }
  .section { padding: 50px 16px; }
  .section-light { padding: 60px 16px; }
  .feature { padding: 24px 20px; }
}

/* ─── LIST GRID (blog/videos) ──────────────────────────────── */
.list-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.list-item {
  background: #1d1d1f;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.list-item:hover { transform: translateY(-2px); }
.list-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: #2a2a2c;
  background-image: linear-gradient(135deg, #1a1a2e 0%, #2d3047 100%);
  position: relative;
}
.list-thumb.video::after {
  content: '▸';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.list-body { padding: 20px 22px; }
.list-meta { font-size: 11px; color: #2997ff; margin-bottom: 6px; letter-spacing: 0.1em; text-transform: uppercase; }
.list-title { font-size: 19px; font-weight: 500; line-height: 1.3; margin-bottom: 8px; }
.list-excerpt { font-size: 14px; color: rgba(245,245,247,0.7); line-height: 1.5; }

@media (max-width: 640px) {
  .list-grid { grid-template-columns: 1fr; }
  .list-body { padding: 18px 18px; }
}

/* ─── CAM CHAT WIDGET ───────────────────────────────────────── */








/* PHONE: Cam window goes fullscreen for thumb reach */
@media (max-width: 640px) {
  
  
}

.cam-header {
  padding: 14px 18px;
  background: #2a2a2c;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.cam-header-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cam-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #0071e3;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px;
  flex-shrink: 0;
}
.cam-name { font-weight: 500; font-size: 15px; }
.cam-status-line { font-size: 11px; color: rgba(245,245,247,0.6); }
.cam-close {
  font-size: 22px;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: rgba(245,245,247,0.7);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.cam-close:hover { color: #fff; background: rgba(255,255,255,0.06); }
.cam-messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;  /* iOS momentum scroll */
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cam-msg { max-width: 88%; }
.cam-msg.user { align-self: flex-end; }
.cam-msg.cam { align-self: flex-start; width: 100%; max-width: 100%; }
.cam-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.cam-msg.user .cam-bubble { background: #0071e3; color: #fff; }
.cam-msg.cam .cam-bubble { background: #2a2a2c; color: #f5f5f7; }
.cam-typing { display: inline-flex; gap: 4px; }
.cam-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(245,245,247,0.4);
  animation: dot 1.4s infinite ease-in-out both;
}
.cam-typing span:nth-child(1) { animation-delay: -0.32s; }
.cam-typing span:nth-child(2) { animation-delay: -0.16s; }
@keyframes dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}
.cam-input-row {
  border-top: 0.5px solid rgba(255,255,255,0.08);
  padding: 12px 14px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));  /* iPhone home bar safe area */
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.cam-input {
  flex: 1;
  min-width: 0;
  background: #2a2a2c;
  border: 0.5px solid rgba(255,255,255,0.1);
  color: #f5f5f7;
  padding: 11px 16px;
  border-radius: 980px;
  font-size: 16px;  /* 16px MANDATORY — prevents iOS Safari auto-zoom on focus */
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.cam-input:focus { border-color: #0071e3; }
.cam-send {
  background: #0071e3;
  color: #fff;
  width: 44px; height: 44px;   /* meets 44pt minimum */
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.cam-send:hover { background: #0077ed; }
.cam-send:disabled { opacity: 0.4; cursor: not-allowed; }
.cam-config-warning {
  background: rgba(255,193,7,0.1);
  border: 0.5px solid rgba(255,193,7,0.3);
  color: #ffd54f;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 4px;
}

/* ─── FOOTER ────────────────────────────────────────────────── */
footer {
  background: #000;
  padding: 40px 22px 30px;
  border-top: 0.5px solid rgba(255,255,255,0.08);
  margin-top: 80px;
}
.footer-inner {
  max-width: 1024px;
  margin: 0 auto;
  font-size: 12px;
  color: #86868b;
  line-height: 1.6;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
  margin-bottom: 20px;
}
.footer-col-title { color: #f5f5f7; font-weight: 500; font-size: 12px; margin-bottom: 12px; }
.footer-col a { display: block; padding: 6px 0; }
.footer-col a:hover { color: #f5f5f7; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 833px) { .footer-cols { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .footer-cols { grid-template-columns: 1fr; gap: 20px; } }


/* Per-hero gradient backdrops — also serve as fallbacks if photo fails */
.hero-bg-img:nth-child(1) { background: linear-gradient(180deg, #1a1a3e 0%, #4a3266 30%, #c4624a 60%, #f4a672 80%, #1a2540 100%); }
.hero-bg-img:nth-child(2) { background: linear-gradient(180deg, #0a1428 0%, #1e3a5f 40%, #2c4a6e 70%, #d4825c 95%, #1a2540 100%); }
.hero-bg-img:nth-child(3) { background: linear-gradient(180deg, #1a1a3e 0%, #4a3266 40%, #9b3c6e 70%, #c45c8c 90%, #2c5378 100%); }
.hero-bg-img:nth-child(4) { background: linear-gradient(180deg, #2c5378 0%, #4a7ba5 40%, #74b9ff 70%, #a4cdf5 90%, #dfe6e9 100%); }



/* ════════════════════════════════════════════════════════════════
   CAM — full-page chat experience (Claude-style)
   ════════════════════════════════════════════════════════════════ */
.cam-fullpage {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 48px);
  height: calc(100dvh - 48px);
  max-width: 100%;
  background: #000;
}

.cam-fullpage-header {
  padding: 16px 24px;
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cam-fullpage-title {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 768px;
  width: 100%;
}
.cam-avatar-lg {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0071e3;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}
.cam-fullpage-name {
  font-size: 16px;
  font-weight: 500;
  color: #f5f5f7;
}
.cam-fullpage-sub {
  font-size: 12px;
  color: rgba(245,245,247,0.55);
  margin-top: 2px;
}

/* Messages area — scrollable, centered column */
.cam-fullpage-messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 32px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.cam-fullpage-messages::-webkit-scrollbar { width: 8px; }
.cam-fullpage-messages::-webkit-scrollbar-track { background: transparent; }
.cam-fullpage-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
.cam-fullpage-messages::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* Welcome state */
.cam-welcome {
  width: 100%;
  max-width: 768px;
  text-align: center;
  padding: 40px 0 20px;
}
.cam-welcome-title {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #f5f5f7;
  margin-bottom: 12px;
}
.cam-welcome-sub {
  font-size: 17px;
  color: rgba(245,245,247,0.65);
  margin-bottom: 40px;
}
.cam-suggestions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  text-align: left;
}
.cam-suggestion {
  background: rgba(255,255,255,0.04);
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-align: left;
  font-family: inherit;
  color: inherit;
}
.cam-suggestion:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
}
.cam-suggestion-title {
  font-size: 14px;
  font-weight: 500;
  color: #f5f5f7;
  margin-bottom: 4px;
}
.cam-suggestion-sub {
  font-size: 12px;
  color: rgba(245,245,247,0.55);
}

/* Message blocks */
.cam-fp-msg {
  width: 100%;
  max-width: 768px;
  display: flex;
  gap: 16px;
  animation: fadeIn 0.3s ease;
}
.cam-fp-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.cam-fp-msg.user .cam-fp-msg-avatar {
  background: rgba(255,255,255,0.1);
  color: #f5f5f7;
}
.cam-fp-msg.cam .cam-fp-msg-avatar {
  background: #0071e3;
  color: #fff;
}
.cam-fp-msg-content {
  flex: 1;
  font-size: 15px;
  line-height: 1.65;
  color: #f5f5f7;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  padding-top: 4px;
}
.cam-fp-msg-content strong { font-weight: 600; }
.cam-fp-msg-content code {
  background: rgba(255,255,255,0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 90%;
}
.cam-fp-msg-content a { color: #2997ff; }
.cam-fp-msg-content ul, .cam-fp-msg-content ol {
  padding-left: 22px;
  margin: 8px 0;
}

/* Typing indicator (inline in message area) */
.cam-fp-typing {
  display: inline-flex;
  gap: 5px;
  padding: 8px 0;
}
.cam-fp-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(245,245,247,0.4);
  animation: dot 1.4s infinite ease-in-out both;
}
.cam-fp-typing span:nth-child(1) { animation-delay: -0.32s; }
.cam-fp-typing span:nth-child(2) { animation-delay: -0.16s; }

/* Error state */
.cam-fp-error {
  background: rgba(255,107,107,0.08);
  border: 0.5px solid rgba(255,107,107,0.3);
  border-radius: 10px;
  padding: 12px 14px;
  color: #ff8a8a;
  font-size: 13px;
  line-height: 1.5;
}

/* Input area — fixed at bottom, centered */
.cam-fullpage-input-wrap {
  padding: 16px 24px 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  flex-shrink: 0;
  background: linear-gradient(to bottom, transparent 0%, #000 25%);
}
.cam-fullpage-input-inner {
  max-width: 768px;
  margin: 0 auto;
  background: #1d1d1f;
  border: 0.5px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 8px 8px 8px 18px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  transition: border-color 0.2s;
}
.cam-fullpage-input-inner:focus-within {
  border-color: rgba(0,113,227,0.5);
}
.cam-fullpage-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: #f5f5f7;
  font-size: 16px;
  font-family: inherit;
  line-height: 1.5;
  padding: 10px 0;
  resize: none;
  outline: none;
  max-height: 200px;
  overflow-y: auto;
}
.cam-fullpage-input::placeholder {
  color: rgba(245,245,247,0.4);
}
.cam-fullpage-send {
  background: #0071e3;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
  transition: background 0.15s, opacity 0.15s;
  margin-bottom: 2px;
}
.cam-fullpage-send:hover { background: #0077ed; }
.cam-fullpage-send:disabled { opacity: 0.35; cursor: not-allowed; }
.cam-fullpage-hint {
  max-width: 768px;
  margin: 8px auto 0;
  text-align: center;
  font-size: 11px;
  color: rgba(245,245,247,0.35);
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .cam-fullpage-messages { padding: 20px 16px 16px; gap: 22px; }
  .cam-welcome { padding: 20px 0 10px; }
  .cam-welcome-title { font-size: 26px; }
  .cam-welcome-sub { font-size: 15px; margin-bottom: 24px; }
  .cam-suggestions { grid-template-columns: 1fr; gap: 8px; }
  .cam-suggestion { padding: 14px 16px; }
  .cam-fullpage-input-wrap { padding: 12px 16px 16px; }
  .cam-fp-msg { gap: 12px; }
  .cam-fullpage-hint { display: none; }
}


/* Download button — appears inline in Cam's chat replies */
.cam-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0071e3;
  color: #fff !important;
  padding: 10px 18px;
  border-radius: 980px;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, transform 0.05s;
}
.cam-download-btn:hover {
  background: #0077ed;
}
.cam-download-btn:active {
  transform: scale(0.98);
}

/* Export buttons (CSV / Excel download) */
.cam-export-buttons {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(0, 113, 227, 0.08);
  border: 0.5px solid rgba(0, 113, 227, 0.25);
  border-radius: 12px;
}
.cam-export-label {
  font-size: 12px;
  color: rgba(245,245,247,0.7);
  margin-bottom: 10px;
  font-weight: 500;
}
.cam-export-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cam-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #0071e3;
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s;
}
.cam-export-btn:hover {
  background: #0077ed;
}
.cam-export-icon {
  font-size: 14px;
  line-height: 1;
}

/* ─── ACCESSIBILITY ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-bg-img { animation: none; }
}

/* ════════════════════════════════════════════════════════════════
   CAM — sidebar layout (chat history)
   ════════════════════════════════════════════════════════════════ */
.cam-layout {
  display: flex;
  height: calc(100vh - 48px);
  height: calc(100dvh - 48px);
  background: #000;
}

.cam-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #0a0a0a;
  border-right: 0.5px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cam-sidebar-header {
  padding: 12px;
  border-bottom: 0.5px solid rgba(255,255,255,0.06);
}

.cam-new-chat-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #f5f5f7;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}
.cam-new-chat-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
}
.cam-new-chat-icon {
  font-size: 16px;
  line-height: 1;
}

.cam-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 8px 16px;
}
.cam-sidebar-list::-webkit-scrollbar { width: 6px; }
.cam-sidebar-list::-webkit-scrollbar-track { background: transparent; }
.cam-sidebar-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 3px; }
.cam-sidebar-list::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.12); }

.cam-sidebar-item {
  position: relative;
  padding: 10px 12px;
  margin-bottom: 2px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.cam-sidebar-item:hover {
  background: rgba(255,255,255,0.05);
}
.cam-sidebar-item.active {
  background: rgba(0,113,227,0.15);
  border: 0.5px solid rgba(0,113,227,0.3);
}
.cam-sidebar-item-title {
  font-size: 13px;
  color: #f5f5f7;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  padding-right: 20px;
}
.cam-sidebar-item-meta {
  font-size: 11px;
  color: rgba(245,245,247,0.4);
  margin-top: 3px;
}

.cam-sidebar-item-actions {
  position: absolute;
  top: 8px;
  right: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}
.cam-sidebar-item:hover .cam-sidebar-item-actions {
  opacity: 1;
}
.cam-sidebar-item-del {
  background: transparent;
  border: 0;
  color: rgba(245,245,247,0.45);
  font-size: 18px;
  line-height: 1;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.cam-sidebar-item-del:hover {
  background: rgba(255,69,58,0.15);
  color: #ff453a;
}

.cam-sidebar-empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 12px;
  color: rgba(245,245,247,0.35);
}

.cam-sidebar-footer {
  padding: 10px 14px;
  border-top: 0.5px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.cam-sidebar-footer-text {
  font-size: 10px;
  color: rgba(245,245,247,0.35);
  text-align: center;
  letter-spacing: 0.2px;
}

/* Sidebar toggle button — visible on mobile */
.cam-sidebar-toggle {
  background: transparent;
  border: 0;
  color: #f5f5f7;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 10px;
  margin-right: 8px;
  display: none;  /* hidden on desktop */
  font-family: inherit;
}
.cam-sidebar-toggle:hover {
  color: #fff;
}

/* The cam-fullpage inside cam-layout fills available height as a flex column */
.cam-layout .cam-fullpage {
  height: 100%;          /* fill the cam-layout's height */
  flex: 1;               /* take remaining horizontal space after sidebar */
  min-width: 0;          /* allow flex shrink for narrow screens */
  display: flex;
  flex-direction: column;
  min-height: 0;         /* allow inner scroll containers to work */
}

/* Make sure the messages area scrolls and the input stays anchored at bottom */
.cam-layout .cam-fullpage-messages {
  flex: 1;
  min-height: 0;         /* allow flex to shrink instead of overflow */
}
.cam-layout .cam-fullpage-input-wrap {
  flex-shrink: 0;
}

/* Mobile: hide sidebar by default, slide in when .open */
@media (max-width: 768px) {
  .cam-sidebar {
    position: fixed;
    top: 48px;
    left: 0;
    bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    width: 280px;
    border-right: 0.5px solid rgba(255,255,255,0.12);
  }
  .cam-sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0,0,0,0.6);
  }
  .cam-sidebar-toggle {
    display: inline-flex;
    align-items: center;
  }
}

/* ─── AUTH OVERLAY ─────────────────────────────────────────── */
body.cp-auth-locked { overflow: hidden; }
#cp-auth-overlay {
  position: fixed; inset: 0;
  background: #000;
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.cp-auth-card {
  background: #1d1d1f;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  width: 100%; max-width: 360px;
  padding: 36px 28px 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.cp-auth-brand {
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.cp-auth-logo {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: #0071e3; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 600; letter-spacing: -0.03em;
}
.cp-auth-title {
  font-size: 19px; font-weight: 500;
  letter-spacing: -0.02em; color: #f5f5f7;
}
.cp-auth-form { display: flex; flex-direction: column; gap: 10px; }
.cp-auth-form input {
  width: 100%; height: 44px;
  background: #2c2c2e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 15px; color: #f5f5f7;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.cp-auth-form input::placeholder { color: #86868b; }
.cp-auth-form input:focus { border-color: #0071e3; background: #1f1f21; }
.cp-auth-form button {
  margin-top: 6px; height: 44px;
  background: #0071e3; color: #fff;
  border-radius: 10px;
  font-size: 15px; font-weight: 500;
  transition: background 0.15s, opacity 0.15s;
}
.cp-auth-form button:hover:not(:disabled) { background: #0077ed; }
.cp-auth-form button:disabled { opacity: 0.5; cursor: default; }
.cp-auth-error {
  min-height: 18px;
  font-size: 13px; color: #ff453a;
  text-align: center; margin-top: 4px;
}
.cp-auth-hint {
  font-size: 12px;
  color: #86868b;
  text-align: center;
  margin: 2px 0 4px;
}
.cp-auth-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 12px; color: #86868b;
}

/* ─── TEAM PAGE ────────────────────────────────────────────── */
.team-wrap { max-width: 1024px; margin: 0 auto; padding: 0 22px 80px; }
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.team-card {
  background: #1d1d1f;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 24px;
}
.team-card-title {
  font-size: 17px; font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}
.team-form { display: flex; flex-direction: column; gap: 12px; }
.team-form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; color: #86868b;
}
.team-form input {
  height: 40px;
  background: #2c2c2e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px; color: #f5f5f7;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.team-form input:focus { border-color: #0071e3; background: #1f1f21; }
.team-btn {
  margin-top: 4px;
  height: 40px;
  background: #0071e3; color: #fff;
  border-radius: 8px;
  font-size: 14px; font-weight: 500;
  transition: background 0.15s, opacity 0.15s;
}
.team-btn:hover:not(:disabled) { background: #0077ed; }
.team-btn:disabled { opacity: 0.5; cursor: default; }
.team-msg { min-height: 18px; font-size: 13px; }
.team-msg.ok  { color: #30d158; }
.team-msg.err { color: #ff453a; }

.team-table-card { padding: 24px; }
.team-table-wrap { overflow-x: auto; }
.team-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.team-table th, .team-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.team-table th {
  font-size: 11px; font-weight: 500;
  color: #86868b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.team-table tbody tr:last-child td { border-bottom: none; }
.team-table .team-empty {
  text-align: center; color: #86868b;
  padding: 24px;
}

.team-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px; font-weight: 500;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.team-badge.admin { background: rgba(0,113,227,0.18); color: #4ea1ff; }
.team-badge.agent { background: rgba(255,255,255,0.08); color: #d2d2d7; }

.team-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.team-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #30d158; }
.team-status.disabled { color: #86868b; }
.team-status.disabled .dot { background: #555; }

.team-reset-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  color: #d2d2d7;
  transition: border-color 0.15s, color 0.15s;
}
.team-reset-btn:hover { border-color: #0071e3; color: #4ea1ff; }
.team-actions { white-space: nowrap; text-align: right; }
.team-inline-form { display: inline-flex; align-items: center; gap: 6px; }
.team-inline-form input {
  width: 140px;
  height: 32px;
  background: #2c2c2e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 0 10px;
  font-size: 13px;
  color: #f5f5f7;
  outline: none;
}
.team-inline-form input:focus { border-color: #0071e3; }
.team-inline-form .ok-btn {
  height: 32px; padding: 0 12px;
  background: #0071e3; color: #fff;
  border-radius: 6px; font-size: 12px; font-weight: 500;
}
.team-inline-form .ok-btn:disabled { opacity: 0.5; cursor: default; }
.team-inline-form .cancel-btn {
  width: 28px; height: 32px;
  background: transparent;
  color: #86868b; font-size: 18px; line-height: 1;
  border-radius: 6px;
}
.team-inline-form .cancel-btn:hover { color: #f5f5f7; }
.team-inline-msg { display: inline-block; font-size: 12px; margin-left: 8px; }
.team-inline-msg.ok  { color: #30d158; }
.team-inline-msg.err { color: #ff453a; }

@media (max-width: 720px) {
  .team-grid { grid-template-columns: 1fr; }
  .team-table th, .team-table td { padding: 10px 8px; font-size: 13px; }
  .team-inline-form input { width: 110px; }
}

/* ─── TEAM FORM SELECT (Phase 2 identity) ─────────────────── */
.team-form select {
  height: 40px;
  background: #2c2c2e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 0 32px 0 12px;
  font-size: 14px; color: #f5f5f7;
  outline: none;
  appearance: none; -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #86868b 50%),
    linear-gradient(135deg, #86868b 50%, transparent 50%);
  background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  transition: border-color 0.15s;
}
.team-form select:focus { border-color: #0071e3; }
.team-form select:invalid { color: #86868b; }
.team-form select option { background: #1d1d1f; color: #f5f5f7; }

/* ─── NAV ACCOUNT AREA (Phase 2 · Task 1.1) ─────────────── */
.nav-account {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: #86868b;
  margin-left: 16px;
}
.nav-account-info { white-space: nowrap; }
.nav-account-name { color: #f5f5f7; font-weight: 500; }
.nav-account-sep  { opacity: 0.55; margin: 0 2px; }
.nav-account-role { color: #86868b; }
.nav-account-logout {
  font-size: 12px;
  color: #86868b;
  padding: 4px 0;
  background: none; border: none; cursor: pointer;
  transition: color 0.15s;
}
.nav-account-logout:hover { color: #f5f5f7; }

.nav-mobile-account {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  color: #86868b;
}
.nav-mobile-account .nav-account-name { color: #f5f5f7; font-weight: 500; }
.nav-mobile-account .nav-account-logout {
  align-self: flex-start;
  font-size: 15px;
  color: #4ea1ff;
  padding: 6px 0;
}

@media (max-width: 720px) {
  .nav-account { display: none; }
}

/* ─── CRM TABS (Phase 2 · Lead Pipeline MVP) ─────────────── */
.crm-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 22px;
  background: #000;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 48px;
  z-index: 50;
  height: 44px;
}
.crm-tab {
  background: transparent;
  color: #86868b;
  font-size: 13px;
  font-weight: 500;
  padding: 0 14px;
  height: 44px;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.crm-tab:hover { color: #f5f5f7; }
.crm-tab.active {
  color: #f5f5f7;
  border-bottom-color: #0071e3;
}
.crm-tab-count {
  font-size: 11px;
  opacity: 0.6;
  margin-left: 2px;
}
.crm-tab-spacer { flex: 1; }
.leads-add-btn {
  background: #0071e3;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.leads-add-btn:hover { background: #0077ed; }

.crm-tab-pane { display: none; }
.crm-tab-pane.active { display: block; }

/* ─── LEADS SEARCH TOOLBAR ──────────────────────────────── */
.leads-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px 0;
  position: sticky;
  top: 0;
  z-index: 5;
  background: #000;
}
.leads-search-wrap {
  position: relative;
  flex: 0 0 420px;
  max-width: 460px;
}
.leads-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  opacity: 0.6;
  pointer-events: none;
}
.leads-search-input {
  width: 100%;
  background: #1d1d1f;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: #f5f5f7;
  font: inherit;
  font-size: 14px;
  padding: 9px 36px 9px 36px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.leads-search-input::placeholder { color: #6b6b70; }
.leads-search-input:focus {
  border-color: #0a84ff;
  box-shadow: 0 0 0 3px rgba(10,132,255,0.18);
}
.leads-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: #8e8e93;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
}
.leads-search-clear:hover { background: rgba(255,255,255,0.08); color: #f5f5f7; }
.leads-search-meta {
  font-size: 12px;
  color: #8e8e93;
  min-width: 130px;
}
.leads-search-meta.is-filtered { color: #0a84ff; }

/* Card highlight + dim states while filtering */
.lead-card.is-search-hit mark {
  background: rgba(10,132,255,0.28);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
}

/* ─── KANBAN BOARD ──────────────────────────────────────── */
.leads-board {
  display: flex;
  gap: 14px;
  padding: 18px 22px 80px;
  overflow-x: auto;
  align-items: flex-start;
}
.lead-col {
  flex: 0 0 280px;
  background: #1d1d1f;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 180px);
}
.lead-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lead-col-title {
  font-size: 12px;
  font-weight: 500;
  color: #f5f5f7;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lead-col-count {
  font-size: 12px;
  color: #86868b;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 1px 8px;
}
.lead-col-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.lead-col-empty {
  text-align: center;
  color: #58585c;
  font-size: 13px;
  padding: 14px 0;
}

.lead-card {
  background: #2c2c2e;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s, transform 0.15s, opacity 0.15s;
  cursor: grab;
}
.lead-card:hover { border-color: rgba(255,255,255,0.14); }
.lead-card:active { cursor: grabbing; }
.lead-card.is-dragging {
  opacity: 0.35;
  cursor: grabbing;
}
.lead-col.is-drop-target {
  border-color: #0071e3;
  background: #1f2733;
  box-shadow: 0 0 0 1px rgba(0,113,227,0.4) inset;
}
.lead-card-tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 500;
  background: rgba(175, 82, 222, 0.18);
  color: #d8a5ff;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lead-card-name {
  font-size: 14px;
  font-weight: 500;
  color: #f5f5f7;
}
.lead-card-phone {
  font-size: 12px;
  color: #86868b;
  font-variant-numeric: tabular-nums;
}
.lead-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
  align-items: center;
}
.lead-card-community {
  font-size: 11px;
  color: #d2d2d7;
}
.lead-source-pill {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #3a3a3c;
  color: #d2d2d7;
  padding: 2px 7px;
  border-radius: 8px;
}
.lead-source-pill.source-cam  { background: rgba(0,113,227,0.18); color: #4ea1ff; }
.lead-source-pill.source-sara { background: rgba(48,209,88,0.18); color: #30d158; }

.lead-card-notes {
  font-size: 11.5px;
  color: #86868b;
  line-height: 1.45;
  padding-top: 6px;
  margin-top: 2px;
  border-top: 1px dashed rgba(255,255,255,0.08);
}

/* ─── CAM → BOARD push button (Phase 2 · Lead Pipeline wire) ─ */
.cam-lead-button-wrap {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cam-lead-button {
  background: rgba(0,113,227,0.12);
  border: 1px solid rgba(0,113,227,0.4);
  color: #4ea1ff;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cam-lead-button:hover:not(:disabled) {
  background: rgba(0,113,227,0.2);
  border-color: rgba(0,113,227,0.7);
}
.cam-lead-button:disabled { cursor: default; }
.cam-lead-button.done {
  color: #30d158;
  border-color: rgba(48,209,88,0.4);
  background: rgba(48,209,88,0.12);
}

/* ─── CAM → WhatsApp confirm card (Phase 2 · WA Stage 3) ────── */
.cam-wa-card {
  margin-top: 12px;
  background: rgba(48, 209, 88, 0.06);
  border: 1px solid rgba(48, 209, 88, 0.35);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
}
.cam-wa-preview {
  font-size: 13px;
  color: #f5f5f7;
  background: rgba(255,255,255,0.04);
  padding: 10px 12px;
  border-radius: 8px;
  white-space: pre-wrap;
  line-height: 1.5;
}
.cam-wa-meta {
  font-size: 12px;
  color: #86868b;
  line-height: 1.5;
}
.cam-wa-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}
.cam-wa-cancel-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: #d2d2d7;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.cam-wa-cancel-btn:hover:not(:disabled) {
  border-color: rgba(255,255,255,0.3);
  color: #f5f5f7;
}
.cam-wa-cancel-btn:disabled { cursor: default; opacity: 0.5; }
.cam-wa-send-btn {
  background: #30d158;
  color: #000;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, opacity 0.15s;
}
.cam-wa-send-btn:hover:not(:disabled) { background: #2bbb4d; }
.cam-wa-send-btn:disabled { cursor: default; opacity: 0.75; }
.cam-wa-send-btn.done {
  background: rgba(48, 209, 88, 0.18);
  color: #30d158;
  opacity: 1;
}
.cam-wa-status {
  font-size: 12px;
  color: #86868b;
  min-height: 14px;
}

/* ─── CAM → CAMPAIGN confirm card (Phase 2 · Outreach Stage 2) ── */
.cam-camp-card {
  margin-top: 12px;
  background: rgba(175, 82, 222, 0.06);
  border: 1px solid rgba(175, 82, 222, 0.35);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 560px;
}
.cam-camp-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cam-camp-icon {
  font-size: 18px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(175,82,222,0.16);
  border-radius: 8px;
}
.cam-camp-name { font-size: 14px; font-weight: 600; color: #f5f5f7; }
.cam-camp-goal { font-size: 12px; color: #86868b; margin-top: 2px; }
.cam-camp-meta {
  font-size: 12px;
  color: #86868b;
  background: rgba(255,255,255,0.04);
  padding: 8px 10px;
  border-radius: 6px;
}
.cam-camp-steps { display: flex; flex-direction: column; gap: 8px; }
.cam-camp-step {
  background: rgba(255,255,255,0.03);
  border-left: 3px solid rgba(175,82,222,0.5);
  border-radius: 4px;
  padding: 8px 12px;
}
.cam-camp-step-head {
  font-size: 11px;
  color: #d8a5ff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.cam-camp-step-body {
  font-size: 13px;
  color: #f5f5f7;
  white-space: pre-wrap;
  line-height: 1.5;
  font-family: inherit;
}
.cam-camp-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}
.cam-camp-cancel {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: #d2d2d7;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.cam-camp-cancel:hover:not(:disabled) {
  border-color: rgba(255,255,255,0.3);
  color: #f5f5f7;
}
.cam-camp-cancel:disabled { cursor: default; opacity: 0.5; }
.cam-camp-launch {
  background: #af52de;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, opacity 0.15s;
}
.cam-camp-launch:hover:not(:disabled) { background: #c267ee; }
.cam-camp-launch:disabled { cursor: default; opacity: 0.75; }
.cam-camp-launch.done {
  background: rgba(175,82,222,0.2);
  color: #d8a5ff;
  opacity: 1;
}
.cam-camp-status {
  font-size: 12px;
  color: #86868b;
  min-height: 14px;
}

.lead-card-status {
  margin-top: 6px;
  width: 100%;
  height: 32px;
  background: #1f1f21;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 0 28px 0 10px;
  font-size: 12px;
  color: #f5f5f7;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #86868b 50%),
    linear-gradient(135deg, #86868b 50%, transparent 50%);
  background-position: calc(100% - 14px) 14px, calc(100% - 9px) 14px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: border-color 0.15s;
}
.lead-card-status:focus { border-color: #0071e3; outline: none; }
.lead-card-status:disabled { opacity: 0.5; cursor: default; }
.lead-card-status option { background: #1d1d1f; color: #f5f5f7; }

/* ─── OUTREACH SUB-NAV (Phase 2 · Outreach Stage 2) ─────── */
.outreach-subnav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 22px;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.outreach-subtab {
  background: transparent;
  border: none;
  color: #86868b;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
}
.outreach-subtab:hover { color: #f5f5f7; }
.outreach-subtab.active {
  color: #f5f5f7;
  background: rgba(255,255,255,0.08);
}
.outreach-subtab-count { font-size: 11px; opacity: 0.6; margin-left: 2px; }
.outreach-subnav-spacer { flex: 1; }
.outreach-new-campaign {
  background: #0071e3;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  height: 28px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.outreach-new-campaign[hidden] { display: none; }
.outreach-new-campaign:hover { background: #0077ed; }

.outreach-subpane { display: none; }
.outreach-subpane.active { display: block; }
.outreach-subpane[hidden] { display: none !important; }

/* ─── CAMPAIGNS LIST ────────────────────────────────────── */
.campaigns-list {
  max-width: 920px;
  margin: 0 auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.campaign-card {
  background: #1d1d1f;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.campaign-card.status-paused { opacity: 0.7; }
.campaign-card.status-done   { opacity: 0.5; }
.campaign-card-header {
  grid-column: 1 / 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.campaign-card-name {
  font-size: 15px;
  font-weight: 500;
  color: #f5f5f7;
}
.campaign-card-status {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
}
.campaign-card-status.status-running { background: rgba(48,209,88,0.15); color: #30d158; }
.campaign-card-status.status-paused  { background: rgba(255,159,10,0.15); color: #ff9f0a; }
.campaign-card-status.status-done    { background: rgba(255,255,255,0.08); color: #86868b; }
.campaign-card-meta {
  grid-column: 1 / 3;
  font-size: 12px;
  color: #86868b;
}
.campaign-card-counts {
  grid-column: 1 / 2;
  display: flex;
  gap: 24px;
  align-items: baseline;
}
.campaign-card-counts > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.cnt-num   { font-size: 18px; font-weight: 500; color: #f5f5f7; line-height: 1; }
.cnt-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: #86868b; }
.campaign-card-actions { grid-column: 2; justify-self: end; }

/* ─── INBOX LIST ────────────────────────────────────────── */
.inbox-list {
  max-width: 920px;
  margin: 0 auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.inbox-row {
  background: #1d1d1f;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.inbox-row.stage-replied  { border-left: 3px solid rgba(48,209,88,0.5); }
.inbox-row.stage-handling { border-left: 3px solid rgba(255,159,10,0.5); }
.inbox-row-name {
  font-size: 14px; font-weight: 500; color: #f5f5f7;
}
.inbox-row-meta { font-size: 12px; color: #86868b; margin-top: 2px; }
.inbox-row-stage { text-transform: uppercase; letter-spacing: 0.04em; font-size: 10px; opacity: 0.8; }
.inbox-row-snippet {
  margin-top: 6px;
  font-size: 13px; color: #d2d2d7;
  font-style: italic;
  background: rgba(255,255,255,0.03);
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 2px solid rgba(48,209,88,0.4);
}
.inbox-row-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.inbox-sara-stub {
  background: transparent;
  border: 1px dashed rgba(255,255,255,0.15);
  color: #86868b;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: not-allowed;
  font-family: inherit;
}
.inbox-row-sara-label {
  margin-top: 8px;
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}
.inbox-row-sara-label.sara-draft       { background: rgba(175,82,222,0.18); color: #d8a5ff; }
.inbox-row-sara-label.sara-auto_sent   { background: rgba(48,209,88,0.18);  color: #30d158; }
.inbox-row-sara-label.sara-escalated   { background: rgba(255,159,10,0.18); color: #ff9f0a; }
.inbox-row-sara-label.sara-auto_failed { background: rgba(255,69,58,0.18);  color: #ff453a; }
.inbox-row-sara-draft {
  margin-top: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: #d2d2d7;
  background: rgba(255,255,255,0.03);
  border-left: 2px solid rgba(175,82,222,0.4);
  border-radius: 4px;
  font-style: italic;
}
.inbox-open {
  background: #2c2c2e;
  border: 1px solid rgba(255,255,255,0.1);
  color: #d2d2d7;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.inbox-open:hover { border-color: rgba(255,255,255,0.2); color: #f5f5f7; }

/* ─── Inbox Sara per-thread toggle ──────────────────────── */
.inbox-row-sara-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
}
.inbox-row-sara-toggle small {
  color: #86868b;
  font-size: 11px;
  letter-spacing: 0.03em;
}
.inbox-sara-select {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #d2d2d7;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: inherit;
  cursor: pointer;
}
.inbox-sara-select:hover { border-color: rgba(255,255,255,0.18); }

/* ─── Campaign-card reply_mode chip + Edit button ──────── */
.campaign-card-mode-chip {
  grid-column: 1 / -1;
  margin-top: 2px;
  display: inline-block;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  justify-self: start;
}
.campaign-card-mode-chip.mode-agent      { background: rgba(255,255,255,0.05); color: #86868b; }
.campaign-card-mode-chip.mode-sara_draft { background: rgba(175,82,222,0.18); color: #d8a5ff; }
.campaign-card-mode-chip.mode-sara_auto  { background: rgba(48,209,88,0.18);  color: #30d158; }
.campaign-card-edit {
  margin-left: 6px;
}

/* ─── Cam "Update <name>" edit-confirm card ───────────── */
.cam-edit-card .cam-camp-icon { background: rgba(175,82,222,0.18); color: #d8a5ff; }
.cam-edit-body {
  padding: 8px 12px;
  font-size: 13px;
  color: #d2d2d7;
}
.cam-edit-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  flex-wrap: wrap;
}
.cam-edit-key {
  color: #86868b;
  font-size: 12px;
  letter-spacing: 0.02em;
  min-width: 90px;
}
.cam-edit-arrow { color: #86868b; }
.cam-edit-row small { color: #86868b; font-size: 11px; }
.cam-edit-steps {
  margin: 6px 0 0 24px;
  padding-left: 0;
  list-style: decimal;
}
.cam-edit-steps li {
  padding: 4px 0;
  font-size: 12px;
}
.cam-edit-steps small {
  color: #86868b;
  display: block;
  margin-bottom: 2px;
}

/* ─── Inline campaign-edit overlay (Outreach UI) ──────── */
.campaign-edit-overlay .cb-modal {
  position: relative;
  background: #1d1d1f;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  width: min(480px, 92vw);
  padding: 0;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
}
.campaign-edit-overlay .cb-modal-head {
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.campaign-edit-overlay .cb-modal-title { font-size: 15px; }
.campaign-edit-overlay .cb-modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.campaign-edit-overlay .cb-modal-body label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #86868b; }
.campaign-edit-overlay .cb-modal-body input,
.campaign-edit-overlay .cb-modal-body select {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #f5f5f7;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
}
.campaign-edit-overlay .cb-modal-foot {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.campaign-edit-overlay .cb-modal-cancel,
.campaign-edit-overlay .cb-modal-save {
  font-family: inherit; font-size: 12px;
  padding: 7px 14px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: #f5f5f7;
  cursor: pointer;
}
.campaign-edit-overlay .cb-modal-save {
  background: #0071e3; border-color: #0071e3;
}
.campaign-edit-overlay .cb-modal-error { padding: 0 20px 12px; color: #ff453a; font-size: 12px; min-height: 1em; }

.inbox-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  margin-bottom: 12px;
}
.inbox-log-reply-btn {
  background: rgba(10,132,255,0.15);
  border: 1px solid rgba(10,132,255,0.35);
  color: #0a84ff;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.inbox-log-reply-btn:hover {
  background: rgba(10,132,255,0.22);
}
.inbox-toolbar-hint {
  font-size: 11.5px;
  color: #86868b;
  flex: 1;
}

/* Log-reply modal */
.log-reply-overlay .cb-modal {
  position: relative;
  background: #1d1d1f;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  width: min(560px, 96vw);
  padding: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  max-height: 92vh;
}
.log-reply-overlay .cb-modal-head {
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.log-reply-overlay .cb-modal-title { font-size: 15px; }
.log-reply-overlay .cb-modal-body {
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
}
.log-reply-overlay .cb-modal-body label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; color: #86868b;
}
.log-reply-overlay .cb-modal-body input,
.log-reply-overlay .cb-modal-body textarea,
.log-reply-overlay .cb-modal-body select {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #f5f5f7;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-family: inherit;
}
.log-reply-overlay .cb-modal-body textarea { min-height: 90px; resize: vertical; }
.lr-results {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.lr-result-row {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
}
.lr-result-row:last-child { border-bottom: none; }
.lr-result-row:hover { background: rgba(10,132,255,0.10); }
.lr-result-name { font-size: 13px; color: #f5f5f7; }
.lr-result-meta { font-size: 11px; color: #86868b; margin-top: 2px; }
.lr-empty { padding: 12px; color: #86868b; font-size: 12px; text-align: center; }
.lr-picked {
  background: rgba(48,209,88,0.10);
  border: 1px solid rgba(48,209,88,0.30);
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 13px;
  color: #d2d2d7;
}
.lr-change {
  color: #0a84ff; font-size: 11px; cursor: pointer; margin-left: 6px;
}
.lr-row { display: flex; gap: 10px; }
.lr-row label { flex: 1; }
.log-reply-overlay .cb-modal-foot {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; justify-content: flex-end; gap: 8px;
}
.log-reply-overlay .cb-modal-cancel,
.log-reply-overlay .cb-modal-save {
  font-family: inherit; font-size: 12px;
  padding: 7px 14px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent; color: #f5f5f7; cursor: pointer;
}
.log-reply-overlay .cb-modal-save {
  background: #0071e3; border-color: #0071e3;
}
.log-reply-overlay .cb-modal-save:disabled {
  opacity: 0.5; cursor: not-allowed;
}
.log-reply-overlay .cb-modal-error {
  padding: 0 20px 12px; color: #ff453a; font-size: 12px; min-height: 1em;
}

.inbox-health-banner {
  display: flex;
  gap: 12px;
  background: rgba(255,159,10,0.10);
  border: 1px solid rgba(255,159,10,0.30);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  color: #ffcb70;
  font-size: 12.5px;
  line-height: 1.5;
}
.inbox-health-icon { font-size: 20px; color: #ff9f0a; flex: 0 0 auto; }
.inbox-health-body { flex: 1; min-width: 0; }
.inbox-health-title { font-size: 13px; color: #ffd58a; font-weight: 500; margin-bottom: 2px; }
.inbox-health-sub   { font-size: 11px; color: rgba(255,203,112,0.7); margin-bottom: 6px; letter-spacing: 0.02em; }
.inbox-health-detail { color: #d2d2d7; }
.inbox-health-detail strong { color: #f5f5f7; }
.inbox-health-detail em     { color: #ffcb70; font-style: normal; }

.cam-camp-newleads {
  margin: 8px 16px;
  padding: 8px 12px;
  background: rgba(48,209,88,0.10);
  border: 1px dashed rgba(48,209,88,0.35);
  border-radius: 8px;
  font-size: 12px;
  color: #30d158;
  letter-spacing: 0.01em;
}

/* Phase 4 · Memory layer */
.lead-card-fubadge {
  display: inline-block;
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 5px;
  margin-bottom: 5px;
  letter-spacing: 0.02em;
}
.lead-card-fubadge.overdue {
  background: rgba(255,69,58,0.18); color: #ff453a;
}
.lead-card-fubadge.due-soon {
  background: rgba(255,159,10,0.18); color: #ff9f0a;
}

.cp-lead-fu-group .cp-lead-fu-body {
  padding: 10px 16px 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.cp-lead-fu-body label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: #86868b;
}
.cp-lead-fu-body input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #f5f5f7;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}
.cp-lead-fu-actions {
  display: flex; gap: 8px; justify-content: flex-end;
}
.cp-lead-fu-actions button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: #f5f5f7;
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.cp-lead-fu-actions .cp-lead-fu-save {
  background: #0071e3; border-color: #0071e3;
}
.cp-lead-fu-actions .cp-lead-fu-complete {
  background: rgba(48,209,88,0.18);
  border-color: rgba(48,209,88,0.35);
  color: #30d158;
}

.cam-followup-card .cam-camp-icon {
  background: rgba(255,159,10,0.18); color: #ff9f0a;
}

/* ─── Phase 3 · Lead Intelligence — card badges + chips ── */
.lead-card-typebadge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.lead-card-typebadge.type-buyer  { background: rgba(48,209,88,0.18);  color: #30d158; }
.lead-card-typebadge.type-seller { background: rgba(255,159,10,0.18); color: #ff9f0a; }
.lead-card-chips {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin: 6px 0;
}
.lead-card-chip {
  background: rgba(255,255,255,0.05);
  color: #d2d2d7;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.06);
}

/* ─── Lead detail overlay (Salesforce-style CRM panel) ─── */
.cp-lead-overlay {
  position: fixed; inset: 0;
  z-index: 9300;
  background: rgba(0,0,0,0.72);
  display: flex; align-items: stretch; justify-content: flex-end;
  padding: 0;
}
.cp-lead-panel {
  background: #1d1d1f;
  border-left: 1px solid rgba(255,255,255,0.1);
  width: min(720px, 96vw);
  height: 100vh;
  overflow-y: auto;
  box-shadow: -24px 0 60px rgba(0,0,0,0.6);
  display: flex; flex-direction: column;
}
.cp-lead-loading {
  padding: 32px; color: #86868b; font-size: 13px;
}
.cp-lead-header {
  padding: 20px 24px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  background: rgba(255,255,255,0.02);
}
.cp-lead-titles { min-width: 0; flex: 1; }
.cp-lead-name {
  font-size: 22px; font-weight: 500; color: #f5f5f7;
  cursor: pointer; padding: 2px 4px; margin-left: -4px; border-radius: 4px;
}
.cp-lead-name:hover { background: rgba(255,255,255,0.04); }
.cp-lead-sub {
  font-size: 12px; color: #86868b; margin-top: 4px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.cp-lead-phone { cursor: pointer; padding: 1px 4px; border-radius: 3px; }
.cp-lead-phone:hover { background: rgba(255,255,255,0.04); color: #d2d2d7; }
.cp-lead-typebadge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 5px;
}
.cp-lead-typebadge.type-buyer  { background: rgba(48,209,88,0.22);  color: #30d158; }
.cp-lead-typebadge.type-seller { background: rgba(255,159,10,0.22); color: #ff9f0a; }
.cp-lead-header-actions {
  display: flex; align-items: center; gap: 10px;
}
.cp-lead-status {
  background: rgba(255,255,255,0.04);
  color: #f5f5f7;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
}
.cp-lead-source { color: #86868b; font-size: 11px; }
.cp-lead-close {
  background: transparent; border: none; color: #86868b;
  font-size: 22px; width: 30px; height: 30px;
  cursor: pointer; border-radius: 6px;
}
.cp-lead-close:hover { color: #f5f5f7; background: rgba(255,255,255,0.05); }

.cp-lead-body {
  padding: 16px 20px 36px;
  display: flex; flex-direction: column; gap: 18px;
}
.cp-lead-group {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
}
.cp-lead-group-head {
  padding: 12px 16px 8px;
  font-size: 11px;
  color: #86868b;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cp-lead-group-head a {
  color: #0a84ff;
  text-decoration: none;
  text-transform: none;
  font-size: 12px;
  letter-spacing: 0;
}
.cp-lead-group-head a:hover { text-decoration: underline; }
.cp-lead-group-body { padding: 8px 0; }

.cp-lead-field {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 8px 16px;
  border-top: 1px solid rgba(255,255,255,0.03);
}
.cp-lead-field:first-child { border-top: none; }
.cp-lead-field.is-empty .cp-lead-field-value { color: #555; }
.cp-lead-field-label {
  font-size: 12px;
  color: #86868b;
}
.cp-lead-field-value {
  font-size: 13px;
  color: #f5f5f7;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  min-height: 24px;
}
.cp-lead-field-value:hover { background: rgba(255,255,255,0.04); }
.cp-lead-field-empty {
  color: #555;
  font-style: italic;
  font-size: 12px;
}
.cp-lead-field-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.cp-lead-tag {
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}
.cp-lead-tag.tag-inferred  { background: rgba(255,159,10,0.18); color: #ff9f0a; }
.cp-lead-tag.tag-confirmed { background: rgba(48,209,88,0.18);  color: #30d158; }
.cp-lead-tag.tag-manual    { background: rgba(10,132,255,0.18); color: #0a84ff; }
.cp-lead-field-select {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #f5f5f7;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-family: inherit;
}
.cp-lead-inline-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(10,132,255,0.4);
  color: #f5f5f7;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
}

.cp-lead-tag-pill {
  display: inline-block;
  background: rgba(175,82,222,0.18);
  color: #d8a5ff;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11px;
  margin: 0 16px 8px;
}
.cp-lead-notes-wrap { padding: 8px 16px; }
.cp-lead-notes {
  width: 100%;
  min-height: 64px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: #f5f5f7;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}
.cp-lead-notes-actions { text-align: right; margin-top: 6px; }
.cp-lead-notes-save {
  background: #0071e3; color: #fff; border: none;
  font-size: 12px; padding: 6px 14px; border-radius: 6px; cursor: pointer;
}

.cp-lead-convo-group { max-height: 380px; display: flex; flex-direction: column; }
.cp-lead-convo-body {
  overflow-y: auto;
  padding: 8px 16px 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.cp-lead-convo-empty { color: #555; font-size: 12px; padding: 12px; }
.cp-lead-msg {
  padding: 7px 10px; border-radius: 8px; max-width: 80%;
  font-size: 12.5px;
}
.cp-lead-msg.dir-out {
  background: rgba(10,132,255,0.15);
  color: #d2d2d7;
  align-self: flex-end;
}
.cp-lead-msg.dir-in {
  background: rgba(255,255,255,0.04);
  color: #f5f5f7;
  align-self: flex-start;
}
.cp-lead-msg-meta { font-size: 10px; color: #86868b; margin-top: 3px; }
.cp-lead-msg.is-manual {
  border-left: 2px solid rgba(175,82,222,0.45);
}
.cp-lead-msg.is-manual.dir-in  { background: rgba(175,82,222,0.10); }
.cp-lead-msg.is-manual.dir-out { background: rgba(175,82,222,0.10); }

/* Inline composer — paste a reply / log a call note */
.cp-lead-composer {
  margin: 12px 16px 8px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.10);
  border-radius: 10px;
}
.cp-lead-composer-head {
  font-size: 11px;
  color: #86868b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.cp-lead-composer-text {
  width: 100%;
  min-height: 70px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 7px;
  color: #f5f5f7;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}
.cp-lead-composer-row {
  display: flex; align-items: end; gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.cp-lead-composer-row label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px; color: #86868b;
  flex: 1; min-width: 140px;
}
.cp-lead-composer-row select {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #f5f5f7;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
}
.cp-lead-composer-save {
  background: #0071e3; color: #fff; border: none;
  font-size: 13px; padding: 7px 16px; border-radius: 7px; cursor: pointer;
  font-family: inherit;
}
.cp-lead-composer-save:disabled { opacity: 0.6; cursor: wait; }
.cp-lead-composer-status {
  margin-top: 6px;
  font-size: 11px;
  color: #86868b;
  min-height: 1em;
}

/* ─── CAMPAIGN BUILDER MODAL ────────────────────────────── */
.cb-modal {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cb-modal[hidden] { display: none; }
.cb-modal-card {
  background: #1d1d1f;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.cb-modal-header {
  padding: 20px 24px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.cb-modal-title {
  font-size: 18px; font-weight: 500;
  margin: 0 0 4px;
}
.cb-step-indicator { font-size: 12px; color: #86868b; }
.cb-modal-close {
  background: transparent;
  border: none;
  color: #86868b;
  font-size: 22px;
  width: 28px; height: 28px;
  cursor: pointer;
  border-radius: 6px;
}
.cb-modal-close:hover { color: #f5f5f7; background: rgba(255,255,255,0.05); }
.cb-modal-body {
  padding: 18px 24px;
  overflow-y: auto;
  flex: 1;
}
.cb-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}
.cb-modal-footer-spacer { flex: 1; }
.cb-back, .cb-next, .cb-launch {
  background: #0071e3;
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.cb-back { background: transparent; border: 1px solid rgba(255,255,255,0.15); color: #d2d2d7; }
.cb-back:hover { border-color: rgba(255,255,255,0.3); color: #f5f5f7; }
.cb-next:hover, .cb-launch:hover { background: #0077ed; }
.cb-launch { background: #30d158; color: #000; font-weight: 600; }
.cb-launch:hover { background: #2bbb4d; }
.cb-launch:disabled { opacity: 0.6; cursor: default; }
.cb-msg { font-size: 12px; }

.cb-step { display: flex; flex-direction: column; gap: 14px; }
.cb-step h4 { font-size: 15px; font-weight: 500; margin: 0 0 4px; color: #f5f5f7; }
.cb-hint { font-size: 12px; color: #86868b; margin: 0; line-height: 1.5; }
.cb-hint code {
  background: rgba(255,255,255,0.06);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}
.cb-hint-info { color: #4ea1ff; }
.cb-hint-inline { font-size: 11px; color: #86868b; }

/* Source toggle */
.cb-source-toggle {
  display: flex;
  gap: 4px;
  background: #2c2c2e;
  border-radius: 8px;
  padding: 4px;
}
.cb-source-toggle button {
  flex: 1;
  background: transparent;
  border: none;
  color: #86868b;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, background 0.15s;
}
.cb-source-toggle button.active {
  background: #1d1d1f;
  color: #f5f5f7;
}

.cb-search-row input {
  width: 100%;
  height: 36px;
  background: #2c2c2e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px; color: #f5f5f7;
  outline: none;
  font-family: inherit;
}
.cb-search-row input:focus { border-color: #0071e3; }

.cb-leads-list {
  max-height: 320px;
  overflow-y: auto;
  background: #16161a;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 4px;
}
.cb-empty {
  padding: 24px;
  text-align: center;
  color: #86868b;
  font-size: 13px;
}
.cb-lead-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.cb-lead-row:hover { background: rgba(255,255,255,0.04); }
.cb-lead-row input[type="checkbox"] { margin: 0; }
.cb-lead-row input[type="checkbox"]:disabled { opacity: 0.4; }
.cb-lead-info { flex: 1; }
.cb-lead-name { font-size: 13px; color: #f5f5f7; font-weight: 500; }
.cb-lead-meta { font-size: 11px; color: #86868b; margin-top: 2px; }
.cb-lead-src {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 10px;
}
.cb-no-phone {
  background: rgba(255,69,58,0.15);
  color: #ff453a;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  margin-left: 4px;
}
.cb-leads-summary {
  text-align: right;
  font-size: 12px;
  color: #86868b;
}
.cb-leads-summary span { color: #f5f5f7; font-weight: 500; }

/* Step 2 — messages */
.cb-message-steps { display: flex; flex-direction: column; gap: 12px; }
.cb-msg-step {
  background: #16161a;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cb-msg-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #d2d2d7;
}
.cb-msg-step-header strong { font-weight: 500; }
.cb-day-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #86868b;
  margin-left: auto;
}
.cb-day-input, .cb-amt-input {
  width: 48px;
  height: 24px;
  background: #2c2c2e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 5px;
  padding: 0 6px;
  font-size: 12px;
  color: #f5f5f7;
  text-align: center;
}
.cb-unit-select {
  height: 24px;
  background: #2c2c2e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 5px;
  padding: 0 18px 0 6px;
  font-size: 12px;
  color: #f5f5f7;
  font-family: inherit;
  appearance: none; -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #86868b 50%),
    linear-gradient(135deg, #86868b 50%, transparent 50%);
  background-position: calc(100% - 9px) 10px, calc(100% - 6px) 10px;
  background-size: 4px 4px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.cb-unit-select option { background: #1d1d1f; color: #f5f5f7; }
.cb-remove-step {
  background: transparent;
  border: none;
  color: #ff453a;
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
  font-family: inherit;
}
.cb-msg-text {
  width: 100%;
  background: #2c2c2e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px; color: #f5f5f7;
  font-family: inherit;
  resize: vertical;
  outline: none;
}
.cb-msg-text:focus { border-color: #0071e3; }
.cb-add-followup {
  background: transparent;
  border: 1px dashed rgba(255,255,255,0.15);
  color: #86868b;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.cb-add-followup:hover { border-color: rgba(0,113,227,0.5); color: #4ea1ff; }
.cb-ai-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #d2d2d7;
  padding: 8px 0;
}

/* Step 3 — channel */
.cb-channel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.cb-channel-btn {
  background: #2c2c2e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  font-family: inherit;
  color: #d2d2d7;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.cb-channel-btn:hover:not(:disabled) { border-color: rgba(0,113,227,0.5); }
.cb-channel-btn.active {
  background: rgba(0,113,227,0.12);
  border-color: #0071e3;
}
.cb-channel-btn:disabled { opacity: 0.4; cursor: default; }
.cb-channel-name { font-size: 14px; font-weight: 500; color: #f5f5f7; }
.cb-channel-meta { font-size: 11px; color: #86868b; margin-top: 2px; }

/* Step 4 — goal + summary */
.cb-step[data-step="4"] label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #86868b;
}
.cb-step[data-step="4"] input[type="text"] {
  width: 100%;
  height: 40px;
  background: #2c2c2e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  color: #f5f5f7;
  outline: none;
  font-family: inherit;
}
.cb-step[data-step="4"] input[type="text"]:focus { border-color: #0071e3; }
.cb-launch-summary {
  background: #16161a;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.cb-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #86868b;
}
.cb-summary-row strong { color: #f5f5f7; font-weight: 500; }

/* ─── OUTREACH BOARD (Phase 2 · WA Stage B) ─────────────── */
.outreach-board {
  display: flex;
  gap: 14px;
  padding: 18px 22px 80px;
  overflow-x: auto;
  align-items: flex-start;
}
.outreach-board[hidden] { display: none; }
.outreach-col {
  flex: 0 0 240px;
  background: #1d1d1f;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 180px);
}
.outreach-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.outreach-col-title { font-size: 12px; font-weight: 500; color: #f5f5f7; }
.outreach-col-count {
  font-size: 12px; color: #86868b;
  background: rgba(255,255,255,0.06);
  border-radius: 10px; padding: 1px 8px;
}
.outreach-col.stage-replied  .outreach-col-title { color: #30d158; }
.outreach-col.stage-handling .outreach-col-title { color: #ff9f0a; }
.outreach-col.stage-closed   .outreach-col-title { color: #86868b; }
.outreach-col-body {
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto;
}
.outreach-col-empty {
  text-align: center; color: #58585c; font-size: 13px; padding: 14px 0;
}
.outreach-card {
  background: #2c2c2e;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  display: flex; flex-direction: column; gap: 4px;
}
.outreach-card:hover { border-color: rgba(255,255,255,0.16); }
.outreach-card-name { font-size: 14px; font-weight: 500; color: #f5f5f7; }
.outreach-card-phone {
  font-size: 12px; color: #86868b; font-variant-numeric: tabular-nums;
}
.outreach-card-time { font-size: 11px; color: #86868b; }
.outreach-card-snippet {
  font-size: 12px; color: #30d158;
  font-style: italic;
  background: rgba(48,209,88,0.06);
  border-left: 2px solid rgba(48,209,88,0.4);
  padding: 4px 8px;
  margin-top: 4px;
  border-radius: 4px;
}

/* ─── OUTREACH THREAD VIEW ──────────────────────────────── */
.outreach-thread {
  padding: 18px 22px 80px;
  max-width: 760px;
  margin: 0 auto;
}
.outreach-thread[hidden] { display: none; }
.outreach-thread-header {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  gap: 4px 14px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.outreach-back {
  grid-row: 1 / 4;
  background: transparent; border: 1px solid rgba(255,255,255,0.15);
  color: #d2d2d7; font-size: 12px; padding: 6px 10px;
  border-radius: 8px; cursor: pointer; font-family: inherit;
  align-self: start;
}
.outreach-back:hover { border-color: rgba(255,255,255,0.3); color: #f5f5f7; }
.outreach-thread-title {
  font-size: 17px; font-weight: 500; color: #f5f5f7;
}
.outreach-thread-meta {
  font-size: 12px; color: #86868b;
  font-variant-numeric: tabular-nums;
}
.outreach-thread-stage {
  grid-column: 2;
  justify-self: start;
  width: auto;
  height: 32px;
  background: #1f1f21;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 0 28px 0 10px;
  font-size: 12px; color: #d2d2d7;
  appearance: none; -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #86868b 50%),
    linear-gradient(135deg, #86868b 50%, transparent 50%);
  background-position: calc(100% - 14px) 14px, calc(100% - 9px) 14px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
  margin-top: 4px;
}
.outreach-thread-stage option { background: #1d1d1f; color: #f5f5f7; }

.outreach-messages {
  display: flex; flex-direction: column; gap: 10px;
}
.outreach-msg-row {
  display: flex; flex-direction: column; gap: 2px;
  max-width: 75%;
}
.outreach-msg-row.out { align-self: flex-end; align-items: flex-end; }
.outreach-msg-row.in  { align-self: flex-start; align-items: flex-start; }
.outreach-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px; line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.outreach-msg-row.out .outreach-msg-bubble {
  background: #0071e3; color: #fff;
  border-bottom-right-radius: 4px;
}
.outreach-msg-row.in  .outreach-msg-bubble {
  background: #2c2c2e; color: #f5f5f7;
  border-bottom-left-radius: 4px;
}
.outreach-msg-meta {
  font-size: 11px; color: #86868b;
  padding: 0 8px;
}
.outreach-empty {
  text-align: center; color: #86868b;
  padding: 40px 0;
  font-size: 14px;
}

/* ─── ADD LEAD MODAL ────────────────────────────────────── */
.leads-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
/* `display: flex` above otherwise overrides the [hidden] attribute. */
.leads-modal[hidden] { display: none; }
.leads-modal-card {
  background: #1d1d1f;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.leads-modal-card h3 {
  margin-bottom: 18px;
  font-size: 17px;
  font-weight: 500;
}
.leads-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.team-btn-ghost {
  height: 40px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #d2d2d7;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.team-btn-ghost:hover { border-color: rgba(255,255,255,0.3); color: #f5f5f7; }

/* ─── CONNECT WHATSAPP PANEL (Team page) ─────────────────── */
.team-wa-card { padding: 24px; margin-bottom: 16px; }
.team-wa-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}
.team-wa-status { font-size: 13px; color: #86868b; min-height: 16px; }
.team-wa-qr-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
/* `display: flex` above otherwise wins over the [hidden] attribute. */
.team-wa-qr-wrap[hidden],
.team-wa-connected[hidden] { display: none; }
.team-wa-qr {
  width: 220px; height: 220px;
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  display: block;
}
.team-wa-caption {
  font-size: 12px;
  color: #86868b;
  max-width: 300px;
  line-height: 1.5;
}
.team-wa-connected {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
}
.team-wa-ok { font-size: 14px; color: #30d158; font-weight: 500; }
.team-wa-jid {
  font-size: 12px; color: #86868b;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .crm-tabs { padding: 0 16px; }
  .leads-board { padding: 14px 16px 80px; gap: 10px; }
  .lead-col { flex: 0 0 260px; padding: 10px; }
}

/* ─── DATABASE CONSOLE (admin only) ─────────────────────────────── */
.dbc-wrap { display: flex; gap: 18px; max-width: 1500px; margin: 0 auto;
            padding: 0 22px 80px; }
.dbc-sidebar { flex: 0 0 240px; background: #0c0c0e; border: 1px solid #1e1e22;
               border-radius: 12px; padding: 14px; height: fit-content; }
.dbc-side-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
                  color: #888; margin: 4px 4px 10px; }
.dbc-side-item { display: flex; justify-content: space-between; align-items: center;
                 padding: 8px 10px; border-radius: 8px; cursor: pointer; gap: 8px;
                 font-size: 13px; color: #ddd; }
.dbc-side-item:hover { background: #1a1a1d; }
.dbc-side-item.active { background: #1e2942; color: #fff; }
.dbc-side-name { font-weight: 500; }
.dbc-side-meta { font-size: 11px; color: #888; }
.dbc-side-section { font-size: 11px; text-transform: uppercase; color: #666;
                    margin: 14px 4px 6px; letter-spacing: .08em; }

.dbc-main { flex: 1 1 0; min-width: 0; max-width: 100%; overflow: hidden;
            background: #0c0c0e; border: 1px solid #1e1e22;
            border-radius: 12px; padding: 14px; box-sizing: border-box; }
.dbc-main > * { box-sizing: border-box; }
.dbc-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
               padding-bottom: 12px; border-bottom: 1px solid #1e1e22; }
.dbc-name { font-size: 16px; font-weight: 600; }
.dbc-search { flex: 1 1 240px; min-width: 200px; background: #0c0c0e;
              border: 1px solid #1e1e22; color: #eee; padding: 8px 12px;
              border-radius: 8px; font-size: 13px; }
.dbc-search:focus { outline: none; border-color: #0071e3; }
.dbc-page-size { background: #0c0c0e; border: 1px solid #1e1e22; color: #ddd;
                 padding: 7px 10px; border-radius: 8px; font-size: 13px; }
.dbc-btn { background: transparent; border: 1px solid #2a4d83; color: #6ab7ff;
           padding: 7px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.dbc-btn:hover:not(:disabled) { background: #11233f; }
.dbc-btn:disabled { opacity: 0.4; cursor: default; }

.dbc-status { font-size: 12px; color: #888; padding: 10px 2px; }
.dbc-table-scroll { overflow: auto; max-height: calc(100vh - 360px);
                    border: 1px solid #1e1e22; border-radius: 8px; }
.dbc-table { width: 100%; border-collapse: collapse; font-size: 12px;
             font-family: ui-monospace, SF Mono, Menlo, monospace; }
.dbc-table th { position: sticky; top: 0; background: #1a1a1d; color: #ddd;
                text-align: left; padding: 8px 10px; border-bottom: 1px solid #1e1e22;
                white-space: nowrap; font-weight: 600; }
.dbc-table th[data-sortable="1"] { cursor: pointer; user-select: none; }
.dbc-table th[data-sortable="1"]:hover { background: #20232a; }
.dbc-table th.dbc-redacted { color: #ff9f0a; }
.dbc-table td { padding: 6px 10px; border-bottom: 1px solid #15151a;
                color: #ccc; max-width: 320px; overflow: hidden;
                text-overflow: ellipsis; white-space: nowrap; }
.dbc-table tr:hover td { background: #14151b; }
.dbc-table tr { cursor: pointer; }
.dbc-table td.dbc-null { color: #555; font-style: italic; }
.dbc-table td.dbc-redacted { color: #ff9f0a; font-style: italic; }

.dbc-pager { display: flex; gap: 8px; align-items: center; padding-top: 12px; }
.dbc-page-btn { background: transparent; border: 1px solid #2a2a2e; color: #ddd;
                padding: 6px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.dbc-page-btn:hover:not(:disabled) { background: #1a1a1d; }
.dbc-page-btn:disabled { opacity: 0.4; cursor: default; }
.dbc-page-info { margin: 0 auto; font-size: 12px; color: #888; }

.dbc-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex;
             align-items: center; justify-content: center; z-index: 200; padding: 30px; }
.dbc-modal[hidden] { display: none !important; }
.dbc-modal-card { background: #131316; border: 1px solid #2a2a2e; border-radius: 12px;
                  width: 100%; max-width: 800px; max-height: 86vh; display: flex;
                  flex-direction: column; }
.dbc-modal-head { padding: 14px 18px; border-bottom: 1px solid #1e1e22;
                  display: flex; justify-content: space-between; align-items: center; }
.dbc-modal-close { background: transparent; border: 0; color: #888; font-size: 24px;
                   cursor: pointer; line-height: 1; padding: 0 6px; }
.dbc-modal-close:hover { color: #fff; }
.dbc-modal-body { padding: 16px 18px; overflow: auto; }
.dbc-rec-row { display: grid; grid-template-columns: 200px 1fr; gap: 12px;
               padding: 6px 0; border-bottom: 1px solid #1a1a1d; font-size: 13px; }
.dbc-rec-row:last-child { border-bottom: 0; }
.dbc-rec-key { color: #888; font-family: ui-monospace, SF Mono, Menlo, monospace; }
.dbc-rec-val { color: #ddd; word-break: break-word; white-space: pre-wrap; }
.dbc-rec-val.dbc-null { color: #555; font-style: italic; }
.dbc-rec-val.dbc-redacted { color: #ff9f0a; font-style: italic; }

.dbc-empty { color: #888; font-size: 13px; padding: 12px; text-align: center; }
@media (max-width: 920px) {
  .dbc-wrap { flex-direction: column; }
  .dbc-sidebar { flex: 0 0 auto; }
}

/* Leads: Active/Closed view toggle + Reopen (item 7 — terminal-but-archived) */
.leads-view-toggle { display: inline-flex; gap: 2px; background: #1c1c1e; border-radius: 8px; padding: 2px; }
.leads-view-btn { border: 0; background: transparent; color: #98989d; font-size: 13px; padding: 5px 14px; border-radius: 6px; cursor: pointer; }
.leads-view-btn.is-active { background: #0a84ff; color: #fff; }
.lead-card-reopen { margin-top: 8px; width: 100%; border: 1px solid #0a84ff; background: transparent; color: #0a84ff; font-size: 13px; padding: 6px 0; border-radius: 6px; cursor: pointer; }
.lead-card-reopen:hover { background: rgba(10,132,255,0.12); }
.lead-card-reopen:disabled { opacity: 0.5; cursor: default; }

/* Leads: multi-value tag chips (item 8 — merge-with-tag) */
.lead-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.lead-card-tags .lead-card-tag { margin: 0; }
