/* ================================================================
   ARCHLYTIC — Construction Cost Intelligence
   Premium Dark Mode Design System v2.0
   ================================================================ */

:root {
    /* Core Palette — Deep Navy + Gold */
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1629;
    --bg-card: rgba(15, 22, 41, 0.9);
    --bg-glass: rgba(15, 22, 41, 0.7);
    --bg-elevated: rgba(25, 35, 60, 0.8);
    --bg-input: rgba(20, 28, 50, 0.9);

    /* Gold Spectrum */
    --gold: #c9a84c;
    --gold-light: #e0c76a;
    --gold-muted: rgba(201, 168, 76, 0.3);
    --gold-subtle: rgba(201, 168, 76, 0.08);
    --gold-glow: rgba(201, 168, 76, 0.25);

    /* Status Colors */
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-on-gold: #0a0e1a;

    /* Borders */
    --border: rgba(201, 168, 76, 0.12);
    --border-hover: rgba(201, 168, 76, 0.35);
    --border-glass: rgba(201, 168, 76, 0.08);

    /* Shadows & Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-gold: 0 0 40px rgba(201, 168, 76, 0.1);
    --glass-blur: blur(20px);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* ================================================================
   RESET & BASE
   ================================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Subtle background pattern */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 5%, rgba(201, 168, 76, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 80%, rgba(201, 168, 76, 0.04) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

@keyframes pulse-update {
    0% {
        transform: scale(1);
        color: var(--gold);
    }

    50% {
        transform: scale(1.02);
        color: var(--gold-light);
        text-shadow: 0 0 10px var(--gold-glow);
    }

    100% {
        transform: scale(1);
        color: var(--text-primary);
    }
}

/* Beta Banner Styles */
.header-status-banner {
    background: rgba(193, 155, 61, 0.1);
    border: 1px solid rgba(193, 155, 61, 0.3);
    padding: 6px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    animation: slideInDown 0.5s ease-out;
}

.status-text {
    color: #c19b3d;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c19b3d;
}

.status-dot.pulse {
    box-shadow: 0 0 0 rgba(193, 155, 61, 0.4);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(193, 155, 61, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(193, 155, 61, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(193, 155, 61, 0);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

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

.updating {
    animation: pulse-update 0.8s ease-out;
}

h1,
h2,
h3,
h4,
.brand-name,
.metric strong,
.main-total {
    font-family: 'Outfit', 'Inter', sans-serif;
    transition: color 0.3s ease;
    letter-spacing: -0.02em;
}

/* ================================================================
   HEADER
   ================================================================ */
.main-header {
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 0.75rem 2rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 44px;
    filter: drop-shadow(0 0 8px rgba(201, 168, 76, 0.2));
    transition: var(--transition);
}

.logo:hover {
    filter: drop-shadow(0 0 12px rgba(201, 168, 76, 0.4));
}

.brand-info {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: 0.15em;
}

.tagline {
    color: var(--gold);
    font-weight: 500;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 2px;
}

.header-meta {
    text-align: right;
}

.sub-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

#live-indicators {
    background: rgba(201, 168, 76, 0.08) !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    padding: 5px 12px !important;
    font-size: 0.72rem !important;
    color: var(--gold) !important;
}

/* ================================================================
   APP LAYOUT
   ================================================================ */
.app-container {
    display: grid;
    grid-template-columns: 360px 1fr;
    min-height: calc(100vh - 70px);
    max-width: 1600px;
    margin: 0 auto;
    gap: 1.5rem;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-card);
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    position: sticky;
    top: 85px;
}

/* Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--gold-muted);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

.sidebar h2 {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
}

.sidebar h2::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--gold);
    border-radius: 2px;
}

.input-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-glass);
}

.input-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.input-section h3 {
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--gold);
    letter-spacing: 0.15em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-section h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--gold-muted), transparent);
}

.input-group {
    margin-bottom: 1rem;
    position: relative;
}

.input-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.input-group select,
.input-group input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    font-family: 'Inter', sans-serif;
}

.input-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23c9a84c'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.9em;
    padding-right: 2.5rem;
}

.input-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.input-group select:hover,
.input-group input:hover {
    border-color: var(--border-hover);
}

.input-group select:focus,
.input-group input:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 3px var(--gold-glow);
}

.sub-label {
    display: block;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* ================================================================
   MAIN CONTENT
   ================================================================ */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.top-bar {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-pdf {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--text-on-gold);
    padding: 0.65rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(201, 168, 76, 0.25);
}

.btn-pdf::before {
    content: '';
    width: 14px;
    height: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230a0e1a'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4'%3E%3C/path%3E%3C/svg%3E") no-repeat center/contain;
}

.btn-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201, 168, 76, 0.4);
    filter: brightness(1.1);
}

.btn-pdf:active {
    transform: translateY(0);
}

.btn-baseline {
    background: transparent;
    color: var(--gold);
    padding: 0.65rem 1.25rem;
    border: 1px solid var(--gold-muted);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.03em;
    margin-right: 0.5rem;
}

.btn-baseline:hover {
    background: var(--gold-subtle);
    border-color: var(--gold);
}

#live-indicators {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

/* ================================================================
   DASHBOARD GRID & CARDS
   ================================================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    width: 100%;
}

.result-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    transition: var(--transition);
    animation: fadeIn 0.5s ease-out forwards;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-muted), transparent);
    opacity: 0;
    transition: var(--transition);
}

.result-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md), var(--shadow-gold);
    transform: translateY(-2px);
}

.result-card:hover::before {
    opacity: 1;
}

.result-card.full-width {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(20, 30, 55, 0.9) 100%);
}

.result-card h3 {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.result-card h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--gold);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ================================================================
   REFERENCE ESTIMATE — Hero Card
   ================================================================ */
.main-total {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0.75rem 0;
    letter-spacing: -2px;
    line-height: 1;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.cost-metrics {
    display: flex;
    gap: 3rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric span {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

.metric strong {
    font-size: 1.35rem;
    color: var(--text-primary);
}

/* ================================================================
   COLLAPSIBLES
   ================================================================ */
.collapsible {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    overflow: hidden;
    background: var(--bg-elevated);
    transition: var(--transition);
}

.collapsible:hover {
    border-color: var(--border-hover);
}

.collapsible-header {
    background: rgba(201, 168, 76, 0.04);
    padding: 0.85rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: var(--transition);
    letter-spacing: 0.02em;
}

.collapsible-header:hover {
    background: rgba(201, 168, 76, 0.08);
}

.collapsible-header::after {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23c9a84c'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    transition: var(--transition);
    flex-shrink: 0;
}

.collapsed .collapsible-header::after {
    transform: rotate(-90deg);
}

.collapsible-content {
    max-height: 1200px;
    padding: 1.25rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

.collapsed .collapsible-content {
    max-height: 0;
    padding: 0 1.25rem;
    opacity: 0;
}

/* ================================================================
   CARD SELECTORS (Quality Level, Project Stage)
   ================================================================ */
.card-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.card-option {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.card-option:hover {
    border-color: var(--border-hover);
    background: rgba(201, 168, 76, 0.05);
}

.card-option.active {
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.1);
    box-shadow: 0 0 12px rgba(201, 168, 76, 0.1);
}

.card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.card-option.active .card-title {
    color: var(--gold);
}

.card-desc {
    font-size: 0.62rem;
    color: var(--text-muted);
    line-height: 1.2;
}

/* ================================================================
   RANGE SLIDERS (Site, Schedule, Technical, Regulatory)
   ================================================================ */
.slider-group {
    margin-bottom: 1.25rem !important;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.slider-header label {
    margin-bottom: 0 !important;
}

.slider-value {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.02em;
}

.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--gold-muted), var(--gold));
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    border: none !important;
    padding: 0 !important;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 3px solid var(--gold);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 0 8px rgba(201, 168, 76, 0.3);
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(201, 168, 76, 0.5);
}

.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 3px solid var(--gold);
    cursor: pointer;
}

.slider-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.3rem;
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.slider-tooltip {
    margin-top: 0.4rem;
    padding: 0.45rem 0.65rem;
    background: rgba(201, 168, 76, 0.06);
    border-radius: 6px;
    font-size: 0.68rem;
    color: var(--gold);
    line-height: 1.4;
    border-left: 3px solid var(--gold-muted);
}

/* ================================================================
   COST RANGE DISPLAYS
   ================================================================ */
.range-display {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.range-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
    display: block;
    margin-bottom: 0.35rem;
}

.range-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
}

.formula-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    padding-left: 0.75rem;
    border-left: 2px solid var(--border);
}

/* ================================================================
   CRITICAL SCENARIO CARD
   ================================================================ */
.critical-scenario-card {
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
}

/* ================================================================
   MULTIPLIER CHIPS
   ================================================================ */
.multipliers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.6rem;
}

.multiplier-chip {
    background: var(--bg-primary);
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid var(--border);
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    text-align: center;
}

.multiplier-chip:hover {
    border-color: var(--gold);
    background: var(--gold-subtle);
}

.multiplier-chip strong {
    color: var(--gold);
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
}

/* ================================================================
   BREAKDOWN ROWS
   ================================================================ */
.breakdown-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(201, 168, 76, 0.06);
    align-items: center;
}

.breakdown-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.breakdown-row span {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.breakdown-row strong {
    color: var(--text-primary);
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
}

/* Formula blocks */
.formula {
    background: var(--bg-primary);
    color: var(--gold);
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    font-size: 0.75rem;
    margin: 0.75rem 0;
    display: block;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    letter-spacing: 0.03em;
}

.formula::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--gold);
}

/* ================================================================
   CHARTS
   ================================================================ */
.chart-box {
    position: relative;
    height: 280px;
    width: 100%;
}

/* ================================================================
   HIGHLIGHT & STATUS
   ================================================================ */
.highlight-amber {
    background: rgba(201, 168, 76, 0.08) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(201, 168, 76, 0.2) !important;
    padding: 10px !important;
    border-radius: var(--radius-sm);
    margin-top: 8px;
}

.result-card p {
    word-break: break-word;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* ================================================================
   FOOTER
   ================================================================ */
.main-footer {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 3rem 5% 1.5rem;
    text-align: center;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--border);
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.footer-content h4 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1rem;
    opacity: 0.9;
    letter-spacing: 0.1em;
}

.footer-content p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

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

    100% {
        background-position: 200% center;
    }
}

@keyframes pulseGold {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.0);
    }

    50% {
        box-shadow: 0 0 20px rgba(201, 168, 76, 0.15);
    }
}

/* ================================================================
   P80 RANGE DISPLAY
   ================================================================ */
.ref-range {
    display: block;
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.ref-tag {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 0.35rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    -webkit-text-fill-color: var(--text-muted);
}

/* ================================================================
   ARA SCORE CARD
   ================================================================ */
.ara-card {
    border-left: 3px solid var(--gold) !important;
}

.ara-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0.5rem 0;
}

.ara-gauge-wrap {
    flex-shrink: 0;
}

.ara-gauge {
    width: 130px;
    height: 130px;
}

.gauge-bg {
    fill: none;
    stroke: rgba(201, 168, 76, 0.1);
    stroke-width: 8;
}

.gauge-fill {
    fill: none;
    stroke: var(--gold);
    stroke-width: 8;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1),
        stroke 0.6s ease;
}

.gauge-text {
    font-size: 1.8rem;
    font-weight: 800;
    fill: var(--gold);
    font-family: 'Outfit', sans-serif;
}

.gauge-label {
    font-size: 0.55rem;
    fill: var(--text-muted);
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ara-info {
    flex: 1;
}

.ara-score-display {
    display: flex;
    align-items: baseline;
    gap: 0.15rem;
    margin-bottom: 0.5rem;
}

.ara-score-number {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--gold);
    line-height: 1;
}

.ara-score-max {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-muted);
}

.ara-level {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: var(--gold-subtle);
    border-radius: 6px;
    display: inline-block;
}

.ara-description {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 0.5rem;
}

/* ================================================================
   SYNERGY PANEL
   ================================================================ */
.synergy-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.synergy-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.synergy-item:hover {
    border-color: var(--border-hover);
}

.synergy-idx {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-subtle);
    border: 1px solid var(--gold-muted);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gold);
    flex-shrink: 0;
}

.synergy-name {
    flex: 1;
    font-size: 0.82rem;
    color: var(--text-primary);
    font-weight: 500;
}

.synergy-impact {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--danger);
    font-family: 'Outfit', sans-serif;
    min-width: 45px;
    text-align: right;
}

.synergy-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(201, 168, 76, 0.06);
    border-left: 3px solid var(--gold);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 0.75rem;
}

.synergy-total span {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.synergy-total strong {
    font-size: 1.2rem;
    color: var(--gold);
    font-family: 'Outfit', sans-serif;
}

.synergy-explain {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.5;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .sidebar {
        position: static;
        max-height: none;
        margin-bottom: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .main-total {
        font-size: 2.5rem;
    }

    .cost-metrics {
        gap: 2rem;
    }
}

/* Climate Data Source Badge */
.data-source-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.badge-label {
    color: var(--text-muted);
    font-weight: 500;
}

.data-source-live {
    color: var(--success);
    font-weight: 600;
}

.data-source-live::before {
    content: '🛰️ ';
}

.data-source-static {
    color: var(--text-muted);
    font-weight: 500;
}

@media (max-width: 640px) {
    .header-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-meta {
        text-align: center;
    }

    .top-bar {
        flex-direction: column;
    }

    .main-total {
        font-size: 2rem;
    }
}