/**
 * ====================================================================
 * ALPHAVAULT AI — INFLATION CALCULATOR CSS
 * Adapted to Drive structure (drive.css base)
 * ====================================================================
 * drive.css gère le layout. Ce fichier surcharge pour le contenu
 * spécifique au calculateur d'inflation.
 */

/* ════════════════════════════════════════════════════════════
   1. LAYOUT OVERRIDE — avDriveContent scrollable
════════════════════════════════════════════════════════════ */
html, body.avd-page {
    overflow: hidden;
}

#avDriveContent {
    padding: 22px 26px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ════════════════════════════════════════════════════════════
   2. ECO VARIABLES (palette inflation, hérite de --avd-*)
════════════════════════════════════════════════════════════ */
:root {
    --eco-primary:       #3b82f6;
    --eco-secondary:     #8b5cf6;
    --eco-gradient:      linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --eco-gradient-soft: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    --eco-success:       #10b981;
    --eco-danger:        #ef4444;
    --eco-warning:       #f59e0b;
    --eco-transition:    all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --eco-radius:        16px;
    --eco-radius-lg:     24px;
}

/* ════════════════════════════════════════════════════════════
   3. ECO SECTIONS
════════════════════════════════════════════════════════════ */
.eco-section {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--eco-radius);
    padding: 28px;
    margin-bottom: 22px;
    transition: var(--eco-transition);
}

.eco-section:hover {
    border-color: var(--avd-border-hover);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.12);
}

/* ════════════════════════════════════════════════════════════
   4. GRADIENT TITLES
════════════════════════════════════════════════════════════ */
.gradient-title {
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title i {
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ════════════════════════════════════════════════════════════
   5. SECTION HEADER WITH INFO BUTTON
════════════════════════════════════════════════════════════ */
.section-header-with-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    gap: 12px;
    flex-wrap: wrap;
}

.info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--avd-input-bg);
    border: 1px solid var(--avd-border);
    color: var(--avd-text-muted);
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    transition: var(--eco-transition);
    flex-shrink: 0;
    font-family: inherit;
}

.info-btn:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border-color: transparent;
    transform: scale(1.12) rotate(15deg);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* ════════════════════════════════════════════════════════════
   6. INFLATION CALCULATOR CONTAINER
════════════════════════════════════════════════════════════ */
.inflation-calculator-container {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--eco-radius-lg);
    padding: 32px;
    transition: var(--eco-transition);
}

.inflation-calculator-container:hover {
    border-color: var(--avd-border-hover);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.15);
}

.inflation-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 22px;
    margin-bottom: 28px;
}

.mortgage-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mortgage-input-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--avd-text-muted);
    display: flex;
    align-items: center;
    gap: 7px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mortgage-input-group label i {
    color: var(--eco-primary);
}

.mortgage-input-group input,
.mortgage-input-group select {
    padding: 11px 14px;
    border: 1px solid var(--avd-border);
    border-radius: 10px;
    background: var(--avd-input-bg);
    font-size: 13px;
    font-weight: 600;
    color: var(--avd-text);
    transition: var(--eco-transition);
    font-family: inherit;
    outline: none;
}

.mortgage-input-group input:focus,
.mortgage-input-group select:focus {
    border-color: var(--eco-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.mortgage-input-group input:hover,
.mortgage-input-group select:hover {
    border-color: var(--avd-border-hover);
}

.mortgage-input-group select option {
    background: #1e293b;
    color: var(--avd-text);
}

body.light-mode .mortgage-input-group select option {
    background: #ffffff;
}

/* ════════════════════════════════════════════════════════════
   7. BUTTON PRIMARY
════════════════════════════════════════════════════════════ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--eco-gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--eco-transition);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 36px rgba(102, 126, 234, 0.55);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.99);
}

/* ════════════════════════════════════════════════════════════
   8. INFLATION RESULT DISPLAY
════════════════════════════════════════════════════════════ */
.inflation-result-display {
    background: var(--eco-gradient-soft);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--eco-radius-lg);
    padding: 32px;
    margin-top: 28px;
    position: relative;
    overflow: hidden;
    animation: inflationSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes inflationSlideIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.inflation-result-display::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.08) 0%, transparent 70%);
    animation: inflationRotate 15s linear infinite;
}

@keyframes inflationRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.inflation-result-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--avd-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.inflation-result-value {
    font-size: 3rem;
    font-weight: 900;
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 14px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.inflation-result-explanation {
    font-size: 13px;
    color: var(--avd-text-muted);
    line-height: 1.8;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.inflation-result-explanation strong {
    font-weight: 800;
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ════════════════════════════════════════════════════════════
   9. STAT CARDS
════════════════════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 26px;
}

.stat-card {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--eco-radius);
    padding: 22px;
    text-align: center;
    transition: var(--eco-transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--eco-gradient);
    transform: scaleX(0);
    transition: var(--eco-transition);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(102, 126, 234, 0.35);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.stat-label {
    font-size: 10px;
    color: var(--avd-text-dim);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.stat-sublabel {
    font-size: 11px;
    color: var(--avd-text-dim);
    font-weight: 600;
}

/* ════════════════════════════════════════════════════════════
   10. CHART WRAPPER
════════════════════════════════════════════════════════════ */
.chart-wrapper {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--eco-radius);
    padding: 26px;
    transition: var(--eco-transition);
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.chart-wrapper:hover {
    border-color: var(--avd-border-hover);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.14);
}

.chart {
    border-radius: 10px;
    min-height: 300px;
}

/* ════════════════════════════════════════════════════════════
   11. CPI CHART GRID
════════════════════════════════════════════════════════════ */
.cpi-chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 20px;
}

/* ════════════════════════════════════════════════════════════
   12. PROJECTION SCENARIOS
════════════════════════════════════════════════════════════ */
.projection-scenarios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 26px;
}

.scenario-card {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--eco-radius-lg);
    padding: 26px;
    transition: var(--eco-transition);
    position: relative;
    overflow: hidden;
}

.scenario-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    transform: scaleX(0);
    transition: var(--eco-transition);
}

.scenario-card.optimistic::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.scenario-card.base::before {
    background: var(--eco-gradient);
}

.scenario-card.pessimistic::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.scenario-card:hover::before {
    transform: scaleX(1);
}

.scenario-card:hover {
    transform: translateY(-6px);
    border-color: var(--avd-border-hover);
    box-shadow: 0 16px 48px rgba(102, 126, 234, 0.2);
}

.scenario-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.scenario-icon {
    font-size: 2rem;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--eco-gradient-soft);
    flex-shrink: 0;
}

.scenario-title {
    font-size: 1.1rem;
    font-weight: 800;
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.scenario-rate {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.scenario-card.optimistic .scenario-rate { color: var(--eco-success); }
.scenario-card.base .scenario-rate {
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.scenario-card.pessimistic .scenario-rate { color: var(--eco-danger); }

.scenario-description {
    font-size: 12px;
    color: var(--avd-text-muted);
    line-height: 1.7;
    font-weight: 500;
}

.scenario-impact {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--avd-border);
}

.scenario-impact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
    font-size: 12px;
}

.scenario-impact-label {
    color: var(--avd-text-muted);
    font-weight: 600;
}

.scenario-impact-value {
    font-weight: 800;
    color: var(--avd-text);
}

/* ════════════════════════════════════════════════════════════
   13. SALARY SIMULATOR
════════════════════════════════════════════════════════════ */
.salary-simulator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.salary-inputs-section {
    background: var(--eco-gradient-soft);
    border: 1px solid var(--avd-border);
    border-radius: var(--eco-radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.salary-result-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.salary-impact-card {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--eco-radius);
    padding: 22px;
    transition: var(--eco-transition);
}

.salary-impact-card:hover {
    border-color: var(--avd-border-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.salary-impact-label {
    font-size: 10px;
    color: var(--avd-text-dim);
    margin-bottom: 7px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.salary-impact-value {
    font-size: 1.8rem;
    font-weight: 900;
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.salary-impact-subtext {
    font-size: 11px;
    color: var(--avd-text-dim);
    margin-top: 5px;
    font-weight: 600;
}

/* ════════════════════════════════════════════════════════════
   14. ICONIC PRICES
════════════════════════════════════════════════════════════ */
.iconic-prices-grid,
#iconicPricesGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

.price-card {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--eco-radius);
    padding: 26px 22px;
    transition: var(--eco-transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 280px;
}

.price-card:hover {
    border-color: rgba(102, 126, 234, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(102, 126, 234, 0.2);
}

.price-icon {
    font-size: 3rem;
    margin-bottom: 14px;
}

.price-title {
    font-size: 1.2rem;
    font-weight: 800;
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    text-align: center;
}

.price-sector {
    font-size: 10px;
    color: var(--avd-text-dim);
    font-weight: 700;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.price-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 16px 0;
    width: 100%;
}

.price-year {
    flex: 1;
    background: var(--eco-gradient-soft);
    border: 1px solid var(--avd-border);
    padding: 12px 8px;
    border-radius: 10px;
    text-align: center;
    min-height: 86px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.price-arrow {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--eco-primary);
    flex-shrink: 0;
    align-self: center;
}

.price-year-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--avd-text-dim);
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.price-year-value {
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    word-break: break-word;
}

.price-change {
    font-size: 12px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 8px;
    text-align: center;
    margin-top: 10px;
    width: 100%;
}

.price-change.increase {
    background: rgba(239, 68, 68, 0.1);
    color: var(--eco-danger);
}

/* ════════════════════════════════════════════════════════════
   15. DECADE TABLE
════════════════════════════════════════════════════════════ */
.decade-table-container {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--eco-radius);
    padding: 24px;
    overflow-x: auto;
}

.decade-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.decade-table thead th {
    background: var(--eco-gradient-soft);
    color: var(--avd-text);
    font-weight: 800;
    padding: 14px 16px;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
}

.decade-table tbody tr {
    transition: var(--eco-transition);
}

.decade-table tbody tr:hover {
    background: var(--eco-gradient-soft);
}

.decade-table tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--avd-border);
    font-size: 12px;
    font-weight: 600;
    color: var(--avd-text-muted);
}

.decade-table tbody td:first-child {
    font-weight: 800;
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.decade-rate {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
}

.decade-rate.low    { background: rgba(16, 185, 129, 0.1); color: var(--eco-success); }
.decade-rate.medium { background: rgba(245, 158, 11, 0.1); color: var(--eco-warning); }
.decade-rate.high   { background: rgba(239, 68, 68, 0.1);  color: var(--eco-danger);  }

/* ════════════════════════════════════════════════════════════
   16. PROTECTION ASSETS GRID
════════════════════════════════════════════════════════════ */
.protection-assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.asset-card {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--eco-radius-lg);
    padding: 28px;
    transition: var(--eco-transition);
    position: relative;
    overflow: hidden;
}

.asset-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--eco-gradient);
    transform: scaleX(0);
    transition: var(--eco-transition);
}

.asset-card:hover::before {
    transform: scaleX(1);
}

.asset-card:hover {
    transform: translateY(-6px);
    border-color: rgba(102, 126, 234, 0.35);
    box-shadow: 0 16px 48px rgba(102, 126, 234, 0.2);
}

.asset-icon {
    font-size: 2.5rem;
    margin-bottom: 14px;
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    display: block;
}

.asset-name {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.asset-description {
    font-size: 12px;
    color: var(--avd-text-muted);
    line-height: 1.7;
    margin-bottom: 18px;
    font-weight: 500;
}

.asset-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.asset-metric {
    background: var(--eco-gradient-soft);
    border: 1px solid var(--avd-border);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.asset-metric-label {
    font-size: 9px;
    color: var(--avd-text-dim);
    margin-bottom: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.asset-metric-value {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--avd-text);
}

/* ════════════════════════════════════════════════════════════
   17. HEATMAP
════════════════════════════════════════════════════════════ */
.heatmap-container {
    background: var(--avd-card);
    border: 1px solid var(--avd-border);
    border-radius: var(--eco-radius);
    padding: 26px;
    overflow-x: auto;
}

.heatmap-grid {
    display: grid;
    grid-template-columns: auto repeat(10, 1fr);
    gap: 4px;
    min-width: 700px;
}

.heatmap-header {
    font-size: 11px;
    font-weight: 800;
    color: var(--avd-text-muted);
    padding: 10px;
    text-align: center;
    text-transform: uppercase;
}

.heatmap-year-label {
    font-size: 12px;
    font-weight: 800;
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 10px;
    text-align: right;
}

.heatmap-cell {
    aspect-ratio: 1;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    transition: var(--eco-transition);
}

.heatmap-cell:hover {
    transform: scale(1.12);
    z-index: 10;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.heatmap-cell.low      { background: linear-gradient(135deg, #10b981, #059669); }
.heatmap-cell.medium   { background: linear-gradient(135deg, #f59e0b, #d97706); }
.heatmap-cell.high     { background: linear-gradient(135deg, #ef4444, #dc2626); }
.heatmap-cell.very-high { background: linear-gradient(135deg, #7f1d1d, #450a0a); }

.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.heatmap-legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--avd-text-muted);
}

.heatmap-legend-color {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   18. MODALS (classes conservées pour inflation-calculator.js)
════════════════════════════════════════════════════════════ */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    animation: inflationFadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes inflationFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-content {
    background: #1a2235;
    border: 1px solid var(--avd-border);
    border-radius: var(--eco-radius-lg);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    animation: inflationSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-mode .modal-content {
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

@keyframes inflationSlideUp {
    from { opacity: 0; transform: translateY(36px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 26px;
    border-bottom: 1px solid var(--avd-border);
    background: var(--eco-gradient-soft);
}

.modal-header h2 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-header h2 i {
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: var(--avd-input-bg);
    border: 1px solid var(--avd-border);
    color: var(--avd-text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--eco-transition);
    font-family: inherit;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.12);
    color: var(--eco-danger);
    border-color: rgba(239, 68, 68, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 26px;
}

.modal-body h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 12px;
    margin-top: 20px;
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-body h3:first-child { margin-top: 0; }

.modal-body p {
    font-size: 13px;
    line-height: 1.8;
    color: var(--avd-text-muted);
    margin-bottom: 14px;
}

.modal-body ul {
    margin-left: 18px;
    margin-bottom: 14px;
}

.modal-body li {
    font-size: 13px;
    line-height: 1.8;
    color: var(--avd-text-muted);
    margin-bottom: 6px;
}

.modal-body strong {
    font-weight: 800;
    color: var(--avd-text);
}

.modal-body code {
    background: var(--eco-gradient-soft);
    border: 1px solid var(--avd-border);
    padding: 2px 7px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--avd-text);
}

/* ════════════════════════════════════════════════════════════
   19. FOOTER
════════════════════════════════════════════════════════════ */
.eco-footer {
    text-align: center;
    padding: 20px;
    color: var(--avd-text-dim);
    font-size: 12px;
    font-weight: 600;
    border-top: 1px solid var(--avd-border);
    margin-top: 8px;
}

.eco-footer i {
    color: var(--eco-primary);
    margin-right: 6px;
}

/* ════════════════════════════════════════════════════════════
   20. LIGHT MODE ADJUSTMENTS
════════════════════════════════════════════════════════════ */
body.light-mode .eco-section              { box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05); }
body.light-mode .inflation-calculator-container { box-shadow: 0 1px 5px rgba(0, 0, 0, 0.04); }
body.light-mode .chart-wrapper            { box-shadow: 0 1px 5px rgba(0, 0, 0, 0.04); }
body.light-mode .scenario-card            { box-shadow: 0 1px 5px rgba(0, 0, 0, 0.04); }
body.light-mode .asset-card               { box-shadow: 0 1px 5px rgba(0, 0, 0, 0.04); }
body.light-mode .price-card               { box-shadow: 0 1px 5px rgba(0, 0, 0, 0.04); }
body.light-mode .decade-table-container   { box-shadow: 0 1px 5px rgba(0, 0, 0, 0.04); }
body.light-mode .heatmap-container        { box-shadow: 0 1px 5px rgba(0, 0, 0, 0.04); }
body.light-mode .mortgage-input-group select option { background: #ffffff; }
body.light-mode .modal-content            { border-color: rgba(0, 0, 0, 0.08); }
body.light-mode .heatmap-legend-item      { color: #475569; }

/* ════════════════════════════════════════════════════════════
   21. RESPONSIVE
════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .cpi-chart-grid { grid-template-columns: 1fr; }
    .salary-simulator-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
    .projection-scenarios { grid-template-columns: repeat(2, 1fr); }
    .protection-assets-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    #avDriveContent { padding: 14px; }

    .eco-section { padding: 18px 14px; }

    .inflation-calculator-container { padding: 20px; }

    .inflation-inputs { grid-template-columns: 1fr; }

    .inflation-result-value { font-size: 2.2rem; }

    .stats-grid { grid-template-columns: 1fr; }

    .cpi-chart-grid { grid-template-columns: 1fr; }

    .salary-simulator-grid { grid-template-columns: 1fr; }

    .projection-scenarios { grid-template-columns: 1fr; }

    .protection-assets-grid { grid-template-columns: 1fr; }

    .iconic-prices-grid,
    #iconicPricesGrid { grid-template-columns: 1fr; }

    .price-card { min-width: unset; }

    .decade-table-container { padding: 14px; }

    .decade-table thead th,
    .decade-table tbody td { padding: 10px 8px; font-size: 11px; }

    .modal-content { width: 95%; }

    .modal-body { padding: 18px; }

    .section-header-with-info { flex-wrap: wrap; }

    .chart { min-height: 300px !important; }
}

@media (max-width: 480px) {
    .section-title { font-size: 1.1rem; }

    .btn-primary { padding: 12px 20px; font-size: 13px; }

    .inflation-result-display { padding: 22px; }

    .inflation-result-value { font-size: 1.8rem; }

    .price-comparison { gap: 6px; }

    .price-year-value { font-size: 1.3rem; }

    .heatmap-grid { font-size: 10px; gap: 3px; }

    .chart { min-height: 260px !important; }
}

/* ════════════════════════════════════════════════════════════
   22. ACCESSIBILITY — Reduced Motion
════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}