/* ==========================================================================
   NodeDesk WebChat - Global Stylesheet (style.css)
   Aesthetics: Cyber-Minimalism + Glassmorphism
   Designed with tokens from DESIGN.md
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design System & Variables
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Colors */
  --bg-color: #080c0e;
  --bg-dim: #050709;
  --surface: #0e1417;
  --surface-dim: #0a0d0f;
  --surface-bright: #242b2e;
  --surface-card: rgba(14, 20, 23, 0.45);
  --surface-chip: rgba(255, 255, 255, 0.05);
  
  --primary: #E85C1A;           /* Burnt Orange */
  --primary-light: #FF8A50;     /* Light Peach Orange */
  --primary-glow: rgba(232, 92, 26, 0.18);
  --secondary: #FF6B35;         /* Deep Orange */
  --secondary-glow: rgba(255, 107, 53, 0.15);
  --accent: #ffba4a;            /* Warm Amber */
  --accent-glow: rgba(255, 186, 74, 0.15);
  
  --text: #dde3e7;
  --text-muted: #859399;
  --text-dim: #5c686d;
  
  --border: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(232, 92, 26, 0.5);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  --error: #ffb4ab;
  --success: #81c784;
  
  /* Spacing */
  --grid-unit: 4px;
  --bento-gap: 16px;
  --container-padding: 24px;
  
  /* Rounded Corners */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. Base Rules & Scrollbars
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-color);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dim);
}
::-webkit-scrollbar-thumb {
  background: var(--surface-bright);
  border-radius: var(--radius-sm);
  border: 2px solid var(--bg-dim);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* Base Typography links */
a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

code, pre {
  font-family: 'JetBrains Mono', monospace;
}

/* --------------------------------------------------------------------------
   3. Visual Effects & Background Glows
   -------------------------------------------------------------------------- */
.ambient-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: var(--radius-full);
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  transition: transform 0.1s ease-out;
}
.glow-primary {
  background: radial-gradient(circle, #E85C1A 0%, transparent 70%);
  top: -100px;
  right: -50px;
}
.glow-secondary {
  background: radial-gradient(circle, #FF6B35 0%, transparent 70%);
  bottom: 10%;
  left: -150px;
  opacity: 0.25;
}
.glow-orange {
  background: radial-gradient(circle, #ffba4a 0%, transparent 70%);
  top: 40%;
  right: -200px;
  opacity: 0.15;
}

/* --------------------------------------------------------------------------
   4. Landing Page Header & Navigation
   -------------------------------------------------------------------------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  background: rgba(8, 12, 14, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #E85C1A 0%, #FF6B35 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 0 14px rgba(232,92,26,0.4);
}
img.logo-icon {
  background: none;
  box-shadow: none;
  object-fit: contain;
}
.logo-text span {
  color: var(--primary);
}

nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}
nav a:hover {
  color: var(--primary);
}
nav a.active {
  color: var(--text);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 4px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* --------------------------------------------------------------------------
   5. Buttons & Inputs
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-normal);
  border: 1px solid transparent;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, #E85C1A 0%, #FF6B35 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(232, 92, 26, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(232, 92, 26, 0.55);
}

.btn-secondary {
  background: var(--surface-bright);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--border-hover);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn-sm {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
}

.input-field {
  width: 100%;
  background-color: var(--surface-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 12px 16px;
  outline: none;
  transition: var(--transition-fast);
}
.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* --------------------------------------------------------------------------
   6. Bento Grid & Showcase Containers
   -------------------------------------------------------------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  position: relative;
  z-index: 1;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--bento-gap);
  margin-top: 40px;
}

.bento-card {
  grid-column: span 12;
  background: var(--surface-card);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-slow);
}
.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 100%);
  pointer-events: none;
}
.bento-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.bento-card.active-glow:hover {
  border-color: rgba(232,92,26,0.5);
  box-shadow: 0 0 28px rgba(232,92,26,0.2);
}

/* Bento Card sizes */
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }

/* --------------------------------------------------------------------------
   7. Hero Section
   -------------------------------------------------------------------------- */
.hero {
  padding-top: 180px;
  padding-bottom: 80px;
  text-align: center;
  position: relative;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(232, 92, 26, 0.1);
  border: 1px solid rgba(232, 92, 26, 0.35);
  color: var(--primary-light);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
  animation: tagPulse 3s ease-in-out infinite;
}
@keyframes tagPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,92,26,0.0); }
  50% { box-shadow: 0 0 14px 2px rgba(232,92,26,0.18); }
}
.hero h1 {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #bcc4c9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero h1 span {
  background: linear-gradient(90deg, #E85C1A 0%, #FF8A50 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}
.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* ───────────────────────────────────────────────────────────
   3D Hero Scene — AI Orb + WebChat Mockup
   ─────────────────────────────────────────────────────────── */
.hero-scene {
  margin: 64px auto 0;
  max-width: 960px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  perspective: 1200px;
}

/* ── AI Orb (left side) ── */
.ai-orb-wrap {
  position: relative;
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-orb {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #FF8A50, #E85C1A 45%, #8B2800);
  box-shadow:
    0 0 0 8px rgba(232,92,26,0.12),
    0 0 40px rgba(232,92,26,0.4),
    0 0 80px rgba(232,92,26,0.2);
  animation: orbFloat 4s ease-in-out infinite, orbPulse 2.8s ease-in-out infinite;
  position: relative;
  z-index: 2;
}
.ai-orb::before {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 60%);
  pointer-events: none;
}
.ai-orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(232,92,26,0.3);
  animation: ringExpand 3.5s ease-out infinite;
}
.ai-orb-ring:nth-child(1) { width: 180px; height: 180px; animation-delay: 0s; }
.ai-orb-ring:nth-child(2) { width: 210px; height: 210px; animation-delay: 0.8s; }
.ai-orb-ring:nth-child(3) { width: 240px; height: 240px; animation-delay: 1.6s; }

/* Brain icon inside orb */
.ai-orb-icon {
  position: absolute;
  z-index: 3;
  font-size: 48px;
  user-select: none;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

/* ── Connection beam between orb and chat ── */
.scene-connector {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.connector-line {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, rgba(232,92,26,0.8), rgba(232,92,26,0.2));
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.connector-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40px;
  width: 40px;
  height: 100%;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  animation: beamFlow 1.8s linear infinite;
}
.connector-dots {
  display: flex;
  gap: 5px;
}
.connector-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  animation: dotBlink 1.4s ease-in-out infinite;
}
.connector-dot:nth-child(2) { animation-delay: 0.2s; }
.connector-dot:nth-child(3) { animation-delay: 0.4s; }

/* ── WebChat Mockup (right side) ── */
.webchat-mockup {
  width: 320px;
  background: rgba(10, 13, 16, 0.85);
  border: 1px solid rgba(232,92,26,0.3);
  border-radius: 20px;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow:
    0 24px 64px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 0 40px rgba(232,92,26,0.12);
  overflow: hidden;
  transform: rotateY(-6deg) rotateX(2deg);
  transition: transform 0.6s ease;
  animation: mockupFloat 5s ease-in-out infinite;
}
.webchat-mockup:hover {
  transform: rotateY(0deg) rotateX(0deg);
}
.wm-header {
  padding: 14px 16px;
  background: rgba(232,92,26,0.08);
  border-bottom: 1px solid rgba(232,92,26,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
}
.wm-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E85C1A, #FF8A50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 11px;
  flex-shrink: 0;
}
.wm-header-info h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.wm-online {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: #81c784;
}
.wm-online-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #81c784;
  box-shadow: 0 0 5px #81c784;
  animation: onlinePulse 2s ease-in-out infinite;
}
.wm-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.wm-msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.45;
  animation: msgAppear 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  overflow: hidden;
}
.wm-msg.bot {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.wm-msg.user {
  background: linear-gradient(135deg, #E85C1A, #FF6B35);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
  font-weight: 500;
}
.wm-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 13px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  border-bottom-left-radius: 3px;
  width: fit-content;
  animation: msgAppear 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  overflow: hidden;
}
.wm-typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing 1.4s infinite ease-in-out both;
}
.wm-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.wm-typing-dot:nth-child(2) { animation-delay: -0.16s; }
.wm-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  gap: 8px;
  align-items: center;
}
.wm-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  outline: none;
}
.wm-send {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #E85C1A, #FF6B35);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.wm-send svg {
  width: 14px;
  height: 14px;
  fill: #fff;
}

/* ── Scene stat badges ── */
.scene-badges {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scene-badges.left {
  left: -20px;
  top: 50%;
  transform: translateY(-80%);
}
.scene-badges.right {
  right: -20px;
  bottom: 20%;
}
.scene-badge {
  background: rgba(10,13,16,0.9);
  border: 1px solid rgba(232,92,26,0.25);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
  backdrop-filter: blur(20px);
  white-space: nowrap;
  animation: badgeBounce 5s ease-in-out infinite;
}
.scene-badge:nth-child(2) { animation-delay: 1.5s; }
.badge-dot-green { width: 7px; height: 7px; border-radius: 50%; background: #81c784; box-shadow: 0 0 6px #81c784; }
.badge-dot-orange { width: 7px; height: 7px; border-radius: 50%; background: #E85C1A; box-shadow: 0 0 6px #E85C1A; }

/* ── Keyframe animations ── */
@keyframes orbFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}
@keyframes orbPulse {
  0%, 100% { box-shadow: 0 0 0 8px rgba(232,92,26,0.12), 0 0 40px rgba(232,92,26,0.4), 0 0 80px rgba(232,92,26,0.2); }
  50% { box-shadow: 0 0 0 16px rgba(232,92,26,0.06), 0 0 60px rgba(232,92,26,0.55), 0 0 100px rgba(232,92,26,0.25); }
}
@keyframes ringExpand {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.5); }
}
@keyframes mockupFloat {
  0%, 100% { transform: rotateY(-6deg) rotateX(2deg) translateY(0); }
  50% { transform: rotateY(-6deg) rotateX(2deg) translateY(-8px); }
}
@keyframes beamFlow {
  0% { left: -40px; }
  100% { left: 100%; }
}
@keyframes dotBlink {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}
@keyframes onlinePulse {
  0%, 100% { opacity: 1; } 50% { opacity: 0.5; }
}
@keyframes msgAppear {
  0% {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: -6px;
    transform: translateY(12px) scale(0.95);
  }
  100% {
    opacity: 1;
    max-height: 200px;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-top: 0;
    transform: translateY(0) scale(1);
  }
}
@keyframes badgeBounce {
  0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); }
}

/* Legacy styles kept for sidebar compatibility — hidden in new scene */
.showcase-center { display: none; }
.showcase-sidebar { display: none; }
.showcase-content { display: none; }
.showcase-sidebar-item { display: none; }

/* Terminal Mock */
.terminal-window {
  width: 100%;
  height: 100%;
  background: #050708;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  overflow: hidden;
}
.terminal-header {
  height: 32px;
  background: #0d1012;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 6px;
}
.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}
.terminal-red { background: #ff5f56; }
.terminal-yellow { background: #ffbd2e; }
.terminal-green { background: #27c93f; }
.terminal-title {
  margin-left: 10px;
  color: var(--text-muted);
  font-size: 11px;
}
.terminal-body {
  flex: 1;
  padding: 16px;
  color: #a5e7ff;
  overflow-y: auto;
  line-height: 1.5;
}
.terminal-line {
  margin-bottom: 6px;
}
.terminal-prompt {
  color: var(--primary);
}
.terminal-comment {
  color: var(--text-dim);
}

/* --------------------------------------------------------------------------
   8. Feature Specifics (Bento Sections)
   -------------------------------------------------------------------------- */
.section-title {
  text-align: center;
  margin-bottom: 60px;
}
.section-title h2 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 16px;
}
.section-title p {
  color: var(--text-muted);
  font-size: 16px;
}

/* Card Specific Aesthetics */
.card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.card-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 12px;
}
.card-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Checklist items */
.card-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card-checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.card-checklist-icon {
  color: var(--primary);
  font-size: 16px;
  flex-shrink: 0;
}

/* Chips wrap */
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.chip {
  background: var(--surface-chip);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  color: var(--text-muted);
}
.chip.active {
  border-color: rgba(232,92,26,0.35);
  color: var(--primary-light);
  background: rgba(232,92,26,0.08);
}

/* Interactive theme block */
.theme-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-dim);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-top: 16px;
}
.theme-dots {
  display: flex;
  gap: 8px;
}
.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 2px solid transparent;
}
.theme-dot.active {
  border-color: var(--text);
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--surface-bright);
  transition: .4s;
  border-radius: 34px;
  border: 1px solid var(--border);
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: rgba(232,92,26,0.2);
  border-color: var(--primary);
}
input:checked + .slider:before {
  transform: translateX(20px);
  background-color: var(--primary);
}

/* Smart Routing Visual Showcase Block */
.routing-visual-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 16px;
  position: relative;
  overflow: hidden;
}
.routing-visual-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: beamFlow 3s ease-in-out infinite;
}
.routing-chat-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-xs);
}
.routing-bubble-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--surface-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
.routing-bubble-text {
  font-size: 12.5px;
  color: var(--text);
  font-style: italic;
}
.routing-action-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 4px 0;
}
.routing-pulse-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 92, 26, 0.4), transparent);
}
.routing-action-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232, 92, 26, 0.12);
  border: 1px solid rgba(232, 92, 26, 0.35);
  color: var(--primary-light);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  box-shadow: 0 0 12px rgba(232, 92, 26, 0.15);
}
.routing-magic-sparkle {
  font-size: 12px;
  animation: tagPulse 2s infinite;
}
.routing-target-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, rgba(14, 20, 23, 0.9) 0%, rgba(24, 32, 38, 0.6) 100%);
  border: 1px solid rgba(129, 199, 132, 0.3);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.routing-target-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.routing-target-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(129, 199, 132, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.routing-target-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.routing-target-info strong {
  font-size: 12.5px;
  color: #fff;
  font-weight: 600;
}
.routing-target-info span {
  font-size: 11px;
  color: var(--text-muted);
}
.routing-target-badge {
  background: rgba(129, 199, 132, 0.12);
  border: 1px solid rgba(129, 199, 132, 0.3);
  color: var(--success);
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   9. Floating WebChat Widget (Live Widget Interface)
   -------------------------------------------------------------------------- */
.webchat-widget-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Badge overlay */
.webchat-trigger {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #E85C1A 0%, #FF6B35 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(232, 92, 26, 0.45);
  transition: var(--transition-slow);
  border: none;
  outline: none;
}
.webchat-trigger:hover {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 12px 40px rgba(232, 92, 26, 0.65);
}
.webchat-trigger svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  transition: transform 0.3s ease;
}
.webchat-trigger.active svg {
  transform: rotate(90deg);
}

/* Chat Popup Window */
.webchat-window {
  width: 380px;
  height: 580px;
  background: #0b0f12;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 20px;
  transform: scale(0.9) translateY(40px);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-slow);
}
.webchat-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Widget Header */
.webchat-header {
  padding: 16px 20px;
  background: rgba(14, 20, 23, 0.9);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.webchat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.webchat-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #E85C1A 0%, #FF6B35 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #fff;
}
.webchat-title-group h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.webchat-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
}
.webchat-indicator {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: var(--radius-full);
  box-shadow: 0 0 6px var(--success);
}

/* Chat Body (Messages) */
.webchat-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

/* Chat Message Bubbles */
.message {
  max-width: 80%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.message-content {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.5;
  word-wrap: break-word;
}
.message-meta {
  font-size: 10px;
  color: var(--text-dim);
}

.message-bot {
  align-self: flex-start;
}
.message-bot .message-content {
  background: var(--surface-bright);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: var(--radius-xs);
}

.message-user {
  align-self: flex-end;
}
.message-user .message-content {
  background: linear-gradient(135deg, #E85C1A 0%, #FF6B35 100%);
  color: #fff;
  font-weight: 500;
  border-bottom-right-radius: var(--radius-xs);
}

/* System Message (KVKK Box, etc.) */
.message-system {
  align-self: center;
  max-width: 95%;
  background: rgba(14, 20, 23, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.system-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}
.checkbox-label input {
  margin-top: 2px;
}

/* Typing indicator */
.typing-indicator {
  display: none;
  align-self: flex-start;
  background: var(--surface-bright);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-xs);
}
.typing-dots {
  display: flex;
  gap: 4px;
}
.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: var(--radius-full);
  animation: typing 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

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

/* Form overlay inputs in chat window */
.chat-form-box {
  width: 100%;
  background: var(--surface-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-form-box h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-light);
}

/* Slot selection calendar styling */
.slots-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 150px;
  overflow-y: auto;
}
.slot-pill {
  background: var(--surface-bright);
  border: 1px solid var(--border);
  padding: 8px;
  text-align: center;
  font-size: 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--transition-fast);
}
.slot-pill:hover, .slot-pill.selected {
  border-color: var(--primary);
  background: rgba(71, 214, 255, 0.1);
  color: var(--primary-light);
}

/* Widget Footer Input */
.webchat-footer {
  padding: 12px 16px;
  background: rgba(14, 20, 23, 0.9);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.webchat-input {
  flex: 1;
  background: var(--surface-dim);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: var(--transition-fast);
}
.webchat-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.webchat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #E85C1A 0%, #FF6B35 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition-fast);
}
.webchat-send-btn:hover {
  transform: scale(1.04);
}
.webchat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   10. Administrative Portal Layout (portal.html & admin.html)
   -------------------------------------------------------------------------- */
.portal-container {
  display: flex;
  height: 100vh;
  max-height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* Sidebar Dashboard Navigation */
.portal-sidebar {
  width: 260px;
  height: 100vh;
  max-height: 100vh;
  background: var(--bg-dim);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  transition: width var(--transition-normal), padding var(--transition-normal);
  position: relative;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.portal-sidebar.collapsed {
  width: 76px;
  padding: 24px 10px;
}
.portal-sidebar-logo {
  padding-left: 12px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.portal-sidebar.collapsed .portal-sidebar-logo {
  padding-left: 0;
  justify-content: center;
}
.portal-sidebar.collapsed .logo-text {
  display: none;
}
.sidebar-toggle-btn {
  background: var(--surface-bright);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.portal-sidebar.collapsed .sidebar-toggle-btn {
  position: absolute;
  top: 12px;
  right: 6px;
  width: 22px;
  height: 22px;
  opacity: 0.8;
}
.portal-sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.portal-menu-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition-fast);
}
.portal-sidebar.collapsed .portal-menu-item a {
  justify-content: center;
  padding: 12px 0;
}
.portal-sidebar.collapsed .portal-menu-item a span {
  display: none;
}
.portal-menu-item a svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}
.portal-menu-item.active a, .portal-menu-item a:hover {
  background: var(--surface-card);
  color: var(--primary);
}
.portal-menu-item.active a {
  border: 1px solid rgba(232, 92, 26, 0.2);
}

.portal-sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.portal-sidebar.collapsed .portal-sidebar-footer {
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}
.portal-user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}
.portal-sidebar.collapsed .portal-user-details {
  display: none;
}
.portal-user-avatar {
  width: 32px;
  height: 32px;
  background: var(--surface-bright);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}
.portal-user-details h4 {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.portal-user-details p {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.portal-logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: var(--radius-xs);
  transition: var(--transition-fast);
}
.portal-logout-btn:hover {
  color: var(--error);
  background: rgba(255, 180, 171, 0.1);
}

.portal-user-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}
.portal-sidebar.collapsed .portal-user-loading span {
  display: none;
}
.spinner-circular-sm {
  width: 26px;
  height: 26px;
  border: 2.5px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
.user-loading-text {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: pulse-opacity 1.5s ease-in-out infinite;
}
@keyframes pulse-opacity {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* Dashboard Body Content */
.portal-main {
  flex: 1;
  height: 100vh;
  max-height: 100vh;
  padding: 32px 40px;
  overflow-y: auto;
  background: var(--bg-color);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Main Workspace Large Center Loader */
.portal-main-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.portal-main-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.main-loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 32px;
}
.main-loader-spinner {
  width: 54px;
  height: 54px;
  border: 4px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--primary);
  border-right-color: rgba(71, 214, 255, 0.45);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
  box-shadow: 0 0 28px rgba(71, 214, 255, 0.2);
}
.main-loader-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.3px;
}
.main-loader-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.5;
}
.portal-content-section {
  display: none;
}
.portal-content-section.active {
  display: block;
}

.portal-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.portal-section-header h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Portal Tables */
.table-container {
  width: 100%;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}
.portal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}
.portal-table th {
  background: rgba(14, 20, 23, 0.8);
  color: var(--text-muted);
  font-weight: 600;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.portal-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.portal-table tr:last-child td {
  border-bottom: none;
}
.portal-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Chips and Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
}
.badge-quote { background: rgba(71, 214, 255, 0.1); color: var(--primary); }
.badge-appointment { background: rgba(255, 186, 74, 0.1); color: var(--accent); }
.badge-contact { background: rgba(192, 193, 255, 0.1); color: var(--secondary); }
.badge-success { background: rgba(129, 199, 132, 0.1); color: var(--success); }
.badge-error { background: rgba(255, 180, 171, 0.1); color: var(--error); }
.badge-warning { background: rgba(255, 186, 74, 0.12); color: var(--accent); }

/* --------------------------------------------------------------------------
   11. Sleek Portal Login Overlay Page
   -------------------------------------------------------------------------- */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s var(--transition-slow), opacity 0.6s var(--transition-slow);
}
.login-overlay.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}
.login-box {
  width: 420px;
  background: var(--surface-card);
  backdrop-filter: blur(40px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
}
.login-header {
  text-align: center;
}
.login-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin-top: 16px;
  margin-bottom: 8px;
}
.login-header p {
  font-size: 13px;
  color: var(--text-muted);
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.login-input-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.demo-credentials {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}
.demo-credentials code {
  color: var(--primary-light);
}

/* --------------------------------------------------------------------------
   12. Knowledge Base Statuses & Settings Inputs
   -------------------------------------------------------------------------- */
.kb-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
}
.status-ready { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-pending { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.status-error { background: var(--error); box-shadow: 0 0 6px var(--error); }

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.settings-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.settings-group label {
  font-size: 13px;
  font-weight: 600;
}
.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}
.color-swatch {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
}
.color-picker-input {
  flex: 1;
}

/* --------------------------------------------------------------------------
   13. Modals and Popup Dialogs
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 7, 9, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open,
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  width: 500px;
  background: #0e1417;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-box.modal-large {
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .modal-box,
.modal-overlay.active .modal-box {
  transform: scale(1);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.modal-header h3 {
  font-size: 20px;
  font-weight: 700;
}
.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}
.modal-close-btn:hover {
  color: var(--text);
}
.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

/* Chat Transcript Bubble inside Modal */
.modal-chat-transcript {
  max-height: 350px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--bg-dim);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.transcript-bubble {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.4;
  max-width: 85%;
}
.transcript-bot {
  background: var(--surface-bright);
  color: var(--text);
  align-self: flex-start;
}
.transcript-user {
  background: linear-gradient(135deg, #E85C1A 0%, #FF6B35 100%);
  color: #fff;
  align-self: flex-end;
  font-weight: 500;
}
.transcript-time {
  font-size: 9px;
  color: var(--text-dim);
  margin-top: 4px;
  display: block;
}

/* --------------------------------------------------------------------------
   14. Footer Layout
   -------------------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--border);
  background: var(--bg-dim);
  padding: 60px 0;
  margin-top: 120px;
}
.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-links {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-links a:hover {
  color: var(--primary-light);
}

/* --------------------------------------------------------------------------
   15. Mobile Responsiveness (Adaptive UI Layouts)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .bento-card {
    grid-column: span 12 !important;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 44px;
  }
  .hero-scene {
    flex-direction: column;
    gap: 24px;
  }
  .scene-badges { display: none; }
  .ai-orb-wrap { width: 140px; height: 140px; }
  .ai-orb { width: 110px; height: 110px; }
  .webchat-mockup { width: 300px; transform: none; }
}

@media (max-width: 768px) {
  header {
    padding: 0 20px;
  }
  nav {
    display: none; /* Mobile menu collapsed for simplicity */
  }
  .hero {
    padding-top: 120px;
  }
  .footer-wrap {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  .webchat-window {
    width: calc(100vw - 32px);
    height: calc(100vh - 120px);
    right: 16px;
    bottom: 80px;
  }
  .portal-container {
    flex-direction: column;
  }
  .portal-sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

/* --------------------------------------------------------------------------
   16. Pricing & Contact Sections Styles
   -------------------------------------------------------------------------- */
.pricing-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.billing-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.toggle-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-fast);
  cursor: pointer;
}
.toggle-text.active {
  color: var(--primary-light);
  font-weight: 600;
}
.discount-badge {
  background: rgba(129, 199, 132, 0.1);
  color: var(--success);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-weight: 600;
  margin-left: 4px;
}

.billing-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.billing-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.billing-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--surface-bright);
  transition: .3s;
  border-radius: 34px;
  border: 1px solid var(--border);
}
.billing-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .3s;
  border-radius: 50%;
}
.billing-switch input:checked + .billing-slider {
  background-color: rgba(232, 92, 26, 0.2);
  border-color: var(--primary);
}
.billing-switch input:checked + .billing-slider:before {
  transform: translateX(20px);
  background-color: var(--primary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.pricing-card {
  background: var(--surface-card);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: var(--transition-slow);
}
.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 100%);
  pointer-events: none;
}
.pricing-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.pricing-card.popular {
  border: 1px solid var(--primary);
  box-shadow: 0 8px 32px rgba(232, 92, 26, 0.1);
}
.pricing-card.popular:hover {
  box-shadow: 0 16px 40px rgba(232, 92, 26, 0.25);
  border-color: var(--primary-light);
}
.popular-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  background: linear-gradient(135deg, #E85C1A 0%, #FF6B35 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-header {
  text-align: center;
  margin-bottom: 24px;
}
.plan-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.plan-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  min-height: 38px;
}
.plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 8px;
}
.price-amount {
  font-size: 44px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  transition: opacity 0.2s ease;
}
.price-currency {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 4px;
}
.price-period {
  font-size: 14px;
  color: var(--text-dim);
  margin-left: 2px;
}
.price-tax {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
  font-weight: 500;
}
.billing-period-text {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 20px;
  text-align: center;
}
.btn-pricing {
  width: 100%;
  margin-top: 8px;
}

.pricing-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0 24px 0;
}
.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.pricing-features li strong {
  color: var(--text);
}
.check-icon {
  color: var(--primary-light);
  font-weight: bold;
  font-size: 14px;
}

/* Contact Section Styles */
.contact-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.contact-card-container {
  max-width: 600px;
  margin: 40px auto 0;
}
.contact-details-card {
  background: var(--surface-card);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  transition: var(--transition-slow);
}
.contact-details-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
.contact-details-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.contact-logo-mark {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #E85C1A 0%, #FF6B35 100%);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(232, 92, 26, 0.3);
}
.contact-details-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.contact-details-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.info-icon-wrapper {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
}
.info-icon-wrapper svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.info-link {
  font-size: 14px;
  color: var(--text-muted);
  transition: var(--transition-fast);
}
.info-link:hover {
  color: var(--primary-light);
}

.footer-bottom-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.footer-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.02em;
}

@media (max-width: 992px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 40px auto 0;
  }
  .contact-card-container {
    max-width: 100%;
  }
}
@media (max-width: 768px) {
  .footer-bottom-info {
    align-items: center;
    margin-top: 10px;
  }
}

/* Tooltip Styles */
.tooltip-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
}
.tooltip-trigger {
  cursor: help;
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}
.tooltip-trigger:hover {
  color: var(--primary-light);
  border-color: var(--primary);
  background: rgba(232, 92, 26, 0.1);
}
.tooltip-content {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 220px;
  background: #0d1214;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  text-align: left;
  font-weight: normal;
}
.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: var(--border) transparent transparent transparent;
}
.tooltip-wrapper:hover .tooltip-content {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Button loading state & spinner */
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed !important;
  pointer-events: none;
}
.btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
  cursor: wait !important;
}
.btn.loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  top: calc(50% - 7px);
  left: calc(50% - 7px);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: btn-spinner-spin 0.6s linear infinite;
}
.btn-primary.loading::after {
  border-color: rgba(0, 0, 0, 0.2);
  border-top-color: #000;
}
@keyframes btn-spinner-spin {
  to { transform: rotate(360deg); }
}

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

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* --------------------------------------------------------------------------
   17. FAQ / SSS Section Styles
   -------------------------------------------------------------------------- */
.faq-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.faq-grid {
  max-width: 800px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.faq-item {
  background: var(--surface-card);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
}
.faq-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.faq-item.active {
  border-color: var(--primary-light);
  box-shadow: 0 12px 32px var(--primary-glow);
}
.faq-question {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  user-select: none;
  color: var(--text);
  transition: color var(--transition-fast);
}
.faq-item:hover .faq-question {
  color: var(--primary-light);
}
.faq-question-icon {
  width: 20px;
  height: 20px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 16px;
}
.faq-question-icon::before,
.faq-question-icon::after {
  content: '';
  position: absolute;
  background-color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
}
.faq-question-icon::before {
  width: 12px;
  height: 2px;
}
.faq-question-icon::after {
  width: 2px;
  height: 12px;
}
.faq-item:hover .faq-question-icon::before,
.faq-item:hover .faq-question-icon::after {
  background-color: var(--primary-light);
}
.faq-item.active .faq-question-icon::before {
  background-color: var(--primary-light);
}
.faq-item.active .faq-question-icon::after {
  transform: rotate(90deg);
  background-color: transparent;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 28px;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.6;
}
.faq-item.active .faq-answer {
  padding-bottom: 24px;
}
.faq-answer p {
  margin-bottom: 0;
}

/* ==========================================================================
   Admin Portal Tenant Detail View Styles
   ========================================================================== */
.breadcrumb-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-muted);
}
.breadcrumb-item {
  color: var(--text-muted);
  transition: var(--transition-fast);
  cursor: pointer;
  font-weight: 500;
}
.breadcrumb-item:hover {
  color: var(--primary-light);
}
.breadcrumb-item.active {
  color: var(--text);
  cursor: default;
  font-weight: 600;
}
.breadcrumb-separator {
  color: var(--text-dim);
}

.detail-view-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: start;
}
.detail-view-grid > * {
  min-width: 0;
}
.detail-card {
  min-width: 0;
}

@media (max-width: 1024px) {
  .detail-view-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.detail-card {
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: border-color var(--transition-fast);
}
.detail-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}
.detail-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-card-title svg {
  width: 18px;
  height: 18px;
  fill: var(--primary-light);
}

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

.detail-action-bar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.chunk-list-wrapper {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-dim);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chunk-item {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition-fast);
}
.chunk-item:hover {
  border-color: var(--border-hover);
  background: var(--surface);
}
.chunk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}
.chunk-type-tag {
  font-weight: 600;
  color: var(--primary-light);
}
.chunk-content {
  white-space: pre-wrap;
  line-height: 1.5;
  color: var(--text);
  max-height: 100px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Pricing Tier Cards & Premium Enhancements */
.pricing-tiers-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.tier-card {
  background: var(--surface-card);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.tier-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
  pointer-events: none;
}

.tier-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* Active Card Styling - Glow & Glassmorphism */
.tier-card.active-tier {
  border: 2px solid var(--primary) !important;
  background: linear-gradient(135deg, rgba(232, 92, 26, 0.08) 0%, rgba(14, 20, 23, 0.65) 100%);
  box-shadow: 0 8px 32px rgba(232, 92, 26, 0.15), inset 0 0 12px rgba(232, 92, 26, 0.05);
  transform: scale(1.02);
  z-index: 2;
}

.tier-card.active-tier:hover {
  border-color: var(--primary-light) !important;
  box-shadow: 0 12px 40px rgba(232, 92, 26, 0.25), inset 0 0 16px rgba(232, 92, 26, 0.1);
  transform: scale(1.02) translateY(-2px);
}

/* Badge styling for popular tier */
.tier-card .popular-badge {
  position: absolute;
  top: 12px;
  right: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(232, 92, 26, 0.3);
}

/* Card content */
.tier-card-header h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.tier-card.active-tier .tier-card-header h4 {
  color: var(--primary-light) !important;
}

.tier-price {
  font-size: 26px;
  font-weight: 800;
  margin: 16px 0;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.tier-price span {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}

/* Features List */
.tier-features {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  font-size: 13.5px;
  line-height: 2.2;
  color: var(--text-muted);
}

.tier-features li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tier-features li::before {
  content: "✓";
  color: var(--success);
  font-weight: bold;
}

.tier-card.active-tier .tier-features li::before {
  color: var(--primary-light);
}

/* Action Buttons for non-active tiers */
.btn-upgrade-highlight {
  width: 100%;
  padding: 10px 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 4px 15px rgba(232, 92, 26, 0.25);
  transition: all var(--transition-normal);
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-upgrade-highlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(232, 92, 26, 0.5);
  filter: brightness(1.15);
}

/* ==========================================================================
   12. Onboarding Wizard Styles
   ========================================================================== */
.onboarding-steps-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  position: relative;
  padding: 0 10px;
}
.onboarding-steps-header::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 30px;
  right: 30px;
  height: 2px;
  background: var(--border);
  z-index: 1;
}
.onboarding-step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 2px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  z-index: 2;
  transition: all var(--transition-normal);
}
.onboarding-step-dot.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 15px rgba(232, 92, 26, 0.4);
}
.onboarding-step-dot.completed {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}
.onboarding-step-pane {
  display: none;
}
.onboarding-step-pane.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.4s ease;
}
.package-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.package-card:hover {
  border-color: var(--primary);
  background: rgba(232, 92, 26, 0.05);
}
.package-card.selected {
  border-color: var(--primary);
  background: rgba(232, 92, 26, 0.1);
  box-shadow: 0 0 15px rgba(232, 92, 26, 0.15);
}
.faq-item-row {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  align-items: center;
  justify-content: space-between;
}
.faq-item-text {
  flex-grow: 1;
  font-size: 13px;
}
.onboarding-info-note {
  background: rgba(232, 92, 26, 0.08);
  border-left: 3px solid var(--primary);
  padding: 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   13. Support & Tickets Redesign & Resizer Styles
   ========================================================================== */
#tab-support.portal-content-section.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 80px);
  max-height: calc(100vh - 80px);
  overflow: hidden;
}

#tab-support .portal-section-header {
  margin-bottom: 16px;
  flex-shrink: 0;
}

.support-workspace {
  flex: 1;
  height: 0;
  min-height: 0;
  display: flex;
  position: relative;
  overflow: hidden;
  user-select: auto;
  gap: 0;
}

/* Resizable Splitter Bar */
.split-resizer {
  width: 14px;
  margin: 0 -2px;
  background: transparent;
  cursor: col-resize;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.split-resizer::after {
  content: "";
  width: 3px;
  height: 36px;
  border-radius: 2px;
  background: var(--border);
  transition: all var(--transition-fast);
}
.split-resizer:hover::after,
.split-resizer.resizing::after {
  background: var(--primary);
  height: 56px;
  box-shadow: 0 0 10px var(--primary);
}
.split-resizer:hover,
.split-resizer.resizing {
  background: rgba(232, 92, 26, 0.08);
}

/* Tickets Master Panel */
.tickets-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  min-width: 280px;
  max-width: 650px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  backdrop-filter: blur(12px);
}

.tickets-filter-bar {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.ticket-search-box {
  position: relative;
  width: 100%;
}
.ticket-search-box input {
  width: 100%;
  padding-left: 32px;
  font-size: 13px;
  height: 34px;
}
.ticket-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  fill: var(--text-muted);
  pointer-events: none;
}

.tickets-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tickets-filter-select {
  font-size: 11.5px;
  height: 30px;
  padding: 4px 8px;
}

.tickets-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 2px 0 2px;
}

.ticket-card-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

/* Kapalı Bilet Kartları (Siyah tonlu, sade & hafif soluk) */
.ticket-card-item.status-closed {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid transparent;
  opacity: 0.72;
}
.ticket-card-item.status-closed .ticket-card-title {
  color: var(--text-muted);
}
.ticket-card-item.status-closed:hover {
  background: rgba(255, 255, 255, 0.03);
  opacity: 0.9;
}
.ticket-card-item.status-closed.active {
  background: rgba(255, 255, 255, 0.07);
  border-left: 3px solid var(--text-dim);
  opacity: 1;
}

/* Açık Bilet Kartları (Temaya uyumlu, açık olduğu hemen belli olan zemin & sol turuncu vurgu) */
.ticket-card-item.status-open {
  background: linear-gradient(135deg, rgba(232, 92, 26, 0.12) 0%, rgba(20, 28, 33, 0.85) 100%);
  border-left: 3px solid var(--primary);
  box-shadow: inset 0 0 0 1px rgba(232, 92, 26, 0.15);
}
.ticket-card-item.status-open .ticket-card-title {
  color: #ffffff;
}
.ticket-card-item.status-open:hover {
  background: linear-gradient(135deg, rgba(232, 92, 26, 0.18) 0%, rgba(26, 36, 42, 0.95) 100%);
  box-shadow: inset 0 0 0 1px rgba(232, 92, 26, 0.28);
}
.ticket-card-item.status-open.active {
  background: linear-gradient(135deg, rgba(232, 92, 26, 0.25) 0%, rgba(32, 42, 48, 0.98) 100%);
  border-left: 4px solid var(--primary-light);
  box-shadow: inset 0 0 14px rgba(232, 92, 26, 0.22), inset 0 0 0 1px rgba(232, 92, 26, 0.35);
}

/* Chat Detail Panel */
.chat-panel {
  flex: 1;
  height: 100%;
  max-height: 100%;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  backdrop-filter: blur(12px);
}

.chat-header-bar {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  flex-shrink: 0;
}

.chat-header-info {
  min-width: 0;
  flex: 1;
}
.chat-header-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-header-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.chat-messages-container {
  flex: 1;
  height: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Chat Messages Alignment & Appearance */
.chat-msg {
  max-width: 76%;
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
  position: relative;
  animation: fadeIn 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Customer message: Left aligned */
.chat-msg-customer {
  align-self: flex-start;
  background: var(--surface-bright);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 2px;
  color: var(--text);
}

/* Admin (we) message: Right aligned */
.chat-msg-admin {
  align-self: flex-end;
  background: linear-gradient(135deg, #E85C1A 0%, #FF6B35 100%);
  border-radius: 14px 14px 2px 14px;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(232, 92, 26, 0.28);
}

/* AI Bot message: Right aligned with distinctive AI/Cyber look */
.chat-msg-ai {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(46, 32, 75, 0.95) 0%, rgba(26, 38, 68, 0.95) 100%);
  border: 1px solid rgba(130, 90, 250, 0.45);
  border-radius: 14px 14px 2px 14px;
  color: #f0f3f6;
  box-shadow: 0 4px 16px rgba(110, 60, 220, 0.25);
}

.chat-msg-meta {
  font-size: 11px;
  opacity: 0.8;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-input-container {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  background: var(--surface);
  align-items: center;
  flex-shrink: 0;
}



/* --------------------------------------------------------------------------
   Paket kartları (portal Paket sekmesi) — portal.js renderOfferCards
   -------------------------------------------------------------------------- */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  align-items: stretch;
}
.offer-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.offer-card:hover { transform: translateY(-3px); border-color: var(--border-hover); }
.offer-card.highlighted {
  border: 2px solid var(--primary);
  box-shadow: 0 12px 32px var(--primary-glow);
}
.offer-card.current { border: 2px solid var(--success); }
.offer-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.offer-icon {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-glow); border-radius: var(--radius-sm); font-size: 18px;
}
.offer-title { font-size: 17px; font-weight: 700; color: var(--text); margin: 0 0 12px 0; }
.offer-tag {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-xs);
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--surface-chip); color: var(--text-muted);
}
.offer-tag-primary { background: var(--primary-glow); color: var(--primary-light); }
.offer-tag-success { background: rgba(129, 199, 132, 0.15); color: var(--success); }
.offer-toggle {
  display: flex; gap: 4px; padding: 3px; margin-bottom: 14px;
  background: var(--surface-dim); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.offer-toggle button {
  flex: 1; padding: 7px 0; border: none; border-radius: 6px; cursor: pointer;
  background: transparent; color: var(--text-muted); font: inherit; font-size: 12px; font-weight: 600;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.offer-toggle button.active { background: var(--surface-bright); color: var(--primary-light); font-weight: 700; }
.offer-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.offer-price-main { font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.offer-price-unit { font-size: 13px; color: var(--text-muted); }
.offer-price-alt { font-size: 12px; color: var(--text-muted); }
.offer-price-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.offer-divider { height: 1px; background: var(--border); margin: 16px 0; }
.offer-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.offer-features li { display: flex; align-items: flex-start; gap: 8px; color: var(--text); line-height: 1.35; }
.offer-features li.excluded { color: var(--text-dim); text-decoration: line-through; }
.offer-check { color: var(--success); font-weight: 700; flex-shrink: 0; }
.offer-features li.excluded .offer-check { color: var(--text-dim); }
.offer-spacer { flex: 1; min-height: 12px; }
.offer-note { font-size: 11px; color: var(--text-muted); line-height: 1.4; margin: 0 0 12px 0; }
.offer-upsell { display: block; font-size: 11.5px; font-weight: 600; color: var(--primary-light); margin-bottom: 12px; text-decoration: underline; }
.offer-cta { width: 100%; }
@media (max-width: 640px) {
  .offer-grid { grid-template-columns: 1fr; }
  .offer-card { padding: 18px; }
}
