/* ============================================================
   Agent-MVP Design System
   Dark celestial theme with glass morphism and fluid animations.
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --bg-deep: #06060f;
  --bg-card: rgba(15, 15, 40, 0.65);
  --bg-card-hover: rgba(20, 20, 55, 0.8);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(34, 211, 238, 0.3);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-cyan: #22d3ee;
  --accent-purple: #a78bfa;
  --accent-gold: #fbbf24;
  --accent-green: #34d399;
  --accent-rose: #fb7185;
  --gradient-hero: linear-gradient(135deg, #22d3ee 0%, #a78bfa 50%, #fbbf24 100%);
  --glass-blur: 16px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Canvas Background --- */
#starCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(6, 6, 15, 0.75);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s;
}
.navbar.scrolled { background: rgba(6, 6, 15, 0.92); }
.nav-left { display: flex; align-items: center; gap: 0.5rem; }
.nav-logo {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none; color: var(--text-primary);
  font-weight: 700; font-size: 1.1rem;
}
.logo-icon {
  font-size: 1.4rem;
  animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { text-shadow: 0 0 8px var(--accent-cyan); }
  50% { text-shadow: 0 0 20px var(--accent-cyan), 0 0 40px var(--accent-purple); }
}
.logo-text { letter-spacing: -0.02em; }
.nav-center { display: flex; gap: 2rem; }
.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--accent-cyan);
  transform: scaleX(0);
  transition: transform 0.3s;
  border-radius: 1px;
}
.nav-link:hover::after { transform: scaleX(1); }
.nav-right { display: flex; align-items: center; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-block { width: 100%; justify-content: center; }
.btn-primary {
  background: var(--gradient-hero);
  color: #0a0a1a;
  box-shadow: 0 4px 24px rgba(34, 211, 238, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.45);
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.btn-primary:hover::after { transform: translateX(100%); }
.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-accent);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.25);
}
.btn-arrow { transition: transform 0.3s; }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* --- Sections --- */
section {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* --- Gradient Text --- */
.gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Hero --- */
.section-hero {
  display: flex;
  align-items: center;
  gap: 4rem;
  min-height: 100vh;
  padding-top: 8rem;
  padding-bottom: 6rem;
}
.hero-content { flex: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}
.badge-dot {
  width: 6px; height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}
.hero-stats {
  display: flex;
  gap: 2rem;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat span:last-child {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Hero Visual (Orbs + Chat Preview) --- */
.hero-visual {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: orbFloat 8s ease-in-out infinite;
}
.hero-orb {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.3), transparent);
  top: 10%; right: 20%;
}
.hero-orb-2 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.3), transparent);
  bottom: 20%; left: 10%;
  animation-delay: -3s;
}
.hero-orb-3 {
  width: 150px; height: 150px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.25), transparent);
  top: 50%; left: 30%;
  animation-delay: -6s;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.1); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero-chat-preview {
  position: relative;
  z-index: 2;
  width: 420px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(34, 211, 238, 0.1);
  animation: previewFloat 5s ease-in-out infinite;
}
@keyframes previewFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.chat-preview-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-subtle);
}
.chat-dots { display: flex; gap: 5px; }
.chat-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.chat-dots span:nth-child(1) { background: var(--accent-rose); }
.chat-dots span:nth-child(2) { background: var(--accent-gold); }
.chat-dots span:nth-child(3) { background: var(--accent-green); }
.chat-preview-title { font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }
.chat-preview-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.chat-preview-msg {
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  line-height: 1.5;
  animation: msgIn 0.4s ease-out;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.user-msg {
  background: rgba(34, 211, 238, 0.15);
  align-self: flex-end;
  max-width: 80%;
  border: 1px solid rgba(34, 211, 238, 0.15);
}
.agent-msg {
  background: rgba(255, 255, 255, 0.05);
  align-self: flex-start;
  max-width: 90%;
  border: 1px solid var(--border-subtle);
}
.agent-msg-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-purple);
}
.agent-msg-icon { font-size: 0.7rem; }
.msg-cursor {
  display: inline;
  animation: blink 1s step-end infinite;
  color: var(--accent-cyan);
}
@keyframes blink {
  50% { opacity: 0; }
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(30px);
}
.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.1);
}
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Pricing Cards --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.pricing-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  opacity: 0;
  transform: translateY(30px);
}
.pricing-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.pricing-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(34, 211, 238, 0.1);
}
.pricing-card-featured {
  border-color: var(--border-accent);
  background: rgba(34, 211, 238, 0.05);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.08);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.3rem 1rem;
  background: var(--accent-purple);
  color: white;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.pricing-badge-featured {
  background: var(--accent-cyan);
  color: #0a0a1a;
}
.pricing-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  margin-top: 0.25rem;
}
.pricing-price {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.pricing-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}
.pricing-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.pricing-features {
  list-style: none;
  margin-bottom: 1.5rem;
}
.pricing-features li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}
.pricing-features li:last-child { border-bottom: none; }

/* --- Chat Demo --- */
.chat-demo {
  display: flex;
  height: 550px;
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.chat-demo-sidebar {
  width: 260px;
  background: rgba(0, 0, 0, 0.3);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 1rem;
}
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.5rem 0 1rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.75rem;
}
.sidebar-logo { font-size: 1.1rem; }
.sidebar-sessions { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.session-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: background 0.2s;
}
.session-item:hover { background: rgba(255, 255, 255, 0.05); }
.session-item.active {
  background: rgba(34, 211, 238, 0.1);
  color: var(--text-primary);
}
.session-icon { font-size: 0.9rem; }
.sidebar-footer { padding-top: 0.75rem; border-top: 1px solid var(--border-subtle); }
.chat-demo-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.chat-demo-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.chat-msg { display: flex; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg .msg-bubble {
  max-width: 75%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.55;
}
.chat-msg.user .msg-bubble {
  background: rgba(34, 211, 238, 0.15);
  border: 1px solid rgba(34, 211, 238, 0.15);
}
.chat-msg.agent .msg-bubble {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
}
.msg-tool-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.tool-chip {
  padding: 0.2rem 0.5rem;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}
.msg-content strong { color: var(--text-primary); }
.msg-content code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.msg-content pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-card);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  overflow-x: auto;
}
.msg-content pre code {
  background: none;
  padding: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.msg-content em { font-style: italic; color: var(--text-primary); }
.msg-content del { text-decoration: line-through; opacity: 0.6; }
.msg-content u { text-decoration: underline; }
.msg-content a {
  color: var(--accent-cyan);
  text-decoration: underline;
}
.msg-content a:hover { color: #fff; }
.msg-content .spoiler {
  background: rgba(255, 255, 255, 0.12);
  color: transparent;
  border-radius: 3px;
  padding: 0 0.3rem;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.msg-content .spoiler:hover,
.msg-content .spoiler.revealed {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}
.review-pass { color: var(--accent-green); }
.review-warn { color: var(--accent-gold); }
.chat-demo-input {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
}
.chat-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  transition: border-color 0.3s;
}
.chat-input-wrapper:focus-within {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}
.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
}
.chat-input::placeholder { color: var(--text-muted); }
.btn-send {
  background: var(--accent-cyan);
  border: none;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #0a0a1a;
  transition: all 0.3s;
}
.btn-send:hover {
  background: #38dff5;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.4);
}
.chat-input-hints {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.hint-chip {
  padding: 0.15rem 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}
.hint-chip.active { color: var(--accent-green); }
.hint-add {
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 0.75rem;
}
.hint-add:hover { text-decoration: underline; }

/* --- Setup Steps --- */
.setup-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 3rem;
}
.setup-step {
  text-align: center;
  max-width: 220px;
  opacity: 0;
  transform: translateY(30px);
}
.setup-step.visible {
  opacity: 1;
  transform: translateY(0);
}
.step-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.step-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.setup-step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.setup-step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.setup-connector {
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.connector-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--border-card), var(--border-accent), var(--border-card));
  position: relative;
}
.connector-line::after {
  content: '';
  position: absolute;
  right: -3px; top: -2px;
  width: 6px; height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* --- Setup Preview Card --- */
.setup-preview {
  max-width: 600px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(30px);
}
.setup-preview.visible {
  opacity: 1;
  transform: translateY(0);
}
.setup-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.setup-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  position: relative;
}
.setup-progress::before {
  content: '';
  position: absolute;
  top: 14px; left: 30px; right: 30px;
  height: 2px;
  background: var(--border-subtle);
  z-index: 0;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}
.progress-step span {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: all 0.3s;
}
.progress-step.done span {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #0a0a1a;
}
.progress-step.active span {
  background: rgba(34, 211, 238, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.3);
  animation: progressPulse 2s infinite;
}
@keyframes progressPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(34, 211, 238, 0.3); }
  50% { box-shadow: 0 0 20px rgba(34, 211, 238, 0.5); }
}
.setup-connect-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.connect-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-primary);
  text-align: left;
}
.connect-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-accent);
}
.connect-card.connected {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.05);
}
.connect-icon { font-size: 1.3rem; }
.connect-name { flex: 1; font-weight: 500; }
.connect-status {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.connect-status.connected { color: var(--accent-green); }

/* --- CTA --- */
.section-cta {
  text-align: center;
  padding: 5rem 2rem;
}
.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.cta-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 2rem 1.5rem;
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 3rem;
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  max-width: 280px;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.25rem 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Loader Overlay --- */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.loader-overlay.active { display: flex; }
.loader-ring {
  width: 60px; height: 60px;
  position: relative;
}
.loader-orbit {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: orbitSpin 1s linear infinite;
}
.loader-orbit::after {
  content: '';
  position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan);
}
@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}
.loader-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  animation: loaderPulse 1.5s ease-in-out infinite;
}
@keyframes loaderPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* --- Scroll Animations --- */
[data-animate] {
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Mobile Nav --- */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 1rem; right: 1rem;
  z-index: 101;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}
.mobile-nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all 0.3s;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .section-hero { flex-direction: column; text-align: center; padding-top: 6rem; }
  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-visual { min-height: auto; }
  .hero-chat-preview { width: 100%; max-width: 420px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .chat-demo { flex-direction: column; height: auto; }
  .chat-demo-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-subtle); }
  .setup-steps { flex-direction: column; gap: 1rem; }
  .setup-connector { width: 40px; transform: rotate(90deg); }
  .footer-content { grid-template-columns: 1fr; }
  .nav-center { display: none; }
  .navbar { padding: 0 1rem; }
  .mobile-nav-toggle { display: flex; }
}
@media (max-width: 640px) {
  section { padding: 3rem 1rem; }
  .hero-title { font-size: 2rem; }
  .section-header h2 { font-size: 1.8rem; }
  .features-grid { grid-template-columns: 1fr; }
  .setup-connect-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; gap: 1rem; }
  .auth-modal { margin: 1rem; padding: 2rem 1.5rem; }
}

/* ============================================================
   AUTH MODAL
   ============================================================ */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.auth-modal-overlay.active {
  display: flex;
  opacity: 1;
}
.auth-modal {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  animation: modalIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(34, 211, 238, 0.05);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.auth-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}
.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-logo {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
  animation: logoPulse 3s ease-in-out infinite;
}
.auth-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.auth-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.auth-form {
  display: none;
  flex-direction: column;
  gap: 1rem;
}
.auth-form.active {
  display: flex;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.auth-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.auth-field input {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all 0.3s;
  outline: none;
}
.auth-field input:focus {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.08);
  background: rgba(255, 255, 255, 0.06);
}
.auth-field input::placeholder {
  color: var(--text-muted);
}
.auth-pass-wrap {
  position: relative;
  display: flex;
}
.auth-pass-wrap input {
  flex: 1;
  padding-right: 3rem;
}
.pass-toggle {
  position: absolute;
  right: 4px; top: 4px; bottom: 4px;
  width: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
  filter: grayscale(0.3);
}
.pass-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  filter: grayscale(0);
}
.auth-switch {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}
.auth-switch a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 500;
}
.auth-switch a:hover {
  text-decoration: underline;
}
.auth-error {
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-size: 0.8rem;
  color: var(--accent-rose);
  display: none;
}
.auth-error.active {
  display: block;
  animation: shake 0.5s;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

/* Logout Button */
.btn-logout {
  background: rgba(251, 113, 133, 0.1);
  color: var(--accent-rose);
  border: 1px solid rgba(251, 113, 133, 0.2);
  font-size: 0.8rem;
}
.btn-logout:hover {
  background: rgba(251, 113, 133, 0.2);
  border-color: rgba(251, 113, 133, 0.4);
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: var(--bg-deep);
  display: none; flex-direction: column;
}
.dashboard-overlay.active { display: flex; }
.dashboard-container {
  display: flex; flex: 1; min-height: 0;
  max-width: 1400px; margin: 0 auto; width: 100%;
}
.dash-sidebar {
  width: 220px; min-width: 220px; background: rgba(10,10,25,0.6);
  border-right: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; padding: 1.25rem;
  transition: width 0.3s, min-width 0.3s, opacity 0.3s, padding 0.3s;
}
.dash-sidebar.hidden {
  width: 0; min-width: 0; padding: 0; opacity: 0; overflow: hidden;
  border-right: none;
}
.dash-logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 700; font-size: 1rem; margin-bottom: 1.5rem;
  cursor: pointer; color: var(--text-primary);
}
.dash-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.dash-nav-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.75rem; border-radius: var(--radius-sm);
  color: var(--text-secondary); text-decoration: none;
  font-size: 0.85rem; font-weight: 500; transition: all 0.2s;
}
.dash-nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.dash-nav-item.active { background: rgba(34,211,238,0.1); color: var(--accent-cyan); }
.dash-user {
  display: flex; align-items: center; gap: 0.5rem;
  padding-top: 1rem; border-top: 1px solid var(--border-subtle);
}
.dash-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gradient-hero); display: flex;
  align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: #0a0a1a;
}
.dash-user-info { flex:1; display: flex; flex-direction: column; gap: 2px; }
.dash-user-info strong { font-size: 0.8rem; }
.dash-tier-badge {
  font-size: 0.65rem; font-weight: 600; padding: 1px 6px;
  border-radius: 8px; background: rgba(34,211,238,0.15); color: var(--accent-cyan);
  display: inline-block; width: fit-content;
}
.dash-logout {
  background: none; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: 4px 8px;
  cursor: pointer; font-size: 0.9rem; transition: all 0.2s;
}
.dash-logout:hover { background: rgba(251,113,133,0.1); border-color: rgba(251,113,133,0.3); }

.dash-main { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 1.5rem 2rem; min-height: 0; }
.dash-view { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.dash-view h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.15rem; }
.dash-subtitle { color: var(--text-secondary); font-size: 0.8rem; margin-bottom: 1rem; }

/* Chat View */
.chat-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.chat-status { font-size: 0.8rem; color: var(--accent-rose); }
.chat-status.online { color: var(--accent-green); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem 0; min-height: 400px; display: flex; flex-direction: column; gap: 0.75rem; }
.chat-empty { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.chat-empty-icon { font-size: 3rem; display: block; margin-bottom: 1rem; animation: logoPulse 3s ease-in-out infinite; }
.chat-input-area { border-top: 1px solid var(--border-subtle); padding-top: 1rem; }
.chat-toolchips { display: flex; gap: 0.4rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.chat-input-row { display: flex; gap: 0.5rem; align-items: center; }
.chat-input-row input {
  flex: 1; padding: 0.7rem 1rem; background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-card); border-radius: var(--radius-md);
  color: var(--text-primary); font-family: var(--font-sans); font-size: 0.9rem; outline: none;
}
.chat-input-row input:focus { border-color: var(--border-accent); }

/* ============================================================
   WIZARD (Setup Slideshow)
   ============================================================ */
.wizard-progress {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: 1.5rem; padding: 0 1rem;
}
.wiz-step {
  display: flex; align-items: center; gap: 0.35rem;
  opacity: 0.4; transition: opacity 0.3s;
}
.wiz-step.active, .wiz-step.done { opacity: 1; }
.wiz-step.done .wiz-num {
  background: var(--accent-green); border-color: var(--accent-green); color: #0a0a1a;
}
.wiz-step.active .wiz-num {
  background: var(--accent-cyan); border-color: var(--accent-cyan); color: #0a0a1a; box-shadow: 0 0 12px rgba(34,211,238,0.4);
}
.wiz-num {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border-card); display: flex;
  align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: var(--text-secondary);
  transition: all 0.3s;
}
.wiz-label { font-size: 0.75rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.wiz-conn { flex: 1; min-width: 1.5rem; max-width: 3rem; padding: 0 3px; }
.wiz-line {
  height: 2px; background: var(--border-subtle); border-radius: 1px;
  transition: background 0.4s;
}
.wiz-step.done + .wiz-conn .wiz-line { background: var(--accent-green); }

/* Slides */
.wizard-slides { position: relative; min-height: 180px; overflow-y: auto; overflow-x: hidden; }
.wiz-slide {
  display: none;
  animation: wizFadeIn 0.3s ease;
}
.wiz-slide.active { display: block; }
@keyframes wizFadeIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}
.wiz-slide-inner {
  max-width: 520px; margin: 0 auto; text-align: center;
}
.wiz-icon { font-size: 2.5rem; margin-bottom: 0.4rem; }
.wiz-slide-inner h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.25rem; }
.wiz-desc { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 1rem; }

/* Big input */
.wiz-input-lg {
  width: 100%; padding: 0.65rem 0.85rem;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-card);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-size: 1rem; font-family: var(--font-sans); outline: none; text-align: center;
  transition: border-color 0.2s;
}
.wiz-input-lg:focus { border-color: var(--accent-cyan); box-shadow: 0 0 16px rgba(34,211,238,0.1); }
.wiz-textarea {
  width: 100%; padding: 0.6rem 0.85rem;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-card);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-size: 0.85rem; font-family: var(--font-sans); outline: none; resize: vertical;
  transition: border-color 0.2s;
}
.wiz-textarea:focus { border-color: var(--accent-cyan); box-shadow: 0 0 16px rgba(34,211,238,0.1); }
.wiz-hint {
  display: flex; gap: 0.4rem; align-items: flex-start;
  background: rgba(34,211,238,0.06); border: 1px solid rgba(34,211,238,0.12);
  border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; margin-top: 1rem;
  font-size: 0.75rem; color: var(--text-secondary); text-align: left;
}

/* Tone Cards */
.tone-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.tone-card {
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.55rem 0.6rem; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  cursor: pointer; transition: all 0.2s; position: relative;
}
.tone-card:hover { border-color: var(--border-card); background: rgba(255,255,255,0.04); }
.tone-card:has(input:checked) {
  border-color: var(--accent-cyan); background: rgba(34,211,238,0.08);
  box-shadow: 0 0 20px rgba(34,211,238,0.1);
}
.tone-card input { position: absolute; opacity: 0; pointer-events: none; }
.tone-icon { font-size: 1.15rem; }
.tone-name { font-size: 0.8rem; font-weight: 700; color: var(--text-primary); }
.tone-desc { font-size: 0.68rem; color: var(--text-muted); }

/* Tool Cards (Slide 3) */
.tools-grid-setup { display: flex; flex-direction: column; gap: 0.45rem; }
.tool-setup-card {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.75rem; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  text-align: left;
}
.tool-setup-card .tool-icon { font-size: 1.2rem; margin: 0; flex-shrink: 0; }
.tool-info { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.tool-info .tool-name { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); }
.tool-info .tool-hint { font-size: 0.68rem; color: var(--text-muted); }
.tool-setup-card input {
  width: 140px; padding: 0.35rem 0.5rem; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-card); border-radius: 4px;
  color: var(--text-primary); font-size: 0.7rem; outline: none; flex-shrink: 0;
}
.tool-setup-card input:focus { border-color: var(--accent-cyan); }

/* Review Summary */
.wiz-summary {
  background: var(--bg-card); border: 1px solid var(--border-card);
  border-radius: var(--radius-lg); overflow: hidden; text-align: left;
}
.sum-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.6rem 1rem; border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}
.sum-row:last-child { border-bottom: none; }
.sum-row span:first-child { color: var(--text-muted); font-weight: 500; }
.sum-row span:last-child { color: var(--text-primary); font-weight: 600; text-align: right; }

/* Wizard Navigation */
.wizard-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border-subtle);
}
.wiz-dots { display: flex; gap: 0.4rem; justify-content: center; }
.wiz-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--border-card);
  transition: all 0.3s;
}
.wiz-dot.active { background: var(--accent-cyan); box-shadow: 0 0 6px rgba(34,211,238,0.5); }
.wiz-dot.done { background: var(--accent-green); }

@media (max-width: 768px) {
  .wiz-label { display: none; }
  .wiz-conn { min-width: 1rem; max-width: 2rem; }
  .wiz-num { width: 26px; height: 26px; font-size: 0.68rem; }
  .tone-options { grid-template-columns: 1fr; }
  .tool-setup-card { flex-wrap: wrap; }
  .tool-setup-card input { width: 100%; }
  .wiz-slide-inner { padding: 0 0.5rem; }
  .wizard-nav { flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
}

/* Agent Config Update (existing agent) */
.config-form { max-width: 600px; }
.config-form .form-group { margin-bottom: 1rem; }
.config-form .form-group label { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.4rem; display: block; }
.config-form select {
  width: 100%; padding: 0.6rem 0.8rem; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-card); border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 0.85rem; outline: none;
}
.config-form select:focus { border-color: var(--accent-cyan); }
.config-form textarea {
  width: 100%; padding: 0.6rem 0.8rem; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-card); border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 0.85rem; outline: none; resize: vertical; font-family: var(--font-sans);
}
.config-form textarea:focus { border-color: var(--accent-cyan); }
.config-form .tools-grid-setup { max-width: 100%; }

/* Usage */
.usage-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-bottom: 1.5rem; }
.usage-card {
  background: var(--bg-card); border: 1px solid var(--border-card);
  border-radius: var(--radius-md); padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.usage-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.usage-value { font-size: 1.5rem; font-weight: 700; }
.usage-bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.usage-fill { height: 100%; background: var(--accent-cyan); border-radius: 2px; transition: width 0.5s; }

/* Tools List */
.tools-list { display: flex; flex-direction: column; gap: 0.5rem; }
.tool-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 1rem; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); font-size: 0.9rem;
}
.tool-badge {
  font-size: 0.7rem; padding: 2px 8px; border-radius: 10px; font-weight: 600;
}
.tool-badge.off { background: rgba(255,255,255,0.05); color: var(--text-muted); }
.tool-badge.on { background: rgba(52,211,153,0.15); color: var(--accent-green); }

/* Chat History List */
.history-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: 55vh; overflow-y: auto; }
.history-empty, .history-loading { color: var(--text-muted); text-align: center; padding: 2rem; font-size: 0.9rem; }
.history-card {
  padding: 0.75rem 1rem; background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s;
}
.history-card:hover { background: rgba(255,255,255,0.05); border-color: var(--border-accent); }
.history-card.active { border-color: var(--accent-cyan); background: rgba(34,211,238,0.06); }
.history-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.3rem; }
.history-title { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.history-date { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }
.history-preview { font-size: 0.78rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.3rem; }
.history-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.7rem; color: var(--text-muted); }
.history-delete { background: none; border: none; cursor: pointer; font-size: 0.9rem; opacity: 0.4; transition: opacity 0.2s; padding: 2px; }
.history-delete:hover { opacity: 1; }

/* Agent Ready Success Animation */
.ready-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: radial-gradient(ellipse at center, rgba(16,30,20,0.97) 0%, rgba(6,6,15,0.98) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.4s;
}
.ready-overlay.active { opacity: 1; pointer-events: all; }
.ready-check {
  width: 100px; height: 100px; border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #10b981);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 60px rgba(34,197,94,0.4), 0 0 120px rgba(16,185,129,0.2);
  animation: readyPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes readyPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.ready-check svg { width: 48px; height: 48px; stroke: #fff; stroke-width: 3; animation: checkDraw 0.4s 0.3s ease both; }
@keyframes checkDraw {
  from { stroke-dashoffset: 50; }
  to { stroke-dashoffset: 0; }
}
.ready-text {
  margin-top: 1.5rem; font-size: 1.5rem; font-weight: 700;
  color: #22c55e; animation: readyFadeUp 0.5s 0.5s ease both;
  text-shadow: 0 0 30px rgba(34,197,94,0.5);
}
.ready-sub {
  margin-top: 0.4rem; font-size: 0.9rem; color: var(--text-secondary);
  animation: readyFadeUp 0.5s 0.65s ease both;
}
@keyframes readyFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Pricing button states (subscription-aware) */
.pricing-card .btn-sub-current {
  background: rgba(52,211,153,0.12); color: var(--accent-green);
  border: 1px solid rgba(52,211,153,0.25); cursor: default; pointer-events: none;
  opacity: 0.85;
}
.pricing-card .btn-sub-current:hover { background: rgba(52,211,153,0.12); transform: none; box-shadow: none; }
.pricing-card .btn-sub-disabled {
  background: rgba(255,255,255,0.03); color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.05); cursor: default; pointer-events: none;
  opacity: 0.55;
}
.pricing-card .btn-sub-disabled:hover { background: rgba(255,255,255,0.03); transform: none; box-shadow: none; }
.pricing-card .btn-sub-upgrade {
  background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(34,211,238,0.1));
  color: var(--accent-gold); border: 1px solid rgba(251,191,36,0.3);
}
.pricing-card .btn-sub-upgrade:hover { background: linear-gradient(135deg, rgba(251,191,36,0.25), rgba(34,211,238,0.15)); }

@media (max-width: 768px) {
  .dashboard-container { flex-direction: column; }
  .dash-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-subtle); flex-direction: row; flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem; }
  .dash-nav { flex-direction: row; }
  .dash-main { padding: 1rem; }
  .form-row { grid-template-columns: 1fr; }
  .tools-grid-setup { grid-template-columns: 1fr; }
  .usage-stats { grid-template-columns: 1fr; }
}
