/* ==========================================================================
   Green Lending x Neo Gen Technologies - Design System
   Modern Dark Glassmorphism, Emerald (Green Lending) & Electric Blue (Neo Gen)
   ========================================================================== */

:root {
  --bg-main: #090d16;
  --bg-card: #111827;
  --bg-card-subtle: #172033;
  --bg-surface: #1e293b;
  --bg-elevated: #243247;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-highlight: rgba(16, 185, 129, 0.4);

  /* Brand Accents */
  --green-lending: #10b981;
  --green-light: #34d399;
  --green-glow: rgba(16, 185, 129, 0.25);
  
  --neogen-blue: #0284c7;
  --neogen-cyan: #38bdf8;
  --neogen-deep: #0369a1;
  --neogen-glow: rgba(56, 189, 248, 0.25);

  --accent-gold: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;

  /* Typography */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.25);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(2, 132, 199, 0.06) 0%, transparent 40%);
}

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

/* ==========================================================================
   Top Header Navigation
   ========================================================================== */

.top-nav-bar {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-partnership {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo.neogen-img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.client-logo-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 8px 12px;
  border-radius: var(--radius-md);
}

.client-logo-badge.official-gl-badge {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
  height: 44px;
}

.official-gl-logo {
  height: 30px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

.brand-meta {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.partnership-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-system-status {
  display: flex;
  align-items: center;
  gap: 20px;
}

.system-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.6);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--green-lending);
  box-shadow: 0 0 8px var(--green-lending);
}

.status-dot.pulsing {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.quick-links {
  display: flex;
  gap: 10px;
}

/* ==========================================================================
   Navigation Tabs Bar
   ========================================================================== */

.main-tabs-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 69px;
  z-index: 90;
  width: 100%;
}

.tabs-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.nav-tabs {
  display: flex;
  list-style: none;
  gap: 6px;
  padding: 8px 0;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.tab-item {
  flex: 0 0 auto;
}

.tab-item button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-item button:hover {
  color: var(--text-main);
  background: var(--bg-surface);
}

.tab-item.active button {
  color: #fff;
  background: var(--bg-surface);
  border-color: var(--border-medium);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.tab-badge {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.tab-badge.hot {
  background: rgba(16, 185, 129, 0.2);
  color: var(--green-light);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.tab-badge.count {
  background: var(--bg-elevated);
  color: var(--neogen-cyan);
}

/* ==========================================================================
   Buttons & Pills
   ========================================================================== */

.btn-pill {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-pill.primary {
  background: linear-gradient(135deg, var(--green-lending), #059669);
  color: #fff;
  border: none;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.btn-pill.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
}

.btn-pill.outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-medium);
}

.btn-pill.outline:hover {
  background: var(--bg-surface);
  border-color: var(--border-highlight);
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-primary.full-width {
  width: 100%;
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-medium);
  font-family: inherit;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background: var(--bg-surface);
  border-color: var(--border-medium);
}

.btn-takeover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-takeover:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.btn-takeover.active-takeover {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

.btn-outline-danger {
  background: transparent;
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}

.btn-outline-subtle {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline-subtle:hover {
  background: var(--bg-surface);
  color: var(--text-main);
}

/* ==========================================================================
   Hero Platform Section
   ========================================================================== */

.platform-hero {
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.7) 0%, rgba(9, 13, 22, 0.9) 100%);
}

.hero-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--green-light);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-light);
}

.hero-headline {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #ffffff 60%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtext {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.hero-subtext strong {
  color: var(--text-main);
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.hero-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--green-light);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hero-card-panel {
  background: linear-gradient(145deg, #172033, #0f172a);
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(2, 132, 199, 0.15);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.panel-tag {
  background: rgba(56, 189, 248, 0.15);
  color: var(--neogen-cyan);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.panel-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--green-light);
  letter-spacing: -0.3px;
}

.panel-badge-pill {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-light);
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.panel-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.panel-features {
  list-style: none;
  font-size: 0.85rem;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel-features li {
  color: #cbd5e1;
}

/* ==========================================================================
   Tab View System
   ========================================================================== */

.main-content-container {
  padding-top: 30px;
  padding-bottom: 60px;
}

.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.section-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  gap: 20px;
}

.intro-left h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.intro-left p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 850px;
}

/* ==========================================================================
   TAB 1: AI SMS Simulator Layout
   ========================================================================== */

.workflow-selector-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.control-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
  font-weight: 700;
}

.workflow-toggle-group {
  display: flex;
  gap: 6px;
}

.wf-btn {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.wf-btn:hover {
  color: var(--text-main);
  background: var(--bg-elevated);
}

.wf-btn.active {
  background: rgba(16, 185, 129, 0.2);
  color: var(--green-light);
  border-color: rgba(16, 185, 129, 0.4);
}

.simulator-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 28px;
  align-items: flex-start;
}

/* Smartphone Mockup Frame */
.simulator-phone-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.smartphone-frame {
  width: 100%;
  max-width: 370px;
  height: 640px;
  background: #000;
  border-radius: 44px;
  border: 6px solid #2d3748;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(16, 185, 129, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.phone-notch {
  width: 140px;
  height: 22px;
  background: #2d3748;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.phone-notch .speaker {
  width: 40px;
  height: 4px;
  background: #111;
  border-radius: 2px;
}

.phone-notch .camera {
  width: 8px;
  height: 8px;
  background: #0d1b2a;
  border-radius: 50%;
  border: 1px solid #1e293b;
}

.phone-screen-header {
  background: #182234;
  padding: 26px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 10;
}

.phone-carrier-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.phone-contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-back-btn {
  background: none;
  border: none;
  color: var(--neogen-cyan);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.contact-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.contact-avatar.gl-avatar {
  background: #ffffff;
  padding: 3px 5px;
  border-radius: 10px;
  width: 44px;
  height: 34px;
}

.phone-gl-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.contact-info {
  flex: 1;
  overflow: hidden;
}

.contact-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-status {
  font-size: 0.7rem;
  color: var(--green-light);
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-circle-small {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-circle-small.online {
  background: var(--green-light);
}

.phone-call-btn {
  font-size: 1.1rem;
  color: var(--neogen-cyan);
  cursor: pointer;
}

/* Messages Body */
.phone-messages-area {
  flex: 1;
  background: #0f172a;
  padding: 14px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone-messages-area::-webkit-scrollbar {
  width: 4px;
}

.phone-messages-area::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 2px;
}

.sms-bubble {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.4;
  position: relative;
  word-wrap: break-word;
}

.sms-bubble.ai {
  align-self: flex-start;
  background: #1e293b;
  color: #f1f5f9;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sms-bubble.agent {
  align-self: flex-start;
  background: linear-gradient(135deg, #1e3a5f, #0f2744);
  color: #e0f2fe;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.sms-bubble.lead {
  align-self: flex-end;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.sms-bubble.system {
  align-self: center;
  max-width: 90%;
  background: rgba(30, 41, 59, 0.7);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
  padding: 5px 10px;
  border-radius: 12px;
}

.sms-meta {
  font-size: 0.65rem;
  margin-top: 4px;
  opacity: 0.7;
  display: flex;
  justify-content: flex-end;
}

.sms-sender-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
  display: block;
}

.sms-bubble.ai .sms-sender-tag { color: var(--green-light); }
.sms-bubble.agent .sms-sender-tag { color: var(--neogen-cyan); }
.sms-bubble.lead .sms-sender-tag { color: rgba(255, 255, 255, 0.9); }

/* Typing indicator */
.typing-indicator {
  padding: 6px 14px;
  background: #1e293b;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-light);
  animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Phone Input Bar */
.phone-input-bar {
  background: #182234;
  padding: 10px 12px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-attach {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
}

.phone-text-input {
  flex: 1;
  background: #0f172a;
  border: 1px solid var(--border-medium);
  color: #fff;
  padding: 9px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}

.phone-text-input:focus {
  border-color: var(--green-lending);
}

.btn-send-sms {
  background: var(--green-lending);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn-send-sms:hover {
  transform: scale(1.05);
}

.phone-footnote {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
}

/* Simulator Intelligence Dashboard (Right Column) */
.simulator-intel-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.intel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.intel-card.highlight-card {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(145deg, #131c2e, #0e1626);
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.lead-score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 20px;
  line-height: 1.2;
  box-sizing: border-box;
}

.lead-score-badge.hot {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.lead-score-badge.warm {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.lead-score-badge.cold {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.scoring-meter-wrap {
  margin-bottom: 14px;
}

.meter-bar {
  height: 8px;
  background: #1e293b;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}

.meter-fill {
  height: 100%;
  transition: width 0.5s ease;
}

.meter-fill.hot {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.meter-fill.warm {
  background: linear-gradient(90deg, #38bdf8, #f59e0b);
}

.meter-fill.cold {
  background: #38bdf8;
}

.meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.intent-pill-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.intent-pill {
  background: var(--bg-surface);
  color: var(--green-light);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.badge-mini {
  font-size: 0.7rem;
  background: var(--bg-surface);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 10px;
}

.intel-help {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.extracted-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.field-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  padding: 10px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
}

.field-name {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.field-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e2e8f0;
}

.field-val.highlight {
  color: var(--neogen-cyan);
}

.field-val.text-emerald {
  color: var(--green-light);
}

/* Quick Chips */
.quick-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.8rem;
  padding: 7px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.chip-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--green-lending);
  color: #fff;
  transform: translateY(-1px);
}

.handoff-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.tcpa-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.4;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

/* ==========================================================================
   TAB 2: CRM & Leads View
   ========================================================================== */

.crm-kpi-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.crm-kpi-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.kpi-val {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
}

.text-red { color: #f87171 !important; }
.text-yellow { color: #fbbf24 !important; }
.text-blue { color: var(--neogen-cyan) !important; }
.text-emerald { color: var(--green-light) !important; }
.font-bold { font-weight: 700; }

.crm-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 14px;
  flex: 1;
  max-width: 450px;
}

.search-icon {
  margin-right: 8px;
  font-size: 0.9rem;
}

.search-box input {
  background: none;
  border: none;
  color: #fff;
  padding: 10px 0;
  font-family: inherit;
  font-size: 0.85rem;
  width: 100%;
  outline: none;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.select-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.select-pill:focus {
  border-color: var(--green-lending);
}

.btn-export-csv {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-export-csv:hover {
  background: var(--bg-elevated);
  color: #fff;
}

.leads-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.leads-table th {
  background: #162032;
  color: var(--text-muted);
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.leads-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
  white-space: nowrap;
}

.leads-table tr:hover {
  background: rgba(30, 41, 59, 0.5);
  cursor: pointer;
}

.borrower-cell {
  display: flex;
  flex-direction: column;
}

.borrower-name {
  font-weight: 700;
  color: #fff;
}

.borrower-contact {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.badge-tag.heloc { background: rgba(16, 185, 129, 0.15); color: var(--green-light); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-tag.refi { background: rgba(2, 132, 199, 0.15); color: var(--neogen-cyan); border: 1px solid rgba(2, 132, 199, 0.3); }
.badge-tag.purchase { background: rgba(139, 92, 246, 0.15); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.3); }

.status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 4px;
  line-height: 1.2;
}

.status-badge.qualified { background: rgba(16, 185, 129, 0.15); color: var(--green-light); }
.status-badge.engaging { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.status-badge.takeover { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.status-badge.cold { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }
.status-badge.optout { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }

/* ==========================================================================
   TAB 3: Two-Way SMS Inbox
   ========================================================================== */

.inbox-layout {
  display: grid;
  grid-template-columns: 320px 1fr 340px;
  gap: 20px;
  height: 680px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.inbox-threads-sidebar {
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

.threads-header {
  padding: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.threads-search {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

.threads-list {
  flex: 1;
  overflow-y: auto;
}

.thread-item {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.15s ease;
}

.thread-item:hover {
  background: var(--bg-surface);
}

.thread-item.active {
  background: rgba(2, 132, 199, 0.12);
  border-left: 3px solid var(--neogen-cyan);
}

.thread-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.thread-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.thread-time {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.thread-preview {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.thread-badges {
  display: flex;
  gap: 6px;
}

/* Conversation Main View */
.inbox-conversation-main {
  display: flex;
  flex-direction: column;
  background: #0d1322;
}

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

.convo-user-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.convo-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}

.category-chip {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-light);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.assigned-chip {
  color: var(--neogen-cyan);
}

.convo-messages-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.canned-responses-row {
  padding: 8px 16px;
  background: #111a2e;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.canned-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  white-space: nowrap;
  font-weight: 700;
}

.chip-action {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.chip-action:hover {
  background: var(--neogen-blue);
  color: #fff;
}

.convo-reply-bar {
  padding: 14px 20px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 10px;
}

.convo-reply-bar input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

.convo-reply-bar input:focus {
  border-color: var(--neogen-blue);
}

/* Inbox Details Sidebar */
.inbox-details-sidebar {
  border-left: 1px solid var(--border-subtle);
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-block h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.sidebar-data-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.data-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-row .d-label {
  color: var(--text-muted);
}

.data-row .d-val {
  font-weight: 700;
  color: #fff;
}

.notes-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.notes-badge {
  font-size: 0.65rem;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  padding: 2px 6px;
  border-radius: 4px;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  max-height: 180px;
  overflow-y: auto;
}

.note-bubble {
  background: var(--bg-surface);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

.note-author {
  font-weight: 700;
  color: var(--neogen-cyan);
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
}

.note-author span {
  font-size: 0.65rem;
  color: var(--text-dim);
}

.add-note-box {
  display: flex;
  gap: 6px;
}

.add-note-box input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  outline: none;
}

/* ==========================================================================
   TAB 4: Campaigns Grid & Sequences
   ========================================================================== */

.tcpa-status-chip {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--green-light);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.campaigns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.campaign-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s;
}

.campaign-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
}

.campaign-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.campaign-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.camp-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
  background: var(--bg-surface);
  padding: 12px;
  border-radius: var(--radius-sm);
}

.c-stat-item {
  display: flex;
  flex-direction: column;
}

.c-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.c-stat-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-mono);
}

.sequence-blueprint-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

.blueprint-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.blueprint-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.sequence-timeline {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 16px;
  min-width: 220px;
  flex: 1;
}

.step-badge {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--neogen-cyan);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.step-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.step-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
}

.step-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--green-light);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.step-arrow {
  color: var(--text-dim);
  font-size: 1.2rem;
  font-weight: 800;
}

/* ==========================================================================
   TAB 5: Analytics Charts
   ========================================================================== */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.kpi-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.kpi-big-num {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  margin-bottom: 4px;
}

.kpi-trend {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.kpi-trend.positive { color: var(--green-light); }
.kpi-trend.highlight { color: #f87171; font-weight: 700; }

.analytics-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.chart-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.segment-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bar-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.prog-track {
  height: 10px;
  background: var(--bg-surface);
  border-radius: 5px;
  overflow: hidden;
}

.prog-fill {
  height: 100%;
  border-radius: 5px;
}

.prog-fill.emerald { background: var(--green-lending); }
.prog-fill.blue { background: var(--neogen-blue); }
.prog-fill.purple { background: var(--accent-purple); }

.score-breakdown-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.score-circle-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-perc {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.score-circle-stat.hot .stat-perc { color: #f87171; }
.score-circle-stat.warm .stat-perc { color: #fbbf24; }
.score-circle-stat.cold .stat-perc { color: var(--neogen-cyan); }
.score-circle-stat.muted .stat-perc { color: var(--text-dim); }

.stat-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.stat-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ==========================================================================
   TAB 6: Architecture Stack
   ========================================================================== */

.architecture-diagram-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 30px;
  margin-bottom: 30px;
}

.arch-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow-x: auto;
}

.arch-node {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 18px;
  flex: 1;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.arch-node.highlight-emerald {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

.arch-node.highlight-blue {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.08);
}

.arch-node.highlight-gold {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
}

.node-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.arch-node h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.arch-node p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
}

.node-badge {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  background: #0f172a;
  color: var(--neogen-cyan);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.arch-connector {
  font-size: 1.4rem;
  color: var(--text-dim);
}

.tech-stack-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tech-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.tech-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.tech-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   TAB 7: Official Proposal Document Sheet
   ========================================================================== */

.proposal-doc-sheet {
  background: #0d1322;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.doc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.doc-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.co-brand-pair {
  display: flex;
  align-items: center;
  gap: 12px;
}

.co-brand-x {
  font-size: 1.2rem;
  color: var(--text-dim);
}

.doc-gl-logo-box {
  background: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
}

.doc-gl-logo {
  height: 42px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.doc-logo {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--border-medium);
}

.doc-brand h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.doc-brand p {
  font-size: 0.9rem;
  color: var(--neogen-cyan);
}

.doc-brand .text-dim {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.doc-meta {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.meta-row span {
  color: var(--text-muted);
}

.doc-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 30px 0;
}

.doc-section {
  margin-bottom: 34px;
}

.doc-section h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.doc-section p {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 14px;
}

.callout-box {
  background: rgba(16, 185, 129, 0.08);
  border-left: 4px solid var(--green-lending);
  padding: 16px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 16px 0;
}

.callout-box strong {
  color: var(--green-light);
  display: block;
  margin-bottom: 8px;
}

.callout-box ul {
  padding-left: 20px;
  font-size: 0.85rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Comparison Table */
.comparison-table-wrap,
.milestones-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
}

.comparison-table,
.milestones-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.comparison-table th,
.milestones-table th {
  background: #172033;
  color: #fff;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-medium);
}

.comparison-table th.recommended-th {
  background: rgba(16, 185, 129, 0.2);
  color: var(--green-light);
  border-top: 2px solid var(--green-lending);
}

.comparison-table td,
.milestones-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

.comparison-table td.recommended-td {
  background: rgba(16, 185, 129, 0.05);
  color: #fff;
  font-weight: 500;
}

.m-pill {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  color: var(--neogen-cyan);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 6px;
}

.total-row td {
  background: #131d2e;
  font-size: 1rem;
  padding: 16px 14px;
}

/* SLA Grid */
.sla-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 20px 0;
}

.sla-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.sla-icon {
  font-size: 1.6rem;
}

.sla-item strong {
  font-size: 0.9rem;
  color: #fff;
  display: block;
  margin-bottom: 4px;
}

.sla-item p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.4;
}

.doc-footer-cta {
  background: linear-gradient(135deg, #10243b, #0c1a2e);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 24px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
}

.cta-left h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.cta-left p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.big-cta {
  font-size: 1rem;
  padding: 14px 28px;
}

/* ==========================================================================
   Modals
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-dialog {
  background: #111827;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.modal-dialog.small-dialog {
  max-width: 520px;
}

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

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}

.modal-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.15s;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.co-brand-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.kickoff-summary-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
}

.summary-line span {
  color: var(--text-muted);
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
}

.form-group input,
.form-group select {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--green-lending);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #1e293b;
  border-left: 4px solid var(--green-lending);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease;
  min-width: 280px;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   Print Styles (for saving Proposal as PDF)
   ========================================================================== */

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .top-nav-bar,
  .main-tabs-bar,
  .platform-hero,
  .tab-view:not(#tab-proposal),
  .modal-backdrop,
  .toast-container,
  .doc-footer-cta,
  .intro-right button {
    display: none !important;
  }

  #tab-proposal {
    display: block !important;
  }

  .proposal-doc-sheet {
    background: #fff !important;
    color: #111 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .doc-brand h3,
  .doc-section h3 {
    color: #000 !important;
  }

  .doc-section p,
  .comparison-table td,
  .milestones-table td {
    color: #333 !important;
  }

  .comparison-table th,
  .milestones-table th {
    background: #f1f5f9 !important;
    color: #000 !important;
  }

  .doc-meta {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
  }
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .simulator-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .simulator-phone-wrapper {
    width: 100%;
  }

  .extracted-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .inbox-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .inbox-threads-sidebar,
  .inbox-details-sidebar {
    display: none;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .campaigns-grid,
  .tech-stack-cards-grid {
    grid-template-columns: 1fr;
  }

  .analytics-charts-grid {
    grid-template-columns: 1fr;
  }

  .sla-grid {
    grid-template-columns: 1fr;
  }

  .crm-kpi-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-container {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .hero-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .doc-header {
    flex-direction: column;
  }
}

/* ==========================================================================
   Add-Ons & Scalability Options Styling
   ========================================================================== */

.addons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 20px 0 30px;
}

.addon-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
  transition: all 0.25s ease;
}

.addon-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.addon-card.selected {
  border-color: var(--green-lending);
  background: linear-gradient(145deg, #162438, #0f1c2d);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.addon-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.addon-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.addon-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--green-lending);
  cursor: pointer;
}

.addon-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--neogen-cyan);
}

.addon-badge.popular {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.addon-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.addon-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.addon-features {
  list-style: none;
  font-size: 0.75rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
  padding-left: 0;
}

.addon-features li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.addon-features li::before {
  content: "•";
  color: var(--green-light);
  font-weight: bold;
}

.addon-pricing-tag {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.addon-price-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--green-light);
  font-family: var(--font-mono);
}

.addon-price-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* Scalability Options Grid */
.scalability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 20px 0 30px;
}

.scale-card {
  background: linear-gradient(145deg, #131c2e, #0c1424);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.scale-card.featured {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.scale-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.scale-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.scale-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.scale-price-row {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.scale-price-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-mono);
}

.scale-price-maint {
  font-size: 0.75rem;
  color: var(--neogen-cyan);
}

/* Interactive Calculator Box */
.proposal-calculator-card {
  background: linear-gradient(135deg, #112036, #0c1729);
  border: 2px solid var(--green-lending);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 30px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 25px rgba(16, 185, 129, 0.2);
}

.calc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.calc-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.calc-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.calc-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}

.calc-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.calc-num {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
}

.calc-num.text-emerald {
  color: var(--green-light);
}

.calc-num.text-cyan {
  color: var(--neogen-cyan);
}

.calc-subtext {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.calc-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
  gap: 16px;
}

.calc-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 1024px) {
  .addons-grid,
  .scalability-grid {
    grid-template-columns: 1fr;
  }
  .calc-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

