/* ==========================================================================
   SPRINTFLOWS AUTOMATIONS — PRODUCTION DESIGN SYSTEM
   Modern AI / SaaS Agency & n8n Workflow Audit Platform
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand Color Palette */
  --bg-dark: #070B19;
  --bg-darker: #040711;
  --bg-surface: #0C132A;
  --bg-surface-elevated: #111B3C;
  --bg-card: rgba(14, 23, 49, 0.72);
  --bg-card-hover: rgba(22, 36, 75, 0.85);
  
  --primary-blue: #0066FF;
  --electric-blue: #00D2FF;
  --deep-blue: #0A2540;
  --vibrant-green: #00E599;
  --lime-green: #70FF00;
  --cyan-accent: #38BDF8;
  
  --danger-red: #EF4444;
  --warning-amber: #F59E0B;
  --info-sky: #0EA5E9;
  --success-emerald: #10B981;
  
  /* Text Colors */
  --text-primary: #FFFFFF;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-bright: #F8FAFC;
  --text-accent: #00E599;
  
  /* Borders & Glassmorphism */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(56, 189, 248, 0.18);
  --border-card-hover: rgba(0, 229, 153, 0.45);
  --border-glow: rgba(0, 210, 255, 0.6);
  --glass-blur: blur(18px);
  
  /* Gradients */
  --grad-primary: linear-gradient(135deg, #0066FF 0%, #00D2FF 50%, #00E599 100%);
  --grad-green-cyan: linear-gradient(135deg, #00D2FF 0%, #00E599 100%);
  --grad-blue-dark: linear-gradient(180deg, #0C1735 0%, #070B19 100%);
  --grad-hero-glow: radial-gradient(circle at 50% 20%, rgba(0, 102, 255, 0.18) 0%, rgba(0, 229, 153, 0.08) 35%, transparent 70%);
  --grad-card-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
  
  /* Shadows & Glows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow-blue: 0 0 28px rgba(0, 102, 255, 0.35);
  --shadow-glow-green: 0 0 28px rgba(0, 229, 153, 0.35);
  --shadow-glow-cyan: 0 0 28px rgba(0, 210, 255, 0.35);
  
  /* Typography */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Spacing & Layout */
  --container-max: 1240px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   CSS Reset & Base Rules
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 102, 255, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 85% 60%, rgba(0, 229, 153, 0.06), transparent),
    radial-gradient(ellipse 50% 30% at 15% 80%, rgba(0, 210, 255, 0.05), transparent);
  background-attachment: fixed;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-bright);
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.75rem); font-weight: 800; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.85rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 0.95rem; }

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

p.lead {
  font-size: 1.2rem;
  line-height: 1.7;
  color: #CBD5E1;
}

a {
  color: var(--electric-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--vibrant-green);
}

ul, ol {
  list-style-position: inside;
  color: var(--text-secondary);
}

img, svg {
  display: block;
  max-width: 100%;
}

code, pre {
  font-family: var(--font-mono);
}

/* ==========================================================================
   Utility Classes & Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-narrow {
  max-width: 880px;
}

.container-wide {
  max-width: 1380px;
}

.section {
  padding-top: clamp(4rem, 8vw, 7.5rem);
  padding-bottom: clamp(4rem, 8vw, 7.5rem);
  position: relative;
}

.section-sm {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem auto;
}

.section-header.text-left {
  text-align: left;
  margin-left: 0;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(0, 229, 153, 0.1);
  border: 1px solid rgba(0, 229, 153, 0.3);
  color: var(--vibrant-green);
  margin-bottom: 1.25rem;
}

.section-tag.blue-tag {
  background: rgba(0, 102, 255, 0.12);
  border-color: rgba(0, 210, 255, 0.3);
  color: var(--electric-blue);
}

.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.gradient-text-green {
  background: var(--grad-green-cyan);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.w-full { width: 100%; }
.relative { position: relative; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 0.975rem;
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  line-height: 1;
}

.btn-primary {
  background: var(--grad-primary);
  color: #040711;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0, 102, 255, 0.28);
}

.btn-primary:hover {
  color: #040711;
  box-shadow: 0 6px 28px rgba(0, 229, 153, 0.45);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  color: var(--text-bright);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-card);
  color: var(--electric-blue);
}

.btn-outline:hover {
  background: rgba(0, 210, 255, 0.08);
  border-color: var(--vibrant-green);
  color: var(--vibrant-green);
  transform: translateY(-2px);
}

.btn-glow {
  background: rgba(0, 229, 153, 0.12);
  border: 1px solid var(--vibrant-green);
  color: var(--vibrant-green);
  box-shadow: 0 0 20px rgba(0, 229, 153, 0.2);
}

.btn-glow:hover {
  background: var(--vibrant-green);
  color: #040711;
  box-shadow: var(--shadow-glow-green);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.55rem 1.15rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 1.05rem 2.25rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn:disabled, .btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ==========================================================================
   Navigation Bar (Sticky & Premium)
   ========================================================================== */

.navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(7, 11, 25, 0.82);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(4, 7, 17, 0.94);
  border-bottom-color: rgba(56, 189, 248, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.75rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo {
  height: 2.4rem;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 0.25rem;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-bright);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-primary);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 4.75rem;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 11, 25, 0.98);
  backdrop-filter: blur(24px);
  padding: 2rem 1.5rem;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 999;
  border-top: 1px solid var(--border-subtle);
  overflow-y: auto;
}

.mobile-drawer.open {
  display: flex;
}

.mobile-nav-link {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Cards & Glassmorphism
   ========================================================================== */

.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--grad-card-overlay);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -10px rgba(0, 102, 255, 0.2);
}

.feature-card {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.feature-icon-wrapper {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-md);
  background: rgba(0, 102, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--electric-blue);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all var(--transition-normal);
}

.feature-card:hover .feature-icon-wrapper {
  background: rgba(0, 229, 153, 0.15);
  border-color: var(--vibrant-green);
  color: var(--vibrant-green);
  box-shadow: var(--shadow-glow-green);
}

.feature-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
}

.feature-card p {
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* ==========================================================================
   Hero Animated Workflow Component
   ========================================================================== */

.hero-workflow-wrapper {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(0, 102, 255, 0.15);
  overflow: hidden;
}

.hero-workflow-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 229, 153, 0.05), transparent 70%);
  pointer-events: none;
}

.workflow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.workflow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  background: rgba(0, 229, 153, 0.1);
  color: var(--vibrant-green);
  border: 1px solid rgba(0, 229, 153, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

.status-dot-live {
  width: 8px;
  height: 8px;
  background: var(--vibrant-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--vibrant-green);
  animation: pulse-glow 2s infinite;
}

.workflow-grid-flow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.wf-node {
  background: rgba(14, 23, 49, 0.85);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.2rem 0.8rem;
  text-align: center;
  position: relative;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.wf-node:hover, .wf-node.active {
  border-color: var(--vibrant-green);
  background: rgba(18, 32, 66, 0.95);
  box-shadow: 0 0 20px rgba(0, 229, 153, 0.3);
  transform: translateY(-3px);
}

.wf-node-icon {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.wf-node-title {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-bright);
  font-family: var(--font-heading);
}

.wf-node-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.wf-connector {
  height: 3px;
  background: linear-gradient(90deg, #0066FF, #00E599);
  position: relative;
  border-radius: 2px;
  overflow: hidden;
}

.wf-connector::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 0;
  width: 10px;
  height: 9px;
  background: #FFFFFF;
  box-shadow: 0 0 10px #00E599, 0 0 5px #00D2FF;
  border-radius: 50%;
  animation: flow-packet 2.5s infinite linear;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: #CBD5E1;
  margin-bottom: 0.5rem;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: rgba(10, 16, 36, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--vibrant-green);
  box-shadow: 0 0 0 3px rgba(0, 229, 153, 0.18);
  background: rgba(12, 20, 45, 0.95);
}

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2300D2FF'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 2.75rem;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.form-error {
  font-size: 0.8rem;
  color: var(--danger-red);
  margin-top: 0.35rem;
}

/* ==========================================================================
   Badges & Indicators
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.775rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  line-height: 1.2;
}

.badge-green {
  background: rgba(0, 229, 153, 0.12);
  color: var(--vibrant-green);
  border: 1px solid rgba(0, 229, 153, 0.3);
}

.badge-blue {
  background: rgba(0, 102, 255, 0.15);
  color: var(--cyan-accent);
  border: 1px solid rgba(0, 210, 255, 0.3);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-red {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-purple {
  background: rgba(168, 85, 247, 0.12);
  color: #C084FC;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

/* ==========================================================================
   Score Meters & Gauges
   ========================================================================== */

.score-gauge-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.score-circle-svg {
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
}

.score-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 10;
}

.score-circle-bar {
  fill: none;
  stroke: url(#sf-blue-green);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 60;
  transition: stroke-dashoffset 1.5s ease-out;
}

.score-circle-text {
  position: absolute;
  text-align: center;
}

.score-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1;
}

.score-max {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.progress-bar-wrapper {
  margin-bottom: 1.25rem;
}

.progress-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--grad-primary);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Dashboard Layout & SaaS Interface
   ========================================================================== */

.dashboard-layout {
  display: flex;
  min-height: calc(100vh - 4.75rem);
}

.dashboard-sidebar {
  width: 260px;
  background: rgba(8, 13, 30, 0.95);
  border-right: 1px solid var(--border-subtle);
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.925rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.sidebar-nav-item:hover, .sidebar-nav-item.active {
  background: rgba(0, 102, 255, 0.15);
  border: 1px solid rgba(0, 210, 255, 0.25);
  color: var(--text-bright);
}

.sidebar-nav-item.active {
  color: var(--vibrant-green);
  border-color: rgba(0, 229, 153, 0.4);
}

.dashboard-content {
  flex-grow: 1;
  padding: 2.5rem clamp(1.5rem, 3vw, 3rem);
  background: transparent;
  overflow-y: auto;
}

.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Interactive Public & Portal AI Chat Widget
   ========================================================================== */

.ai-chat-floater {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10000;
}

.ai-chat-btn {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--grad-primary);
  border: none;
  box-shadow: 0 8px 30px rgba(0, 102, 255, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #040711;
  transition: all var(--transition-normal);
}

.ai-chat-btn:hover {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 10px 40px rgba(0, 229, 153, 0.6);
}

.ai-chat-window {
  position: fixed;
  bottom: 6.5rem;
  right: 2rem;
  width: 380px;
  max-width: calc(100vw - 4rem);
  height: 540px;
  max-height: calc(100vh - 8rem);
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 50px rgba(0, 102, 255, 0.25);
  display: none;
  flex-direction: column;
  z-index: 10000;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.ai-chat-window.active {
  display: flex;
}

.ai-chat-header {
  padding: 1.25rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-chat-body {
  flex-grow: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ai-msg {
  max-width: 85%;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.5;
}

.ai-msg-bot {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: #E2E8F0;
  border-bottom-left-radius: 4px;
}

.ai-msg-user {
  align-self: flex-end;
  background: var(--grad-primary);
  color: #040711;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}

.ai-chat-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 0.5rem;
  background: var(--bg-surface-elevated);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer-main {
  background: var(--bg-darker);
  border-top: 1px solid var(--border-subtle);
  padding: 5rem 0 2.5rem 0;
  margin-top: auto;
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-brand p {
  max-width: 320px;
  margin-top: 1rem;
  font-size: 0.925rem;
}

.footer-column h4 {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  color: var(--text-bright);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--vibrant-green);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Toasts & Modal Overlay
   ========================================================================== */

.toast-container {
  position: fixed;
  top: 5.5rem;
  right: 1.5rem;
  z-index: 11000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  color: var(--text-bright);
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  animation: slide-in 0.3s ease-out;
}

.toast.toast-success {
  border-color: var(--vibrant-green);
  box-shadow: 0 0 20px rgba(0, 229, 153, 0.25);
}

.toast.toast-error {
  border-color: var(--danger-red);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.25);
}
