/* ==========================================================================
   Vaidya Manager - HubSpot & MSG91 Automation Dashboard Stylesheet
   ========================================================================== */

:root {
  /* Surfaces & Backgrounds - Warm Ayurvedic Sandalwood Beige & Herbal Ivory */
  --bg-primary: #f6f3eb;           /* Natural Ayurvedic parchment beige */
  --bg-secondary: #fdfbf7;         /* Warm ivory container background */
  --bg-card: #ffffff;              /* Crisp card surface */
  --bg-card-hover: #f4efe6;        /* Warm almond hover */
  --bg-nav: rgba(246, 243, 235, 0.94); /* Warm translucent beige header */
  --bg-subnav: rgba(241, 237, 227, 0.95); /* Sub-nav beige */
  --bg-elevated: #ede6d8;          /* Pill / badge / header background */
  --bg-input: #ffffff;             /* Form input surface */

  /* Borders & Dividers */
  --border-color: #e2d9cc;         /* Herbal warm beige border */
  --border-subtle: #ede7dc;        /* Subtle separator */
  --border-focus: #1b5e3b;         /* Focused forest green border */

  /* Typography - Deep Botanical Pine & Herbal Cypress */
  --text-main: #13271c;            /* Deep botanical cypress (rich & high contrast) */
  --text-muted: #4b6355;           /* Herbal forest slate */
  --text-sub: #708678;             /* Soft eucalyptus secondary */

  /* Brand Colors - Ayurvedic Healing Forest & Sage Green */
  --primary-blue: #1b5e3b;         /* Primary brand: Rich Ayurvedic Forest Green */
  --primary-hover: #14462c;        /* Deep forest hover */
  --accent-cyan: #2d7a4f;          /* Botanical leaf green */
  --accent-emerald: #10b981;       /* Fresh neem / mint */
  --accent-amber: #c59b27;         /* Turmeric / Haldi gold */
  --accent-rose: #c94a4a;          /* Warm herbal terracotta / rose */
  --accent-purple: #6b705c;        /* Olive sage */
  --accent-whatsapp: #15803d;      /* WhatsApp forest green */
  --whatsapp-hover: #166534;

  /* Herbal Badges & Accents */
  --badge-green-bg: #e6f4ea;
  --badge-green-border: #bce3ca;
  --badge-green-text: #135c2e;

  --badge-beige-bg: #efe8dc;
  --badge-beige-border: #ded3c0;
  --badge-beige-text: #3e321e;

  --badge-gold-bg: #fef8e7;
  --badge-gold-border: #f5e2b0;
  --badge-gold-text: #855b10;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Shadows - Warm Soft Natural Elevation */
  --shadow-sm: 0 1px 3px rgba(35, 45, 38, 0.05);
  --shadow-md: 0 4px 10px rgba(35, 45, 38, 0.07), 0 1px 3px rgba(35, 45, 38, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(35, 45, 38, 0.1), 0 4px 8px -2px rgba(35, 45, 38, 0.05);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(27, 94, 59, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(197, 155, 39, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   Top Navigation Bar
   ========================================================================== */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #1b5e3b 0%, #2e8b57 60%, #48bb78 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(27, 94, 59, 0.28);
}

.logo-icon svg {
  width: 24px;
  height: 24px;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.pipeline-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
}

.pipeline-name {
  font-weight: 600;
  color: #93c5fd;
}

.pipeline-id-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  color: #bfdbfe;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.wa-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #4ade80;
  font-family: var(--font-mono);
}

.wa-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 6px #22c55e;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #34d399;
}

.status-pill.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.05); 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); }
}

/* Countdown Widget */
.countdown-widget {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
}

.timer-circle-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
}

.timer-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 3.5;
}

.circle-progress {
  fill: none;
  stroke: var(--primary-blue);
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dasharray 1s linear;
}

.timer-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--text-main);
}

.timer-labels {
  display: flex;
  flex-direction: column;
}

.timer-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
}

.timer-sub {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-blue);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-refresh:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.refresh-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Sub-Navbar: View Switcher
   ========================================================================== */
.sub-navbar {
  background: var(--bg-subnav);
  border-bottom: 1px solid var(--border-color);
  padding: 0 2rem;
  position: sticky;
  top: 73px;
  z-index: 40;
  backdrop-filter: blur(12px);
}

.sub-nav-container {
  display: flex;
  gap: 0.5rem;
  max-width: 1600px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sub-nav-container::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-tab svg {
  width: 18px;
  height: 18px;
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.nav-tab.active {
  color: #fff;
  border-bottom-color: var(--primary-blue);
  background: rgba(59, 130, 246, 0.06);
}

.nav-tab-badge {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-family: var(--font-mono);
}

/* Views display switcher */
.view-panel {
  display: none;
}

.view-panel.active {
  display: flex;
}

/* ==========================================================================
   Alert Banner
   ========================================================================== */
.alert-banner {
  margin: 1.5rem 2rem 0;
  padding: 1rem 1.25rem;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #fca5a5;
  font-size: 0.875rem;
}

.alert-banner.hidden {
  display: none;
}

.alert-content {
  flex: 1;
}

.alert-close {
  background: transparent;
  border: none;
  color: #fca5a5;
  font-size: 1.25rem;
  cursor: pointer;
}

/* ==========================================================================
   Hero Banner for Analytics
   ========================================================================== */
.analytics-hero-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-xl);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.analytics-hero-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.analytics-hero-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.analytics-rule-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 700;
}

/* ==========================================================================
   Dashboard Main Body & KPI Grid
   ========================================================================== */
.dashboard-body {
  flex: 1;
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  flex-direction: column;
  gap: 2rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.kpi-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent, var(--primary-blue));
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.kpi-icon-wrap {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent, var(--primary-blue));
  flex-shrink: 0;
}

.kpi-icon-wrap svg {
  width: 24px;
  height: 24px;
}

.kpi-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.kpi-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin: 0.2rem 0;
  font-family: var(--font-mono);
}

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

/* ==========================================================================
   Section Containers
   ========================================================================== */
.section-container {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.section-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.stage-stats-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   4-Step Message Funnel Grid
   ========================================================================== */
.sequence-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.sequence-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: all 0.2s ease;
}

.sequence-step-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateY(-2px);
}

.step-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.step-pill {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-top: 0.25rem;
}

.step-timing {
  font-size: 0.75rem;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-weight: 600;
}

.step-copy-box {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  font-size: 0.78rem;
  color: #e2e8f0;
  line-height: 1.55;
  white-space: pre-line;
  max-height: 220px;
  overflow-y: auto;
}

.step-buttons-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.75rem;
}

.step-buttons-header {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.step-buttons-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.step-cta-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.step-cta-btn.btn-demo {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.step-cta-btn.btn-demo:hover {
  background: rgba(16, 185, 129, 0.28);
  border-color: rgba(16, 185, 129, 0.7);
  transform: translateY(-1px);
}

.step-cta-btn.btn-sales {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.step-cta-btn.btn-sales:hover {
  background: rgba(59, 130, 246, 0.28);
  border-color: rgba(59, 130, 246, 0.7);
  transform: translateY(-1px);
}

.step-btn-subtext {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  opacity: 0.85;
}

.step-metrics-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 0.75rem;
}

.step-stat-box {
  display: flex;
  flex-direction: column;
  text-align: center;
}

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

.step-stat-lbl {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.2rem;
}

/* Key Conversion Highlight Box */
.step-conversion-box {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.05));
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.conversion-box-label {
  display: flex;
  flex-direction: column;
}

.conv-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #4ade80;
}

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

.conv-rate-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: #34d399;
}

/* ==========================================================================
   Pipeline Stages Kanban View
   ========================================================================== */
.pipeline-stages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.stage-column {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  min-height: 180px;
}

.stage-column:hover {
  border-color: var(--primary-blue);
  background: var(--bg-card-hover);
}

.stage-column-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.stage-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stage-label {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-main);
}

.stage-prob-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.stage-count-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.stage-amount-total {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-emerald);
  margin-bottom: 1rem;
}

.stage-deals-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.stage-deal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.stage-deal-card:hover {
  border-color: var(--primary-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-deal-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.card-deal-phone {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.card-deal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-deal-amount {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #34d399;
}

.empty-stage-note {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  color: var(--text-sub);
  font-size: 0.8125rem;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Deals Table & Controls
   ========================================================================== */
.deals-header-split {
  align-items: center;
}

.deals-meta-count {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
}

.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.875rem;
}

.search-box input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.filters-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.filter-group select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.6rem 2rem 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

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

.deals-table th {
  background: var(--bg-elevated);
  padding: 0.875rem 1.25rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.deals-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.deals-table tbody tr:hover {
  background: rgba(51, 65, 85, 0.4);
}

.deal-name-cell {
  font-weight: 600;
  color: #fff;
  display: flex;
  flex-direction: column;
}

.deal-id-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-sub);
}

.contact-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-name-label {
  font-weight: 600;
  color: #f1f5f9;
}

.contact-phone-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.phone-link {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.45rem;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 6px;
  color: #4ade80;
  font-size: 0.75rem;
  text-decoration: none;
  font-weight: 600;
}

/* Welcome & Sequence Badges */
/* Delivery Status Badges */
.delivery-badge-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.badge-status-delivered {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #4ade80;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-status-pending {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-status-failed {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #f87171;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.btn-confirm-dlr-mini {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
  font-size: 0.6875rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-confirm-dlr-mini:hover {
  background: rgba(59, 130, 246, 0.3);
  color: #fff;
}

.btn-retry-mini {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-size: 0.6875rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

/* Modal Delivery Details Card */
.modal-delivery-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  width: 100%;
}

.modal-delivery-card.delivered {
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}

.modal-delivery-card.pending {
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
}

.modal-delivery-card.failed {
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}

.status-indicator-tag {
  font-weight: 700;
  font-size: 0.85rem;
}

.status-indicator-tag.delivered { color: #4ade80; }
.status-indicator-tag.pending { color: #fbbf24; }
.status-indicator-tag.failed { color: #f87171; }

.status-explanation {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.status-req-id {
  font-size: 0.72rem;
  color: #94a3b8;
  font-family: var(--font-mono);
}

.btn-confirm-dlr {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #4ade80;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-confirm-dlr:hover {
  background: rgba(34, 197, 94, 0.35);
}

.btn-mark-failed {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #f87171;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-mark-failed:hover {
  background: rgba(239, 68, 68, 0.35);
}

.welcome-badge-pending {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.step-check-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.step-check-badge.delivered {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

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

.step-check-badge.failed {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.step-check-badge.pending {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.conversion-badge-yes {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.conversion-badge-no {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(148, 163, 184, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.reply-badge-yes {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.reply-badge-no {
  color: var(--text-sub);
  font-size: 0.75rem;
}

.btn-send-welcome-table {
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-record-reply {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 0.35rem;
}

.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.stage-lead { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.stage-scheduled { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.stage-done { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.stage-trial { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.stage-contract { background: rgba(236, 72, 153, 0.15); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }
.stage-notresponding { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }
.stage-won { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.stage-lost { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.amount-cell {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-main);
}

.date-cell {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.owner-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.owner-avatar {
  width: 24px;
  height: 24px;
  background: var(--primary-blue);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.btn-table-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #93c5fd;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.loading-cell {
  text-align: center;
  padding: 3rem !important;
  color: var(--text-muted);
}

/* ==========================================================================
   Modal Dialog
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.modal-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #93c5fd;
}

.modal-deal-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.modal-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.875rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.modal-field-label {
  color: var(--text-muted);
  font-weight: 500;
}

.modal-field-value {
  color: var(--text-main);
  font-weight: 600;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--primary-blue);
  color: #fff;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-wa-send {
  background: var(--accent-whatsapp);
  color: #fff;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: var(--bg-nav);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.app-footer code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  color: #93c5fd;
}

.safe-badge {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .top-nav { padding: 1rem; }
  .dashboard-body { padding: 1rem; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .sequence-steps-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .sub-navbar { padding: 0 1rem; }
}

/* ==========================================================================
   MSG91 Balance Alert Banner & Navbar Balance Pill
   ========================================================================== */

.balance-alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(185, 28, 28, 0.2) 100%);
  border-bottom: 2px solid rgba(239, 68, 68, 0.6);
  border-left: 4px solid #ef4444;
  flex-wrap: wrap;
  position: relative;
  animation: slideDownBanner 0.3s ease;
}

@keyframes slideDownBanner {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.balance-alert-banner.hidden { display: none; }

.balance-alert-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 2px; }

.balance-alert-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.balance-alert-content strong { color: #fca5a5; font-size: 0.95rem; font-weight: 700; }
.balance-alert-content span { color: #fecaca; font-size: 0.84rem; line-height: 1.5; }

.balance-alert-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.btn-recharge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.btn-recharge:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6);
  transform: translateY(-1px);
}

.balance-detail { font-size: 0.75rem; color: #fca5a5; max-width: 300px; }

/* WA Balance Pill in Navbar */
.wa-balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  transition: all 0.3s ease;
}

.wa-balance-pill.balance-ok {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.wa-balance-pill.balance-zero {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
  animation: pulseRed 2s infinite;
}

@keyframes pulseRed {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
  50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2); }
}

/* ==========================================================================
   14-Step Lifecycle Automation: Filter Bar & Modal Sequence Timeline
   ========================================================================== */

.steps-filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.step-filter-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.step-filter-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.2);
}

.step-filter-btn.active {
  background: #3b82f6;
  color: #ffffff;
  border-color: #60a5fa;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* Modal 14-Step Timeline */
.modal-sequence-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.modal-sequence-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.modal-sequence-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.modal-step-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  gap: 0.75rem;
}

.modal-step-row:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

.modal-step-row.delivered {
  border-left: 3px solid #10b981;
}

.modal-step-row.sent {
  border-left: 3px solid #f59e0b;
}

.modal-step-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.modal-step-pill {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
}

.modal-step-sub {
  font-size: 0.73rem;
  color: #94a3b8;
}

.modal-step-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* ==========================================================================
   MESSAGE FUNNEL INSIGHTS SECTION  ─  Dashboard View
   ========================================================================== */

.funnel-insights-section {
  background: linear-gradient(135deg, rgba(30,41,59,0.9) 0%, rgba(15,23,42,0.95) 100%);
  border: 1px solid rgba(59,130,246,0.15);
  position: relative;
  overflow: hidden;
}

.funnel-insights-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #06b6d4, #8b5cf6, #f59e0b, #10b981);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* ── Row label ── */
.funnel-row-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.75rem;
}

/* ════════════════════════════════════════════════════════
   Row 1: Message Pipeline  (Sent → Delivered → Read → Replied)
   ════════════════════════════════════════════════════════ */
.funnel-pipeline-row {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  row-gap: 0.75rem;
}

.funnel-pipe-step {
  flex: 1;
  min-width: 110px;
  max-width: 200px;
  background: rgba(15,23,42,0.7);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-align: center;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.funnel-pipe-step:hover {
  transform: translateY(-2px);
  border-color: rgba(59,130,246,0.3);
}
.funnel-pipe-step[data-color="#10b981"] { border-top: 2px solid #10b981; }
.funnel-pipe-step[data-color="#3b82f6"] { border-top: 2px solid #3b82f6; }
.funnel-pipe-step[data-color="#06b6d4"] { border-top: 2px solid #06b6d4; }
.funnel-pipe-step[data-color="#f59e0b"] { border-top: 2px solid #f59e0b; }

.fpp-icon  { font-size: 1.5rem; line-height: 1; margin-bottom: 0.4rem; }
.fpp-count { font-size: 1.75rem; font-weight: 800; color: #f8fafc; line-height: 1; }
.fpp-label { font-size: 0.8rem; font-weight: 600; color: #cbd5e1; margin-top: 0.25rem; }
.fpp-sub   { font-size: 0.68rem; color: #64748b; margin-top: 0.2rem; }

.funnel-pipe-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0 0.5rem;
  flex-shrink: 0;
}
.funnel-pipe-arrow svg { width: 44px; height: 16px; opacity: 0.7; }
.fpa-pct {
  font-size: 0.7rem;
  font-weight: 700;
  color: #60a5fa;
  background: rgba(59,130,246,0.1);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  white-space: nowrap;
}

/* ════════════════════════════════════════════════════════
   Row 2: Stage Conversion Funnel
   ════════════════════════════════════════════════════════ */
.funnel-stage-row {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0;
  padding-bottom: 0.5rem;
}

.fsc-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1;
  min-width: 110px;
}

.fsc-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.5rem;
  font-size: 0.7rem;
  color: #64748b;
}

.fsc-dropoff {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.fsc-dropoff.med  { color: #f59e0b; border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.08); }
.fsc-dropoff.high { color: #ef4444; border-color: rgba(239,68,68,0.3);  background: rgba(239,68,68,0.08); }

.fsc-stage {
  flex: 1;
  background: rgba(15,23,42,0.75);
  border: 1px solid rgba(255,255,255,0.06);
  border-left: 3px solid var(--stage-color, #3b82f6);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0 0.25rem;
  transition: background 0.15s;
}
.fsc-stage:hover { background: rgba(30,41,59,0.9); }

.fsc-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.fsc-emoji { font-size: 1.1rem; }
.fsc-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
  flex: 1;
  min-width: 0;
}
.fsc-conv-pct {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.3rem;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  white-space: nowrap;
}

.fsc-bar-wrap {
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}
.fsc-bar {
  height: 100%;
  border-radius: 999px;
  min-width: 4px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}

.fsc-count {
  font-size: 0.85rem;
  font-weight: 800;
}

/* ════════════════════════════════════════════════════════
   Row 3: CTA Button Tracking
   ════════════════════════════════════════════════════════ */
.funnel-cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-track-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(15,23,42,0.7);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  flex: 1;
  min-width: 180px;
  transition: border-color 0.15s;
}
.cta-track-card:hover { border-color: rgba(59,130,246,0.3); }
.cta-note-card { border-style: dashed; opacity: 0.85; }

.cta-track-icon { font-size: 1.75rem; line-height: 1; flex-shrink: 0; }
.cta-track-info { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.cta-track-label { font-size: 0.8rem; font-weight: 700; color: #cbd5e1; }
.cta-track-count {
  font-size: 1.5rem;
  font-weight: 800;
  color: #60a5fa;
  line-height: 1;
}
.cta-track-note { font-size: 0.7rem; color: #64748b; }

/* ════════════════════════════════════════════════════════
   Row 4: Overall Conversion Summary Grid
   ════════════════════════════════════════════════════════ */
.funnel-summary-grid {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.fsummary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(15,23,42,0.7);
  border: 1px solid rgba(255,255,255,0.07);
  border-bottom: 2px solid var(--fc, #3b82f6);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  flex: 1;
  min-width: 100px;
  text-align: center;
  gap: 0.2rem;
  transition: transform 0.15s, border-color 0.15s;
}
.fsummary-card:hover { transform: translateY(-2px); border-color: var(--fc, #3b82f6); }

.fsummary-emoji { font-size: 1.35rem; line-height: 1; }
.fsummary-val   { font-size: 1.8rem; font-weight: 800; color: var(--fc, #f8fafc); line-height: 1; }
.fsummary-lbl   { font-size: 0.72rem; font-weight: 600; color: #94a3b8; }
.fsummary-pct   {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--fc, #60a5fa);
  background: rgba(255,255,255,0.06);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  margin-top: 0.15rem;
}

.fsummary-arrow {
  font-size: 1.4rem;
  color: #334155;
  padding: 0 0.1rem;
  flex-shrink: 0;
  user-select: none;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .funnel-pipeline-row { flex-wrap: wrap; }
  .funnel-pipe-arrow   { display: none; }
  .funnel-stage-row    { flex-wrap: wrap; }
  .fsc-block           { min-width: 130px; }
  .funnel-summary-grid { justify-content: center; }
  .fsummary-arrow      { display: none; }
}

/* ==========================================================================
   Tab 3: Website Inquiry Automation Styles
   ========================================================================== */
.inquiry-hero {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.inquiry-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.inquiry-status-pill {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-family: var(--font-mono);
}

.webhook-endpoint-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 340px;
}

.webhook-card-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.webhook-url-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
}

.webhook-url-group code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: #60a5fa;
  flex: 1;
  word-break: break-all;
}

.btn-copy-code {
  background: var(--primary-blue);
  color: #fff;
  border: none;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.btn-copy-code svg {
  width: 14px;
  height: 14px;
}

.btn-copy-code:hover {
  background: var(--primary-hover);
}

.webhook-meta-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.meta-tag {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  color: var(--text-muted);
}

.inquiry-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 1100px) {
  .inquiry-split-layout {
    grid-template-columns: 1fr;
  }
}

.inq-card-pane {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.btn-primary-gradient {
  background: linear-gradient(135deg, #1b5e3b, #2d7a4f);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  width: 100%;
}

.btn-primary-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.btn-primary-gradient:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.inquiry-result-display {
  margin-top: 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.result-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-family: var(--font-mono);
}

.result-badge.success {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.result-badge.error {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.result-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.result-summary-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.res-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
}

.res-lbl {
  color: var(--text-muted);
}

.res-json-details {
  margin-top: 0.5rem;
}

.res-json-details summary {
  font-size: 0.75rem;
  color: #60a5fa;
  cursor: pointer;
  user-select: none;
}

.res-json {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #cbd5e1;
  overflow-x: auto;
  margin-top: 0.5rem;
}

.snippet-tab-pills {
  display: flex;
  gap: 0.35rem;
  background: var(--bg-elevated);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.pill-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-tab.active {
  background: var(--primary-blue);
  color: #fff;
}

.snippet-content {
  margin-top: 1rem;
}

.snippet-content pre {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: #93c5fd;
  overflow-x: auto;
  line-height: 1.5;
}

.inquiry-tips {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: #bfdbfe;
}

.crm-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(37, 99, 235, 0.3);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  text-decoration: none;
  transition: all 0.2s ease;
}

.crm-badge-link:hover {
  background: rgba(37, 99, 235, 0.3);
  border-color: #60a5fa;
}

.crm-badge-link.deal {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.crm-badge-link.deal:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: #34d399;
}

.wa-sent-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.wa-sent-badge.success {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.wa-sent-badge.error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.wa-uuid-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  opacity: 0.8;
}

.source-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-top: 0.25rem;
}

.source-tag.test {
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.source-tag.web {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.lead-name-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.lead-email,
.lead-phone-link {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.lead-email:hover,
.lead-phone-link:hover {
  color: #60a5fa;
}

.inquiry-message-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: #cbd5e1;
  max-width: 260px;
  word-break: break-word;
}

.wa-col-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.template-name-tag code {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.btn-resend-wa {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-resend-wa:hover {
  background: rgba(34, 197, 94, 0.25);
  border-color: #4ade80;
}

.inq-badge {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

/* ==========================================================================
   Tab 4: Subscription Expiry & Renewals Automation Styles
   ========================================================================== */

.renewal-hero {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(59, 130, 246, 0.08) 50%, rgba(16, 185, 129, 0.06) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  box-shadow: 0 4px 20px -2px rgba(245, 158, 11, 0.08);
}

.renewal-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

.renewal-config-card {
  border-color: rgba(197, 155, 39, 0.35);
  background: var(--bg-card);
}

.btn-sync-renewals {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  width: 100%;
}

.btn-sync-renewals svg {
  width: 16px;
  height: 16px;
}

.btn-sync-renewals:hover:not(:disabled) {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-sync-renewals:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.renewal-scan-box {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.scan-options-row {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.custom-checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--text-main);
  line-height: 1.4;
}

.custom-checkbox-wrap input[type="checkbox"] {
  accent-color: #f59e0b;
  width: 16px;
  height: 16px;
  margin-top: 0.15rem;
  cursor: pointer;
}

.renewal-specs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.spec-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}

.spec-label {
  color: var(--text-muted);
  font-weight: 500;
}

.spec-value {
  color: var(--text-main);
  font-weight: 600;
  text-align: right;
}

.spec-value code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}

.badge-pipeline-tag {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.75rem;
}

.badge-stage-tag {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.75rem;
}

.ren-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.ren-badge.status-created {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.ren-badge.status-updated {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.ren-badge.interval-badge-10 {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.ren-badge.interval-badge-30 {
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.renewal-amount-val {
  color: #10b981;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
}

.subject-snippet {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Tab 5: Inactive Client Alerts & HubSpot Ticket Styles
   ========================================================================== */

.inactive-hero {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, rgba(139, 92, 246, 0.08) 50%, rgba(59, 130, 246, 0.06) 100%);
  border: 1px solid rgba(236, 72, 153, 0.25);
  box-shadow: 0 4px 20px -2px rgba(236, 72, 153, 0.08);
}

.inactive-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

.inactive-config-card {
  border-color: rgba(201, 74, 74, 0.35);
  background: var(--bg-card);
}

.inact-badge {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.crm-badge-link.ticket {
  background: rgba(139, 92, 246, 0.12);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.crm-badge-link.ticket:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: #c084fc;
  transform: translateY(-1px);
}





/* ==========================================================================
   AYURVEDIC HERBAL BEIGE & FOREST GREEN THEME ENGINE
   ========================================================================== */

/* Light Theme: Ayurvedic Sandalwood Beige & Herbal Forest Green */
[data-theme="light"] {
  --bg-primary: #f6f3eb;           /* Natural Ayurvedic parchment beige */
  --bg-secondary: #fdfbf7;         /* Warm ivory container background */
  --bg-card: #ffffff;              /* Crisp card surface */
  --bg-card-hover: #f4efe6;        /* Warm almond hover */
  --bg-nav: rgba(246, 243, 235, 0.94); /* Warm translucent beige header */
  --bg-subnav: rgba(241, 237, 227, 0.95); /* Sub-nav beige */
  --bg-elevated: #ede6d8;          /* Pill / badge / header background */
  --bg-input: #ffffff;             /* Form input surface */

  --border-color: #e2d9cc;         /* Herbal warm beige border */
  --border-subtle: #ede7dc;        /* Subtle separator */
  --border-focus: #1b5e3b;         /* Focused forest green border */

  --text-main: #13271c;            /* Deep botanical cypress (rich & high contrast) */
  --text-muted: #4b6355;           /* Herbal forest slate */
  --text-sub: #708678;             /* Soft eucalyptus secondary */

  --primary-blue: #1b5e3b;         /* Primary brand: Rich Ayurvedic Forest Green */
  --primary-hover: #14462c;        /* Deep forest hover */
  --accent-cyan: #2d7a4f;          /* Botanical leaf green */
  --accent-emerald: #10b981;       /* Fresh neem / mint */
  --accent-amber: #c59b27;         /* Turmeric / Haldi gold */
  --accent-rose: #c94a4a;          /* Warm herbal terracotta / rose */
  --accent-purple: #6b705c;        /* Olive sage */
  --accent-whatsapp: #15803d;      /* WhatsApp forest green */
  --whatsapp-hover: #166534;

  --badge-green-bg: #e6f4ea;
  --badge-green-border: #bce3ca;
  --badge-green-text: #135c2e;

  --badge-beige-bg: #efe8dc;
  --badge-beige-border: #ded3c0;
  --badge-beige-text: #3e321e;

  --badge-gold-bg: #fef8e7;
  --badge-gold-border: #f5e2b0;
  --badge-gold-text: #855b10;

  --shadow-sm: 0 1px 3px rgba(35, 45, 38, 0.05);
  --shadow-md: 0 4px 10px rgba(35, 45, 38, 0.07), 0 1px 3px rgba(35, 45, 38, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(35, 45, 38, 0.1), 0 4px 8px -2px rgba(35, 45, 38, 0.05);
}

[data-theme="light"] body {
  background: var(--bg-primary);
  color: var(--text-main);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(27, 94, 59, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(197, 155, 39, 0.05) 0%, transparent 40%);
}

[data-theme="light"] .top-nav {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 4px rgba(35, 45, 38, 0.06);
}

[data-theme="light"] .logo-icon {
  background: linear-gradient(135deg, #1b5e3b 0%, #2e8b57 60%, #48bb78 100%);
  box-shadow: 0 4px 12px rgba(27, 94, 59, 0.28);
}

[data-theme="light"] .sub-navbar {
  background: var(--bg-subnav);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .nav-tab {
  color: #4b6355;
  font-weight: 600;
}

[data-theme="light"] .nav-tab:hover {
  background: #ede6d8;
  color: #13271c;
}

[data-theme="light"] .nav-tab.active {
  background: #1b5e3b;
  color: #ffffff;
  border-color: #14462c;
  box-shadow: 0 2px 8px rgba(27, 94, 59, 0.25);
}

[data-theme="light"] .nav-tab.active svg {
  color: #ffffff;
}

[data-theme="light"] .nav-tab-badge {
  background: #ede6d8;
  color: #13271c;
  border: 1px solid #ded3c0;
}

[data-theme="light"] .nav-tab.active .nav-tab-badge {
  background: #2d7a4f;
  color: #ffffff;
  border-color: transparent;
}

[data-theme="light"] .kpi-card {
  background: #ffffff;
  border-color: #e2d9cc;
  box-shadow: 0 1px 4px rgba(35, 45, 38, 0.05);
}

[data-theme="light"] .kpi-card:hover {
  background: #ffffff;
  border-color: #b8d9c5;
  box-shadow: 0 6px 16px rgba(35, 45, 38, 0.08);
}

[data-theme="light"] .kpi-title {
  color: #4b6355;
}

[data-theme="light"] .kpi-value {
  color: #13271c;
}

[data-theme="light"] .kpi-sub {
  color: #708678;
}

[data-theme="light"] .section-container {
  background: #fdfbf7;
  border-color: #e2d9cc;
  box-shadow: 0 1px 4px rgba(35, 45, 38, 0.04);
}

[data-theme="light"] .section-header {
  border-bottom: 1px solid #ede7dc;
}

[data-theme="light"] .section-title {
  color: #13271c;
}

[data-theme="light"] .section-sub {
  color: #4b6355;
}

[data-theme="light"] .pipeline-tag {
  background: #ede6d8;
  border-color: #ded3c0;
  color: #13271c;
}

[data-theme="light"] .pipeline-id-badge {
  background: #1b5e3b;
  color: #ffffff;
}

[data-theme="light"] .wa-balance-pill {
  background: #fef8e7;
  border-color: #f5e2b0;
  color: #855b10;
}

[data-theme="light"] .wa-status-badge {
  background: #e6f4ea;
  border-color: #bce3ca;
  color: #135c2e;
}

[data-theme="light"] .status-pill {
  background: #e6f4ea;
  border-color: #bce3ca;
  color: #135c2e;
}

[data-theme="light"] .countdown-widget {
  background: #ede6d8;
  border-color: #ded3c0;
  color: #13271c;
}

[data-theme="light"] .countdown-widget .timer-title {
  color: #13271c;
}

[data-theme="light"] .countdown-widget .timer-sub {
  color: #4b6355;
}

[data-theme="light"] .funnel-pipe-step {
  background: #ffffff;
  border-color: #e2d9cc;
  box-shadow: 0 1px 3px rgba(35, 45, 38, 0.04);
}

[data-theme="light"] .funnel-pipe-step:hover {
  background: #fbf9f4;
  border-color: #1b5e3b;
}

[data-theme="light"] .sequence-step-card {
  background: #ffffff;
  border-color: #e2d9cc;
  box-shadow: 0 1px 3px rgba(35, 45, 38, 0.04);
}

[data-theme="light"] .fsc-stage {
  background: #ffffff;
  border-color: #e2d9cc;
}

[data-theme="light"] .fsc-stage:hover {
  background: #fbf9f4;
}

[data-theme="light"] .cta-track-card {
  background: #ffffff;
  border-color: #e2d9cc;
}

[data-theme="light"] .fsummary-card {
  background: #ffffff;
  border-color: #e2d9cc;
}

[data-theme="light"] .pipeline-stage-col,
[data-theme="light"] .stage-column {
  background: #f5f0e4;
  border-color: #e2d9cc;
}

[data-theme="light"] .stage-header {
  background: #ede6d8;
  color: #13271c;
  border-bottom: 1px solid #ded3c0;
}

[data-theme="light"] .stage-deal-card {
  background: #ffffff;
  border-color: #e2d9cc;
  box-shadow: 0 1px 3px rgba(35, 45, 38, 0.04);
}

[data-theme="light"] .stage-deal-card:hover {
  background: #fbf9f4;
  border-color: #1b5e3b;
  box-shadow: 0 4px 12px rgba(27, 94, 59, 0.12);
}

[data-theme="light"] .card-deal-name {
  color: #13271c;
}

[data-theme="light"] .card-deal-amount {
  color: #1b5e3b;
}

[data-theme="light"] .card-deal-phone {
  color: #4b6355;
}

[data-theme="light"] .deals-table-container,
[data-theme="light"] .table-wrapper,
[data-theme="light"] .inquiries-table-container,
[data-theme="light"] .renewals-table-container,
[data-theme="light"] .inactive-table-container {
  background: #ffffff;
  border: 1px solid #e2d9cc;
}

[data-theme="light"] .deals-table th,
[data-theme="light"] .inquiries-table th,
[data-theme="light"] .renewals-table th,
[data-theme="light"] .inactive-table th {
  background: #f3ede2;
  color: #3f5647;
  border-bottom: 2px solid #ded3c0;
}

[data-theme="light"] .deals-table td,
[data-theme="light"] .inquiries-table td,
[data-theme="light"] .renewals-table td,
[data-theme="light"] .inactive-table td {
  border-bottom: 1px solid #ede7dc;
  color: #13271c;
}

[data-theme="light"] .deals-table tr:hover,
[data-theme="light"] .inquiries-table tr:hover,
[data-theme="light"] .renewals-table tr:hover,
[data-theme="light"] .inactive-table tr:hover {
  background: #f9f5ec;
}

[data-theme="light"] .modal-content {
  background: #ffffff;
  border-color: #ded3c0;
  color: #13271c;
  box-shadow: 0 20px 45px rgba(20, 39, 28, 0.2);
}

[data-theme="light"] .modal-header {
  background: #f6f3eb;
  border-bottom: 1px solid #e2d9cc;
}

[data-theme="light"] .modal-footer {
  background: #f6f3eb;
  border-top: 1px solid #e2d9cc;
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #ffffff;
  border-color: #e2d9cc;
  color: #13271c;
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
  border-color: #1b5e3b;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(27, 94, 59, 0.15);
}

[data-theme="light"] code {
  background: #ede6d8;
  color: #13271c;
  border: 1px solid #ded3c0;
}

[data-theme="light"] .analytics-hero-banner,
[data-theme="light"] .inquiry-hero,
[data-theme="light"] .renewal-hero,
[data-theme="light"] .inactive-hero {
  background: linear-gradient(135deg, #134229 0%, #1c5e3a 50%, #2d7a4f 100%);
  border: 1px solid #14462c;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(19, 66, 41, 0.2);
}

[data-theme="light"] .analytics-hero-title,
[data-theme="light"] .inquiry-hero h2,
[data-theme="light"] .renewal-hero h2,
[data-theme="light"] .inactive-hero h2 {
  color: #ffffff;
}

[data-theme="light"] .analytics-hero-sub,
[data-theme="light"] .inquiry-hero p,
[data-theme="light"] .renewal-hero p,
[data-theme="light"] .inactive-hero p {
  color: #e6f4ea;
}

[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-primary-gradient,
[data-theme="light"] .btn-refresh {
  background: linear-gradient(135deg, #1b5e3b, #2d7a4f);
  color: #ffffff;
  border: 1px solid #14462c;
  box-shadow: 0 2px 6px rgba(27, 94, 59, 0.2);
}

[data-theme="light"] .btn-primary:hover,
[data-theme="light"] .btn-primary-gradient:hover,
[data-theme="light"] .btn-refresh:hover {
  background: linear-gradient(135deg, #14462c, #236540);
  box-shadow: 0 4px 12px rgba(27, 94, 59, 0.28);
}

[data-theme="light"] .btn-secondary {
  background: #ede6d8;
  color: #13271c;
  border: 1px solid #ded3c0;
}

[data-theme="light"] .btn-secondary:hover {
  background: #e4dbc8;
}

[data-theme="light"] .btn-theme-toggle {
  background: #ffffff;
  border: 1px solid #e2d9cc;
  color: #13271c;
}

[data-theme="light"] .btn-theme-toggle:hover {
  background: #f4efe6;
  border-color: #1b5e3b;
}

[data-theme="light"] .volume-metric-card,
[data-theme="light"] .msg-type-card {
  background: #ffffff;
  border-color: #e2d9cc;
  box-shadow: 0 1px 3px rgba(35, 45, 38, 0.04);
}

[data-theme="light"] .volume-metric-card:hover,
[data-theme="light"] .msg-type-card:hover {
  background: #fbf9f4;
  box-shadow: 0 6px 14px rgba(35, 45, 38, 0.07);
}

[data-theme="light"] .vm-icon {
  background: #ede6d8;
}

[data-theme="light"] .message-types-section {
  background: #fdfbf7;
  border-color: #e2d9cc;
}

[data-theme="light"] .type-filter-chip {
  background: #ede6d8;
  border-color: #ded3c0;
  color: #4b6355;
}

[data-theme="light"] .type-filter-chip:hover {
  color: #13271c;
  border-color: #1b5e3b;
}

[data-theme="light"] .type-filter-chip.active {
  background: #1b5e3b;
  border-color: #1b5e3b;
  color: #ffffff;
}

[data-theme="light"] .mt-pill {
  background: #ede6d8;
  color: #4b6355;
}

[data-theme="light"] .mt-pill.share {
  background: #e6f4ea;
  color: #135c2e;
}

[data-theme="light"] .mt-bar-track {
  background: #e2d9cc;
}

/* Dark Theme: Deep Ayurvedic Botanical Pine & Night Moss */
[data-theme="dark"] {
  --bg-primary: #0c1813;           /* Deepest herbal spruce */
  --bg-secondary: #12241d;         /* Botanical pine */
  --bg-card: rgba(18, 36, 29, 0.9);
  --bg-card-hover: rgba(27, 51, 41, 0.95);
  --bg-nav: rgba(12, 24, 19, 0.94);
  --bg-subnav: rgba(15, 30, 24, 0.95);
  --bg-elevated: #183328;
  --bg-input: #10211a;

  --border-color: rgba(94, 153, 120, 0.2);
  --border-subtle: rgba(94, 153, 120, 0.1);
  --border-focus: #34d399;

  --text-main: #f0f7f2;            /* Clean herbal mist */
  --text-muted: #95b5a2;           /* Soft sage */
  --text-sub: #658572;             /* Eucalyptus gray */

  --primary-blue: #2d7a4f;         /* Forest green */
  --primary-hover: #389762;
  --accent-cyan: #34d399;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f87171;
  --accent-purple: #a78bfa;
  --accent-whatsapp: #22c55e;
  --whatsapp-hover: #16a34a;

  --badge-green-bg: rgba(34, 197, 94, 0.15);
  --badge-green-border: rgba(34, 197, 94, 0.3);
  --badge-green-text: #86efac;

  --badge-beige-bg: rgba(212, 163, 115, 0.15);
  --badge-beige-border: rgba(212, 163, 115, 0.3);
  --badge-beige-text: #fed7aa;

  --badge-gold-bg: rgba(245, 158, 11, 0.15);
  --badge-gold-border: rgba(245, 158, 11, 0.3);
  --badge-gold-text: #fde68a;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] body {
  background: var(--bg-primary);
  color: var(--text-main);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(52, 211, 153, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(245, 158, 11, 0.04) 0%, transparent 40%);
}

[data-theme="dark"] .top-nav {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .sub-navbar {
  background: var(--bg-subnav);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .nav-tab {
  color: var(--text-muted);
}

[data-theme="dark"] .nav-tab:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

[data-theme="dark"] .nav-tab.active {
  background: rgba(52, 211, 153, 0.15);
  color: #86efac;
  border-color: #34d399;
}

[data-theme="dark"] .nav-tab.active svg {
  color: #86efac;
}

[data-theme="dark"] .kpi-card {
  background: var(--bg-card);
  border-color: var(--border-color);
}

[data-theme="dark"] .section-container {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .stage-deal-card {
  background: var(--bg-card);
  border-color: var(--border-color);
}

[data-theme="dark"] .stage-deal-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

[data-theme="dark"] .deals-table-container,
[data-theme="dark"] .table-wrapper {
  background: var(--bg-card);
}

[data-theme="dark"] .deals-table th,
[data-theme="dark"] .inquiries-table th,
[data-theme="dark"] .renewals-table th,
[data-theme="dark"] .inactive-table th {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
}

[data-theme="dark"] .deals-table td,
[data-theme="dark"] .inquiries-table td,
[data-theme="dark"] .renewals-table td,
[data-theme="dark"] .inactive-table td {
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
}

[data-theme="dark"] .modal-content {
  background: #11221a;
  border-color: var(--border-color);
  color: var(--text-main);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--bg-input);
  border-color: var(--border-color);
  color: var(--text-main);
}

/* ==========================================================================
   THEME TOGGLE BUTTON
   ========================================================================== */

.btn-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-theme-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-blue);
  transform: translateY(-1px);
}

.theme-toggle-icon {
  font-size: 1rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.3s ease;
}

.btn-theme-toggle:hover .theme-toggle-icon {
  transform: rotate(20deg) scale(1.15);
}

/* ==========================================================================
   MESSAGE VOLUME FREQUENCY STRIP (DAILY & MONTHLY METRICS)
   ========================================================================== */

.message-volume-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
  .message-volume-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .message-volume-strip {
    grid-template-columns: 1fr;
  }
}

.volume-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--metric-color, #3b82f6);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
}

[data-theme="light"] .volume-metric-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  border-left-color: var(--metric-color, #3b82f6);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.volume-metric-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.vm-icon {
  font-size: 1.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

[data-theme="light"] .vm-icon {
  background: rgba(0, 0, 0, 0.04);
}

.vm-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.vm-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.vm-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.vm-unit {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.vm-sub {
  font-size: 0.75rem;
  color: var(--text-sub);
  margin-top: 0.2rem;
}

/* ==========================================================================
   SENT MESSAGES BREAKDOWN BY TYPE SECTION
   ========================================================================== */

.message-types-section {
  margin-top: 1.75rem;
  margin-bottom: 1.75rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
}

[data-theme="light"] .message-types-section {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}

.types-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.types-subtitle {
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.types-filter-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.type-filter-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

[data-theme="light"] .type-filter-chip {
  background: #ffffff;
  border-color: #e2e8f0;
}

.type-filter-chip:hover {
  color: var(--text-main);
  border-color: var(--primary-blue);
}

.type-filter-chip.active {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: #ffffff;
}

.message-types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

@media (max-width: 1200px) {
  .message-types-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .message-types-grid {
    grid-template-columns: 1fr;
  }
}

.msg-type-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .msg-type-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.msg-type-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.mt-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.mt-icon-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.mt-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.mt-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mt-template-code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mt-stage-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.mt-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.mt-stat-main {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.mt-sent-num {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  font-feature-settings: "tnum";
}

.mt-sent-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mt-stat-pills {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mt-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

[data-theme="light"] .mt-pill {
  background: rgba(0, 0, 0, 0.05);
}

.mt-pill.share {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

[data-theme="light"] .mt-pill.share {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.mt-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

[data-theme="light"] .mt-bar-track {
  background: rgba(0, 0, 0, 0.08);
}

.mt-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.5s ease;
}

/* ==============================================================================
   5-MINUTE SYSTEM INACTIVITY WATCHDOG STYLES (Ayurvedic Beige & Green Theme)
   ============================================================================== */

/* Top-of-Site Critical Alert Banner */
.watchdog-alert-banner {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
  color: #ffffff;
  padding: 12px 24px;
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.35);
  position: relative;
  z-index: 1000;
  border-bottom: 2px solid #7f1d1d;
  animation: watchdogSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.watchdog-alert-banner.hidden {
  display: none !important;
}

@keyframes watchdogSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.watchdog-banner-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.watchdog-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 280px;
}

.watchdog-alert-icon {
  font-size: 1.4rem;
  animation: watchdogPulseIcon 1.5s infinite;
}

@keyframes watchdogPulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.watchdog-banner-text {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #fff5f5;
}

.watchdog-banner-title {
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  margin-right: 8px;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
}

.watchdog-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.watchdog-banner-btn {
  background: #ffffff;
  color: #991b1b;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.watchdog-banner-btn:hover {
  background: #fef2f2;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.watchdog-banner-dismiss {
  background: transparent;
  color: #ffffff;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  padding: 0 6px;
  transition: opacity 0.2s ease;
}

.watchdog-banner-dismiss:hover {
  opacity: 1;
}

/* Navbar Watchdog Status Pill */
.watchdog-nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  user-select: none;
}

.watchdog-nav-pill.healthy {
  background: rgba(45, 90, 39, 0.12);
  color: #2d5a27;
  border-color: rgba(45, 90, 39, 0.25);
}

.watchdog-nav-pill.healthy:hover {
  background: rgba(45, 90, 39, 0.18);
  border-color: #2d5a27;
}

.watchdog-nav-pill.alert {
  background: #fee2e2;
  color: #dc2626;
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
  animation: watchdogPulseRed 2s infinite;
}

.watchdog-nav-pill.alert:hover {
  background: #fecaca;
}

.watchdog-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.watchdog-nav-pill.healthy .watchdog-pill-dot {
  background: #2d5a27;
  box-shadow: 0 0 6px rgba(45, 90, 39, 0.6);
}

.watchdog-nav-pill.alert .watchdog-pill-dot {
  background: #dc2626;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.8);
  animation: watchdogBlinkDot 1s infinite;
}

@keyframes watchdogPulseRed {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes watchdogBlinkDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Watchdog Diagnostics Modal */
.watchdog-modal-card {
  max-width: 900px !important;
  width: 92%;
  background: #fcfbf9;
  border: 1px solid #e4ded5;
}

.watchdog-badge {
  background: #2d5a27;
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.watchdog-badge.alert {
  background: #dc2626;
}

.watchdog-modal-intro {
  background: #f3efe8;
  border-left: 4px solid #2d5a27;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: #3b3a36;
}

.watchdog-systems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.watchdog-system-card {
  background: #ffffff;
  border: 1px solid #e7e2d8;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.watchdog-system-card.healthy {
  border-left: 4px solid #2d5a27;
}

.watchdog-system-card.alert {
  border-left: 4px solid #dc2626;
  background: #fffafa;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}

.watchdog-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.watchdog-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e3f20;
  margin: 0 0 2px 0;
}

.watchdog-card-category {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}

.watchdog-card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  white-space: nowrap;
}

.watchdog-card-badge.healthy {
  background: #e8f5e9;
  color: #2e7d32;
}

.watchdog-card-badge.inactive {
  background: #fee2e2;
  color: #b91c1c;
  animation: watchdogPulseRed 2s infinite;
}

.watchdog-card-metrics {
  background: #fbf9f5;
  border: 1px solid #ece7df;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 10px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.82rem;
}

.watchdog-metric-item {
  display: flex;
  flex-direction: column;
}

.watchdog-metric-label {
  font-size: 0.72rem;
  color: #71717a;
  margin-bottom: 2px;
}

.watchdog-metric-val {
  font-weight: 700;
  color: #27272a;
}

.watchdog-metric-val.alert {
  color: #dc2626;
}

.watchdog-card-details {
  font-size: 0.82rem;
  color: #4b5563;
  line-height: 1.4;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e5e0d8;
}

.watchdog-testing-panel {
  background: #f5f2eb;
  border: 1px dashed #d1c7b7;
  border-radius: 8px;
  padding: 16px;
  margin-top: 20px;
}

.watchdog-testing-panel h4 {
  margin: 0 0 6px 0;
  color: #2d5a27;
  font-size: 0.95rem;
}

.watchdog-test-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.btn-test-sm {
  background: #ffffff;
  border: 1px solid #d4c8b8;
  color: #854d0e;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-test-sm:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}

.btn-reset-sm {
  background: #2d5a27;
  color: #ffffff;
  border: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset-sm:hover {
  background: #1e3f20;
}

/* ==============================================================================
   TRAI DLT REGISTRATION & SMS COMPLIANCE VIEW (DocStar Layout + Herbal Theme)
   ============================================================================== */

.nav-tab-badge.dlt-badge {
  background: rgba(45, 90, 39, 0.14);
  color: #2d5a27;
  border: 1px solid rgba(45, 90, 39, 0.25);
}

.dlt-hero-card {
  background: var(--card-bg, #fcfaf6);
  border: 1px solid var(--border-color, #e3dcd0);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(45, 90, 39, 0.05);
}

.dlt-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary, #6b7280);
  margin-bottom: 10px;
}

.dlt-bc-sep {
  opacity: 0.5;
}

.dlt-breadcrumb strong {
  color: #2d5a27;
  font-weight: 700;
}

.dlt-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.dlt-hero-title {
  margin: 0 0 8px 0;
  font-size: 1.38rem;
  font-weight: 800;
  color: var(--text-primary, #1e3f20);
}

.dlt-hero-subtitle {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary, #4b5563);
  max-width: 820px;
}

.dlt-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dlt-docstar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 22px;
  align-items: start;
}

@media (max-width: 1100px) {
  .dlt-docstar-layout {
    grid-template-columns: 1fr;
  }
  .dlt-doc-aside {
    order: -1;
    position: static !important;
  }
}

.dlt-doc-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dlt-section-box {
  margin-bottom: 0 !important;
}

.dlt-progress-chip {
  background: rgba(45, 90, 39, 0.12);
  color: #2d5a27;
  border: 1px solid rgba(45, 90, 39, 0.25);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.dlt-sections-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dlt-cat-block {
  background: var(--bg-secondary, #f7f3eb);
  border: 1px solid var(--border-color, #e3dcd0);
  border-radius: 12px;
  padding: 16px 18px;
}

.dlt-cat-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color, #e3dcd0);
}

.dlt-cat-title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
  color: #1e3f20;
}

.dlt-cat-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary, #6b7280);
}

.dlt-doc-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dlt-doc-item {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e5dfd3);
  border-left: 4px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  transition: all 0.2s ease;
}

.dlt-doc-item.checked {
  border-left-color: #2d5a27;
  background: #f5fbf4;
}

.dlt-doc-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 260px;
}

.dlt-doc-checkbox {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  accent-color: #2d5a27;
  cursor: pointer;
}

.dlt-doc-name {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text-primary, #1f2937);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dlt-doc-desc {
  margin-top: 4px;
  font-size: 0.83rem;
  line-height: 1.48;
  color: var(--text-secondary, #4b5563);
}

.dlt-badge-mandatory {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
}

.dlt-badge-optional {
  background: #f3efe8;
  color: #5c5346;
  border: 1px solid #dfd7ca;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
}

.dlt-doc-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dlt-mini-select,
.dlt-mini-input {
  padding: 6px 10px;
  border: 1px solid var(--border-color, #d6cfc2);
  border-radius: 7px;
  font-size: 0.78rem;
  background: #ffffff;
  color: #1f2937;
}

.dlt-mini-input {
  min-width: 170px;
}

/* Step-by-Step Grid */
.dlt-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dlt-step-card {
  background: var(--bg-secondary, #f8f5ef);
  border: 1px solid var(--border-color, #e3dcd0);
  border-radius: 10px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dlt-step-card.done {
  border-color: #2d5a27;
  background: #f2f9f1;
}

.dlt-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dlt-step-num {
  font-size: 0.74rem;
  font-weight: 800;
  color: #2d5a27;
  background: rgba(45, 90, 39, 0.12);
  padding: 2px 8px;
  border-radius: 9999px;
}

.dlt-step-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #1e3f20;
}

.dlt-step-desc {
  font-size: 0.79rem;
  line-height: 1.45;
  color: #4b5563;
}

.dlt-portals-strip {
  background: #f3efe7;
  border: 1px dashed #cfc5b4;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dlt-portals-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e3f20;
}

.dlt-portals-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dlt-portal-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #d6cfc2;
  color: #2d5a27;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 7px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.dlt-portal-link:hover {
  background: #2d5a27;
  color: #ffffff;
  border-color: #2d5a27;
}

/* Config Inputs & LOA */
.dlt-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.dlt-field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dlt-field-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary, #1e3f20);
}

.dlt-input {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border-color, #d5cdbf);
  border-radius: 8px;
  font-size: 0.86rem;
  background: #ffffff;
  color: #1f2937;
}

.dlt-input.dlt-upper {
  text-transform: uppercase;
  font-weight: 600;
}

.dlt-hint {
  font-size: 0.74rem;
  color: var(--text-secondary, #6b7280);
  line-height: 1.35;
}

.dlt-inline-copy {
  display: flex;
  gap: 6px;
}

.btn-xs {
  padding: 5px 10px !important;
  font-size: 0.75rem !important;
  white-space: nowrap;
}

.dlt-fallback-box {
  background: #f5fbf4;
  border: 1px solid #c6dfc3;
  border-radius: 10px;
  padding: 12px 14px;
}

.dlt-toggle-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.dlt-toggle-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #2d5a27;
}

.dlt-toggle-label p {
  margin: 3px 0 0 0;
  font-size: 0.8rem;
  color: #4b5563;
}

.dlt-btn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.dlt-loa-preview {
  margin-top: 14px;
  background: #fbf9f4;
  border: 1px solid #dcd4c6;
  border-radius: 10px;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #1f2937;
  white-space: pre-wrap;
  max-height: 420px;
  overflow-y: auto;
}

.dlt-loa-preview.hidden {
  display: none;
}

.dlt-sample-box {
  font-size: 0.78rem;
  line-height: 1.45;
  background: #f7f4ed;
  border: 1px solid #e5dfd3;
  padding: 8px 10px;
  border-radius: 8px;
  max-width: 440px;
  color: #1f2937;
}

/* Sticky Right Sidebar ("On this page" DocStar Outline) */
.dlt-doc-aside {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dlt-aside-card {
  background: var(--card-bg, #fcfaf6);
  border: 1px solid var(--border-color, #e3dcd0);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.dlt-aside-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #2d5a27;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color, #e6dfd4);
}

.dlt-readiness-stats {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.dlt-stat-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary, #4b5563);
}

.dlt-stat-line strong {
  color: var(--text-primary, #1e3f20);
}

.dlt-pill-ok {
  color: #15803d !important;
  background: #dcfce7;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.73rem;
}

.dlt-pill-warn {
  color: #b45309 !important;
  background: #fef3c7;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.73rem;
}

.dlt-outline-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dlt-outline-nav a {
  display: block;
  padding: 6px 10px;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  font-size: 0.81rem;
  color: var(--text-secondary, #4b5563);
  text-decoration: none;
  transition: all 0.15s ease;
}

.dlt-outline-nav a:hover,
.dlt-outline-nav a.active {
  color: #2d5a27;
  background: rgba(45, 90, 39, 0.08);
  border-left-color: #2d5a27;
  font-weight: 600;
}

/* ==============================================================================
   WHATSAPP READ / DELIVERY STATUS & 14-WEBHOOK STREAM BADGES
   ============================================================================== */
.step-check-badge.read,
.badge-status-read,
.status-indicator-tag.read,
.wa-sent-badge.read {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
  border: 1px solid #93c5fd !important;
  font-weight: 700;
}

.badge-status-read {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.78rem;
}

.modal-delivery-card.read {
  border-color: #60a5fa !important;
  background: rgba(59, 130, 246, 0.08) !important;
}

.modal-step-row.read {
  border-left: 3px solid #2563eb;
}

.wh-registry-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.wh-hook-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 9999px;
  background: var(--bg-secondary, #f4efe6);
  border: 1px solid var(--border-color, #dcd4c6);
  color: var(--text-primary, #1e3f20);
}

.wh-hook-pill.active-hit {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

/* ==============================================================================
   GOOGLE CALENDAR DEMO BOOKING PANEL
   ============================================================================== */
.nav-tab-badge.gcal-badge {
  background: rgba(16, 185, 129, 0.14);
  color: #15803d;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.gcal-slots-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.gcal-slot-card {
  background: var(--bg-secondary, #f7f3eb);
  border: 1px solid var(--border-color, #dcd4c6);
  border-left: 4px solid #2d5a27;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gcal-slot-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: #2d5a27;
  text-transform: uppercase;
}

.gcal-slot-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary, #1e3f20);
}

.gcal-slot-btn-preview {
  display: inline-block;
  margin-top: 4px;
  background: #ffffff;
  border: 1px solid #86efac;
  color: #166534;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  align-self: flex-start;
}

/* ==============================================================================
   SUB-NAVBAR CLEAN WRAPPING & PARTICULAR-DAY CALENDAR EXPLORER
   ============================================================================== */
.sub-nav-container {
  flex-wrap: wrap !important;
  gap: 0.3rem !important;
  overflow-x: visible !important;
  padding: 0.25rem 0;
}

.nav-tab {
  padding: 0.65rem 0.9rem !important;
  font-size: 0.85rem !important;
}

.gcal-day-explorer-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

@media (max-width: 980px) {
  .gcal-day-explorer-grid {
    grid-template-columns: 1fr;
  }
}

.gcal-month-box {
  background: var(--bg-secondary, #f7f3eb);
  border: 1px solid var(--border-color, #dcd4c6);
  border-radius: 12px;
  padding: 16px;
}

.gcal-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.gcal-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 6px;
}

.gcal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.gcal-day-cell {
  min-height: 44px;
  background: #ffffff;
  border: 1px solid #e5dfd3;
  border-radius: 8px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1f2937;
  transition: all 0.15s ease;
}

.gcal-day-cell:hover {
  border-color: #2d5a27;
  background: #f2f9f1;
}

.gcal-day-cell.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.gcal-day-cell.today {
  border-color: #3b82f6;
  box-shadow: inset 0 0 0 1px #3b82f6;
}

.gcal-day-cell.selected {
  background: #1b5e3b !important;
  color: #ffffff !important;
  border-color: #14462c !important;
}

.gcal-day-cell.holiday {
  background: #fef2f2;
  color: #991b1b;
}

.gcal-day-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 9999px;
  background: #dcfce7;
  color: #166534;
}

.gcal-day-cell.selected .gcal-day-badge {
  background: #ffffff;
  color: #1b5e3b;
}

.gcal-legend-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.74rem;
  color: #4b5563;
}

.gcal-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 4px;
}

.gcal-dot.booked { background: #16a34a; }
.gcal-dot.holiday { background: #dc2626; }
.gcal-dot.selected { background: #1b5e3b; }

.gcal-day-detail-box {
  background: var(--bg-secondary, #f9f6ef);
  border: 1px solid var(--border-color, #dcd4c6);
  border-radius: 12px;
  padding: 16px 18px;
}

.gcal-day-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color, #e3dcd0);
  flex-wrap: wrap;
}

.gcal-day-bookings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gcal-booking-card {
  background: #ffffff;
  border: 1px solid #e3dcd0;
  border-left: 4px solid #1b5e3b;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gcal-booking-card.gcal-native {
  border-left-color: #2563eb;
}

.gcal-booking-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.gcal-booking-time {
  font-size: 0.8rem;
  font-weight: 800;
  color: #1b5e3b;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: 6px;
}

.gcal-booking-card.gcal-native .gcal-booking-time {
  color: #1d4ed8;
  background: #dbeafe;
}

.gcal-booking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: #4b5563;
}

.gcal-day-slots-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gcal-slot-pill-btn {
  background: #ffffff;
  border: 1px solid #86efac;
  color: #166534;
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gcal-slot-pill-btn:hover {
  background: #1b5e3b;
  color: #ffffff;
  border-color: #1b5e3b;
}

.gcal-slot-pill-btn.past {
  opacity: 0.45;
  cursor: not-allowed;
}
