/* ZoneGenius Modern Design System */
:root {
    /* Primary Brand Colors - Clean 5-Color Palette */
    --primary-gradient-start: #e0f2fe;
    --primary-gradient-end: #7dd3fc;
    --primary-accent: #3b82f6;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    /* Functional Colors - Only Essential */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    /* Backgrounds */
    --bg-primary: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    --bg-card: rgba(255, 255, 255, 0.08);
    --bg-surface: #f9fafb;
    --bg-dark: #1e3a8a;
    --dark-color: #1e293b;
    --gradient: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    /* Animation */
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --transition-fast: 150ms;
    --transition-base: 200ms;
    --transition-slow: 300ms;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

html {
    background: #1e3a8a;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    color: white;
    background: var(--bg-primary); 
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global Text Colors Overrides for Dark Theme */
.text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.text-success {
    color: #34d399 !important;
}

.text-dark {
    color: white !important; /* Force override for hardcoded classes */
}

h1, h2, h3, h4, h5, h6 {
    color: white;
}

/* Gradient Animation */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Fade In Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* House Infographic Styles */
.house-infographic {
    position: relative;
    padding: var(--space-8);
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
}

    .house-infographic:hover {
        box-shadow: var(--shadow-xl);
        background: rgba(0, 0, 0, 0.24);
    }

.house-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    transition: all var(--transition-base) var(--ease-out);
}

/* Animated Flow Arrows */
@keyframes flowAnimation {
    0% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: 50;
    }
}

.flow-arrow {
    animation: flowAnimation 2s linear infinite;
}

.flow-arrow.heating {
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.flow-arrow.cooling {
    animation-duration: 2s;
    animation-delay: 0.75s;
}

.infographic-legend {
    display: flex;
    justify-content: center;
    gap: var(--space-6);
    margin-top: var(--space-6);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

.legend-color {
    display: inline-block;
    width: 20px;
    height: 3px;
    border-radius: 2px;
}

/* Slide Up Animation */
@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Page entrance animation */
.page-content {
    animation: fadeIn 0.4s var(--ease-out);
    padding-top: 160px;
    background: var(--gradient);
}

/* Modal Z-Index */
.modal-backdrop {
    z-index: 1050;
    backdrop-filter: blur(4px);
}

.modal {
    z-index: 1055;
}

.modal-content {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
    background: rgba(30, 41, 59, 0.95); /* Dark background for modal */
    backdrop-filter: blur(16px);
    color: white;
}

.modal-header, .modal-footer {
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* 
   -------------------------------------------------------------------------
   Unified Card System
   -------------------------------------------------------------------------
*/

/* Base Card Skin */
.glass-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    color: white;
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    transition: all var(--transition-base) var(--ease-out);
    position: relative;
    overflow: hidden;
}

/* Card Modifiers */
.card-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.card-hover:hover {
    box-shadow: var(--shadow-xl);
    background: rgba(255, 255, 255, 0.12);
}

.card-animate {
    animation: slideUp 0.4s var(--ease-out) both;
}

.card-pad-lg { padding: var(--space-8); }
.card-pad-xl { padding: var(--space-10); }

/* Animation Staggering (Applied to glass-card children) */
.glass-card:nth-child(1) { animation-delay: 0ms; }
.glass-card:nth-child(2) { animation-delay: 100ms; }
.glass-card:nth-child(3) { animation-delay: 200ms; }
.glass-card:nth-child(4) { animation-delay: 300ms; }
.glass-card:nth-child(5) { animation-delay: 400ms; }
.glass-card:nth-child(6) { animation-delay: 500ms; }

/* Icon Interactions */
.card-hover:hover .card-icon,
.card-hover:hover .feature-icon {
    transform: scale(1.1);
}

/* Feature Card Specifics (Extends glass-card) */
.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin-bottom: var(--space-6);
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-base) var(--ease-out);
}

/* Pricing Card Specifics (Extends glass-card) */
.pricing-card.featured {
    border-color: var(--primary-accent);
    background: rgba(59, 130, 246, 0.1);
}

.pricing-card.featured:hover {
    background: rgba(59, 130, 246, 0.15);
}

.pricing-card {
    height: 100%;
}

.card {
    /* Legacy Bootstrap override to match glass theme if used without glass-card */
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    color: white;
}

/* End Card System */

.bg-gradient-success {
    background: linear-gradient(135deg, #10b981, #045662) !important;
}
.bg-gradient-info {
    background: linear-gradient(135deg, #06b6d4, #0B60DF) !important;
}
.bg-gradient-primary { background: linear-gradient(135deg, #3b82f6, #4a3066) !important; }
.bg-gradient-warning { background: linear-gradient(135deg, #f59e0b, #ef4444) !important; }

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-4);
    font-weight: 600;
    font-size: 1.125rem;
    color: white;
    width: 100%;
}

/* Dashboard Link Overlay */
.dashboard-card {
    position: relative;
    cursor: pointer;
}

.dashboard-card a.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

/* Icon Styles */
.card-icon, .metric-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg); /* Rounded rectangle instead of circle */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    color: white;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base) var(--ease-out);
    margin-bottom: var(--space-4);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: var(--space-3) 0;
}

.metric-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-base) var(--ease-out);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
}

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

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

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
}

.btn-light {
    background: #f8f9fa;
    color: #1e3a8a;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
}

.btn-light:hover {
    background: #e2e6ea;
    color: #1e3a8a;
}

/* Forms */
.form-control, .form-select {
    padding: var(--space-3) var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all var(--transition-base) var(--ease-out);
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right var(--space-4) center;
    background-size: 16px 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-control-sm,
.input-group-sm > .form-control,
.input-group-sm > .form-select,
.input-group-sm > .input-group-text {
    padding: var(--space-2) var(--space-3);
    font-size: 0.875rem;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Make disabled inputs readable but visually distinct */
input.form-control:disabled,
input.form-control[readonly],
.form-control:disabled,
.form-control[readonly] {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 0.75 !important;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.15) !important;
    border-style: dashed !important;
}

select option {
    background-color: white;
    color: black;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-2);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-check {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding-left: 0;
    margin-bottom: var(--space-4);
}

.form-check-input {
    margin-top: 0;
    margin-left: 0;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

/* Badges */
.badge {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: var(--gray-900);
}

.badge-danger {
    background: var(--danger);
    color: white;
}

.badge-info {
    background: var(--info);
    color: white;
}

/* Navigation (Glassmorphism) */
.navbar,
.glass-nav {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
    padding: var(--space-2) 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.glass-nav::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    z-index: -1;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-gradient-start) !important;
    display: flex;
    align-items: center;
    transition: transform var(--transition-base) var(--ease-out);
}

.glass-dropdown {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(40px) !important;
    -webkit-backdrop-filter: blur(40px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
    /* Fix for backdrop-filter rendering by breaking stacking context */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    z-index: 1050 !important;
}

.glass-dropdown .dropdown-item {
    color: white !important;
    transition: background 0.2s ease;
}

.glass-dropdown .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.glass-dropdown .dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-container {
    z-index: 1100 !important;
}

.toast {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(40px) !important;
    -webkit-backdrop-filter: blur(40px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
    color: white !important;
    border-radius: var(--radius-lg);
}

.toast-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white !important;
}

.toast-body {
    color: rgba(255, 255, 255, 0.9);
}

/* Hero Section */
.gradient-text {
    background: linear-gradient(135deg, #f0f9ff 0%, #bae6fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: #f8fafc !important; /* Very light color to pass contrast tests while gradient is active */
}

/* Data Visualization */
.chart-container {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: none;
    margin-bottom: var(--space-6);
}

/* Alerts */
.alert {
    border-radius: var(--radius);
    padding: var(--space-4);
    border: none;
    box-shadow: var(--shadow-sm);
    animation: slideUp 0.3s var(--ease-out);
}

/* Tables */
.table {
    background: transparent !important;
    color: white !important;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead {
    background: rgba(255, 255, 255, 0.05);
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.8);
    padding: var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table td {
    padding: var(--space-4);
    color: white !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table tbody tr {
    transition: background-color var(--transition-fast) var(--ease-out);
}

.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Ensure table inputs and badges are readable on dark backgrounds */
.table .badge, .table .btn {
    color: inherit;
}

/* Progress bars on dark backgrounds */
.progress {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.progress-bar {
    opacity: 1 !important;
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .card {
        padding: var(--space-4);
    }
}

/* Focus Styles for Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Rest of styles preserved/merged */
.container-fluid, .page {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

/* Section Containers */
.section .container,
.footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.page {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar {
    background: var(--gradient);
    box-shadow: var(--shadow);
}

main {
    flex: 1;
}

.top-row {
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 60px;
    backdrop-filter: blur(10px);
}

.content {
    flex: 1;
    padding: 2rem;
}

.nav-link {
    color: var(--primary-gradient-start) !important;
    padding: 0.75rem 1.5rem;
    margin: 0.25rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 1rem; /* Match body font size */
    font-family: inherit; /* Ensure it uses Inter */
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: rgb(255, 255, 255) !important;
    background: rgba(255, 255, 255, 0.1);
}

/*
   -------------------------------------------------------------------------
   Unified Section System
   -------------------------------------------------------------------------
*/

.section {
    padding: var(--space-20) 0;
    position: relative;
    overflow: hidden;
}

.section-hero {
    color: white;
    padding-bottom: var(--space-20);
    /* Background handled by global page styles or inline */
}

.section-dark {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    text-align: center;
}

.section-glass {
    background: rgba(30, 35, 70, 0.5);
    color: white;
}

.section-glass-light {
    background: rgba(240, 249, 255, 0.02);
    color: white;
}

/* End Section System */

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: slideUp 0.6s var(--ease-out);
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.7;
    animation: slideUp 0.6s var(--ease-out) 0.1s both;
}

.glass-logo-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    perspective: 1000px;
    padding: 3rem 0;
    position: relative;
}

.glass-logo-svg {
    width: 200px;
    height: 200px;
    animation: float 6s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.glass-logo-svg path {
    fill: none;
    stroke: var(--primary-gradient-start);
    stroke-width: 2;
}

    .glass-logo-svg circle {
        fill: var(--primary-gradient-end);
    }

.glass-logo-reflection {
    width: 200px;
    height: 300px;
    position: absolute;
    top: 200px;
    transform: scaleY(-1);
    mask-image: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,0.3) 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,0.3) 100%);
    animation: float-reflection 6s ease-in-out infinite;
    z-index: 1;
}

    .glass-logo-reflection path {
        fill: none;
        stroke: var(--primary-gradient-start);
        stroke-width: 2;
    }

    .glass-logo-reflection circle {
        fill: var(--primary-gradient-end);
    }

.floor-shadow {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 30px;
    background: radial-gradient(ellipse at center,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 40%,
        transparent 70%);
    filter: blur(10px);
    z-index: 0;
}

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

@keyframes float-reflection {
    0%, 100% {
        transform: scaleY(-1) translateY(20px);
    }
    50% {
        transform: scaleY(-1) translateY(0px);
    }
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-3);
}

.feature-description {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

.feature-card h3 {
    color: rgb(255, 255, 255);
    margin-bottom: 1rem;
    font-weight: 700;
}

.feature-card p {
    color: rgb(255, 255, 255);
    font-size: 1rem;
    line-height: 1.6;
}

.footer {
    background: var(--dark-color);
    padding: 3rem 0 1rem;
    margin-top: auto;
    list-style: none;
    font-size: 0.813rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color var(--transition-fast) var(--ease-out);
}

.footer a {
    color: rgba(255, 255, 255, 0.5);
}

.footer a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.benefits-list {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    list-style-type: none !important;
}

.benefits-list li i {
    color: #10b981;
    margin-right: 1rem;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.bg-primary { background-color: var(--primary) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-info { background-color: var(--info) !important; }

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.btn-outline-light {
    color: #e0f2fe;
    background-color: transparent;
    border-color: #e0f2fe;
    border-width: 1px;
}

.btn-outline-light:hover {
    color: #1e3a8a;
    background-color: #e0f2fe;
    border-color: #e0f2fe;
}

.hvac-infographic {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem;
}

.hvac-system-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    min-height: 400px;
}

.building-icon {
    position: relative;
    animation: building-fade-in 0.6s ease-out forwards;
}

.control-arrows {
    display: flex;
    gap: 3rem;
    margin: 1rem 0;
}

.arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: arrow-fade-in 0.6s ease-out forwards;
}

.arrow:nth-child(2) {
    animation-delay: 0.3s;
}

.arrow-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.brain-center-main {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(59, 130, 246, 0.15);
    border: 2px solid #3b82f6;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    justify-content: center;
    animation: brain-fade-in 0.6s ease-out 0.4s forwards;
    opacity: 0;
}

.ai-label {
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    margin-top: 0.25rem;
}

.pulse-animation {
    position: absolute;
    width: 140px;
    height: 140px;
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 50%;
    animation: pulse-ring-initial 0.8s ease-out forwards;
}

.weather-sensors {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.sensor-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(30, 35, 70, 0.7);
    border-radius: 8px;
    animation: sensor-fade-in 0.6s ease-out forwards;
    opacity: 0;
}

.sensor-group:nth-child(2) {
    animation-delay: 0.5s;
}

.sensor-group:nth-child(3) {
    animation-delay: 0.7s;
}

.sensor-group i {
    font-size: 1.5rem;
    color: #10b981;
}

.sensor-group span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 1);
}

.badge-content {
    text-align: center;
}

.badge-content strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.badge-content span {
    font-size: 0.7rem;
    opacity: 0.9;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

#blazor-error-ui {
    background: #fef3c7;
    color: #92400e;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

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

@keyframes arrow-fade-in {
    0% { 
        opacity: 0;
        transform: translateY(20px);
    }
    100% { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes building-fade-in {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes brain-main-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(59, 130, 246, 0.6); }
}

@keyframes brain-fade-in {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes sensor-fade-in {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes badge-slide-in {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }
    
    .weather-sensors {
        flex-direction: column;
        gap: 1rem;
    }
    
    .control-arrows {
        gap: 1.5rem;
    }
}

.dashboard-header {
    color: white;
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    color: white;
}

.dashboard-header p {
    color: rgba(255, 255, 255, 0.8);
}

/* Page header helpers */
.zg-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-6);
    flex-wrap: wrap;
    margin-bottom: var(--space-6);
}

.zg-page-header--tight {
    margin-bottom: var(--space-3);
}

.zg-page-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.zg-back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    transition: background var(--transition-base) var(--ease-out), color var(--transition-base) var(--ease-out);
}

.zg-back-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

/* Make all code text bright and readable */
pre.bg-dark code {
    color: #f8f9fa !important;
    filter: brightness(1.2);
}

/* Override any default browser styling for code elements */
pre.bg-dark code * {
    color: inherit !important;
}

/* LoginDisplay */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.system-actions .btn-outline-primary,
.system-actions .btn-outline-secondary {
    color: white;
    border-color: white;
}

.system-actions .btn-outline-primary:hover {
    background-color: white;
    color: var(--primary-color);
    border-color: white;
}

.system-actions .btn-outline-secondary:hover {
    background-color: white;
    color: var(--secondary-color);
    border-color: white;
}

.btn-outline-secondary {
    color: white !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.btn-outline-secondary:hover {
    background-color: white !important;
    color: var(--primary-color) !important;
}

.badge {
    color: white;
}

/* Override table styles for glass effect */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: white;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.08);
    --bs-table-hover-color: white;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.04);
    --bs-table-striped-color: white;
    --bs-table-border-color: rgba(255, 255, 255, 0.1);
    color: white !important;
    background-color: transparent !important;
}

.table thead {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
}

.table thead th {
    color: rgba(255, 255, 255, 0.8) !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

.table tbody tr {
    background-color: transparent !important;
    color: white !important;
}

.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: white !important;
}

.table td {
    color: white !important;
    border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

a {
    color: var(--primary-gradient-end);
}

a:hover {
    color: var(--primary-gradient-start);
}

.empty-state {
    color: white;
    text-align: center;
    padding: 2rem;
}

.empty-state h3 {
    color: white;
}

/* Ensure text in cards is readable */
.metric-content h3, .metric-content p, .card-content h3, .card-content p {
    color: white !important;
}
.metric-content p, .card-content p {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Feature and Stats */
.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
    padding: var(--space-4);
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: var(--space-4);
}

.cta-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
}

.cta-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.pricing-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-4);
}

.pricing-price {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: var(--space-2);
}

.pricing-price span {
    font-size: 1.25rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: var(--space-8) 0;
}

.pricing-features li {
    padding: var(--space-3) 0;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.pricing-features i {
    color: var(--success);
    font-size: 1.25rem;
}

/* Navbar Logo Styling */
.navbar-logo path {
    fill: none;
    stroke: var(--primary-gradient-start);
}

.navbar-logo circle {
    fill: var(--primary-gradient-end);
}

/* 
   -------------------------------------------------------------------------
   Zone Card Styles
   -------------------------------------------------------------------------
*/

.zone-card {
    position: relative;
}

.zone-card-header {
    margin-bottom: var(--space-4);
}

.zone-status-badge {
    flex-shrink: 0;
}

.zone-status-badge .badge {
    font-size: 0.75rem;
    padding: var(--space-2) var(--space-3);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}

.zone-card-metrics {
    margin-bottom: var(--space-4);
}

.metric-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: var(--space-3);
    text-align: center;
    transition: background var(--transition-base) var(--ease-out);
}

.metric-box:hover {
    background: rgba(255, 255, 255, 0.08);
}

.metric-box .metric-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.metric-box .metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.metric-box .metric-value small {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-left: var(--space-1);
}

.zone-card-charts {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sparkline-container {
    position: relative;
}

.sparkline-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

/* SVG Sparkline Styling */
.sparkline {
    width: 100%;
    height: 50px;
    display: block;
}

.sparkline path {
    transition: stroke-width 0.2s ease;
}

.sparkline:hover path[stroke] {
    stroke-width: 3;
}
