/* =============================================================
   LEADPIPE — QUANTUM OPERATOR
   Editorial trading-terminal aesthetic.
   Instrument Serif (display, italic) · DM Sans (body) · JetBrains Mono (data)
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700;9..40,800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[x-cloak] { display: none !important; }

html, body { height: 100%; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11", "cv02";
  overflow-x: hidden;
  position: relative;
}

/* ---------- Tokens ---------- */
:root {
  /* paper / ink */
  --paper:    #16161b;
  --paper-2:  #1d1d23;
  --paper-3:  #25252c;
  --paper-4:  #2d2d35;
  --ink:      #f6f5f0;
  --ink-2:    #d8d7d0;
  --ink-3:    #a09e95;
  --ink-4:    #6e6c66;
  --ink-5:    #36353232;

  /* rules */
  --rule:        rgba(246,245,240,0.09);
  --rule-strong: rgba(246,245,240,0.17);
  --rule-vivid:  rgba(246,245,240,0.26);

  /* signature */
  --acid:       #d4ff3a;
  --acid-dim:   rgba(212,255,58,0.14);
  --acid-glow:  rgba(212,255,58,0.35);

  /* secondary */
  --vermilion:  #ff5a2b;
  --vermilion-dim: rgba(255,90,43,0.14);
  --jade:       #4ade80;
  --jade-dim:   rgba(74,222,128,0.12);
  --rose:       #f87171;
  --rose-dim:   rgba(248,113,113,0.12);
  --azure:      #7dd3fc;
  --azure-dim:  rgba(125,211,252,0.12);
  --orchid:     #d8b4fe;
  --orchid-dim: rgba(216,180,254,0.12);
  --sand:       #f5e9d4;

  /* legacy aliases (for inline styles in dashboard.html) */
  --bg-base: var(--paper);
  --bg-surface: var(--paper-2);
  --bg-elevated: var(--paper-3);
  --bg-card: var(--paper-2);
  --bg-overlay: var(--paper-4);
  --bg-hover: rgba(244,243,238,0.04);
  --text-primary: var(--ink);
  --text-secondary: var(--ink-2);
  --text-muted: var(--ink-3);
  --text-accent: var(--acid);
  --accent-primary: var(--acid);
  --accent-primary-dim: var(--acid-dim);
  --accent-blue: var(--azure);
  --accent-purple: var(--orchid);
  --accent-green: var(--jade);
  --accent-amber: var(--vermilion);
  --accent-red: var(--rose);
  --accent-cyan: var(--azure);
  --danger: var(--rose);
  --border: var(--rule);
  --border-default: var(--rule);
  --border-hover: var(--rule-strong);
  --border-subtle: var(--rule);

  /* radii — editorial = sharp */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-pill: 999px;

  /* shadows */
  --shadow-sm: 0 1px 0 rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.45);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.55);
  --shadow-glow: 0 0 0 1px rgba(212,255,58,0.18), 0 0 32px rgba(212,255,58,0.18);
  --glass: blur(0px); /* no glassmorphism here */

  /* fonts — pure sans-serif SaaS system */
  --serif: 'DM Sans', system-ui, sans-serif; /* legacy alias */
  --sans:  'DM Sans', system-ui, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, monospace;
  --font-display: var(--sans);

  --transition: all 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Atmosphere ---------- */
body::before {
  /* ambient color blooms */
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(212,255,58,0.07), transparent 60%),
    radial-gradient(700px 500px at 100% 110%, rgba(255,90,43,0.06), transparent 55%),
    radial-gradient(500px 400px at 100% 0%, rgba(125,211,252,0.04), transparent 60%);
  pointer-events: none; z-index: 0;
  transform: translateZ(0); /* Hardware acceleration */
}
body::after {
  /* film grain (Optimisé : sans mix-blend-mode ni animation lourde) */
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.96  0 0 0 0 0.95  0 0 0 0 0.93  0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  pointer-events: none; z-index: 0;
  transform: translateZ(0);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--rule-vivid); }

/* ---------- Selection ---------- */
::selection { background: var(--acid); color: var(--paper); }

/* =============================================================
   APP SHELL
   ============================================================= */
.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 264px 1fr;
  min-height: 100vh;
}
.main-wrap {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--rule);
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  padding: 28px 22px 22px;
  background: var(--paper);
  z-index: 10;
}
.sidebar__logo {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 28px;
}
.sidebar__logo .av {
  width: 34px; height: 34px;
  background: var(--acid);
  color: var(--paper);
  border-radius: 0;
  display: grid; place-items: center;
  border: none;
  box-shadow: 0 0 24px var(--acid-glow);
}
.sidebar__logo .av i { width: 16px; height: 16px; stroke-width: 2.5; }
.sidebar__logo span {
  font-family: var(--sans) !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  letter-spacing: -0.02em;
  color: var(--ink) !important;
}
.sidebar__logo span::after {
  content: " ®";
  font-size: 10px;
  color: var(--ink-3);
  vertical-align: super;
  margin-left: 2px;
}

.sidebar__tower {
  display: flex; flex-direction: column;
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 18px;
}
.sidebar__overline {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.sidebar__big-number {
  font-family: var(--sans) !important;
  font-style: normal;
  font-size: 38px;
  line-height: 1;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.035em;
  font-feature-settings: "tnum";
}
.sidebar__sub {
  margin-top: 10px;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: -0.005em;
}

.sb-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sb-section-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding: 22px 12px 8px;
}
.nav-item, .sb-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-2);
  text-align: left; cursor: pointer;
  transition: var(--transition);
  position: relative;
  width: 100%;
}
.nav-item i { width: 15px; height: 15px; stroke-width: 1.6; opacity: 0.7; }
.nav-item:hover { color: var(--ink); background: rgba(244,243,238,0.03); }
.nav-item:hover i { opacity: 1; }
.sb-item.active, .nav-item.active {
  color: var(--ink);
  background: rgba(244,243,238,0.04);
}
.sb-item.active::before, .nav-item.active::before {
  content: '';
  position: absolute; left: -22px; top: 8px; bottom: 8px; width: 2px;
  background: var(--acid);
  box-shadow: 0 0 10px var(--acid-glow);
}
.sb-item.active i, .nav-item.active i { color: var(--acid); opacity: 1; }

.sidebar__footer {
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 14px;
}
.sidebar__user { display: flex; align-items: center; gap: 12px; }
.sidebar__avatar {
  width: 32px; height: 32px;
  background: var(--paper-3);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}
.btn-logout {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink-2);
  padding: 9px 12px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border-radius: var(--radius-sm);
}
.btn-logout:hover {
  border-color: var(--vermilion);
  color: var(--vermilion);
  background: var(--vermilion-dim);
}
.btn-logout i { width: 13px; height: 13px; }

/* ---------- Topbar (mobile) ---------- */
.topbar {
  display: none;
  position: sticky; top: 0;
  align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  z-index: 9;
}
.topbar__hamburger {
  background: transparent; border: 1px solid var(--rule-strong);
  padding: 8px; color: var(--ink); cursor: pointer;
}
.topbar__brand { font-family: var(--serif); font-style: italic; font-size: 22px; }

/* ---------- Main / Content ---------- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}
.content-scroll { flex: 1; overflow-y: auto; }
.content {
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
  padding: 44px 56px 80px;
}

/* =============================================================
   TYPOGRAPHY
   ============================================================= */
.h1, .cockpit-title {
  font-family: var(--sans);
  font-weight: 700;
  font-style: normal;
  font-size: clamp(32px, 3.8vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.h2 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.section-title {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.text-muted { color: var(--ink-3); font-size: 13px; }
.text-data { color: var(--ink); font-family: var(--sans); }
.text-prospect-name { font-family: var(--sans); font-weight: 500; color: var(--ink); letter-spacing: -0.012em; }
.text-prospect-phone { font-family: var(--mono); color: var(--ink-2); font-feature-settings: "tnum"; }
.text-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.kpi-number {
  font-family: var(--sans) !important;
  font-style: normal !important;
  font-weight: 700;
  font-feature-settings: "tnum";
  letter-spacing: -0.03em;
  color: var(--ink);
}

/* =============================================================
   COCKPIT HEADER
   ============================================================= */
.cockpit-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding-bottom: 32px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.cockpit-header::after {
  /* editorial date stamp */
  content: 'EST. 2026 · OPS//PARIS';
  position: absolute;
  top: 0; right: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--ink-4);
}
.cockpit-header__left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cockpit-header__right { display: flex; align-items: center; gap: 10px; }

/* =============================================================
   BADGES
   ============================================================= */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
}
.badge-live {
  color: var(--acid);
  border-color: var(--acid-dim);
  background: var(--acid-dim);
  position: relative;
  padding-left: 18px;
}
.badge-live::before {
  content: '';
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 8px var(--acid-glow);
  animation: pulse-live 1.6s infinite;
}
@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
  50% { opacity: 0.5; transform: translateY(-50%) scale(1.3); }
}
.badge-sector {
  background: transparent;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  font-size: 9px;
  letter-spacing: 0.12em;
}

/* status badges (lead pipeline) */
.badge.pending,    .badge.not_called  { color: var(--ink-3);    border-color: var(--rule-strong); }
.badge.generated   { color: var(--azure);    border-color: var(--azure-dim);    background: var(--azure-dim); }
.badge.deployed,
.badge.interested  { color: var(--acid);     border-color: var(--acid-dim);     background: var(--acid-dim); }
.badge.callback    { color: var(--vermilion);border-color: var(--vermilion-dim);background: var(--vermilion-dim); }
.badge.rejected,
.badge.failed      { color: var(--rose);     border-color: var(--rose-dim);     background: var(--rose-dim); }
.badge.paid        { color: var(--acid);     border-color: var(--acid-dim);     background: var(--acid-dim); }

/* =============================================================
   BUTTONS
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn i { width: 14px; height: 14px; stroke-width: 1.8; }
.btn--icon { padding: 9px; }

.btn-primary, .btn-p {
  background: var(--acid);
  color: var(--paper);
  border-color: var(--acid);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.btn-primary:hover, .btn-p:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-ghost, .btn-g {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--rule-strong);
}
.btn-ghost:hover, .btn-g:hover { color: var(--ink); border-color: var(--rule-vivid); background: rgba(244,243,238,0.03); }

.btn-success { background: var(--jade-dim); color: var(--jade); border-color: rgba(74,222,128,0.3); }
.btn-success:hover { background: var(--jade); color: var(--paper); }
.btn-warning { background: var(--vermilion-dim); color: var(--vermilion); border-color: rgba(255,90,43,0.3); }
.btn-warning:hover { background: var(--vermilion); color: var(--paper); }
.btn-danger { background: var(--rose-dim); color: var(--rose); border-color: rgba(248,113,113,0.3); }
.btn-danger:hover { background: var(--rose); color: var(--paper); }

.btn-icon-glass {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px;
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  cursor: pointer;
  transition: var(--transition);
}
.btn-icon-glass:hover { color: var(--acid); border-color: var(--acid-dim); background: var(--acid-dim); }
.btn-icon-glass i { width: 14px !important; height: 14px; stroke-width: 1.7; }

.tab-btn-mini {
  background: transparent; border: none;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.tab-btn-mini:hover { color: var(--ink); }
.tab-btn-mini.active { color: var(--paper); background: var(--acid); }

.var-pill {
  background: var(--paper-3);
  border: 1px solid var(--rule-strong);
  color: var(--acid);
  font-family: var(--mono);
  font-size: 10px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.var-pill:hover { border-color: var(--acid-dim); background: var(--acid-dim); }

/* =============================================================
   STATS GRID — editorial cards
   ============================================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-bottom: 56px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--paper-2);
  overflow: hidden;
}
.stat-card {
  position: relative;
  padding: 24px 26px 28px;
  border-right: 1px solid var(--rule);
  background: transparent;
  display: flex; flex-direction: column;
  min-height: 156px;
  transition: var(--transition);
}
.stat-card:last-child { border-right: none; }
.stat-card:hover { background: rgba(244,243,238,0.02); }

.stat-card__header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
}
.stat-card__icon-wrap {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 0;
  color: var(--ink-3);
  background: transparent;
  border: 1px solid var(--rule-strong);
}
.stat-card__icon-wrap i { width: 12px !important; height: 12px !important; stroke-width: 1.8; }
.stat-card__icon-wrap--indigo { color: var(--orchid); border-color: var(--orchid-dim); background: var(--orchid-dim); }
.stat-card__icon-wrap--cyan   { color: var(--azure);  border-color: var(--azure-dim);  background: var(--azure-dim); }
.stat-card__icon-wrap--amber  { color: var(--vermilion); border-color: var(--vermilion-dim); background: var(--vermilion-dim); }
.stat-card__icon-wrap--green  { color: var(--acid);   border-color: var(--acid-dim);   background: var(--acid-dim); }
.stat-card__icon-wrap--pulse  { animation: pulse-icon 1.4s infinite; }
@keyframes pulse-icon { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }

.stat-card__label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  flex: 1;
}
.stat-card__value {
  font-family: var(--sans) !important;
  font-style: normal !important;
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-top: auto;
  font-feature-settings: "tnum";
}
.stat-card__footer { margin-top: 14px; min-height: 6px; }
.stat-card__progress {
  height: 2px; background: var(--rule);
  overflow: hidden; border-radius: 0;
}
.stat-card__progress-bar {
  height: 100%; background: var(--acid);
  box-shadow: 0 0 8px var(--acid-glow);
}

/* signature accent stripe on first card */
.stat-card--indigo::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--orchid), transparent);
}
.stat-card--cyan::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--azure), transparent);
}
.stat-card--amber::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--vermilion), transparent);
}
.stat-card--green::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--acid), transparent);
}

/* =============================================================
   WORKSPACE — call room + intel panel
   ============================================================= */
.workspace {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.call-room { min-width: 0; }

.leads-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper-2);
}

/* lead card */
.lead-card, .glass-card {
  background: transparent;
  border: none;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 26px 26px 22px;
  display: flex; flex-direction: column; gap: 18px;
  position: relative;
  transition: var(--transition);
  opacity: 0;
  animation: lead-in 0.6s cubic-bezier(0.2,0.8,0.2,1) forwards;
  border-radius: 0;
}
.leads-grid .lead-card:nth-child(2n) { border-right: none; }
.leads-grid .lead-card:nth-last-child(-n+2) { border-bottom: none; }
.lead-card::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0;
  width: 2px; background: transparent;
  transition: var(--transition);
}
.lead-card:hover { background: rgba(244,243,238,0.02); }
.lead-card:hover::before { background: var(--acid); box-shadow: 0 0 12px var(--acid-glow); }

@keyframes lead-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lead-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lead-card__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.lead-card__header-actions { display: flex; gap: 6px; }
.lead-card__body { display: flex; flex-direction: column; gap: 6px; }
.lead-card__company {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 600;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.018em;
  color: var(--ink);
}
.lead-card__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
.lead-card__dot { color: var(--ink-4); }
.lead-card__phone {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
}
.lead-card__phone-chip { display: flex; align-items: center; gap: 8px; }
.lead-card__phone-chip span {
  font-family: var(--mono) !important;
  color: var(--ink) !important;
  font-feature-settings: "tnum";
  letter-spacing: 0;
  font-style: normal !important;
}
.lead-card__actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lead-card__action-btn, .btn-outcome {
  padding: 9px 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  justify-content: center;
}
.btn-outcome i { width: 12px; height: 12px; }

/* =============================================================
   INTEL PANEL
   ============================================================= */
.intel-panel, .glass-panel {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 28px 26px;
  position: sticky;
  top: 24px;
}
.intel-metric { padding: 8px 0; }
.intel-metric__value {
  font-family: var(--sans) !important;
  font-style: normal !important;
  font-size: 48px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-feature-settings: "tnum";
}
.intel-metric__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 14px;
}
.intel-metric__desc { color: var(--ink-2); font-size: 12.5px; line-height: 1.55; margin-top: 10px; }

/* avatar */
.av {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  background: var(--paper-3);
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.av i { width: 16px; height: 16px; stroke-width: 1.8; }
.av-food   { background: var(--vermilion-dim); color: var(--vermilion); border-color: rgba(255,90,43,0.25); }
.av-work   { background: var(--azure-dim);     color: var(--azure);     border-color: rgba(125,211,252,0.25); }
.av-default{ background: var(--orchid-dim);    color: var(--orchid);    border-color: rgba(216,180,254,0.25); }

/* =============================================================
   PIPELINE TABLE
   ============================================================= */
.pipeline-toolbar {
  display: flex !important; justify-content: space-between; align-items: center;
  padding: 14px 18px !important;
  background: var(--paper-2) !important;
  border: 1px solid var(--rule) !important;
  border-radius: var(--radius-md) !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  margin-bottom: 24px !important;
}

.modern-grid {
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.modern-grid thead th {
  text-align: left;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 12px 12px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.modern-grid tbody td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
}
.modern-grid tbody td:nth-child(2) { white-space: normal; }
.modern-grid .text-prospect-phone {
  white-space: nowrap;
  font-size: 13px;
  font-feature-settings: "tnum";
  letter-spacing: 0;
}
.modern-grid .av {
  width: 32px !important;
  height: 32px !important;
  font-size: 13px;
}
.modern-grid .text-prospect-name {
  font-size: 14px !important;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.modern-grid tbody tr:last-child td { border-bottom: none; }
.row-interactive { transition: var(--transition); cursor: pointer; }
.row-interactive:hover { background: rgba(244,243,238,0.02); }
.row-interactive:hover td:first-child { color: var(--acid); }

/* =============================================================
   FORM INPUTS
   ============================================================= */
.fi, .form-input {
  background: var(--paper) !important;
  border: 1px solid var(--rule-strong) !important;
  color: var(--ink) !important;
  font-family: var(--sans);
  font-size: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  width: 100%;
  outline: none;
}
.fi:focus, .form-input:focus {
  border-color: var(--acid) !important;
  box-shadow: 0 0 0 3px var(--acid-dim);
}
.fi::placeholder, .form-input::placeholder { color: var(--ink-4); }

textarea.fi {
  font-family: var(--mono) !important;
  font-size: 13px !important;
  line-height: 1.65;
}

.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.studio-counter {
  display: flex; justify-content: space-between;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* =============================================================
   MOBILE PHONE MOCKUP (Message Studio)
   ============================================================= */
.mobile-mockup {
  width: 280px;
  height: 560px;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 36px;
  padding: 14px;
  margin: 0 auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  transition: box-shadow 200ms ease, transform 200ms ease, border-color 200ms ease;
}
.mobile-mockup.is-floating {
  position: fixed;
  margin: 0;
  z-index: 9999;
  box-shadow: 0 30px 80px rgba(0,0,0,0.75), 0 0 0 1px var(--rule-vivid), 0 0 32px var(--acid-glow);
  border-color: var(--acid-dim);
}
.mobile-mockup.is-dragging {
  cursor: grabbing;
  transform: scale(1.02) rotate(-0.5deg);
  transition: none;
  box-shadow: 0 40px 100px rgba(0,0,0,0.85), 0 0 0 1px var(--acid), 0 0 48px var(--acid-glow);
}
.phone-drag-handle {
  position: absolute;
  top: 6px; left: 50%; transform: translateX(-50%);
  width: 64px; height: 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  cursor: grab;
  z-index: 3;
}
.phone-drag-handle:active { cursor: grabbing; }
.phone-drag-handle span {
  display: block;
  width: 32px; height: 2px;
  background: var(--rule-strong);
  border-radius: 1px;
  transition: var(--transition);
}
.phone-drag-handle:hover span { background: var(--acid); box-shadow: 0 0 6px var(--acid-glow); }
.phone-drag-handle::after {
  content: 'GRAB';
  position: absolute;
  top: -16px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.18em;
  color: var(--ink-4);
  opacity: 0; transition: opacity 160ms ease;
  white-space: nowrap;
}
.phone-drag-handle:hover::after { opacity: 1; color: var(--acid); }
.phone-reset-btn {
  position: absolute;
  top: 8px; right: 12px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: var(--paper-3);
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  color: var(--ink-3);
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  transition: var(--transition);
}
.mobile-mockup:hover .phone-reset-btn,
.mobile-mockup.is-floating .phone-reset-btn { opacity: 1; }
.phone-reset-btn:hover { color: var(--acid); border-color: var(--acid-dim); background: var(--acid-dim); }

.mobile-mockup::before {
  content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 50px; height: 4px; background: var(--paper-3); border-radius: 2px;
}
.mobile-screen {
  width: 100%; height: 100%;
  background: var(--paper-2);
  border-radius: 24px;
  padding: 28px 16px 18px;
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sms-bubble {
  max-width: 85%;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 16px;
}
.sms-received { background: var(--paper-3); color: var(--ink-2); align-self: flex-start; border-bottom-left-radius: 4px; }
.sms-sent { background: var(--acid); color: var(--paper); align-self: flex-end; border-bottom-right-radius: 4px; font-weight: 500; }

/* =============================================================
   AUTH (login + register)
   ============================================================= */
.auth-card {
  width: min(420px, 92vw);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 36px 36px 32px;
  position: relative;
  z-index: 1;
}
.auth-card::before {
  content: ''; position: absolute; top: 0; left: 24px; right: 24px; height: 2px;
  background: var(--acid);
  box-shadow: 0 0 14px var(--acid-glow);
}

.alert-error {
  background: var(--rose-dim);
  border: 1px solid rgba(248,113,113,0.3);
  color: var(--rose);
  padding: 10px 14px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

/* =============================================================
   MISC OVERRIDES — neutralize legacy inline styles
   ============================================================= */
input, textarea, select { outline: none; }
a { color: var(--acid); }
hr { border: none; border-top: 1px solid var(--rule); }

/* ensure inline glass-cards in dashboard align with the new theme */
.glass-card { background: var(--paper-2); border: 1px solid var(--rule); }

/* sidebar mobile overlay */
.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1180px) {
  .workspace { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card:nth-child(2n) { border-right: none; }
  .stat-card:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .leads-grid { grid-template-columns: 1fr; }
  .leads-grid .lead-card { border-right: none; border-bottom: 1px solid var(--rule); }
  .leads-grid .lead-card:last-child { border-bottom: none; }
}
@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    border-right: 1px solid var(--rule);
  }
  .sidebar--open { transform: translateX(0); }
  .main-wrap { border-left: none; }
  .topbar { display: flex; }
  .content { padding: 28px 22px 60px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { border-right: none; border-bottom: 1px solid var(--rule); }
  .stat-card:last-child { border-bottom: none; }
  .cockpit-header { flex-direction: column; align-items: flex-start; gap: 18px; }
  .cockpit-header::after { display: none; }
}

/* =============================================================
   END
   ============================================================= */
