/* Solar Preventivatore Styles - Enhanced UX/UI */

/* ====================
   ROOF DATA OVERLAY CARD STYLES
   ==================== */
.roof-data-overlay-card .card {
    background: #ffffff;
    border: 1px solid rgba(255, 107, 53, 0.1);
    transition: all 0.3s ease;
}

.roof-data-overlay-card .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

.roof-data-overlay-card .icon-wrapper {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 50%;
    font-size: 1.2rem;
}

.roof-data-overlay-card .icon-wrapper i {
    transition: transform 0.2s ease;
}

.roof-data-overlay-card .card:hover .icon-wrapper i {
    transform: scale(1.1);
}

#roof-view-toggle .btn-outline-primary {
    border-color: #3b82f6;
    color: #3b82f6;
    font-size: 0.8rem;
    padding: 0.375rem 0.5rem;
}

#roof-view-toggle .btn-outline-primary:hover,
#roof-view-toggle .btn-outline-primary.active,
#roof-view-toggle .btn-check:checked + .btn-outline-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* ====================
   DESIGN SYSTEM VARIABLES
   ==================== */
:root {
    /* Primary Colors */
    --primary-orange: #3b82f6;
    --primary-orange-dark: #1e3a8a;
    --primary-orange-light: #60a5fa;
    --secondary-gold: #2563eb;
    
    /* Gradient Definitions */
    --gradient-primary: #3b82f6;
    --gradient-secondary: #667eea;
    --gradient-success: #10b981;
    --gradient-warning: #f59e0b;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Plus Jakarta Sans', var(--font-primary);
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;
    
    /* Border Radius Scale */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-round: 50%;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.15);
    
    /* Animations */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====================
   ENHANCED TYPOGRAPHY
   ==================== */
body {
    font-family: var(--font-primary);
    font-feature-settings: "cv03", "cv04", "cv11";
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ====================
   ANIMAZIONE MESE PER MESE - ENHANCED
   ==================== */
.month-indicator {
    background: #ffffff;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 2px solid transparent;
    background-clip: padding-box;
    animation: fadeInScale var(--transition-normal) ease-out;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.month-indicator::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    opacity: 0;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
    filter: blur(0.5px);
}

.month-indicator:hover::before {
    opacity: 0.4;
    animation-duration: 1.5s;
}

@keyframes borderGlow {
    0%, 100% { 
        opacity: 0; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.3;
        transform: scale(1.01);
    }
}

.month-display {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.month-display .fw-bold {
    font-size: 1.4rem;
    color: #3b82f6;
    display: inline-block;
    animation: monthChange 0.4s ease-out;
}

.month-display small {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

.solar-value {
    padding: 10px;
    background: rgba(255, 107, 53, 0.05);
    border-radius: 8px;
    margin-top: 10px;
    animation: pulseValue 0.5s ease-out;
}

.solar-value .h4 {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 4px rgba(255, 107, 53, 0.2);
}

@keyframes monthChange {
    0% {
        transform: scale(0.9) rotate(-2deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.05) rotate(1deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulseValue {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Heatmap overlay effect */
.heatmap-overlay {
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

/* ====================
   MODERN BUTTON SYSTEM
   ==================== */
.btn-primary-modern {
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn-primary-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    transition: left var(--transition-slow);
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: #3b82f6;
}

.btn-primary-modern:hover::before {
    left: 100%;
}

.btn-primary-modern:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

/* ====================
   PREVENTIVATORE HERO SECTION - ENHANCED
   ==================== */
.preventivatore-main-container {
    animation: fadeInUp var(--transition-slow) ease-out;
    width: 100%;
    max-width: 100%;
}

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

.trust-badge {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.trust-badge:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    background: #ffffff;
    border-color: rgba(255, 107, 53, 0.2);
}

.trust-badge i {
    transition: all var(--transition-normal);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.trust-badge:hover i {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 4px 8px rgba(255, 107, 53, 0.3));
}

/* ====================
   MODERN CARD SYSTEM
   ==================== */
.card-modern {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background: #ffffff;
    overflow: hidden;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-modern .card-header {
    border: none;
    background: rgba(255,255,255,0.9);
    padding: var(--space-xl);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.card-modern .card-body {
    background: transparent;
    padding: var(--space-xl);
}

/* ====================
   COMPACT STEP HEADERS
   ==================== */

.step-header-compact {
    background: var(--gradient-primary);
    color: white;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.step-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-round);
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.step-icon i {
    font-size: 1.25rem;
    color: white;
}

.elio-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.elio-badge i {
    font-size: 0.9rem;
}

/* ====================
   HERO ADDRESS SECTION
   ==================== */

.hero-badge {
    display: inline-block;
    background: rgba(251, 191, 36, 0.1);
    color: #f59e0b;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.address-hero-section {
    padding: 0.75rem 0 1rem 0;
    text-align: center;
    background: #ffffff;
}

.hero-header-compact {
    margin: 0 auto 1rem auto;
}

.elio-brand {
    font-size: 1.1rem;
    color: var(--primary-orange);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 700;
    color: #1a202c;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #64748b;
}

.address-input-hero {
    max-width: 600px;
    margin: 0 auto;
}

.hero-input-wrapper {
    position: relative;
    margin-bottom: var(--space-md);
}

.hero-input-field {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    padding: var(--space-md);
}

.hero-input-field:hover {
    border-color: var(--primary-orange-light);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.15);
}

.hero-input-field.has-value,
.hero-input-field:focus-within {
    border-color: var(--primary-orange);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.2);
}

.input-icon-hero {
    color: var(--primary-orange);
    font-size: 1.25rem;
    margin-right: var(--space-md);
    display: flex;
    align-items: center;
}

.form-control-hero {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 500;
    color: #1a202c;
    padding: var(--space-sm) 0;
}

.form-control-hero::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.clear-hero-btn {
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-round);
    transition: var(--transition-fast);
}

.clear-hero-btn:hover {
    background: #f7fafc;
    color: #718096;
}

.quick-benefits {
    margin-top: var(--space-lg);
}

.benefit-item {
    padding: var(--space-sm);
}

.benefit-item i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--primary-orange);
}

.benefit-item small {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.85rem;
}

.step-progress {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid #e2e8f0;
}

.mini-progress {
    display: flex;
    gap: var(--space-xs);
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-round);
    background: #e2e8f0;
    transition: var(--transition-normal);
}

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

.progress-dot.completed {
    background: #10b981;
}

/* Hero Suggestions Container */
.suggestions-container-hero {
    position: relative;
    margin-top: var(--space-sm);
}

.suggestions-container-hero .address-suggestions-enhanced {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 107, 53, 0.2);
    max-height: 300px;
    overflow-y: auto;
}

/* Make sure suggestions appear above other content */
.address-hero-section {
    position: relative;
    z-index: 100;
}

/* Feedback positioning for hero input */
.address-input-hero .address-input-feedback {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: var(--space-xs);
    z-index: 999;
}

/* Card principale del preventivatore */
.preventivatore-main-container .card {
    border: none !important;
    box-shadow: var(--shadow-xl) !important;
    border-radius: var(--radius-xl) !important;
    background: #ffffff !important;
}

.preventivatore-main-container .card-header {
    border: none;
    padding: var(--space-xl) !important;
    background: rgba(255,255,255,0.95) !important;
}

.preventivatore-main-container .card-body {
    background: transparent;
}

/* ====================
   ENHANCED MICRO-INTERACTIONS
   ==================== */
.interactive-element {
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.interactive-element::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: all var(--transition-fast);
}

.interactive-element:active::after {
    width: 300px;
    height: 300px;
}

/* Loading States */
.loading-skeleton {
    background: #e0e0e0;
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

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

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpSmooth 0.6s ease-out forwards;
}

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

.stagger-animation > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUpSmooth 0.5s ease-out forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }

/* Alert promozionale animato - Enhanced */
.alert-success {
    animation: pulse-shadow 3s ease-in-out infinite;
    border-radius: var(--radius-md) !important;
    border: none !important;
    background: var(--gradient-success) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@keyframes pulse-shadow {
    0%, 100% {
        box-shadow: var(--shadow-md);
        transform: scale(1);
    }
    50% {
        box-shadow: var(--shadow-lg);
        transform: scale(1.01);
    }
}

/* ====================
   BASIC MAP STYLES
   ==================== */
#roof-map {
    position: relative;
}

/* Preventivatore container positioning */
#solar-calculator-advanced {
    position: relative;
    min-height: auto;
    padding: 1rem;
}

@media (min-width: 768px) {
    #solar-calculator-advanced {
        min-height: 600px;
        padding: 2rem;
    }
}

/* Badge styles */
.badge.bg-white {
    font-weight: 500;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

#roof-map::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Panel overlay map - responsive heatmaps */
#panel-overlay-map {
    position: relative;
}

#panel-overlay-map::before {
    content: '🎯 Heatmaps solari attive';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(34, 139, 34, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Nascondi l'indicatore se non ci sono layer attivi */
#panel-overlay-map:not(.has-active-layers)::before {
    display: none;
}

.roof-mapper-container {
    min-height: auto;
}

@media (min-width: 768px) {
    .roof-mapper-container {
        min-height: 400px;
    }
}

.controls-section .card {
    height: fit-content;
    position: relative;
    z-index: 90;
    transition: all 0.3s ease-in-out;
}

@media (min-width: 992px) {
    .controls-section .card {
        position: -webkit-sticky;
        position: sticky;
        top: 20px;
    }
}

.position-info code {
    font-size: 0.75rem;
    font-weight: 600;
}

/* ====================
   PRICE TRACKER
   ==================== */
.price-tracker-wrapper {
    margin-bottom: 1rem;
    position: relative;
    z-index: 100;
    transition: all 0.3s ease-in-out;
}

@media (min-width: 992px) {
    .price-tracker-wrapper {
        position: -webkit-sticky;
        position: sticky;
        top: 20px;
    }
}

.price-tracker {
    animation: slideInDown 0.5s ease-out;
    width: 100%;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
    border-radius: 16px;
    transition: box-shadow 0.3s ease-in-out;
    background: #3b82f6 !important;
}

.price-tracker.bg--theme {
    background: #3b82f6 !important;
}

/* Enhanced shadow when sticky */
.price-tracker-wrapper.is-sticky .price-tracker {
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.35);
    transform: translateY(-2px);
}

.price-tracker .display-6 {
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.price-tracker .fa-piggy-bank {
    animation: pulse 2s infinite;
}

/* Spinner personalizzato */
.spinner-border {
    border-width: 0.3rem;
}

/* Configuration panel styles */
.configuration-main-panel {
    background: white;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    width: 100%;
}

@media (max-width: 768px) {
    .configuration-main-panel {
        border-radius: 8px;
        margin-bottom: 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }
}

.form-header {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6 !important;
}

.sticky-sidebar {
    position: relative;
}

@media (min-width: 992px) {
    .sticky-sidebar {
        position: -webkit-sticky;
        position: sticky;
        top: 20px;
        will-change: transform;
    }
}

.summary-card, .financing-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}

.summary-card h5, .financing-card h5 {
    color: #3b82f6;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Progress bar styling */
.progress {
    background-color: #e9ecef;
}

.progress-bar.bg--theme {
    background: #3b82f6;
    transition: width 0.6s ease;
}

/* ====================
   ENHANCED MOBILE OPTIMIZATION
   ==================== */

/* Touch-friendly interactive elements */
@media (hover: none) and (pointer: coarse) {
    .interactive-element,
    .btn,
    .card,
    .trust-badge {
        min-height: 44px; /* iOS accessibility guideline */
        min-width: 44px;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1.1rem;
    }
    
    /* Remove hover effects on touch devices */
    .trust-badge:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    .card-modern:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
}

/* Enhanced mobile gestures */
.swipe-container {
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.swipe-item {
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

/* Mobile-first responsive typography */
@media (max-width: 768px) {
    :root {
        --space-xs: 0.125rem;
        --space-sm: 0.375rem;
        --space-md: 0.75rem;
        --space-lg: 1.125rem;
        --space-xl: 1.5rem;
        --space-xxl: 2rem;
    }
    
    h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
    h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
    h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
    h4 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }
    h5 { font-size: clamp(1rem, 2vw, 1.25rem); }
    h6 { font-size: clamp(0.875rem, 1.5vw, 1.125rem); }
    
    /* Mobile optimizations for preventivatore */
    .preventivatore-main-container .card-header {
        padding: var(--space-lg) !important;
    }
    
    .preventivatore-main-container .card-header h3 {
        font-size: clamp(1.25rem, 3vw, 1.75rem);
        margin-bottom: var(--space-sm);
    }
    
    .trust-badge {
        padding: var(--space-md);
        margin-bottom: var(--space-sm);
    }
    
    .preventivatore-main-container {
        padding: var(--space-sm);
    }
    
    .card-modern {
        border-radius: var(--radius-md);
    }
    
    .card-modern .card-header,
    .card-modern .card-body {
        padding: var(--space-lg);
    }
}

/* Mobile optimizations for price tracker */
@media (max-width: 768px) {
    .price-tracker-wrapper {
        position: relative !important;
        top: auto !important;
        margin-bottom: 1rem;
    }
    
    .price-tracker {
        padding: 0.75rem !important;
        border-radius: 12px;
    }
    
    .price-tracker .display-6 {
        font-size: 1.5rem !important;
    }
    
    .price-tracker .h4 {
        font-size: 1.1rem !important;
    }
    
    .price-tracker small {
        font-size: 0.75rem !important;
    }
    
    .price-tracker .fa-piggy-bank {
        font-size: 1.75rem !important;
    }
}

@media (max-width: 576px) {
    .price-tracker .display-6 {
        font-size: 1.5rem !important;
    }
    
    .price-tracker .h4 {
        font-size: 1.1rem !important;
    }
    
    .price-tracker .fa-piggy-bank {
        font-size: 1.75rem !important;
    }
}

.bg-gradient-success {
    background: #10b981;
}

.btn-update-estimate {
    opacity: 0.8;
    transition: all 0.2s ease;
}

.btn-update-estimate:hover {
    opacity: 1;
    transform: rotate(180deg);
}

.price-progress .progress {
    border-radius: 2px;
}

/* ====================
   PRELIMINARY COST POPUP
   ==================== */
.preliminary-cost-popup .cost-range {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
}

.preliminary-cost-popup .row > div {
    margin-bottom: 10px;
}

.preliminary-cost-popup .border {
    border: 2px solid #dee2e6 !important;
    transition: all 0.2s ease;
}

.preliminary-cost-popup .border:hover {
    border-color: #007bff !important;
    transform: translateY(-2px);
}

/* ====================
   ENHANCED USER FLOW & NAVIGATION
   ==================== */

/* Step Progress Indicator */
.step-progress-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: var(--space-lg) 0;
    padding: var(--space-md) 0;
}

.step-progress-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-progress-item::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 60%;
    width: 80%;
    height: 2px;
    background: #e9ecef;
    z-index: 0;
}

.step-progress-item:last-child::after {
    display: none;
}

.step-progress-item.active::after {
    background: var(--gradient-primary);
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-round);
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin: 0 auto var(--space-sm);
    transition: all var(--transition-normal);
    position: relative;
    z-index: 1;
}

.step-progress-item.active .step-circle {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.step-progress-item.completed .step-circle {
    background: var(--gradient-success);
    color: white;
}

.step-progress-item.completed .step-circle::before {
    content: '✓';
    font-size: 0.9rem;
}

/* Smart Navigation Hints */
.navigation-hint {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    opacity: 0;
    transform: translateX(100%);
    transition: all var(--transition-normal);
    z-index: 1000;
}

.navigation-hint.show {
    opacity: 1;
    transform: translateX(0);
}

/* Auto-save Indicator */
.auto-save-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--gradient-success);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--transition-normal);
    z-index: 1001;
}

.auto-save-indicator.show {
    opacity: 1;
    transform: scale(1);
}

/* Enhanced Form Validation */
.form-field-enhanced {
    position: relative;
    margin-bottom: var(--space-lg);
}

.form-field-enhanced .form-control {
    border-radius: var(--radius-md);
    border: 2px solid #e9ecef;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: #ffffff;
}

.form-field-enhanced .form-control:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    background: white;
}

.form-field-enhanced .form-control.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.8-.8-.8-.8 1.3-1.3.8.8L6.33 2.9l.8.8-2.67 2.67z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-field-enhanced .form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 2.4 2.4M8.2 4.6l-2.4 2.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.validation-feedback {
    font-size: 0.875rem;
    margin-top: var(--space-xs);
    opacity: 0;
    transform: translateY(-5px);
    transition: all var(--transition-normal);
}

.validation-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

/* ====================
   ADDRESS AUTOCOMPLETE - ENHANCED
   ==================== */
.address-input-container .input-group-lg .form-control {
    font-size: 1.1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 2px solid #e9ecef;
    background: #ffffff;
    transition: all var(--transition-normal);
}

.address-input-container .input-group-lg .form-control:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
    background: white;
}

.suggestions-list {
    max-height: 320px;
    overflow-y: auto;
    border: 2px solid rgba(255, 107, 53, 0.2) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    background: #ffffff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.suggestion-item {
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
    margin: var(--space-xs);
}

.suggestion-item.active .suggestion-hover,
.suggestion-item:hover .suggestion-hover {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(247, 147, 30, 0.1) 100%) !important;
    border-radius: var(--radius-sm);
}

.suggestion-item.active {
    border-left: 4px solid var(--primary-orange);
    transform: translateX(2px);
}

.suggestion-hover {
    transition: all var(--transition-fast);
    padding: var(--space-md);
}

.suggestion-content mark {
    padding: 0.15em 0.3em;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(247, 147, 30, 0.2) 100%);
}

.no-suggestions {
    border: 2px dashed #dee2e6;
    border-radius: var(--radius-md);
    background: #f8f9fa;
    margin: var(--space-md);
    padding: var(--space-lg);
}

.address-confirmation {
    animation: slideInUpEnhanced var(--transition-normal) ease-out;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
    border: 2px solid rgba(40, 167, 69, 0.2);
}

@keyframes slideInUpEnhanced {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.compact-address-confirmation .text-truncate {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ====================
   ROOF MAPPER STYLES
   ==================== */
.roof-mapper-wrapper {
    animation: slideInUp 0.5s ease-out;
}

.map-action-header {
    animation: slideInDown 0.4s ease-out;
}

#roof-selection-controls {
    transition: all 0.3s ease;
}

.bg-success .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-body {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 0.5rem !important;
}

/* Fix for analyzed roof card */
#roof-selection-controls .bg-success {
    background: #10b981 !important;
}

.bg-success .bg-white.bg-opacity-20 {
    background: rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.bg-success .bg-white.bg-opacity-20 .fw-bold,
.bg-success .bg-white.bg-opacity-20 small {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.bg-success .btn-light {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    color: #28a745 !important;
    font-weight: 700 !important;
    transition: all 0.3s ease;
}

.bg-success .btn-light:hover {
    background: white !important;
    border-color: white !important;
    color: #1e7e34 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.bg-success .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.6) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    background: transparent !important;
}

.bg-success .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    color: white !important;
}

/* ====================
   ENHANCED INFORMATION ARCHITECTURE
   ==================== */

/* Content Hierarchy System */
.content-primary {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1a202c;
    margin-bottom: var(--space-md);
}

.content-secondary {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    color: #4a5568;
    margin-bottom: var(--space-sm);
}

.content-tertiary {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.6;
    color: #718096;
    margin-bottom: var(--space-xs);
}

/* Enhanced Visual Hierarchy */
.section-title {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    color: #1a202c;
    margin-bottom: var(--space-lg);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.subsection-title {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 600;
    line-height: 1.3;
    color: #2d3748;
    margin-bottom: var(--space-md);
}

/* Smart Content Grouping */
.content-group {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.content-group:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.content-group-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

/* Enhanced Information Cards */
.info-card-enhanced {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.info-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.info-card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 107, 53, 0.2);
}

.info-card-enhanced:hover::before {
    opacity: 1;
}

.info-card-enhanced .card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(247, 147, 30, 0.1) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-orange);
    font-size: 1.1rem;
    margin-bottom: var(--space-sm);
}

.info-card-enhanced .card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: var(--space-xs);
}

.info-card-enhanced .card-description {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.5;
}

/* Enhanced Tooltips */
.tooltip-enhanced {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted var(--primary-orange);
}

.tooltip-enhanced::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-normal);
    z-index: 1000;
    margin-bottom: 8px;
}

.tooltip-enhanced::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: all var(--transition-normal);
    margin-bottom: 2px;
}

.tooltip-enhanced:hover::after,
.tooltip-enhanced:hover::before {
    opacity: 1;
}

/* ====================
   CONSUMPTION SELECTION - ENHANCED
   ==================== */
.consumption-card {
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid transparent !important;
    border-radius: var(--radius-lg) !important;
    background: #ffffff !important;
    position: relative;
    overflow: hidden;
}

.consumption-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.consumption-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: rgba(255, 107, 53, 0.3) !important;
}

.consumption-card:hover::before {
    opacity: 0.7;
}

.consumption-card.selected {
    border-color: var(--primary-orange) !important;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 107, 53, 0.02) 100%) !important;
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.consumption-card.selected::before {
    opacity: 1;
}

.consumption-card.selected .card-body {
    background: transparent;
}

.consumption-card.selected i {
    color: var(--primary-orange) !important;
    transform: scale(1.1);
}

.consumption-card.selected h6 {
    color: var(--primary-orange) !important;
    font-weight: 700;
}

/* ====================
   BATTERY OPTIONS
   ==================== */
.battery-option {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #dee2e6 !important;
    position: relative;
    overflow: hidden;
}

.battery-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--theme-color) !important;
}

.battery-option.selected {
    border-color: var(--theme-color) !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e8 100%) !important;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.battery-option.selected::before {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 15px;
    background: var(--theme-color);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

.battery-option.selected i {
    color: var(--theme-color) !important;
}

.battery-option.selected h5 {
    color: var(--theme-color) !important;
    font-weight: 700;
}

.battery-option.selected .badge {
    background: var(--theme-color) !important;
    animation: pulse 2s infinite;
}

/* ====================
   INCENTIVE OPTIONS
   ==================== */
.incentive-option {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef !important;
}

.incentive-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.incentive-option.selected {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.incentive-option .benefits {
    min-height: 60px;
}

/* ====================
   GUTTER SELECTION
   ==================== */
.gutter-selection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    border-radius: 10px;
}

.gutter-selection-panel {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: bounceIn 0.5s ease-out;
}

.gutter-direction-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0.75rem;
    max-width: 200px;
    margin: 1.5rem auto;
}

.gutter-btn {
    aspect-ratio: 1;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 600;
}

.gutter-btn:hover {
    border-color: var(--theme-color);
    background: #fff5f2;
    transform: scale(1.05);
}

.gutter-btn.selected {
    border-color: var(--success-color);
    background: #e8f5e8;
    color: var(--success-color);
}

.gutter-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.gutter-confirmation {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px;
    border-radius: 10px;
    z-index: 2000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.5s ease;
}

.roof-outline-highlight {
    stroke: var(--theme-color) !important;
    stroke-width: 3px !important;
    stroke-dasharray: 5, 5;
    animation: dash 2s linear infinite;
}

/* ====================
   ENHANCED RESULTS LAYOUT
   ==================== */

/* Compact Header for Results */
.results-compact-header {
    background: var(--gradient-primary);
    color: white;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    margin-bottom: 0;
}

.results-compact-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.results-compact-header .header-main h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.results-compact-header .header-main p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.results-compact-header .header-stats {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.results-compact-header .stat-item {
    text-align: center;
    min-width: 80px;
}

.results-compact-header .stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
}

.results-compact-header .stat-label {
    font-size: 0.75rem;
    opacity: 0.8;
    display: block;
}

/* Collapsible Google Solar Data */
.google-solar-data-compact {
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    margin-bottom: var(--space-lg);
}

.google-data-toggle {
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-normal);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

.google-data-toggle:hover {
    background: rgba(255,255,255,0.8);
}

.google-data-toggle .toggle-icon {
    transition: transform var(--transition-normal);
}

.google-data-toggle.expanded .toggle-icon {
    transform: rotate(180deg);
}

.google-data-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal) ease-out;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.google-data-content.expanded {
    max-height: 500px;
}

.google-data-content .content-inner {
    padding: var(--space-lg);
}

/* Two Column Results Layout */
.results-two-column {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-xl);
    margin-top: var(--space-lg);
}

.results-main-content {
    min-height: 600px;
}

.results-sidebar {
    position: sticky;
    top: var(--space-lg);
    height: fit-content;
}

/* Mobile responsive for results */
@media (max-width: 992px) {
    .results-two-column {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .results-sidebar {
        position: relative;
        order: -1; /* Move sidebar to top on mobile */
    }
    
    .results-compact-header .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
    
    .results-compact-header .header-stats {
        align-self: stretch;
        justify-content: space-around;
    }
}

@media (max-width: 768px) {
    .results-compact-header {
        padding: var(--space-md);
    }
    
    .results-compact-header .header-stats {
        gap: var(--space-md);
    }
    
    .results-compact-header .stat-item {
        min-width: 60px;
    }
    
    .results-compact-header .stat-value {
        font-size: 1rem;
    }
    
    .results-compact-header .stat-label {
        font-size: 0.7rem;
    }
}

/* ====================
   ENHANCED MOBILE ADDRESS & MAP INTERFACE
   ==================== */

/* ====================
   ENHANCED ADDRESS INPUT INTERFACE
   ==================== */

.address-input-enhanced {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out forwards;
    transition: all var(--transition-normal);
}

.address-input-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.address-input-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.address-input-header {
    margin-bottom: var(--space-lg);
}

.address-icon-container {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
}

.address-input-header h5 {
    color: #1a202c;
    font-size: 1.25rem;
    font-weight: 700;
}

.address-input-header p {
    color: #6c757d;
    font-size: 0.95rem;
}

.security-badge {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
    color: #059669;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.address-input-field {
    margin-bottom: var(--space-md);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-lg);
    padding: var(--space-sm);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.input-wrapper:focus-within {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
    transform: translateY(-2px);
}

.input-wrapper.has-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.input-icon {
    color: var(--primary-orange);
    font-size: 1.1rem;
    margin-right: var(--space-md);
    transition: all var(--transition-normal);
}

.input-wrapper:focus-within .input-icon {
    transform: scale(1.1);
}

.form-control-modern {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-weight: 500;
    color: #1f2937;
    background: transparent;
    padding: var(--space-sm) 0;
}

.form-control-modern::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.clear-input-btn {
    background: #f3f4f6;
    border: none;
    border-radius: var(--radius-round);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all var(--transition-normal);
}

.clear-input-btn:hover {
    background: #e5e7eb;
    color: #374151;
    transform: scale(1.05);
}

.input-help {
    margin-top: var(--space-sm);
}

.quick-tips {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.tip-item {
    font-size: 0.85rem;
    color: #6b7280;
    display: flex;
    align-items: center;
}

.tip-item i {
    color: var(--primary-orange);
}

.suggestions-container {
    position: relative;
}

.address-suggestions-enhanced {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(0,0,0,0.1);
    margin-top: var(--space-md);
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.address-suggestions-enhanced:empty {
    display: none;
}

.suggestion-item-enhanced {
    padding: var(--space-lg);
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    min-height: 70px;
}

.suggestion-item-enhanced:last-child {
    border-bottom: none;
}

.suggestion-item-enhanced::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-primary);
    transition: all var(--transition-normal);
}

.suggestion-item-enhanced:hover::before {
    left: 0;
}

.suggestion-item-enhanced:hover {
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.05) 0%, rgba(247, 147, 30, 0.02) 100%);
    transform: translateX(4px);
}

.suggestion-item-enhanced:active {
    transform: translateX(2px) scale(0.98);
}

.suggestion-item-enhanced.active {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(247, 147, 30, 0.1) 100%);
    border-left: 4px solid var(--primary-orange);
}

.suggestion-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(247, 147, 30, 0.1) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-orange);
    margin-right: var(--space-md);
    flex-shrink: 0;
}

.suggestion-content {
    flex: 1;
}

.suggestion-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: var(--space-xs);
    font-size: 1rem;
}

.suggestion-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

.loading-state {
    padding: var(--space-xl);
    text-align: center;
    margin-top: var(--space-md);
}

.loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    color: #6b7280;
    font-weight: 500;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid var(--primary-orange);
    border-radius: var(--radius-round);
    animation: spin 1s linear infinite;
}

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

/* ====================
   ADDRESS INPUT FEEDBACK AND VALIDATION
   ==================== */

.address-input-feedback {
    margin-top: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    opacity: 0;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
}

.address-input-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

.address-input-feedback.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left: 3px solid #ef4444;
}

.address-input-feedback.success {
    background: rgba(34, 197, 94, 0.1);
    color: #059669;
    border-left: 3px solid #22c55e;
}

.address-input-feedback.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-left: 3px solid #f59e0b;
}

.address-input-feedback.info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border-left: 3px solid #3b82f6;
}

/* Enhanced Input States */
.input-wrapper.searching {
    border-color: rgba(255, 107, 53, 0.6);
    background: linear-gradient(90deg, white 0%, #fff8f0 100%);
}

.input-wrapper.searching .input-icon {
    animation: pulse 1.5s ease-in-out infinite;
}

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

.address-input-enhanced.searching {
    background: linear-gradient(135deg, #fff8f0 0%, #fef8f1 100%);
    border-color: rgba(255, 107, 53, 0.2);
}

.address-input-enhanced.has-results {
    background: linear-gradient(135deg, #f0fdf4 0%, #f7fef9 100%);
    border-color: rgba(34, 197, 94, 0.2);
}

.address-input-enhanced.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fefbfb 100%);
    border-color: rgba(239, 68, 68, 0.3);
    animation: shake 0.5s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Enhanced Suggestions */
.suggestions-header {
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.suggestions-footer {
    padding: var(--space-xs) var(--space-md);
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
}

.no-suggestions {
    padding: var(--space-lg);
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

.no-suggestions i {
    font-size: 2rem;
    color: #d1d5db;
    margin-bottom: var(--space-sm);
    display: block;
}

.suggestion-badge {
    background: rgba(34, 197, 94, 0.1);
    color: #059669;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: auto;
}

/* Enhanced suggestion animations */
#address-suggestions {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 300px;
    }
}

.suggestion-item-enhanced {
    position: relative;
    overflow: hidden;
}

.suggestion-icon {
    transition: all var(--transition-normal);
}

.suggestion-item-enhanced:hover .suggestion-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--secondary-gold) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.suggestion-title {
    transition: all var(--transition-normal);
}

.suggestion-item-enhanced:hover .suggestion-title {
    color: var(--primary-orange);
}

.suggestion-subtitle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Enhanced form control with placeholder animation */
.form-control-modern::placeholder {
    transition: all var(--transition-normal);
}

.form-control-modern:focus::placeholder {
    opacity: 0.7;
    transform: translateX(5px);
}

.clear-input-btn:hover {
    transform: scale(1.1);
}

/* Step Management - Show/Hide steps based on active state */
.step-content.step-1-active .compact-address-confirmation,
.step-content.step-1-active .roof-selection-compact,
.step-content.step-1-active #analysis-results-section {
    display: none !important;
}

.step-content.step-2-active .address-input-enhanced,
.step-content.step-2-active .roof-selection-compact,
.step-content.step-2-active #analysis-results-section {
    display: none !important;
}

.step-content.step-3-active .address-input-enhanced,
.step-content.step-3-active .compact-address-confirmation,
.step-content.step-3-active #analysis-results-section {
    display: none !important;
}

.step-content.step-4-active .address-input-enhanced,
.step-content.step-4-active .compact-address-confirmation,
.step-content.step-4-active .roof-selection-compact {
    display: none !important;
}

.step-content.step-4-active #analysis-results-section {
    display: block !important;
}

/* Enhanced Address Input Mobile */
@media (max-width: 768px) {
    .address-input-enhanced {
        margin: 0 calc(-1 * var(--space-md));
        border-radius: 0;
        padding: var(--space-lg);
    }
    
    .address-input-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: var(--space-md);
    }
    
    .input-field-enhanced {
        padding: 1rem 3rem 1rem 1rem;
        font-size: 16px; /* Prevent iOS zoom */
        border: 2px solid #e2e8f0;
        border-radius: var(--radius-lg);
        background: white;
        transition: all var(--transition-normal);
        width: 100%;
    }
    
    .input-field-enhanced:focus {
        border-color: var(--primary-orange);
        box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
        outline: none;
        background: rgba(255, 255, 255, 0.95);
    }
    
    .input-field-enhanced:hover:not(:focus) {
        border-color: rgba(255, 107, 53, 0.3);
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .address-suggestions-enhanced {
        max-height: 60vh;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    
    .suggestion-item-enhanced {
        padding: 1rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        touch-action: manipulation;
        min-height: 44px; /* iOS touch target */
    }
    
    .smart-tips-enhanced {
        padding: var(--space-md);
        gap: var(--space-sm);
    }
    
    .smart-tip {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.85rem;
    }
    
    .input-wrapper {
        position: relative;
    }
    
    .input-icon {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
        pointer-events: none;
        z-index: 1;
    }
    
    .clear-button {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: #94a3b8;
        font-size: 1.2rem;
        cursor: pointer;
        padding: 0.25rem;
        border-radius: 50%;
        transition: all var(--transition-fast);
    }
    
    .clear-button:hover {
        background: rgba(255, 107, 53, 0.1);
        color: var(--primary-orange);
    }
}

/* Analysis Progress Indicators */
.analysis-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    align-items: center;
}

.analysis-step {
    opacity: 0.4;
    transition: all var(--transition-normal);
}

.analysis-step.active {
    opacity: 1;
    transform: scale(1.05);
}

.analysis-step .step-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-sm);
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--secondary-gold) 100%);
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
}

.analysis-step h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: #1a202c;
}

.analysis-step .progress {
    margin: 0 auto;
    border-radius: 10px;
    background: rgba(0,0,0,0.05);
}

.analysis-step .progress-bar {
    border-radius: 10px;
    transition: width 0.3s ease;
}

@media (max-width: 768px) {
    .analysis-steps {
        gap: var(--space-md);
    }
    
    .analysis-step .step-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .analysis-step h6 {
        font-size: 0.85rem;
    }
    
    .analysis-step .progress {
        width: 150px !important;
        height: 4px !important;
    }
}

/* Side-by-Side Roof Selection Layout */
.roof-selection-layout {
    display: flex;
    gap: var(--space-xl);
    align-items: stretch;
    min-height: 500px;
}

.map-section {
    flex: 2;
    min-height: 500px;
}

.controls-section {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.controls-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* Istruzioni con layout migliorato */
.roof-instruction {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.instruction-icon i {
    font-size: 2rem;
    color: var(--primary-orange);
}

.instruction-text h6 {
    margin-bottom: var(--space-sm);
    color: #1a202c;
    font-weight: 700;
}

.instruction-text p {
    margin: 0;
    color: #6c757d;
    line-height: 1.5;
}

/* Info aggiuntive */
.selection-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.info-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.9rem;
}

.info-item i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.info-item span {
    color: #495057;
    font-weight: 500;
}

/* Pulsanti di azione */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.action-buttons .btn {
    padding: var(--space-md) var(--space-lg);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Mobile: Layout verticale */
@media (max-width: 768px) {
    .roof-selection-layout {
        flex-direction: column;
        gap: var(--space-lg);
        min-height: auto;
    }
    
    .map-section {
        order: 1;
        min-height: 300px;
    }
    
    .controls-section {
        order: 2;
        padding: var(--space-lg);
    }
    
    .controls-content {
        gap: var(--space-md);
    }
    
    .roof-instruction {
        padding: var(--space-md);
    }
    
    .instruction-icon i {
        font-size: 1.5rem;
    }
    
    .selection-info {
        padding: var(--space-md);
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* Analysis Calculation Progress */
.analysis-calculation-progress {
    padding: var(--space-xl);
    background: #f8f9fa;
    border-radius: var(--radius-lg);
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.calculation-header {
    text-align: center;
    margin-bottom: var(--space-xxl);
}

.calculation-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--secondary-gold) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    box-shadow: var(--shadow-lg);
}

.calculation-icon i {
    font-size: 2rem;
    color: white;
}

.calculation-title h4 {
    color: #1a202c;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.calculation-title p {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 0;
}

/* Calculation Steps */
.calculation-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-bottom: var(--space-xxl);
}

.calculation-step {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    opacity: 0.4;
    transition: all var(--transition-normal);
}

.calculation-step.active {
    opacity: 1;
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.calculation-step.completed {
    opacity: 0.8;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.step-indicator {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-number {
    width: 50px;
    height: 50px;
    background: #e9ecef;
    color: #6c757d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all var(--transition-normal);
}

.calculation-step.active .step-number {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--secondary-gold) 100%);
    color: white;
}

.calculation-step.completed .step-number {
    background: #28a745;
    color: white;
}

.step-content {
    flex: 1;
}

.step-content h6 {
    color: #1a202c;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.step-content p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--secondary-gold) 100%);
    width: 0%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Calculation Footer */
.calculation-footer {
    text-align: center;
}

.current-step-text {
    color: #1a202c;
    font-weight: 500;
    margin-bottom: var(--space-md);
}

.overall-progress {
    width: 200px;
    height: 6px;
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
    margin: 0 auto;
    overflow: hidden;
}

.overall-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--secondary-gold) 100%);
    width: 0%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Enhanced Address Input UX Improvements */
.address-input-enhanced {
    position: relative;
}

.input-feedback-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    min-height: 60px;
}

.input-feedback-container.focused {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-feedback-container.loading {
    border-color: #f59e0b;
}

.input-feedback-container.success {
    border-color: #16a34a;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.input-feedback-container.error {
    border-color: #ef4444;
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.address-input-field {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    background: transparent;
    color: #1e293b;
    padding: 0;
}

.address-input-field::placeholder {
    color: #94a3b8;
    font-style: italic;
}

.input-status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: 0.75rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.input-status-indicator.idle {
    background: #f1f5f9;
    color: #64748b;
}

.input-status-indicator.loading {
    background: #fef3c7;
    color: #f59e0b;
    animation: pulse 1.5s infinite;
}

.input-status-indicator.success {
    background: #dcfce7;
    color: #16a34a;
    animation: checkmark 0.6s ease;
}

.input-status-indicator.error {
    background: #fee2e2;
    color: #ef4444;
    animation: shake 0.5s ease;
}

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

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.input-help-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.input-help-text.idle {
    color: #64748b;
}

.input-help-text.loading {
    color: #f59e0b;
}

.input-help-text.success {
    color: #16a34a;
}

.input-help-text.error {
    color: #ef4444;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.typing-indicator.active {
    opacity: 1;
}

.typing-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #94a3b8;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-10px); opacity: 1; }
}

/* Trust Signals */
.address-trust-signals {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin: 0 0 1rem 0;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    flex-wrap: wrap;
}

.trust-signal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.trust-signal i {
    color: #16a34a;
    font-size: 1rem;
}

/* Enhanced Suggestions */
.address-suggestions-enhanced {
    max-height: 300px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
    z-index: 1000;
}

.suggestion-item-enhanced {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.suggestion-item-enhanced:last-child {
    border-bottom: none;
}

.suggestion-item-enhanced:hover {
    background: #f8fafc;
    padding-left: 1.25rem;
}

.suggestion-item-enhanced.keyboard-focus {
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
}

.suggestion-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 10px;
    color: #3b82f6;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.suggestion-content {
    flex: 1;
    min-width: 0;
}

.suggestion-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.suggestion-subtitle {
    color: #64748b;
    font-size: 0.85rem;
    opacity: 0.9;
}

.suggestion-type-badge {
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    flex-shrink: 0;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .input-feedback-container {
        min-height: 56px;
        padding: 0.625rem 0.875rem;
    }

    .address-input-field {
        font-size: 1rem;
    }

    .address-trust-signals {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

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

    .suggestion-item-enhanced {
        padding: 0.875rem;
        gap: 0.75rem;
    }

    .suggestion-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .suggestion-title {
        font-size: 0.95rem;
    }

    .suggestion-subtitle {
        font-size: 0.8rem;
    }

    .hero-header-compact {
        margin-bottom: 1.5rem;
    }

    .quick-benefits-compact {
        margin-top: 0.75rem;
        padding: 0.75rem;
    }

    .benefits-grid {
        gap: 0.75rem;
    }

    .benefit-item-compact {
        min-width: 100px;
    }

    .benefit-item-compact i {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .benefit-item-compact span {
        font-size: 0.8rem;
    }

    /* Error Recovery Styles */
    .error-recovery-container {
        padding: 1.5rem;
        text-align: center;
        background: #fefefe;
        border: 1px solid #fecaca;
        border-radius: 12px;
        margin: 0.5rem 0;
    }

    .error-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        margin-bottom: 1rem;
        color: #dc2626;
    }

    .error-header i {
        font-size: 1.5rem;
    }

    .error-header h6 {
        margin: 0;
        font-weight: 600;
    }

    .error-suggestions {
        margin-bottom: 1.5rem;
    }

    .error-tip {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.5rem 0;
        color: #64748b;
        font-size: 0.9rem;
    }

    .error-tip i {
        color: #f59e0b;
        font-size: 0.85rem;
    }

    .smart-fallbacks {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 1rem;
        margin: 1rem 0;
    }

    .fallback-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        font-weight: 600;
        color: #475569;
    }

    .fallback-header i {
        color: #8b5cf6;
    }

    .fallback-suggestion {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem;
        margin: 0.5rem 0;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
        color: #374151;
    }

    .fallback-suggestion:hover {
        background: #f3f4f6;
        border-color: #d1d5db;
        padding-left: 1rem;
    }

    .fallback-suggestion i {
        color: #6b7280;
        font-size: 0.9rem;
    }

    .error-actions {
        margin-top: 1.5rem;
    }

    .btn-retry {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        background: #dc2626;
        color: white;
        border: none;
        padding: 0.75rem 1.5rem;
        border-radius: 8px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .btn-retry:hover {
        background: #b91c1c;
        transform: translateY(-1px);
    }

    /* Quick Benefits Compact */
    .quick-benefits-compact {
        margin-top: 1rem;
        padding: 0.875rem;
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        border: 1px solid #e2e8f0;
        border-radius: 12px;
    }

    .benefits-grid {
        display: flex;
        justify-content: space-around;
        align-items: center;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .benefit-item-compact {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        text-align: center;
        flex: 1;
        min-width: 120px;
    }

    .benefit-item-compact i {
        color: #3b82f6;
        font-size: 1.25rem;
        padding: 0.5rem;
        background: rgba(59, 130, 246, 0.1);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .benefit-item-compact span {
        font-size: 0.85rem;
        font-weight: 500;
        color: #475569;
    }

    .analysis-calculation-progress {
        padding: var(--space-lg);
        min-height: 400px;
    }
    
    .calculation-icon {
        width: 60px;
        height: 60px;
    }
    
    .calculation-icon i {
        font-size: 1.5rem;
    }
    
    .calculation-title h4 {
        font-size: 1.25rem;
    }
    
    .calculation-step {
        gap: var(--space-md);
        padding: var(--space-md);
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-content h6 {
        font-size: 1rem;
    }
    
    .step-content p {
        font-size: 0.8rem;
    }
    
    .overall-progress {
        width: 150px;
    }
}
    
    .address-icon-container {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .address-input-header h5 {
        font-size: 1.1rem;
    }
    
    .input-wrapper {
        padding: var(--space-md);
    }
    
    .form-control-modern {
        font-size: 1rem;
        padding: var(--space-sm) 0;
    }
    
    .quick-tips {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .suggestion-item-enhanced {
        padding: var(--space-md);
        min-height: 60px;
    }
    
    .suggestion-icon {
        width: 36px;
        height: 36px;
        margin-right: var(--space-sm);
    }
    
    .suggestion-title {
        font-size: 0.95rem;
    }
    
    .suggestion-subtitle {
        font-size: 0.85rem;
    }
}
    
    .address-suggestions {
        max-height: 50vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .suggestion-item {
        padding: var(--space-md);
        min-height: 60px; /* Touch-friendly target */
    }
    
    .suggestion-item:active {
        background: rgba(255, 107, 53, 0.1) !important;
    }
    
    /* Address confirmation mobile */
    .address-confirmation {
        margin: 0 calc(-1 * var(--space-md));
        border-radius: 0;
    }
    
    /* Step headers mobile */
    .step-header-mobile {
        position: sticky;
        top: 0;
        background: #ffffff;
        z-index: 100;
        margin: 0 calc(-1 * var(--space-md));
        padding: var(--space-md);
        box-shadow: var(--shadow-sm);
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }
    
    .step-header-mobile h4 {
        font-size: 1.25rem;
        margin: 0;
        font-weight: 600;
    }
    
    .step-header-mobile p {
        margin: 0;
        font-size: 0.9rem;
        color: #6c757d;
    }
}

/* ====================
   COMPACT ROOF SELECTION INTERFACE
   ==================== */

/* Compact Map Container */
.roof-selection-compact {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: var(--space-lg);
}

.roof-selection-header {
    background: var(--gradient-primary);
    color: white;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.roof-selection-header h5 {
    margin: 0;
    font-weight: 600;
}

.roof-selection-header .badge {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.compact-map-container {
    position: relative;
    height: 350px;
    background: #f8f9fa;
}

.compact-map-controls {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.compact-map-controls .btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-round);
    background: white;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.compact-map-controls .btn:hover {
    background: #f8f9fa;
    transform: scale(1.05);
}

.roof-selection-footer {
    padding: var(--space-lg);
    background: rgba(248, 250, 252, 0.8);
    border-top: 1px solid rgba(0,0,0,0.06);
}

.roof-instruction {
    text-align: center;
    margin-bottom: var(--space-md);
    padding: var(--space-md);
    background: rgba(255, 107, 53, 0.05);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-orange);
}

.roof-instruction i {
    font-size: 2.5rem;
    color: var(--primary-orange);
    margin-bottom: var(--space-sm);
    display: block;
    animation: pulse-attention 2s ease-in-out infinite;
}

@keyframes pulse-attention {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.roof-instruction h6 {
    font-weight: 700;
    color: #1a202c;
    margin-bottom: var(--space-sm);
    font-size: 1.1rem;
}

.roof-instruction p {
    font-size: 1rem;
    color: #4a5568;
    margin: 0;
    font-weight: 500;
}

.roof-instruction .action-hint {
    background: var(--gradient-primary);
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-round);
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-top: var(--space-sm);
    animation: bounce-hint 3s ease-in-out infinite;
}

@keyframes bounce-hint {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
    60% { transform: translateY(-3px); }
}

/* Map cursor hint */
.compact-map-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: rgba(255, 107, 53, 0.2);
    border: 3px dashed var(--primary-orange);
    border-radius: var(--radius-round);
    transform: translate(-50%, -50%);
    z-index: 500;
    animation: map-hint-pulse 3s ease-in-out infinite;
    pointer-events: none;
}

.compact-map-container.roof-selected::before {
    display: none;
}

@keyframes map-hint-pulse {
    0%, 100% { 
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* Interactive cursor over map */
.compact-map-container {
    cursor: crosshair;
}

/* Tooltip "Clicca qui" rimosso - il crosshair è sufficiente */
/* .compact-map-container:hover::after {
    content: 'Clicca qui';
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 600;
    pointer-events: none;
    animation: fadeInUp 0.3s ease-out;
} */

/* Enhanced Mobile Map Interface */
@media (max-width: 768px) {
    .roof-selection-compact {
        margin: 0 calc(-1 * var(--space-md));
        border-radius: 0;
    }
    
    .roof-selection-header {
        padding: var(--space-md);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
    
    .compact-map-container {
        height: 50vh;  /* Aumentato da 45vh per desktop */
        min-height: 400px;  /* Aumentato da 300px */
        max-height: 600px;  /* Aggiungo un max per evitare che diventi troppo alta */
    }
    
    .compact-map-controls {
        top: var(--space-sm);
        right: var(--space-sm);
        flex-direction: row;
        background: rgba(255,255,255,0.95);
        border-radius: var(--radius-lg);
        padding: var(--space-xs);
        box-shadow: var(--shadow-md);
    }
    
    .compact-map-controls .btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    
    .roof-selection-footer {
        padding: var(--space-md);
    }
    
    .roof-instruction i {
        font-size: 2rem;
    }
    
    .roof-instruction h6 {
        font-size: 1.1rem;
        font-weight: 800;
    }
    
    .roof-instruction p {
        font-size: 0.95rem;
        font-weight: 600;
    }
    
    .roof-instruction .action-hint {
        font-size: 0.9rem;
        padding: var(--space-sm) var(--space-lg);
        font-weight: 700;
    }
    
    /* Mobile tap hint */
    .compact-map-container:hover::after {
        content: 'Tocca qui';
    }
    
    /* Mobile action buttons */
    .mobile-roof-actions {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: var(--space-md);
        box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
        z-index: 1001;
    }
    
    .mobile-roof-actions .btn {
        width: 100%;
        padding: 0.875rem;
        font-size: 1.1rem;
        border-radius: var(--radius-md);
        margin-bottom: var(--space-sm);
    }
    
    .mobile-roof-actions .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Legacy mobile support */
    .mobile-layout {
        margin: 0;
    }
    
    .mobile-fullwidth-map {
        height: 45vh !important;
        min-height: 300px !important;
        width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    
    .mobile-controls {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: white;
        box-shadow: var(--shadow-md);
        padding: var(--space-md);
        margin: 0 calc(-1 * var(--space-md));
    }
    
    .mobile-floating-controls {
        position: fixed;
        bottom: var(--space-lg);
        left: var(--space-md);
        right: var(--space-md);
        z-index: 1001;
        background: white;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-xl);
        padding: var(--space-md);
    }
    
    .mobile-floating-controls .btn {
        width: 100%;
        padding: 0.875rem;
        font-size: 1.1rem;
        border-radius: var(--radius-md);
    }
}
    
    /* Mobile preventivatore optimizations */
    .preventivatore-main-container .card-header {
        padding: var(--space-lg) !important;
    }
    
    .preventivatore-main-container .card-header h3 {
        font-size: clamp(1.25rem, 3vw, 1.75rem);
        margin-bottom: var(--space-sm);
    }
    
    .trust-badge {
        padding: var(--space-md);
        margin-bottom: var(--space-sm);
    }
    
    .preventivatore-main-container {
        padding: var(--space-sm);
    }
    
    .card-modern {
        border-radius: var(--radius-md);
    }
    
    .card-modern .card-header,
    .card-modern .card-body {
        padding: var(--space-lg);
    }
}

/* Enhanced Configuration Cards */
.configuration-card-enhanced {
    background: #ffffff;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.configuration-card-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 107, 53, 0.2);
}

.configuration-card-enhanced.selected {
    border-color: var(--primary-orange);
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 107, 53, 0.02) 100%);
    box-shadow: var(--shadow-md);
}

.configuration-card-enhanced .card-header {
    background: rgba(255,255,255,0.9);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: var(--space-lg);
}

.configuration-card-enhanced .card-body {
    padding: var(--space-lg);
}

/* Sticky Summary Enhancement */
.sidebar-summary-enhanced {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.06);
    overflow: hidden;
    position: sticky;
    top: var(--space-lg);
}

.sidebar-summary-enhanced .summary-header {
    background: var(--gradient-primary);
    color: white;
    padding: var(--space-lg);
    text-align: center;
}

.sidebar-summary-enhanced .summary-content {
    padding: var(--space-lg);
}

.sidebar-summary-enhanced .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.sidebar-summary-enhanced .summary-item:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-orange);
}

.sidebar-summary-enhanced .cta-button {
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    padding: var(--space-md) var(--space-lg);
    width: 100%;
    font-weight: 600;
    transition: all var(--transition-normal);
    margin-top: var(--space-lg);
}

.sidebar-summary-enhanced .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ====================
   SIDEBAR SAVINGS HERO CARD
   ==================== */
.savings-hero-sidebar {
    margin-bottom: 1.5rem;
}

.sidebar-savings-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-savings-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.savings-gradient-bg {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #FF8C42 100%);
    position: relative;
    overflow: hidden;
}

.savings-gradient-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

.savings-icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.savings-label {
    font-size: 0.9rem;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.savings-amount-hero {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin: 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.savings-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.savings-total-25 {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    margin-top: 1rem;
}

.savings-total-25 small {
    font-size: 0.75rem;
    opacity: 0.9;
}

.savings-total-25 .fw-bold {
    font-size: 1.25rem;
}

/* Savings Details Section */
.savings-details {
    background: #f8f9fa;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.mini-stat-card {
    background: white;
    border-radius: 10px;
    padding: 0.75rem;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.mini-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mini-stat-card.autoconsumo {
    border-left: 3px solid #28a745;
}

.mini-stat-card.immissione {
    border-left: 3px solid #ffc107;
}

.mini-stat-card .stat-icon {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    opacity: 0.7;
}

.mini-stat-card.autoconsumo .stat-icon {
    color: #28a745;
}

.mini-stat-card.immissione .stat-icon {
    color: #ffc107;
}

.mini-stat-card .stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.mini-stat-card .stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Efficiency Indicator */
.efficiency-indicator {
    margin-top: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.efficiency-indicator .progress {
    background-color: #e9ecef;
}

/* Investment Card Header */
.investment-card-header {
    background: #f8f9fa;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.investment-card-header:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.investment-card-header:not(.collapsed) {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ROI Indicator */
.roi-indicator {
    background: linear-gradient(135deg, #e8f5e9 0%, #e3f2fd 100%);
    border: 1px solid rgba(33, 150, 243, 0.2);
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: rotate(0deg) scale(1); }
    50% { opacity: 0.6; transform: rotate(180deg) scale(1.1); }
}

/* Cost Summary Card */
.cost-summary-card {
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card-header-custom {
    background: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.card-header-custom h6 {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
}

.card-body-custom {
    padding: 1rem;
}

.cost-breakdown {
    background: #fafbfc;
    border-radius: 8px;
    padding: 0.75rem;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.cost-label {
    color: #6c757d;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.cost-label i {
    font-size: 0.75rem;
    opacity: 0.7;
}

.cost-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.cost-separator {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0.5rem 0;
}

.cost-item.total {
    padding: 0.75rem 0 0.5rem 0;
}

.cost-item.total .cost-label,
.cost-item.total .cost-value {
    font-size: 1rem;
    color: #2c3e50;
}

.cost-item.incentive {
    background: rgba(40, 167, 69, 0.05);
    margin: 0.5rem -0.75rem;
    padding: 0.75rem;
    border-radius: 6px;
}

.cost-item.net-total {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05) 0%, rgba(247, 147, 30, 0.05) 100%);
    margin: 0.5rem -0.75rem -0.75rem;
    padding: 1rem 0.75rem;
    border-radius: 0 0 8px 8px;
}

/* ROI Comparison */
.roi-comparison {
    background: white;
    border-radius: 8px;
    padding: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.roi-metric {
    text-align: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.roi-icon {
    font-size: 1.25rem;
    color: #3b82f6;
    margin-bottom: 0.25rem;
}

.roi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.roi-label {
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.financing-note {
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

/* ====================
   QUOTE RESULTS - LEGACY COMPATIBILITY
   ==================== */
.quote-results {
    animation: slideInUp 0.6s ease-out;
}

.result-card {
    border-radius: 1rem !important;
    border: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
}

.result-card.bg--theme {
    background: var(--theme-color) !important;
    color: white;
}

.result-card.bg-success {
    background: var(--success-color) !important;
    color: white;
}

.result-card.bg-warning {
    background: #ffc107 !important;
    color: #212529;
}

.result-card.bg-info {
    background: #17a2b8 !important;
    color: white;
}

.result-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.result-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.result-content p {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    opacity: 0.9;
}

.result-content small {
    opacity: 0.8;
    font-size: 0.9rem;
}

.cost-breakdown {
    background: white !important;
    border: 2px solid #e9ecef;
    border-radius: 1rem !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cost-breakdown .divider {
    border-color: #dee2e6 !important;
    margin: 1rem 0;
}

.cost-breakdown .color--theme {
    color: var(--theme-color) !important;
}

.highlight {
    background: #f8f9fa !important;
    border: 2px solid var(--success-color);
    border-radius: 1rem !important;
}

.highlight .color--theme {
    color: var(--success-color) !important;
}

/* Environmental stats */
.environmental-stats .stat-item {
    background: white !important;
    border: 2px solid #e9ecef;
    border-radius: 0.75rem !important;
    transition: all 0.3s ease;
}

.environmental-stats .stat-item:hover {
    border-color: var(--success-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.1);
}

.environmental-stats .stat-item i {
    color: var(--success-color) !important;
}

/* Next steps */
.next-steps .step-item {
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.next-steps .step-item:hover {
    border-color: var(--theme-color);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.1);
}

.step-number {
    background: var(--theme-color) !important;
    color: white !important;
    min-width: 35px;
    height: 35px;
    font-weight: 700;
}

.step-item h6 {
    color: var(--theme-color) !important;
    font-weight: 700;
}

/* Call to action buttons */
.btns-group .btn {
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    border-radius: 0.75rem !important;
    transition: all 0.3s ease;
    border: none !important;
}

.btns-group .btn--theme {
    background: var(--theme-color) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btns-group .btn--theme:hover {
    background: #e55a2b !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.btns-group .btn--tra-white {
    background: white !important;
    color: var(--theme-color) !important;
    border: 2px solid var(--theme-color) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btns-group .btn--tra-white:hover {
    background: var(--theme-color) !important;
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

/* Card headers */
.card-header.bg--theme {
    background: var(--theme-color) !important;
    color: white !important;
    border-radius: 1rem 1rem 0 0 !important;
    border: none;
    font-weight: 600;
}

.card-header.bg-warning {
    background: #ffc107 !important;
    color: #212529 !important;
    border-radius: 1rem 1rem 0 0 !important;
    border: none;
    font-weight: 600;
}

/* ====================
   ENHANCED UTILITY CLASSES
   ==================== */

/* Background Utilities */
.bg-gradient-primary { background: var(--gradient-primary); }
.bg-gradient-secondary { background: var(--gradient-secondary); }
.bg-gradient-success { background: var(--gradient-success); }
.bg-gradient-warning { background: var(--gradient-warning); }

/* Spacing Utilities */
.p-xs { padding: var(--space-xs); }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }
.p-xxl { padding: var(--space-xxl); }

.m-xs { margin: var(--space-xs); }
.m-sm { margin: var(--space-sm); }
.m-md { margin: var(--space-md); }
.m-lg { margin: var(--space-lg); }
.m-xl { margin: var(--space-xl); }
.m-xxl { margin: var(--space-xxl); }

/* Border Radius Utilities */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-round); }

/* Shadow Utilities */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* Animation Utilities */
.animate-fade-in { animation: fadeInUpSmooth 0.6s ease-out forwards; }
.animate-slide-up { animation: slideInUpEnhanced var(--transition-normal) ease-out; }
.animate-pulse { animation: pulse-shadow 3s ease-in-out infinite; }

/* Interactive Utilities */
.hover-lift:hover { transform: translateY(-4px); transition: transform var(--transition-normal); }
.hover-scale:hover { transform: scale(1.05); transition: transform var(--transition-normal); }
.hover-glow:hover { box-shadow: var(--shadow-lg); transition: box-shadow var(--transition-normal); }

/* Glass Morphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

/* Enhanced Dividers */
.divider-text {
    position: relative;
    text-align: center;
    margin: var(--space-lg) 0;
}

.divider-text::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #dee2e6 20%, #dee2e6 80%, transparent 100%);
    z-index: 1;
}

.divider-text small {
    position: relative;
    z-index: 2;
    background: #ffffff;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-weight: 500;
    color: #6c757d;
}

.divider-gradient::before {
    background: var(--gradient-primary);
    height: 1px;
}

/* Status Indicators */
.status-success {
    background: var(--gradient-success);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
}

.status-warning {
    background: var(--gradient-warning);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
}

.status-info {
    background: var(--gradient-secondary);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Loading States */
.skeleton {
    background: var(--loading-skeleton);
    border-radius: var(--radius-sm);
    animation: loading-shimmer 1.5s infinite;
}

.skeleton-text {
    height: 1em;
    margin-bottom: var(--space-xs);
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-round);
}

.btn-group .btn-check:checked + .btn {
    background-color: var(--theme-color) !important;
    border-color: var(--theme-color) !important;
    color: white !important;
    font-weight: 600;
}

.btn-group .btn-outline-primary:hover {
    background-color: var(--theme-color) !important;
    border-color: var(--theme-color) !important;
}

.flash-success {
    animation: flashSuccess 0.6s ease-out;
}

.card,
.card-body {
    border-radius: 0.5rem !important;
}

/* Section spacing */
.fbox-wrapper.mb-80 {
    margin-bottom: 3rem !important;
}

.mt-80 {
    margin-top: 3rem !important;
}

/* ====================
   ANIMATIONS
   ==================== */
@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

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

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

@keyframes flashSuccess {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
        transform: scale(1);
    }
}

@keyframes flashGreen {
    0% { background-color: transparent; }
    50% { background-color: rgba(40, 167, 69, 0.1); }
    100% { background-color: transparent; }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes dash {
    to {
        stroke-dashoffset: -10;
    }
}

/* Result cards staggered animation */
.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.2s; }
.result-card:nth-child(3) { animation-delay: 0.3s; }
.result-card:nth-child(4) { animation-delay: 0.4s; }

/* ====================
   TOGGLE SWITCHES
   ==================== */
.option-toggle-container {
    margin-bottom: 1.5rem;
}

.option-toggle-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.option-toggle-card:hover {
    border-color: var(--theme-color);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.15);
    transform: translateY(-2px);
}

.option-toggle-card[data-option-type="battery"]:hover {
    border-color: #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.15);
}

.option-toggle-card[data-option-type="incentive"]:hover {
    border-color: #ffc107;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.15);
}

.option-toggle-card[data-option-type="charger"]:hover {
    border-color: #17a2b8;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.15);
}

.option-toggle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.option-toggle-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f3f5;
    animation: slideDown 0.3s ease-out;
}

/* Large toggle switches */
.form-switch-lg {
    min-height: 1.5rem;
}

.form-switch-lg .form-check-input {
    width: 3.5rem;
    height: 1.75rem;
    background-color: #dee2e6;
    border: none;
    transition: all 0.3s ease;
}

.form-switch-lg .form-check-input:checked {
    background-color: var(--theme-color);
}

.option-toggle-card[data-option-type="battery"] .form-check-input:checked {
    background-color: #28a745;
}

.option-toggle-card[data-option-type="incentive"] .form-check-input:checked {
    background-color: #ffc107;
}

.option-toggle-card[data-option-type="charger"] .form-check-input:checked {
    background-color: #17a2b8;
}

.form-switch-lg .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 107, 53, 0.25);
}

.option-toggle-card .fs-3 {
    font-size: 2rem !important;
}

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

/* Mobile Sticky Savings Bar */
.sticky-savings-bar {
    position: sticky;
    top: 10px;
    z-index: 90;
    margin-bottom: 1rem;
}

.sticky-savings-bar .bg--theme {
    background: #D84315 !important;
    box-shadow: 0 4px 15px rgba(216, 67, 21, 0.3);
}

/* Mobile optimizations for toggles */
@media (max-width: 768px) {
    .option-toggle-container {
        margin-bottom: 0.5rem;
    }
    
    .option-toggle-card {
        padding: 0.625rem;
        margin-bottom: 0.5rem;
        border-radius: 10px;
    }
    
    .option-toggle-card .fs-4 {
        font-size: 1.25rem !important;
    }
    
    .option-toggle-card strong {
        font-size: 0.95rem;
    }
    
    .option-toggle-card small {
        font-size: 0.75rem;
    }
    
    .option-toggle-details {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }
    
    .option-toggle-details small {
        font-size: 0.7rem;
    }
    
    .form-switch-lg .form-check-input {
        width: 2.75rem;
        height: 1.5rem;
    }
    
    /* Stack verticale su mobile per i toggle */
    .row > .col-lg-4,
    .row > .col-md-6,
    .row > .col-sm-6 {
        margin-bottom: 0.75rem !important;
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    /* Stack verticalmente su mobile */
    .form-section .row > .col-md-6 {
        margin-bottom: 1rem;
    }
    
    /* Options configuration mobile */
    .options-configuration {
        margin-bottom: 1rem !important;
    }
    
    .options-configuration h5 {
        font-size: 1rem;
        margin-bottom: 0.75rem !important;
    }
    
    /* Option sections sempre full-width su mobile */
    .option-section {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    /* Sticky savings bar animation */
    .sticky-savings-bar .fa-piggy-bank {
        animation: pulse 2s infinite;
    }
    
    /* Sticky summary bar mobile enhancements */
    .sticky-summary-bar .summary-item {
        margin-bottom: 0.5rem;
    }
    
    .sticky-summary-bar #sticky-monthly-savings {
        order: 1 !important;
    }
    
    .sticky-summary-bar #sticky-monthly-savings .fa-piggy-bank {
        animation: pulse 2s infinite;
        color: rgba(255, 255, 255, 0.9);
    }
    
    .sticky-summary-bar .fs-4 {
        font-size: 1.5rem !important;
    }
    
    /* Ottimizzazione card finanziamento mobile */
    .financing-configuration .card-body {
        padding: 0.75rem !important;
    }
    
    .duration-controls .mb-3 {
        margin-bottom: 0.5rem !important;
    }
    
    .duration-controls .mb-2 {
        margin-bottom: 0.25rem !important;
    }
    
    .payment-preview-large {
        padding: 0.75rem !important;
    }
    
    .payment-amount {
        font-size: 2rem !important;
    }
    
    .duration-display .fs-5 {
        font-size: 1.25rem !important;
    }
    
    /* Slider più compatto */
    .form-range {
        margin-bottom: 0.5rem !important;
    }
    
    /* Ottimizzazione specifica rata mensile e dettagli */
    .payment-preview-large .row {
        align-items: center !important;
    }
    
    .payment-preview-large .col-12:first-child {
        text-align: center !important;
        margin-bottom: 1rem !important;
    }
    
    .payment-preview-large .col-12:last-child {
        margin-top: 0 !important;
    }
    
    .payment-details .row {
        justify-content: center !important;
    }
    
    .payment-details .col-4 {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 70px !important;
        margin: 0 0.5rem !important;
    }
    
    .payment-details small {
        font-size: 0.8rem !important;
        display: block !important;
        margin-bottom: 0.25rem !important;
    }
    
    .payment-details .fw-bold {
        font-size: 1rem !important;
        white-space: nowrap !important;
    }
}

/* Extra small devices (phones, 576px and down) */
@media (max-width: 576px) {
    /* Card finanziamento ancora più compatta */
    .financing-configuration .card-body {
        padding: 0.5rem !important;
    }
    
    .payment-preview-large {
        padding: 0.5rem !important;
    }
    
    /* Rata mensile più piccola su mobile */
    .payment-amount {
        font-size: 1.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Titolo durata ancora più corto */
    .duration-title-short {
        font-size: 0.9rem !important;
    }
    
    /* Dettagli in una riga orizzontale più compatta */
    .payment-details .col-4 {
        min-width: 60px !important;
        margin: 0 0.25rem !important;
    }
    
    .payment-details small {
        font-size: 0.75rem !important;
    }
    
    .payment-details .fw-bold {
        font-size: 0.95rem !important;
    }
    
    /* Slider labels più piccoli */
    .duration-controls .small {
        font-size: 0.65rem !important;
    }
    
    /* Display durata più compatto */
    .duration-display .fs-5 {
        font-size: 1.1rem !important;
    }
    
    /* Ottimizzazione Analisi Energetica mobile */
    .advanced-metrics {
        margin-top: 0.75rem !important;
        padding: 0.75rem !important;
    }
    
    .advanced-metrics .mb-2 {
        margin-bottom: 0.5rem !important;
    }
    
    .advanced-metrics .row {
        margin-bottom: 0.5rem !important;
    }
    
    /* Metriche compatte */
    .metric-label {
        font-size: 0.7rem !important;
        color: #6c757d !important;
        margin-bottom: 0.25rem !important;
        display: block !important;
    }
    
    .metric-value {
        font-weight: bold !important;
        font-size: 0.9rem !important;
        margin-bottom: 0.25rem !important;
        line-height: 1.1 !important;
    }
    
    .metric-unit {
        font-size: 0.65rem !important;
        color: #6c757d !important;
        display: block !important;
    }
    
    .metric-card {
        padding: 0.5rem !important;
    }
    
    /* Campo consumo integrato */
    .consumption-input-section .input-group-sm .form-control {
        font-size: 0.85rem !important;
        padding: 0.375rem 0.5rem !important;
    }
    
    .consumption-input-section .input-group-text {
        font-size: 0.75rem !important;
        padding: 0.375rem 0.5rem !important;
    }
    
    .consumption-input-section .form-label {
        font-size: 0.8rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Controlli livelli solari mobile */
    .solar-controls-container {
        margin: 0.5rem !important;
    }
    
    .solar-controls-panel {
        background: rgba(255, 255, 255, 0.95) !important;
        padding: 0.5rem !important;
        border-radius: 6px !important;
        max-width: 180px !important;
    }
    
    .solar-controls-header {
        font-size: 0.8rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .solar-layer-option {
        margin-bottom: 0.25rem !important;
    }
    
    .solar-layer-option .form-check-label {
        font-size: 0.75rem !important;
    }
}

/* ====================
   CONTROLLI LIVELLI SOLARI
   ==================== */
.solar-controls-container {
    margin: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.solar-controls-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 12px;
    min-width: 200px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.solar-controls-header {
    color: #333;
    font-size: 14px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

.solar-controls-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.solar-layer-option {
    margin: 0;
}

.solar-layer-option .form-check {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 4px 0;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
    padding: 6px 4px;
}

.solar-layer-option .form-check:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.solar-layer-option .form-check-input {
    margin: 0 8px 0 0;
}

.solar-layer-option .form-check-label {
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.solar-layer-option .form-check-label i {
    width: 16px;
    text-align: center;
}

/* ====================
   MOBILE FULL-WIDTH FIXES  
   ==================== */

/* Ensure block--shadow and step-content are full-width on mobile */
@media (max-width: 768px) {
    .block--shadow.r-16.p-5 {
        margin: 0 !important;
        padding: 0.75rem !important;
        border-radius: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .step-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0.5rem !important;
    }
    
    /* Ensure container doesn't add extra padding on mobile */
    .content-section {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    /* Also fix any JS-generated form containers */
    .step-content .row,
    .step-content .container-fluid {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Fix for sopralluogo completato section */
    .solar-configurator-full {
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .configurator-body {
        padding: 0.75rem !important;
        margin: 0 !important;
    }
    
    .full-width-configuration {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .configuration-grid {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    .configuration-grid .row {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .configuration-grid .col-12,
    .configuration-grid .col-lg-4,
    .configuration-grid .col-lg-8 {
        padding: 0.25rem !important;
        margin: 0 !important;
    }
    
    /* Panel map container mobile fixes */
    .panel-map-container {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    /* Final CTA section */
    .final-cta {
        margin: 0 !important;
        width: 100% !important;
    }
    
    /* Fix width progression from preventivatore-card to step-content */
    .preventivatore-container .container-fluid {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .preventivatore-card {
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .preventivatore-card .p-3.p-md-4 {
        padding: 0.5rem !important;
    }
    
    #solar-calculator-full,
    #solar-calculator-advanced {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Hide vista satellitare when showing results (step 8) OR when panel map is visible */
body.results-visible .trust-indicators .trust-item:nth-child(3),
body.panel-map-visible .trust-indicators .trust-item:nth-child(3) {
    display: none !important;
}

/* Alternative approach: hide by targeting the satellite icon */
body.results-visible .trust-indicators .fa-satellite,
body.panel-map-visible .trust-indicators .fa-satellite {
    display: none !important;
}

body.results-visible .trust-indicators .trust-item:nth-child(3) small,
body.panel-map-visible .trust-indicators .trust-item:nth-child(3) small {
    display: none !important;
}

/* ====================
   PANEL MAP OVERLAY FIXES
   ==================== */

/* ====================
   PANEL COUNT OVERLAY
   ==================== */

/* Panel count positioning (bottom-right of map) */
.map-overlay-info {
    z-index: 999 !important; /* Below roof data panel */
}

.map-overlay-info .bg-white {
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.map-overlay-info:hover .bg-white {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.map-overlay-info .h4 {
    font-size: 1.5rem !important;
    margin-bottom: 0.25rem !important;
}

.map-overlay-info small {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

/* Mobile responsive for panel count */
@media (max-width: 768px) {
    .map-overlay-info {
        bottom: 15px !important;
        left: 15px !important;
    }
    
    .map-overlay-info .bg-white {
        padding: 0.75rem !important;
    }
    
    .map-overlay-info .h4 {
        font-size: 1.25rem !important;
    }
    
    .map-overlay-info small {
        font-size: 0.7rem !important;
    }
}

@media (max-width: 576px) {
    .map-overlay-info .bg-white {
        padding: 0.5rem !important;
    }
    
    .map-overlay-info .h4 {
        font-size: 1.1rem !important;
    }
    
    .map-overlay-info small {
        font-size: 0.65rem !important;
    }
}

/* ====================
   EXPANDABLE ROOF DATA PANEL
   ==================== */

/* Expandable Dati Tetto panel */
.expandable-roof-data {
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    z-index: 1000 !important; /* Above panel count */
    position: relative;
}

.expandable-roof-data.expanded {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 107, 53, 0.3) !important;
}

.solar-controls-header.cursor-pointer {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px !important;
}

.solar-controls-header.cursor-pointer:hover {
    background-color: rgba(255, 107, 53, 0.05) !important;
}

.expand-icon {
    font-size: 0.8rem !important;
    transition: transform 0.3s ease;
    color: #666 !important;
}

.expandable-roof-data.expanded .expand-icon {
    transform: rotate(180deg);
    color: #3b82f6 !important;
}

/* Content area */
.solar-controls-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Mobile responsive for roof data panel */
@media (max-width: 768px) {
    .solar-controls-header.cursor-pointer {
        padding: 6px 10px !important;
        font-size: 0.9rem !important;
    }
    
    .solar-controls-header .fw-bold {
        font-size: 0.85rem !important;
    }
    
    .expand-icon {
        font-size: 0.75rem !important;
    }
}

@media (max-width: 576px) {
    .solar-controls-header.cursor-pointer {
        padding: 5px 8px !important;
    }
    
    .solar-controls-header .fw-bold {
        font-size: 0.8rem !important;
    }
    
    .expand-icon {
        font-size: 0.7rem !important;
    }
}

/* ====================
   RESPONSIVE DESIGN
   ==================== */
@media (max-width: 768px) {
    .roof-mapper-container {
        display: flex;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .map-section {
        order: 2;
        width: 100% !important;
    }

    .controls-section {
        order: 1;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 0.5rem;
    }

    #roof-map {
        height: 300px !important;
        width: 100% !important;
    }

    .compact-address-confirmation {
        margin-bottom: 0.5rem !important;
    }

    .map-action-header {
        padding: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .map-action-header h5 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .map-action-header p {
        font-size: 0.8rem !important;
        margin-bottom: 0 !important;
    }

    .price-tracker-details .d-flex {
        flex-direction: column;
        gap: 1rem !important;
    }

    .price-tracker-wrapper {
        position: relative;
        margin-bottom: 1rem;
        z-index: 100;
    }
    
    .price-tracker {
        width: 100%;
    }

    .suggestions-list {
        max-height: 250px;
    }

    .suggestion-content {
        font-size: 0.9rem;
    }

    .consumption-card,
    .battery-option {
        margin-bottom: 1rem;
    }

    .battery-option.selected::before {
        top: 8px;
        right: 12px;
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }

    .bg-success .btn-light {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .bg-success .bg-white.bg-opacity-20 {
        padding: 0.75rem !important;
    }

    .bg-success .bg-white.bg-opacity-20 .fw-bold {
        font-size: 1rem !important;
    }

    .gutter-selection-panel {
        padding: 1.5rem;
        max-width: 320px;
        margin: 1rem;
    }

    .gutter-direction-buttons {
        max-width: 180px;
        gap: 0.5rem;
    }

    .gutter-btn {
        font-size: 0.75rem;
    }

    .gutter-btn i {
        font-size: 1.25rem;
    }

    .result-card {
        margin-bottom: 1rem;
        padding: 1.5rem !important;
    }

    .result-content h3 {
        font-size: 1.5rem;
    }

    .result-content p {
        font-size: 1rem;
    }

    .cost-breakdown {
        padding: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    .btns-group .btn {
        padding: 0.875rem 1.5rem !important;
        font-size: 1rem !important;
        margin-bottom: 0.75rem;
        width: 100%;
    }

    .environmental-stats .stat-item {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }

    .next-steps .step-item {
        padding: 0.75rem !important;
    }

    .step-number {
        min-width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    #roof-map {
        height: 250px !important;
        width: 100% !important;
    }

    .controls-section .card-body {
        padding: 0.75rem !important;
        min-height: auto !important;
    }

    .price-tracker-wrapper {
        position: relative !important;
        top: auto !important;
        margin-bottom: 0.75rem;
        z-index: 100;
    }

    .price-tracker .row {
        text-align: center;
    }

    .price-tracker-details .d-flex {
        flex-direction: row !important;
        justify-content: center !important;
        gap: 1rem !important;
    }

    .result-card {
        padding: 1rem !important;
    }

    .result-icon {
        font-size: 2rem;
    }

    .result-content h3 {
        font-size: 1.25rem;
    }

    .cost-breakdown {
        font-size: 0.9rem;
    }

    .highlight {
        padding: 1rem !important;
    }
}

/* ====================
   FINANCING STEP STYLES
   ==================== */

.financing-options-selector {
    max-width: 800px;
    margin: 0 auto;
}

.financing-option-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fff;
}

.financing-option-card:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.financing-option-card.active {
    border-color: #007bff;
    background: #f8f9ff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.financing-option {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    position: relative;
}

.option-icon {
    font-size: 2.5rem;
    color: #007bff;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.option-content {
    flex-grow: 1;
}

.option-content h5 {
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.option-content p {
    margin-bottom: 0.25rem;
    color: #6c757d;
}

.option-check {
    font-size: 1.5rem;
    color: #28a745;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.financing-option-card.active .option-check {
    opacity: 1;
}

.rate-selector {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 123, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 123, 255, 0.1);
}

.rate-selector .form-label {
    color: #007bff;
    margin-bottom: 0.5rem;
}

.rate-selector select {
    border-color: #007bff;
}

.rate-selector select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#estimated-monthly {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .financing-option {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .option-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .option-check {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    .rate-selector {
        margin-top: 1rem;
    }
}

/* ====================
   FINANCING SECTION
   ==================== */

.financing-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    border: 2px solid #e3f2fd;
    margin-bottom: 2rem;
}

.financing-section .section-header h5 {
    color: #495057;
    font-weight: 700;
}

.financing-section .section-header hr {
    border-color: #dee2e6;
    opacity: 0.8;
}

.payment-method-selection .option-card {
    transition: all 0.3s ease;
}

.payment-method-selection .option-card:hover {
    transform: translateY(-3px);
}

.payment-method-selection .option-card.selected .card {
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.2);
}

/* Enhanced option card styles for better visibility */
.option-section .option-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.option-section .option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
    pointer-events: none;
}

.option-section .option-card:hover::before {
    left: 100%;
}

.option-section .option-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.option-section .option-card:hover .card {
    border-width: 3px;
}

.option-section .option-card.selected {
    transform: translateY(-4px);
    animation: pulseSelection 2s infinite;
}

.option-section .option-card.selected .card {
    border-width: 3px;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.25);
}

/* Color-coded selection states */
.option-section .option-card[data-option="battery"].selected .card {
    border-color: #28a745 !important;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(40, 167, 69, 0.02) 100%);
}

.option-section .option-card[data-option="incentive"].selected .card {
    border-color: #ffc107 !important;
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05) 0%, rgba(255, 193, 7, 0.02) 100%);
}

.option-section .option-card[data-option="charger"].selected .card {
    border-color: #17a2b8 !important;
    box-shadow: 0 8px 25px rgba(23, 162, 184, 0.3);
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.05) 0%, rgba(23, 162, 184, 0.02) 100%);
}

.option-section .option-card[data-option="financing"].selected .card {
    border-color: #007bff !important;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05) 0%, rgba(0, 123, 255, 0.02) 100%);
}

/* Enhanced icons for better visibility */
.option-section .option-card .fas {
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.option-section .option-card:hover .fas {
    transform: scale(1.2);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.option-section .option-card.selected .fas {
    transform: scale(1.1);
    animation: iconBounce 0.6s ease;
}

/* Add selection indicator */
.option-section .option-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: checkmarkAppear 0.4s ease;
    z-index: 10;
}

/* Color-coded checkmarks */
.option-section .option-card[data-option="battery"].selected::after {
    background: #28a745;
}

.option-section .option-card[data-option="incentive"].selected::after {
    background: #ffc107;
    color: #000;
}

.option-section .option-card[data-option="charger"].selected::after {
    background: #17a2b8;
}

.option-section .option-card[data-option="financing"].selected::after {
    background: #007bff;
}

/* Enhanced text visibility */
.option-section .option-card .fw-bold {
    font-size: 1.1em;
    letter-spacing: 0.02em;
}

.option-section .option-card .badge {
    font-size: 0.85em;
    padding: 0.4em 0.8em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes pulseSelection {
    0%, 100% { transform: translateY(-4px) scale(1); }
    50% { transform: translateY(-4px) scale(1.01); }
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1.1); }
    50% { transform: scale(1.3); }
}

@keyframes checkmarkAppear {
    0% { 
        opacity: 0; 
        transform: scale(0) rotate(-180deg); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.2) rotate(-90deg); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) rotate(0deg); 
    }
}

/* Section headers enhancement */
.option-section h6 {
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.option-section h6::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 2px;
}

.financing-configuration {
    animation: slideInUp 0.4s ease-out;
}

.financing-configuration .card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: 1px solid rgba(0, 123, 255, 0.1) !important;
}

.duration-display {
    min-width: 100px;
}

.slider-container {
    padding: 0 0.5rem;
}

.payment-preview {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%) !important;
    border: 2px solid rgba(0, 123, 255, 0.15) !important;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.1) !important;
    transition: all 0.3s ease;
}

.payment-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15) !important;
}

.payment-amount {
    text-shadow: 0 1px 2px rgba(0, 123, 255, 0.1);
}

.payment-preview-large {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%) !important;
    border: 2px solid #007bff !important;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15) !important;
    transition: all 0.3s ease;
}

.payment-preview-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 123, 255, 0.2) !important;
}

.inline-summary {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.full-width-configuration {
    max-width: none;
}

.configuration-grid .row {
    align-items: stretch;
}

.slider-container input[type="range"] {
    height: 12px !important;
    border-radius: 6px;
    background: linear-gradient(to right, #007bff 0%, #007bff 50%, #dee2e6 50%, #dee2e6 100%);
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    height: 28px;
    width: 28px;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.payment-details .col-4 {
    padding: 0.5rem;
}

.detailed-summary .card-header {
    cursor: pointer;
    transition: all 0.2s ease;
}

.detailed-summary .card-header:hover {
    background: rgba(0, 123, 255, 0.05) !important;
}

.payment-amount.updating {
    opacity: 0.7;
    transform: scale(0.98);
    transition: all 0.3s ease;
}

/* ====================
   FINANCING RATE SELECTION
   ==================== */

#rate-selection-section {
    display: block; /* Visible by default since financing is selected */
    animation: slideInUp 0.3s ease-out;
}

#rate-selection-section.show {
    display: block;
}

#financing-months-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 10px;
    background: linear-gradient(to right, #007bff 0%, #007bff 100%);
    outline: none;
    transition: all 0.3s ease;
}

#financing-months-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
    transition: all 0.2s ease;
}

#financing-months-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

#financing-months-slider::-moz-range-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
    transition: all 0.2s ease;
}

#rate-months-display {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.rate-preview {
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#monthly-payment-display {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

#monthly-payment-display:not(:empty) {
    animation: pulse 0.6s ease-out;
}

.rate-selection-section .card {
    border: 2px solid rgba(0, 123, 255, 0.2) !important;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05), rgba(0, 123, 255, 0.1)) !important;
}

/* Summary financing display */
.summary-item.financing-summary {
    background: rgba(0, 123, 255, 0.1);
    border-left: 4px solid #007bff;
    animation: slideInRight 0.5s ease-out;
}

/* Responsive adjustments for financing */
@media (max-width: 768px) {
    .financing-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .financing-configuration .row {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .payment-preview {
        margin-top: 1rem;
    }
    
    .payment-amount {
        font-size: 1.8rem !important;
    }
    
    .duration-display {
        min-width: auto;
        margin-bottom: 1rem;
    }
    
    .slider-container {
        padding: 0;
    }
}

@media (max-width: 576px) {
    .financing-section {
        padding: 0.75rem;
    }
    
    .payment-method-selection .col-md-6 {
        margin-bottom: 0.75rem;
    }
    
    .payment-preview {
        padding: 1rem !important;
    }
    
    .payment-amount {
        font-size: 1.5rem !important;
    }
}

/* ====================
   STICKY SUMMARY BAR
   ==================== */

.sticky-summary-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #D84315;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 -4px 20px rgba(255, 107, 53, 0.3);
    z-index: 1000;
    transform: translateY(100%);
    transition: all 0.4s ease;
    border-radius: 15px 15px 0 0;
    /* Sfondo completamente opaco */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Garantisce che la barra sia completamente opaca */
.sticky-summary-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #3b82f6;
    z-index: -1;
    border-radius: 15px 15px 0 0;
}

.sticky-summary-bar.visible {
    transform: translateY(0);
}

/* Aggiunge spazio in fondo per la sticky bar */
body.has-sticky-bar {
    padding-bottom: 120px;
}

@media (max-width: 767px) {
    body.has-sticky-bar {
        padding-bottom: 140px;
    }
}

.sticky-summary-bar .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.sticky-summary-bar .summary-item {
    margin-bottom: 0;
}

.sticky-summary-bar .summary-item small {
    font-size: 0.75rem;
    line-height: 1.2;
}

.sticky-summary-bar .btn-light {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    color: #D84315 !important;
    font-weight: 700 !important;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.sticky-summary-bar .btn-light:hover {
    background: white !important;
    border-color: white !important;
    color: #E55A2B !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.sticky-summary-bar .btn-light:active {
    transform: translateY(0);
}

/* Desktop specifico */
@media (min-width: 768px) {
    .sticky-summary-bar {
        padding: 1.25rem 0;
    }
    
    .sticky-summary-bar .summary-item {
        margin-right: 2rem;
    }
    
    .sticky-summary-bar .btn-light {
        padding: 0.75rem 2rem;
        font-size: 1.1rem;
    }
}

/* Mobile responsive */
@media (max-width: 767px) {
    .sticky-summary-bar {
        padding: 0.875rem 1rem;
    }
    
    .sticky-summary-bar .summary-item {
        margin-right: 1rem;
        margin-bottom: 0;
    }
    
    .sticky-summary-bar .summary-item small {
        font-size: 0.7rem;
    }
    
    .sticky-summary-bar .fw-bold {
        font-size: 0.9rem;
    }
    
    .sticky-summary-bar .btn-light {
        padding: 0.625rem 1rem;
        font-size: 0.95rem;
        width: 100%;
    }
    
    .sticky-summary-bar .row {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .sticky-summary-content .d-flex {
        justify-content: space-between;
        flex-wrap: nowrap;
    }
}

@media (max-width: 576px) {
    .sticky-summary-bar .summary-item {
        margin-right: 0.75rem;
    }
    
    .sticky-summary-bar .summary-item small {
        font-size: 0.65rem;
    }
    
    .sticky-summary-bar .fw-bold {
        font-size: 0.85rem;
        line-height: 1.2;
    }
    
    .sticky-summary-bar .btn-light {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* Animazione per il contenuto sticky */
.sticky-summary-bar .summary-item {
    animation: slideInBottom 0.6s ease-out;
    animation-fill-mode: both;
}

.sticky-summary-bar .summary-item:nth-child(1) { animation-delay: 0.1s; }
.sticky-summary-bar .summary-item:nth-child(2) { animation-delay: 0.2s; }
.sticky-summary-bar .summary-item:nth-child(3) { animation-delay: 0.3s; }
.sticky-summary-bar .summary-item:nth-child(4) { animation-delay: 0.4s; }

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

/* ====================
   SINGLE PAGE FORM STYLES
   ==================== */

.solar-single-form {
    max-width: none;
}

.form-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.form-section:hover {
    background: #f1f3f5;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.section-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.section-header h6 {
    color: #333;
    font-weight: 600;
}

.panel-selector {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.form-range:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 107, 53, 0.25);
}

.form-range::-webkit-slider-thumb {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.form-range::-moz-range-thumb {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
}

.battery-options .form-check-label {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.battery-options .form-check-input:checked + .form-check-label {
    background: rgba(255, 107, 53, 0.1);
    color: #3b82f6;
}

.charging-options .form-check-label {
    cursor: pointer;
    padding: 0.75rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: block;
}

.charging-options .form-check-input:checked + .form-check-label {
    background: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
    color: #28a745;
}

.summary-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f5;
}

.summary-item:last-child {
    border-bottom: none;
}

.payment-type-selector .form-check-label {
    cursor: pointer;
    padding: 0.75rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.payment-type-selector .form-check-input:checked + .form-check-label {
    background: rgba(0, 123, 255, 0.1);
    border-color: #007bff;
    color: #007bff;
}

.rate-preview {
    border: 2px dashed #007bff;
    background: rgba(0, 123, 255, 0.05) !important;
}

#calculate-quote-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

#calculate-quote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

#analyze-roof-btn.btn-success {
    background: #28a745;
    border-color: #28a745;
}

#analyze-roof-btn.btn-danger {
    background: #dc3545;
    border-color: #dc3545;
}

/* Sticky sidebar adjustments */
@media (min-width: 992px) {
    .sticky-top {
        top: 20px !important;
        z-index: 100; /* Below sticky bar */
    }
}

/* Ensure sticky bar is always on top */
.sticky-summary-bar {
    z-index: 2000 !important;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .form-section {
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .section-icon {
        margin: 0 auto 1rem auto;
    }
}

/* ====================
   SYSTEM CONFIGURATION SECTIONS - Step 4 Results
   ==================== */

.system-config-section {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-lg);
}

.system-config-section h5 {
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.config-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
}

.config-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.config-header {
    background: #3b82f6;
    color: white;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    font-size: 0.9rem;
}

.config-body {
    padding: var(--space-md);
    text-align: center;
}

.config-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

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

/* ====================
   ECONOMIC SECTIONS - Step 4 Results
   ==================== */

.economic-section {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-lg);
}

.economic-section h5 {
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.economic-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    height: 100%;
}

.economic-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.economic-card.highlight {
    background: #10b981;
    color: white;
    border-color: #28a745;
}

.economic-card.highlight .economic-icon i {
    color: white !important;
}

.economic-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.economic-card.highlight .economic-icon {
    background: rgba(255, 255, 255, 0.2);
}

.economic-icon i {
    font-size: 1.5rem;
    color: var(--color-accent);
}

.economic-content {
    flex: 1;
}

.economic-value {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.economic-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Sidebar Summary Enhanced */
.summary-stats {
    margin: var(--space-md) 0;
}

.summary-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid #e9ecef;
}

.summary-stat:last-child {
    border-bottom: none;
}

.summary-stat .stat-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.summary-stat .stat-value {
    font-weight: 600;
    color: var(--color-primary);
}

.cta-section {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid #e9ecef;
}

/* Responsive adjustments for results */
@media (max-width: 768px) {
    .system-config-section,
    .economic-section {
        padding: var(--space-md);
        margin-bottom: var(--space-md);
    }
    
    .config-value {
        font-size: 1.25rem;
    }
    
    .economic-value {
        font-size: 1.2rem;
    }
    
    .economic-card {
        padding: var(--space-sm);
    }
    
    .economic-icon {
        width: 40px;
        height: 40px;
    }
    
    .economic-icon i {
        font-size: 1.2rem;
    }
}

/* ====================
   SYSTEM CONFIGURATION IMPROVEMENTS - Step 4
   ==================== */

.system-configuration-main {
    background: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.config-subsection {
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.config-subsection:hover {
    border-color: var(--color-accent);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.1);
}

.subsection-header h5 {
    color: var(--color-primary);
    font-weight: 600;
}

.subsection-header p strong {
    color: var(--color-accent);
    font-weight: 600;
}

/* Toggle interactivity improvements - Enhanced visibility */
.form-check-input {
    width: 3rem !important;
    height: 1.5rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease;
    border: 2px solid #dee2e6;
    background-color: #f8f9fa !important;
    position: relative;
}

.form-check-input:checked {
    background-color: #007bff !important;
    border-color: #007bff !important;
    box-shadow: 0 0 12px rgba(0, 123, 255, 0.4) !important;
}

/* Create a visible circle inside the toggle */
.form-check-input:checked::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    background: white;
    border-radius: 50%;
    top: 50%;
    right: 0.15rem;
    transform: translateY(-50%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.form-check-input:not(:checked)::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 0.15rem;
    transform: translateY(-50%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.form-check-input:focus {
    box-shadow: 0 0 12px rgba(0, 123, 255, 0.3) !important;
    border-color: #007bff !important;
}

.form-check-input:hover {
    transform: scale(1.05);
    border-color: #007bff;
}

/* Accordion buttons improvements */
.accordion-button {
    cursor: pointer !important;
    transition: all 0.3s ease;
    border: none !important;
    box-shadow: none !important;
}

.accordion-button:hover {
    background-color: rgba(255, 107, 53, 0.05) !important;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(255, 107, 53, 0.1) !important;
    color: var(--color-primary) !important;
}

/* ===================== 
   REFINED SOLAR CONTROLS
   ===================== */
.solar-controls-refined {
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, #ffffff 0%, #f8fafb 100%);
    border: 1px solid rgba(255, 107, 53, 0.08);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.controls-container {
    padding: 1.25rem 1.5rem;
}

.controls-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1.5rem;
}

.controls-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary-orange);
    letter-spacing: -0.01em;
}

.control-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-gold));
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

.controls-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.toggle-group {
    display: flex;
    background: rgba(247, 250, 252, 0.8);
    border-radius: 10px;
    padding: 0.25rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.control-toggle {
    position: relative;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    padding: 0.5rem 0.875rem;
    margin: 0;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    user-select: none;
}

.control-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}

.toggle-icon {
    font-size: 0.875rem;
    transition: all 0.25s ease;
}

.control-toggle:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.control-toggle.active,
.control-toggle input:checked + .toggle-content {
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-gold));
    color: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(255, 107, 53, 0.25), 0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.control-toggle.active .toggle-icon {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.month-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.month-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-orange);
    letter-spacing: -0.01em;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 107, 53, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 53, 0.12);
}

.play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    font-size: 0.75rem;
}

.play-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.play-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Elegant Month Slider */
.month-slider-container {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.refined-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, 
        #b3c6e7 0%,     /* Gen - Inverno basso */
        #b8cae9 8.33%,  /* Feb - Inverno */
        #c8d6eb 16.66%, /* Mar - Primavera inizia */
        #d8e4ef 25%,    /* Apr - Primavera */
        #f0c674 33.33%, /* Mag - Primavera forte */
        #f39c12 41.66%, /* Giu - Estate inizia */
        #e74c3c 50%,    /* Lug - Estate massima */
        #e67e22 58.33%, /* Ago - Estate forte */
        #f1c40f 66.66%, /* Set - Estate-autunno */
        #d4ac0d 75%,    /* Ott - Autunno */
        #a6b5c4 83.33%, /* Nov - Autunno basso */
        #95a5a6 100%);  /* Dic - Inverno minimo */
    outline: none;
    -webkit-appearance: none;
    margin: 0.75rem 0 0.5rem 0;
    cursor: pointer;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.refined-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 3px solid #2196f3;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(33, 150, 243, 0.3), 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.refined-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.4);
}

.refined-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 3px solid #2196f3;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(33, 150, 243, 0.3);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.slider-labels span {
    text-align: center;
    min-width: 24px;
    transition: color 0.2s ease;
}

.slider-labels span:hover {
    color: var(--primary-orange);
}

/* Solar Controls Loading State */
.controls-loading {
    opacity: 1;
}

.loading-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: center;
    padding: 1rem 0;
}

.loading-spinner-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Elegant Solar Spinner */
.solar-spinner {
    position: relative;
    width: 60px;
    height: 60px;
}

.spinner-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: solarSpin 2s linear infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: #74b9ff;
    animation-duration: 1.5s;
}

.spinner-ring:nth-child(2) {
    border-right-color: #0984e3;
    animation-duration: 2s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    border-bottom-color: #fd79a8;
    animation-duration: 2.5s;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
}

.spinner-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-gold));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    animation: solarPulse 1.5s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

@keyframes solarSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes solarPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.1);
        box-shadow: 0 4px 12px rgba(255, 107, 53, 0.5);
    }
}

.loading-info {
    flex: 1;
    max-width: 250px;
}

.loading-title {
    margin: 0 0 0.75rem 0;
    font-weight: 600;
    color: var(--primary-orange);
    font-size: 1rem;
}

.loading-progress {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #74b9ff, #0984e3);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressShimmer 1.5s infinite;
}

@keyframes progressShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.loading-text {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    opacity: 0.8;
}

/* Controls transition animation */
.controls-active {
    animation: controlsSlideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes controlsSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.controls-loading {
    animation: controlsFadeOut 0.5s ease-out forwards;
}

.controls-loading.fade-out {
    animation: controlsFadeOut 0.5s ease-out forwards;
}

@keyframes controlsFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Success state for completed loading */
.controls-loaded .control-icon {
    background: linear-gradient(135deg, #00b894, #00a085) !important;
    animation: successPulse 0.6s ease-out;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .controls-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .controls-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .toggle-group {
        flex: 1;
    }
    
    .control-toggle {
        flex: 1;
        justify-content: center;
        padding: 0.625rem 0.5rem;
    }
    
    .toggle-text {
        font-size: 0.8rem;
    }

    .loading-progress {
        min-width: 150px;
    }
    
    .loading-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .solar-spinner {
        width: 50px;
        height: 50px;
    }
    
    .spinner-center {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .loading-info {
        max-width: 100%;
    }
}

/* Panel configuration slider improvements */
.range-slider {
    cursor: pointer !important;
}

.range-slider::-webkit-slider-thumb {
    cursor: pointer !important;
    transition: all 0.2s ease;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.4);
}

/* ====================
   ANALYSIS COMPLETED STEP - MODERN UX LAYOUT
   ==================== */

/* Animations for Analysis Completed */
@keyframes celebrationBounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0) scale(1); }
    40%, 43% { transform: translateY(-15px) scale(1.1); }
    70% { transform: translateY(-8px) scale(1.05); }
    90% { transform: translateY(-3px) scale(1.02); }
}

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

@keyframes pulseGlow {
    0% { box-shadow: 0 8px 32px rgba(255, 107, 53, 0.25); }
    50% { box-shadow: 0 12px 40px rgba(255, 107, 53, 0.35); }
    100% { box-shadow: 0 8px 32px rgba(255, 107, 53, 0.25); }
}

/* Hero Section for Analysis Results */
.analysis-hero-section {
    background: #ffffff;
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 107, 53, 0.1);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

.analysis-hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-title .success-icon {
    color: #28a745;
    font-size: 2.2rem;
    animation: celebrationBounce 2s ease-in-out;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

/* Main Financial Highlight */
.financial-highlight {
    text-align: center;
    margin-top: 1.5rem;
}

.highlight-card {
    background: #3b82f6;
    color: white;
    padding: 2rem 1.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.25);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: pulseGlow 3s ease-in-out infinite;
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.highlight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.3);
    animation: none;
}

.highlight-value {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
}

.highlight-label {
    font-size: 1rem;
    opacity: 0.95;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* Results Grid Cards */
.results-grid {
    margin-top: 2rem;
    gap: 1.5rem;
}

.result-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.8s ease-out;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.result-card:hover::before {
    background: #3b82f6;
}

.result-card .card-header {
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    border-radius: 20px 20px 0 0 !important;
    padding: 1.5rem;
    position: relative;
}

.result-card .card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
}

.result-card .card-body {
    padding: 1.5rem;
}

/* Primary Investment Card */
.primary-card::before {
    background: #3b82f6;
}

.primary-card .card-header {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.04) 0%, #ffffff 100%);
}

.primary-card .card-icon {
    background: #3b82f6;
}

/* Environmental Card */
.environmental-card::before {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.environmental-card .card-header {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.04) 0%, #ffffff 100%);
}

.environmental-card .card-icon {
    background: #10b981;
}

/* Metrics Styling */
.metric {
    text-align: center;
    padding: 1rem 0.5rem;
    border-radius: 12px;
    background: rgba(248, 249, 250, 0.5);
    transition: all 0.2s ease;
}

.metric:hover {
    background: rgba(255, 107, 53, 0.05);
    transform: translateY(-2px);
}

.metric-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Environmental Stats */
.environmental-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(248, 249, 250, 0.5);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.stat-item:hover {
    background: rgba(40, 167, 69, 0.05);
    transform: translateX(4px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 1.2rem;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.stat-desc {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Modern Metric Cards */
.modern-metric {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    animation: slideInUp 1s ease-out;
}

.modern-metric:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border-color: rgba(255, 107, 53, 0.2);
}

.modern-metric-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 0.5rem;
    display: block;
}

.modern-metric-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Investment Summary Styles */
.investment-summary {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.02) 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 1.5rem;
    border-left: 4px solid #3b82f6;
}

.investment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.investment-item:last-child {
    border-bottom: none;
}

.investment-label {
    font-weight: 500;
    color: #2c3e50;
}

.investment-value {
    font-weight: 600;
    color: #3b82f6;
}

/* Environmental Impact Styles */
.environmental-impact {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.02) 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 1.5rem;
    border-left: 4px solid #28a745;
}

.impact-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.impact-stat:last-child {
    border-bottom: none;
}

.impact-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #10b981;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.impact-content {
    flex: 1;
}

.impact-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 0.25rem;
}

.impact-description {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .analysis-hero-section {
        padding: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .highlight-value {
        font-size: 1.8rem;
    }
    
    .metric-value {
        font-size: 1.2rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 767.98px) {
    .analysis-hero-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .results-grid {
        margin-top: 1rem;
    }
    
    .financial-highlight {
        margin-top: 1rem;
    }
    
    .environmental-stats {
        gap: 1rem;
    }
    
    .result-card .card-header {
        padding: 1rem;
    }
    
    .result-card .card-body {
        padding: 1rem;
    }
}

/* ====================
   SAVINGS HERO CARD STYLES - High Impact Component  
   ==================== */

.savings-hero-card {
    margin: 0 0 2rem 0;
    position: relative;
    overflow: hidden;
}

.hero-card-inner {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hero-card-inner:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 80px rgba(0,0,0,0.18);
}

.hero-background {
    background: #3b82f6;
    position: relative;
    padding: 3rem 2rem;
    color: white;
    overflow: hidden;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255,255,255,0.1);
    animation: none;
}

/* New Horizontal Hero Card Styles */
.hero-background-horizontal {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 1.5rem 0;
    color: #1e293b;
    position: relative;
    overflow: hidden;
}

.hero-background-horizontal::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: rgba(59, 130, 246, 0.02);
    animation: none;
}

/* Horizontal Layout Components */
.hero-main-value {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1.5rem;
}

.hero-icon-inline {
    width: 60px;
    height: 60px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #16a34a;
    animation: float 6s ease-in-out infinite;
}

.hero-value-block {
    flex: 1;
}

.hero-value-block .hero-label {
    font-size: 0.85rem;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.hero-value-block .hero-primary-value {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-value-block .hero-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Center Metrics Section */
.hero-metrics-horizontal {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 1rem;
}

.metric-horizontal {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
}

.metric-icon {
    width: 32px;
    height: 32px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #3b82f6;
}

.metric-horizontal .metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.metric-horizontal .metric-label {
    font-size: 0.7rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Location Data Section */
.hero-location-data {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin: 0 1.5rem;
}

.location-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    opacity: 0.95;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-header i {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.location-stats {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
}

.stat-compact {
    text-align: center;
    flex: 1;
}

.stat-compact .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    display: block;
    line-height: 1.2;
}

.stat-compact .stat-unit {
    font-size: 0.65rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hero Action Section */
.hero-action-section {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
}

.action-content {
    margin-bottom: 1.5rem;
}

.action-header {
    margin-bottom: 1.5rem;
}

.action-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.action-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 0;
}

.action-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.action-stat {
    text-align: center;
}

.action-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fbbf24;
    line-height: 1.2;
}

.action-stat-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.btn-action-primary {
    background: white;
    color: #3b82f6;
    border: 2px solid white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-action-primary:hover {
    background: #f8fafc;
    color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Legacy CTA Bar (for compatibility) */
.hero-cta-bar {
    margin-top: 1rem;
    padding: 1rem 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-hero-primary {
    background: rgba(255, 255, 255, 0.95);
    color: #3b82f6;
    border: none;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-hero-primary:hover {
    background: white;
    color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.hero-trust-indicators {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.hero-trust-indicators .trust-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    opacity: 0.95;
    white-space: nowrap;
}

.hero-trust-indicators .trust-item i {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Social Proof Section */
.social-proof-bar {
    margin-top: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 0 16px 16px;
}

.proof-item {
    text-align: center;
}

.proof-number {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.proof-label {
    font-size: 0.7rem;
    opacity: 0.8;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin-top: 0.1rem;
}

.proof-stars {
    color: #ffd700;
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

.proof-stars i {
    margin-right: 0.1rem;
}

.proof-divider {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
    font-size: 1.2rem;
    line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .hero-background-horizontal {
        padding: 1rem 0;
    }
    
    .hero-value-block .hero-primary-value {
        font-size: 1.75rem;
    }
    
    .hero-metrics-horizontal {
        flex-direction: row;
        justify-content: space-around;
    }
    
    .metric-horizontal {
        flex-direction: column;
        text-align: center;
        padding: 0.5rem;
    }
    
    .hero-location-data {
        margin-top: 1rem;
    }
    
    .hero-action-section {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }

    .action-title {
        font-size: 1.25rem;
    }

    .action-stats {
        gap: 1rem;
    }

    .action-stat-value {
        font-size: 1.25rem;
    }

    .btn-action-primary {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .hero-cta-bar {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-trust-indicators {
        justify-content: center;
    }
    
    /* Social proof mobile adjustments */
    .social-proof-bar {
        padding: 0.5rem 1rem;
    }
    
    .proof-item {
        margin: 0.25rem 0;
    }
}

@media (max-width: 768px) {
    /* Mobile optimization for results section */
    .hero-background-horizontal .row {
        flex-direction: column;
    }
    
    .hero-main-value {
        justify-content: center;
        text-align: center;
        padding-bottom: 1rem;
        border-bottom: 1px solid #e2e8f0;
        margin-bottom: 1rem;
    }
    
    .hero-metrics-horizontal {
        flex-direction: row;
        padding: 0 1.5rem;
        margin-bottom: 1rem;
    }
    
    .metric-horizontal {
        flex: 1;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 0.75rem 0.5rem;
    }
    
    .hero-location-data {
        margin: 0 1.5rem;
    }
    
    .location-stats {
        gap: 1rem;
    }
    
    /* Results grid mobile optimization */
    .metric-card-modern {
        margin-bottom: 1rem !important;
    }
    
    /* Analysis content mobile adjustments */
    .analysis-content {
        padding: 1rem !important;
    }
    
    .analysis-content .row[style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }
}

@media (max-width: 576px) {
    .hero-value-block .hero-primary-value {
        font-size: 1.75rem;
    }
    
    .hero-trust-indicators {
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: center;
    }
    
    .hero-trust-indicators .trust-item {
        font-size: 0.75rem;
    }
    
    /* Ultra-compact mobile adjustments */
    .hero-background-horizontal {
        padding: 1rem 0;
    }
    
    .hero-main-value {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .hero-icon-inline {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .metric-horizontal {
        padding: 0.5rem;
    }
    
    .metric-horizontal .metric-value {
        font-size: 1rem;
    }
    
    .stat-compact .stat-value {
        font-size: 1.1rem;
    }
    
    .location-header {
        font-size: 0.8rem;
    }
    
    .btn-hero-primary {
        width: 100%;
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
    }
    
    /* Mobile-specific results layout */
    .results-compact-header {
        text-align: center;
        padding: 1rem;
    }
    
    .results-compact-header h4 {
        font-size: 1.25rem;
    }
    
    /* Energy analysis mobile tweaks */
    #annual-consumption-input {
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
    
    .metric-card-modern {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .metric-card-modern .metric-value {
        font-size: 1.25rem !important;
    }
    
    /* Social proof ultra-mobile adjustments */
    .social-proof-bar .d-flex {
        gap: 0.75rem !important;
    }
    
    .proof-number {
        font-size: 0.9rem;
    }
    
    .proof-label {
        font-size: 0.65rem;
    }
    
    .proof-divider {
        font-size: 1rem;
        opacity: 0.7;
    }
    
    .proof-stars {
        font-size: 0.8rem;
    }
}

/* Accessibility Improvements */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus states for better keyboard navigation */
.btn-hero-primary:focus {
    outline: 3px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgba(255, 107, 53, 0.5);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-background-horizontal {
        background: #3b82f6;
    }
    
    .proof-label,
    .metric-label,
    .hero-subtitle {
        opacity: 1;
        font-weight: 600;
    }
    
    .trust-item,
    .proof-number {
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hero-icon-inline {
        animation: none;
    }
    
    .hero-background-horizontal::before {
        animation: none;
    }
    
    .hero-card-inner:hover {
        transform: none;
    }
    
    .btn-hero-primary:hover {
        transform: none;
    }
}

@keyframes heroShimmer {
    0%, 100% { opacity: 0.3; transform: rotate(0deg); }
    50% { opacity: 0.6; transform: rotate(180deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    text-align: center;
}

.hero-icon {
    background: #f1f5f9;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
}

.hero-icon i {
    font-size: 2rem;
    color: #16a34a;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.hero-value-section {
    text-align: center;
}

.hero-label {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-primary-value {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin: 1rem 0;
    color: #1e293b;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 0.95rem;
    opacity: 0.85;
    font-weight: 400;
}

.hero-secondary-metrics {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
}

.secondary-metric {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.secondary-metric:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.secondary-metric .metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: white;
}

.secondary-metric .metric-label {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
}

.hero-cta-section {
    text-align: center;
}

.btn-hero-primary {
    background: #3b82f6;
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

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

.btn-hero-primary:hover::before {
    left: 100%;
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 107, 53, 0.5);
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

.btn-hero-primary:active {
    transform: translateY(-1px);
}

.hero-trust-indicators {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

.trust-item i {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
}

/* Mobile Optimization */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .hero-secondary-metrics {
        flex-direction: row;
        justify-content: center;
    }
    
    .hero-trust-indicators {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-background {
        padding: 2rem 1rem;
    }
    
    .hero-primary-value {
        font-size: 2.5rem;
    }
    
    .hero-icon {
        width: 60px;
        height: 60px;
    }
    
    .hero-icon i {
        font-size: 1.5rem;
    }
    
    .secondary-metric .metric-value {
        font-size: 1.4rem;
    }
    
    .btn-hero-primary {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* ====================
   ANIMATION STYLES FOR VALUE UPDATES
   ==================== */

/* Animazioni per aggiornamento valori */
.updating {
    transform: scale(0.95);
    transition: all 0.2s ease;
}

.price-updating {
    animation: priceUpdate 0.6s ease-in-out;
}

.price-updated {
    animation: priceConfirm 1.5s ease-out;
}

.update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.update-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.update-notification i {
    animation: spin 2s linear infinite;
}

@keyframes priceUpdate {
    0% { background-color: rgba(33, 150, 243, 0.1); }
    50% { background-color: rgba(33, 150, 243, 0.3); }
    100% { background-color: rgba(33, 150, 243, 0.1); }
}

@keyframes priceConfirm {
    0% { background-color: rgba(76, 175, 80, 0.2); }
    20% { background-color: rgba(76, 175, 80, 0.4); }
    100% { background-color: transparent; }
}

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

/* ====================
   MAP PREVIEW CARD STYLES
   ==================== */

.hero-and-map-section {
    margin-bottom: 2rem;
}

.map-preview-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.map-preview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(0,0,0,0.12);
}

.map-card-header {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.map-card-header h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.map-container {
    position: relative;
    height: 280px;
    overflow: hidden;
    flex-grow: 1;
}

.results-map {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.results-map::before {
    content: '🏠';
    font-size: 2rem;
    opacity: 0.3;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.results-map::after {
    content: 'Mappa caricata automaticamente';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #666;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.map-stats {
    padding: 1rem 1.25rem;
    background: #fafbfc;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.stat-mini {
    padding: 0.75rem 0.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.stat-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-mini .stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.stat-mini .stat-label {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile Optimization */
@media (max-width: 992px) {
    .hero-and-map-section .row {
        flex-direction: column-reverse;
    }
    
    .map-container {
        height: 240px;
    }
    
    .hero-and-map-section {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .map-container {
        height: 200px;
    }
    
    .map-card-header {
        padding: 1rem;
    }
    
    .map-stats {
        padding: 0.75rem 1rem;
    }
}

/* Map Placeholder and Small Metrics */
.map-placeholder {
    height: 200px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.map-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" opacity="0.1"><circle cx="20" cy="20" r="3" fill="%23000"/><circle cx="10" cy="10" r="2" fill="%23000"/><circle cx="30" cy="15" r="2" fill="%23000"/><circle cx="15" cy="30" r="2" fill="%23000"/></svg>') repeat;
}

.map-placeholder-content {
    text-align: center;
    z-index: 1;
    position: relative;
}

.map-placeholder-content i {
    font-size: 2.5rem;
    color: #28a745;
    margin-bottom: 0.5rem;
    display: block;
}

.map-placeholder-content p {
    color: #6c757d;
    margin: 0;
    font-weight: 500;
}

.map-overlay-info {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 12px 12px 0 0;
    position: relative;
    z-index: 2;
}

.location-info h6 {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.location-info p {
    color: #718096;
    font-size: 0.9rem;
}

.metric-small {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.metric-small .metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.metric-small .metric-label {
    font-size: 0.75rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Custom Range Slider Styles */
.custom-range {
    -webkit-appearance: none;
    appearance: none;
    background: #e9ecef;
    cursor: pointer;
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #20c997;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(32, 201, 151, 0.4);
    transition: all 0.2s ease;
}

.custom-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 8px rgba(32, 201, 151, 0.6);
}

.custom-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #20c997;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(32, 201, 151, 0.4);
    transition: all 0.2s ease;
}

.custom-range::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 8px rgba(32, 201, 151, 0.6);
}

.map-error {
    height: 200px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
}