/* ── LeadCove brand layer ───────────────────────────────────────────
   Loaded AFTER style.css (which is the original dashboard CSS).
   Only overrides the things that need to look "LeadCove" — sidebar
   header, wordmark typography, color tokens that were JRE-specific.
   Everything else (Mission Control layout, lead modal, tables, badges,
   tier-guide bar) is left alone — the modern feel Xavi loves stays.
   ───────────────────────────────────────────────────────────────── */

:root {
  /* Coastal palette — mirrors leadcove-site/styles.css */
  --lc-navy:    #0B2545;
  --lc-navy-2:  #13335f;
  --lc-teal:    #0E9F95;
  --lc-teal-2:  #0B807A;
  --lc-cream:   #FBF8F3;
  --lc-sand:    #F5EDE1;
  --lc-ink:     #0F172A;
  --lc-muted:   #64748B;
  --f-display:  'Fraunces', Georgia, serif;
  --f-sans:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* ── Sidebar brand block ─────────────────────────────────────────── */
.sidebar-logo.lc-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* The wave + sun mark — teal on the existing dark sidebar */
.sidebar-logo.lc-brand .lc-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  color: var(--lc-teal);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* Wordmark — Fraunces serif, slightly oversized vs default font */
.lc-wordmark {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #fff;
}

/* Agent name (dynamically populated from /api/me) */
.lc-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.lc-agent-name {
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.62);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile header wordmark — uses Fraunces; inherits color from parent */
.mobile-header .lc-wordmark {
  font-size: 18px;
  color: var(--lc-navy);
}

/* ── Optional: Beta pill in the sidebar header ──────────────────── */
.lc-beta-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  background: var(--lc-teal);
  color: #fff;
  font-family: var(--f-sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  vertical-align: middle;
  position: relative; top: -2px;
}

/* ── Demo / first-run banner — soft cream → keep the existing
     positioning but match marketing-site warmth instead of the JRE
     yellow ──────────────────────────────────────────────────────── */
.demo-banner {
  background: var(--lc-sand);
  border: 1px solid rgba(11,37,69,0.08);
  color: var(--lc-navy);
}
.demo-banner a {
  color: var(--lc-teal-2);
  font-weight: 600;
}
.demo-banner a:hover { color: var(--lc-teal); }
.demo-banner-dot {
  background: var(--lc-teal);
}

/* ── Body font — adopt Inter where the existing CSS used the system stack
     (this is a tiny refinement; leave unchanged anywhere style.css
     explicitly picked a different font) ────────────────────────── */
body {
  font-family: var(--f-sans);
}

/* ── Hide the old JRE monogram if any orphan markup ever sneaks in ── */
.logo-mark { display: none; }

/* ── Upload data button + credits pill (sidebar) ────────────────── */
.lc-upload-block {
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-direction: column; gap: 8px;
}
.lc-upload-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--lc-teal);
  color: #fff;
  border: 0; border-radius: 10px;
  font-family: var(--f-sans);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .06s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.lc-upload-btn:hover  { background: var(--lc-teal-2); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(14,159,149,0.35); }
.lc-upload-btn:active { transform: translateY(0); }
.lc-upload-btn { width: 100%; }
.lc-upload-icon { font-size: 16px; line-height: 1; font-weight: 400; }
.lc-credits {
  display: flex; align-items: baseline; gap: 4px;
  padding: 5px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 7px;
  font-family: var(--f-sans);
  font-size: 12px;
  color: rgba(255,255,255,0.62);
  align-self: flex-start;
}
.lc-credits-num   { color: #fff; font-weight: 700; }
.lc-credits-label { letter-spacing: 0.04em; }

/* ── Drag-and-drop overlay (full-screen, activates on file drag) ─ */
.lc-drop-overlay {
  position: fixed; inset: 0;
  background: rgba(11,37,69,0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000;
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease-out;
}
.lc-drop-overlay.show { opacity: 1; pointer-events: auto; }
.lc-drop-card {
  background: #fff;
  padding: 48px 64px;
  border-radius: 18px;
  border: 2px dashed var(--lc-teal);
  text-align: center;
  box-shadow: 0 28px 64px rgba(0,0,0,0.3);
  max-width: 420px;
}
.lc-drop-icon { font-size: 56px; color: var(--lc-teal); line-height: 1; margin-bottom: 14px; }
.lc-drop-title { font-family: var(--f-display); font-size: 26px; font-weight: 600; color: var(--lc-navy); margin-bottom: 8px; }
.lc-drop-sub { color: var(--lc-muted); font-size: 14px; }

/* ── Upload preview / progress / result modal ───────────────────── */
.lc-upload-modal {
  position: fixed; inset: 0;
  background: rgba(11,37,69,0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9100;
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease-out;
}
.lc-upload-modal.show { opacity: 1; pointer-events: auto; }
.lc-upload-card {
  position: relative;
  background: #fff;
  padding: 36px 36px 30px;
  border-radius: 18px;
  width: min(560px, 92vw);
  max-height: 88vh;
  overflow: auto;
  box-shadow: 0 28px 64px rgba(0,0,0,0.32);
  font-family: var(--f-sans);
  color: var(--lc-ink);
}
.lc-upload-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  background: transparent; border: 0; border-radius: 50%;
  font-size: 22px; line-height: 1; color: var(--lc-muted);
  cursor: pointer;
}
.lc-upload-close:hover { background: rgba(11,37,69,0.06); color: var(--lc-navy); }

.lc-upload-card h3 {
  font-family: var(--f-display);
  font-size: 24px; font-weight: 600;
  color: var(--lc-navy);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.lc-upload-card .lc-up-sub {
  color: var(--lc-muted);
  font-size: 14px;
  margin: 0 0 18px;
}
.lc-upload-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: rgba(11,37,69,0.05);
  padding: 1px 6px;
  border-radius: 4px;
}

.lc-up-mapping {
  background: var(--lc-cream);
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.lc-up-map-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  padding: 4px 0;
  color: var(--lc-ink);
}
.lc-up-map-target { font-weight: 600; min-width: 130px; }
.lc-up-map-arrow  { color: var(--lc-muted); }

.lc-up-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--lc-ink);
}

.lc-up-warning {
  padding: 12px 14px;
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  color: #92400E;
  border-radius: 9px;
  font-size: 13px;
  margin-bottom: 16px;
}

.lc-up-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 8px;
}
.lc-btn-primary, .lc-btn-ghost {
  padding: 10px 18px;
  border-radius: 9px;
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 0;
  transition: background .15s, transform .06s, opacity .15s;
}
.lc-btn-primary { background: var(--lc-navy); color: #fff; }
.lc-btn-primary:hover  { background: var(--lc-navy-2); }
.lc-btn-primary:active { transform: translateY(1px); }
.lc-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.lc-btn-ghost { background: transparent; color: var(--lc-muted); border: 1px solid #E2E8F0; }
.lc-btn-ghost:hover { color: var(--lc-navy); border-color: var(--lc-navy); }

.lc-up-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(14,159,149,0.18);
  border-top-color: var(--lc-teal);
  border-radius: 50%;
  animation: lc-spin .9s linear infinite;
  margin: 0 auto 22px;
}
@keyframes lc-spin { to { transform: rotate(360deg); } }

.lc-up-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0 22px;
}
.lc-up-stat {
  text-align: center;
  padding: 12px 8px;
  background: var(--lc-cream);
  border: 1px solid #E2E8F0;
  border-radius: 10px;
}
.lc-up-stat-num   { font-family: var(--f-display); font-size: 22px; font-weight: 600; color: var(--lc-navy); }
.lc-up-stat-label { font-size: 11px; color: var(--lc-muted); margin-top: 2px; letter-spacing: 0.02em; }

/* ── Sidebar pricing note (replaces the old credits pill) ────────── */
.lc-pricing-note {
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255,255,255,0.62);
  padding: 6px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 7px;
  align-self: flex-start;
}
.lc-pricing-note strong { color: #fff; font-weight: 700; }
.lc-pricing-note-sub  { color: rgba(255,255,255,0.45); }

/* ── First-run welcome modal ────────────────────────────────────── */
.lc-welcome-card { width: min(640px, 92vw); }
.lc-welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.lc-welcome-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.lc-welcome-grid-1 { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
@media (max-width: 760px) { .lc-welcome-grid, .lc-welcome-grid-3 { grid-template-columns: 1fr; } }
.lc-welcome-card-demo {
  border-color: rgba(14,159,149,0.35);
  background: linear-gradient(180deg, rgba(14,159,149,0.06), var(--lc-cream));
}
.lc-welcome-card-demo:hover {
  border-color: var(--lc-teal);
  box-shadow: 0 8px 20px rgba(14,159,149,0.18);
}

/* ── Sidebar "Buy credits" button ──────────────────────────────── */
.lc-buy-credits-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(14,159,149,0.14);
  color: #fff;
  border: 1px solid rgba(14,159,149,0.42);
  border-radius: 8px;
  font-family: var(--f-sans);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  width: 100%;
  box-sizing: border-box;
}
.lc-buy-credits-btn:hover {
  background: rgba(14,159,149,0.24);
  border-color: var(--lc-teal);
}

/* ── Buy-credits modal: pack picker grid ───────────────────────── */
.lc-billing-card { width: min(720px, 94vw); }
.lc-pack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 720px) { .lc-pack-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .lc-pack-grid { grid-template-columns: 1fr;     } }

.lc-pack-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 22px 12px 18px;
  background: var(--lc-cream);
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  cursor: pointer;
  font-family: var(--f-sans);
  color: var(--lc-ink);
  transition: border-color .15s, transform .08s, box-shadow .15s, background .15s;
}
.lc-pack-card:hover {
  border-color: var(--lc-teal);
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(11,37,69,0.10);
}
.lc-pack-best {
  border-color: var(--lc-teal);
  background: linear-gradient(180deg, rgba(14,159,149,0.08), var(--lc-cream));
}
.lc-pack-best-pill {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  padding: 3px 10px;
  background: var(--lc-teal);
  color: #fff;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 99px;
  box-shadow: 0 4px 10px rgba(14,159,149,0.4);
  white-space: nowrap;
}
.lc-pack-name    { font-size: 13px; font-weight: 600; color: var(--lc-muted); letter-spacing: 0.04em; text-transform: uppercase; }
.lc-pack-price   { font-family: var(--f-display); font-size: 32px; font-weight: 600; color: var(--lc-navy); letter-spacing: -0.02em; line-height: 1; margin-top: 2px; }
.lc-pack-credits { font-size: 13px; font-weight: 600; color: var(--lc-ink); margin-top: 6px; }
.lc-pack-rate    { font-size: 11px; color: var(--lc-muted); margin-top: 2px; }
.lc-pack-tag     { font-size: 11px; font-weight: 700; color: var(--lc-teal-2); margin-top: 8px; padding: 3px 9px; background: rgba(14,159,149,0.10); border-radius: 99px; }

/* ── Toast notifications (Stripe redirect-back, etc) ───────────── */
.lc-toast-host {
  position: fixed;
  top: 20px; right: 20px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9500;
  pointer-events: none;
}
.lc-toast {
  pointer-events: auto;
  padding: 12px 18px;
  background: var(--lc-navy);
  color: #fff;
  font-family: var(--f-sans);
  font-size: 13px;
  font-weight: 500;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(11,37,69,0.28);
  max-width: 420px;
  opacity: 0; transform: translateX(20px);
  transition: opacity .25s ease-out, transform .25s ease-out;
}
.lc-toast.show { opacity: 1; transform: translateX(0); }
.lc-toast-success { background: var(--lc-teal-2); }
.lc-toast-muted   { background: var(--lc-muted); }

/* ── Purchase success modal (after Stripe redirect-back) ─────────── */
.lc-purchase-success {
  padding: 12px 4px 4px;
}
.lc-success-check {
  display: flex; justify-content: center;
  margin-bottom: 4px;
  animation: lc-pop .35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes lc-pop {
  0%   { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}

/* ── Sidebar "Buy credits" button — split-state when balance > 0 ─── */
.lc-buy-credits-btn-has-balance {
  display: flex !important;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(14,159,149,0.18), rgba(14,159,149,0.10));
  border-color: rgba(14,159,149,0.5);
}
.lc-credits-balance {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.lc-credits-balance strong {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 24px;
  color: #5EEAD4;
  line-height: 1;
  letter-spacing: -0.01em;
  text-shadow: 0 0 12px rgba(94,234,212,0.4);
}
.lc-credits-buymore {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.72);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.lc-buy-credits-btn-has-balance:hover .lc-credits-buymore {
  color: #fff;
}

/* ── Reusable tooltip pattern (sidebar Buy-credits, future buttons) ── */
.lc-tooltip-wrap {
  position: relative;
  width: 100%;
}
.lc-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 280px;
  padding: 12px 14px;
  background: #fff;
  color: var(--lc-ink);
  border: 1px solid rgba(11,37,69,0.10);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
  font-family: var(--f-sans);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease-out, transform .14s ease-out;
  z-index: 100;
}
.lc-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #fff;
  filter: drop-shadow(0 1px 0 rgba(11,37,69,0.10));
}
.lc-tooltip-wrap:hover .lc-tooltip,
.lc-tooltip-wrap:focus-within .lc-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition-delay: .25s;
}
.lc-tooltip-title {
  font-weight: 700;
  color: var(--lc-navy);
  font-size: 12px;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.lc-tooltip-body {
  color: var(--lc-ink-2, #334155);
  font-weight: 400;
}
.lc-tooltip-body strong {
  color: var(--lc-navy);
  font-weight: 600;
}
.lc-welcome-card-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: var(--lc-cream);
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 22px 20px;
  cursor: pointer;
  font-family: var(--f-sans);
  color: var(--lc-ink);
  transition: border-color .15s, transform .08s, box-shadow .15s, background .15s;
  min-height: 280px;     /* keeps all 3 cards equal vertical even before fill */
}
.lc-welcome-card-btn:hover {
  border-color: var(--lc-teal);
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(11,37,69,0.08);
}
.lc-welcome-icon {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 14px;
  height: 32px;          /* fixed-height row so titles sit at same baseline */
  display: flex;
  align-items: center;
}
.lc-welcome-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--lc-navy);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 8px;
  min-height: 2.4em;     /* reserves 2 lines so 1-line and 2-line titles align */
  display: flex;
  align-items: flex-start;
}
.lc-welcome-desc {
  font-size: 13px;
  color: var(--lc-muted);
  line-height: 1.5;
  margin: 0 0 14px;
  flex: 1;               /* the magic: pushes the action row to the bottom */
}
.lc-welcome-action {
  font-size: 13px;
  font-weight: 600;
  color: var(--lc-teal-2);
  letter-spacing: 0.02em;
  white-space: nowrap;   /* never let the arrow orphan onto its own line */
  margin-top: auto;
}
.lc-welcome-card-btn:hover .lc-welcome-action { color: var(--lc-teal); }

/* ── Source-leads form fields ──────────────────────────────────── */
.lc-up-label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lc-ink);
}
.lc-up-label input,
.lc-up-label select,
.lc-up-label textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--lc-ink);
  background: #fff;
}
.lc-up-label input:focus,
.lc-up-label select:focus,
.lc-up-label textarea:focus {
  outline: none;
  border-color: var(--lc-teal);
  box-shadow: 0 0 0 3px rgba(14,159,149,0.15);
}
