:root {
    --primary: #1095c1;
    --primary-hover: #0d7b9e;
    --card-bg: #1e2530; 
    --card-border: #2d3748;
    --success: #4caf50;
    --danger: #e53935;
    --spacing-tight: 0.5rem;
}

/* --- GLOBAL & LAYOUT --- */
body > main { padding-top: 1rem; }

/* COMPRESSED HEADERS */
h1, h2, h3, h4 { margin-bottom: var(--spacing-tight); }
section { margin-bottom: 2rem; }

/* Compact Sections for Calculator */
.compact-section {
    padding: 1rem;
    border-radius: 8px;
    background: var(--card-background-color);
    margin-bottom: 1rem;
}
.compact-header {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

/* --- COMPONENTS --- */
.ad-slot {
    background: #111; min-height: 100px; margin: 1rem 0;
    display: flex; align-items: center; justify-content: center;
    color: #444; border: 1px dashed #333; border-radius: 4px; font-size: 0.8rem;
}

.result-card {
    padding: 1rem; /* Reduced padding */
    border-radius: 8px;
    background: var(--card-background-color);
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.metric-big { font-size: 1.8rem; font-weight: 800; line-height: 1.1; }

/* --- FORMS IN DETAILS PAGES --- */
.details-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
    background: #151920;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    margin-bottom: 1.5rem;
}
.details-form-grid label {
    font-size: 0.8rem;
    margin-bottom: 0;
    color: #aaa;
}
.details-form-grid input, .details-form-grid select {
    margin-bottom: 0;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    height: auto;
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
    align-items: center;
}

/* --- RESPONSIVE --- */
@media (min-width: 992px) {
    .calculator-layout {
        display: grid;
        grid-template-columns: 320px 1fr; /* Narrower left col */
        gap: 2rem;
        align-items: start;
    }
    .calculator-results { position: sticky; top: 1rem; }
    .calculator-results .grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    
    /* Side-by-side for Details Pages */
    .details-layout {
        display: grid;
        grid-template-columns: 300px 1fr;
        gap: 2rem;
        align-items: start;
    }
}

@media (max-width: 991px) {
    .mobile-sticky-result {
        display: flex; justify-content: space-between; align-items: center;
        position: fixed; bottom: 0; left: 0; right: 0;
        background: #19202b; border-top: 1px solid var(--primary);
        padding: 0.75rem 1rem; z-index: 999;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
    }
    body { padding-bottom: 70px; }
}

/* Utility */
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.touch-target { min-height: 40px; }