/* ==========================================================================
   SCALENT PREMIUM SAAS DESIGN SYSTEM
   Minimal Luxury Meets Next-Generation SaaS
   Palette: Warm Off-White (#F7F6F2) · Deep Ink (#151C28) · Electric Blue (#315BFF)
   ========================================================================== */

:root {
  /* Master Creative Direction: Enterprise Obsidian Dark Canvas */
  --scalent-bg: #030407;
  --scalent-bg-alt: #080A0F;
  --scalent-surface: #0B0D12;
  --scalent-surface-subtle: #080A0F;
  --scalent-surface-card: #11141B;
  --scalent-surface-elevated: #0B0D12;
  --scalent-surface-dark: #080A0F;
  --scalent-surface-dark-card: #11141B;
  
  /* Typography Colors - High-Contrast Accessible Dark Tokens */
  --scalent-ink: #F5F7FA;
  --scalent-ink-light: #F5F7FA;
  --scalent-ink-muted: #A0A6B5;
  --scalent-ink-faint: #737B8C;
  --scalent-ink-dim: #737B8C;
  
  /* Electric Blue Master Brand Accent */
  --scalent-blue: #1558c9;
  --scalent-blue-hover: #124ab0;
  --scalent-blue-subtle: rgba(21, 88, 201, 0.15);
  --scalent-blue-glow: rgba(21, 88, 201, 0.35);
  --scalent-blue-border: rgba(21, 88, 201, 0.35);
  
  /* Obsidian Borders & Hairlines */
  --scalent-border: #252A35;
  --scalent-border-subtle: rgba(37, 42, 53, 0.8);
  --scalent-border-hover: rgba(255, 255, 255, 0.2);
  --scalent-border-focus: #1558c9;

  /* Shadows - Minimal Luxury */
  --scalent-shadow-sm: 0 1px 2px rgba(21, 28, 40, 0.04);
  --scalent-shadow-card: 0 1px 3px rgba(21, 28, 40, 0.05), 0 6px 18px -4px rgba(21, 28, 40, 0.04);
  --scalent-shadow-card-hover: 0 4px 14px rgba(21, 28, 40, 0.07), 0 20px 36px -8px rgba(21, 28, 40, 0.09);
  --scalent-shadow-btn-primary: 0 1px 3px rgba(49, 91, 255, 0.3), 0 4px 12px rgba(49, 91, 255, 0.2);
  --scalent-shadow-btn-hover: 0 2px 6px rgba(49, 91, 255, 0.35), 0 8px 20px rgba(49, 91, 255, 0.25);

  /* Status Colors */
  --scalent-emerald: #059669;
  --scalent-emerald-bg: rgba(5, 150, 105, 0.08);
  --scalent-emerald-border: rgba(5, 150, 105, 0.25);
  
  --scalent-amber: #D97706;
  --scalent-amber-bg: rgba(217, 119, 6, 0.08);
  --scalent-amber-border: rgba(217, 119, 6, 0.25);
  
  --scalent-rose: #E11D48;
  --scalent-rose-bg: rgba(225, 29, 72, 0.08);
  --scalent-rose-border: rgba(225, 29, 72, 0.25);

  /* Mathematical Radius Scale */
  --scalent-radius-xs: 4px;
  --scalent-radius-sm: 6px;
  --scalent-radius-md: 10px;
  --scalent-radius-lg: 14px;
  --scalent-radius-xl: 18px;
  --scalent-radius-2xl: 24px;
  --scalent-radius-full: 9999px;

  /* Intentional System Typography (Zero External Google Fonts) */
  --scalent-font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --scalent-font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --scalent-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* =========================================================================
     MANDATORY SCALENT ENTERPRISE BRAND TOKENS (Linear/Stripe Inspired)
     Obsidian: #030407 | Deep Panels: #080a10 | Subtle Borders: #1c2333
     Electric Blue: #1558c9 | Neon Lime: #d4ff24
     Supporting: Sidebar #080A0F | Elevated #0B0D12 | Card #11141B | Hover #171B24
     Typography: Primary #F5F7FA | Secondary #A0A6B5 | Muted #737B8C
     ========================================================================= */
  --scalent-obsidian: #030407;
  --scalent-panel-deep: #080a10;
  --scalent-border-subtle: #1c2333;
  --scalent-primary-bg: #030407;
  --scalent-electric-blue: #1558c9;
  --scalent-electric-blue-hover: #124ab0;
  --scalent-neon-lime: #d4ff24;
  --scalent-neon-lime-hover: #c0ee15;
  --scalent-neon-lime-glow: rgba(212, 255, 36, 0.25);
  --scalent-acid-lime: #d4ff24;
  --scalent-acid-lime-hover: #c0ee15;

  --scalent-sidebar: #080A0F;
  --scalent-elevated: #0B0D12;
  --scalent-card: #11141B;
  --scalent-hover: #171B24;
  --scalent-border-dark: #252A35;

  --scalent-text-primary: #F5F7FA;
  --scalent-text-secondary: #A0A6B5;
  --scalent-text-muted-dark: #737B8C;

  /* Reference-Driven Midnight Obsidian Palette (Mapped to Master Brand Tokens) */
  --scalent-obsidian-bg: #030407;
  --scalent-obsidian-surface: #0B0D12;
  --scalent-obsidian-card: #11141B;
  --scalent-obsidian-card-hover: #171B24;
  --scalent-obsidian-elevated: #0B0D12;
  --scalent-obsidian-border: #252A35;
  --scalent-obsidian-border-hover: rgba(255, 255, 255, 0.2);

  /* Reference Vibrant Brand Accents */
  --scalent-violet-brand: #4F46E5;
  --scalent-violet-light: #6366F1;
  --scalent-violet-hover: #4338CA;
  --scalent-violet-glow: rgba(79, 70, 229, 0.4);

  /* Reference Multi-Channel Category Accents */
  --scalent-emerald-glow: rgba(16, 185, 129, 0.2);
  --scalent-cyan-glow: rgba(6, 182, 212, 0.2);
  --scalent-purple-glow: rgba(139, 92, 246, 0.2);
  --scalent-blue-glow: rgba(59, 130, 246, 0.2);

  /* Legacy & Dark Token Aliases (Preserving Existing UI Contracts & Automated Audits) */
  --scalent-navy: #080C14;
  --scalent-dark: #080C14;
  --scalent-indigo: #4F46E5;
  --scalent-indigo-light: #6366F1;
  --scalent-indigo-hover: #4338CA;
  --scalent-indigo-muted: rgba(79, 70, 229, 0.12);
  --scalent-indigo-glow: rgba(79, 70, 229, 0.35);
  --scalent-cyan: #06B6D4;
  --scalent-cyan-light: #38BDF8;
  --scalent-text-pure: #FFFFFF;
  --scalent-text-main: #F1F5F9;
  --scalent-text-muted: #94A3B8;
  --scalent-text-faint: #64748B;
  --scalent-text-dim: #475569;
}
/* Dark Mode Master Theme Overrides */
html.dark, .dark {
  --scalent-bg: #030407;
  --scalent-bg-alt: #080A0F;
  --scalent-surface: #0B0D12;
  --scalent-surface-subtle: #080A0F;
  --scalent-surface-card: #11141B;
  --scalent-surface-elevated: #0B0D12;
  --scalent-border: #252A35;
  --scalent-border-subtle: rgba(37, 42, 53, 0.8);
  --scalent-text-main: #F5F7FA;
  --scalent-text-muted: #A0A6B5;
  --scalent-text-faint: #737B8C;
}

/* Base Document Configuration */
body {
  font-family: var(--scalent-font-sans);
  background-color: var(--scalent-bg);
  color: var(--scalent-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Minimal Luxury Warm Grids & Micro-Textures */
.saas-grid {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(21, 28, 40, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(21, 28, 40, 0.035) 1px, transparent 1px);
}

.saas-dots {
  background-size: 24px 24px;
  background-image: radial-gradient(rgba(21, 28, 40, 0.08) 1px, transparent 1px);
}

/* Dark Accent Surfaces (for code panels, telemetry consoles, terminals) */
.dark-panel {
  background: var(--scalent-surface-dark);
  color: #F1F5F9;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   CARDS & SURFACES
   ========================================================================== */

.hairline-card {
  background: var(--scalent-card, #11141B);
  border: 1px solid var(--scalent-border, #252A35);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 6px 18px -4px rgba(0, 0, 0, 0.3);
  border-radius: var(--scalent-radius-lg);
  color: var(--scalent-text-primary, #F5F7FA);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hairline-card:hover {
  background: var(--scalent-hover, #171B24);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 20px 36px -8px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.hairline-card-static {
  background: var(--scalent-card, #11141B);
  border: 1px solid var(--scalent-border, #252A35);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  border-radius: var(--scalent-radius-lg);
  color: var(--scalent-text-primary, #F5F7FA);
}

.hairline-card-luxury {
  background: var(--scalent-card, #11141B);
  border: 1px solid var(--scalent-border, #252A35);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 6px 18px -4px rgba(0, 0, 0, 0.3);
  border-radius: 14px;
  color: var(--scalent-text-primary, #F5F7FA);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hairline-card-luxury:hover {
  background: var(--scalent-hover, #171B24);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 20px 36px -8px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

/* Dark Mode Overrides for Authenticated Console/Portal (html.dark) */
html.dark body,
.dark body {
  background-color: var(--scalent-primary-bg, #030407);
  color: var(--scalent-text-primary, #F5F7FA);
}

html.dark .hairline-card,
.dark .hairline-card {
  background: var(--scalent-card, #11141B);
  border-color: var(--scalent-border-dark, #252A35);
  color: var(--scalent-text-primary, #F5F7FA);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.04);
}

html.dark .hairline-card:hover,
.dark .hairline-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: var(--scalent-hover, #171B24);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
}

html.dark .hairline-card-static,
.dark .hairline-card-static {
  background: var(--scalent-card, #11141B);
  border-color: var(--scalent-border-dark, #252A35);
  color: var(--scalent-text-primary, #F5F7FA);
}

html.dark a.hover\:text-\[\#151C28\]:hover,
.dark a.hover\:text-\[\#151C28\]:hover {
  color: #F5F7FA !important;
}

html.dark .saas-grid,
.dark .saas-grid {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

.elevated-card {
  background: var(--scalent-surface, #0B0D12);
  border: 1px solid var(--scalent-border, #252A35);
  box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.5);
  border-radius: var(--scalent-radius-xl);
  color: var(--scalent-text-primary, #F5F7FA);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

/* Scalent Enterprise Master Buttons */
.btn-scalent-lime {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--scalent-acid-lime, #d4ff24);
  color: #030407 !important;
  font-family: var(--scalent-font-sans);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border-radius: var(--scalent-radius-md, 8px);
  padding: 0.625rem 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 16px rgba(212, 255, 36, 0.15);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-scalent-lime:hover {
  background-color: var(--scalent-acid-lime-hover, #c0ee15);
  color: #030407 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 255, 36, 0.25);
}

.btn-scalent-lime:active {
  transform: scale(0.98);
}

.btn-scalent-lime:focus-visible {
  outline: 2px solid var(--scalent-acid-lime, #d4ff24);
  outline-offset: 2px;
}

.btn-scalent-blue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--scalent-electric-blue, #1558c9);
  color: var(--scalent-text-primary, #F5F7FA) !important;
  font-family: var(--scalent-font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25rem;
  border-radius: var(--scalent-radius-md, 8px);
  padding: 0.625rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 16px rgba(21, 88, 201, 0.2);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-scalent-blue:hover {
  background-color: var(--scalent-electric-blue-hover, #124ab0);
  color: #FFFFFF !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 20px rgba(21, 88, 201, 0.35);
}

.btn-scalent-blue:active {
  transform: scale(0.98);
}

.btn-scalent-blue:focus-visible {
  outline: 2px solid var(--scalent-electric-blue, #1558c9);
  outline-offset: 2px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--scalent-blue);
  color: #FFFFFF !important;
  font-family: var(--scalent-font-sans);
  font-weight: 500;
  border-radius: var(--scalent-radius-md);
  box-shadow: var(--scalent-shadow-btn-primary);
  border: none;
  cursor: pointer;
  transition: all 0.18s ease-in-out;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--scalent-blue-hover);
  box-shadow: var(--scalent-shadow-btn-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--scalent-card, #11141B);
  border: 1px solid var(--scalent-border, #252A35);
  color: var(--scalent-text-primary, #F5F7FA);
  font-family: var(--scalent-font-sans);
  font-weight: 500;
  border-radius: var(--scalent-radius-md);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: all 0.18s ease-in-out;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--scalent-hover, #171B24);
  border-color: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.btn-secondary:active {
  transform: scale(0.98);
}

.btn-luxury-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--scalent-blue, #1558c9);
  color: #FFFFFF !important;
  font-family: var(--scalent-font-sans);
  font-weight: 600;
  border-radius: var(--scalent-radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(21, 88, 201, 0.3);
  border: none;
  cursor: pointer;
  transition: all 0.18s ease-in-out;
  text-decoration: none;
}

.btn-luxury-primary:hover {
  background: var(--scalent-blue-hover, #124ab0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 8px 20px rgba(21, 88, 201, 0.4);
  transform: translateY(-1px);
}

.btn-luxury-primary:active {
  transform: scale(0.98);
}

.btn-luxury-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--scalent-card, #11141B);
  color: var(--scalent-text-primary, #F5F7FA);
  font-family: var(--scalent-font-sans);
  font-weight: 500;
  border: 1px solid var(--scalent-border, #252A35);
  border-radius: var(--scalent-radius-md);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: all 0.18s ease-in-out;
  text-decoration: none;
}

.btn-luxury-secondary:hover {
  background: var(--scalent-hover, #171B24);
  border-color: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.btn-luxury-secondary:active {
  transform: scale(0.98);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--scalent-text-muted);
  font-weight: 500;
  border-radius: var(--scalent-radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
}

/* ==========================================================================
   INPUTS & FORM CONTROLS
   ========================================================================== */

.saas-input,
.saas-select,
.saas-textarea {
  width: 100%;
  background: var(--scalent-elevated, #0B0D12);
  border: 1px solid var(--scalent-border-dark, #252A35);
  color: var(--scalent-text-primary, #F5F7FA);
  border-radius: var(--scalent-radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-family: var(--scalent-font-sans);
  transition: all 0.15s ease-in-out;
}

.saas-input::placeholder,
.saas-textarea::placeholder {
  color: var(--scalent-text-muted-dark, #737B8C);
}

.saas-input:focus,
.saas-select:focus,
.saas-textarea:focus {
  outline: none;
  border-color: var(--scalent-electric-blue, #1558c9);
  box-shadow: 0 0 0 2px rgba(21, 88, 201, 0.25);
  box-shadow: 0 0 0 1px var(--scalent-indigo), 0 0 12px -2px rgba(79, 70, 229, 0.3);
}

.saas-label {
  display: block;
  font-family: var(--scalent-font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--scalent-text-muted);
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   BADGES & PILLS
   ========================================================================== */

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--scalent-radius-full);
  font-family: var(--scalent-font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.badge-live {
  background: rgba(212, 255, 36, 0.1);
  border: 1px solid rgba(212, 255, 36, 0.3);
  color: #d4ff24;
}

.badge-live-lime {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(212, 255, 36, 0.1);
  border: 1px solid rgba(212, 255, 36, 0.3);
  color: #d4ff24;
  border-radius: var(--scalent-radius-full);
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--scalent-font-mono);
}

.pulse-dot-lime {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: #d4ff24;
  box-shadow: 0 0 8px rgba(212, 255, 36, 0.7);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.text-neon-lime,
.text-scalent-lime {
  color: #d4ff24 !important;
}

.bg-neon-lime,
.bg-scalent-lime {
  background-color: #d4ff24 !important;
  color: #030407 !important;
}

.border-neon-lime,
.border-scalent-lime {
  border-color: #d4ff24 !important;
}

.metric-highlight-lime {
  color: #d4ff24 !important;
  text-shadow: 0 0 20px rgba(212, 255, 36, 0.25);
}

.badge-pending {
  background: var(--scalent-amber-bg);
  border: 1px solid var(--scalent-amber-border);
  color: var(--scalent-amber);
}

.badge-danger {
  background: var(--scalent-rose-bg);
  border: 1px solid var(--scalent-rose-border);
  color: var(--scalent-rose);
}

.badge-neutral {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--scalent-border);
  color: var(--scalent-text-muted);
}

.badge-indigo {
  background: var(--scalent-indigo-muted);
  border: 1px solid rgba(79, 70, 229, 0.35);
  color: var(--scalent-indigo-light);
}

/* ==========================================================================
   TABLES & DATA GRIDS
   ========================================================================== */

.saas-table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--scalent-border);
  border-radius: var(--scalent-radius-lg);
  background: var(--scalent-surface);
}

.saas-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8125rem;
}

.saas-table th {
  padding: 0.875rem 1rem;
  font-family: var(--scalent-font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--scalent-text-faint);
  border-bottom: 1px solid var(--scalent-border);
  background: rgba(15, 23, 42, 0.6);
}

.saas-table td {
  padding: 0.875rem 1rem;
  color: var(--scalent-text-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.saas-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   CODE & TELEMETRY PANELS
   ========================================================================== */

.code-panel {
  background: #090D18;
  border: 1px solid var(--scalent-border);
  border-radius: var(--scalent-radius-md);
  padding: 1rem;
  font-family: var(--scalent-font-mono);
  font-size: 0.75rem;
  color: var(--scalent-text-main);
  overflow-x: auto;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.6875rem;
  color: var(--scalent-text-faint);
}

/* ==========================================================================
   ACCESSIBILITY & UTILITIES
   ========================================================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--scalent-indigo-light) !important;
  outline-offset: 2px !important;
}

.tabular-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Modern Accessible Reduced Motion (Modern Web Guidance Compliant) */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .animate-pulse,
  .animate-subtle-pulse,
  .animate-hero-drift,
  .ambient-glow-orb,
  .scalent-spinner,
  .scalent-spinner-track {
    animation: none !important;
    transform: none !important;
  }
}

/* ==========================================================================
   SCALENT MODAL & NATIVE DIALOG SYSTEM
   ========================================================================== */

dialog.scalent-dialog {
  background: transparent;
  border: none;
  padding: 0;
  margin: auto;
  max-width: 95vw;
  color: var(--scalent-text-main);
  overflow: visible;
  outline: none;
}

dialog.scalent-dialog::backdrop {
  background: rgba(7, 10, 18, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: scalent-fade-in 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.scalent-modal-card {
  background: var(--scalent-card, #11141B);
  border: 1px solid var(--scalent-border-dark, #252A35);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
  border-radius: var(--scalent-radius-xl);
  animation: scalent-scale-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.scalent-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--scalent-border-dark, #252A35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--scalent-elevated, #0B0D12);
}

.scalent-modal-body {
  padding: 1.5rem;
  max-height: calc(85vh - 130px);
  overflow-y: auto;
  color: var(--scalent-text-primary, #F5F7FA);
}

.scalent-modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--scalent-border-dark, #252A35);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--scalent-elevated, #0B0D12);
}

/* ==========================================================================
   SCALENT SLIDE-OVER DETAILS DRAWER
   ========================================================================== */

.scalent-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 7, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9990;
  animation: scalent-fade-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.scalent-drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 580px;
  background: var(--scalent-card, #11141B);
  border-left: 1px solid var(--scalent-border-dark, #252A35);
  box-shadow: -10px 0 30px -5px rgba(0, 0, 0, 0.8);
  z-index: 9991;
  display: flex;
  flex-direction: column;
  animation: scalent-slide-left 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

.scalent-drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--scalent-border-dark, #252A35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--scalent-elevated, #0B0D12);
}

.scalent-drawer-body {
  padding: 1.5rem;
  flex: 1 1 auto;
  overflow-y: auto;
}

.scalent-drawer-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--scalent-border);
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ==========================================================================
   SCALENT TOAST NOTIFICATION STACK
   ========================================================================== */

.scalent-toast-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  max-width: 420px;
  width: calc(100vw - 2.5rem);
  pointer-events: none;
}

.scalent-toast {
  pointer-events: auto;
  background: #111827;
  border: 1px solid var(--scalent-border);
  border-radius: var(--scalent-radius-lg);
  padding: 0.875rem 1.125rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: scalent-toast-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.2s ease-in-out;
  position: relative;
  overflow: hidden;
}

.scalent-toast-success {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, #111827 60%);
}

.scalent-toast-error {
  border-color: rgba(244, 63, 94, 0.4);
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.12) 0%, #111827 60%);
}

.scalent-toast-warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, #111827 60%);
}

.scalent-toast-info {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12) 0%, #111827 60%);
}

.scalent-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: currentColor;
  opacity: 0.4;
  width: 100%;
  transform-origin: left;
}

/* ==========================================================================
   CONTEXTUAL ACTION MENU (DROPDOWN)
   ========================================================================== */

.scalent-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.25rem;
  min-width: 200px;
  background: var(--scalent-card, #11141B);
  border: 1px solid var(--scalent-border-dark, #252A35);
  border-radius: var(--scalent-radius-md);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 0.375rem;
  z-index: 50;
  animation: scalent-scale-in 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.scalent-menu-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-family: var(--scalent-font-sans);
  color: var(--scalent-text-secondary, #A0A6B5);
  border-radius: var(--scalent-radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease-in-out;
}

.scalent-menu-item:hover,
.scalent-menu-item:focus-visible {
  background: var(--scalent-hover, #171B24);
  color: var(--scalent-text-primary, #F5F7FA);
  outline: none !important;
}

.scalent-menu-item.danger {
  color: var(--scalent-rose);
}

.scalent-menu-item.danger:hover,
.scalent-menu-item.danger:focus-visible {
  background: rgba(244, 63, 94, 0.15);
  color: #FDA4AF;
}

.scalent-menu-divider {
  height: 1px;
  background: var(--scalent-border-dark, #252A35);
  margin: 0.375rem 0;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */

@keyframes scalent-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scalent-scale-in {
  from { opacity: 0; transform: scale(0.96) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes scalent-slide-left {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes scalent-toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   HERO SYSTEMS VISUALISATION (Master Creative Direction)
   Luminous Blue Orb · 5 Floating Interface Panels · Flowing Data Lines
   ========================================================================== */

.hero-systems-stage {
  position: relative;
  width: 100%;
  max-width: 580px;
  height: 480px;
  margin: 0 auto;
  border-radius: var(--scalent-radius-2xl);
  background: radial-gradient(circle at 50% 50%, rgba(21, 88, 201, 0.15) 0%, rgba(11, 13, 18, 0.85) 70%, #030407 100%);
  border: 1px solid var(--scalent-border, #252A35);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

/* Coordinate micro-grid in hero stage */
.hero-systems-grid {
  position: absolute;
  inset: 0;
  background-size: 28px 28px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  pointer-events: none;
}

/* Central Luminous Blue Orb */
.hero-orb-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-orb-core {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #6384FF 0%, #315BFF 50%, #1532A6 100%);
  box-shadow: 
    0 0 35px rgba(49, 91, 255, 0.55),
    0 0 70px rgba(49, 91, 255, 0.25),
    inset 0 2px 4px rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: orb-pulse 4s ease-in-out infinite;
}

.hero-orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(49, 91, 255, 0.35);
  pointer-events: none;
}

.hero-orb-ring-1 {
  width: 108px;
  height: 108px;
  animation: ring-spin 24s linear infinite;
}

.hero-orb-ring-2 {
  width: 160px;
  height: 160px;
  border-color: rgba(49, 91, 255, 0.2);
  border-style: solid;
  animation: ring-spin-reverse 36s linear infinite;
}

.hero-orb-ring-3 {
  width: 220px;
  height: 220px;
  border-color: rgba(49, 91, 255, 0.1);
  border-style: dashed;
}

@keyframes orb-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 35px rgba(49, 91, 255, 0.55), 0 0 70px rgba(49, 91, 255, 0.25); }
  50% { transform: scale(1.06); box-shadow: 0 0 50px rgba(49, 91, 255, 0.75), 0 0 90px rgba(49, 91, 255, 0.35); }
}

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

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

/* Floating Interface Panels */
.hero-sys-panel {
  position: absolute;
  background: rgba(17, 20, 27, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--scalent-border, #252A35);
  border-radius: var(--scalent-radius-lg);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.7), 0 1px 2px rgba(0, 0, 0, 0.4);
  padding: 0.75rem 1rem;
  z-index: 20;
  color: #F5F7FA;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-sys-panel:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(21, 88, 201, 0.5);
  box-shadow: 0 16px 36px -6px rgba(21, 88, 201, 0.25);
}

/* Floating Animations */
.float-panel-1 {
  top: 24px;
  right: 28px;
  animation: float-anim-1 7s ease-in-out infinite;
}

.float-panel-2 {
  top: 32px;
  left: 24px;
  animation: float-anim-2 8s ease-in-out infinite 0.5s;
}

.float-panel-3 {
  bottom: 30px;
  left: 28px;
  animation: float-anim-3 7.5s ease-in-out infinite 1s;
}

.float-panel-4 {
  bottom: 36px;
  right: 24px;
  animation: float-anim-4 6.5s ease-in-out infinite 1.5s;
}

.float-panel-5 {
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  animation: float-anim-5 7s ease-in-out infinite 2s;
}

@keyframes float-anim-1 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

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

@keyframes float-anim-3 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes float-anim-4 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes float-anim-5 {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -6px); }
}

/* SVG Connection Paths & Particle Streams */
.hero-svg-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.sys-data-stream {
  stroke-dasharray: 6 6;
  animation: stream-flow 2.5s linear infinite;
}

@keyframes stream-flow {
  from { stroke-dashoffset: 48; }
  to { stroke-dashoffset: 0; }
}

/* Animated Chart Line Drawing */
.sys-sparkline-path {
  stroke-dasharray: 180;
  stroke-dashoffset: 180;
  animation: chart-draw 2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

@keyframes chart-draw {
  to { stroke-dashoffset: 0; }
}

/* ==========================================================================
   SERVICES REFINED PRODUCT CARDS
   ========================================================================== */

.service-product-card {
  background: var(--scalent-card, #11141B);
  border: 1px solid var(--scalent-border, #252A35);
  border-radius: var(--scalent-radius-xl);
  padding: 2rem;
  box-shadow: var(--scalent-shadow-card);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  color: var(--scalent-text-primary, #F5F7FA);
}

.service-product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--scalent-blue, #1558c9), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(21, 88, 201, 0.45);
  box-shadow: var(--scalent-shadow-card-hover);
}

.service-product-card:hover::before {
  opacity: 1;
}

.service-product-card:hover .service-arrow-icon {
  transform: translateX(4px);
  color: var(--scalent-blue, #1558c9);
}

/* ==========================================================================
   PROBLEMS WE SOLVE - INTERACTIVE COMPARISON
   ========================================================================== */

.problem-solution-item {
  border: 1px solid var(--scalent-border, #252A35);
  border-radius: var(--scalent-radius-lg);
  background: var(--scalent-card, #11141B);
  transition: all 0.25s ease;
  overflow: hidden;
  color: var(--scalent-text-primary, #F5F7FA);
}

.problem-solution-item:hover {
  border-color: rgba(21, 88, 201, 0.4);
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   HOW WE WORK - 4-STAGE PROCESS LINE
   ========================================================================== */

.process-step-node {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--scalent-surface, #0B0D12);
  border: 2px solid var(--scalent-border, #252A35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--scalent-font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--scalent-text-muted, #737B8C);
  transition: all 0.25s ease;
}

.process-step-card:hover .process-step-node {
  border-color: var(--scalent-blue, #1558c9);
  color: var(--scalent-blue, #1558c9);
  box-shadow: 0 0 0 4px rgba(21, 88, 201, 0.15);
}

/* ==========================================================================
   FAQ ACCORDION COMPONENT
   Minimal Luxury Accordion with Smooth Intrinsic Grid Transitions
   ========================================================================== */

:root {
  interpolate-size: allow-keywords;
}

.faq-accordion-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background-color: var(--scalent-card, #11141B);
  border: 1px solid var(--scalent-border, #252A35);
  border-radius: var(--scalent-radius-xl);
  transition: border-color var(--dur-btn, 200ms) var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1)),
              box-shadow var(--dur-btn, 200ms) var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1)),
              background-color var(--dur-btn, 200ms) var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
  position: relative;
  overflow: hidden;
}

.faq-item:hover {
  border-color: rgba(21, 28, 40, 0.22);
  box-shadow: 0 2px 8px rgba(21, 28, 40, 0.03), 0 8px 24px -4px rgba(21, 28, 40, 0.04);
}

.faq-item.is-open {
  border-color: rgba(49, 91, 255, 0.35);
  box-shadow: 0 4px 16px -2px rgba(49, 91, 255, 0.08), 0 12px 32px -8px rgba(21, 28, 40, 0.06);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--scalent-ink);
  font-family: var(--scalent-font-sans);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  transition: color var(--dur-micro, 130ms) ease;
  user-select: none;
}

@media (min-width: 640px) {
  .faq-trigger {
    padding: 24px 32px;
    font-size: 1.125rem;
  }
}

.faq-trigger:hover {
  color: var(--scalent-blue);
}

.faq-trigger:focus-visible {
  outline: 2px solid var(--scalent-blue) !important;
  outline-offset: -2px !important;
}

.faq-question-text {
  flex: 1;
  transition: color var(--dur-micro, 130ms) ease;
}

.faq-icon-wrapper {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--scalent-radius-full);
  border: 1px solid var(--scalent-border);
  background-color: var(--scalent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--scalent-ink-muted);
  transition: all var(--dur-btn, 200ms) var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
}

.faq-trigger:hover .faq-icon-wrapper {
  border-color: rgba(49, 91, 255, 0.4);
  background-color: rgba(49, 91, 255, 0.06);
  color: var(--scalent-blue);
}

.faq-item.is-open .faq-icon-wrapper {
  background-color: var(--scalent-blue);
  border-color: var(--scalent-blue);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(49, 91, 255, 0.3);
}

.faq-icon {
  width: 14px;
  height: 14px;
  transition: transform var(--dur-btn, 200ms) var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
}

.faq-icon-v {
  transition: transform var(--dur-btn, 200ms) var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1)), opacity var(--dur-micro, 130ms) ease;
  transform-origin: center;
}

.faq-item.is-open .faq-icon-v {
  transform: rotate(90deg) scaleY(0);
  opacity: 0;
}

.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-modal, 260ms) var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1)),
              opacity var(--dur-btn, 200ms) ease;
  opacity: 0;
}

.faq-item.is-open .faq-panel {
  grid-template-rows: 1fr;
  opacity: 1;
}

.faq-panel-inner {
  overflow: hidden;
}

.faq-answer-content {
  padding: 0 24px 24px 24px;
  margin-top: -4px;
  border-top: 1px solid rgba(229, 227, 220, 0.7);
  padding-top: 18px;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--scalent-ink-muted);
}

@media (min-width: 640px) {
  .faq-answer-content {
    padding: 0 32px 28px 32px;
    padding-top: 20px;
    font-size: 0.9875rem;
  }
}

.faq-answer-content p + p {
  margin-top: 12px;
}

.faq-answer-content ul {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-answer-content li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.faq-cta-card {
  margin-top: 48px;
  padding: 32px;
  border-radius: var(--scalent-radius-xl);
  background: var(--scalent-card, #11141B);
  border: 1px solid var(--scalent-border, #252A35);
  box-shadow: var(--scalent-shadow-card);
  transition: all var(--dur-btn, 200ms) var(--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
  color: var(--scalent-text-primary, #F5F7FA);
}

.faq-cta-card:hover {
  border-color: rgba(21, 28, 40, 0.2);
  box-shadow: var(--scalent-shadow-card-hover);
}

@media (prefers-reduced-motion: reduce) {
  .faq-item,
  .faq-trigger,
  .faq-icon-wrapper,
  .faq-icon,
  .faq-icon-v,
  .faq-panel,
  .faq-cta-card {
    transition: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   REFERENCE-DRIVEN PREMIUM SAAS REDESIGN COMPONENTS
   ========================================================================== */

/* 1. Obsidian Surface Card (Matches Reference Screens) */
.scalent-ref-card {
  background: var(--scalent-card, #11141B);
  border: 1px solid var(--scalent-border, #252A35);
  border-radius: 16px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5), inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--scalent-text-primary, #F5F7FA);
}

.scalent-ref-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.65), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
}

/* 2. Reference Sidebar Navigation Items */
.ref-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: #94A3B8;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  text-decoration: none;
}

.ref-nav-item:hover:not(.active) {
  background: var(--scalent-hover, #171B24);
  color: #FFFFFF;
}

.ref-nav-item.active {
  background: var(--scalent-blue, #1558c9);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(21, 88, 201, 0.35);
}

/* 3. Metric Card Square Icon Badges */
.metric-icon-square {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-icon-square.lime,
.metric-icon-square.emerald {
  background: rgba(212, 255, 36, 0.15);
  color: #d4ff24;
  border: 1px solid rgba(212, 255, 36, 0.3);
}

.metric-icon-square.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3B82F6;
}

.metric-icon-square.purple {
  background: rgba(139, 92, 246, 0.15);
  color: #8B5CF6;
}

.metric-icon-square.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #06B6D4;
}

/* 4. Sales Pipeline Funnel Trapezoids */
.funnel-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.funnel-trapezoid {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 44px;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  transition: transform 0.2s ease, filter 0.2s ease;
  margin: 0 auto;
}

.funnel-trapezoid:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
}

.funnel-stage-leads {
  width: 100%;
  background: linear-gradient(90deg, #6366F1 0%, #4F46E5 100%);
  clip-path: polygon(0% 0%, 100% 0%, 94% 100%, 6% 100%);
}

.funnel-stage-qualified {
  width: 88%;
  background: linear-gradient(90deg, #3B82F6 0%, #2563EB 100%);
  clip-path: polygon(2% 0%, 98% 0%, 92% 100%, 8% 100%);
}

.funnel-stage-proposal {
  width: 76%;
  background: linear-gradient(90deg, #06B6D4 0%, #0891B2 100%);
  clip-path: polygon(3% 0%, 97% 0%, 90% 100%, 10% 100%);
}

.funnel-stage-won {
  width: 64%;
  background: linear-gradient(90deg, #10B981 0%, #059669 100%);
  clip-path: polygon(4% 0%, 96% 0%, 86% 100%, 14% 100%);
}

/* 5. Fluid Glowing Light Ribbon (Matches Login Screen Reference) */
.ambient-light-ribbon {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 380px;
  pointer-events: none;
  background: radial-gradient(ellipse at bottom left, rgba(79, 70, 229, 0.4) 0%, rgba(6, 182, 212, 0.25) 35%, transparent 70%);
  filter: blur(40px);
  opacity: 0.85;
}

/* 6. Reference Status Badges */
.ref-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ref-status-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.ref-status-badge.lead {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.ref-status-badge.customer {
  background: rgba(6, 182, 212, 0.15);
  color: #06B6D4;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.ref-status-badge.opportunity {
  background: rgba(139, 92, 246, 0.15);
  color: #8B5CF6;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* 7. Quick Action Link Rows */
.quick-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  background: #0B1120;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #F1F5F9;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
}

.quick-action-row:hover {
  background: #141C33;
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(2px);
}

/* 8. Promotional Glow Banner */
.promo-glow-card {
  background: linear-gradient(135deg, #1E1B4B 0%, #31104B 60%, #0E1526 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 8px 32px rgba(79, 70, 229, 0.25);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.promo-glow-card::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
  filter: blur(25px);
  pointer-events: none;
}




/* 9. Reference Filter Pills (Clients / CRM) */
.ref-filter-pill {
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  color: #94A3B8;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}

.ref-filter-pill:hover {
  color: #F8FAFC;
  background: rgba(255, 255, 255, 0.05);
}

.ref-filter-pill.active {
  color: #FFFFFF;
  background: #4F46E5;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
}

/* 10. Reference Mini KPI Card */
.ref-mini-kpi {
  background: #0E1526;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  transition: border-color 0.2s ease;
}

.ref-mini-kpi:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

/* 11. Reference Service Module Card (Operations & Admin Console) */
.ref-service-card {
  background: #0E1526;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.2s ease;
}

.ref-service-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.ref-service-card .service-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.ref-service-card .service-icon.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.ref-service-card .service-icon.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #22D3EE;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.ref-service-card .service-icon.emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.ref-service-card .service-icon.purple {
  background: rgba(139, 92, 246, 0.15);
  color: #A78BFA;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.ref-service-card .manage-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(79, 70, 229, 0.2);
  color: #A5B4FC;
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  width: fit-content;
}

.ref-service-card .manage-btn:hover {
  background: #4F46E5;
  color: #FFFFFF;
}

/* ==========================================================================
   SLEEK MODERN SCROLLBARS (Cross-platform Windows/Mac/Linux)
   ========================================================================== */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

.no-scrollbar::-webkit-scrollbar {
  display: none !important;
}

.no-scrollbar {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

/* ==========================================================================
   TABLES & DATA GRIDS (Dark Theme Enforced & Contrast Hardening)
   ========================================================================== */
.saas-table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: var(--scalent-radius-lg);
  background: #0E1526 !important;
}

.saas-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8125rem;
  background: #0E1526 !important;
  color: #F1F5F9 !important;
}

.saas-table thead,
.saas-table th {
  padding: 0.875rem 1rem;
  font-family: var(--scalent-font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94A3B8 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: #0B101D !important;
}

.saas-table tbody {
  background: #0E1526 !important;
}

.saas-table tr {
  background: #0E1526 !important;
  transition: background-color 0.15s ease;
}

.saas-table td {
  padding: 0.875rem 1rem;
  color: #F1F5F9 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  background: #0E1526 !important;
}

.saas-table tr:hover td,
.saas-table tr:hover {
  background: #151D33 !important;
}

#clients-table-body,
#clients-table-body tr,
#clients-table-body td,
#vault-documents-tbody,
#vault-documents-tbody tr,
#vault-documents-tbody td,
#ref-clients-table-tbody,
#ref-clients-table-tbody tr,
#ref-clients-table-tbody td,
#contacts-table-body,
#contacts-table-body tr,
#contacts-table-body td,
#telemetry-activity-tbody,
#telemetry-activity-tbody tr,
#telemetry-activity-tbody td,
#mgmt-table-body,
#mgmt-table-body tr,
#mgmt-table-body td,
#audit-table-body,
#audit-table-body tr,
#audit-table-body td,
#recent-ops-tbody,
#recent-ops-tbody tr,
#recent-ops-tbody td {
  background: #0E1526 !important;
  color: #F1F5F9 !important;
}

#clients-table-body tr:hover td,
#vault-documents-tbody tr:hover td,
#ref-clients-table-tbody tr:hover td,
#contacts-table-body tr:hover td,
#telemetry-activity-tbody tr:hover td,
#mgmt-table-body tr:hover td,
#audit-table-body tr:hover td,
#recent-ops-tbody tr:hover td {
  background: #151D33 !important;
}

/* ==========================================================================
   RAZORPAY CHECKOUT STACKING CONTEXT & IFRAME CLICKABILITY FIX
   ========================================================================== */
.razorpay-container {
  z-index: 2147483647 !important;
  position: fixed !important;
  inset: 0 !important;
  pointer-events: auto !important;
}

/* Ensure the Razorpay payment iframe sits above the backdrop and receives pointer events */
.razorpay-container iframe,
iframe.razorpay-checkout-frame,
iframe[name*="razorpay"] {
  z-index: 2147483647 !important;
  position: relative !important;
  pointer-events: auto !important;
  cursor: auto !important;
}

/* Ensure Razorpay's backdrop sits behind the iframe so it never intercepts clicks */
.razorpay-container .razorpay-backdrop {
  z-index: 2147483640 !important;
  position: fixed !important;
  pointer-events: auto !important;
}

/* ==========================================================================
   INTERACTIVE ELEMENTS CURSOR POINTER
   ========================================================================== */
button:not(:disabled),
[role="button"]:not([aria-disabled="true"]),
.btn,
a,
input[type="button"],
input[type="submit"],
input[type="checkbox"],
input[type="radio"],
select,
.clickable,
[onclick] {
  cursor: pointer !important;
}

button:disabled,
[role="button"][aria-disabled="true"],
.btn:disabled {
  cursor: not-allowed !important;
}
