/* ============================================
   Capital Foundry - Brand Stylesheet
   Primary:  #1B2A4A (deep navy)
   Gold:     #C5A000 (brand gold)
   Cream:    #F7F6F1 (warm off-white)
   Blue:     #2E5CA8 (medium blue)
   Gray:     #6B7280
   ============================================ */

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

:root {
  --navy: #1B2A4A;
  --navy-deep: #0f1b33;
  --navy-light: #253a5e;
  --gold: #C5A000;
  --gold-light: #d4b42a;
  --gold-dark: #a08200;
  --cream: #F7F6F1;
  --cream-dark: #E8E6DF;
  --blue: #2E5CA8;
  --gray: #6B7280;
  --gray-light: #9CA3AF;
  --white: #FFFFFF;
  --text-dark: #1B2A4A;
  --text-light: #F7F6F1;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(27,42,74,0.10);
  --shadow-lg: 0 8px 40px rgba(27,42,74,0.15);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---- Access Gate ---- */
#gatePage {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#gatePage.gate-hidden {
  opacity: 0; visibility: hidden; pointer-events: none;
}
.gate-bg {
  position: absolute; inset: 0;
  background: var(--cream);
  overflow: hidden;
}
.gate-bg::before,
.gate-bg::after {
  content: ''; position: absolute; border-radius: 50%;
  animation: gate-glow 8s ease-in-out infinite alternate;
}
.gate-bg::before {
  width: 600px; height: 600px; top: -10%; right: -5%;
  background: radial-gradient(circle, rgba(197,160,0,0.12) 0%, transparent 70%);
}
.gate-bg::after {
  width: 500px; height: 500px; bottom: -10%; left: -5%;
  background: radial-gradient(circle, rgba(27,42,74,0.06) 0%, transparent 70%);
  animation-delay: -4s;
}
@keyframes gate-glow {
  0% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  50% { transform: translate(30px, -20px) scale(1.15); opacity: 1; }
  100% { transform: translate(-20px, 30px) scale(1.05); opacity: 0.7; }
}

.gate-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 24px;
}
.gate-logo {
  width: 100px; height: auto;
  opacity: 0.9;
  margin-bottom: 40px;
  animation: gate-logo-in 1s ease forwards;
  filter: invert(12%) sepia(41%) saturate(2817%) hue-rotate(191deg) brightness(92%) contrast(93%);
}
@keyframes gate-logo-in {
  from { opacity: 0; transform: translateY(-20px) scale(0.9); }
  to { opacity: 0.9; transform: translateY(0) scale(1); }
}
.gate-label {
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 3px; color: var(--navy); margin-bottom: 36px;
  opacity: 0; animation: gate-fade-in 0.8s ease 0.3s forwards;
}
@keyframes gate-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.gate-form {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  opacity: 0; animation: gate-fade-in 0.8s ease 0.5s forwards;
}
.gate-input {
  background: transparent;
  border: none; border-bottom: 2px solid rgba(27,42,74,0.2);
  padding: 12px 8px; width: 280px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.3rem; letter-spacing: 6px; text-align: center;
  color: var(--navy); caret-color: var(--gold);
  transition: border-color 0.3s;
}
.gate-input::placeholder {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 0.9rem; letter-spacing: 1px;
  color: rgba(27,42,74,0.35);
}
.gate-input:focus {
  outline: none; border-bottom-color: var(--gold);
}
.gate-btn {
  min-width: 160px;
}

.gate-error {
  color: #E74C3C; font-size: 0.85rem; font-weight: 500;
  margin-top: 16px; opacity: 0; transition: opacity 0.3s;
}
.gate-error.visible { opacity: 1; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
  20%, 40%, 60%, 80% { transform: translateX(6px); }
}
.gate-input.shake {
  animation: shake 0.5s ease;
  border-bottom-color: #E74C3C;
}

/* Main site reveal */
#mainSite {
  opacity: 0; transition: opacity 0.6s ease;
}
#mainSite.site-visible {
  opacity: 1;
}

/* ---- Typography ---- */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--gray); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: var(--radius); font-weight: 600;
  font-size: 0.95rem; text-decoration: none; transition: var(--transition);
  cursor: pointer; border: 2px solid transparent;
}
.btn-gold {
  background: var(--gold); color: var(--navy); border-color: var(--gold);
}
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(197,160,0,0.3); }
.btn-outline {
  background: transparent; color: var(--navy); border-color: rgba(27,42,74,0.3);
}
.btn-outline:hover { border-color: var(--navy); background: rgba(27,42,74,0.05); }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

.section-dark .btn-outline { color: var(--cream); border-color: rgba(247,246,241,0.4); }
.section-dark .btn-outline:hover { border-color: var(--cream); background: rgba(247,246,241,0.08); }

/* ---- Navigation ---- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 16px 0; transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(247,246,241,0.97); backdrop-filter: blur(12px);
  padding: 10px 0; box-shadow: 0 2px 20px rgba(27,42,74,0.08);
}
.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 700; font-size: 1.1rem; transition: color var(--transition); }
.nav-logo img { height: 36px; width: auto; transition: filter var(--transition); filter: invert(12%) sepia(41%) saturate(2817%) hue-rotate(191deg) brightness(92%) contrast(93%); }
.navbar.scrolled .nav-logo { color: var(--navy); }
.navbar.scrolled .nav-logo img { filter: invert(12%) sepia(41%) saturate(2817%) hue-rotate(191deg) brightness(92%) contrast(93%); }
.nav-links {
  display: flex; align-items: center; gap: 8px; list-style: none;
}
.nav-links a {
  color: rgba(27,42,74,0.7); text-decoration: none; font-size: 0.9rem;
  padding: 8px 14px; border-radius: var(--radius); transition: var(--transition);
  font-weight: 500;
}
.nav-links a:hover { color: var(--navy); background: rgba(27,42,74,0.05); }
.navbar.scrolled .nav-links a { color: rgba(27,42,74,0.7); }
.navbar.scrolled .nav-links a:hover { color: var(--navy); background: rgba(27,42,74,0.05); }
.nav-cta {
  background: var(--gold) !important; color: var(--navy) !important;
  font-weight: 600 !important; padding: 8px 20px !important;
}
.nav-cta:hover { background: var(--gold-light) !important; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: var(--transition); border-radius: 2px; }
.navbar.scrolled .nav-toggle span { background: var(--navy); }

/* ---- Hero ---- */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  background: var(--cream);
  position: relative; overflow: hidden; padding: 100px 0 60px;
}
.hero-bg-pattern {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(197,160,0,0.10) 0%, transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(27,42,74,0.04) 0%, transparent 40%);
}
.hero-content {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px;
  position: relative; z-index: 1;
}
.hero-text { color: var(--navy); }
.hero-label {
  display: inline-block; font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 2px; color: var(--gold-dark); margin-bottom: 16px;
  padding: 6px 16px; border: 1px solid rgba(197,160,0,0.35); border-radius: 100px;
}
.hero h1 { margin-bottom: 20px; color: var(--navy); }
.hero-sub { font-size: 1.15rem; color: var(--gray); max-width: 520px; margin-bottom: 32px; line-height: 1.7; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-visual { display: flex; justify-content: center; align-items: center; }
.hero-logo-ring {
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(27,42,74,0.06) 0%, transparent 70%);
  border: 2px solid rgba(27,42,74,0.1);
  display: flex; align-items: center; justify-content: center;
  animation: pulse-ring 4s ease-in-out infinite;
  position: relative;
}
.hero-logo-ring::before {
  content: ''; position: absolute; inset: -20px; border-radius: 50%;
  border: 1px solid rgba(27,42,74,0.05);
}
.hero-logo-img { width: 180px; height: auto; opacity: 0.9; filter: invert(12%) sepia(41%) saturate(2817%) hue-rotate(191deg) brightness(92%) contrast(93%); }

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(27,42,74,0.06); }
  50% { box-shadow: 0 0 0 30px rgba(27,42,74,0); }
}

.hero-scroll-hint {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(27,42,74,0.4); font-size: 0.75rem; letter-spacing: 1px;
}
.scroll-arrow {
  width: 20px; height: 20px; border-right: 2px solid rgba(27,42,74,0.3);
  border-bottom: 2px solid rgba(27,42,74,0.3); transform: rotate(45deg);
  animation: bounce-arrow 2s ease-in-out infinite;
}
@keyframes bounce-arrow { 0%, 100% { transform: rotate(45deg) translate(0,0); } 50% { transform: rotate(45deg) translate(4px,4px); } }

/* ---- Sections ---- */
.section { padding: 100px 0; }
.section-dark { background: linear-gradient(180deg, var(--navy-deep), var(--navy)); color: var(--cream); }
.section-light { background: var(--cream); color: var(--text-dark); }
.section-header { text-align: center; margin-bottom: 60px; }
.section-label {
  display: inline-block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 2px; color: var(--gold); margin-bottom: 12px;
}
.section-sub { max-width: 600px; margin: 12px auto 0; color: var(--gray); font-size: 1.05rem; }
.section-dark .section-sub { color: rgba(247,246,241,0.6); }

/* ---- Problem Cards ---- */
.problems-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.problem-card {
  background: rgba(255,255,255,0.05); border-radius: var(--radius-lg); padding: 32px;
  box-shadow: none; transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.08);
}
.problem-card:hover { transform: translateY(-4px); box-shadow: 0 8px 40px rgba(0,0,0,0.2); background: rgba(255,255,255,0.08); }
.problem-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(197,160,0,0.1); display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.problem-icon svg { width: 24px; height: 24px; color: var(--gold); }
.problem-card h3 { margin-bottom: 12px; color: var(--cream); }
.problem-stat { margin-bottom: 16px; }
.stat-number { display: block; font-size: 2.4rem; font-weight: 800; color: #E74C3C; }
.stat-label { font-size: 0.85rem; color: rgba(247,246,241,0.5); }
.problem-desc { color: rgba(247,246,241,0.6); font-size: 0.92rem; margin-bottom: 20px; }

.mini-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; color: rgba(247,246,241,0.75); }
.mini-table th { text-align: left; color: rgba(247,246,241,0.5); font-weight: 600; padding: 6px 0; border-bottom: 2px solid rgba(255,255,255,0.1); }
.mini-table td { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.mini-table td:last-child { text-align: right; font-weight: 600; color: var(--cream); }

/* Timeline decay */
.timeline-decay {
  position: relative; margin-top: 20px;
  display: flex; justify-content: space-between;
  padding: 0 6px;
}
.timeline-line {
  position: absolute; left: 6px; right: 6px; height: 3px;
  top: 9.5px; /* center on dot row: (22px - 3px) / 2 = 9.5px */
  background: linear-gradient(90deg, var(--gold) 0%, #E67E22 35%, #E74C3C 65%, #922B21 100%);
  border-radius: 2px;
  z-index: 0;
}
.timeline-point {
  display: flex; flex-direction: column; align-items: center;
  position: relative; z-index: 1;
}
.tp-dot-row {
  height: 22px; display: flex; align-items: center; justify-content: center;
}
.tp-dot {
  border-radius: 50%;
  border: 3px solid var(--white); box-shadow: 0 0 0 2px currentColor;
  flex-shrink: 0;
}
.tp-dot.tp-strong { background: var(--gold); color: var(--gold); width: 22px; height: 22px; }
.tp-dot.tp-mid { background: #E67E22; color: #E67E22; width: 18px; height: 18px; }
.tp-dot.tp-low { background: #E74C3C; color: #E74C3C; width: 14px; height: 14px; }
.tp-dot.tp-critical { background: #922B21; color: #922B21; width: 10px; height: 10px; }
.tp-time { font-size: 0.7rem; color: var(--gray); font-weight: 600; margin-top: 8px; }
.tp-val { font-size: 0.82rem; font-weight: 800; }
.tp-strong + .tp-time ~ .tp-val { color: var(--gold-dark); }
.timeline-point:nth-child(3) .tp-val { color: #E67E22; }
.timeline-point:nth-child(4) .tp-val { color: #E74C3C; }
.timeline-point:nth-child(5) .tp-val { color: #922B21; }

/* Gauge meters (problem card 3) */
.gauges-row {
  display: flex; gap: 8px; justify-content: center; margin-top: 4px;
}
.gauge {
  display: flex; flex-direction: column; align-items: center; flex: 1;
}
.gauge-svg { width: 100%; max-width: 110px; height: auto; }
.gauge-fill {
  stroke-dasharray: 126; /* approximate arc length */
  stroke-dashoffset: calc(126 - (126 * var(--pct) / 100));
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.gauge-label {
  font-size: 0.72rem; font-weight: 700; color: var(--navy);
  text-transform: uppercase; letter-spacing: 0.5px; margin-top: -4px;
}
.gauge-caption {
  text-align: center; font-size: 0.75rem; color: var(--gray);
  margin-top: 10px; font-style: italic;
}
/* Animate gauges on scroll */
.gauge-fill { stroke-dashoffset: 126; }
.visible .gauge-fill,
.problem-card.visible .gauge-fill {
  stroke-dashoffset: calc(126 - (126 * var(--pct) / 100));
}

/* Stat blocks */
.stat-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.stat-block {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px 12px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  text-align: center;
}
.stat-big {
  font-size: 2.6rem; font-weight: 900; color: var(--gold);
  line-height: 1;
}
.stat-desc {
  font-size: 0.75rem; font-weight: 600; color: rgba(247,246,241,0.7);
  text-transform: uppercase; letter-spacing: 0.5px; margin-top: 6px;
}

/* ---- Solution ---- */
.solution-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.solution-text h3 { font-size: 1.6rem; margin-bottom: 16px; color: var(--navy); }
.solution-text p { color: var(--gray); margin-bottom: 20px; line-height: 1.7; }
.check-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.check-list li {
  padding-left: 28px; position: relative; color: rgba(27,42,74,0.8); font-size: 0.95rem;
}
.check-list li::before {
  content: ''; position: absolute; left: 0; top: 6px;
  width: 16px; height: 16px; border-radius: 50%; background: var(--gold);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 8l3 3 5-5' stroke='%231B2A4A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Model diagram */
.model-diagram { display: flex; flex-direction: column; align-items: center; gap: 32px; }
.model-core {
  width: 180px; height: 180px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 0 60px rgba(197,160,0,0.2);
  position: relative;
}
.model-core::after {
  content: ''; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px dashed rgba(197,160,0,0.3); animation: spin 20s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.model-logo { width: 50px; filter: brightness(0); margin-bottom: 4px; }
.model-label { font-weight: 700; color: var(--navy); font-size: 0.9rem; }
.model-params { font-size: 0.72rem; color: var(--navy); opacity: 0.7; }

.sub-models { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.sub-model {
  background: rgba(27,42,74,0.04); border: 1px solid rgba(197,160,0,0.2);
  border-radius: var(--radius); padding: 12px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  animation: fade-in 0.5s ease calc(var(--delay) * 0.1s) both;
}
.sm-name { font-weight: 600; font-size: 0.82rem; color: var(--navy); }
.sm-size { font-size: 0.72rem; color: var(--gold); }

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

/* ---- Advantages ---- */
.advantages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.advantage-card {
  background: rgba(255,255,255,0.05); border-radius: var(--radius-lg); padding: 32px;
  box-shadow: none; border: 1px solid rgba(255,255,255,0.08);
  transition: var(--transition);
}
.advantage-card:hover { transform: translateY(-4px); box-shadow: 0 8px 40px rgba(0,0,0,0.2); background: rgba(255,255,255,0.08); }
.adv-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.adv-header svg { width: 28px; height: 28px; color: var(--gold); flex-shrink: 0; }
.adv-header h3 { font-size: 1.15rem; color: var(--cream); }
.advantage-card > p { color: rgba(247,246,241,0.6); font-size: 0.9rem; margin-top: 16px; }

.accuracy-compare { display: flex; align-items: center; gap: 16px; justify-content: center; margin-bottom: 8px; }
.accuracy-item { text-align: center; }
.acc-val { font-size: 2.4rem; font-weight: 800; display: block; }
.acc-label { font-size: 0.78rem; color: rgba(247,246,241,0.5); }
.accuracy-vs { color: rgba(247,246,241,0.4); font-weight: 600; font-size: 0.9rem; }

/* Memory tiers */
.memory-tiers { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.tier {
  padding: 14px; border-radius: var(--radius); background: rgba(255,255,255,0.05);
  border-left: 3px solid var(--gold);
}
.tier-badge {
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--gold-dark); margin-bottom: 4px;
}
.tier h4 { font-size: 0.9rem; margin-bottom: 2px; color: var(--cream); }
.tier p { font-size: 0.78rem; color: rgba(247,246,241,0.5); margin: 0; }
.tier-footer { font-size: 0.8rem; color: var(--gold-dark); font-weight: 600; text-align: center; margin-top: 8px; }

/* Advantage cost stats (cream style) */
.adv-cost-stats { display: flex; gap: 14px; margin-bottom: 12px; }
.adv-cost-stat {
  flex: 1; text-align: center; padding: 18px 12px;
  background: rgba(255,255,255,0.05); border-radius: var(--radius-lg);
}
.adv-cost-val { font-size: 2.4rem; font-weight: 900; display: block; line-height: 1; }
.adv-cost-label { font-size: 0.78rem; color: rgba(247,246,241,0.5); margin-top: 6px; display: block; }

/* ---- Landscape ---- */
.landscape-cols { max-width: 960px; margin: 0 auto; }

/* CF Banner */
.cf-banner {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 18px 32px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(197,160,0,0.15), rgba(197,160,0,0.05));
  border: 2px solid rgba(197,160,0,0.3);
  margin-bottom: 0;
}
.cf-banner-logo {
  width: 36px; height: 36px; opacity: 0.9; filter: invert(12%) sepia(41%) saturate(2817%) hue-rotate(191deg) brightness(92%) contrast(93%);
}
.cf-banner-text { font-weight: 800; font-size: 1.2rem; color: var(--gold-dark); }
.cf-banner-tag {
  font-size: 0.72rem; color: var(--gray); font-weight: 500;
  padding: 4px 12px; border-radius: 100px;
  border: 1px solid rgba(27,42,74,0.1);
}

/* Connectors */
.cf-connectors {
  display: flex; justify-content: space-around; height: 32px;
  padding: 0 80px;
}
.connector {
  width: 2px; background: linear-gradient(180deg, var(--gold), rgba(197,160,0,0.15));
  border-radius: 1px;
}

/* Layer cards */
.layer-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.layer-card {
  background: var(--white);
  border: 1px solid rgba(27,42,74,0.06);
  border-radius: var(--radius-lg); padding: 28px 24px;
  transition: var(--transition);
  border-top: 2px solid rgba(197,160,0,0.3);
  box-shadow: var(--shadow);
}
.layer-card:hover {
  background: var(--white);
  border-color: rgba(197,160,0,0.25);
  border-top-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.layer-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.layer-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(197,160,0,0.1); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.layer-icon svg { width: 20px; height: 20px; color: var(--gold); }
.layer-name { font-weight: 700; font-size: 0.95rem; color: var(--navy); display: block; }
.layer-desc { font-size: 0.72rem; color: var(--gray); display: block; }
.layer-partners { display: flex; flex-direction: column; gap: 8px; }
.partner {
  padding: 10px 16px; border-radius: var(--radius); font-size: 0.85rem; font-weight: 500;
  background: var(--cream); color: var(--navy);
  border: 1px solid rgba(27,42,74,0.06); transition: var(--transition);
  text-align: center;
}
.partner:hover { border-color: rgba(197,160,0,0.3); color: var(--navy); background: rgba(197,160,0,0.08); }

@media (max-width: 768px) {
  .layer-cards { grid-template-columns: 1fr; }
  .cf-connectors { display: none; }
  .cf-banner { margin-bottom: 20px; }
}

/* ---- Pricing ---- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-bottom: 60px; }
.price-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 36px 28px;
  box-shadow: var(--shadow); text-align: center; position: relative;
  border: 1px solid rgba(27,42,74,0.06); transition: var(--transition);
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.price-card.featured {
  border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), var(--shadow-lg);
  transform: scale(1.03);
}
.price-card.featured:hover { transform: scale(1.03) translateY(-4px); }
.price-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--navy); font-size: 0.72rem; font-weight: 700;
  padding: 4px 16px; border-radius: 100px; text-transform: uppercase; letter-spacing: 1px;
}
.price-tier { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--gray); margin-bottom: 8px; }
.price-amount { font-size: 2.8rem; font-weight: 800; color: var(--navy); margin-bottom: 12px; }
.currency { font-size: 1.4rem; vertical-align: top; }
.period { font-size: 0.9rem; font-weight: 400; color: var(--gray); }
.price-desc { font-size: 0.88rem; color: var(--gray); margin-bottom: 20px; }
.price-features { list-style: none; text-align: left; margin-bottom: 24px; }
.price-features li {
  padding: 8px 0; font-size: 0.88rem; color: var(--text-dark);
  border-bottom: 1px solid var(--cream);
  padding-left: 24px; position: relative;
}
.price-features li::before {
  content: ''; position: absolute; left: 0; top: 12px;
  width: 14px; height: 14px; border-radius: 50%; background: var(--gold);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 7l2.5 2.5 4.5-4.5' stroke='%231B2A4A' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* GTM */
.gtm-section { text-align: center; }
.gtm-section h3 { font-size: 1.4rem; margin-bottom: 36px; }
.gtm-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.gtm-step {
  text-align: center; padding: 24px 16px;
  border-radius: var(--radius-lg); background: var(--white);
  box-shadow: var(--shadow); border: 1px solid rgba(27,42,74,0.06);
}
.gtm-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: var(--gold); font-weight: 700; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.gtm-step h4 { margin-bottom: 8px; }
.gtm-step p { font-size: 0.82rem; color: var(--gray); }

/* ---- CTA ---- */
#contact { text-align: center; padding: 100px 0; }
.cta-content { max-width: 680px; margin: 0 auto; }
.cta-logo { width: 64px; margin-bottom: 24px; opacity: 0.8; filter: invert(12%) sepia(41%) saturate(2817%) hue-rotate(191deg) brightness(92%) contrast(93%); }
#contact h2 { color: var(--navy); margin-bottom: 12px; }
#contact p { color: var(--gray); margin-bottom: 32px; font-size: 1.1rem; }
/* Demo Modal */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--cream); border: 1px solid rgba(27,42,74,0.08);
  border-radius: 12px; padding: 40px 36px; width: 100%; max-width: 560px;
  position: relative; max-height: 90vh; overflow-y: auto;
  animation: modalIn 0.25s ease;
  box-shadow: 0 20px 60px rgba(27,42,74,0.2);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none; color: rgba(27,42,74,0.4);
  font-size: 1.6rem; cursor: pointer; line-height: 1;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--navy); }
.modal-title { color: var(--navy); font-size: 1.5rem; margin-bottom: 6px; }
.modal-sub { color: var(--gray); font-size: 0.95rem; margin-bottom: 28px; }

/* Demo Form */
.demo-form { text-align: left; }
.form-row {
  display: flex; gap: 16px; margin-bottom: 16px;
}
.form-group { flex: 1; display: flex; flex-direction: column; }
.form-group-full { flex: 1 1 100%; }
.demo-form label {
  font-size: 0.82rem; color: rgba(27,42,74,0.7); margin-bottom: 6px; font-weight: 500;
}
.demo-form .required { color: var(--gold); }
.demo-form input,
.demo-form select {
  background: var(--white);
  border: 1px solid rgba(27,42,74,0.15);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.95rem;
  color: var(--navy);
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.demo-form input::placeholder { color: rgba(27,42,74,0.35); }
.demo-form select option { background: var(--white); color: var(--navy); }
.demo-form input:focus,
.demo-form select:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
}
.demo-submit {
  width: 100%; margin-top: 8px; cursor: pointer; border: none; font-size: 1rem;
}
.form-success p {
  color: var(--gold-light); font-size: 1rem; margin-top: 16px; text-align: center;
}

.cta-contact {
  margin-top: 24px; font-size: 0.88rem; color: var(--gray);
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.divider { opacity: 0.3; }

/* ---- Footer ---- */
.footer {
  background: var(--cream); padding: 24px 0;
  border-top: 1px solid rgba(27,42,74,0.08);
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 8px; color: rgba(27,42,74,0.5); font-weight: 600; font-size: 0.9rem; }
.footer-brand img { height: 24px; opacity: 0.5; filter: invert(12%) sepia(41%) saturate(2817%) hue-rotate(191deg) brightness(92%) contrast(93%); }
.footer-copy { font-size: 0.78rem; color: rgba(27,42,74,0.3); }

/* ---- Animations ---- */
.fade-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-sub { margin: 0 auto 32px; }
  .hero-actions { justify-content: center; }
  .problems-grid, .advantages-grid, .pricing-grid { grid-template-columns: 1fr; max-width: 500px; margin-left: auto; margin-right: auto; }
  .solution-grid { grid-template-columns: 1fr; }
  .solution-visual { order: -1; }
  .gtm-steps { grid-template-columns: repeat(2, 1fr); }
  .price-card.featured { transform: none; }
  .price-card.featured:hover { transform: translateY(-4px); }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy); padding: 20px 24px; gap: 4px;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .nav-links.active { display: flex; }
  .nav-toggle { display: block; }
  .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .section { padding: 70px 0; }
  .hero { padding: 80px 0 50px; }
  .hero-logo-ring { width: 220px; height: 220px; }
  .hero-logo-img { width: 120px; }
  .stack-row { grid-template-columns: 1fr; gap: 8px; }
  .gtm-steps { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
  .form-row { flex-direction: column; gap: 12px; }
  .modal { padding: 32px 20px; }
}

/* ============================================
   ADMIN PANEL STYLES
   ============================================ */

/* ---- Dark Mode Variables ---- */
.admin-body {
  --admin-bg: var(--cream);
  --admin-surface: var(--white);
  --admin-border: rgba(27,42,74,0.1);
  --admin-text: var(--navy);
  --admin-text-secondary: rgba(27,42,74,0.6);
  --admin-text-muted: rgba(27,42,74,0.4);
  --admin-hover: rgba(27,42,74,0.05);
  --admin-table-hover: rgba(27,42,74,0.03);
  background: var(--admin-bg);
  overflow: hidden;
}

.admin-body.dark-mode {
  --admin-bg: #0f1117;
  --admin-surface: #1a1d27;
  --admin-border: rgba(255,255,255,0.08);
  --admin-text: #e4e4e7;
  --admin-text-secondary: rgba(228,228,231,0.6);
  --admin-text-muted: rgba(228,228,231,0.3);
  --admin-hover: rgba(255,255,255,0.05);
  --admin-table-hover: rgba(255,255,255,0.03);
  --navy: #e4e4e7;
  --white: #1a1d27;
  --cream: #0f1117;
  color-scheme: dark;
}

.admin-body.dark-mode .admin-sidebar {
  background: #13151d;
  border-color: var(--admin-border);
}

.admin-body.dark-mode .admin-main {
  background: var(--admin-bg);
}

.admin-body.dark-mode .admin-stat-card,
.admin-body.dark-mode .rl-stat-card,
.admin-body.dark-mode .lead-stat-card {
  background: var(--admin-surface);
  border-color: var(--admin-border);
}

.admin-body.dark-mode .admin-table thead th {
  background: var(--admin-surface);
  border-color: var(--admin-border);
  color: var(--admin-text-secondary);
}

.admin-body.dark-mode .admin-table tbody td {
  border-color: var(--admin-border);
  color: var(--admin-text);
}

.admin-body.dark-mode .admin-table tbody tr:hover {
  background: var(--admin-table-hover);
}

.admin-body.dark-mode .admin-table-wrap {
  border-color: var(--admin-border);
}

.admin-body.dark-mode .admin-code-badge {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
  color: var(--admin-text);
}

.admin-body.dark-mode .drawer {
  background: #1a1d27;
}

.admin-body.dark-mode .drawer-header {
  border-color: var(--admin-border);
}

.admin-body.dark-mode .admin-modal {
  background: #1a1d27;
}

.admin-body.dark-mode .admin-input,
.admin-body.dark-mode .search-modern-input,
.admin-body.dark-mode .lead-note-textarea {
  background: rgba(255,255,255,0.04);
  border-color: var(--admin-border);
  color: var(--admin-text);
}

.admin-body.dark-mode .kanban-column {
  background: rgba(255,255,255,0.02);
}

.admin-body.dark-mode .kanban-card {
  background: var(--admin-surface);
  border-color: var(--admin-border);
}

.admin-body.dark-mode .admin-page-title,
.admin-body.dark-mode .admin-page-sub,
.admin-body.dark-mode .admin-brand {
  color: var(--admin-text);
}

.admin-body.dark-mode .admin-page-sub {
  color: var(--admin-text-secondary);
}

.admin-body.dark-mode .admin-nav-item {
  color: var(--admin-text-secondary);
}

.admin-body.dark-mode .admin-nav-item:hover {
  color: var(--admin-text);
  background: var(--admin-hover);
}

.admin-body.dark-mode .admin-nav-item.active {
  color: var(--gold);
  background: rgba(197,160,0,0.12);
}

.admin-body.dark-mode .skeleton-line {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
}

/* ---- Dark Mode Toggle Button ---- */
.admin-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: transparent;
  color: var(--admin-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.admin-theme-toggle:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(197,160,0,0.08);
}

.admin-theme-toggle .icon-sun,
.admin-theme-toggle .icon-moon { display: none; }
.admin-body:not(.dark-mode) .admin-theme-toggle .icon-moon { display: block; }
.admin-body.dark-mode .admin-theme-toggle .icon-sun { display: block; }

/* ---- Mobile Hamburger ---- */
.admin-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--admin-text);
  cursor: pointer;
  border-radius: 8px;
  flex-shrink: 0;
}

.admin-mobile-toggle:hover {
  background: var(--admin-hover);
}

/* Layout */
.admin-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background: var(--white);
  border-right: 1px solid rgba(27,42,74,0.1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.admin-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 20px 32px;
  border-bottom: 1px solid rgba(27,42,74,0.1);
}

.admin-sidebar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-logo {
  height: 32px;
  width: auto;
  opacity: 0.9;
}

.admin-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  letter-spacing: 0.3px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 12px;
  flex: 1;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  border-radius: var(--radius);
  color: rgba(27,42,74,0.6);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.admin-nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.admin-nav-item:hover {
  color: var(--navy);
  background: rgba(27,42,74,0.05);
}

.admin-nav-item.active {
  color: var(--navy);
  background: rgba(197,160,0,0.15);
  font-weight: 600;
}

.admin-sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border-top: 1px solid rgba(27,42,74,0.1);
}

.admin-sidebar-footer .admin-logout-btn {
  flex: 1;
}

.admin-logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius);
  color: rgba(27,42,74,0.5);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}

.admin-logout-btn svg {
  width: 18px;
  height: 18px;
}

.admin-logout-btn:hover {
  color: #E74C3C;
  background: rgba(231,76,60,0.08);
}

/* Main Content */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--cream);
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 36px 0;
}

.admin-page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.admin-page-sub {
  font-size: 0.88rem;
  color: rgba(27,42,74,0.6);
}

.admin-header-actions {
  display: flex;
  gap: 12px;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
  gap: 6px;
}

.admin-header-actions .btn svg {
  margin-right: 4px;
}

/* Stats Row */
.admin-stats {
  display: flex;
  gap: 16px;
  padding: 24px 36px 0;
  flex-wrap: wrap;
}

.admin-stat-card {
  background: var(--white);
  border: 1px solid rgba(27,42,74,0.1);
  border-radius: var(--radius);
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.admin-stat-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.admin-stat-label {
  font-size: 0.75rem;
  color: rgba(27,42,74,0.5);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-new .admin-stat-val { color: #3B82F6; }
.stat-contacted .admin-stat-val { color: #F59E0B; }
.stat-qualified .admin-stat-val { color: #10B981; }
.stat-closed .admin-stat-val { color: #8B5CF6; }

/* Tab Content */
.admin-tab-content {
  display: none;
  padding: 24px 36px 36px;
}

.admin-tab-content.active {
  display: block;
}

/* Inline Form */
.admin-inline-form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid rgba(27,42,74,0.1);
  border-radius: var(--radius);
}

.admin-input {
  background: var(--white);
  border: 1px solid rgba(27,42,74,0.2);
  border-radius: 6px;
  padding: 9px 14px;
  font-size: 0.9rem;
  color: var(--navy);
  font-family: inherit;
  flex: 1;
  transition: border-color 0.2s;
}

.admin-input::placeholder {
  color: rgba(27,42,74,0.4);
}

.admin-input:focus {
  outline: none;
  border-color: var(--gold);
}

.admin-form-error {
  color: #E74C3C;
  font-size: 0.82rem;
  font-weight: 500;
}

/* Tables */
.admin-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(27,42,74,0.1);
  background: var(--white);
  box-shadow: 0 4px 24px rgba(27,42,74,0.04);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table thead th {
  text-align: left;
  padding: 14px 18px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(27,42,74,0.6);
  border-bottom: 1px solid rgba(27,42,74,0.1);
  background: rgba(27,42,74,0.02);
  white-space: nowrap;
}

.admin-table tbody td {
  padding: 14px 18px;
  color: var(--navy);
  border-bottom: 1px solid rgba(27,42,74,0.05);
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background: rgba(27,42,74,0.02);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-empty {
  text-align: center !important;
  color: rgba(27,42,74,0.5) !important;
  padding: 60px 18px !important;
  font-size: 0.9rem !important;
}

.admin-date {
  color: rgba(27,42,74,0.5) !important;
  font-size: 0.82rem !important;
  white-space: nowrap;
}

.admin-code-badge {
  background: rgba(197,160,0,0.12);
  color: var(--gold-light);
  padding: 4px 12px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 2px;
}

.admin-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(231,76,60,0.08);
  border-radius: 6px;
  color: rgba(231,76,60,0.6);
  cursor: pointer;
  transition: var(--transition);
}

.admin-delete-btn:hover {
  background: rgba(231,76,60,0.15);
  color: #E74C3C;
}

/* Lead-specific */
.admin-lead-name strong {
  color: var(--navy);
}

.admin-email-link {
  color: var(--gold);
  text-decoration: none;
}

.admin-email-link:hover {
  text-decoration: underline;
}

/* Status dropdown */
.admin-status-select {
  background: var(--white);
  border: 1px solid rgba(27,42,74,0.15);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239CA3AF' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px;
  padding-right: 26px;
  min-width: 110px;
}

.admin-status-select option {
  background: var(--white);
  color: var(--navy);
}

.admin-status-select.status-new {
  border-color: rgba(59,130,246,0.3);
  color: #3B82F6;
}

.admin-status-select.status-contacted {
  border-color: rgba(245,158,11,0.3);
  color: #F59E0B;
}

.admin-status-select.status-qualified {
  border-color: rgba(16,185,129,0.3);
  color: #10B981;
}

.admin-status-select.status-closed {
  border-color: rgba(139,92,246,0.3);
  color: #8B5CF6;
}

/* Toast */
.admin-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--navy);
  color: var(--cream);
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  border: 1px solid rgba(197,160,0,0.2);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  z-index: 9999;
  pointer-events: none;
}

.admin-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.admin-toast.error {
  border-color: rgba(231,76,60,0.3);
}

/* Admin Responsive */
@media (max-width: 1024px) {
  .admin-sidebar {
    width: 220px;
  }
  .admin-header {
    padding: 24px 24px 0;
  }
  .admin-stats {
    padding: 20px 24px 0;
  }
  .admin-tab-content {
    padding: 20px 24px 24px;
  }
}

@media (max-width: 768px) {
  .admin-mobile-toggle {
    display: flex;
  }
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    flex-direction: column;
    border-right: none;
    border-bottom: 1px solid var(--admin-border);
    overflow: hidden;
  }
  .admin-sidebar-header {
    padding: 12px 16px;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    width: 100%;
  }
  .admin-sidebar-header .admin-sidebar-left {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .admin-nav {
    flex-direction: row;
    padding: 0 12px 8px;
    gap: 4px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .admin-sidebar.collapsed .admin-nav,
  .admin-sidebar.collapsed .admin-sidebar-footer {
    display: none;
  }
  .admin-nav-item {
    padding: 8px 14px;
    white-space: nowrap;
    font-size: 0.82rem;
  }
  .admin-nav-item span {
    display: none;
  }
  .admin-sidebar-footer {
    padding: 0 12px 8px;
    border-top: none;
    display: flex;
    gap: 8px;
    flex-direction: row;
  }
  .admin-main {
    overflow-y: auto;
  }
  .admin-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  .admin-page-title {
    font-size: 1.3rem;
  }
  .admin-stats {
    flex-wrap: wrap;
    gap: 10px;
  }
  .admin-stat-card {
    min-width: auto;
    flex: 1;
    padding: 12px 16px;
  }
  .admin-stat-val {
    font-size: 1.4rem;
  }
  .admin-inline-form {
    flex-wrap: wrap;
  }
  .admin-table-wrap {
    overflow-x: auto;
  }
}

/* ============================================
   ADMIN PANEL — ENHANCED STYLES v2
   ============================================ */

/* Confirmation Modal */
.admin-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-modal-overlay.active {
  display: flex;
}

.admin-modal {
  background: var(--white);
  border-radius: 12px;
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: modalIn 0.2s ease;
  box-shadow: 0 20px 60px rgba(27,42,74,0.25);
}

.admin-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(231,76,60,0.1);
  color: #E74C3C;
  margin-bottom: 16px;
}

.admin-modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.admin-modal-desc {
  font-size: 0.9rem;
  color: rgba(27,42,74,0.6);
  margin-bottom: 24px;
  line-height: 1.5;
}

.admin-modal-desc strong {
  color: var(--navy);
}

.admin-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.admin-modal-confirm-btn {
  background: #E74C3C;
  color: white;
  border: 2px solid #E74C3C;
  padding: 8px 24px;
}

.admin-modal-confirm-btn:hover {
  background: #C0392B;
  border-color: #C0392B;
}

/* Modern Search Bar */
.admin-search-modern {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: 48px;
  background: var(--white);
  border: 1.5px solid rgba(27,42,74,0.08);
  border-radius: 12px;
  margin-bottom: 16px;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(27,42,74,0.03);
}

.admin-search-modern:hover {
  border-color: rgba(27,42,74,0.15);
  box-shadow: 0 4px 16px rgba(27,42,74,0.06);
}

.admin-search-modern:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197,160,0,0.12), 0 4px 16px rgba(27,42,74,0.06);
}

.search-icon-wrap {
  display: flex;
  align-items: center;
  color: rgba(27,42,74,0.3);
  flex-shrink: 0;
  transition: color 0.2s;
}

.admin-search-modern:focus-within .search-icon-wrap {
  color: var(--gold);
}

.search-modern-input {
  border: none;
  background: transparent;
  font-size: 0.92rem;
  color: var(--navy);
  font-family: inherit;
  flex: 1;
  outline: none;
  font-weight: 500;
}

.search-modern-input::placeholder {
  color: rgba(27,42,74,0.3);
  font-weight: 400;
}

.search-shortcut {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.search-shortcut kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  background: rgba(27,42,74,0.04);
  border: 1px solid rgba(27,42,74,0.1);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(27,42,74,0.35);
  line-height: 1;
}

/* Bulk Actions Bar */
.admin-bulk-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: rgba(231,76,60,0.06);
  border: 1px solid rgba(231,76,60,0.15);
  border-radius: var(--radius);
  margin-bottom: 16px;
  animation: fadeIn 0.2s ease;
}

.admin-bulk-bar span {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(27,42,74,0.7);
}

.admin-bulk-deactivate-btn {
  background: #E74C3C;
  color: white;
  border: 2px solid #E74C3C;
  gap: 6px;
}

.admin-bulk-deactivate-btn:hover {
  background: #C0392B;
  border-color: #C0392B;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Checkboxes */
.admin-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
}

/* Code Cell with Copy */
.code-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-clickable {
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.code-clickable:hover {
  background: rgba(197,160,0,0.22);
  transform: scale(1.03);
}

.admin-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(27,42,74,0.04);
  border-radius: 6px;
  color: rgba(27,42,74,0.35);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.admin-copy-btn:hover {
  background: rgba(27,42,74,0.08);
  color: var(--navy);
}

.admin-copy-btn.copied {
  background: rgba(16,185,129,0.12);
  color: #10B981;
}

.admin-copy-btn.copied::after {
  content: 'Copied!';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--cream);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
  animation: tooltipFade 1.5s ease forwards;
}

@keyframes tooltipFade {
  0% { opacity: 0; transform: translateX(-50%) translateY(4px); }
  15% { opacity: 1; transform: translateX(-50%) translateY(0); }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

/* Status Badges */
.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-active {
  background: rgba(16,185,129,0.1);
  color: #10B981;
}

.status-expired {
  background: rgba(245,158,11,0.1);
  color: #F59E0B;
}

.status-deactivated {
  background: rgba(231,76,60,0.08);
  color: #E74C3C;
}

.row-inactive td {
  opacity: 0.5;
}

.row-inactive .action-btns,
.row-inactive .admin-checkbox {
  opacity: 1;
}

/* Action Buttons */
.action-btns {
  display: flex;
  gap: 6px;
  align-items: center;
}

.admin-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(27,42,74,0.05);
  border-radius: 6px;
  color: rgba(27,42,74,0.5);
  cursor: pointer;
  transition: var(--transition);
}

.admin-view-btn:hover {
  background: rgba(27,42,74,0.1);
  color: var(--navy);
}

.admin-deactivate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(231,76,60,0.08);
  border-radius: 6px;
  color: rgba(231,76,60,0.6);
  cursor: pointer;
  transition: var(--transition);
}

.admin-deactivate-btn:hover {
  background: rgba(231,76,60,0.15);
  color: #E74C3C;
}

.admin-reactivate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(16,185,129,0.08);
  border-radius: 6px;
  color: rgba(16,185,129,0.6);
  cursor: pointer;
  transition: var(--transition);
}

.admin-reactivate-btn:hover {
  background: rgba(16,185,129,0.15);
  color: #10B981;
}

/* Expiry Input in Add Code Form */
.admin-expiry-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-expiry-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(27,42,74,0.5);
  white-space: nowrap;
}

.admin-date-input {
  max-width: 160px;
  font-size: 0.85rem !important;
}

/* Usage Stats Column */
.admin-uses {
  font-weight: 600;
  color: var(--navy);
  text-align: center;
}

/* Skeleton Loading */
.skeleton-row td {
  padding: 18px !important;
}

.skeleton-line {
  height: 16px;
  background: linear-gradient(90deg, rgba(27,42,74,0.06) 25%, rgba(27,42,74,0.12) 50%, rgba(27,42,74,0.06) 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty State */
.admin-empty-state {
  text-align: center !important;
  padding: 60px 18px !important;
}

.empty-illustration {
  margin-bottom: 16px;
}

.empty-illustration svg {
  color: var(--navy);
}

.empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(27,42,74,0.6);
  margin-bottom: 4px;
}

.empty-sub {
  font-size: 0.85rem;
  color: rgba(27,42,74,0.35);
}

/* Sortable Column Headers */
.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

.sortable:hover {
  color: var(--navy);
}

.sort-arrow {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.65rem;
  opacity: 0.3;
}

.sortable.sort-asc .sort-arrow::after {
  content: '▲';
  opacity: 1;
}

.sortable.sort-desc .sort-arrow::after {
  content: '▼';
  opacity: 1;
}

/* Enhanced Toast */
.admin-toast {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-toast.show.success {
  border-left: 3px solid #10B981;
}

.admin-toast.show.error {
  border-left: 3px solid #E74C3C;
}

.toast-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.admin-toast.success .toast-icon {
  color: #10B981;
}

.admin-toast.error .toast-icon {
  color: #E74C3C;
}

.toast-msg {
  font-size: 0.88rem;
}

/* ============================================
   DETAIL DRAWER
   ============================================ */

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
}

.drawer-overlay.active {
  display: block;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 100vw;
  background: var(--white);
  box-shadow: -8px 0 40px rgba(27,42,74,0.15);
  display: flex;
  flex-direction: column;
  animation: drawerSlide 0.25s ease;
  z-index: 9999;
}

@keyframes drawerSlide {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 28px 20px;
  border-bottom: 1px solid rgba(27,42,74,0.08);
}

.drawer-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 2px;
}

.drawer-subtitle {
  font-size: 0.82rem;
  color: rgba(27,42,74,0.45);
  margin-top: 4px;
}

.drawer-close {
  background: none;
  border: none;
  color: rgba(27,42,74,0.4);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: var(--transition);
}

.drawer-close:hover {
  background: rgba(27,42,74,0.06);
  color: var(--navy);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 36px;
}

.drawer-loading {
  padding: 20px 0;
}

.drawer-error {
  color: #E74C3C;
  text-align: center;
  padding: 40px 0;
}

.drawer-section {
  margin-bottom: 28px;
}

.drawer-section-title {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(27,42,74,0.5);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-count {
  background: rgba(27,42,74,0.08);
  color: rgba(27,42,74,0.5);
  font-size: 0.7rem;
  padding: 1px 8px;
  border-radius: 100px;
}

.drawer-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.admin-drawer-deactivate {
  background: rgba(231,76,60,0.1);
  color: #E74C3C;
  border: 1px solid rgba(231,76,60,0.2);
  font-size: 0.8rem;
  padding: 6px 16px;
}

.admin-drawer-deactivate:hover {
  background: rgba(231,76,60,0.2);
}

.admin-drawer-reactivate {
  font-size: 0.8rem;
  padding: 6px 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(27,42,74,0.4);
}

.detail-value {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--navy);
}

.detail-big {
  font-size: 1.5rem;
  font-weight: 800;
}

.drawer-empty {
  font-size: 0.88rem;
  color: rgba(27,42,74,0.4);
  text-align: center;
  padding: 20px 0;
}

/* Usage Log Timeline */
.usage-log-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.usage-log-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(27,42,74,0.06);
}

.usage-log-item:last-child {
  border-bottom: none;
}

.log-time {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.log-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.log-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: rgba(27,42,74,0.55);
}

.log-detail svg {
  flex-shrink: 0;
  opacity: 0.5;
}

.log-ua {
  word-break: break-all;
}

@media (max-width: 768px) {
  .drawer {
    width: 100vw;
  }
}

/* ==============================
   LEAD STATS GRID (Fixed alignment)
   ============================== */
.lead-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.lead-stat-card {
  background: #fff;
  border: 1px solid rgba(27,42,74,0.08);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.2s ease;
}

.lead-stat-card:hover {
  box-shadow: 0 4px 16px rgba(27,42,74,0.08);
  transform: translateY(-1px);
}

.lead-stat-val {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
}

.lead-stat-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(27,42,74,0.5);
}

.lead-stat-card.stat-total .lead-stat-val { color: var(--navy); }
.lead-stat-card.stat-new .lead-stat-val { color: #d4a017; }
.lead-stat-card.stat-contacted .lead-stat-val { color: #6366f1; }
.lead-stat-card.stat-qualified .lead-stat-val { color: #10b981; }
.lead-stat-card.stat-closed .lead-stat-val { color: #1b2a4a; }

/* ==============================
   VIEW TOGGLE
   ============================== */
.view-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.view-toggle {
  display: inline-flex;
  background: rgba(27,42,74,0.04);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(27,42,74,0.5);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-toggle-btn:hover {
  color: var(--navy);
  background: rgba(27,42,74,0.04);
}

.view-toggle-btn.active {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 1px 4px rgba(27,42,74,0.1);
}

.view-toggle-btn svg {
  flex-shrink: 0;
}

/* ==============================
   VIEW CONTAINERS
   ============================== */
.lead-view {
  display: none;
}

.lead-view.active {
  display: block;
}

/* ==============================
   KANBAN BOARD
   ============================== */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  min-height: 400px;
}

.kanban-column {
  background: rgba(27,42,74,0.025);
  border-radius: 14px;
  padding: 12px;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.kanban-column.drag-over {
  border-color: var(--gold);
  background: rgba(212,160,23,0.04);
}

.kanban-col-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px 14px;
  border-bottom: 2px solid rgba(27,42,74,0.06);
  margin-bottom: 12px;
}

.kanban-col-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-new { background: #d4a017; }
.dot-contacted { background: #6366f1; }
.dot-qualified { background: #10b981; }
.dot-closed { background: #1b2a4a; }

.kanban-col-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex: 1;
}

.kanban-col-count {
  background: rgba(27,42,74,0.06);
  color: rgba(27,42,74,0.6);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  min-width: 22px;
  text-align: center;
}

.kanban-cards {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 80px;
}

.kanban-empty {
  text-align: center;
  color: rgba(27,42,74,0.25);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 32px 8px;
  border: 2px dashed rgba(27,42,74,0.08);
  border-radius: 10px;
}

/* ==============================
   KANBAN CARD
   ============================== */
.kanban-card {
  background: #fff;
  border: 1px solid rgba(27,42,74,0.08);
  border-radius: 10px;
  padding: 14px;
  cursor: grab;
  transition: all 0.2s ease;
  position: relative;
}

.kanban-card:hover {
  box-shadow: 0 4px 16px rgba(27,42,74,0.1);
  transform: translateY(-1px);
  border-color: rgba(27,42,74,0.12);
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card.dragging {
  opacity: 0.4;
  transform: rotate(2deg) scale(0.96);
  box-shadow: 0 8px 24px rgba(27,42,74,0.15);
}

.kanban-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}

.kanban-card-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.kanban-card-drag {
  color: rgba(27,42,74,0.25);
  flex-shrink: 0;
  margin-top: 2px;
}

.kanban-card-company {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(27,42,74,0.5);
  margin-bottom: 8px;
}

.kanban-card-meta {
  margin-bottom: 10px;
}

.kanban-card-email {
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 500;
  word-break: break-all;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(27,42,74,0.06);
}

.kanban-card-title {
  font-size: 0.72rem;
  color: rgba(27,42,74,0.45);
  font-weight: 500;
}

.kanban-card-date {
  font-size: 0.68rem;
  color: rgba(27,42,74,0.35);
  font-weight: 600;
  white-space: nowrap;
}

/* ==============================
   RESPONSIVE — Kanban & Stats
   ============================== */
@media (max-width: 1100px) {
  .kanban-board {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .lead-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .kanban-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .lead-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==============================
   LEAD DETAIL DRAWER CONTENT
   ============================== */
.lead-contact-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.lead-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--navy);
}

.lead-contact-item svg {
  flex-shrink: 0;
  color: rgba(27,42,74,0.35);
}

.lead-contact-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
}

.lead-contact-link:hover {
  text-decoration: underline;
}

.lead-source-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(27,42,74,0.06);
  color: rgba(27,42,74,0.5);
  letter-spacing: 0.02em;
}

/* Status badge variants for lead statuses */
.status-contacted {
  background: rgba(99,102,241,0.1) !important;
  color: #6366f1 !important;
  border-color: rgba(99,102,241,0.2) !important;
}

.status-qualified {
  background: rgba(16,185,129,0.1) !important;
  color: #10b981 !important;
  border-color: rgba(16,185,129,0.2) !important;
}

.status-closed {
  background: rgba(27,42,74,0.08) !important;
  color: #1b2a4a !important;
  border-color: rgba(27,42,74,0.15) !important;
}

/* ==============================
   NOTES
   ============================== */
.lead-note-form {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.lead-note-textarea {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid rgba(27,42,74,0.12);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.82rem;
  resize: vertical;
  min-height: 40px;
  max-height: 120px;
  outline: none;
  transition: border-color 0.2s;
  background: rgba(27,42,74,0.02);
}

.lead-note-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,160,23,0.1);
}

.lead-notes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lead-note {
  background: rgba(27,42,74,0.025);
  border-radius: 10px;
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
}

.lead-note-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.lead-note-author {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
}

.lead-note-time {
  font-size: 0.68rem;
  color: rgba(27,42,74,0.4);
  flex: 1;
}

.lead-note-delete {
  background: none;
  border: none;
  color: rgba(27,42,74,0.2);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: all 0.15s;
  display: flex;
}

.lead-note-delete:hover {
  color: #e53e3e;
  background: rgba(229,62,62,0.08);
}

.lead-note-body {
  font-size: 0.82rem;
  color: rgba(27,42,74,0.7);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==============================
   EXPORT CSV BUTTON
   ============================== */
.export-csv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(27,42,74,0.12);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.2s;
}

.export-csv-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 2px 8px rgba(212,160,23,0.12);
}

.export-csv-btn svg {
  flex-shrink: 0;
}

/* ==============================
   CLICKABLE LEAD ROWS
   ============================== */
.lead-row-clickable {
  cursor: pointer;
  transition: background-color 0.15s;
}

.lead-row-clickable:hover {
  background: rgba(212,160,23,0.04) !important;
}

/* Clickable code rows */
.code-row-clickable {
  cursor: pointer;
  transition: background-color 0.15s;
}

.code-row-clickable:hover {
  background: rgba(212,160,23,0.04) !important;
}

/* Kanban card click cursor */
.kanban-card {
  cursor: pointer;
}

/* ==============================
   RATE LIMITS TAB
   ============================== */

/* Stats grid — matches lead-stats-grid pattern */
.rl-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.rl-stat-card {
  background: #fff;
  border: 1px solid rgba(27,42,74,0.08);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.2s ease;
}

.rl-stat-card:hover {
  box-shadow: 0 4px 16px rgba(27,42,74,0.08);
  transform: translateY(-1px);
}

.rl-stat-val {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
  color: var(--navy);
}

.rl-stat-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(27,42,74,0.5);
}

.rl-stat-blocked .rl-stat-val { color: #E74C3C; }
.rl-stat-warning .rl-stat-val { color: #F59E0B; }

/* Actions bar */
.rl-actions-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.rl-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(27,42,74,0.12);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.rl-refresh-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 2px 8px rgba(212,160,23,0.12);
}

.rl-refresh-btn svg {
  flex-shrink: 0;
}

.rl-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(231,76,60,0.2);
  background: rgba(231,76,60,0.05);
  color: #E74C3C;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.rl-clear-btn:hover {
  background: rgba(231,76,60,0.1);
  border-color: rgba(231,76,60,0.35);
  box-shadow: 0 2px 8px rgba(231,76,60,0.1);
}

.rl-clear-btn svg {
  flex-shrink: 0;
}

/* IP hash column */
.rl-ip-hash {
  font-size: 0.72rem !important;
  letter-spacing: 0.5px;
  opacity: 0.5;
}

/* Blocked row highlight */
.rl-row-blocked {
  background: rgba(231,76,60,0.03);
}

.rl-row-blocked:hover {
  background: rgba(231,76,60,0.06) !important;
}

/* Attempts progress bar */
.rl-attempts {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rl-attempts-bar {
  flex: 1;
  height: 6px;
  background: rgba(27,42,74,0.06);
  border-radius: 99px;
  overflow: hidden;
  min-width: 60px;
  max-width: 100px;
}

.rl-attempts-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}

.rl-fill-ok {
  background: #10B981;
}

.rl-fill-warning {
  background: #F59E0B;
}

.rl-fill-blocked {
  background: #E74C3C;
}

.rl-attempts-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

/* IP cell with hash subtitle */
.rl-ip-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rl-ip-hash-sub {
  font-size: 0.65rem;
  font-family: 'Courier New', Courier, monospace;
  color: rgba(27,42,74,0.3);
  letter-spacing: 0.3px;
}

/* Location column */
.rl-location {
  font-size: 0.82rem;
  color: rgba(27,42,74,0.6);
}

/* Code badge in table */
.rl-code-badge {
  font-size: 0.72rem !important;
  background: rgba(231,76,60,0.06) !important;
  color: #c0392b !important;
  border-color: rgba(231,76,60,0.15) !important;
}

/* Code in drawer logs */
.rl-log-code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: #c0392b;
  background: rgba(231,76,60,0.06);
  padding: 1px 6px;
  border-radius: 4px;
}

.rl-no-data {
  color: rgba(27,42,74,0.25);
}

/* Clickable rows */
.rl-row-clickable {
  cursor: pointer;
  transition: background-color 0.15s;
}

.rl-row-clickable:hover {
  background: rgba(212,160,23,0.04) !important;
}

.rl-row-blocked.rl-row-clickable:hover {
  background: rgba(231,76,60,0.06) !important;
}

/* Auto-refresh label */
.rl-auto-refresh-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(27,42,74,0.4);
  margin-left: auto;
  margin-right: 8px;
  white-space: nowrap;
}

.rl-auto-refresh-label span {
  font-weight: 700;
  color: rgba(27,42,74,0.6);
  font-variant-numeric: tabular-nums;
}

/* ==============================
   AUDIT LOG TAB
   ============================== */
.audit-action-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.3px;
}

.audit-neutral {
  background: rgba(27,42,74,0.06);
  color: var(--navy);
}

.audit-destructive {
  background: rgba(245,158,11,0.1);
  color: #d97706;
}

.audit-admin {
  font-size: 0.82rem;
  color: rgba(27,42,74,0.6);
}

.audit-details {
  font-size: 0.78rem;
  color: rgba(27,42,74,0.55);
  max-width: 400px;
  word-break: break-word;
}

.audit-details code {
  font-size: 0.72rem;
}

/* ==============================
   FILTER BAR (Search + Date Range)
   ============================== */
.admin-filter-bar {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-date-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.date-filter-sep {
  font-size: 0.75rem;
  color: var(--admin-text-muted, rgba(27,42,74,0.4));
  font-weight: 500;
}

/* ==============================
   NAV BADGE (New Lead Count)
   ============================== */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  font-size: 0.65rem;
  font-weight: 700;
  background: #E74C3C;
  color: #fff;
  margin-left: auto;
  line-height: 1;
}

/* ==============================
   KANBAN TOUCH GHOST
   ============================== */
.kanban-card-ghost {
  box-shadow: 0 12px 40px rgba(27,42,74,0.2);
  border-radius: 10px;
  transform: rotate(2deg);
}

/* Responsive */
@media (max-width: 768px) {
  .rl-stats-grid {
    grid-template-columns: 1fr;
  }
  .admin-filter-bar {
    flex-direction: column;
  }
  .admin-date-filter {
    flex-wrap: wrap;
  }
  .nav-badge {
    margin-left: 4px;
  }
}
