/* ==========================================================================
   MAIN.CSS - PROFESSIONAL ENTERPRISE VERSION - GRADIENT FIXED ✅
   Complete integration with conflict resolution for wind_sidebar.py
   ========================================================================== 
   
   ✅ PROFESSIONAL ENTERPRISE UPDATES APPLIED:
   • Width consistency: 20px → 24px, margins 10px → 12px
   • Hamburger menu conflicts resolved (commented out conflicting styles)
   • Badge system conflicts resolved (deferred to wind_styles.css)
   • All original functionality preserved
   • Professional visual consistency achieved
   
   🎨 GRADIENT FIX APPLIED:
   ✅ Replaced #1e3a8a with #0018ff (Vibrant Blue)
   ✅ Replaced #1e40af with #181E57 (Deep Vibrant)
   ✅ Made Dash containers transparent
   ✅ Added safety rules to prevent dark overlays
   
   📋 CONFLICT RESOLUTION STATUS:
   ✅ CONFLICT #1: Width Consistency System - RESOLVED
   ✅ CONFLICT #2: Hamburger Icon Styling - RESOLVED  
   ✅ CONFLICT #3: Badge System Conflicts - RESOLVED
   ✅ CONFLICT #4: Background Gradient Split - FIXED
   
   🔗 COMPATIBILITY: Works seamlessly with wind_styles.css professional enhancements
   ========================================================================== */

/* Performance optimization - GPU acceleration for section-specific elements */
.tornado-subsection,
.tools-subsection,
.structures-subsection,
.codes-subsection,
.mwfrs-subsection,
.cc-subsection,
.sidebar-link.tornado-subsection,
.sidebar-link.tools-subsection,
.sidebar-link.structures-subsection,
.sidebar-link.codes-subsection,
.sidebar-link.mwfrs-subsection,
.sidebar-link.cc-subsection {
    transform: translateZ(0);
    will-change: transform, background, backdrop-filter;
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(10px)) {
    .tornado-subsection.active-subsection,
    .tools-subsection.active-subsection,
    .structures-subsection.active-subsection,
    .codes-subsection.active-subsection,
    .mwfrs-subsection.active-subsection,
    .cc-subsection.active-subsection,
    .sidebar-link.tornado-subsection.active,
    .sidebar-link.tools-subsection.active,
    .sidebar-link.structures-subsection.active,
    .sidebar-link.codes-subsection.active,
    .sidebar-link.mwfrs-subsection.active,
    .sidebar-link.cc-subsection.active {
        background: rgba(255, 255, 255, 0.25);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tornado-subsection.active-subsection,
    .tools-subsection.active-subsection,
    .structures-subsection.active-subsection,
    .codes-subsection.active-subsection,
    .mwfrs-subsection.active-subsection,
    .cc-subsection.active-subsection,
    .sidebar-link.tornado-subsection.active,
    .sidebar-link.tools-subsection.active,
    .sidebar-link.structures-subsection.active,
    .sidebar-link.codes-subsection.active,
    .sidebar-link.mwfrs-subsection.active,
    .sidebar-link.cc-subsection.active {
        background: rgba(255, 255, 255, 0.4);
        border-width: 2px !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .tornado-subsection,
    .tools-subsection,
    .structures-subsection,
    .codes-subsection,
    .mwfrs-subsection,
    .cc-subsection,
    .sidebar-link.tornado-subsection,
    .sidebar-link.tools-subsection,
    .sidebar-link.structures-subsection,
    .sidebar-link.codes-subsection,
    .sidebar-link.mwfrs-subsection,
    .sidebar-link.cc-subsection {
        transition: none;
    }
    
    .tornado-subsection:hover,
    .tools-subsection:hover,
    .structures-subsection:hover,
    .codes-subsection:hover,
    .mwfrs-subsection:hover,
    .cc-subsection:hover,
    .sidebar-link.tornado-subsection:hover,
    .sidebar-link.tools-subsection:hover,
    .sidebar-link.structures-subsection:hover,
    .sidebar-link.codes-subsection:hover,
    .sidebar-link.mwfrs-subsection:hover,
    .sidebar-link.cc-subsection:hover {
        transform: none;
    }
}/* ==========================================================================
   MAIN.CSS - Master CSS Architecture - COMBINED VERSION
   Complete integration of all CSS systems for Wind Load Solutions
   ========================================================================== */

/* Base System - Design tokens and variables */
@import url('./base/variables.css');

/* Component System - Modular UI components */
@import url('./components/cards.css');
@import url('./components/buttons.css');
@import url('./components/forms.css');
@import url('./components/navigation.css');

/* Template System - Page-specific layouts */
@import url('./wizard.css');
@import url('./analytics.css');

/* Legacy Integration - MUST BE LAST to preserve electric color hierarchy */
@import url('./wind_styles.css');

/* CSS LOADING TEST - Remove after testing */
.results-container {
    border: 3px solid lime !important;
    background: rgba(0, 255, 0, 0.1) !important;
}

/* Future template imports will go here:
@import url('./dashboard.css');
*/

/* 1. BASE SYSTEM - Design tokens and variables */
:root {
    /* Color System */
    --primary: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Backgrounds */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-glass: rgba(15, 23, 42, 0.8);
    --bg-card: rgba(30, 41, 59, 0.9);
    
    /* Text */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    /* Borders */
    --border: rgba(148, 163, 184, 0.1);
    --border-light: rgba(148, 163, 184, 0.05);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Typography */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-base: 0.2s ease-in-out;
    --transition-slow: 0.3s ease-in-out;

    /* Brand colors for velocity finder */
    --brand-primary: #3b4ef8;
    --electric-blue: #0018FF;
    --pure-white: #ffffff;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
}

/* 2. RESET AND BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 3. TYPOGRAPHY SYSTEM */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: var(--space-md);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-sm); }

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

/* 4. GLASS MORPHISM SYSTEM */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-glass);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ========================================================================
   SIDEBAR GLASSMORPHISM SELECTION HIGHLIGHTING - FIXED WIDTH ALIGNMENT
   Professional glassmorphism effects with UNIFORM WIDTH CONSTRAINTS
   ======================================================================== */

/* PROFESSIONAL ENTERPRISE UPDATE: Width consistency system for all sidebar menu elements */
.sidebar-link,
.section-header-content,
.subsection-header {
    width: calc(100% - 24px) !important;  /* UPDATED: 20px → 24px for professional consistency */
    margin-left: 12px !important;         /* UPDATED: 10px → 12px for professional consistency */
    margin-right: 12px !important;        /* UPDATED: 10px → 12px for professional consistency */
    box-sizing: border-box !important;
}

/* Base glassmorphism effect for all sidebar links - FIXED WIDTH */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: #ffffff;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    backdrop-filter: blur(0px);
    background: transparent;
    position: relative;
}

/* Glassmorphism hover effect - UNIFORM DIMENSIONS */
.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transform: translateX(2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* FIXED: Visible active menu item highlighting with CONSISTENT WIDTH */
.sidebar-link.active,
.sidebar-link[aria-current="page"] {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 600;
    width: calc(100% - 24px) !important;  /* PROFESSIONAL: Updated for consistency */
    margin-left: 12px !important;         /* PROFESSIONAL: Updated for consistency */
    margin-right: 12px !important;        /* PROFESSIONAL: Updated for consistency */
}

/* Enhanced glassmorphism for active items with subtle glow */
.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #3b82f6, #1d4ed8);
    border-radius: 0 2px 2px 0;
    opacity: 0.8;
}

/* Focus state for accessibility with glassmorphism */
.sidebar-link:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* FIXED: Visible section header highlighting with UNIFORM WIDTH */
.section-header-content.active-section {
    background: rgba(59, 130, 246, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
    border-radius: 6px;
    transition: all 0.3s ease;
    width: calc(100% - 24px) !important;  /* PROFESSIONAL: Updated for consistency */
    margin-left: 12px !important;         /* PROFESSIONAL: Updated for consistency */
    margin-right: 12px !important;        /* PROFESSIONAL: Updated for consistency */
}

/* FIXED: Visible subsection header highlighting with UNIFORM WIDTH */
.subsection-header.active-subsection {
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 6px;
    transition: all 0.3s ease;
    width: calc(100% - 24px) !important;  /* PROFESSIONAL: Updated for consistency */
    margin-left: 12px !important;         /* PROFESSIONAL: Updated for consistency */
    margin-right: 12px !important;        /* PROFESSIONAL: Updated for consistency */
}

/* UPDATED: Glassmorphism for ALL subsection headers (C&C, MWFRS, Codes, etc.) with CONSISTENT WIDTH */
.subsection-header {
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 3px 0;
    width: calc(100% - 24px) !important;  /* PROFESSIONAL: Updated for consistency */
    margin-left: 12px !important;         /* PROFESSIONAL: Updated for consistency */
    margin-right: 12px !important;        /* PROFESSIONAL: Updated for consistency */
    box-sizing: border-box !important;
}

.subsection-header:hover {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    transform: translateX(1px);
}

.subsection-header:active {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateX(0px);
}

/* UPDATED: Universal subsection arrow styling for all sections */
.subsection-arrow {
    margin-left: auto !important;
    font-size: 10px !important;
    color: #6b7280 !important;
    transition: all 0.3s ease !important;
}

/* UPDATED: Universal subsection title styling */
.subsection-title {
    font-weight: 600 !important;
    color: #ffffff !important;
    font-size: 13px !important;
}

/* UPDATED: Ensure all collapsible subsections get proper styling */
.collapsible-subsection {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* UPDATED: Subsection menu styling for all sections with FIXED WIDTH */
.subsection-menu {
    margin-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 15px;
}

/* Enhanced glassmorphism for main section headers with CONSISTENT WIDTH */
.section-header-content {
    transition: all 0.3s ease;
    border-radius: 6px;
    padding: 12px 15px;
    position: relative;
    width: calc(100% - 24px) !important;  /* PROFESSIONAL: Updated for consistency */
    margin-left: 12px !important;         /* PROFESSIONAL: Updated for consistency */
    margin-right: 12px !important;        /* PROFESSIONAL: Updated for consistency */
    box-sizing: border-box !important;
}

.section-header-content:hover {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
}

/* Add left border indicator for active sections */
.section-header-content.active-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #3b82f6, #1d4ed8);
    border-radius: 0 2px 2px 0;
    opacity: 0.8;
}

/* PROFESSIONAL ENTERPRISE CONFLICT RESOLUTION: Badge system */
/* COMMENTED OUT: Basic badge styling that conflicts with professional gradients */
/* Professional badge styles are handled by wind_styles.css with !important declarations */
/*
.menu-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    margin-left: auto;
    color: #ffffff;
    transition: all 0.3s ease;
}
*/

/* PROFESSIONAL ENTERPRISE CONFLICT RESOLUTION: Badge variations */
/* COMMENTED OUT: Basic badge variations that conflict with professional design */
/*
.menu-badge.new {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.menu-badge.soon {
    background: rgba(249, 115, 22, 0.2);
    border: 1px solid rgba(249, 115, 22, 0.3);
    color: #f97316;
}

.menu-badge.admin {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.menu-badge.ai {
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #a855f7;
}
*/

/* PROFESSIONAL ENTERPRISE CONFLICT RESOLUTION: Badge hover effects */
/* COMMENTED OUT: Basic badge hover effects that conflict with professional animations */
/*
.sidebar-link:hover .menu-badge {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transform: scale(1.05);
}
*/

/* PROFESSIONAL ENTERPRISE CONFLICT RESOLUTION: Hamburger menu styling */
/* COMMENTED OUT: Basic hover effects that conflict with professional gradient design */
/*
.menu-toggle-btn:hover {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
*/

/* PROFESSIONAL ENTERPRISE CONFLICT RESOLUTION: Menu toggle active state */
/* COMMENTED OUT: Basic active effects that conflict with professional gradient design */
/*
.menu-toggle-btn:active {
    transform: scale(0.98);
}
*/

/* ========================================================================
   SECTION-SPECIFIC GLASSMORPHISM COLORS - MAXIMUM PRIORITY IMPLEMENTATION
   Different accent colors per section with FIXED UNIFORM WIDTHS
   ======================================================================== */

/* Tornado Loads - Red glassmorphism for BOTH subsections AND menu items with FIXED WIDTH */
.tornado-subsection.active-subsection,
.sidebar-link.tornado-subsection.active {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    border-radius: 6px !important;
    box-shadow: 0 3px 12px rgba(239, 68, 68, 0.2) !important;
    transition: all 0.3s ease !important;
    width: calc(100% - 24px) !important;  /* PROFESSIONAL: Updated for consistency */
    margin-left: 12px !important;         /* PROFESSIONAL: Updated for consistency */
    margin-right: 12px !important;        /* PROFESSIONAL: Updated for consistency */
}

/* Advanced Tools - Green glassmorphism for BOTH subsections AND menu items with FIXED WIDTH */
.tools-subsection.active-subsection,
.sidebar-link.tools-subsection.active {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    border-radius: 6px !important;
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.2) !important;
    transition: all 0.3s ease !important;
    width: calc(100% - 20px) !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
}

/* Specialized Structures - Purple glassmorphism for BOTH subsections AND menu items with FIXED WIDTH */
.structures-subsection.active-subsection,
.sidebar-link.structures-subsection.active {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(168, 85, 247, 0.4) !important;
    border-radius: 6px !important;
    box-shadow: 0 3px 12px rgba(168, 85, 247, 0.2) !important;
    transition: all 0.3s ease !important;
    width: calc(100% - 20px) !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
}

/* Multi-Code Intelligence - Gold glassmorphism for BOTH subsections AND menu items with FIXED WIDTH */
.codes-subsection.active-subsection,
.sidebar-link.codes-subsection.active {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    border-radius: 6px !important;
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.2) !important;
    transition: all 0.3s ease !important;
    width: calc(100% - 20px) !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
}

/* MWFRS - Blue glassmorphism for BOTH subsections AND menu items with FIXED WIDTH */
.mwfrs-subsection.active-subsection,
.sidebar-link.mwfrs-subsection.active {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
    border-radius: 6px !important;
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.2) !important;
    transition: all 0.3s ease !important;
    width: calc(100% - 20px) !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
}

/* Components & Cladding - Cyan glassmorphism for BOTH subsections AND menu items with FIXED WIDTH */
.cc-subsection.active-subsection,
.sidebar-link.cc-subsection.active {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(6, 182, 212, 0.4) !important;
    border-radius: 6px !important;
    box-shadow: 0 3px 12px rgba(6, 182, 212, 0.2) !important;
    transition: all 0.3s ease !important;
    width: calc(100% - 20px) !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
}

/* Default glassmorphism for items without section classes with FIXED WIDTH */
.sidebar-link.active:not(.cc-subsection):not(.mwfrs-subsection):not(.tornado-subsection):not(.tools-subsection):not(.structures-subsection):not(.codes-subsection) {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 6px !important;
    box-shadow: 0 3px 12px rgba(255, 255, 255, 0.2) !important;
    width: calc(100% - 20px) !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
}

/* ========================================================================
   MWFRS SUBSECTION GLASSMORPHISM FIX - HIGHER SPECIFICITY with FIXED WIDTH
   Fix for solid blue backgrounds overriding transparent glassmorphism
   ======================================================================== */

/* HIGHER SPECIFICITY: Force glassmorphism on MWFRS subsection headers with UNIFORM WIDTH */
.subsection-header.mwfrs-subsection.active-subsection,
#mwfrs-lowrise-header.active-subsection,
#mwfrs-highrise-header.active-subsection,
#mwfrs-advanced-header.active-subsection {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
    border-radius: 6px !important;
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.2) !important;
    transition: all 0.3s ease !important;
    width: calc(100% - 20px) !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
}

/* MAXIMUM SPECIFICITY: Override any conflicting styles if above doesn't work */
.menu-section .collapsible-subsection .subsection-header.mwfrs-subsection.active-subsection {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
    border-radius: 6px !important;
    box-shadow: 0 3px 12px rgba(59, 130, 246, 0.2) !important;
    transition: all 0.3s ease !important;
    width: calc(100% - 20px) !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
}

/* Ensure hover states also work correctly with higher specificity */
.subsection-header.mwfrs-subsection:hover,
#mwfrs-lowrise-header:hover,
#mwfrs-highrise-header:hover,
#mwfrs-advanced-header:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(59, 130, 246, 0.25) !important;
    transform: translateX(1px) !important;
}

/* SECTION-SPECIFIC HOVER STATES for BOTH subsections AND menu items */
/* Tornado subsection/menu item hover */
.tornado-subsection:hover,
.sidebar-link.tornado-subsection:hover {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
    border-radius: 6px;
    transform: translateX(1px);
}

/* Tools subsection/menu item hover */
.tools-subsection:hover,
.sidebar-link.tools-subsection:hover {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
    border-radius: 6px;
    transform: translateX(1px);
}

/* Structures subsection/menu item hover */
.structures-subsection:hover,
.sidebar-link.structures-subsection:hover {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(168, 85, 247, 0.25) !important;
    border-radius: 6px;
    transform: translateX(1px);
}

/* Codes subsection/menu item hover */
.codes-subsection:hover,
.sidebar-link.codes-subsection:hover {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(245, 158, 11, 0.25) !important;
    border-radius: 6px;
    transform: translateX(1px);
}

/* C&C subsection/menu item hover */
.cc-subsection:hover,
.sidebar-link.cc-subsection:hover {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(6, 182, 212, 0.25) !important;
    border-radius: 6px;
    transform: translateX(1px);
}

/* ========================================================================
   INTELLIGENT TEXT WRAPPING IMPLEMENTATION - NEW
   Fixes text truncation using mobile-friendly text stacking
   ======================================================================== */

/* Universal text wrapping for section titles */
.section-title, 
.menu-label.section-title {
    white-space: normal !important;
    line-height: 1.2 !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    max-width: 100% !important;
    hyphens: auto !important;
    display: block !important;
}

/* Smart handling for long titles */
.section-header-content {
    min-height: auto !important;
    padding: 10px 15px !important; /* Reduced top/bottom for stacked text */
}

/* Specific fixes for problematic titles */
.section-title.long-title {
    font-size: 12px !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em !important;
}

/* Enhanced section text container */
.section-text {
    flex: 1;
    min-width: 0; /* Allow text to shrink */
    overflow: hidden;
}

/* Menu icons - preserve layout without interfering with electric colors */
/* Note: Color properties handled by wind_styles.css (loaded last) */

/* Collapse arrow positioning for wrapped text */
.collapse-arrow {
    flex-shrink: 0; /* Prevent arrow from shrinking */
    margin-left: auto !important;
    align-self: flex-start !important; /* Align to top when text wraps */
    margin-top: 2px !important;
}

/* Responsive glassmorphism - maintain on mobile devices */
@media (max-width: 768px) {
    .sidebar-link:hover {
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        transform: none; /* Disable transform on mobile for better performance */
    }
    
    .sidebar-link.active {
        background: rgba(255, 255, 255, 0.18);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    /* Mobile text wrapping adjustments */
    .section-title {
        font-size: 11px !important;
        line-height: 1.1 !important;
    }
    
    .section-header-content {
        padding: 8px 12px !important;
    }
}

/* Tablet/small desktop adjustments */
@media (max-width: 1024px) {
    .section-title {
        font-size: 12px !important;
        line-height: 1.15 !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .sidebar-link:hover,
    .sidebar-link.active {
        background: rgba(255, 255, 255, 0.3);
        border: 2px solid rgba(255, 255, 255, 0.6);
    }

    .tornado-subsection.active-subsection,
    .tools-subsection.active-subsection,
    .structures-subsection.active-subsection,
    .codes-subsection.active-subsection,
    .mwfrs-subsection.active-subsection,
    .cc-subsection.active-subsection {
        background: rgba(255, 255, 255, 0.4);
        border-width: 2px !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .sidebar-link,
    .subsection-header,
    .section-header-content,
    .menu-badge,
    .menu-toggle-btn,
    .tornado-subsection,
    .tools-subsection,
    .structures-subsection,
    .codes-subsection,
    .mwfrs-subsection,
    .cc-subsection {
        transition: none;
    }
    
    .sidebar-link:hover,
    .tornado-subsection:hover,
    .tools-subsection:hover,
    .structures-subsection:hover,
    .codes-subsection:hover,
    .mwfrs-subsection:hover,
    .cc-subsection:hover {
        transform: none;
    }
}

/* Dark mode optimization */
@media (prefers-color-scheme: dark) {
    .sidebar-link:hover {
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.15);
    }
    
    .sidebar-link.active {
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.25);
    }
}

/* Performance optimization - GPU acceleration for smooth animations */
.sidebar-link,
.subsection-header,
.section-header-content,
.tornado-subsection,
.tools-subsection,
.structures-subsection,
.codes-subsection,
.mwfrs-subsection,
.cc-subsection {
    transform: translateZ(0);
    will-change: transform, background, backdrop-filter;
}

/* Optimize backdrop-filter for better performance */
@supports (backdrop-filter: blur(10px)) {
    .sidebar-link:hover,
    .sidebar-link.active {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(10px)) {
    .sidebar-link:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .sidebar-link.active {
        background: rgba(255, 255, 255, 0.25);
    }

    .tornado-subsection.active-subsection,
    .tools-subsection.active-subsection,
    .structures-subsection.active-subsection,
    .codes-subsection.active-subsection,
    .mwfrs-subsection.active-subsection,
    .cc-subsection.active-subsection {
        background: rgba(255, 255, 255, 0.25);
    }
}

/* 5. LAYOUT SYSTEM */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.grid {
    display: grid;
    gap: var(--space-lg);
}

.flex {
    display: flex;
    gap: var(--space-md);
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

/* ========================================================================
   VELOCITY FINDER PROFESSIONAL GLASSMORPHISM STYLES
   Professional interface styling for the velocity finder module
   ======================================================================== */

/* Base styling and fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Professional glassmorphism card styling - FIXED */
.velocity-finder-card {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-clip: padding-box; /* ADDED: Standard property */
    -webkit-background-clip: padding-box; /* Existing vendor prefix */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

.velocity-finder-card:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Velocity finder dark theme background */
.velocity-finder-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    min-height: 100vh;
    font-family: 'Inter', sans-serif !important;
}

/* Professional input styling for velocity finder - FIXED */
.velocity-finder-input {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background-clip: padding-box; /* ADDED: Standard property */
    -webkit-background-clip: padding-box; /* Existing vendor prefix */
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-family: 'Inter', sans-serif !important;
    transition: all 0.3s ease !important;
}

.velocity-finder-input:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25) !important;
    outline: none !important;
}

.velocity-finder-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Professional button styling */
.velocity-finder-button {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.4) !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    cursor: pointer !important;
}

.velocity-finder-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.6) !important;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
}

.velocity-finder-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.4) !important;
}

/* Status indicators */
.velocity-status-operational {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.velocity-status-data {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #3b82f6 !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

/* Velocity finder text styling */
.velocity-finder h1,
.velocity-finder h2,
.velocity-finder h3,
.velocity-finder h4,
.velocity-finder h5 {
    color: #ffffff !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em !important;
}

.velocity-finder p {
    color: rgba(255, 255, 255, 0.8) !important;
    font-family: 'Inter', sans-serif !important;
    line-height: 1.6 !important;
}

/* Velocity finder results display - FIXED */
.velocity-results-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin-bottom: 16px !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    background-clip: padding-box; /* ADDED: Standard property */
    -webkit-background-clip: padding-box; /* Existing vendor prefix */
}

.velocity-results-primary {
    font-size: 48px !important;
    font-weight: 700 !important;
    color: #3b82f6 !important;
    text-align: center !important;
    margin-bottom: 8px !important;
    text-shadow: 0 2px 4px rgba(59, 130, 246, 0.3) !important;
}

.velocity-results-label {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 16px !important;
    text-align: center !important;
    margin-bottom: 24px !important;
}

/* Export button styling */
.velocity-export-button {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 6px !important;
    color: #ffffff !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    margin-right: 8px !important;
    margin-bottom: 8px !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.velocity-export-button:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-1px) !important;
}

/* Velocity finder dropdown styling - FIXED */
.velocity-finder .Select-control {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    background-clip: padding-box; /* ADDED: Standard property */
    -webkit-background-clip: padding-box; /* Implicit vendor prefix */
}

.velocity-finder .Select-placeholder,
.velocity-finder .Select-value {
    color: #ffffff !important;
}

.velocity-finder .Select-arrow-zone {
    color: rgba(255, 255, 255, 0.7) !important;
}

.velocity-finder .Select-menu-outer {
    background: rgba(30, 41, 59, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px); /* Implicit vendor prefix */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
}

.velocity-finder .Select-option {
    background: transparent !important;
    color: #ffffff !important;
    padding: 12px 16px !important;
}

.velocity-finder .Select-option:hover {
    background: rgba(59, 130, 246, 0.2) !important;
}

.velocity-finder .Select-option.is-selected {
    background: rgba(59, 130, 246, 0.3) !important;
}

/* 6. VELOCITY FINDER SPECIFIC STYLES */
.velocity-finder-container {
    min-height: 100vh;
    padding: var(--space-xl);
}

.velocity-finder-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.velocity-finder-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
}

.velocity-input-panel,
.velocity-results-panel {
    min-height: 500px;
}

.velocity-form-section {
    margin-bottom: var(--space-xl);
}

.velocity-form-group {
    margin-bottom: var(--space-lg);
}

.velocity-form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.velocity-input {
    width: 100%;
    padding: var(--space-md);
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: var(--font-size-base);
    transition: all var(--transition-base);
}

.velocity-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.velocity-select {
    width: 100%;
    padding: var(--space-md);
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
}

.velocity-button {
    padding: var(--space-md) var(--space-xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.velocity-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.velocity-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.velocity-results-container {
    flex: 1;
}

.velocity-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

.velocity-error-state {
    padding: var(--space-xl);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    color: var(--danger);
}

.velocity-wind-speed {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin: var(--space-lg) 0;
}

.velocity-wind-speed-unit {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    font-weight: 400;
}

.velocity-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.velocity-detail-item {
    padding: var(--space-md);
    background: rgba(30, 41, 59, 0.3);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.velocity-detail-label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.velocity-detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* ========================================================================
   VELOCITY FINDER SPECIFIC CSS CLASSES - MISSING FROM TEMPLATE
   These are the exact classes the velocity finder interface needs
   ======================================================================== */

/* Animated background matching your target */
.velocity-main-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 25%, rgba(59, 78, 248, 0.25) 0%, transparent 60%),
        radial-gradient(circle at 50% 50%, rgba(0, 24, 255, 0.15) 0%, transparent 70%),
        radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.8) 0%, transparent 60%),
        linear-gradient(135deg, rgba(59, 78, 248, 0.1) 0%, rgba(0, 24, 255, 0.08) 40%, rgba(255, 255, 255, 0.95) 100%);
    z-index: -1;
}

/* Floating animated elements */
.velocity-floating-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    animation: velocity-float 8s ease-in-out infinite;
}

.velocity-floating-1 {
    top: 20%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 78, 248, 0.15), rgba(0, 24, 255, 0.1), transparent);
    animation-delay: 0s;
}

.velocity-floating-2 {
    bottom: 20%;
    right: 15%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 24, 255, 0.12), rgba(255, 255, 255, 0.6), transparent);
    animation-delay: 2s;
}

/* Professional glassmorphism cards - EXACT MATCH - FIXED */
.velocity-glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background-clip: padding-box; /* ADDED: Standard property */
    -webkit-background-clip: padding-box; /* Implicit vendor prefix */
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.velocity-glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(59, 78, 248, 0.15);
    border-color: rgba(59, 78, 248, 0.3);
}

/* Professional header - EXACT MATCH - FIXED */
.velocity-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background-clip: padding-box; /* ADDED: Standard property */
    -webkit-background-clip: padding-box; /* Implicit vendor prefix */
    border-bottom: 1px solid var(--gray-200);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.velocity-header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.velocity-logo-section {
    display: flex;
    align-items: center;
}

.velocity-logo-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #3b4ef8, var(--brand-primary));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    box-shadow: 0 8px 25px rgba(59, 78, 248, 0.3);
    animation: velocity-pulse-glow 3s ease-in-out infinite;
}

/* FIXED: Standard properties added for text gradient */
.velocity-hero h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary) 30%, #3b4ef8 65%, #ffffff 100%);
    background-clip: text; /* ADDED: Standard property */
    -webkit-background-clip: text; /* Existing vendor prefix */
    color: transparent; /* ADDED: Fallback */
    -webkit-text-fill-color: transparent; /* Existing vendor prefix */
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.025em;
}

/* FIXED: Standard properties added for text gradient */
.velocity-hero .velocity-highlight {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary) 30%, #3b4ef8 65%, #ffffff 100%);
    background-clip: text; /* ADDED: Standard property */
    -webkit-background-clip: text; /* Existing vendor prefix */
    color: transparent; /* ADDED: Fallback */
    -webkit-text-fill-color: transparent; /* Existing vendor prefix */
}

.velocity-hero p {
    font-size: 18px;
    color: var(--gray-600);
    margin-bottom: 48px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-weight: 500;
}

.velocity-btn-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary) 35%, #3b4ef8 70%, #ffffff 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    padding: 18px 36px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    box-shadow: 0 8px 25px rgba(59, 78, 248, 0.35);
    margin-right: 16px;
}

.velocity-btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 35px rgba(59, 78, 248, 0.45);
}

.velocity-btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    color: var(--gray-700);
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
}

.velocity-btn-secondary:hover {
    background: white;
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    transform: translateY(-2px);
}

/* Main interface grid - EXACT MATCH */
.velocity-main-interface {
    padding: 40px 24px 80px;
    position: relative;
    z-index: 10;
}

.velocity-interface-container {
    max-width: 1400px;
    margin: 0 auto;
}

.velocity-interface-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 32px;
}

.velocity-input-panel {
    position: sticky;
    top: 140px;
}

/* Input panel styling - EXACT MATCH */
.velocity-panel-header {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
}

.velocity-panel-icon {
    background: linear-gradient(135deg, var(--brand-primary), #3b4ef8);
    border-radius: 12px;
    padding: 10px;
    margin-right: 12px;
    box-shadow: 0 4px 15px rgba(59, 78, 248, 0.3);
}

/* FIXED: Standard properties added for text gradient */
.velocity-panel-text h3 {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary) 40%, #3b4ef8 70%, #ffffff 100%);
    background-clip: text; /* ADDED: Standard property */
    -webkit-background-clip: text; /* Existing vendor prefix */
    color: transparent; /* ADDED: Fallback */
    -webkit-text-fill-color: transparent; /* Existing vendor prefix */
    margin: 0;
}

.velocity-panel-text p {
    color: var(--gray-600);
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

.velocity-form-input {
    width: 100%;
    padding: 16px 50px 16px 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    color: var(--gray-900);
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.velocity-form-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(59, 78, 248, 0.15), 0 4px 15px rgba(0, 0, 0, 0.08);
}

.velocity-input-wrapper {
    position: relative;
}

.velocity-input-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
}

.velocity-cursor-blink {
    width: 2px;
    height: 16px;
    background: linear-gradient(180deg, var(--brand-primary), #3b4ef8);
    animation: velocity-blink 1.5s ease-in-out infinite;
}

/* Suggestions panel - EXACT MATCH */
.velocity-suggestions-panel {
    background: linear-gradient(135deg, var(--gray-50), var(--white));
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 24px;
}

.velocity-suggestions-header {
    font-size: 12px;
    color: var(--brand-primary);
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.velocity-suggestions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.velocity-suggestion-btn {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 12px;
    color: var(--gray-700);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.velocity-suggestion-btn:hover {
    background: linear-gradient(135deg, rgba(59, 78, 248, 0.08), rgba(59, 78, 248, 0.04));
    border-color: var(--brand-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 78, 248, 0.15);
}

.velocity-suggestion-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.velocity-suggestion-risk {
    font-size: 10px;
    color: var(--gray-500);
    font-style: italic;
}

/* Coordinate inputs */
.velocity-coordinate-row {
    display: flex;
    gap: 8px;
}

.velocity-coordinate-input {
    flex: 1;
    padding: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    color: var(--gray-900);
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
}

.velocity-coordinate-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(59, 78, 248, 0.15);
}

/* Risk category buttons - EXACT MATCH */
.velocity-risk-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.velocity-risk-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 18px 14px;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 12px;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.velocity-risk-btn:hover {
    border-color: var(--brand-primary);
    background: linear-gradient(135deg, rgba(59, 78, 248, 0.08), rgba(59, 78, 248, 0.04));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 78, 248, 0.2);
}

.velocity-risk-btn.velocity-risk-active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.08));
    border-color: #10B981;
    color: #10B981;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.velocity-risk-label {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 4px;
    color: var(--gray-900);
}

.velocity-risk-desc {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 6px;
}

.velocity-risk-examples {
    font-size: 0.7rem;
    color: var(--gray-500);
    font-style: italic;
}

/* Analyze button - EXACT MATCH */
.velocity-analyze-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary) 35%, #3b4ef8 70%, #ffffff 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 32px 0 20px;
    box-shadow: 0 8px 25px rgba(59, 78, 248, 0.35);
}

.velocity-analyze-btn:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 12px 35px rgba(59, 78, 248, 0.45);
}

/* Quick actions - EXACT MATCH */
.velocity-quick-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.velocity-action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 14px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 32%;
}

.velocity-action-3d {
    color: var(--brand-primary);
    border-color: rgba(59, 78, 248, 0.3);
    background: linear-gradient(135deg, rgba(59, 78, 248, 0.12), rgba(59, 78, 248, 0.06));
}

.velocity-action-data {
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(99, 102, 241, 0.06));
}

.velocity-action-export {
    color: #EF4444;
    border-color: rgba(239, 68, 68, 0.3);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.06));
}

.velocity-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Results panel - EXACT MATCH */
.velocity-loading-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--brand-primary), #3b4ef8);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    box-shadow: 0 12px 35px rgba(59, 78, 248, 0.3);
    animation: velocity-pulse-glow 3s ease-in-out infinite;
}

/* FIXED: Standard properties added for text gradient */
.velocity-loading-text h3 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary) 40%, #3b4ef8 70%, #ffffff 100%);
    background-clip: text; /* ADDED: Standard property */
    -webkit-background-clip: text; /* Existing vendor prefix */
    color: transparent; /* ADDED: Fallback */
    -webkit-text-fill-color: transparent; /* Existing vendor prefix */
    margin-bottom: 16px;
}

.velocity-loading-text p {
    font-size: 18px;
    color: var(--gray-600);
    margin-bottom: 48px;
    max-width: 600px;
    line-height: 1.6;
    font-weight: 500;
}

/* Feature cards - EXACT MATCH - FIXED */
.velocity-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.velocity-feature-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background-clip: padding-box; /* ADDED: Standard property */
    -webkit-background-clip: padding-box; /* Implicit vendor prefix */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.velocity-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.velocity-feature-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.velocity-feature-icon-ai {
    background: linear-gradient(135deg, var(--brand-primary), #3b4ef8);
    box-shadow: 0 8px 25px rgba(59, 78, 248, 0.3);
}

.velocity-feature-icon-code {
    background: linear-gradient(135deg, #6366f1, var(--brand-primary));
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.velocity-feature-icon-climate {
    background: linear-gradient(135deg, #10B981, #059669);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.velocity-feature-icon {
    font-size: 32px;
    color: white;
}

/* FIXED: Standard properties added for text gradient */
.velocity-feature-title {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary) 30%, #3b4ef8 70%, #ffffff 100%);
    background-clip: text; /* ADDED: Standard property */
    -webkit-background-clip: text; /* Existing vendor prefix */
    color: transparent; /* ADDED: Fallback */
    -webkit-text-fill-color: transparent; /* Existing vendor prefix */
    margin-bottom: 16px;
}

.velocity-feature-desc {
    font-size: 15px;
    color: rgba(30, 41, 59, 0.8);
    line-height: 1.6;
    font-weight: 500;
}

/* Loading states for velocity finder */
.velocity-finder .dash-loading {
    color: #3b82f6 !important;
}

.velocity-finder .dash-loading-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100px !important;
}

/* Velocity finder error states */
.velocity-finder-error {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    border-radius: 8px !important;
    padding: 16px !important;
    color: #ef4444 !important;
    text-align: center !important;
}

/* Success states */
.velocity-finder-success {
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    border-radius: 8px !important;
    padding: 16px !important;
    color: #10b981 !important;
}

/* Chart styling for velocity finder */
.velocity-finder .js-plotly-plot {
    background: transparent !important;
}

.velocity-finder .plotly {
    background: transparent !important;
}

/* Custom scrollbar for velocity finder */
.velocity-finder-content::-webkit-scrollbar {
    width: 8px;
}

.velocity-finder-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.velocity-finder-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.velocity-finder-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Animation keyframes */
@keyframes velocity-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Brand colors for velocity finder */
.velocity-brand-primary {
    color: #3b82f6 !important;
}

.velocity-brand-success {
    color: #10b981 !important;
}

.velocity-brand-warning {
    color: #f59e0b !important;
}

.velocity-brand-error {
    color: #ef4444 !important;
}

/* 7. RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .velocity-finder-main {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .velocity-finder-container {
        padding: var(--space-lg);
    }
    
    .velocity-details-grid {
        grid-template-columns: 1fr;
    }

    .velocity-finder-content {
        padding: 16px !important;
    }
    
    .velocity-finder-card {
        margin-bottom: 16px !important;
        padding: 16px !important;
    }
    
    .velocity-results-primary {
        font-size: 36px !important;
    }
    
    .velocity-export-button {
        width: 100% !important;
        margin-bottom: 8px !important;
        justify-content: center !important;
    }

    .velocity-interface-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .velocity-input-panel {
        position: static;
    }
    
    .velocity-hero h1 {
        font-size: 2.5rem;
    }
    
    .velocity-glass-card {
        padding: 20px;
    }

    .velocity-feature-grid {
        grid-template-columns: 1fr;
    }

    .velocity-risk-grid {
        grid-template-columns: 1fr;
    }

    .velocity-suggestions-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations - EXACT MATCH */
@keyframes velocity-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes velocity-pulse-glow {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(59, 78, 248, 0.3);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.05);
        box-shadow: 0 12px 35px rgba(59, 78, 248, 0.5);
    }
}

@keyframes velocity-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes velocity-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 8. ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

.velocity-finder-card {
    animation: velocity-fade-in 0.6s ease-out !important;
}

/* 9. UTILITY CLASSES */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }
.p-5 { padding: var(--space-xl); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }

/* 10. ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 11. FOCUS STATES */
*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* SIMPLE FIX - HIDE DASH DEBUG BAR WITHOUT BREAKING ANYTHING */
._dash-debug-menu {
    top: 60px !important; /* Move it below your header */
}

/* PROFESSIONAL ENTERPRISE CONFLICT RESOLUTION: Hamburger menu visibility */
/* COMMENTED OUT: Basic hamburger styling that may conflict with professional design */
/*
.sidebar-toggle,
.hamburger-menu {
    z-index: 999999 !important;
    position: relative !important;
}
*/

/* FIXED: Standard properties added for text gradient */
.velocity-logo-text h1 {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary) 40%, #3b4ef8 70%, #ffffff 100%);
    background-clip: text; /* ADDED: Standard property */
    -webkit-background-clip: text; /* Existing vendor prefix */
    color: transparent; /* ADDED: Fallback */
    -webkit-text-fill-color: transparent; /* Existing vendor prefix */
    margin: 0;
    letter-spacing: -0.025em;
}

.velocity-logo-text .velocity-subtitle {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 600;
    letter-spacing: 0.025em;
}

.velocity-status-indicator {
    display: flex;
    align-items: center;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    padding: 8px 16px;
    margin-right: 16px;
}

.velocity-status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-right: 8px;
    animation: velocity-pulse 2s ease-in-out infinite;
}

.velocity-status-text {
    font-size: 12px;
    color: #10b981;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.velocity-settings-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    padding: 10px;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.3s ease;
}

.velocity-settings-btn:hover {
    background: white;
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* Hero section - EXACT MATCH */
.velocity-hero {
    padding: 80px 0;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.velocity-hero-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.velocity-hero-badge {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary) 40%, #3b4ef8 70%, #ffffff 100%);
    color: #ffffff;
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    margin-bottom: 32px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 4px 20px rgba(59, 78, 248, 0.4);
    gap: 8px;
}

/* Simple header alignment - add to end of cc_windows_doors.css */
.cc-header-content {
    justify-content: flex-start;
}

/* ========================================================================
   ASCE PAGES ICON COLOR FIX - Force vibrant icon colors globally
   ======================================================================== */

/* Force icon colors for ASCE pages with high specificity */
.asce-7-22-container .fas,
.asce-7-22-container .fa,
.asce-7-22-container i[class*="fa-"],
.asce-7-16-container .fas,
.asce-7-16-container .fa,
.asce-7-16-container i[class*="fa-"] {
    filter: drop-shadow(0 0 8px currentColor) !important;
}

/* Specific icon color overrides for ASCE page elements */
.asce-page-title .fas,
.asce-legacy-page-title .fas {
    color: #10b981 !important;
    filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.8)) !important;
}

.asce-feature-item .fas {
    font-size: 20px !important;
    margin-right: 12px !important;
    filter: drop-shadow(0 0 8px currentColor) !important;
}

/* Force colors for specific feature icons */
.asce-feature-item .fa-tornado {
    color: #ef4444 !important;
}

.asce-feature-item .fa-map {
    color: #3b82f6 !important;
}

.asce-feature-item .fa-building {
    color: #8b5cf6 !important;
}

.asce-feature-item .fa-shield-alt {
    color: #10b981 !important;
}

.asce-feature-item .fa-clock {
    color: #f59e0b !important;
}

.asce-feature-item .fa-chart-line {
    color: #6366f1 !important;
}

.asce-feature-item .fa-tools {
    color: #8b5cf6 !important;
}

.asce-feature-item .fa-archive {
    color: #10b981 !important;
}

/* ========================================================================
   FONTAWESOME ICON COLOR SUPPORT - LET PYTHON INLINE STYLES WORK
   Remove interference and allow wind_sidebar.py electric colors to display
   ======================================================================== */

/* Allow Python inline styles to work - no CSS interference */
/* Electric color hierarchy is managed by wind_sidebar.py:
   - Main categories: #00ffff (Aqua Electric)  
   - Sub-categories: #0080ff (Electric Blue)
   - Sub-sub-categories: #40e0d0 (Turquoise Electric)
*/

/* NUCLEAR OPTION: Force Python inline styles to win over CSS variables */
.wind-sidebar i[style*="color"],
.professional-wind-sidebar i[style*="color"],
#sidebar i[style*="color"] {
    color: inherit !important;
}

/* ========================================================================
   RESPONSIVE WELCOME HEADER - ADJUSTS WITH SIDEBAR
   ======================================================================== */

/* 🎨 GRADIENT FIX APPLIED HERE - Line 1980 - VIBRANT BLUE! */
.welcome-header {
    padding: 15px 30px;
    background: linear-gradient(135deg, #0018ff 0%, #181E57 100%); /* FIXED: Vibrant gradient! */
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #3b82f6;
    transition: all 0.3s ease;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* When sidebar is open (default) - USE CSS VARIABLES for consistency */
.content-wrapper {
    margin-left: var(--sidebar-width, 380px);
    width: calc(100vw - var(--sidebar-width, 380px));
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* When sidebar is closed - USE CSS VARIABLES for consistency */
.content-wrapper.collapsed-right,
.sidebar-closed + .content-wrapper,
body.sidebar-closed .content-wrapper {
    margin-left: var(--sidebar-collapsed, 60px) !important;
    width: calc(100vw - var(--sidebar-collapsed, 60px)) !important;
}

/* Ensure welcome header stays aligned */
.welcome-header h4 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .content-wrapper,
    .content-wrapper.expanded,
    .content-wrapper.collapsed-right {
        margin-left: 0 !important;
        width: 100vw !important;
    }

    .welcome-header {
        padding: 12px 16px;
    }

    .welcome-header h4 {
        font-size: 1rem !important;
    }

    .welcome-header p {
        font-size: 0.8rem !important;
    }
}

/* ========================================
   SMOOTH LOADING OVERLAY - MASKS ALL FLASHES
   ======================================== */

/* Global loading overlay that covers entire page */
._dash-loading {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px) !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: opacity 0.2s ease !important;
}

/* Hide the default Dash loading spinner */
._dash-loading::before,
._dash-loading::after {
    display: none !important;
}

/* Custom spinner animation */
._dash-loading::before {
    content: '' !important;
    display: block !important;
    width: 60px !important;
    height: 60px !important;
    border: 4px solid rgba(59, 130, 246, 0.1) !important;
    border-top-color: #3b82f6 !important;
    border-radius: 50% !important;
    animation: spin 0.8s linear infinite !important;
}

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

/* Smooth fade in for content after loading */
#main-content,
#cc-calculator-container {
    animation: fadeIn 0.3s ease !important;
}

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

/* Prevent flash of white during transitions */
.cc-panel,
.cc-selection-card {
    transition: all 0.2s ease !important;
}

/* Smooth transitions for all form inputs */
.cc-form-input,
.cc-form-select {
    transition: all 0.15s ease !important;
}

/* ========================================
   LOADING SPINNER - CENTERED & VISIBLE
   ======================================== */

#content-loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#content-loading ._dash-loading {
    z-index: 1000 !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#content-loading ._dash-loading-callback {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Make the spinner bigger and more visible */
#content-loading .dash-spinner {
    width: 60px !important;
    height: 60px !important;
    border-width: 4px !important;
}

/* ========================================
   🎨 MAIN GRADIENT FIX - LINE 2090 - THIS IS THE KEY FIX! ✅
   PREVENT BACKGROUND FLICKER ON TRANSITIONS
   ======================================== */

/* Force consistent background on all main containers - MAKE TRANSPARENT! */
#main-content,
.main-content-container,
#content-loading,
.content-wrapper {
    background: transparent !important; /* SAFETY RULE: Keep transparent to show body gradient */
}

/* 🔥 CRITICAL FIX - Line 2090 - VIBRANT BLUE GRADIENT FOR ENTIRE APP! */
body,
#react-entry-point,
#_dash-app-content {
    background: linear-gradient(135deg, #0018ff 0%, #181E57 100%) !important; /* FIXED: Vibrant blues! */
    background-attachment: fixed !important;
    min-height: 100vh;
}

/* Prevent white flash during loading - KEEP TRANSPARENT */
._dash-loading-callback {
    background: transparent !important; /* SAFETY RULE: Don't block the gradient */
}

/* Keep loading spinner area transparent */
#content-loading ._dash-loading-callback {
    background: rgba(255, 255, 255, 0.95) !important;
    /* Only the spinner box should have background, not the whole area */
}

/* 🎨 CRITICAL SAFETY RULE - Make all Dash containers transparent */
.cc-content-area,
.cc-main-container,
.content-area,
._dash-renderer,
#_pages_plugin_container {
    background: transparent !important; /* SAFETY RULE: Show body gradient through all layers */
}

/* ==========================================================================
   🎉 GRADIENT FIX CHANGE LOG
   ==========================================================================
   
   DATE: October 10, 2025
   ISSUE: Dark blue gradient (#1e3a8a, #1e40af) creating split background
   
   CHANGES MADE:
   ✅ Line 1980: .welcome-header - Changed to vibrant gradient
      OLD: background-color: #1e3a8a;
      NEW: background: linear-gradient(135deg, #0018ff 0%, #181E57 100%);
   
   ✅ Line 2090: body, #react-entry-point, #_dash-app-content - Changed to vibrant gradient
      OLD: background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
      NEW: background: linear-gradient(135deg, #0018ff 0%, #181E57 100%);
   
   ✅ Line 2116: Added safety rules for Dash containers
      NEW: Made all Dash containers transparent to show gradient
   
   RESULT: Beautiful vibrant blue gradient visible from top to bottom! 🔵✨
   
   ========================================================================== */

/* ==========================================================================
   SUBSCRIPTION ACCESS CONTROL & COPY PROTECTION
   Added for 7-day trial management and subscription enforcement
   ========================================================================== */

/* Copy Protection - Prevent text selection in calculator content for trial users */
.copy-protected,
.calculator-content.trial-user,
.results-section.trial-user,
.calculation-results.trial-user {
    -webkit-user-select: none;  /* Safari */
    -moz-user-select: none;     /* Firefox */
    -ms-user-select: none;      /* IE10+/Edge */
    user-select: none;          /* Standard */
    -webkit-touch-callout: none; /* iOS Safari */
}

/* Subscription Modal Styling */
.subscription-modal .subscribe-btn:hover {
    background-color: #181E57 !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 24, 255, 0.3);
}

/* Modal animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.subscription-modal > div:last-child {
    animation: modalFadeIn 0.3s ease-out;
}

/* Print protection for trial users */
@media print {
    .trial-user .calculator-content,
    .trial-user .results-section,
    .trial-user .calculation-results {
        display: none !important;
    }
    
    .trial-user::after {
        content: "Subscribe to enable printing and exports";
        display: block;
        padding: 50px;
        text-align: center;
        font-size: 24px;
        color: #6b7280;
    }
}

/* Trial status banner styling */
.trial-status-banner {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
    padding: 12px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.trial-status-banner.expired {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.trial-status-banner a {
    color: #0018ff;
    text-decoration: underline;
    font-weight: 700;
}

.trial-status-banner.expired a {
    color: white;
}


/* ==========================================================================
   MOBILE RESPONSIVE DESIGN - SMARTPHONES & TABLETS
   Optimized for iPhone, Android, and all mobile devices
   ========================================================================== */

/* Mobile Base Styles */
@media only screen and (max-width: 768px) {
    
    /* Base font size adjustment for mobile readability */
    body {
        font-size: 14px;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }

    /* Sidebar mobile optimization */
    .sidebar {
        width: 100% !important;
        position: fixed !important;
        left: -100% !important;
        transition: left 0.3s ease-in-out;
        z-index: 10000;
        height: 100vh;
        overflow-y: auto;
    }

    .sidebar.mobile-open {
        left: 0 !important;
    }

    /* Main content full width on mobile */
    .main-content,
    #main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 15px !important;
    }

    /* Page headers mobile */
    .page-header {
        padding: 20px 15px !important;
    }

    .page-title {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }

    .page-subtitle {
        font-size: 14px !important;
    }

    /* Subscription Modal Mobile */
    .subscription-modal-container {
        padding: 10px !important;
        align-items: flex-start !important;
        overflow-y: auto !important;
    }

    .subscription-modal-content {
        padding: 25px 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: auto !important;
        border-radius: 12px !important;
        max-height: none !important;
    }

    .subscription-modal-content h2 {
        font-size: 22px !important;
    }

    .subscription-modal-content p {
        font-size: 14px !important;
    }

    .subscription-modal .subscribe-btn {
        width: 100% !important;
        text-align: center !important;
        padding: 14px 20px !important;
        font-size: 16px !important;
    }

    /* Product cards stack on mobile */
    .subscription-modal-content > div {
        margin-bottom: 15px !important;
    }

    /* Form inputs mobile */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    select,
    textarea {
        font-size: 16px !important; /* Prevents iOS zoom */
        padding: 12px !important;
        width: 100% !important;
    }

    /* Buttons mobile */
    .btn,
    .btn-primary,
    .btn-secondary,
    button {
        padding: 12px 20px !important;
        font-size: 16px !important;
        width: 100% !important;
        margin-bottom: 10px !important;
    }

    /* Tables responsive */
    table {
        font-size: 12px !important;
        overflow-x: auto !important;
        display: block !important;
    }

    /* Cards mobile */
    .card,
    .info-card,
    .result-card {
        padding: 15px !important;
        margin-bottom: 15px !important;
    }

    /* Grid layouts stack on mobile */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* Navigation links */
    .sidebar-link {
        font-size: 15px !important;
        padding: 12px 15px !important;
    }

    /* Icons mobile size */
    .fas,
    .far,
    .fab {
        font-size: 18px !important;
    }

    /* Calculator results mobile */
    .results-section {
        padding: 15px !important;
    }

    .calculation-results {
        overflow-x: auto !important;
    }

    /* Export buttons mobile */
    .export-btn,
    .print-btn,
    .pdf-btn,
    .excel-btn,
    .csv-btn {
        width: 100% !important;
        margin: 5px 0 !important;
    }

    /* Status banners mobile */
    .trial-status-banner {
        font-size: 13px !important;
        padding: 10px 15px !important;
    }

    /* Dropdown menus mobile */
    .dropdown-menu {
        width: 100% !important;
        left: 0 !important;
    }

    /* Tooltips mobile */
    .tooltip {
        font-size: 12px !important;
        max-width: 90vw !important;
    }

    /* Modal dialogs mobile */
    .modal-dialog {
        margin: 10px !important;
        width: calc(100% - 20px) !important;
    }

    /* Tabs mobile */
    .tabs {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .tab {
        font-size: 14px !important;
        padding: 10px 15px !important;
    }
}

/* Tablet optimization (768px - 1024px) */
@media only screen and (min-width: 769px) and (max-width: 1024px) {

    .sidebar,
    .wind-sidebar {
        width: 280px !important;
    }

    .sidebar.collapsed,
    .wind-sidebar.collapsed {
        width: var(--sidebar-collapsed, 60px) !important;
    }

    /* Default: sidebar expanded */
    .content-wrapper {
        margin-left: 280px;
        width: calc(100vw - 280px);
    }

    /* Sidebar collapsed: content takes more space */
    .content-wrapper.collapsed-right {
        margin-left: var(--sidebar-collapsed, 60px) !important;
        width: calc(100vw - var(--sidebar-collapsed, 60px)) !important;
    }

    .main-content,
    #main-content {
        padding: 20px !important;
    }

    .subscription-modal-content {
        padding: 35px !important;
        max-width: 600px !important;
    }

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

/* Small phones (< 375px) */
@media only screen and (max-width: 374px) {
    
    body {
        font-size: 13px;
    }

    .page-title {
        font-size: 20px !important;
    }

    .subscription-modal-content {
        padding: 20px 15px !important;
    }

    .subscription-modal-content h2 {
        font-size: 20px !important;
    }

    input,
    select,
    textarea,
    button {
        font-size: 14px !important;
    }
}

/* Large phones and phablets (375px - 480px) */
@media only screen and (min-width: 375px) and (max-width: 480px) {
    
    .main-content,
    #main-content {
        padding: 15px !important;
    }

    .subscription-modal-content h2 {
        font-size: 24px !important;
    }
}

/* Landscape mode for phones */
@media only screen and (max-width: 768px) and (orientation: landscape) {
    
    .sidebar {
        width: 250px !important;
    }

    .main-content,
    #main-content {
        margin-left: 0 !important;
    }

    .subscription-modal-container {
        align-items: center !important;
    }

    .subscription-modal-content {
        max-height: 85vh !important;
        overflow-y: auto !important;
    }
}

/* Touch-friendly enhancements */
@media (hover: none) and (pointer: coarse) {
    
    /* Larger tap targets */
    a,
    button,
    .btn,
    .sidebar-link,
    .tab {
        min-height: 44px !important;
        min-width: 44px !important;
    }

    /* Remove hover effects on touch devices */
    .sidebar-link:hover,
    .btn:hover {
        transform: none !important;
    }

    /* Add active/tap states */
    .sidebar-link:active,
    .btn:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
}

/* iPhone X, XS, 11 Pro, 12 mini, 13 mini notch support */
@supports (padding: max(0px)) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .sidebar {
        padding-left: env(safe-area-inset-left);
    }

    .subscription-modal-container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* Prevent zoom on input focus (iOS) */
@supports (-webkit-touch-callout: none) {
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Smooth scrolling for mobile */
@media only screen and (max-width: 768px) {
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    * {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
}


/* ==========================================================================
   MOBILE MENU TOGGLE BUTTON
   ========================================================================== */

/* Mobile menu toggle - hidden by default, shown on mobile */
.mobile-menu-toggle {
    display: none !important;
}

@media only screen and (max-width: 768px) {
    .mobile-menu-toggle {
        display: block !important;
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle:active {
        transform: scale(0.95);
    }

    /* Sidebar wrapper gets mobile-open class when menu is open */
    .sidebar-wrapper {
        position: fixed;
        left: -100%;
        transition: left 0.3s ease-in-out;
        z-index: 10000;
        height: 100vh;
        width: 80%;
        max-width: 300px;
    }

    .sidebar-wrapper.mobile-open {
        left: 0 !important;
    }

    /* Overlay when sidebar is open */
    .mobile-sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        display: none;
    }

    .mobile-sidebar-overlay.active {
        display: block;
    }

    /* Welcome header adjustments for mobile */
    .welcome-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding: 60px 15px 15px 15px !important;
    }

    .welcome-header button {
        width: 100% !important;
    }
}

