/* Modern CSS Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* AiPRL Brand Colors */
  --primary-blue: #4A90E2;
  --orange-accent: #FF8C42;
  --coral-accent: #FF6B4A;
  --light-blue: #87CEEB;
  --charcoal: #1A1A1A;
  --pure-white: #FFFFFF;
  
  /* Legacy support */
  --primary: #4A90E2;
  --primary-light: #87CEEB;
  --primary-dark: #1e52a8;
  --secondary: #f5f8fa;
  --text: #1A1A1A;
  --text-light: #666;
  --success: #34d399;
  --warning: #fbbf24;
  --error: #ef4444;
  --radius-sm: 5px;
  --radius-md: 10px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

html {
  /* Prevent zoom on iOS */
  -webkit-text-size-adjust: 100%;
  /* Ensure viewport units work correctly */
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0a0a0a;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  max-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  /* Prevent body from causing scroll */
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 🌞 LIGHT MODE BODY - Clean white background for logo visibility */
body.light-mode {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: var(--charcoal);
}

/* Login Container - FITS VIEWPORT PERFECTLY - NO SCROLL */
.login-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(95vw, 520px);
  height: min(95vh, 800px);
  max-height: 95vh;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: clamp(16px, 4vw, 24px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* 🌞 LIGHT MODE LOGIN - Perfect for logo visibility */
.login-container.light-mode,
body.light-mode .login-container {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(74, 144, 226, 0.2);
  box-shadow: 0 25px 50px rgba(74, 144, 226, 0.15);
  color: var(--charcoal);
}

.container {
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-areas: 
    "header header"
    "chat sidebar";
  height: 100vh;
  background: transparent;
  position: relative;
  overflow: hidden;
}

/* Waves Canvas - Bottom Foundation Layer */
#waves-canvas {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: -10 !important;
  background: transparent !important;
  pointer-events: none !important;
}

/* 🌞 LIGHT MODE HEADER */
body.light-mode .header {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 15px rgba(74, 144, 226, 0.1);
  border-bottom: 1px solid rgba(74, 144, 226, 0.2);
  color: var(--charcoal);
}

.header {
  grid-area: header;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: rgba(10, 10, 10, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 2px 15px rgba(64, 255, 170, 0.1);
  z-index: 10;
  border-bottom: 1px solid rgba(64, 255, 170, 0.2);
  position: relative;
}

.chat-container {
  grid-area: chat;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: rgba(10, 10, 10, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  position: relative;
  z-index: 2;
  border-right: 1px solid rgba(64, 255, 170, 0.1);
}

.sidebar {
  grid-area: sidebar;
  background: rgba(10, 10, 10, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 1px solid rgba(64, 255, 170, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 5;
  overflow-y: auto;
  padding: 20px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.input-container {
  padding: 20px;
  background: rgba(10, 10, 10, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-top: 1px solid rgba(64, 255, 170, 0.2);
  z-index: 3;
  position: relative;
}

.message {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(64, 255, 170, 0.1);
  color: #ffffff !important;
}

.message.ai {
  background: rgba(64, 255, 170, 0.05);
  border: 1px solid rgba(64, 255, 170, 0.2);
  color: #ffffff !important;
}

.app-container {
  max-width: 100vw;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* Business Setup Container */
.business-setup-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
  min-height: 700px;
}

.setup-header {
  padding: 40px 50px 30px 50px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.setup-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #1A1A1A;
  margin: 20px 0 10px 0;
  background: linear-gradient(135deg, #4A90E2, #FF8C42);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.setup-subtitle {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 0;
  line-height: 1.4;
}

.setup-form {
  padding: 40px 50px 50px 50px;
}

.form-section {
  margin-bottom: 40px;
}

.input-group {
  margin-bottom: 30px;
}

.input-group label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: #1A1A1A;
  margin-bottom: 8px;
}

.input-group input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  color: #1A1A1A;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.input-group input:focus {
  outline: none;
  border-color: #4A90E2;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.input-group input::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

.input-hint {
  font-size: 0.85rem;
  color: #666;
  margin-top: 6px;
  line-height: 1.3;
}

.additional-website-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.additional-website-item input {
  flex: 1;
  margin-bottom: 0;
}

.remove-website-btn {
  width: 40px;
  height: 40px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #ef4444;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.remove-website-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.5);
  transform: scale(1.05);
}

.add-website-btn {
  background: rgba(74, 144, 226, 0.1);
  border: 1px dashed rgba(74, 144, 226, 0.4);
  border-radius: 10px;
  color: #4A90E2;
  padding: 12px 20px;
  font-size: 0.95rem;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  margin-top: 10px;
  font-weight: 500;
}

.add-website-btn:hover {
  background: rgba(74, 144, 226, 0.2);
  border-color: rgba(74, 144, 226, 0.6);
  color: #1e52a8;
}

.setup-actions {
  text-align: center;
  margin-top: 40px;
}

.continue-btn {
  background: linear-gradient(135deg, #4A90E2, #87CEEB);
  border: none;
  border-radius: 16px;
  color: white;
  padding: 18px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
  position: relative;
  overflow: hidden;
}

.continue-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.continue-btn.ready:hover::before {
  left: 100%;
}

.continue-btn:disabled {
  background: #ccc;
  color: #666;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.6;
}

.continue-btn.ready:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(74, 144, 226, 0.4);
}

.setup-note {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 20px;
  line-height: 1.4;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .business-setup-container {
    max-width: 95%;
    margin: 20px auto;
    min-height: auto;
  }
  
  .setup-header {
    padding: 30px 25px 20px 25px;
  }
  
  .setup-title {
    font-size: 1.8rem;
  }
  
  .setup-subtitle {
    font-size: 1rem;
  }
  
  .setup-form {
    padding: 30px 25px 40px 25px;
  }
  
  .input-group input {
    padding: 14px 16px;
  }
  
  .continue-btn {
    padding: 16px 30px;
    font-size: 1rem;
  }
}

/* Intelligence Dashboard Styles */
.intelligence-dashboard {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 30px;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

.intelligence-progress {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.progress-indicator {
    text-align: center;
}

.progress-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: conic-gradient(#4CAF50 var(--progress, 0%), #e0e0e0 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.progress-status {
    font-size: 1.1rem;
    color: #555;
}

.intelligence-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.intelligence-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-left: 4px solid #e0e0e0;
    transition: all 0.3s ease;
}

.intelligence-card:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.intelligence-card.completed {
    border-left-color: #4CAF50;
}

.intelligence-card.loading {
    border-left-color: #FF9800;
}

.intelligence-card.error {
    border-left-color: #f44336;
}

.intelligence-card.pending {
    border-left-color: #9E9E9E;
}

.card-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.card-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #333;
    flex: 1;
}

.card-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
}

.card-status.completed {
    background: #E8F5E8;
    color: #2E7D32;
}

.card-status.loading {
    background: #FFF3E0;
    color: #F57C00;
}

.card-status.error {
    background: #FFEBEE;
    color: #C62828;
}

.card-status.pending {
    background: #F5F5F5;
    color: #757575;
}

.card-content {
    color: #555;
    line-height: 1.6;
}

.card-summary {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.card-sources {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}



.market-item, .competitor-item, .place-item, .review-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.market-item strong, .competitor-item strong, .place-item strong, .review-item strong {
    display: block;
    color: #333;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.market-item p, .competitor-item p, .place-item p, .review-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.competitors-found, .places-found, .reviews-analyzed {
    background: #e3f2fd;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #1976d2;
    font-weight: 500;
}

.website-analyzed, .analysis-timestamp {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.no-data-placeholder {
    text-align: center;
    padding: 30px 20px;
    color: #888;
}

.status-indicator {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.status-indicator.completed {
    color: #4CAF50;
}

.status-indicator.loading {
    color: #FF9800;
}

.status-indicator.error {
    color: #f44336;
}

.status-indicator.pending {
    color: #9E9E9E;
}

.dashboard-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.refresh-data-btn, .proceed-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-data-btn {
    background: #f0f0f0;
    color: #333;
}

.refresh-data-btn:hover:not(:disabled) {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.refresh-data-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.proceed-btn {
    background: linear-gradient(135deg, #4A90E2 0%, #667eea 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.proceed-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.5);
    background: linear-gradient(135deg, #5ba0f2 0%, #7680fa 100%);
}

/* CIA-Level Intelligence Styling */
.cia-competitor-brief, .cia-sentiment-report {
    font-family: 'Courier New', monospace;
    background: #0a0a0a;
    color: #00ff00;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
}

.classification, .sources-analyzed, .targets-identified {
    background: #ff0000;
    color: white;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-right: 10px;
}

.threat-assessment, .sentiment-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.target-profile, .intel-sample {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 4px;
}

.target-profile.priority-high, .intel-sample.threat {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.target-profile.priority-medium, .intel-sample.neutral {
    border-color: #ffaa00;
    background: rgba(255, 170, 0, 0.1);
}

.target-profile.priority-low, .intel-sample.asset {
    border-color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
}

.target-header, .sample-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.target-id, .sample-id, .threat-level, .sample-classification {
    font-size: 0.8rem;
    font-weight: bold;
    padding: 2px 4px;
    background: #333;
    border-radius: 2px;
}

.sentiment-metrics {
    display: flex;
    gap: 15px;
    margin: 15px 0;
}

.metric {
    text-align: center;
    padding: 10px;
    border-radius: 4px;
    flex: 1;
}

.metric.positive { background: rgba(0, 255, 0, 0.2); }
.metric.negative { background: rgba(255, 0, 0, 0.2); }
.metric.neutral { background: rgba(255, 255, 0, 0.2); }

.metric-label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Mobile responsiveness for dashboard */
@media (max-width: 768px) {
    .intelligence-cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dashboard-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .refresh-data-btn, .proceed-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .progress-circle {
        width: 80px;
        height: 80px;
        font-size: 1.2rem;
    }
    
    .sentiment-metrics {
        flex-direction: column;
        gap: 10px;
    }
}

/* Container mode removed - always viewport mode */

@media (min-width: 1200px) {
  .login-container {
    max-width: 900px;
    min-height: 700px;
  }
}

@media (min-width: 1200px) {
  .login-container {
    max-width: 700px;
    min-height: 700px;
  }
}

@keyframes slideUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Brand Header Component - ULTRA COMPACTO */
.brand-header {
  padding: clamp(12px, 2vh, 16px) clamp(16px, 3vw, 24px) clamp(8px, 1.5vh, 12px);
  text-align: center;
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: clamp(16px, 4vw, 24px) clamp(16px, 4vw, 24px) 0 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  flex: 0 0 auto;
  min-height: 0;
}

.logo-icon {
  width: clamp(50px, 8vw, 80px);
  height: clamp(50px, 8vw, 80px);
  margin: 0 auto clamp(4px, 1vh, 8px);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.circle-logo {
  width: 100%;
  height: 100%;
  border-radius: 12px; /* Slightly rounded for modern look */
  object-fit: contain;
  background: white;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
  animation: logoFloat 3s ease-in-out infinite;
  border: 2px solid rgba(74, 144, 226, 0.2);
  padding: 8px;
}

/* 🌞 LIGHT MODE LOGO - Enhanced visibility */
body.light-mode .circle-logo,
.login-container.light-mode .circle-logo {
  background: white;
  box-shadow: 0 12px 35px rgba(74, 144, 226, 0.2);
  border: 2px solid rgba(74, 144, 226, 0.3);
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.brand-wordmark {
  margin-bottom: clamp(4px, 1vh, 8px);
  text-align: center;
}

.furniture-assistant-title {
  font-size: clamp(0.95rem, 2.5vw, 1.2rem) !important;
  line-height: 1.2;
  margin-bottom: clamp(2px, 0.5vh, 4px) !important;
}

.powered-by-aiprl {
  font-size: clamp(0.7rem, 1.8vw, 0.8rem) !important;
  line-height: 1.2;
}

.horizontal-logo {
  max-width: clamp(200px, 35vw, 280px);
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* 🌞 LIGHT MODE HORIZONTAL LOGO */
body.light-mode .horizontal-logo,
.login-container.light-mode .horizontal-logo {
  filter: drop-shadow(0 4px 8px rgba(74, 144, 226, 0.2));
}

@media (min-width: 1200px) {
  .logo-icon {
    width: clamp(100px, 10vw, 140px);
    height: clamp(100px, 10vw, 140px);
    margin-bottom: clamp(20px, 3vh, 30px);
  }
  
  .horizontal-logo {
    max-width: clamp(250px, 25vw, 320px);
  }
}

.tagline {
  font-size: clamp(0.75rem, 1.8vw, 0.9rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
  font-weight: 400;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  line-height: 1.2;
}

/* 🌞 LIGHT MODE TAGLINE */
body.light-mode .tagline,
.login-container.light-mode .tagline {
  color: rgba(26, 26, 26, 0.8);
  text-shadow: 0 2px 4px rgba(74, 144, 226, 0.1);
}

/* Light Mode Toggle Button - NEW */
.light-mode-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(74, 144, 226, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 10px 15px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
}

.light-mode-toggle:hover {
  background: rgba(74, 144, 226, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.2);
}

/* 🌞 LIGHT MODE TOGGLE BUTTON */
body.light-mode .light-mode-toggle,
.login-container.light-mode .light-mode-toggle {
  background: rgba(74, 144, 226, 0.15);
  border: 1px solid rgba(74, 144, 226, 0.3);
  color: var(--charcoal);
}

body.light-mode .light-mode-toggle:hover,
.login-container.light-mode .light-mode-toggle:hover {
  background: rgba(74, 144, 226, 0.25);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

.light-mode-toggle svg {
  width: 16px;
  height: 16px;
}

/* Hyperspeed Toggle Button - Updated for light mode */
.hyperspeed-toggle {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(74, 144, 226, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 10px 15px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
}

.hyperspeed-toggle:hover {
  background: rgba(74, 144, 226, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.2);
}

/* 🌞 LIGHT MODE HYPERSPEED TOGGLE */
body.light-mode .hyperspeed-toggle,
.login-container.light-mode .hyperspeed-toggle {
  background: rgba(255, 140, 66, 0.15);
  border: 1px solid rgba(255, 140, 66, 0.3);
  color: var(--charcoal);
}

body.light-mode .hyperspeed-toggle:hover,
.login-container.light-mode .hyperspeed-toggle:hover {
  background: rgba(255, 140, 66, 0.25);
  box-shadow: 0 8px 25px rgba(255, 140, 66, 0.3);
}

.hyperspeed-toggle svg {
  width: 16px;
  height: 16px;
}

/* Login Form Component - ULTRA COMPACTO - TODO DEBE CABER */
.login-form {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: clamp(10px, 1.8vh, 16px) clamp(16px, 3vw, 24px) clamp(10px, 1.8vh, 14px);
  border-radius: 0 0 clamp(16px, 4vw, 24px) clamp(16px, 4vw, 24px);
  position: relative;
  z-index: 5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(4px, 0.8vh, 8px);
  overflow: hidden;
  min-height: 0;
  max-height: 100%;
}

/* Reducir padding cuando Email & Password está activo */
.login-form.has-email-password {
  padding: clamp(8px, 1.5vh, 14px) clamp(16px, 3vw, 24px) clamp(8px, 1.5vh, 12px) !important;
  gap: clamp(2px, 0.5vh, 6px) !important;
}

/* Login method toggle and buttons - ULTRA COMPACTO */
.login-method-toggle {
  margin-bottom: clamp(6px, 1vh, 10px);
  flex: 0 0 auto;
}

/* Reducir toggle cuando Email & Password está activo */
.login-form.has-email-password .login-method-toggle {
  margin-bottom: clamp(4px, 0.8vh, 8px) !important;
}

.login-method-toggle .toggle-buttons {
  display: flex;
  gap: 10px;
}

.toggle-btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(74, 144, 226, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.toggle-btn:hover { transform: translateY(-1px); }

.toggle-btn.active {
  background: rgba(74, 144, 226, 0.9);
  color: white;
  border-color: rgba(74, 144, 226, 0.9);
}

/* 🌞 LIGHT MODE TOGGLE BUTTONS */
body.light-mode .toggle-btn,
.login-container.light-mode .toggle-btn {
  background: rgba(255, 255, 255, 0.9);
  color: var(--charcoal);
}

body.light-mode .toggle-btn.active,
.login-container.light-mode .toggle-btn.active {
  background: rgba(74, 144, 226, 0.95);
  color: white;
}

.login-method-form { 
  display: none; 
  flex: 0 0 auto;
  margin-bottom: clamp(4px, 0.8vh, 8px);
}
.login-method-form.active { 
  display: block; 
}

/* Cuando Email & Password está activo, reducir margin del form */
.login-form #emailPasswordForm.active {
  margin-bottom: clamp(2px, 0.5vh, 6px) !important;
}

/* Login Form Input Groups - ULTRA COMPACTO */
.login-form .input-group {
  margin-bottom: clamp(6px, 1vh, 10px);
  flex: 0 0 auto;
}

/* Cuando hay 2 campos (Email & Password), REDUCCIÓN AGRESIVA */
.login-form #emailPasswordForm.active .input-group {
  margin-bottom: clamp(3px, 0.6vh, 6px) !important;
}

.login-form .input-group label {
  font-size: clamp(0.8rem, 1.8vw, 0.9rem);
  margin-bottom: clamp(4px, 0.8vh, 6px);
}

/* Labels más pequeños cuando hay 2 campos */
.login-form #emailPasswordForm.active .input-group label {
  font-size: clamp(0.75rem, 1.6vw, 0.85rem) !important;
  margin-bottom: clamp(2px, 0.5vh, 4px) !important;
}

.login-form .input-group input {
  padding: clamp(10px, 1.5vh, 12px) clamp(14px, 2.5vw, 16px);
  font-size: clamp(0.85rem, 1.8vw, 0.95rem);
}

/* Inputs más pequeños cuando hay 2 campos */
.login-form #emailPasswordForm.active .input-group input {
  padding: clamp(8px, 1.2vh, 10px) clamp(12px, 2vw, 14px) !important;
  font-size: clamp(0.8rem, 1.6vw, 0.9rem) !important;
}

/* Signup CTA - ULTRA COMPACTO - SIEMPRE VISIBLE AL FINAL */
.signup-section {
  margin-top: clamp(2px, 0.5vh, 6px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1vw, 8px);
  flex: 0 0 auto;
  padding-top: clamp(2px, 0.5vh, 4px);
  /* Asegurar que siempre sea visible al final */
  margin-bottom: 0;
}

/* Reducir signup cuando Email & Password está activo */
.login-form.has-email-password .signup-section {
  margin-top: clamp(1px, 0.3vh, 4px) !important;
  padding-top: clamp(1px, 0.3vh, 2px) !important;
  gap: clamp(4px, 0.8vw, 6px) !important;
}

.login-form.has-email-password .signup-btn {
  padding: clamp(6px, 1vh, 8px) clamp(10px, 1.8vw, 12px) !important;
  font-size: clamp(0.7rem, 1.4vw, 0.8rem) !important;
}

.login-form.has-email-password .signup-text {
  font-size: clamp(0.7rem, 1.4vw, 0.8rem) !important;
}

.signup-text { 
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(0.75rem, 1.6vw, 0.85rem);
}
body.light-mode .signup-text { color: var(--charcoal); }

.signup-btn {
  padding: clamp(8px, 1.2vh, 10px) clamp(12px, 2vw, 14px);
  border-radius: 10px;
  border: 1px solid rgba(74, 144, 226, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 1vw, 8px);
  transition: all 0.2s ease;
  font-size: clamp(0.75rem, 1.6vw, 0.85rem);
}

.signup-btn:hover { transform: translateY(-1px); }

body.light-mode .signup-btn,
.login-container.light-mode .signup-btn {
  background: rgba(255, 255, 255, 0.9);
  color: var(--charcoal);
}

/* Signup Modal */
.signup-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.signup-modal {
  width: 95%;
  max-width: 520px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  overflow: hidden;
}

.signup-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.signup-modal-header h2 { margin: 0; font-size: 1.2rem; }

.signup-modal .close-modal-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 6px;
}

.signup-modal-content { padding: 20px; }
.signup-form .input-group { margin-bottom: 16px; }
.signup-form .input-group label { color: #333; }
.signup-form .input-group input { background: white; border: 2px solid #e5e7eb; }

.signup-submit-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: var(--primary-blue);
  color: white;
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
  cursor: pointer;
}

/* Signup Success Modal */
.signup-success-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2100;
}

.signup-success-modal {
  width: 95%;
  max-width: 560px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  overflow: hidden;
}

.signup-success-modal .success-header { padding: 16px 20px; border-bottom: 1px solid #eee; }
.signup-success-modal .success-icon { font-size: 32px; }
.signup-success-modal .success-content { padding: 20px; }
.signup-success-modal .credentials-box { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px; margin: 12px 0; }
.signup-success-modal .credential-item { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.signup-success-modal code { background: #fff; border: 1px solid #e5e7eb; padding: 4px 6px; border-radius: 6px; }
.signup-success-modal .copy-btn { background: #e5e7eb; border: none; border-radius: 6px; padding: 4px 6px; cursor: pointer; }
.signup-success-modal .continue-btn { margin-top: 12px; width: 100%; padding: 12px 16px; border: none; border-radius: 12px; background: var(--primary-blue); color: white; cursor: pointer; }

/* 🌞 LIGHT MODE LOGIN FORM */
.login-container.light-mode .login-form,
body.light-mode .login-form {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(74, 144, 226, 0.1);
  color: var(--charcoal);
}

@media (min-width: 1200px) {
  .login-form {
    padding: 60px;
  }
}

/* Desktop Optimized Form Elements */
.input-group {
  margin-bottom: 30px;
}

.input-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 🌞 LIGHT MODE LABELS */
body.light-mode .input-group label,
.login-container.light-mode .input-group label {
  color: rgba(26, 26, 26, 0.9);
  text-shadow: none;
}

.input-group input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid rgba(74, 144, 226, 0.2);
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.9);
  color: var(--charcoal);
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.15);
  background: white;
}

/* 🌞 LIGHT MODE INPUT FIELDS */
body.light-mode .input-group input,
.login-container.light-mode .input-group input {
  background: white;
  border: 2px solid rgba(74, 144, 226, 0.3);
  color: var(--charcoal);
}

body.light-mode .input-group input:focus,
.login-container.light-mode .input-group input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.2);
  background: white;
}

@media (min-width: 1200px) {
  .input-group {
    margin-bottom: 35px;
  }
  
  .input-group label {
    font-size: 1.2rem;
    margin-bottom: 12px;
  }
  
  .input-group input {
    padding: 18px 24px;
    font-size: 1.2rem;
  }
}

/* Channel Selector - ULTRA COMPACTO */
.channel-selector {
  margin-bottom: clamp(4px, 0.8vh, 8px);
  flex: 0 0 auto;
}

/* Reducir channel selector cuando Email & Password está activo */
.login-form.has-email-password .channel-selector {
  margin-bottom: clamp(2px, 0.5vh, 6px) !important;
}

.login-form.has-email-password .channel-selector label {
  margin-bottom: clamp(4px, 0.8vh, 6px) !important;
  font-size: clamp(0.8rem, 1.6vw, 0.9rem) !important;
}

.channel-selector label {
  display: block;
  margin-bottom: clamp(6px, 1vh, 8px);
  font-weight: 600;
  font-size: clamp(0.85rem, 1.8vw, 0.95rem);
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 🌞 LIGHT MODE CHANNEL SELECTOR LABEL */
body.light-mode .channel-selector label,
.login-container.light-mode .channel-selector label {
  color: rgba(26, 26, 26, 0.9);
  text-shadow: none;
}

@media (min-width: 1200px) {
  .channel-selector {
    margin-bottom: 40px;
  }
  
  .channel-selector label {
    font-size: 1.2rem;
    margin-bottom: 18px;
  }
}

.channel-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(6px, 1.2vw, 8px);
  /* Ensure buttons don't take too much vertical space */
  max-height: fit-content;
}

.channel-btn {
  padding: clamp(8px, 1.5vh, 12px) clamp(10px, 1.8vw, 14px);
  border: 2px solid rgba(74, 144, 226, 0.2);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.2vw, 8px);
  text-align: center;
  position: relative;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Reducir channel buttons cuando Email & Password está activo */
.login-form.has-email-password .channel-btn {
  padding: clamp(6px, 1.2vh, 10px) clamp(8px, 1.5vw, 12px) !important;
  gap: clamp(4px, 1vw, 6px) !important;
}

.login-form.has-email-password .channel-btn span {
  font-size: clamp(0.75rem, 1.4vw, 0.85rem) !important;
}

.login-form.has-email-password .channel-btn svg {
  width: clamp(14px, 2vw, 16px) !important;
  height: clamp(14px, 2vw, 16px) !important;
}

/* 🌞 LIGHT MODE CHANNEL BUTTONS */
body.light-mode .channel-btn,
.login-container.light-mode .channel-btn {
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(74, 144, 226, 0.3);
  color: var(--charcoal);
}

.channel-btn:hover {
  border-color: var(--primary-blue);
  background: rgba(74, 144, 226, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.2);
  }

/* 🌞 LIGHT MODE CHANNEL BUTTONS HOVER */
body.light-mode .channel-btn:hover,
.login-container.light-mode .channel-btn:hover {
  background: rgba(74, 144, 226, 0.1);
  border-color: var(--primary-blue);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

.channel-btn.active {
  border-color: var(--primary-blue);
  background: rgba(74, 144, 226, 0.2);
  color: white;
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

/* 🌞 LIGHT MODE ACTIVE CHANNEL BUTTON */
body.light-mode .channel-btn.active,
.login-container.light-mode .channel-btn.active {
  background: rgba(74, 144, 226, 0.9);
  color: white;
  border-color: var(--primary-blue);
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
}

.channel-btn span {
  font-weight: 600;
  font-size: clamp(0.8rem, 1.6vw, 0.9rem);
}

.channel-btn p {
  display: none; /* Hide description text to save space */
  font-size: clamp(0.7rem, 1.5vw, 0.8rem);
  opacity: 0.7;
  margin: 0;
}

/* Mostrar "Coming Soon" solo en botones deshabilitados */
.channel-btn.disabled p,
.channel-btn:disabled p {
  display: block !important;
  font-size: clamp(0.65rem, 1.3vw, 0.75rem) !important;
  opacity: 0.6 !important;
  margin-top: clamp(2px, 0.5vh, 4px) !important;
  font-style: italic;
}

.channel-btn svg {
  width: clamp(16px, 2.5vw, 18px);
  height: clamp(16px, 2.5vw, 18px);
  flex-shrink: 0;
  color: inherit;
}

.channel-btn.disabled,
.channel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(200, 200, 200, 0.3) !important;
  border-color: rgba(200, 200, 200, 0.5) !important;
  color: rgba(128, 128, 128, 0.7) !important;
  flex-direction: column !important; /* Cambiar a columna para mostrar texto debajo */
  gap: clamp(4px, 0.8vh, 6px) !important;
}

/* Light mode disabled button */
body.light-mode .channel-btn.disabled,
body.light-mode .channel-btn:disabled,
.login-container.light-mode .channel-btn.disabled,
.login-container.light-mode .channel-btn:disabled {
  background: rgba(200, 200, 200, 0.4) !important;
  border-color: rgba(150, 150, 150, 0.5) !important;
  color: rgba(100, 100, 100, 0.7) !important;
}

/* Login Button - ULTRA COMPACTO */
.login-btn {
  width: 100%;
  padding: clamp(10px, 1.8vh, 12px) clamp(16px, 3vw, 20px);
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-light));
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.2vw, 10px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
  margin-top: clamp(4px, 0.8vh, 8px);
  flex: 0 0 auto;
}

/* Reducir login button cuando Email & Password está activo */
.login-form.has-email-password .login-btn {
  padding: clamp(8px, 1.5vh, 10px) clamp(14px, 2.5vw, 18px) !important;
  font-size: clamp(0.8rem, 1.6vw, 0.95rem) !important;
  margin-top: clamp(2px, 0.5vh, 6px) !important;
}

.login-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(74, 144, 226, 0.4);
  background: linear-gradient(135deg, var(--primary-light), var(--primary-blue));
}

.login-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.2);
}

/* 🌞 LIGHT MODE LOGIN BUTTON */
body.light-mode .login-btn,
.login-container.light-mode .login-btn {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-light));
  box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
}

body.light-mode .login-btn:hover:not(:disabled),
.login-container.light-mode .login-btn:hover:not(:disabled) {
  box-shadow: 0 12px 35px rgba(74, 144, 226, 0.5);
}

.login-btn span {
  font-weight: 600;
}

.login-btn svg {
  transition: transform 0.3s ease;
}

.login-btn:hover:not(:disabled) svg {
  transform: translateX(4px);
}

@media (min-width: 1200px) {
  .login-btn {
    padding: 20px 28px;
    font-size: 1.3rem;
}
}

/* Responsive viewport sizing - ensures it fits all screens */
@media (max-height: 700px) {
  .login-container {
    max-height: 95vh;
    min-height: auto;
    padding: clamp(16px, 3vh, 24px);
  }
  
  .login-form {
    padding: clamp(24px, 4vh, 40px);
  }
}

@media (max-width: 640px) {
  .login-container {
    width: 95vw;
    max-height: 95vh;
    border-radius: clamp(12px, 3vw, 20px);
  }
  
  .brand-header {
    padding: clamp(16px, 3vh, 24px) clamp(16px, 4vw, 24px) clamp(12px, 2vh, 20px);
  }
  
  .logo-icon {
    width: clamp(70px, 18vw, 90px);
    height: clamp(70px, 18vw, 90px);
    margin-bottom: clamp(10px, 2vh, 16px);
  }
  
    .furniture-assistant-title {
    font-size: clamp(1rem, 3.5vw, 1.3rem) !important;
  }
  
  .tagline {
    font-size: clamp(0.75rem, 2vw, 0.9rem) !important;
  }
  
  .login-form .input-group {
    margin-bottom: clamp(10px, 1.5vh, 14px);
  }
  
  .login-form .input-group input {
    padding: clamp(10px, 1.8vh, 12px) clamp(14px, 2.5vw, 16px);
  }
  
  .login-form {
    padding: clamp(20px, 4vh, 32px);
  }
}

@media (min-width: 1200px) {
  .login-container {
    max-width: min(500px, 40vw);
  }
}

@keyframes slideUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Chat Interface Styles - FIXED AND ENHANCED */
.chat-interface {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: white;
}

.chat-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas:
    "header header"
    "chat sidebar";
  height: 100vh;
  background: var(--secondary);
  position: relative;
  overflow: hidden;
}

.chat-header {
  grid-area: header;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 32px 12px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  z-index: 10;
  border-bottom: 1px solid rgba(238, 238, 238, 0.7);
  position: relative;
}

.chat-header h2 {
  font-size: 24px;
  color: var(--primary);
  font-weight: 600;
  margin: 0;
}

/* Brand Container Styles */
.brand-container {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header-logo {
  width: 190px;
  max-height: 80px;
  height: auto;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  border: none;
  box-shadow: none;
}

.header-progress-card {
  min-width: 240px;
  max-width: 320px;
  margin-left: auto;
}

@media (max-width: 1024px) {
  .chat-header {
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }
  .header-progress-card {
    display: none;
  }
}

.header-title.animated-gradient-text {
  font-size: 1.5rem;
  font-weight: 600;
}

/* Sidebar Header Styles - DEBUG MODE */
.sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 0 16px;
  margin-bottom: 12px;
  background: transparent;
  border: none;
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.timeline-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 6px;
}

body.light-mode .timeline-hint {
  color: rgba(26, 26, 26, 0.6);
}



.sidebar-logo {
  width: 110px;
  height: auto;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  border: none;
  box-shadow: none;
  margin-bottom: 15px;
  position: relative;
}



.sidebar-title.animated-gradient-text {
  font-size: 1.2rem;
  font-weight: 600;
  position: relative;
}



.chat-content {
  grid-area: chat;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: rgba(255, 255, 255, 0.75);
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.assistant-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.assistant-avatar {
  width: 48px;
  height: 48px;
  position: relative;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 18px;
}

.assistant-details {
  display: flex;
  flex-direction: column;
}

.assistant-details h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text);
}

.status {
  font-size: 0.9rem;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fafafa;
}

/* Message Styles - Enhanced */
.message {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
  animation: fadeInUp 0.3s ease-out;
}

.message.user {
  align-items: flex-end;
  max-width: 100%;
  width: 100%;
}

.message.assistant {
  align-items: flex-start;
}

.message-content {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow: hidden;
  box-sizing: border-box;
}

.message.user .message-content {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
  width: fit-content;
  max-width: 85%;
  min-width: 0;
}

@media (max-width: 768px) {
  .message-content,
  .message.user .message-content {
    max-width: 100%;
  }
  
  .brand-container {
    gap: 12px;
  }
  
  .header-logo {
    width: 110px;
  }
  
  .sidebar-logo {
    width: 90px;
  }
}

.message.assistant .message-content,
.message.assistant-message .message-content {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.message-text {
  line-height: 1.4;
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
  overflow: hidden;
}

.message.assistant .message-text,
.message.assistant-message .message-text {
  color: #333333 !important;
}

.message-time {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 4px;
  color: #666666 !important;
}

.message.assistant .message-time,
.message.assistant-message .message-time {
  color: #666666 !important;
}

.welcome-message {
  text-align: center;
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
}

.welcome-message h1 {
  margin: 0 0 1rem;
  color: var(--primary);
  font-size: 2rem;
  font-weight: 700;
}

.welcome-message p {
  margin: 0 0 2rem;
  color: var(--text-light);
  font-size: 1.1rem;
  line-height: 1.6;
}

.empty-state {
  text-align: center;
  color: var(--text-light);
  font-style: italic;
  margin: 40px 0;
  padding: 20px;
}

/* Suggestion Chips - Fixed */
.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  justify-content: center;
}

.chip {
  background: rgba(64, 255, 170, 0.15);
  color: #16a34a !important;
  border: 2px solid rgba(64, 255, 170, 0.4);
  border-radius: 16px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(64, 255, 170, 0.2);
}

.chip:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #333333 !important;
  border-color: rgba(64, 255, 170, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(64, 255, 170, 0.4);
}

.chip.clicked {
  background: var(--primary);
  color: white;
  transform: scale(0.95);
}

/* Suggested Replies - Enhanced */
.suggested-replies {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
  max-width: 70%;
  align-self: flex-start;
}

.suggested-reply-btn {
  background: rgba(255, 140, 66, 0.8);
  color: white !important;
  border: 2px solid rgba(255, 140, 66, 0.9);
  border-radius: 16px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(255, 140, 66, 0.4);
  width: 100%;
  text-align: left;
  white-space: normal;
  word-wrap: break-word;
}

.suggested-reply-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #333333 !important;
  border-color: rgba(255, 140, 66, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
}

.suggested-reply-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(255, 140, 66, 0.3);
}

/* Input Container - Enhanced */
.input-container {
  padding: 20px;
  border-top: 1px solid #eee;
  background: white;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.chat-input-container {
  padding: 20px;
  border-top: 1px solid #eee;
  background: white;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

#messageInput {
  flex-grow: 1;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 15px 20px;
  font-size: 15px;
  line-height: 1.5;
  resize: none;
  max-height: 120px;
  transition: all 0.3s ease;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #333333 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#messageInput:focus {
  outline: none;
  border-color: rgba(64, 255, 170, 0.6);
  box-shadow: 0 0 0 3px rgba(64, 255, 170, 0.2), 0 8px 32px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

#messageInput::placeholder {
  color: rgba(51, 51, 51, 0.6) !important;
}

#messageInput.inserting-text {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

#sendButton {
  background: linear-gradient(135deg, rgba(64, 255, 170, 0.9) 0%, rgba(79, 172, 254, 0.9) 50%, rgba(0, 212, 255, 0.9) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 50px;
  box-shadow: 0 8px 32px rgba(64, 255, 170, 0.3);
}

#sendButton:hover {
  background: linear-gradient(135deg, rgba(64, 255, 170, 1) 0%, rgba(79, 172, 254, 1) 50%, rgba(0, 212, 255, 1) 100%);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(64, 255, 170, 0.4);
  border-color: rgba(255, 255, 255, 0.5);
}

#sendButton:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  transform: none;
}

.voice-button {
  width: 48px;
  height: 48px;
  margin: 0 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.voice-button svg {
  stroke: currentColor;
}

.voice-button:focus-visible {
  outline: 2px solid rgba(64, 255, 170, 0.6);
  outline-offset: 2px;
}

body.light-mode .voice-button {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(74, 144, 226, 0.2);
  color: rgba(26, 26, 26, 0.7);
}

.voice-button.disabled {
  cursor: not-allowed;
  opacity: 0.4;
  pointer-events: none;
}

.voice-button.recording {
  background: rgba(255, 71, 87, 0.15);
  border-color: rgba(255, 71, 87, 0.4);
  color: #ff4757;
  animation: pulseRecording 1.4s ease-in-out infinite;
}

.voice-button.loading {
  opacity: 0.6;
  cursor: progress;
}

@keyframes pulseRecording {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.4);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(255, 71, 87, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0);
  }
}

.voice-button.voice-error {
  border-color: rgba(255, 99, 71, 0.8);
  color: #ff6347;
}

/* ✨ Sparkle Suggestions Styles */
.sparkle-suggestions-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.sparkle-button {
  background: transparent;
  border: none;
  padding: 10px;
  cursor: pointer;
  color: rgba(255, 140, 66, 0.8);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.sparkle-button:hover {
  color: rgba(255, 140, 66, 1);
  background: rgba(255, 140, 66, 0.1);
  transform: scale(1.1);
}

.sparkle-button svg {
  width: 20px;
  height: 20px;
}

.sparkle-button.disabled {
  opacity: 0.35;
  pointer-events: none;
  transform: none;
}

.sparkle-empty {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  text-align: center;
  padding: 12px 6px;
}

body.light-mode .sparkle-empty {
  color: rgba(26, 26, 26, 0.6);
}

.sparkle-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 140, 66, 0.2);
  min-width: 250px;
  max-width: 350px;
  z-index: 1000;
  overflow: hidden;
}

.sparkle-dropdown-header {
  padding: 12px 16px;
  background: rgba(255, 140, 66, 0.1);
  border-bottom: 1px solid rgba(255, 140, 66, 0.2);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 140, 66, 0.9);
}

.sparkle-suggestions-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 8px;
}

.sparkle-suggestion-item {
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.sparkle-suggestion-item:hover {
  background: rgba(255, 140, 66, 0.1);
  color: rgba(255, 140, 66, 1);
}

.sparkle-suggestion-item:active {
  transform: scale(0.98);
}

.chat-input-container button {
  background: var(--primary);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-input-container button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(42, 104, 212, 0.3);
}

.chat-input-container button svg {
  width: 24px;
  height: 24px;
  stroke: white;
}

/* Channel Toggle */
.channel-toggle {
  display: flex;
  gap: 8px;
  background: var(--secondary);
  padding: 4px;
  border-radius: 8px;
}

.channel-toggle button {
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
}

.channel-toggle button.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.channel-toggle button:hover:not(.active) {
  color: var(--text);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ripple Effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: rippleEffect 0.6s linear;
  pointer-events: none;
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Mobile Progress Bar - Gestalt Principles: Proximity & Similarity */
.mobile-progress-bar {
  display: none; /* Hidden by default, shown on mobile via media query */
  position: absolute; /* Absolute within chat-header for proximity */
  top: 0; /* At the top of chat-header */
  left: 0;
  right: 0;
  width: 100%;
  height: 6px; /* Increased from 4px for better visibility */
  background: rgba(255, 255, 255, 0.15);
  z-index: 11; /* Above header content */
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0; /* Similarity: matches chat container edges */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Similarity: matches chat header shadow */
}

.chat-header {
  position: relative; /* Enable absolute positioning for progress bar */
}

.mobile-progress-bar:hover {
  height: 8px; /* Increased hover height for better touch target */
  background: rgba(255, 255, 255, 0.2);
}

.mobile-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4A90E2, #FF8C42); /* Similarity: matches sidebar progress colors */
  transition: width 0.5s ease;
  position: relative;
  border-radius: 0 3px 3px 0; /* Visual connection to progress */
}

.mobile-progress-text {
  position: absolute;
  top: 50%;
  right: 12px; /* Increased from 8px for better spacing */
  transform: translateY(-50%);
  font-size: 11px; /* Increased from 10px for better readability */
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95); /* Increased opacity for better visibility */
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* Better text visibility */
}

/* Mobile Sidebar Overlay */
.mobile-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 2000;
  overflow-y: auto;
}

.mobile-sidebar-content {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 20px;
  padding-top: 60px;
}

.mobile-sidebar-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  color: white;
  z-index: 2001;
  transition: all 0.2s ease;
}

.mobile-sidebar-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.mobile-sidebar-header {
  text-align: center;
  margin-bottom: 30px;
}

.mobile-progress-section {
  margin-bottom: 30px;
}

.mobile-progress-section h3 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 15px;
  text-align: center;
}

.mobile-progress-section p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-top: 10px;
  text-align: center;
}

.mobile-questionnaire-items {
  flex: 1;
  overflow-y: auto;
}

.mobile-questionnaire-items h3 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 15px;
  text-align: center;
}

/* Sidebar Styles - Enhanced */
.sidebar {
  grid-area: sidebar;
  background: rgba(255, 255, 255, 0.75);
  border-left: 1px solid #eee;
  display: flex;
  flex-direction: column;
  z-index: 5;
  overflow-y: auto;
  padding: 20px;
  min-height: 0; /* Fix for flex overflow */
  position: relative;
}

.progress-section {
  margin-bottom: 20px;
  position: relative;
}



.progress-section h3 {
  color: white;
  font-size: 1rem;
  margin-bottom: 10px;
  text-align: center;
  position: relative;
}



.progress-bar {
  background: rgba(255, 255, 255, 0.2);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
}



.progress-fill {
  background: linear-gradient(90deg, #4A90E2, #FF8C42);
  height: 100%;
  transition: width 0.5s ease;
  position: relative;
}



.progress-section p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  text-align: center;
  position: relative;
}

.progress-summary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.light-mode .progress-summary {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(74, 144, 226, 0.2);
  box-shadow: 0 10px 30px rgba(74, 144, 226, 0.15);
}

.progress-summary-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
}

body.light-mode .progress-summary-label {
  color: rgba(26, 26, 26, 0.6);
}

.progress-pill {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.progress-value {
  font-size: 1.9rem;
  font-weight: 600;
  color: #40ffaa;
}

body.light-mode .progress-value {
  color: var(--primary-blue);
}

.progress-subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

body.light-mode .progress-subtitle {
  color: rgba(26, 26, 26, 0.75);
}

.desktop-progress-summary {
  margin: 24px 0 12px 0;
}



.questionnaire-items {
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
  padding-right: 5px;
  position: relative;
}



.questionnaire-items h3 {
  color: white;
  font-size: 1rem;
  margin-bottom: 15px;
  text-align: center;
  position: relative;
}



.questionnaire-item {
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  border-left: 3px solid #4A90E2;
  transition: all 0.3s ease;
  position: relative;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}



.questionnaire-item:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.questionnaire-item .question {
  color: white;
  font-weight: 500;
  margin: 0 0 6px 0;
  font-size: 0.9rem;
  position: relative;
}



.questionnaire-item .answer {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  position: relative;
}



.sidebar {
  grid-area: sidebar;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100vh;
  position: relative;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}




/* Custom scrollbar for questionnaire items */
.questionnaire-items::-webkit-scrollbar {
  width: 6px;
}

.questionnaire-items::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.questionnaire-items::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

.questionnaire-items::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Empty state styling */
.empty-items {
  color: rgba(255, 255, 255, 0.8);
  font-style: italic;
  text-align: center;
  padding: 20px;
  opacity: 0.7;
  animation: fadeIn 0.3s ease forwards;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  position: relative;
}



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

@keyframes pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.5;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.5;
  }
}

/* Error Message Styles */
.error-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--error), #dc2626);
  color: white;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
  z-index: 3000;
  font-weight: 500;
  font-size: 14px;
  max-width: 400px;
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading-dots:after {
  content: '.';
  animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60% { content: '...'; }
  80%, 100% { content: ''; }
}

/* Animations */
.fade-enter {
  opacity: 0;
  transform: translateY(20px);
}

.fade-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease;
}

.fade-exit {
  opacity: 1;
  transform: translateY(0);
}

.fade-exit-active {
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

/* Website Input Screen */
.websites-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.websites-header {
    text-align: center;
    margin-bottom: 30px;
}

.websites-header h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.websites-header p {
    color: #666;
    font-size: 16px;
}

.websites-input-section {
    margin-bottom: 30px;
}

.website-inputs {
    margin-bottom: 20px;
}

.website-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.website-url-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.website-url-input:focus {
    border-color: #007bff;
    outline: none;
}

.remove-website-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.remove-website-btn:hover {
    background-color: #ffebee;
}

.add-website-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 2px dashed #007bff;
    color: #007bff;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.add-website-btn:hover {
    background-color: #f8f9fa;
}

.websites-actions {
    text-align: center;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.primary-button:hover {
    background-color: #0056b3;
}

.primary-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Review Screen - TINDER STYLE FULL SCREEN */
.review-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--secondary);
    overflow: hidden;
    z-index: 1;
}

.review-header {
    position: sticky;
    top: 0;
    background: white;
    padding: 20px;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.review-header h2 {
    font-size: 28px;
    color: var(--text);
    margin-bottom: 10px;
}

.review-header p {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 20px;
}

.review-progress {
    max-width: 600px;
    margin: 0 auto;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 500;
}

/* TINDER STYLE CARDS CONTAINER */
.review-cards-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--secondary);
}

.review-cards {
    position: absolute;
    top: 0;
    left: 0;
    width: 500%; /* 5 times width to accommodate multiple cards */
    height: 100%;
    display: flex;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* FULL SCREEN TINDER CARDS */
.review-card {
    width: 100vw;
    height: 100%;
    background: white;
    margin: 0;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: none;
    border-radius: 0;
    flex-shrink: 0;
    overflow-y: auto;
}

.review-card:not(.active-card) {
    opacity: 0.3;
    pointer-events: none;
}

.review-card.active-card {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.review-card.sliding-out {
    z-index: 1;
    opacity: 0.7;
}

.review-card.sliding-in {
    z-index: 3;
    opacity: 1;
}

.review-card.approved {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05) 0%, rgba(76, 175, 80, 0.1) 100%);
    border-left: 8px solid var(--success);
}

/* Add pulse animation for approved cards */
@keyframes approvedPulse {
    0% {
        border-left-color: var(--success);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }
    50% {
        border-left-color: #2e7d32;
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        border-left-color: var(--success);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.review-card.approved {
    animation: approvedPulse 1s ease-in-out;
}

.review-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 0;
    position: relative;
}

.review-card .card-header h3 {
    font-size: 32px;
    color: var(--text);
    margin: 0;
    font-weight: 700;
    flex: 1;
}

.review-card .card-header .section-number {
    font-size: 18px;
    color: var(--primary);
    font-weight: 600;
    background: var(--secondary);
    border-radius: 12px;
    padding: 8px 16px;
    margin-right: 20px;
    align-self: flex-start;
    letter-spacing: 1px;
}

.review-card .card-actions {
    display: flex;
    gap: 16px;
    margin-left: 20px;
}

.review-card .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0;
    min-height: auto;
    overflow-y: auto;
}

/* TINDER NAVIGATION - ALWAYS VISIBLE */
.card-navigation {
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 100;
    padding: 0 20px;
}

.prev-card, .next-card {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    pointer-events: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.prev-card:hover, .next-card:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(var(--primary), 0.4);
}

.prev-card:disabled, .next-card:disabled {
    background: rgba(200, 200, 200, 0.5);
    color: #999;
    cursor: not-allowed;
    transform: scale(0.9);
    opacity: 0.3;
    border-color: #ccc;
}

/* CARD COUNTER AND DOTS - BOTTOM CENTER */
.card-info {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px 24px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 100;
}

.card-counter {
    font-weight: 600;
    color: var(--text);
    font-size: 16px;
    text-align: center;
}

/* Progress Indicators */
.progress-dots {
    display: flex;
    gap: 10px;
    align-items: center;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(var(--primary), 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.progress-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.progress-dot.approved {
    background: var(--success);
    transform: scale(1.3);
}

/* ENHANCED BUTTONS - REMOVED CONFLICTING STYLES */

/* REVIEW ACTIONS - FLOATING */
.review-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, white 90%, rgba(255, 255, 255, 0.95) 100%);
    padding: 25px;
    text-align: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.approve-all-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.approve-all-button:disabled {
    background: var(--secondary);
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
    transform: none !important;
}

.approve-all-button:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
    background: #2e7d32;
}

/* KEYBOARD NAVIGATION HINTS */
.keyboard-hints {
    position: fixed;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0.6;
    z-index: 50;
    font-size: 12px;
    color: var(--text-light);
}

.keyboard-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 10px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.key {
    background: var(--secondary);
    color: var(--text);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: bold;
    font-size: 10px;
}

/* RESPONSIVE - MOBILE */
@media (max-width: 768px) {
    /* Show mobile progress bar, hide desktop sidebar progress section */
    .mobile-progress-bar {
        display: block;
    }
    
    .sidebar .progress-section {
        display: none;
    }
    
    /* Hide sidebar on mobile (replaced by overlay) */
    .sidebar {
        display: none;
    }
    
    /* Adjust chat container to full width on mobile */
    .chat-container {
        grid-template-columns: 1fr;
    }
    
    .chat-content {
        width: 100%;
    }
    
    /* Adjust input container for mobile */
    .input-container {
        padding: 15px;
        gap: 8px;
    }
    
    .sparkle-dropdown {
        min-width: 200px;
        max-width: calc(100vw - 40px);
    }
    
    /* Mobile: Orange suggestion buttons stack vertically */
    .suggested-replies {
        max-width: 100%;
        margin-top: 10px;
        gap: 10px;
    }
    
    .suggested-reply-btn {
        padding: 12px 16px;
        font-size: 15px;
        min-height: 44px; /* iOS recommended touch target */
        display: flex;
        align-items: center;
    }
    
    /* Ensure message content and suggestions are full width on mobile */
    .message.assistant .message-content {
        max-width: 85%;
    }
    
    .message.assistant .suggested-replies {
        max-width: 85%;
    }
    
    /* Mobile Progress Bar - Gestalt Proximity: Positioned within chat-header */
    .chat-header {
        position: relative; /* Enable absolute positioning for progress bar */
        padding-top: 8px; /* Add top padding to accommodate progress bar */
    }
    
    .mobile-progress-bar {
        display: block; /* Show on mobile */
    }
    
    /* Ensure progress bar is visible and properly positioned */
    .mobile-progress-bar {
        top: 0;
        left: 0;
        right: 0;
    }
}

/* DESKTOP - Ensure sidebar and progress section are visible */
@media (min-width: 769px) {
    .mobile-progress-bar {
        display: none !important;
    }
    
    .sidebar {
        display: flex !important;
    }
    
    .sidebar .progress-section {
        display: block !important;
    }
    
    /* Desktop: Orange buttons can be slightly wider but still stack vertically */
    .suggested-replies {
        max-width: 70%;
    }
    
    .suggested-reply-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .review-card {
        padding: 20px;
    }
    
    .review-card .card-header h3 {
        font-size: 24px;
    }
    
    .review-card .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .review-card .card-actions {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
    }
    
    .prev-card, .next-card {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .card-navigation {
        padding: 0 15px;
    }
    
    .keyboard-hints {
        display: none;
    }
}

/* Card Content Styles */
.info-item {
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item label {
    display: block;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 5px;
    font-weight: 600;
}

.info-item p {
    font-size: 16px;
    color: var(--text);
    margin: 0;
}

/* Missing Data Styles */
.info-item.missing-data {
    background: rgba(255, 107, 107, 0.1);
    padding: 12px;
    border-radius: 8px;
    border: 2px dashed #ff6b6b;
    border-left: 4px solid #ff6b6b;
    animation: missingDataPulse 2s ease-in-out infinite;
}

.missing-indicator {
    color: #ff6b6b;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 4px 8px;
    background: rgba(255, 107, 107, 0.15);
    border-radius: 4px;
}

.missing-indicator::before {
    content: "⚠️";
    font-size: 14px;
}

@keyframes missingDataPulse {
    0%, 100% {
        border-color: #ff6b6b;
        background: rgba(255, 107, 107, 0.1);
    }
    50% {
        border-color: #ff8e8e;
        background: rgba(255, 107, 107, 0.15);
    }
}

.no-data {
    color: #ff6b6b;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
    background: rgba(255, 107, 107, 0.05);
    border-radius: 8px;
    border: 1px dashed #ff6b6b;
}

.no-data::before {
    content: "📋 ";
    font-size: 18px;
}

/* Lists */
.services-list,
.locations-list,
.team-list,
.social-media-list,
.reviews-list,
.hours-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-item,
.location-item,
.team-item,
.social-media-item,
.review-item,
.hours-item {
    padding: 12px;
    background: var(--secondary);
    border-radius: var(--radius-sm);
}

.service-item span,
.location-item span,
.team-item span,
.social-media-item span {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
}

.hours-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hours-item .day {
    font-weight: 500;
}

/* Edit Modal */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999 !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.edit-modal {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90vw;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 2px solid var(--secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 20px;
    color: var(--text);
    margin: 0;
    font-weight: 600;
}

.close-modal-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    color: var(--text-light);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal-btn:hover {
    background: var(--secondary);
    color: var(--text);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px 24px 24px;
    border-top: 1px solid var(--secondary);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--secondary);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(42, 104, 212, 0.1);
}

.form-input:invalid {
    border-color: var(--error);
}

/* Modal Buttons */
.cancel-btn, .save-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.cancel-btn {
    background: var(--secondary);
    color: var(--text);
}

.cancel-btn:hover {
    background: #e0e7f5;
}

.save-btn {
    background: var(--primary);
    color: white;
}

.save-btn:hover {
    background: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 104, 212, 0.3);
}

/* Services Editor */
.services-editor, .locations-editor, .team-editor, .reviews-editor {
    width: 100%;
}

.services-list, .locations-list, .team-list, .reviews-list {
    margin-bottom: 20px;
}

.service-item-edit, .location-item-edit, .team-item-edit, .review-item-edit {
    background: var(--secondary);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.service-item-edit:hover, .location-item-edit:hover, .team-item-edit:hover, .review-item-edit:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.remove-service-btn, .remove-location-btn, .remove-team-btn, .remove-review-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--error);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-service-btn:hover, .remove-location-btn:hover, .remove-team-btn:hover, .remove-review-btn:hover {
    background: #c62828;
    transform: scale(1.05);
}

.add-service-btn, .add-location-btn, .add-team-btn, .add-review-btn {
    width: 100%;
    padding: 12px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-service-btn:hover, .add-location-btn:hover, .add-team-btn:hover, .add-review-btn:hover {
    background: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 104, 212, 0.3);
}

/* Hours Editor */
.hours-editor {
    width: 100%;
}

.hours-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--secondary);
    border-radius: 8px;
}

.day-label {
    min-width: 100px;
    font-weight: 600;
    color: var(--text);
}

.hours-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.time-input {
    width: 120px;
}

.closed-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-light);
}

.closed-toggle input[type="checkbox"] {
    width: auto;
}

/* Success Overlay */
.success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(76, 175, 80, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 100;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: successPulse 0.6s ease-out;
}

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

.success-overlay p {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

/* Mobile Modal Styles */
@media (max-width: 768px) {
    .edit-modal {
        width: 95vw;
        max-height: 90vh;
        margin: 20px;
    }
    
    .modal-header, .modal-body, .modal-footer {
        padding: 16px;
    }
    
    .hours-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .day-label {
        min-width: auto;
        margin-bottom: 8px;
    }
    
    .hours-inputs {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .time-input {
        width: 100px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "chat";
    }

    .sidebar {
        display: none;
    }

    .message-content {
        max-width: 85%;
    }

    .login-container {
        margin: 20px;
        padding: 30px;
    }

    .chat-header {
        padding: 15px 20px;
    }

    .chat-header h2 {
        font-size: 20px;
    }

    .input-container, .chat-input-container {
        padding: 15px;
    }

    .welcome-message {
        margin: 1rem;
        padding: 1.5rem;
    }

    .welcome-message h1 {
        font-size: 1.5rem;
    }

    .suggestion-chips {
        justify-content: flex-start;
    }

    .chip {
        font-size: 13px;
        padding: 6px 12px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.7;
    }
}

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

/* Typing Indicator Animation */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    opacity: 0.7;
}

.typing-indicator span:not([style]) {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: typingBounce 1.4s infinite ease-in-out;
}

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

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

.typing-indicator span:nth-child(3) {
    animation-delay: 0s;
}

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

/* AI Employee Chat Interface */
.chat-interface {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    color: #fff;
}

.chat-header {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.assistant-info {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.assistant-avatar {
    position: relative;
    width: 56px;
    height: 56px;
}

.avatar-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid #40ffaa;
    border-radius: 50%;
    animation: rotate 8s linear infinite;
}

.avatar-core {
    position: absolute;
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    background: linear-gradient(45deg, #40ffaa, #4facfe, #00d4ff);
    border-radius: 50%;
    animation: pulse 2.5s ease-in-out infinite alternate;
}

.avatar-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(64, 255, 170, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse-ring 3s ease-in-out infinite;
}

.assistant-details h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(45deg, #40ffaa, #4facfe);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.assistant-details .status {
    color: #40ffaa;
    font-size: 1rem;
    font-weight: 500;
}

.welcome-message {
    text-align: center;
    padding: 3rem 2rem;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin: 2rem auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.welcome-message h1 {
    margin: 0 0 1.5rem 0;
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(45deg, #40ffaa, #4facfe, #00d4ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.welcome-message p {
    margin: 0 0 2rem 0;
    opacity: 0.9;
    line-height: 1.7;
    font-size: 1.1rem;
    color: #333333 !important;
}

.suggestion-chips {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.chip {
    background: rgba(64, 255, 170, 0.15);
    border: 1px solid rgba(64, 255, 170, 0.4);
    color: #16a34a !important;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.chip:hover {
    background: rgba(64, 255, 170, 0.25);
    border-color: #40ffaa;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(64, 255, 170, 0.3);
}

.chat-input-container {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
}

.chat-input-container textarea {
    flex: 1;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    padding: 1rem 1.2rem;
    color: #fff;
    resize: none;
    min-height: 50px;
    max-height: 120px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
}

.chat-input-container textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.chat-input-container textarea:focus {
    outline: none;
    border-color: #40ffaa;
    box-shadow: 0 0 0 3px rgba(64, 255, 170, 0.2);
}

.chat-input-container button {
    background: linear-gradient(135deg, #40ffaa 0%, #4facfe 50%, #00d4ff 100%);
    border: none;
    border-radius: 16px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
}

.chat-input-container button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(64, 255, 170, 0.4);
}

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

@keyframes pulse {
    0% { opacity: 0.7; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1.05); }
}

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Messages in AI Employee Chat - IMPROVED DESIGN */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message {
    display: flex;
    margin-bottom: 1.5rem;
    align-items: flex-start;
    gap: 1rem;
    animation: fadeIn 0.4s ease-out;
    max-width: 80%;
}

.message.user {
    flex-direction: row-reverse;
    margin-left: auto;
    margin-right: 0;
    max-width: 100%;
    width: 100%;
}

.message.assistant {
    margin-left: 0;
    margin-right: auto;
}

.message-content {
    max-width: 75%;
    padding: 1.2rem 1.5rem;
    border-radius: 18px;
    font-size: 1rem;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
}

.message.user .message-content {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.9) 0%, rgba(0, 212, 255, 0.9) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff !important;
    border-bottom-right-radius: 6px;
    box-shadow: 0 8px 32px rgba(79, 172, 254, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    margin-left: auto;
    margin-right: 0;
    width: fit-content;
    max-width: 75%;
    min-width: 0;
}

.message.assistant .message-content,
.message.assistant-message .message-content {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    color: #333333 !important;
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    margin-left: 0;
    margin-right: auto;
}

.message-text {
    margin: 0;
    word-break: break-word;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 120px; /* Prevent too-narrow bubbles */
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.6;
    overflow: hidden;
    /* Removed white-space: pre-wrap to allow HTML rendering */
}

/* Markdown styling for message content */
.message-text h1, .message-text h2, .message-text h3 {
    margin: 0.5em 0;
    color: inherit;
    font-weight: 600;
}

.message-text h1 {
    font-size: 1.3em;
}

.message-text h2 {
    font-size: 1.2em;
}

.message-text h3 {
    font-size: 1.1em;
}

.message-text ul, .message-text ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}

.message-text li {
    margin: 0.2em 0;
}

.message-text strong {
    font-weight: 600;
}

.message-text em {
    font-style: italic;
}

.message-text code {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.message-text pre {
    background: rgba(0, 0, 0, 0.1);
    padding: 1em;
    border-radius: 5px;
    overflow-x: auto;
    margin: 0.5em 0;
}

.message-text pre code {
    background: none;
    padding: 0;
}

.message-text blockquote {
    border-left: 3px solid rgba(64, 255, 170, 0.5);
    margin: 0.5em 0;
    padding-left: 1em;
    font-style: italic;
}

.message.user .message-text {
    color: #ffffff !important;
}

.message.assistant .message-text,
.message.assistant-message .message-text {
    color: #333333 !important;
}

.message-time {
    font-size: 0.8rem;
    opacity: 0.7;
    align-self: flex-end;
    margin-top: 0.5rem;
    color: #666666 !important;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 0;
}

.typing-indicator span:not(:last-child) {
    width: 8px;
    height: 8px;
    background: #40ffaa;
    border-radius: 50%;
    animation: typing-pulse 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-pulse {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1); }
}

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

/* Chat Container - Light Mode Support */
.chat-container {
  background: rgba(10, 10, 10, 0.95);
  border-radius: 0;
  overflow: hidden;
  position: relative;
}

/* 🌞 LIGHT MODE CHAT CONTAINER */
body.light-mode .chat-container {
  background: rgba(255, 255, 255, 0.95);
  color: var(--charcoal);
}

.header {
  grid-area: header;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: rgba(10, 10, 10, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 2px 15px rgba(64, 255, 170, 0.1);
  z-index: 10;
  border-bottom: 1px solid rgba(64, 255, 170, 0.2);
  position: relative;
}

/* 🌞 LIGHT MODE HEADER */
body.light-mode .header {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 15px rgba(74, 144, 226, 0.1);
  border-bottom: 1px solid rgba(74, 144, 226, 0.2);
  color: var(--charcoal);
}

/* Chat Header - Enhanced for Logo Visibility */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 2px 15px rgba(64, 255, 170, 0.1);
  border-bottom: 1px solid rgba(64, 255, 170, 0.2);
  position: relative;
  z-index: 10;
}

/* 🌞 LIGHT MODE CHAT HEADER */
body.light-mode .chat-header {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 15px rgba(74, 144, 226, 0.1);
  border-bottom: 1px solid rgba(74, 144, 226, 0.2);
  color: var(--charcoal);
}

/* Brand Container - Perfect Logo Showcase */
.brand-container {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.header-logo {
  width: 100px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  background: white;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(74, 144, 226, 0.2);
  transition: all 0.3s ease;
}

/* 🌞 LIGHT MODE HEADER LOGO */
body.light-mode .header-logo {
  background: white;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
  border: 1px solid rgba(74, 144, 226, 0.3);
}

.header-logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(74, 144, 226, 0.3);
}

/* Header Title Styling */
.header-title-placeholder {
  font-size: 1.4rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

/* 🌞 LIGHT MODE HEADER TITLE */
body.light-mode .header-title-placeholder {
  color: var(--charcoal);
}

/* Powered by Text */
.powered-by-small {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}

/* 🌞 LIGHT MODE POWERED BY */
body.light-mode .powered-by-small {
  color: rgba(26, 26, 26, 0.6);
}

/* Channel Toggle Buttons */
.channel-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
}

.channel-toggle button {
  padding: 8px 16px;
  border: 1px solid rgba(74, 144, 226, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 🌞 LIGHT MODE CHANNEL TOGGLE */
body.light-mode .channel-toggle button {
  background: rgba(255, 255, 255, 0.8);
  color: var(--charcoal);
  border: 1px solid rgba(74, 144, 226, 0.3);
}

.channel-toggle button:hover:not(.disabled) {
  background: rgba(74, 144, 226, 0.2);
  border-color: var(--primary-blue);
  transform: translateY(-1px);
}

/* 🌞 LIGHT MODE CHANNEL TOGGLE HOVER */
body.light-mode .channel-toggle button:hover:not(.disabled) {
  background: rgba(74, 144, 226, 0.1);
  border-color: var(--primary-blue);
}

.channel-toggle button.active {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}

.channel-toggle button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Sidebar - Enhanced Light Mode */
.sidebar {
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-left: 1px solid rgba(64, 255, 170, 0.2);
  padding: 24px;
  overflow-y: auto;
  position: relative;
  z-index: 5;
}

/* 🌞 LIGHT MODE SIDEBAR */
body.light-mode .sidebar {
  background: rgba(255, 255, 255, 0.9);
  border-left: 1px solid rgba(74, 144, 226, 0.2);
  color: var(--charcoal);
}

/* Sidebar Header */
.sidebar-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

/* 🌞 LIGHT MODE SIDEBAR HEADER */
body.light-mode .sidebar-header {
  border-bottom: 1px solid rgba(74, 144, 226, 0.2);
}

.sidebar-logo {
  width: 80px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  background: white;
  padding: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(74, 144, 226, 0.2);
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

/* 🌞 LIGHT MODE SIDEBAR LOGO */
body.light-mode .sidebar-logo {
  background: white;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
  border: 1px solid rgba(74, 144, 226, 0.3);
}

.sidebar-logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(74, 144, 226, 0.3);
}

/* Sidebar Title */
.sidebar-title-placeholder {
  font-size: 1.2rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

/* 🌞 LIGHT MODE SIDEBAR TITLE */
body.light-mode .sidebar-title-placeholder {
  color: var(--charcoal);
}

/* Progress Section */
.progress-section {
  margin-bottom: 30px;
}

.progress-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 15px;
}

/* 🌞 LIGHT MODE PROGRESS SECTION */
body.light-mode .progress-section h3 {
  color: var(--charcoal);
}

.progress-section p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-top: 10px;
}

/* 🌞 LIGHT MODE PROGRESS TEXT */
body.light-mode .progress-section p {
  color: rgba(26, 26, 26, 0.7);
}

/* Questionnaire Items */
.questionnaire-items h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 15px;
}

/* 🌞 LIGHT MODE QUESTIONNAIRE ITEMS */
body.light-mode .questionnaire-items h3 {
  color: var(--charcoal);
}

.questionnaire-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

/* 🌞 LIGHT MODE QUESTIONNAIRE ITEM */
body.light-mode .questionnaire-item {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(74, 144, 226, 0.2);
}

.questionnaire-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(74, 144, 226, 0.3);
  transform: translateY(-1px);
}

/* 🌞 LIGHT MODE QUESTIONNAIRE ITEM HOVER */
body.light-mode .questionnaire-item:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(74, 144, 226, 0.4);
}

.questionnaire-item .question {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

/* 🌞 LIGHT MODE QUESTION TEXT */
body.light-mode .questionnaire-item .question {
  color: var(--charcoal);
}

.questionnaire-item .answer {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* 🌞 LIGHT MODE ANSWER TEXT */
body.light-mode .questionnaire-item .answer {
  color: rgba(26, 26, 26, 0.7);
}

.empty-items {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  text-align: center;
  padding: 20px;
}

/* 🌞 LIGHT MODE EMPTY ITEMS */
body.light-mode .empty-items {
  color: rgba(26, 26, 26, 0.7);
}

/* TIMELINE SIDEBAR STYLES */
.timeline-container {
    flex: 1;
    position: relative;
    padding: 20px 0;
    overflow-y: auto;
}

.timeline-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding: 0 10px 0 48px;
}

.timeline-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.timeline-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.timeline-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 6px 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body.light-mode .timeline-title {
    color: var(--charcoal);
}

body.light-mode .timeline-hint {
    color: rgba(26, 26, 26, 0.6);
}

body.light-mode .timeline-count {
    color: var(--charcoal);
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(74, 144, 226, 0.2);
}

.timeline-line {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.timeline-items {
    position: relative;
    z-index: 3;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    position: relative;
    padding-left: 50px;
    transition: all 0.3s ease;
}

.status-light {
    position: absolute;
    left: 0;
    top: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 4;
    background: rgba(255, 255, 255, 0.05);
}

.status-light::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.timeline-item.pending {
    opacity: 0.5;
}

.timeline-item.pending .status-light::after {
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item.current .status-light {
    background: rgba(74, 144, 226, 0.2);
    border-color: #4A90E2;
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.6);
    animation: pulse-ring 2s ease-in-out infinite;
}

.timeline-item.current .status-light::after {
    background: #4A90E2;
    box-shadow: 0 0 10px rgba(74, 144, 226, 1);
    animation: blink-light 1.5s ease-in-out infinite;
}

@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 20px rgba(74, 144, 226, 0.6); }
    50% { box-shadow: 0 0 30px rgba(74, 144, 226, 1); }
}

@keyframes blink-light {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.timeline-item.completed .status-light {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

.timeline-item.completed .status-light::after {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
}

.timeline-item.completed .status-light::before {
    content: '✓';
    position: absolute;
    color: #10b981;
    font-size: 14px;
    font-weight: bold;
    z-index: 5;
}

.question-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
    border-left: 3px solid #4A90E2;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.timeline-item.pending .question-card {
    border-left-color: rgba(255, 255, 255, 0.2);
}

.timeline-item.current .question-card {
    border-left-color: #4A90E2;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

.timeline-item.completed .question-card {
    border-left-color: #10b981;
}

.question-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.question-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-text {
    color: white;
    font-weight: 500;
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.timeline-item.pending .question-text {
    color: rgba(255, 255, 255, 0.5);
}

.answer-text {
    color: rgba(255, 255, 255, 0.8);
    margin: 8px 0 0 0;
    font-size: 0.85rem;
    line-height: 1.4;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Light Mode Timeline */
body.light-mode .timeline-line {
    background: rgba(0, 0, 0, 0.1);
}

body.light-mode .timeline-item.pending {
    opacity: 0.6;
}

body.light-mode .question-text,
body.light-mode .question-number {
    color: var(--charcoal);
}

body.light-mode .timeline-item.pending .question-text {
    color: rgba(26, 26, 26, 0.5);
}

body.light-mode .answer-text {
    color: rgba(26, 26, 26, 0.8);
}

body.light-mode .question-card {
    background: rgba(255, 255, 255, 0.8);
}

body.light-mode .timeline-item.current .question-card {
    background: rgba(74, 144, 226, 0.1);
}

body.light-mode .timeline-item.completed .question-card {
    background: rgba(16, 185, 129, 0.05);
}
body.light-mode .timeline-item.completed .question-card {
    background: rgba(16, 185, 129, 0.05);
}

/* Intelligence Cards - Complete Wireframe */
.intel-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-left: 4px solid #e0e0e0;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.intel-card:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.intel-card.completed {
    border-left-color: #4CAF50;
}

.intel-card.loading {
    border-left-color: #FF9800;
}

.intel-card.error {
    border-left-color: #f44336;
}

.intel-card.pending {
    border-left-color: #9E9E9E;
}

.intel-card .card-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.intel-card .card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.intel-card .card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.intel-card .card-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.intel-card .approval-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.intel-card .approval-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.intel-card .approval-badge.approved {
    background: rgba(34, 197, 94, 0.2);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.intel-card .approval-badge.pending {
    background: rgba(251, 191, 36, 0.2);
    color: #d97706;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.intel-card .card-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
}

.intel-card .card-content {
    padding: 15px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.intel-card .card-content:hover {
    background: rgba(255, 255, 255, 0.05);
}

.intel-card .card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.intel-card .expand-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(74, 144, 226, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.intel-card .expand-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(74, 144, 226, 0.3);
    transform: translateY(-1px);
}

/* Intelligence Tooltip */
.intelligence-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 0.5rem;
}

.tooltip-icon {
    background: rgba(74, 144, 226, 0.2);
    color: #4A90E2;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: help;
    transition: all 0.2s ease;
}

.tooltip-icon:hover {
    background: rgba(74, 144, 226, 0.3);
    transform: scale(1.1);
}

.tooltip-text {
    position: fixed !important;
    background: rgba(26, 26, 26, 0.98) !important;
    color: #ffffff !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    font-size: 0.875rem !important;
    white-space: normal !important;
    max-width: 300px !important;
    width: max-content !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
    z-index: 999999 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(74, 144, 226, 0.3) !important;
    pointer-events: none !important;
    display: block !important;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(26, 26, 26, 0.98);
}

.intelligence-tooltip:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
}

/* Button Styles for Intelligence Cards */
.intel-card .edit-btn, 
.intel-card .approve-btn, 
.intel-card .approved-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.intel-card .edit-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(74, 144, 226, 0.3);
}

.intel-card .edit-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(74, 144, 226, 0.5);
    transform: translateY(-1px);
}

.intel-card .approve-btn {
    background: rgba(34, 197, 94, 0.2);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.intel-card .approve-btn:hover {
    background: rgba(34, 197, 94, 0.3);
    transform: translateY(-1px);
}

.intel-card .approved-btn {
    background: rgba(107, 114, 128, 0.2);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.3);
    cursor: not-allowed;
}

.proceed-btn.ready {
    background: linear-gradient(45deg, #10b981, #059669);
    animation: pulse-ready 2s ease-in-out infinite;
}

@keyframes pulse-ready {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}