/**
 * HiveGuardian B2B SaaS Platform - Core Stylesheet
 * Premium Dark-Mode Design System | Mobile-First Responsive Layout
 */

:root {
  --bg-darker: #080a0d;
  --bg-dark: #0f131a;
  --bg-card: rgba(22, 28, 38, 0.6);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 229, 255, 0.25);
  
  --text-primary: #f0f3f8;
  --text-secondary: #94a3b8;
  
  --color-cyan: #00e5ff;
  --color-emerald: #00e676;
  --color-gold: #d4af37;
  --color-red: #ff3d00;
  
  --font-sans: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-darker);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  margin: 0;
  box-sizing: border-box;
}

/* Background Glowing Orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

#orb-1 {
  width: 400px;
  height: 400px;
  background-color: var(--color-cyan);
  top: -100px;
  right: -50px;
}

#orb-2 {
  width: 500px;
  height: 500px;
  background-color: var(--color-gold);
  bottom: -150px;
  left: -100px;
}

/* Premium Glassmorphism Utility */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-emerald) 50%, var(--color-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header & Navigation */
.glass-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(8, 10, 13, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  z-index: 100;
  padding: 12px 16px;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 24px;
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

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

.active-badge {
  font-size: 11px;
  background-color: rgba(0, 229, 255, 0.15);
  color: var(--color-cyan);
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--border-glow);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.glass-select {
  background: var(--bg-darker);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.primary-btn {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-emerald) 100%);
  color: var(--bg-darker);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.primary-btn:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

/* Main Content Wrapper */
.main-content {
  max-width: 1200px;
  margin: 100px auto 40px auto;
  padding: 0 16px;
  position: relative;
  z-index: 10;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 40px 0;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -1.5px;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin-bottom: 24px;
}

/* Interactive Terminal Section */
.terminal-section {
  max-width: 850px;
  margin: 0 auto 48px auto;
}

.terminal-card {
  overflow: visible; /* Prevent clipping of plainspeak tooltips */
  border: 1px solid var(--border-glass);
}

.terminal-card:hover {
  border-color: var(--border-glow);
}

.terminal-header {
  background-color: rgba(8, 10, 13, 0.6);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
  border-top-left-radius: 15px; /* Prevent background leakage */
  border-top-right-radius: 15px;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.red-dot { background-color: #ff5f56; }
.yellow-dot { background-color: #ffbd2e; }
.green-dot { background-color: #27c93f; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}

.status-indicator {
  font-size: 11px;
  color: var(--color-emerald);
  font-weight: bold;
}

.terminal-intake {
  background-color: rgba(8, 10, 13, 0.4);
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-glass);
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
}

.scan-btn {
  background-color: var(--color-cyan);
  color: var(--bg-darker);
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.scan-btn:hover { opacity: 0.9; }

.terminal-body {
  padding: 16px;
  height: 350px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  background-color: rgba(8, 10, 13, 0.5);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.line.comment { color: #5c6370; }
.line.prompt { color: var(--color-cyan); }
.line.bold { font-weight: bold; color: var(--text-primary); }
.line.better { color: var(--color-emerald); font-weight: bold; }
.blink { animation: blinker 1s linear infinite; }

@keyframes blinker {
  50% { opacity: 0; }
}

/* Universal Omnibox Section */
.omnibox-section {
  max-width: 700px;
  margin: 0 auto 64px auto;
  text-align: center;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.section-subtitle {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 15px;
}

.omnibox-card {
  display: flex;
  padding: 8px;
  margin-bottom: 16px;
}

.omnibox-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  padding: 12px;
  font-size: 15px;
}

.omnibox-btn {
  background-color: var(--text-primary);
  color: var(--bg-darker);
  border: none;
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.omnibox-response {
  text-align: left;
  padding: 20px;
  margin-top: 16px;
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.ai-badge {
  font-size: 11px;
  background-color: rgba(212, 175, 55, 0.15);
  color: var(--color-gold);
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  font-weight: bold;
}

.close-response {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
}

.response-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
}

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

/* Strategic Pricing Cards Section */
.pricing-section {
  margin-bottom: 64px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
}

.pricing-card {
  padding: 32px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-glass);
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
}

.highlight-card {
  border-color: var(--border-glow);
  box-shadow: 0 0 20px 0 rgba(0, 229, 255, 0.15);
}

.popular-ribbon {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 10px;
  background-color: var(--color-cyan);
  color: var(--bg-darker);
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 4px;
}

.tier-name {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}

.tier-price {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1;
}

.price-period {
  font-size: 14px;
  color: var(--text-secondary);
}

.tier-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  height: 40px;
}

.card-divider {
  border: none;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 20px;
}

.card-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
  flex: 1;
}

.card-features li {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-features li::before {
  content: '✓';
  color: var(--color-emerald);
  font-weight: bold;
}

.card-features li.disabled {
  color: rgba(255, 255, 255, 0.25);
  text-decoration: line-through;
}

.card-features li.disabled::before {
  content: '✕';
  color: var(--color-red);
}

.card-btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s ease;
}

.card-btn.primary {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-emerald) 100%);
  color: var(--bg-darker);
}

.card-btn.secondary {
  background: var(--bg-darker);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.card-btn:hover { opacity: 0.9; }

/* Viral Outrage Loop Section */
.outrage-section {
  max-width: 900px;
  margin: 0 auto 64px auto;
}

.outrage-card {
  padding: 40px 24px;
  text-align: center;
  border: 1px solid var(--border-glass);
}

.outrage-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.outrage-desc {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 24px;
}

.disruption-table-container {
  overflow-x: auto;
  margin-bottom: 24px;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
}

.disruption-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  background-color: rgba(8, 10, 13, 0.4);
}

.disruption-table th, .disruption-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-glass);
}

.disruption-table th {
  background-color: rgba(8, 10, 13, 0.6);
  font-weight: 700;
  color: var(--text-secondary);
}

.disruption-table td.better {
  color: var(--color-emerald);
  font-weight: 700;
}

.share-btn {
  background-color: rgba(212, 175, 55, 0.15);
  color: var(--color-gold);
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-btn:hover {
  background-color: rgba(212, 175, 55, 0.25);
  transform: scale(1.02);
}

/* Footer Section */
.glass-footer {
  background-color: var(--bg-darker);
  border-top: 1px solid var(--border-glass);
  padding: 32px 16px;
  z-index: 10;
  position: relative;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-left p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.footer-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.noi-badge {
  font-size: 11px;
  background-color: rgba(0, 230, 118, 0.15);
  color: var(--color-emerald);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(0, 230, 118, 0.3);
  font-weight: bold;
}

.sentinel-time {
  font-size: 12px;
  color: var(--text-secondary);
}

/* --- MOBILE FIRST MEDIA QUERIES (FLUID SCALING) --- */

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  
  .footer-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .footer-right {
    align-items: flex-end;
  }
}

@media (max-width: 480px) {
  .shrink-on-mobile {
    display: none;
  }
}

/* ==========================================================================
   💎 PREMIUM COMPONENT STYLING: SUBAGENT PLAYGROUND, ROI, MATRIX & BADGES
   ========================================================================== */

/* 1. Interactive E2E Subagent Playground */
.playground-section {
  max-width: 850px;
  margin: 64px auto;
  text-align: center;
}

.agent-console-card {
  border: 1px solid rgba(0, 230, 118, 0.2);
  box-shadow: 0 8px 32px 0 rgba(0, 230, 118, 0.05);
}

.agent-console-card:hover {
  border-color: var(--color-emerald);
}

.console-status-badge {
  font-size: 11px;
  background-color: rgba(0, 230, 118, 0.15);
  color: var(--color-emerald);
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid rgba(0, 230, 118, 0.3);
  font-weight: 600;
}

.agent-intake {
  background-color: rgba(8, 10, 13, 0.5);
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--border-glass);
}

.agent-input {
  flex: 1;
  min-width: 250px;
  background: rgba(15, 19, 26, 0.6);
  border: 1px solid var(--border-glass);
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 8px;
}

.agent-input:focus {
  border-color: var(--color-emerald);
}

.trigger-agent-btn {
  background: linear-gradient(135deg, var(--color-emerald) 0%, var(--color-cyan) 100%);
  color: var(--bg-darker);
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.trigger-agent-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 230, 118, 0.3);
}

.playground-body {
  padding: 16px;
  height: 380px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  background-color: #05070a;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.log-entry {
  display: flex;
  gap: 12px;
}

.log-time { color: var(--color-cyan); min-width: 50px; }
.log-sender { font-weight: bold; min-width: 70px; }
.log-sender.SYSTEM { color: var(--text-secondary); }
.log-sender.AGENT { color: var(--color-emerald); }
.log-sender.CDP { color: var(--color-cyan); }
.log-message { color: var(--text-primary); flex: 1; }

/* 2. Conventional Tools Comparison Matrix Section */
.matrix-section {
  margin: 64px auto;
  max-width: 1000px;
}

.matrix-card {
  padding: 24px;
  border: 1px solid var(--border-glass);
}

.matrix-table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  margin-top: 24px;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.matrix-table th, .matrix-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-glass);
}

.matrix-table th {
  background-color: rgba(8, 10, 13, 0.8);
  font-weight: 700;
  color: var(--text-secondary);
}

.matrix-table tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

.matrix-table td.matrix-feature {
  font-weight: 600;
  color: var(--text-primary);
}

.matrix-table td.matrix-hg {
  background-color: rgba(0, 229, 255, 0.03);
  color: var(--color-cyan);
  font-weight: 700;
  border-left: 1px solid rgba(0, 229, 255, 0.1);
  border-right: 1px solid rgba(0, 229, 255, 0.1);
}

.badge-tick { color: var(--color-emerald); margin-right: 4px; font-weight: bold; }
.badge-cross { color: var(--color-red); margin-right: 4px; font-weight: bold; }

/* 3. Self-Healing ROI Calculator */
.roi-section {
  max-width: 850px;
  margin: 64px auto;
}

.roi-card {
  padding: 32px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 8px 32px 0 rgba(212, 175, 55, 0.03);
}

.roi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 24px;
}

@media (min-width: 768px) {
  .roi-grid {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
  }
}

.roi-inputs {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.slider-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.slider-label span.value-highlight {
  color: var(--color-gold);
}

.roi-slider {
  width: 100%;
  -webkit-appearance: none;
  background: rgba(15, 19, 26, 0.8);
  height: 8px;
  border-radius: 4px;
  outline: none;
}

.roi-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-gold);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
  transition: transform 0.1s ease;
}

.roi-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.roi-outputs {
  background: rgba(8, 10, 13, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.roi-value-container {
  display: flex;
  flex-direction: column;
}

.roi-large-num {
  font-size: 42px;
  font-weight: 800;
  color: var(--color-emerald);
  letter-spacing: -1px;
}

.roi-large-label {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.roi-savings-badge {
  background-color: rgba(212, 175, 55, 0.15);
  color: var(--color-gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  margin: 0 auto;
}

/* 4. Lead Capture Dynamic Status Badge Generator */
.badge-section {
  max-width: 800px;
  margin: 64px auto;
}

.badge-card {
  padding: 32px;
  text-align: center;
}

.badge-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 600px;
  margin: 24px auto;
}

.badge-email-input {
  flex: 1.5;
  min-width: 200px;
}

.badge-url-input {
  flex: 1.5;
  min-width: 200px;
}

.gen-badge-btn {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-gold) 100%);
  color: var(--bg-darker);
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gen-badge-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}

.badge-preview-area {
  margin-top: 24px;
  background: rgba(8, 10, 13, 0.6);
  border: 1px solid var(--border-glass);
  padding: 24px;
  border-radius: 12px;
  display: inline-block;
}

.badge-display {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.badge-svg {
  display: flex;
  align-items: center;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  font-family: var(--font-mono);
  overflow: hidden;
}

.badge-left {
  background: #161b22;
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: bold;
  border-right: 1px solid #30363d;
}

.badge-right {
  color: var(--color-emerald);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: bold;
}

.badge-code-block {
  background: var(--bg-darker);
  border: 1px solid var(--border-glass);
  padding: 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 100%;
  overflow-x: auto;
  text-align: left;
}

.roi-num-input {
  background: rgba(15, 19, 26, 0.8);
  border: 1px solid var(--border-glass);
  color: var(--color-gold);
  border-radius: 6px;
  padding: 4px 8px;
  width: 80px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  outline: none;
  text-align: right;
}

.roi-num-input:focus {
  border-color: var(--color-gold);
}

.toggle-mode-btn {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
  background-image: none !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: var(--text-secondary) !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  font-family: var(--font-sans) !important;
  outline: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  text-shadow: none !important;
}

.toggle-mode-btn:hover {
  background-color: rgba(255, 255, 255, 0.15) !important;
  color: var(--text-primary) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.toggle-mode-btn.active {
  background-color: rgba(0, 229, 255, 0.15) !important;
  border-color: var(--color-cyan) !important;
  color: var(--color-cyan) !important;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2) !important;
}

.toggle-mode-btn.active.dual {
  background-color: rgba(0, 230, 118, 0.15) !important;
  border-color: rgba(0, 230, 118, 0.3) !important;
  color: var(--color-emerald) !important;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.2) !important;
}

/* 🔮 SWIM Plain-Speak Popover Portal Styles */
.plainspeak-trigger {
  position: relative;
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 15px;
  line-height: 1;
  vertical-align: middle;
  margin-left: 4px;
}

.plainspeak-trigger:hover {
  transform: scale(1.3) rotate(15deg);
}

.plainspeak-popover-portal {
  position: absolute; /* positioned relative to viewport/document body by JS */
  background: rgba(10, 14, 20, 0.96);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  z-index: 2147483647 !important; /* Force absolute highest foreground layer */
  width: 290px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0;
  inset: auto;
}

/* Native Popover Support Open State */
.plainspeak-popover-portal:popover-open {
  display: block !important;
}

.plainspeak-popover-portal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Tooltip Indicator Arrow */
.plainspeak-popover-portal::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
}

/* Default position (above trigger): arrow points down */
.plainspeak-popover-portal:not(.position-below)::after {
  top: 100%;
  border-color: rgba(10, 14, 20, 0.96) transparent transparent transparent;
}

/* Flipped position (below trigger): arrow points up */
.plainspeak-popover-portal.position-below::after {
  bottom: 100%;
  border-color: transparent transparent rgba(10, 14, 20, 0.96) transparent;
}

.popover-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--color-cyan);
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 4px;
}

.popover-body {
  color: var(--text-secondary);
}

.popover-body strong {
  color: var(--text-primary);
}

.hidden {
  display: none !important;
}

/* Dual Speak Stacked Logs styles */
.dual-tech {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 2px;
}

.dual-plain {
  color: var(--color-emerald);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
}

.log-entry.dual-block {
  border-left: 2px solid rgba(0, 230, 118, 0.3);
  padding-left: 8px;
  margin-bottom: 8px;
}

/* 5. Edge Outage & Auto-Heal Simulator Styles */
.simulator-section {
  max-width: 850px;
  margin: 64px auto;
  text-align: center;
}

.simulator-card {
  padding: 24px;
  border: 1px solid var(--border-glass);
}

.simulator-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 20px;
}

@media (min-width: 768px) {
  .simulator-grid {
    grid-template-columns: 0.8fr 1.2fr;
    align-items: stretch;
  }
}

.simulator-controls {
  background: rgba(8, 10, 13, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}

.sim-btn-group {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.sim-action-btn {
  flex: 1;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.sim-action-btn.red {
  background: rgba(255, 61, 0, 0.15);
  border: 1px solid rgba(255, 61, 0, 0.4);
  color: var(--color-red);
}

.sim-action-btn.red:hover:not(.disabled) {
  background: rgba(255, 61, 0, 0.25);
  transform: translateY(-2px);
}

.sim-action-btn.green {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.4);
  color: var(--color-emerald);
}

.sim-action-btn.green:hover:not(.disabled) {
  background: rgba(0, 230, 118, 0.25);
  transform: translateY(-2px);
}

.sim-action-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sim-telemetry-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-darker);
  border: 1px solid var(--border-glass);
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
}

.telemetry-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.telemetry-value {
  font-family: var(--font-mono);
  font-weight: bold;
  transition: all 0.3s ease;
}

.telemetry-value.active { color: var(--color-emerald); }
.telemetry-value.broken { color: var(--color-red); }

.simulator-terminal {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

/* --- SRE Chat Simulator Section Styles --- */
.sre-simulator-section {
  margin: 60px auto;
  max-width: 1200px;
  padding: 0 16px;
  text-align: center;
}

.sre-simulator-card {
  margin-top: 30px;
  padding: 24px;
  overflow: hidden;
}

/* SRE Gradation / Configuration Panel */
.sre-config-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(0, 229, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 20px;
  text-align: left;
}

@media (min-width: 768px) {
  .sre-config-panel {
    grid-template-columns: repeat(3, 1fr);
  }
}

.config-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.config-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-shadow: 0 0 10px rgba(148, 163, 184, 0.1);
}

.glass-select {
  background: rgba(8, 10, 13, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

.glass-select:hover {
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
}

.glass-select:focus {
  outline: none;
  border-color: var(--color-cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
}

/* Platform Connection Cards */
.sre-gateway-panel {
  padding: 30px 0;
}

.gateway-header {
  margin-bottom: 30px;
}

.gateway-header h3 {
  font-size: 22px;
  margin-bottom: 8px;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.gateway-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.platform-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .platform-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.platform-card {
  border-radius: 16px;
  padding: 35px 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.platform-card.slack {
  background: rgba(224, 30, 90, 0.03);
  border: 1px solid rgba(224, 30, 90, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.platform-card.discord {
  background: rgba(88, 101, 242, 0.03);
  border: 1px solid rgba(88, 101, 242, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.platform-card.slack:hover {
  transform: translateY(-5px);
  border-color: rgba(224, 30, 90, 0.5);
  box-shadow: 0 10px 30px rgba(224, 30, 90, 0.15);
}

.platform-card.discord:hover {
  transform: translateY(-5px);
  border-color: rgba(88, 101, 242, 0.5);
  box-shadow: 0 10px 30px rgba(88, 101, 242, 0.15);
}

.platform-icon {
  font-size: 44px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
  transition: transform 0.3s ease;
}

.platform-card:hover .platform-icon {
  transform: scale(1.1);
}

.platform-card h4 {
  font-size: 19px;
  font-weight: 700;
  color: white;
}

.platform-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
  height: 44px;
}

.gateway-connect-btn {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: none;
  font-family: var(--font-sans);
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.platform-card.slack .gateway-connect-btn {
  background: linear-gradient(135deg, #e01e5a 0%, #4a154b 100%);
  border: 1px solid rgba(224, 30, 90, 0.3);
  color: white;
  box-shadow: 0 4px 12px rgba(224, 30, 90, 0.2);
}

.platform-card.slack:hover .gateway-connect-btn {
  background: linear-gradient(135deg, #ff3d7f 0%, #6b206c 100%);
  box-shadow: 0 6px 20px rgba(224, 30, 90, 0.45);
  transform: translateY(-1px);
}

.platform-card.discord .gateway-connect-btn {
  background: linear-gradient(135deg, #5865f2 0%, #3b429f 100%);
  border: 1px solid rgba(88, 101, 242, 0.3);
  color: white;
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.2);
}

.platform-card.discord:hover .gateway-connect-btn {
  background: linear-gradient(135deg, #7289da 0%, #4f58c7 100%);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.45);
  transform: translateY(-1px);
}

/* Loading Panel and Terminal */
.sre-loading-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px 0;
  max-width: 600px;
  margin: 0 auto;
}

.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.glowing-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(0, 229, 255, 0.1);
  border-top: 3px solid var(--color-cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.sre-loading-terminal {
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  overflow: hidden;
  text-align: left;
  background: var(--bg-darker);
}

/* Connected Chat Interface (Sleek Slack vs Discord Themeable Workspace) */
.sre-chat-container {
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

/* Theme Classes applied to sre-chat-container */
.sre-chat-container.slack-theme {
  background-color: #1a1d21;
  border-color: rgba(255, 255, 255, 0.08);
}

.sre-chat-container.discord-theme {
  background-color: #313338;
  border-color: rgba(88, 101, 242, 0.2);
}

.chat-workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  height: 600px;
}

@media (min-width: 768px) {
  .chat-workspace-grid {
    grid-template-columns: 240px 1fr;
  }
}

/* Sidebar Styles */
.chat-sidebar {
  background: rgba(0, 0, 0, 0.2);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

.slack-theme .chat-sidebar {
  background: #19171d;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.discord-theme .chat-sidebar {
  background: #2b2d31;
  border-right: none;
}

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

.workspace-name {
  font-weight: 700;
  font-size: 15px;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.active-dot {
  color: var(--color-emerald);
  font-size: 10px;
}

.sidebar-channels {
  flex-grow: 1;
}

.channel-section-title {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: bold;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.channel-item {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.channel-item::before {
  content: "#";
  opacity: 0.5;
}

.channel-item.active {
  color: white;
  font-weight: bold;
}

.slack-theme .channel-item.active {
  background: #1164a3;
}

.discord-theme .channel-item.active {
  background: rgba(79, 84, 92, 0.32);
}

.channel-item:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.sidebar-status-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bot-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.bot-status-indicator {
  font-size: 8px;
}

.bot-status-indicator.green {
  color: var(--color-emerald);
  text-shadow: 0 0 6px var(--color-emerald);
}

.sidebar-disconnect-btn {
  background: rgba(255, 61, 0, 0.1);
  border: 1px solid rgba(255, 61, 0, 0.3);
  color: var(--color-red);
  padding: 8px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: bold;
  transition: all 0.2s;
}

.sidebar-disconnect-btn:hover {
  background: rgba(255, 61, 0, 0.2);
}

/* Feed Area Styles */
.chat-feed-area {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.feed-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.05);
}

.slack-theme .feed-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.discord-theme .feed-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.feed-header-hash {
  color: var(--text-secondary);
  font-weight: bold;
  font-size: 18px;
}

.feed-header-name {
  font-weight: 700;
  font-size: 16px;
  color: white;
}

.feed-header-topic {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Message Feed Scroller */
.feed-messages {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

.feed-messages::-webkit-scrollbar {
  width: 8px;
}

.feed-messages::-webkit-scrollbar-track {
  background: transparent;
}

.feed-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.discord-theme .feed-messages::-webkit-scrollbar-thumb {
  background: #1e1f22;
}

/* Chat Message Styling */
.chat-message {
  display: flex;
  gap: 12px;
  animation: slideInMessage 0.25s ease-out;
}

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

.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
}

.slack-theme .msg-avatar {
  border-radius: 4px;
}

.discord-theme .msg-avatar {
  border-radius: 50%;
}

.msg-avatar.bot {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-emerald) 100%);
  color: #080a0d;
}

.msg-avatar.user {
  background: #4a5568;
  color: white;
}

.msg-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.msg-sender {
  font-weight: 700;
  font-size: 14px;
  color: white;
}

.msg-time {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Discord Bot Badge */
.discord-bot-badge {
  background: #5865f2;
  color: white;
  font-size: 9px;
  font-weight: bold;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-left: 2px;
}

/* Slack APP Badge */
.slack-app-badge {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-secondary);
  font-size: 9px;
  padding: 0px 4px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-left: 2px;
  font-weight: 600;
}

.msg-body {
  font-size: 14px;
  color: #e2e8f0;
  line-height: 1.5;
  word-break: break-word;
}

.discord-theme .msg-body {
  color: #dbdee1;
}

.msg-body code {
  font-family: var(--font-mono);
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
}

.slack-theme .msg-body code {
  background: #222529;
  border-color: rgba(255,255,255,0.08);
}

.msg-body pre {
  margin-top: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-x: auto;
}

.slack-theme .msg-body pre {
  background: #222529;
  border-color: rgba(255,255,255,0.08);
}

/* SRE Bot Response Block Styles */
.sre-alert-box {
  margin-top: 8px;
  border-left: 4px solid var(--color-cyan);
  background: rgba(0, 229, 255, 0.04);
  padding: 12px;
  border-radius: 0 8px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sre-alert-box.outage {
  border-left-color: var(--color-red);
  background: rgba(255, 61, 0, 0.04);
}

.sre-alert-box.success {
  border-left-color: var(--color-emerald);
  background: rgba(0, 230, 118, 0.04);
}

.alert-title {
  font-weight: bold;
  color: white;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.alert-details {
  font-size: 12px;
  color: var(--text-secondary);
}

/* SRE Typing Indicator styling */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 8px 0;
  margin-left: 48px;
}

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

.typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--text-secondary);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

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

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

/* Quick Action Prompts Bar */
.quick-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.08);
}

.slack-theme .quick-prompt-actions {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.discord-theme .quick-prompt-actions {
  border-top: 1px solid rgba(0, 0, 0, 0.2);
}

.quick-action-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  color: var(--text-secondary);
  padding: 6px 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-action-btn:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.3);
  color: white;
}

/* Custom Message Input Bar */
.chat-input-bar {
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  background: rgba(0, 0, 0, 0.15);
}

.slack-theme .chat-input-bar {
  background: #1a1d21;
}

.discord-theme .chat-input-bar {
  background: #383a40;
}

.chat-input-bar input {
  flex-grow: 1;
  background: rgba(8, 10, 13, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  transition: all 0.2s;
}

.slack-theme .chat-input-bar input {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}

.discord-theme .chat-input-bar input {
  background: #383a40;
  border: none;
  background-color: #383a40;
  border-radius: 8px;
}

.chat-input-bar input:focus {
  outline: none;
  border-color: var(--color-cyan);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.2);
}

.chat-input-bar button {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-emerald) 100%);
  border: none;
  color: #080a0d;
  font-weight: bold;
  padding: 0 20px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 14px;
  transition: all 0.2s;
}

.chat-input-bar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}

.hidden {
  display: none !important;
}

/* --- One-Time Edge Diagnostic Scanner Section --- */
.diagnostic-section {
  margin: 60px auto;
  max-width: 1200px;
  padding: 0 16px;
  text-align: center;
}

.diagnostic-card {
  margin-top: 30px;
  padding: 24px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(0, 229, 255, 0.15);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

/* Scanner Input Panel */
.diag-gateway-panel {
  padding: 20px 0;
}

.diag-input-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto 16px auto;
}

@media (min-width: 768px) {
  .diag-input-row {
    flex-direction: row;
  }
}

#diag-domain-input {
  flex-grow: 1;
  background: rgba(8, 10, 13, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 14px 18px;
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

#diag-domain-input:focus {
  border-color: var(--color-cyan);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 229, 255, 0.3);
}

.diag-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--color-cyan) !important;
  font-weight: bold;
  padding: 14px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.15);
}

.diag-btn:hover {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-emerald) 100%);
  color: #080a0d !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.45);
}

.diag-flat-callout {
  font-size: 13.5px;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.5;
  border: 1px dashed rgba(212, 175, 55, 0.2);
  background: rgba(212, 175, 55, 0.02);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

.diag-flat-callout strong {
  color: var(--color-gold);
}

/* Loading & Progressive Progress */
.diag-loading-panel {
  padding: 30px 0;
  max-width: 700px;
  margin: 0 auto;
  text-align: left;
}

.diag-progress-container {
  margin-bottom: 24px;
}

.diag-progress-container h4 {
  font-size: 15px;
  margin-bottom: 10px;
  color: white;
  text-align: center;
}

.diag-progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

.diag-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-cyan) 0%, var(--color-emerald) 50%, var(--color-gold) 100%);
  border-radius: 4px;
  transition: width 0.2s ease;
  box-shadow: 0 0 12px var(--color-cyan);
}

.diag-loading-terminal {
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  overflow: hidden;
  text-align: left;
  background: var(--bg-darker);
}

/* Diagnostic Audit Report Layout */
.diag-report-panel {
  text-align: left;
  animation: fadeInReport 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.report-header h3 {
  font-size: 20px;
  font-weight: bold;
  color: white;
}

.report-date-badge {
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.3);
  color: var(--color-emerald);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
}

/* Scorecard Grid */
.diag-scorecard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (min-width: 992px) {
  .diag-scorecard-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.diag-score-card {
  background: rgba(15, 19, 26, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 4px solid var(--color-cyan);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.diag-score-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.diag-score-card.warning {
  border-top-color: var(--color-gold);
  background: rgba(212, 175, 55, 0.015);
  border-color: rgba(212, 175, 55, 0.15);
}

.diag-score-card.caution {
  border-top-color: var(--color-cyan);
  background: rgba(0, 229, 255, 0.015);
  border-color: rgba(0, 229, 255, 0.15);
}

.diag-score-card.critical {
  border-top-color: var(--color-red);
  background: rgba(255, 61, 0, 0.015);
  border-color: rgba(255, 61, 0, 0.15);
}

.card-icon {
  font-size: 28px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-weight: bold;
  font-size: 15px;
  color: white;
}

.card-status {
  font-size: 12px;
  font-weight: bold;
}

.diag-score-card.warning .card-status { color: var(--color-gold); }
.diag-score-card.caution .card-status { color: var(--color-cyan); }
.diag-score-card.critical .card-status { color: var(--color-red); }

.card-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Strategic Recommendations Box */
.diag-recommendations {
  background: rgba(8, 10, 13, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.diag-recommendations h4 {
  font-size: 15px;
  font-weight: bold;
  color: white;
  margin-bottom: 12px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.diag-recommendations ul {
  list-style-type: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.diag-recommendations li {
  font-size: 13.5px;
  color: var(--text-secondary);
  padding-left: 24px;
  position: relative;
  line-height: 1.5;
}

.diag-recommendations li::before {
  content: "✔";
  color: var(--color-emerald);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Action Toggles */
.diag-action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.diag-btn-primary {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-emerald) 50%, var(--color-gold) 100%);
  border: none;
  color: #080a0d;
  font-weight: bold;
  padding: 14px 28px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.25);
  text-shadow: 0 1px 2px rgba(255,255,255,0.1);
}

.diag-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 229, 255, 0.45);
}

.diag-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 14px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 14px;
  transition: all 0.2s ease;
}

.diag-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* --- Resolution Package & MRR Upsell --- */
.diag-resolution-package {
  background: rgba(8, 10, 13, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.diag-resolution-package h4 {
  color: white;
  font-size: 15px;
  margin-bottom: 16px;
  text-shadow: 0 0 10px rgba(255,255,255,0.1);
}

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

@media (min-width: 768px) {
  .package-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.package-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.item-check {
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.3);
  color: var(--color-emerald);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(0, 230, 118, 0.1);
}

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

.item-meta strong {
  color: white;
  font-size: 14px;
}

.item-meta span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.diag-mrr-upsell {
  background: rgba(0, 229, 255, 0.03);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  text-align: left;
}

.diag-mrr-upsell span {
  font-size: 13px;
  color: var(--text-secondary);
  flex-grow: 1;
  max-width: 600px;
  line-height: 1.5;
}

.diag-mrr-upsell strong {
  color: var(--color-cyan);
}

.upsell-inline-btn {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--color-cyan);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.upsell-inline-btn:hover {
  background: var(--color-cyan);
  color: #080a0d;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
  transform: translateY(-1px);
}

/* --- Sandbox Demonstration Notice Banner --- */
.diag-demo-notice {
  background: rgba(255, 61, 0, 0.03);
  border: 1px solid rgba(255, 61, 0, 0.15);
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 16px;
  text-align: left;
}

.diag-demo-notice span {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.diag-demo-notice strong {
  color: var(--color-red);
}

.diag-demo-notice.report-notice {
  background: rgba(0, 229, 255, 0.02);
  border: 1px solid rgba(0, 229, 255, 0.15);
  margin-top: 0;
  margin-bottom: 24px;
}

.diag-demo-notice.report-notice strong {
  color: var(--color-cyan);
}

.sandbox-banner-badge {
  background: rgba(0, 229, 255, 0.08);
  border: 1px dashed rgba(0, 229, 255, 0.35);
  color: var(--color-cyan);
  font-family: 'Outfit', 'Inter', monospace;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.8px;
  text-align: center;
  padding: 8px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: block;
  text-transform: uppercase;
  animation: pulse-border 3s infinite ease-in-out;
}

@keyframes pulse-border {
  0% { border-color: rgba(0, 229, 255, 0.2); box-shadow: 0 0 4px rgba(0, 229, 255, 0.1); }
  50% { border-color: rgba(0, 229, 255, 0.6); box-shadow: 0 0 10px rgba(0, 229, 255, 0.25); }
  100% { border-color: rgba(0, 229, 255, 0.2); box-shadow: 0 0 4px rgba(0, 229, 255, 0.1); }
}

.mock-badge {
  font-size: 10px;
  color: var(--color-cyan);
  background: rgba(0, 229, 255, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 10px;
  font-family: monospace;
  font-weight: bold;
  border: 1px solid rgba(0, 229, 255, 0.2);
}

/* --- HiveGuardian vs DevOpSec Comparison Section --- */
.comparison-section {
  padding: 80px 0;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.comparison-card {
  padding: 40px;
  margin-bottom: 40px;
}

.comparison-table-wrapper {
  overflow-x: auto;
  margin: 30px 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 13, 0.4);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.comparison-table th {
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-primary);
  padding: 16px 20px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.5px;
}

.comparison-table td {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  line-height: 1.5;
  vertical-align: top;
}

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

.comparison-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.comparison-table .feature-name {
  font-weight: 600;
  color: var(--text-primary);
  width: 20%;
  font-family: 'Outfit', sans-serif;
}

.comparison-table .legacy-engine {
  width: 40%;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.comparison-table .guardian-engine {
  width: 40%;
  color: #e0faff;
  background: rgba(0, 229, 255, 0.02);
}

.comparison-table .guardian-engine strong {
  color: var(--color-cyan);
}

/* --- Core Pillars of Superiority --- */
.pillars-container {
  margin-top: 50px;
  text-align: left;
}

.pillars-title {
  font-size: 24px;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  margin-bottom: 30px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.pillar-card {
  padding: 24px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pillar-card:hover {
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 8px 30px rgba(0, 229, 255, 0.08);
  transform: translateY(-2px);
}

.pillar-header {
  font-size: 18px;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.pillar-header span {
  font-size: 20px;
}

.pillar-text-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pillar-mode-block {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13.5px;
  line-height: 1.5;
}

.pillar-mode-block.tech {
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid rgba(255, 255, 255, 0.15);
}

.pillar-mode-block.plain {
  background: rgba(0, 229, 255, 0.03);
  border-left: 2px solid var(--color-cyan);
}

.mode-label {
  font-family: monospace;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
  display: block;
}

.pillar-mode-block.tech .mode-label {
  color: var(--text-secondary);
}

.pillar-mode-block.plain .mode-label {
  color: var(--color-cyan);
}

.pillar-mode-block p {
  margin: 0;
}

/* --- Sprinkler Quotebox Card --- */
.sprinkler-quote-card {
  background: linear-gradient(135deg, rgba(8, 10, 13, 0.85) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-left: 4px solid var(--color-cyan);
  border-radius: 12px;
  padding: 30px 40px;
  text-align: center;
  max-width: 900px;
  margin: 40px auto 0 auto;
  box-shadow: 0 10px 30px rgba(0, 229, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.sprinkler-quote-card::before {
  content: "💡";
  position: absolute;
  top: -10px;
  right: 10px;
  font-size: 80px;
  opacity: 0.04;
  pointer-events: none;
}

.sprinkler-quote-content {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  color: #e0faff;
  margin: 0;
  letter-spacing: 0.2px;
}

.sprinkler-quote-content strong {
  color: var(--color-cyan);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* Rendering performance improvements for large off-screen landing blocks */
.comparison-section,
.pricing-section,
.badge-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}
