/* ==========================================================================
   AETHERLINK / WA GATEWAY — ARKETIPE C: SPATIAL 3D & CYBER-TERMINAL
   Domain-Authentic Design System (maxilun-craft + maxilun-motion)
   Inspirasi: cloudflare.md + warp.md + dji.md
   ========================================================================== */

:root {
  /* Physical Material Ramps: Obsidian Basalt & Server Carbon */
  --canvas: #07090e;
  --sidebar-bg: #0b0f17;
  --surface: #0e131d;
  --surface-hud: #111722;
  --surface-elevated: #161e2c;
  --surface-hover: #1c2637;
  --header-bg: rgba(7, 9, 14, 0.88);
  
  /* Neutral Hairline Borders (Anti-Neon CMP-018) */
  --border: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-focus: #10b981;
  --border-hud: rgba(6, 182, 212, 0.24);
  --border-emerald: rgba(16, 185, 129, 0.24);

  /* High-Contrast Crisp Typography */
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  /* Domain Accents: Emerald Phosphor & Protocol Cobalt */
  --accent: #10b981;
  --accent-muted: rgba(16, 185, 129, 0.12);
  --accent-hover: #059669;
  --accent-glow: rgba(16, 185, 129, 0.25);

  --cyan: #0ea5e9;
  --cyan-muted: rgba(14, 165, 233, 0.12);
  --cyan-glow: rgba(14, 165, 233, 0.25);

  --warning: #f59e0b;
  --warning-muted: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-muted: rgba(239, 68, 68, 0.12);
  --info: #3b82f6;
  --info-muted: rgba(59, 130, 246, 0.12);
  --purple: #8b5cf6;

  /* Buttons & Terminals */
  --btn-primary-bg: #10b981;
  --btn-primary-text: #02060b;
  --btn-primary-hover: #059669;

  /* Layered Natural Shadows (Anti-Neon Blobs CMP-019) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.7), 0 4px 8px -2px rgba(0, 0, 0, 0.5);

  /* Exact Concentric Radii */
  --radius-outer: 12px;
  --radius-inner: 8px;
  --radius-tag: 5px;

  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sidebar-width: 260px;
}

[data-theme="light"] {
  --canvas: #f4f6fa;
  --sidebar-bg: #ffffff;
  --surface: #ffffff;
  --surface-hud: #ffffff;
  --surface-elevated: #eef2f7;
  --surface-hover: #e2e8f0;
  --header-bg: rgba(244, 246, 250, 0.94);

  --border: #dbe2ea;
  --border-hud: #cbd5e1;
  --border-emerald: rgba(5, 150, 105, 0.35);
  --border-subtle: #cbd5e1;
  --border-strong: #94a3b8;
  --border-focus: #059669;

  --text: #090d16;
  --text-muted: #475569;
  --text-subtle: #64748b;

  --cyan: #0284c7;
  --cyan-muted: rgba(2, 132, 199, 0.1);
  --cyan-glow: rgba(2, 132, 199, 0.2);

  --accent: #059669;
  --accent-muted: rgba(5, 150, 105, 0.12);
  --accent-hover: #047857;
  --accent-glow: rgba(5, 150, 105, 0.22);

  --warning: #d97706;
  --warning-muted: rgba(217, 119, 6, 0.12);
  --danger: #dc2626;
  --danger-muted: rgba(220, 38, 38, 0.12);
  --info: #2563eb;
  --info-muted: rgba(37, 99, 235, 0.12);
  --purple: #7c3aed;

  --btn-primary-bg: #059669;
  --btn-primary-text: #ffffff;
  --btn-primary-hover: #047857;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--canvas);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

input, button, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.tabular {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   0. CINEMATIC LANDING & SPATIAL OBSERVATORY STYLES
   Domain-Authentic Design System (maxilun-craft + maxilun-motion)
   ========================================================================== */

.landing-container {
  min-height: 100vh;
  background-color: var(--canvas);
  color: var(--text);
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

/* Ambient Atmospheric Aurora Backdrop */
.cinematic-backdrop-aurora {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1200px;
  background: 
    radial-gradient(circle at 50% -15%, rgba(6, 182, 212, 0.18) 0%, transparent 60%),
    radial-gradient(circle at 18% 30%, rgba(16, 185, 129, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 82% 45%, rgba(59, 130, 246, 0.10) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  opacity: 0.85;
}

/* Mathematical Tactical Grid Lines */
.cinematic-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at 50% 20%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, black 40%, transparent 85%);
  pointer-events: none;
  z-index: 0;
}

/* Frosted Glass Sticky Header */
.landing-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.landing-nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo-svg {
  width: 34px;
  height: 34px;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.4));
  transition: transform 0.2s ease;
}

.landing-brand:hover .brand-logo-svg {
  transform: scale(1.05) rotate(4deg);
}

.landing-brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.1;
}

.landing-brand-sub {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--cyan);
  letter-spacing: 0.02em;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.landing-nav-link {
  font-size: 0.84rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease, text-shadow 0.15s ease;
  position: relative;
  padding: 0.25rem 0;
}

.landing-nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  transition: width 0.2s ease;
}

.landing-nav-link:hover {
  color: var(--text);
}

.landing-nav-link:hover::after {
  width: 100%;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ASYMMETRIC SPLIT HERO (55/45) - THE LIVING ENGINE */
.landing-hero-split {
  max-width: 1240px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 3.5rem;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-left-editorial {
  text-align: start;
}

/* Pure Editorial Eyebrow (No pill, no bullet, no neon border) */
.hero-eyebrow-pure {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 1.25rem;
  display: inline-block;
}

/* Solid Display Headline (Zero rainbow gradient text) */
.hero-title-solid {
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 1.25rem;
  text-wrap: balance;
}

.hero-desc-pure {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 58ch;
  line-height: 1.65;
  margin-bottom: 2.25rem;
  text-wrap: pretty;
}

.hero-action-cluster {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

/* Exact One Primary Solid Action */
.btn-action-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.85rem;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-inner);
  background: var(--accent);
  color: #03080e;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px var(--accent-glow);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

.btn-action-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

/* One-Click Terminal Install Snippet */
.hero-cli-block {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.95rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
}

.cli-prompt {
  color: var(--text-muted);
  user-select: none;
}

.btn-copy-cli {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.btn-copy-cli:hover {
  color: var(--accent);
}

.btn-copy-cli .icon {
  width: 14px;
  height: 14px;
}

/* Operational Status Rail (Anti-Strip 4 KPI LAY-012) */
.hero-operational-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.rail-item {
  text-align: start;
}

.rail-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.rail-item:nth-child(1) .rail-val { color: var(--accent); }
.rail-item:nth-child(2) .rail-val { color: var(--cyan); }
.rail-item:nth-child(3) .rail-val { color: var(--text); }
.rail-item:nth-child(4) .rail-val { color: #a78bfa; }

.rail-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* THE LIVING ENGINE: COCKPIT TERMINAL */
.hero-right-cockpit {
  position: relative;
  width: 100%;
}

.cockpit-window {
  background: #080c14;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-outer);
  box-shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.8), var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cockpit-titlebar {
  height: 42px;
  background: #0c121e;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.cockpit-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot-red, .dot-yellow, .dot-green {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.cockpit-socket-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
}

.status-beacon {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: beaconPulse 1.8s infinite ease-in-out;
}

@keyframes beaconPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.cockpit-actions {
  display: flex;
  gap: 0.35rem;
}

.btn-cockpit-action {
  padding: 2px 7px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cockpit-action:hover {
  color: var(--text);
  border-color: var(--accent);
}

.cockpit-tabs {
  display: flex;
  background: #090e17;
  border-bottom: 1px solid var(--border);
}

.cockpit-tab-btn {
  padding: 0.55rem 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cockpit-tab-btn:hover {
  color: var(--text);
}

.cockpit-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(16, 185, 129, 0.05);
}

.cockpit-viewport {
  height: 330px;
  background: #05080f;
  overflow-y: auto;
}

.cockpit-terminal {
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cockpit-log-line {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.c-time {
  color: var(--text-subtle);
  font-size: 0.7rem;
  user-select: none;
  flex-shrink: 0;
}

.c-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}

.tag-accent { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.tag-cyan { background: rgba(14, 165, 233, 0.15); color: #0ea5e9; }
.tag-warn { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.tag-info { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }

.c-msg {
  color: #cbd5e1;
  word-break: break-all;
}

.cockpit-json-pre {
  padding: 1rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: #e2e8f0;
  background: transparent;
  overflow-x: auto;
}

.cockpit-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 1.15rem;
}

.c-stat-box {
  background: #090e17;
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  padding: 0.85rem;
}

.c-stat-k {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.c-stat-v {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}

.cockpit-footbar {
  height: 32px;
  background: #0c121e;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #94a3b8;
}

/* DOMAIN MESH OVERLAY */
.domain-grid-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 900px;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, black 60%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* CINEMATIC SPOTLIGHT CARD PRIMITIVE (REFINED HAIRLINE) */
.cinematic-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-outer);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cinematic-card:hover {
  border-color: var(--border-strong);
}
/* FLOW PIPELINE VISUALIZER (CANVAS) */
.flow-pipeline-section {
  max-width: 1200px;
  margin: 5rem auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

.flow-pipeline-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.flow-canvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 0.75rem;
}

.flow-canvas-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.05em;
}

.signal-flow-canvas {
  width: 100%;
  height: 260px;
  display: block;
  cursor: crosshair;
}

.pipeline-spec-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pipeline-spec-box {
  text-align: center;
  padding: 0.5rem;
}

.pipeline-spec-val {
  font-size: 0.92rem;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 0.2rem;
}

.pipeline-spec-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* SECTION COMMON HEADINGS */
.section-head-center {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3rem;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.65rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.85rem;
  line-height: 1.2;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* SIMULATOR WORKBENCH */
.simulator-section {
  max-width: 1200px;
  margin: 5rem auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

.simulator-workbench {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.75rem;
  padding: 1.85rem;
}

.sim-endpoint-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.95rem;
  background: #04060a;
  border: 1px solid var(--border-hud);
  border-radius: var(--radius-inner);
  margin-bottom: 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.sim-method {
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
}

.sim-path {
  color: var(--text-muted);
}

.sim-status-tag {
  margin-left: auto;
  color: var(--accent);
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.pulse-status {
  animation: tagPulse 1s infinite alternate;
}

@keyframes tagPulse {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

.sim-scenarios-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.35rem;
  flex-wrap: wrap;
}

.sim-scenario-chip {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-tag);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--canvas);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.sim-scenario-chip:hover {
  border-color: var(--cyan);
  color: var(--text);
}

.sim-scenario-chip.active {
  background: var(--cyan-muted);
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
}

.sim-form-group {
  margin-bottom: 1.25rem;
}

.sim-form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.sim-input {
  width: 100%;
  padding: 0.75rem 0.95rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  color: var(--text);
  font-size: 0.88rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.sim-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
  background: var(--surface);
}

.sim-action-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.35rem;
  flex-wrap: wrap;
}

.sim-latency-pill {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.sim-latency-pill strong {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.92rem;
}

/* REALISTIC WHATSAPP PHONE MOCKUP */
.sim-phone-frame {
  background: #0b141a;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 32px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 48px -4px rgba(0, 0, 0, 0.85), 0 0 20px rgba(16, 185, 129, 0.1);
  min-height: 420px;
  position: relative;
  overflow: hidden;
}

/* Ambient WhatsApp Chat Pattern */
.sim-phone-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.sim-phone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 2;
}

.wa-avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  color: #000;
  font-weight: 800;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wa-shield-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(16, 185, 129, 0.14);
  padding: 2px 7px;
  border-radius: 4px;
}

.sim-wa-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 0;
  z-index: 2;
}

.sim-date-badge {
  align-self: center;
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.07);
  padding: 3px 10px;
  border-radius: 6px;
  color: #8696a0;
  font-weight: 600;
}

.sim-wa-bubble {
  align-self: flex-end;
  max-width: 88%;
  background: #005c4b;
  color: #e9edef;
  border-radius: 10px 10px 2px 10px;
  padding: 0.85rem 1rem;
  font-size: 0.86rem;
  line-height: 1.48;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  position: relative;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.bubble-pop {
  transform: scale(1.02);
}

.sim-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-size: 0.68rem;
  color: rgba(233, 237, 239, 0.6);
  margin-top: 5px;
}

.sim-ticks {
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: -0.1em;
}

.sim-ticks.ticks-read { color: #53bdeb; }
.sim-ticks.ticks-delivered { color: rgba(233, 237, 239, 0.65); }
.sim-ticks.ticks-sent { color: rgba(233, 237, 239, 0.4); }

.sim-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
}

.sim-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8696a0;
  animation: typingBounce 1.3s infinite ease-in-out;
}

.sim-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.sim-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* PROTOCOL ARCHITECTURE GRID */
.arch-grid-section {
  max-width: 1200px;
  margin: 5rem auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

.arch-spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.35rem;
}

.arch-spec-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  border-top: 2px solid var(--border-hud);
}

.arch-spec-card:nth-child(1) { border-top-color: #10b981; }
.arch-spec-card:nth-child(2) { border-top-color: #f59e0b; }
.arch-spec-card:nth-child(3) { border-top-color: #06b6d4; }
.arch-spec-card:nth-child(4) { border-top-color: #8b5cf6; }

.arch-spec-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.7);
}

.arch-spec-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-inner);
  background: var(--surface-elevated);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}

.arch-spec-num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.05em;
}

.arch-spec-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

.arch-spec-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.arch-spec-metrics {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 600;
}

/* INTEGRATION PLAYGROUND */
.integration-section {
  max-width: 1100px;
  margin: 5rem auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

.integration-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-hud);
  margin-bottom: 0.85rem;
  overflow-x: auto;
}

.int-tab-btn {
  padding: 0.65rem 1.15rem;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: var(--font-mono);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.int-tab-btn:hover {
  color: var(--text);
}

.int-tab-btn.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.code-display-pre {
  background: #030509;
  padding: 1.4rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.65;
  color: #e2e8f0;
  min-height: 180px;
}

.code-copy-btn {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-tag);
  color: #f8fafc;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  z-index: 5;
}

.code-copy-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}
.code-copy-btn.copied {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

/* SPECS & BENCHMARKS */
.specs-section {
  max-width: 1100px;
  margin: 5rem auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

.benchmark-table-wrapper {
  padding: 1.25rem;
  margin-bottom: 2.5rem;
  overflow-x: auto;
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.benchmark-table th, .benchmark-table td {
  padding: 0.95rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.benchmark-table th {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.benchmark-table .col-highlight {
  background: rgba(16, 185, 129, 0.06);
  border-left: 1px solid rgba(16, 185, 129, 0.2);
  border-right: 1px solid rgba(16, 185, 129, 0.2);
}

.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }

/* FAQ ACCORDIONS */
.faq-accordion-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-accordion-item {
  background: var(--surface-hud);
  border: 1px solid var(--border-hud);
  border-radius: var(--radius-inner);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.18s ease;
}

.faq-accordion-item:hover {
  border-color: rgba(6, 182, 212, 0.4);
}

.faq-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 1.35rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.faq-icon {
  width: 18px;
  height: 18px;
  color: var(--cyan);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-accordion-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-body {
  display: none;
  padding: 0 1.35rem 1.25rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.65;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 0.85rem;
}

.faq-accordion-item.active .faq-body {
  display: block;
}

/* HORIZON CALL TO ACTION */
.horizon-cta-section {
  max-width: 1100px;
  margin: 6rem auto 4rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

.horizon-cta-card {
  padding: 3.5rem 2rem;
  text-align: center;
  position: relative;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: radial-gradient(ellipse at 50% 120%, rgba(16, 185, 129, 0.22) 0%, rgba(6, 182, 212, 0.08) 40%, #030509 90%);
  box-shadow: 0 0 50px rgba(16, 185, 129, 0.15), var(--shadow-lg);
}

.horizon-glow-line {
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #10b981 50%, transparent 100%);
  box-shadow: 0 0 16px #10b981;
}

.horizon-cta-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.2;
}

.horizon-cta-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 2.25rem;
  line-height: 1.6;
}

.horizon-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* LANDING FOOTER */
.landing-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  margin-top: 4rem;
  background: var(--surface-elevated);
  position: relative;
  z-index: 2;
}

.landing-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* SCROLL BLUR REVEAL MOTION PRIMITIVE */
.cinematic-reveal {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.cinematic-reveal.is-revealed {
  opacity: 1;
  filter: none;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .cinematic-reveal {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }
  .pulse-emerald, .pulse-cyan {
    animation: none;
  }
}
/* ==========================================================================
   1. LOGIN & SETUP ADMIN CARD VIEW
   ========================================================================== */

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 20%, rgba(6, 182, 212, 0.1) 0%, transparent 60%),
              var(--canvas);
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface-hud);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-hud);
  border-radius: var(--radius-outer);
  padding: 2.25rem;
  box-shadow: 0 0 32px -4px rgba(6, 182, 212, 0.2), var(--shadow-lg);
}

.login-brand-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-brand-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
}

.login-brand-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.auth-error-alert {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-inner);
  background: var(--danger-muted);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--danger);
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.btn-login-submit {
  width: 100%;
  padding: 0.75rem;
  margin-top: 0.5rem;
}

/* ==========================================================================
   2. APP SHELL / CYBER-TERMINAL CONSOLE (ARKETIPE C)
   ========================================================================== */

.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--canvas);
}

/* CYBER SIDEBAR */
.app-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-cluster-title {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-version-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: var(--accent-muted);
  padding: 2px 6px;
  border-radius: var(--radius-tag);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent);
  font-weight: 600;
}

.user-profile-chip {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  padding: 0.65rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-name-display {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
}

.user-role-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-tag);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
}

.user-role-badge.role-admin {
  background: var(--accent-muted);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.user-role-badge.role-user {
  background: var(--info-muted);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* SESSION SELECTOR IN SIDEBAR */
.session-picker-box {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  padding: 0.55rem 0.75rem;
}

.session-picker-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.sidebar-select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-tag);
  padding: 0.45rem 0.55rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
}

.sidebar-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-muted);
}

/* NAVIGATION LINKS */
.sidebar-nav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-group-header {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  color: var(--text-subtle);
  padding: 0.65rem 0.75rem 0.35rem;
  text-transform: uppercase;
}

.nav-action-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-inner);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
  width: 100%;
  text-align: left;
}

.nav-action-link:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-subtle);
}

.nav-action-link.active {
  background: var(--surface-elevated);
  color: var(--accent);
  border-color: var(--border);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-link-content {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-chip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: var(--surface-hover);
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--text-muted);
}

.nav-action-link.active .nav-chip {
  background: var(--accent-muted);
  color: var(--accent);
  font-weight: 700;
}

.sidebar-footer {
  padding: 0.85rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--sidebar-bg);
}

/* STAGE / CYBER TOPBAR */
.app-stage {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--canvas);
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar-breadcrumb-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.stage-page-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.stage-subheading {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  margin-top: 2px;
}

.topbar-socket-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stage-content-body {
  flex: 1;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* GATEWAY OPERATIONAL TELEMETRY DECK (Anti-Strip LAY-012) */
.gateway-telemetry-deck {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-outer);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.5rem;
}

.telemetry-deck-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.telemetry-pill-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.telemetry-cluster {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.telemetry-lead-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-inner);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.telemetry-lead-icon.icon-emerald {
  background: var(--accent-muted);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.telemetry-lead-icon.icon-accent {
  background: rgba(14, 165, 233, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.telemetry-lead-icon.icon-warn {
  background: var(--warning-muted);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.telemetry-lead-icon.icon-cyan {
  background: var(--info-muted);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.telemetry-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.telemetry-label {
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.telemetry-val-row {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.telemetry-val-row .stat-value {
  margin-top: 0;
}

.telemetry-unit {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

.telemetry-divider {
  width: 1px;
  background: var(--border-subtle);
}

.telemetry-engine-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.engine-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* Legacy Metric Strip Compatibility */
.metric-grid-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.metric-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.metric-panel:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.metric-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text);
  line-height: 1.1;
}

.stat-value.val-accent { color: var(--accent); }
.stat-value.val-warn { color: var(--warning); }
.stat-value.val-cyan { color: var(--cyan); }

/* PANELS & CARDS */
.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-outer);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

.grid-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* TACTICAL DEVICE PODS (SESSIONS GRID) */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.account-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-outer);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.account-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.account-card-header {
  padding: 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-elevated);
}

.account-card-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.account-card-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-inner);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.account-card-avatar.connected {
  background: var(--accent-muted);
  color: var(--accent);
  border-color: rgba(16, 185, 129, 0.35);
}

.account-card-avatar.waiting {
  background: var(--warning-muted);
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.35);
}

.account-card-name-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.account-card-name {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text);
}

.account-id-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  background: var(--cyan-muted);
  padding: 2px 6px;
  border-radius: var(--radius-tag);
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.account-card-body {
  padding: 1.15rem;
  flex: 1;
}

.account-card-phone-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.account-specs {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.spec-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.spec-line:last-child {
  border-bottom: none;
}

.spec-val {
  font-weight: 600;
  color: var(--text);
}

.account-card-actions {
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-elevated);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--radius-inner);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
  font-family: inherit;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-danger-ghost {
  background: transparent;
  color: var(--danger);
}

.btn-danger-ghost:hover {
  background: var(--danger-muted);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
}

.btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-inner);
}

.icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

/* STATUS PILLS & DIODES */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dot-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

.status-connected {
  background: var(--accent-muted);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-scan-qr, .status-pairing {
  background: var(--warning-muted);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-error {
  background: var(--danger-muted);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-neutral {
  background: var(--surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* FORMS */
.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-input, select.form-input, textarea.form-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form-input:focus, select.form-input:focus, textarea.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
  background: var(--surface);
}

.form-input::placeholder {
  color: var(--text-subtle);
}

.form-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrap .input-icon {
  position: absolute;
  left: 0.85rem;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.form-input.has-icon {
  padding-left: 2.35rem;
}

input[type="checkbox"], input[type="radio"] {
  accent-color: var(--accent);
  cursor: pointer;
}

/* DATA TABLES */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.data-table th {
  background: var(--surface-elevated);
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
}

.data-table tr:hover td {
  background: var(--surface-hover);
}

/* CODE CONSOLE */
.code-console {
  background: #04070e;
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #38bdf8;
  overflow-x: auto;
  max-height: 280px;
}

/* MODALS */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal-window {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-outer);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalScaleIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-head {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
}

.modal-body {
  padding: 1.25rem;
  max-height: calc(85vh - 120px);
  overflow-y: auto;
  color: var(--text);
}

.modal-foot {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  background: var(--surface-elevated);
}

/* TOASTS */
.toast-tray {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast-unit {
  pointer-events: auto;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: var(--shadow-lg);
  min-width: 260px;
  max-width: 420px;
  font-size: 0.82rem;
  color: var(--text);
  animation: toastSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-unit.toast-success { border-left: 3px solid var(--accent); }
.toast-unit.toast-error { border-left: 3px solid var(--danger); }
.toast-unit.toast-warning { border-left: 3px solid var(--warning); }
.toast-unit.toast-info { border-left: 3px solid var(--cyan); }

.toast-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
}

/* EMPTY STATES */
.empty-state-card {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-outer);
  background: var(--surface);
}

.empty-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--accent);
  border: 1px solid var(--border);
}

.empty-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.empty-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 1.25rem;
}

/* Hardened Terminal & Simulator Contrast Protections */
.sim-phone-frame {
  background: #0b141a;
  color: #e9edef;
}
.cockpit-window, .cockpit-viewport, .cockpit-terminal {
  background: #080c14;
  color: #f8fafc;
}
.cockpit-window .c-stat-k { color: #94a3b8; }
.cockpit-window .c-stat-v { color: #f8fafc; }
.cockpit-window .cockpit-socket-badge { color: #cbd5e1; }
.cockpit-window .cockpit-status-bar { color: #94a3b8; background: #0c121e; }
.int-code-box, .code-display-pre {
  background: #030509;
  color: #e2e8f0;
}
.btn-copy-code {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-copy-code:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.wa-avatar-circle {
  color: #ffffff;
}

/* RESPONSIVENESS & VIEWPORT ADAPTATIONS */
@media (max-width: 1024px) {
  .landing-hero-split { grid-template-columns: 1fr; gap: 3rem; padding: 3.5rem 1.5rem 2.5rem; }
  .hero-title-solid { font-size: 2.85rem; }
  .hero-operational-rail { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .telemetry-pill-group { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .telemetry-divider { display: none; }
  .metric-grid-strip { grid-template-columns: repeat(2, 1fr); }
  .grid-duo { grid-template-columns: 1fr; }
  .arch-spec-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline-spec-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 260px; }
  .landing-nav-links { display: none; }
  .hero-title-solid { font-size: 2.25rem; }
  .hero-desc-pure { font-size: 0.98rem; }
  .hero-operational-rail { grid-template-columns: 1fr 1fr; }
  .cockpit-viewport { height: 280px; }
  .cockpit-stats-grid { grid-template-columns: 1fr; }
  .simulator-workbench { grid-template-columns: 1fr; }
  .arch-spec-grid { grid-template-columns: 1fr; }
  .pipeline-spec-row { grid-template-columns: 1fr; }
  .signal-flow-canvas { height: 220px; }
  .horizon-cta-card { padding: 2.5rem 1.25rem; }
  .horizon-cta-title { font-size: 1.75rem; }
  .landing-footer-inner { flex-direction: column; text-align: center; gap: 1rem; }
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.mobile-open { transform: translateX(0); }
  .app-stage { margin-left: 0; }
  .telemetry-pill-group { grid-template-columns: 1fr; }
  .metric-grid-strip { grid-template-columns: 1fr; }
  .stage-content-body { padding: 1.25rem 1rem; }
  .sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 85;
    display: none;
  }
  .sidebar-backdrop.active { display: block; }
}

@media (max-width: 480px) {
  .hero-title-solid { font-size: 1.85rem; }
  .hero-action-cluster { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .btn-action-primary { width: 100%; justify-content: center; }
  .hero-cli-block { width: 100%; justify-content: space-between; }
  .hero-operational-rail { grid-template-columns: 1fr; }
}


/* ==========================================================================
   MAXILUN CRAFT ENGINE: Complete Light Mode Invariant Overrides
   ========================================================================== */

[data-theme="light"] .horizon-cta-card {
  background: radial-gradient(ellipse at 50% 120%, rgba(16, 185, 129, 0.12) 0%, rgba(2, 132, 199, 0.05) 40%, #ffffff 90%);
  border: 1px solid rgba(5, 150, 105, 0.28);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .horizon-cta-title {
  color: #090d16;
}

[data-theme="light"] .horizon-cta-desc {
  color: #475569;
}

[data-theme="light"] .pipeline-spec-row {
  border-top: 1px solid #e2e8f0;
}

[data-theme="light"] .pipeline-spec-label {
  color: #64748b;
}

[data-theme="light"] .sim-endpoint-bar {
  background: #f8fafc;
  border-color: #cbd5e1;
}

[data-theme="light"] .sim-endpoint-bar .sim-path {
  color: #0f172a;
}

/* WhatsApp Simulator Native Light Theme */
[data-theme="light"] .sim-phone-frame {
  background: #efeae2;
  border: 2px solid #cbd5e1;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .sim-phone-header {
  background: #f0f2f5;
  border-bottom: 1px solid #d1d7db;
}

[data-theme="light"] .sim-phone-header div[style*="color: #fff"] {
  color: #111b21 !important;
}

[data-theme="light"] .wa-bubble-incoming {
  background: #ffffff !important;
  color: #111b21 !important;
  box-shadow: 0 1px 1px rgba(11, 20, 26, 0.08);
}

[data-theme="light"] .wa-bubble-outgoing {
  background: #d9fdd3 !important;
  color: #111b21 !important;
  box-shadow: 0 1px 1px rgba(11, 20, 26, 0.08);
}

[data-theme="light"] .wa-bubble-time {
  color: #667781 !important;
}

[data-theme="light"] .wa-system-pill {
  background: rgba(255, 255, 255, 0.85) !important;
  color: #54656f !important;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}

/* FAQ Accordion Contrast */
[data-theme="light"] .faq-accordion-item {
  background: #ffffff;
  border-color: #dbe2ea;
}

[data-theme="light"] .faq-accordion-item:hover {
  border-color: #059669;
}

[data-theme="light"] .faq-title {
  color: #090d16;
}

[data-theme="light"] .faq-body {
  color: #334155;
  border-top: 1px solid #f1f5f9;
}

/* Developer SDK Tab Buttons */
[data-theme="light"] .int-tab-btn {
  color: #475569;
}

[data-theme="light"] .int-tab-btn.active {
  color: #059669;
  border-color: #059669;
}

/* Engine Comparison Table */
[data-theme="light"] .compare-col-highlight {
  background: rgba(5, 150, 105, 0.05);
  border-color: rgba(5, 150, 105, 0.3);
}

[data-theme="light"] .compare-val-win {
  color: #047857;
  font-weight: 700;
}

[data-theme="light"] .compare-val-lose {
  color: #dc2626;
}

/* Toast Tray Clearance */
.toast-tray {
  bottom: 4rem;
  right: 1.5rem;
}

/* WhatsApp Simulator Exact Selectors */
[data-theme="light"] .sim-wa-bubble {
  background: #d9fdd3 !important;
  color: #111b21 !important;
  box-shadow: 0 1px 2px rgba(11, 20, 26, 0.15);
}
[data-theme="light"] .sim-wa-bubble p {
  color: #111b21 !important;
}
[data-theme="light"] .sim-date-badge {
  background: rgba(255, 255, 255, 0.92) !important;
  color: #54656f !important;
  box-shadow: 0 1px 2px rgba(11, 20, 26, 0.1);
}
[data-theme="light"] .sim-phone-header div[style*="color: #fff"],
[data-theme="light"] .sim-phone-header div[style*="color:#fff"] {
  color: #111b21 !important;
}
[data-theme="light"] .sim-time {
  color: #667781 !important;
}
[data-theme="light"] .wa-shield-badge {
  background: rgba(5, 150, 105, 0.1) !important;
  color: #059669 !important;
}
