/*
 * Swiss Instasolar - Design System v3.0
 * Clean Modern Design with Material Symbols
 *
 * Previous designs saved in: style-old.css, style-backup2.css
 */

/* ============================================
   1. CSS VARIABLES / DESIGN TOKENS
   ============================================ */

:root {
    /* Primary - Jaune Swiss Instasolar (identique au site principal) */
    --color-primary: #FDC300;
    --color-primary-hover: #E0AD00;
    --color-primary-light: #FFF9E6;
    --color-primary-dark: #C99B00;

    /* Secondary - Bleu professionnel */
    --color-secondary: #2563EB;
    --color-secondary-hover: #1D4ED8;
    --color-secondary-light: #EFF6FF;
    --color-secondary-dark: #1E40AF;

    /* Neutral - Tons corporate */
    --color-neutral-900: #1A1A2E;
    --color-neutral-800: #2D2D44;
    --color-neutral-700: #4A4A68;
    --color-neutral-600: #6B6B8A;
    --color-neutral-500: #8B8BA8;
    --color-neutral-400: #B0B0C4;
    --color-neutral-300: #D1D1DE;
    --color-neutral-200: #E8E8EF;
    --color-neutral-100: #F4F4F7;
    --color-neutral-50: #FAFBFC;

    /* Semantic Colors */
    --color-success: #059669;
    --color-success-light: #ECFDF5;
    --color-success-dark: #047857;

    --color-warning: #D97706;
    --color-warning-light: #FFFBEB;
    --color-warning-dark: #B45309;

    --color-error: #DC2626;
    --color-error-light: #FEF2F2;
    --color-error-dark: #B91C1C;

    --color-info: #2563EB;
    --color-info-light: #EFF6FF;
    --color-info-dark: #1D4ED8;

    /* Legacy color mappings (for compatibility) */
    --text-primary: var(--color-neutral-900);
    --text-secondary: var(--color-neutral-700);
    --text-tertiary: var(--color-neutral-600);
    --text-muted: var(--color-neutral-500);
    --bg-primary: #FFFFFF;
    --bg-secondary: var(--color-neutral-50);
    --bg-tertiary: var(--color-neutral-100);
    --bg-quaternary: var(--color-neutral-200);
    --border-primary: var(--color-neutral-300);
    --border-secondary: var(--color-neutral-200);

    /* Spacing - 4px base */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Legacy spacing mappings */
    --spacing-2xs: 2px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    --spacing-2xl: 24px;
    --spacing-3xl: 32px;
    --spacing-4xl: 40px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;

    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-primary: 0 4px 14px rgba(253, 195, 0, 0.35);
    --shadow-secondary: 0 4px 14px rgba(37, 99, 235, 0.25);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-smooth: 0.3s ease;

    /* Layout */
    --bottom-sheet-width: 92%;
    --bottom-sheet-max-width: 680px;
    --header-height: 64px;
}

/* ============================================
   1b. MATERIAL SYMBOLS
   ============================================ */

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
}

/* Icon sizing utilities */
.icon-sm {
    font-size: 18px;
}

.icon-md {
    font-size: 24px;
}

.icon-lg {
    font-size: 32px;
}

.icon-xl {
    font-size: 40px;
}

/* Filled icon variant */
.material-symbols-outlined.filled {
    font-variation-settings:
        'FILL' 1,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
}

/* ============================================
   2. RESET & BASE STYLES
   ============================================ */

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

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

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-weight: var(--font-weight-regular);
    line-height: var(--leading-normal);
    color: var(--color-neutral-900);
    background-color: var(--color-neutral-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: var(--leading-tight);
    color: var(--color-neutral-900);
}

h1 {
    font-size: var(--text-3xl);
    letter-spacing: -0.025em;
}

h2 {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-semibold);
}

h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-weight-semibold);
}

p {
    color: var(--color-neutral-700);
}

.text-muted {
    color: var(--color-neutral-500);
}

.text-small {
    font-size: var(--text-sm);
}

/* ============================================
   4. HEADER
   ============================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-3) 0;
    transition: all var(--transition-smooth);
}

.site-header:hover {
    background: rgba(26, 26, 46, 0.98);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 38px;
    width: auto;
    transition: transform var(--transition-base);
}

.logo:hover img {
    transform: scale(1.02);
}

.quote-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: var(--color-neutral-900);
    font-weight: var(--font-weight-semibold);
    font-size: var(--text-sm);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-md);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-primary);
}

.quote-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 195, 0, 0.45);
}

.quote-cta:active {
    transform: translateY(0);
}

/* ============================================
   5. MAP
   ============================================ */

#map {
    height: 100vh;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
}

.gm-style .gm-style-mtc,
.gm-style .gm-style-cc,
.gm-style .gmnoprint {
    margin-top: calc(var(--header-height) + 8px) !important;
}

.gm-style-iw {
    padding: 0 !important;
}

.gm-style-iw-chr {
    align-items: center;
}

.gm-style-iw-d {
    overflow: hidden !important;
    padding: 0;
}

/* ============================================
   6. BOTTOM SHEET
   ============================================ */

.bottom-sheet {
    position: fixed;
    inset: 0;
    display: flex;
    opacity: 0;
    pointer-events: none;
    align-items: center;
    flex-direction: column;
    justify-content: flex-end;
    transition: opacity var(--transition-base);
}

.bottom-sheet.show {
    opacity: 1;
    pointer-events: auto;
    z-index: 50;
}

.bottom-sheet.show.collapsed {
    pointer-events: none;
}

.bottom-sheet.show.collapsed .content {
    pointer-events: auto;
}

.bottom-sheet .sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%);
    pointer-events: auto;
    transition: opacity var(--transition-smooth);
}

.bottom-sheet.show:not(.collapsed) .sheet-overlay {
    opacity: 1;
}

.bottom-sheet .sheet-overlay.collapsed {
    opacity: 0;
    pointer-events: none;
}

.bottom-sheet .content {
    width: var(--bottom-sheet-width);
    position: relative;
    background: var(--bg-primary);
    max-height: calc(100vh - var(--header-height));
    height: auto;
    max-width: var(--bottom-sheet-max-width);
    transform: translateY(100%);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
    transition: transform var(--transition-smooth);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bottom-sheet.show .content {
    transform: translateY(0);
}

.bottom-sheet.dragging .content {
    transition: none;
}

.bottom-sheet.fullscreen .content {
    border-radius: 0;
    max-height: 100vh;
}

.bottom-sheet .header {
    display: flex;
    justify-content: center;
    background: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid transparent;
    transition: all var(--transition-base);
}

.bottom-sheet .header.scrolled {
    border-bottom-color: var(--color-neutral-200);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.header .drag-icon {
    cursor: grab;
    user-select: none;
    padding: var(--space-4);
    width: 100%;
    display: flex;
    justify-content: center;
}

.header .drag-icon:active {
    cursor: grabbing;
}

.header .drag-icon span {
    height: 5px;
    width: 48px;
    background: var(--color-neutral-300);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.header .drag-icon:hover span {
    background: var(--color-neutral-400);
    width: 56px;
}

.bottom-sheet .body {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 var(--space-4) 0;
    scrollbar-width: thin;
    scrollbar-color: var(--color-neutral-300) transparent;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.bottom-sheet .body::-webkit-scrollbar {
    width: 6px;
}

.bottom-sheet .body::-webkit-scrollbar-track {
    background: transparent;
}

.bottom-sheet .body::-webkit-scrollbar-thumb {
    background: var(--color-neutral-300);
    border-radius: var(--radius-full);
}

.bottom-sheet .body::-webkit-scrollbar-thumb:hover {
    background: var(--color-neutral-400);
}

/* ============================================
   7. RESULTS CONTAINER
   ============================================ */

.results-container {
    max-width: 100%;
    margin: 0 auto;
    padding: var(--space-6);
}

.results-container:first-of-type {
    padding-top: 0;
}

.results-container > * {
    margin-bottom: var(--space-4);
}

.results-container > *:last-child {
    margin-bottom: 0;
}

.results-container h1 {
    color: var(--color-neutral-900);
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-2);
}

.results-container h2 {
    color: var(--color-neutral-900);
    font-size: var(--text-xl);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-4);
}

.subtitle {
    color: var(--color-neutral-500);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-regular);
    margin-bottom: var(--space-6);
}

/* ============================================
   8. INSTRUCTIONS & INPUTS
   ============================================ */

.instructions {
    text-align: center;
    margin-bottom: var(--space-6);
}

.instructions h3 {
    margin-bottom: var(--space-2);
    color: var(--color-neutral-900);
    font-size: var(--text-xl);
    font-weight: var(--font-weight-semibold);
}

.instructions p {
    color: var(--color-neutral-500);
    font-size: var(--text-sm);
}

.input-group {
    margin-bottom: var(--space-4);
}

.input-base,
#address-input,
#bill-input {
    width: 100%;
    padding: var(--space-4);
    font-size: var(--text-base);
    font-family: var(--font-sans);
    border: 1.5px solid var(--color-neutral-300);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--color-neutral-900);
    transition: all var(--transition-base);
    outline: none;
}

.input-base:hover,
#address-input:hover,
#bill-input:hover {
    border-color: var(--color-neutral-400);
}

.input-base:focus,
#address-input:focus,
#bill-input:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.input-base::placeholder,
#address-input::placeholder,
#bill-input::placeholder {
    color: var(--color-neutral-400);
}

.bill-group {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.input-label {
    color: var(--color-neutral-600);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
}

/* ============================================
   9. BUTTONS
   ============================================ */

#calculate-button {
    width: 100%;
    padding: var(--space-4);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: var(--color-neutral-900);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-primary);
}

#calculate-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 195, 0, 0.45);
}

#calculate-button:active:not(:disabled) {
    transform: translateY(0);
}

#calculate-button:disabled {
    background: var(--color-neutral-200);
    color: var(--color-neutral-400);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

button[type="submit"],
.quote-form button,
.btn-primary {
    width: 100%;
    padding: var(--space-4);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: var(--color-neutral-900);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-primary);
}

button[type="submit"]:hover,
.quote-form button:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 195, 0, 0.45);
}

button[type="submit"]:active,
.quote-form button:active,
.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: var(--color-neutral-900);
    box-shadow: var(--shadow-primary);
}

.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(253, 195, 0, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--color-neutral-700);
    border: 1.5px solid var(--color-neutral-300);
    box-shadow: none;
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
    background: var(--color-primary-light);
    box-shadow: none;
    transform: translateY(-1px);
}

/* ============================================
   10. MAIN STATS GRID (Clean Design with Icons)
   ============================================ */

.main-stats {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: var(--space-6);
    width: 100%;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-neutral-200);
    overflow: hidden;
}

.main-stats .stat-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-neutral-100);
    transition: background-color var(--transition-base);
}

.main-stats .stat-item:last-child {
    border-bottom: none;
}

.main-stats .stat-item:hover {
    background-color: var(--color-neutral-50);
}

.stat-item .stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    color: var(--color-secondary);
}

.stat-item .stat-icon .material-symbols-outlined {
    font-size: 28px;
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 28;
}

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

.stat-item .label {
    color: var(--color-neutral-600);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-regular);
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: normal;
}

.stat-item .value {
    font-weight: var(--font-weight-semibold);
    font-size: var(--text-base);
    color: var(--color-neutral-900);
}

.stat-item .stat-value-right {
    text-align: right;
    font-weight: var(--font-weight-semibold);
    font-size: var(--text-base);
    color: var(--color-neutral-900);
    white-space: nowrap;
}

.stat-item .stat-value-right .unit {
    font-size: var(--text-sm);
    font-weight: var(--font-weight-regular);
    color: var(--color-neutral-500);
    margin-left: 2px;
}

/* Legacy colored borders removed - cleaner design */
.main-stats .stat-item:nth-child(1) .stat-icon { color: var(--color-primary); }
.main-stats .stat-item:nth-child(2) .stat-icon { color: var(--color-secondary); }
.main-stats .stat-item:nth-child(3) .stat-icon { color: var(--color-warning); }
.main-stats .stat-item:nth-child(4) .stat-icon { color: var(--color-success); }

/* 2-column grid for desktop - optional */
@media (min-width: 600px) {
    .main-stats.grid-layout {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .main-stats.grid-layout .stat-item {
        border-bottom: none;
        border-right: 1px solid var(--color-neutral-100);
    }

    .main-stats.grid-layout .stat-item:nth-child(2n) {
        border-right: none;
    }

    .main-stats.grid-layout .stat-item:nth-child(1),
    .main-stats.grid-layout .stat-item:nth-child(2) {
        border-bottom: 1px solid var(--color-neutral-100);
    }
}

/* ============================================
   11. PANELS BAR
   ============================================ */

.panels-bar-container {
    width: 100%;
    margin: var(--space-5) 0;
    background: var(--bg-primary);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-neutral-200);
}

.panels-bar {
    width: 100%;
    height: 8px;
    background: var(--color-neutral-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: var(--space-2) 0;
    position: relative;
}

.panels-bar .savings {
    height: 100%;
    background: linear-gradient(90deg, var(--color-secondary) 0%, var(--color-success) 100%);
    border-radius: var(--radius-full);
    transition: width var(--transition-smooth);
}

.panels-legend {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-neutral-600);
}

/* ============================================
   12. CO2 SECTION
   ============================================ */

.co2-section {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: var(--color-success-light);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    justify-content: center;
    margin: var(--space-6) 0;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.co2-icon {
    background: white;
    padding: var(--space-2);
    border-radius: var(--radius-full);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    color: var(--color-success);
}

.co2-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.co2-icon .material-symbols-outlined {
    font-size: 28px;
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 28;
}

.co2-section .stat-item {
    text-align: center;
}

/* ============================================
   13. COST SECTION
   ============================================ */

.financial-analysis {
    padding: var(--space-5);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-neutral-200);
}

.cost-section {
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-8);
}

.cost-table {
    background: var(--bg-primary);
    padding: var(--space-5);
    padding-bottom: 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-neutral-200);
}

.cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--color-neutral-100);
}

.cost-row:last-child {
    border-bottom: none;
}

.cost-row .label {
    color: var(--color-neutral-700);
    font-weight: var(--font-weight-medium);
}

.cost-row .value {
    font-weight: var(--font-weight-semibold);
    color: var(--color-neutral-900);
}

.cost-row.main-cost .value {
    font-size: var(--text-xl);
    font-weight: var(--font-weight-bold);
}

.cost-row.net-cost {
    background: var(--color-secondary-light);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin: 0 calc(var(--space-5) * -1);
    padding: var(--space-4) var(--space-5);
    margin-top: var(--space-4);
}

.cost-row.net-cost .value {
    color: var(--color-secondary);
    font-size: var(--text-xl);
    font-weight: var(--font-weight-bold);
}

.cost-row.tax-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-4);
}

.tax-input {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.tax-input input {
    width: 70px;
    padding: var(--space-2) var(--space-3);
    border: 1.5px solid var(--color-neutral-300);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    text-align: center;
}

.tax-input input:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.tax-result {
    text-align: right;
}

.reduction {
    color: var(--color-success);
    font-weight: var(--font-weight-semibold);
}

/* ============================================
   14. SAVINGS BAR
   ============================================ */

.savings-bar-section {
    margin: var(--space-5) 0;
}

.savings-bar {
    height: 10px;
    background: var(--color-neutral-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    margin-bottom: var(--space-4);
}

.savings-progress,
.savings-bar .savings {
    background: linear-gradient(90deg, var(--color-success) 0%, #10B981 100%);
    height: 100%;
    transition: width var(--transition-smooth);
    position: absolute;
    left: 0;
    top: 0;
    border-radius: var(--radius-full) 0 0 var(--radius-full);
}

.sellback-progress,
.savings-bar .sellback {
    background: linear-gradient(90deg, #3B82F6 0%, var(--color-secondary) 100%);
    height: 100%;
    transition: width var(--transition-smooth);
    position: absolute;
    right: 0;
    top: 0;
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.savings-details {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-4);
}

.saving-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.saving-item .label {
    color: var(--color-neutral-500);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
}

.savings-value {
    color: var(--color-success) !important;
    font-weight: var(--font-weight-bold);
    font-size: var(--text-lg);
}

.sellback-value {
    color: var(--color-secondary) !important;
    font-weight: var(--font-weight-bold);
    font-size: var(--text-lg);
}

/* ============================================
   15. CHART SECTION
   ============================================ */

.chart-section {
    height: 260px;
    margin: var(--space-6) 0;
    padding: var(--space-4);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-neutral-200);
}

/* ============================================
   16. PROFITABILITY & COMPARISON CARDS
   ============================================ */

.summary-section {
    margin-top: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.profitability-card {
    background: linear-gradient(135deg, var(--color-secondary-light) 0%, white 100%);
    border: 1px solid var(--color-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-4);
}

.profitability-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    color: var(--color-secondary);
    box-shadow: var(--shadow-sm);
}

.icon-wrapper .material-symbols-outlined {
    font-size: 28px;
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 28;
}

.icon-wrapper img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.profitability-title {
    flex: 1;
}

.profitability-title .label {
    color: var(--color-secondary-dark);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-1);
}

.highlight {
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-secondary-dark);
}

.costs-comparison {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

@media (min-width: 480px) {
    .costs-comparison {
        grid-template-columns: repeat(2, 1fr);
    }
}

.cost-card {
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    transition: all var(--transition-base);
}

.cost-card:hover {
    transform: translateY(-2px);
}

.cost-without {
    background: var(--color-error-light);
    border: 1px solid var(--color-error);
}

.cost-with {
    background: var(--color-success-light);
    border: 1px solid var(--color-success);
}

.cost-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.cost-without .icon-wrapper {
    color: var(--color-error);
    background: var(--bg-primary);
}

.cost-with .icon-wrapper {
    color: var(--color-success);
    background: var(--bg-primary);
}

.cost-without .profitability-title .label {
    color: var(--color-error-dark);
}

.cost-with .profitability-title .label {
    color: var(--color-success-dark);
}

.cost-value-container {
    margin-top: var(--space-1);
    display: flex;
    align-items: baseline;
}

.cost-value {
    font-size: var(--text-xl);
    font-weight: var(--font-weight-bold);
}

.negative {
    color: var(--color-error-dark);
}

.positive {
    color: var(--color-success-dark);
}

.cost-period {
    font-size: var(--text-sm);
    color: var(--color-neutral-500);
    margin-left: var(--space-2);
}

/* ============================================
   17. QUOTE FORM
   ============================================ */

.quote-form {
    background: var(--bg-primary);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-neutral-200);
    box-shadow: var(--shadow-md);
}

.quote-form h2 {
    text-align: center;
    margin-bottom: var(--space-5);
    font-weight: var(--font-weight-bold);
    color: var(--color-neutral-900);
}

.gender-toggle {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    justify-content: center;
}

.gender-toggle input[type="radio"] {
    display: none;
}

.gender-toggle label {
    padding: var(--space-3) var(--space-6);
    background: var(--color-neutral-100);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: var(--font-weight-medium);
    color: var(--color-neutral-600);
    border: 1.5px solid transparent;
}

.gender-toggle label:hover {
    background: var(--color-neutral-200);
}

.gender-toggle input[type="radio"]:checked + label {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    border-color: var(--color-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

@media (min-width: 480px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-row input {
    width: 100%;
    border: 1.5px solid var(--color-neutral-300);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    font-size: var(--text-base);
    font-family: var(--font-sans);
    transition: all var(--transition-base);
    background: var(--bg-primary);
}

.form-row input:hover {
    border-color: var(--color-neutral-400);
}

.form-row input:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-row input::placeholder {
    color: var(--color-neutral-400);
}

.form-row input:valid:not(:placeholder-shown) {
    border-color: var(--color-success);
}

.form-row input:invalid:not(:placeholder-shown) {
    border-color: var(--color-error);
}

/* ============================================
   18. LOADING INDICATOR
   ============================================ */

.loading-indicator {
    position: fixed;
    top: calc(var(--header-height) + var(--space-4));
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: var(--space-3);
    z-index: 1000;
    border: 1px solid var(--color-neutral-200);
}

.loading-indicator.show {
    display: flex;
}

.loading-indicator .spinner {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border: 3px solid var(--color-neutral-200);
    border-top-color: var(--color-primary);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

.loading-indicator .message {
    color: var(--color-neutral-700);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   19. FOOTER
   ============================================ */

.footer {
    padding: var(--space-4) var(--space-6);
    background: var(--color-neutral-50);
    border-top: 1px solid var(--color-neutral-200);
    text-align: center;
    font-size: var(--text-xs);
    color: var(--color-neutral-500);
    transform: translateY(100%);
    transition: transform var(--transition-smooth);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: var(--bottom-sheet-max-width);
    margin: 0 auto;
    z-index: 15;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: center;
        gap: var(--space-6);
    }
}

.footer p {
    margin: 0;
    color: var(--color-neutral-500);
}

.footer a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer a:hover {
    color: var(--color-secondary-dark);
    text-decoration: underline;
}

.copyright {
    font-weight: var(--font-weight-medium);
}

.bottom-sheet.collapsed .footer {
    display: none;
}

.bottom-sheet .body.footer-hidden {
    padding-bottom: var(--space-2);
}

/* ============================================
   20. RESULTS HEADER
   ============================================ */

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.results-header h1 {
    margin: 0;
}

.reset-button {
    background: var(--color-neutral-100);
    color: var(--color-neutral-700);
    border: 1px solid var(--color-neutral-300);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-medium);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-base);
    margin-left: var(--space-4);
}

.reset-button:hover {
    background: var(--color-neutral-200);
    border-color: var(--color-neutral-400);
}

/* ============================================
   21. BLUR & LEAD CAPTURE
   ============================================ */

.blurred {
    position: relative;
}

.blurred .value {
    filter: blur(5px);
    color: var(--color-neutral-400);
}

.blur-section {
    position: relative;
    filter: blur(5px);
    user-select: none;
    pointer-events: none;
}

.blur-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background var(--transition-base);
}

.blur-overlay:hover {
    background: rgba(255, 255, 255, 0.6);
}

.blur-overlay .lock-icon {
    font-size: 36px;
    color: var(--color-secondary);
    margin-bottom: var(--space-3);
    transition: transform var(--transition-base);
}

.blur-overlay:hover .lock-icon {
    transform: scale(1.1);
}

.blur-overlay .unlock-text {
    font-size: var(--text-lg);
    color: var(--color-secondary);
    font-weight: var(--font-weight-semibold);
    text-align: center;
    max-width: 80%;
    margin-bottom: var(--space-3);
}

.blur-overlay .unlock-button {
    margin-top: var(--space-3);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: var(--color-neutral-900);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-5);
    font-weight: var(--font-weight-semibold);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-primary);
}

.blur-overlay .unlock-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 195, 0, 0.45);
}

.blur-container {
    position: relative;
    margin-bottom: var(--space-6);
}

/* ============================================
   22. LEAD CAPTURE POPUP
   ============================================ */

.lead-capture-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.lead-capture-popup {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--space-6);
    position: relative;
}

.lead-capture-popup-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: var(--color-neutral-100);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: var(--color-neutral-500);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lead-capture-popup-close:hover {
    background: var(--color-neutral-200);
    color: var(--color-neutral-700);
}

.lead-capture-popup h2 {
    color: var(--color-secondary);
    margin-top: 0;
    margin-bottom: var(--space-4);
    text-align: center;
}

.lead-capture-popup p {
    margin-bottom: var(--space-5);
    text-align: center;
    color: var(--color-neutral-600);
}

.teaser-section {
    background: var(--color-secondary-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin: var(--space-6) 0;
    border-left: 4px solid var(--color-secondary);
}

.teaser-section h3 {
    margin-top: 0;
    margin-bottom: var(--space-3);
    color: var(--color-secondary);
    font-size: var(--text-lg);
}

.benefits-list {
    margin: 0;
    padding-left: var(--space-6);
    list-style: none;
}

.benefits-list li {
    margin-bottom: var(--space-2);
    position: relative;
    color: var(--color-neutral-700);
}

.benefits-list li::before {
    content: "✓";
    color: var(--color-secondary);
    position: absolute;
    left: calc(var(--space-5) * -1);
    font-weight: var(--font-weight-bold);
}

.lead-capture-form {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-top: var(--space-6);
    border: 1px solid var(--color-neutral-200);
}

.lead-capture-form h2 {
    text-align: center;
    color: var(--color-secondary);
    margin-top: 0;
    margin-bottom: var(--space-5);
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin: var(--space-4) 0;
}

.consent-checkbox input {
    margin-top: var(--space-1);
    width: 18px;
    height: 18px;
    accent-color: var(--color-secondary);
}

.consent-checkbox label {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: var(--color-neutral-600);
}

.unlock-cta-button {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    color: var(--color-neutral-900);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    font-weight: var(--font-weight-semibold);
    font-size: var(--text-base);
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition-base);
    display: block;
    width: 100%;
    margin: var(--space-4) auto;
    box-shadow: var(--shadow-primary);
}

.unlock-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 195, 0, 0.45);
}

.cta-section {
    margin: var(--space-8) 0;
    text-align: center;
}

/* ============================================
   23. BENEFITS OVERLAY
   ============================================ */

.benefits-overlay {
    background: var(--color-secondary-light);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin: var(--space-4) 0;
    border-left: 4px solid var(--color-secondary);
}

.benefits-content {
    padding: var(--space-2);
}

.benefits-content h3 {
    margin-top: 0;
    margin-bottom: var(--space-3);
    color: var(--color-secondary);
    font-size: var(--text-base);
}

.benefits-list-compact {
    margin: 0 0 var(--space-4) 0;
    padding-left: var(--space-5);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    list-style: none;
}

.benefits-list-compact li {
    margin-bottom: var(--space-1);
    position: relative;
    font-size: var(--text-sm);
    flex: 1 0 45%;
    color: var(--color-neutral-700);
}

.benefits-list-compact li::before {
    content: "✓";
    color: var(--color-secondary);
    position: absolute;
    left: calc(var(--space-4) * -1);
    font-weight: var(--font-weight-bold);
}

/* ============================================
   24. CHART PLACEHOLDER
   ============================================ */

.chart-placeholder {
    background: var(--color-secondary-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
    margin-bottom: var(--space-5);
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--color-secondary);
}

.chart-placeholder img {
    max-width: 100%;
    max-height: 150px;
    margin-bottom: var(--space-3);
    opacity: 0.6;
}

.chart-placeholder-text {
    font-size: var(--text-sm);
    color: var(--color-secondary);
    font-weight: var(--font-weight-medium);
}

.blur-details-list {
    list-style: none;
    margin: 0 0 var(--space-4) 0;
    padding: 0;
    text-align: center;
}

.blur-details-list li {
    color: var(--color-neutral-600);
    font-size: var(--text-sm);
    margin-bottom: var(--space-1);
    position: relative;
    padding-left: var(--space-5);
    display: inline-block;
}

.blur-details-list li::before {
    content: "•";
    color: var(--color-secondary);
    position: absolute;
    left: 0;
}

/* ============================================
   25. RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {
    .header-container {
        padding: 0 var(--space-4);
    }

    .logo img {
        height: 32px;
    }

    .quote-cta {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-xs);
    }

    .results-container {
        padding: var(--space-5);
    }

    .results-container h1 {
        font-size: var(--text-xl);
    }

    .loading-indicator {
        padding: var(--space-3);
        top: calc(var(--header-height) + var(--space-2));
    }

    .costs-comparison {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .cost-row.tax-row {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }

    .savings-details {
        gap: var(--space-2);
    }

    .chart-section {
        height: 200px;
        padding: var(--space-3);
    }

    .quote-form {
        padding: var(--space-5);
    }

    .profitability-header {
        flex-direction: column;
        text-align: center;
    }

    .icon-wrapper {
        margin-bottom: var(--space-2);
    }
}

@media (max-width: 480px) {
    :root {
        --bottom-sheet-width: 96%;
    }

    .results-container {
        padding: var(--space-4);
    }

    .quote-form {
        padding: var(--space-4);
    }

    .gender-toggle label {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-sm);
    }

    .main-stats .stat-item {
        padding: var(--space-3) var(--space-4);
        gap: var(--space-3);
    }

    .stat-item .stat-icon {
        width: 32px;
        height: 32px;
    }

    .stat-item .stat-icon .material-symbols-outlined {
        font-size: 24px;
    }

    .stat-item .value,
    .stat-item .stat-value-right {
        font-size: var(--text-sm);
    }

    .highlight {
        font-size: var(--text-xl);
    }

    .cost-value {
        font-size: var(--text-lg);
    }

    .benefits-list-compact {
        flex-direction: column;
    }

    .benefits-list-compact li {
        flex: 1 0 100%;
    }

    .lead-capture-popup {
        padding: var(--space-5);
    }
}

/* ============================================
   26. ANIMATIONS
   ============================================ */

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

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

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s ease forwards;
}

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

/* Stagger animation for lists */
.stagger-animation > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.2s; }

/* ============================================
   27. UTILITY CLASSES
   ============================================ */

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

.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }

.bg-primary { background-color: var(--color-primary-light); }
.bg-secondary { background-color: var(--color-secondary-light); }
.bg-success { background-color: var(--color-success-light); }

.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }

.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

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

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