/* -------------------------------------------------------------
   🎨 Premium "Aureus Gold" Visual System — MetricVault Investment
   ------------------------------------------------------------- */

/* --- 1. Global Reset & Variables --- */
:root {
    --bg-dark: #03050a;
    --bg-card: rgba(10, 16, 30, 0.7);
    --border-glass: rgba(255, 255, 255, 0.06);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    /* Aureus Wealth Accent Scheme */
    --accent-gold: #f59e0b; 
    --accent-gold-glow: rgba(245, 158, 11, 0.35);
    
    --accent-amber: #d97706;
    --accent-amber-glow: rgba(217, 119, 6, 0.3);
    
    --accent-contributions: #fbbf24;
    --accent-contributions-glow: rgba(251, 191, 36, 0.25);
    
    --accent-inflation: #ef4444; /* Wealth erode */
    --accent-tax: #f43f5e; /* SARS PAYE */
    --accent-success: #10b981; /* Interest profit */
    
    --font-outfit: 'Outfit', sans-serif;
    --font-inter: 'Inter', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-inter);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- 2. Ambient Floating Mesh Backdrops --- */
.bg-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}
.glow-amber {
    top: 5%;
    left: -180px;
    background-color: var(--accent-amber);
}
.glow-gold {
    bottom: 15%;
    right: -180px;
    background-color: var(--accent-gold);
}
.glow-warm {
    top: 50%;
    left: 45%;
    width: 400px;
    height: 400px;
    background-color: #b45309;
    opacity: 0.04;
}

/* --- 3. Glassmorphic Panels --- */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
}
.glass-panel:hover {
    border-color: rgba(245, 158, 11, 0.15);
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.04);
}

/* --- 4. Premium App Header --- */
.app-header {
    background: rgba(3, 5, 10, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glass);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.app-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-logo {
    font-size: 32px;
    text-shadow: 0 0 15px var(--accent-gold-glow);
}
.brand-text h1 {
    font-family: var(--font-outfit);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}
.brand-text .accent {
    color: var(--accent-gold);
    text-shadow: 0 0 10px var(--accent-gold-glow);
}
.brand-text p {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

/* --- 5. Custom Ad Slots --- */
.ad-slot {
    display: none; /* Hidden by default to hide raw placeholder text. Unhide if manual ad scripts are injected. */
    background: rgba(255, 255, 255, 0.015);
    border: 1px dashed rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.ad-placeholder {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.12);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px;
}
.ad-leaderboard {
    width: 728px;
    height: 90px;
}
.ad-banner {
    width: 100%;
    max-width: 970px;
    height: 250px;
    margin: 40px auto;
}
.ad-square {
    width: 300px;
    height: 250px;
    margin-top: 24px;
}

/* --- 6. Breadcrumb --- */
.breadcrumb {
    margin: 24px 0;
}
.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-smooth);
    display: inline-block;
}
.back-link:hover {
    color: var(--accent-gold);
    transform: translateX(-4px);
}

/* --- 7. Workspace Wrapper --- */
.calculator-wrapper {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 32px;
    margin-bottom: 40px;
    align-items: start;
}

/* --- 8. Inputs & Range Customization --- */
.panel-header {
    margin-bottom: 28px;
}
.panel-header h2 {
    font-family: var(--font-outfit);
    font-size: 26px;
    font-weight: 700;
}
.panel-header .subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.5;
}

.calc-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 28px;
}
.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 14px 8px;
    font-family: var(--font-outfit);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}
.tab-btn:hover {
    color: var(--text-primary);
}
.tab-btn.active {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-gold);
    background: linear-gradient(to top, rgba(245, 158, 11, 0.03), transparent);
}

.input-group {
    margin-bottom: 24px;
}
.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.input-group label {
    font-family: var(--font-outfit);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.input-numeric {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 6px 12px;
    transition: var(--transition-smooth);
}
.input-numeric:focus-within {
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}
.currency-symbol, .suffix {
    font-family: var(--font-outfit);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
}
.input-numeric input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-outfit);
    font-size: 16px;
    font-weight: 700;
    width: 90px;
    text-align: right;
    padding-right: 2px;
}
/* Spinner suppression */
.input-numeric input::-webkit-outer-spin-button,
.input-numeric input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.input-numeric input[type=number] {
    -moz-appearance: textfield;
}

.custom-range {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    outline: none;
    transition: var(--transition-smooth);
}
.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-primary);
    border: 2px solid var(--accent-gold);
    box-shadow: 0 0 10px var(--accent-gold-glow);
    cursor: pointer;
    transition: var(--transition-smooth);
}
.custom-range::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    background: var(--accent-gold);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 500;
}

.glass-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    font-family: var(--font-outfit);
    font-size: 14px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-top: 8px;
}
.glass-select:focus {
    border-color: var(--accent-gold);
}
.glass-select option {
    background: var(--bg-dark);
    color: var(--text-primary);
}

.radio-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}
.tile {
    cursor: pointer;
    text-align: center;
}
.tile input {
    display: none;
}
.tile span {
    display: block;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 10px 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}
.tile input:checked + span {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--accent-gold);
    color: var(--text-primary);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

/* Collapsible Panel for Tax/Inflation Drawer */
.expandable-panel {
    border: 1px solid var(--border-glass);
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 28px;
    margin-bottom: 12px;
    transition: var(--transition-smooth);
}
.expandable-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.expandable-header h4 {
    font-family: var(--font-outfit);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}
.expandable-header .chevron {
    font-size: 11px;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}
.expandable-header:hover h4 {
    color: var(--accent-gold);
}
.expandable-panel.open {
    border-color: rgba(245, 158, 11, 0.2);
}
.expandable-panel.open .chevron {
    transform: rotate(180deg);
    color: var(--accent-gold);
}
.expandable-content {
    transition: var(--transition-smooth);
    overflow: hidden;
}
.expandable-content.hidden {
    display: none !important;
}
.input-caption {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.4;
}

/* --- 9. Affiliate Card --- */
.affiliate-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.04), rgba(10, 20, 38, 0.85));
    border-color: rgba(245, 158, 11, 0.15);
    margin-top: 36px;
    position: relative;
    overflow: hidden;
}
.affiliate-card .tag {
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--accent-gold);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-gold);
}
.affiliate-card h4 {
    font-family: var(--font-outfit);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}
.affiliate-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 18px;
}
.cta-btn {
    display: block;
    text-align: center;
    background: var(--text-primary);
    color: var(--bg-dark);
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-outfit);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.08);
}
.cta-btn:hover {
    background: var(--accent-gold);
    color: var(--text-primary);
    box-shadow: 0 4px 20px var(--accent-gold-glow);
    transform: translateY(-2px);
}

/* --- 10. Output & Visual Analytics --- */
.results-pane h3 {
    font-family: var(--font-outfit);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
}

.chart-container {
    position: relative;
    width: 100%;
    margin-bottom: 28px;
}
.chart-summary-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}
.overlay-title {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}
.overlay-value {
    display: block;
    font-family: var(--font-outfit);
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-gold);
    margin-top: 2px;
}

.result-highlight-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}
.result-highlight-card .label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.result-highlight-card .value {
    display: block;
    font-family: var(--font-outfit);
    font-size: 32px;
    font-weight: 800;
    color: var(--accent-gold);
    margin-top: 4px;
}
.gold-glow {
    color: var(--accent-gold) !important;
    text-shadow: 0 0 20px var(--accent-gold-glow);
}
.result-highlight-card .caption {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.4;
}

.breakdown-list {
    transition: var(--transition-smooth);
}
.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.item-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}
.bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.color-initial .bullet { background-color: var(--text-secondary); }
.color-contributions .bullet { background-color: var(--accent-contributions); }
.color-interest .bullet { background-color: var(--accent-success); }
.color-tax .bullet { background-color: var(--accent-tax); }
.color-inflation .bullet { background-color: var(--accent-inflation); }

.item-value {
    font-family: var(--font-outfit);
    font-size: 16px;
    font-weight: 700;
}
.item-value.warning { color: var(--accent-inflation); }
.item-value.success { color: var(--accent-success); }

.breakdown-item.sub-item {
    border-top: 1px solid var(--border-glass);
    border-bottom: none;
    margin-top: 8px;
    padding-top: 16px;
}
.breakdown-item.sub-item .item-label {
    font-weight: 600;
    color: var(--text-primary);
}
.breakdown-item.sub-item .item-value.highlight {
    font-size: 18px;
    color: var(--accent-gold);
    text-shadow: 0 0 10px var(--accent-gold-glow);
}

/* --- 11. Bank Rates Dashboard Layout (Tab 2 Active) --- */
.bank-rate-grid h4 {
    font-family: var(--font-outfit);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}
.bank-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 16px;
}
.bank-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 14px 18px;
    transition: var(--transition-smooth);
}
.bank-row:hover {
    border-color: rgba(245, 158, 11, 0.2);
    background: rgba(245, 158, 11, 0.02);
}
.bank-info {
    display: flex;
    align-items: center;
    gap: 14px;
}
.logo-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-outfit);
    font-weight: 800;
    font-size: 16px;
    color: #ffffff;
}
/* Bank Brand Colors for circles */
.logo-circle.capitec { background-color: #ff4e00; }
.logo-circle.tymebank { background-color: #000000; border: 2px solid #ffcd00; color: #ffcd00; }
.logo-circle.fnb { background-color: #008080; }
.logo-circle.standardbank { background-color: #0033a0; }
.logo-circle.nedbank { background-color: #006338; }
.logo-circle.absa { background-color: #ab2328; }

.bank-name {
    display: block;
    font-family: var(--font-outfit);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.rate-badge {
    font-size: 11px;
    color: var(--accent-gold);
    font-weight: 700;
}
.payout-amount {
    font-family: var(--font-outfit);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}
.footnote {
    font-size: 10px;
    color: var(--text-secondary);
    line-height: 1.4;
    font-style: italic;
}

/* Warnings and Alerts */
.custom-alert {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border-radius: 16px;
    padding: 20px;
    margin-top: 24px;
    border: 1px solid transparent;
}
.custom-alert.info {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}
.alert-icon { font-size: 22px; }
.alert-text strong {
    font-family: var(--font-outfit);
    font-size: 15px;
    color: var(--text-primary);
    display: block;
}
.alert-text p, .alert-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- 12. Explore Grid System --- */
.explore-section {
    margin-top: 40px;
    margin-bottom: 24px;
}
.explore-section h2 {
    font-family: var(--font-outfit);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}
.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.explore-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    transition: var(--transition-smooth);
}
.explore-card:hover {
    transform: translateY(-2px);
}
.explore-card.bond:hover { border-color: rgba(6, 182, 212, 0.2); box-shadow: 0 10px 30px rgba(6, 182, 212, 0.03); }
.explore-card.car:hover { border-color: rgba(255, 255, 255, 0.15); box-shadow: 0 10px 30px rgba(255, 255, 255, 0.03); }
.explore-card.tax:hover { border-color: rgba(16, 185, 129, 0.2); box-shadow: 0 10px 30px rgba(16, 185, 129, 0.03); }

.explore-card h3 {
    font-family: var(--font-outfit);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}
.explore-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 6px;
}
.explore-card a {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    padding: 10px;
    font-family: var(--font-outfit);
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    background: var(--text-primary);
    color: #07090e;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(255,255,255,0.05);
}
.explore-card a:hover {
    background: var(--accent-gold);
    color: var(--text-primary);
    box-shadow: 0 4px 20px var(--accent-gold-glow);
}

/* --- 13. SEO FAQs --- */
.faq-section {
    margin-top: 40px;
    margin-bottom: 60px;
}
.faq-section h2 {
    font-family: var(--font-outfit);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}
.faq-accordion details {
    border-bottom: 1px solid var(--border-glass);
    padding: 18px 0;
    cursor: pointer;
}
.faq-accordion details[open] {
    border-bottom-color: rgba(245, 158, 11, 0.2);
}
.faq-accordion summary {
    font-family: var(--font-outfit);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-accordion summary::-webkit-details-marker { display: none; }
.faq-accordion summary::after {
    content: "+";
    font-size: 20px;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}
.faq-accordion details[open] summary::after {
    content: "−";
    color: var(--accent-gold);
}
.faq-accordion details p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 12px;
}

/* --- 14. Footer Architecture --- */
.app-footer {
    background: #020306;
    border-top: 1px solid var(--border-glass);
    padding: 48px 0 24px 0;
    font-size: 13px;
}
.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 32px;
}
.footer-brand { max-width: 400px; }
.footer-brand h3 {
    font-family: var(--font-outfit);
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
}
.footer-brand h3 .accent { color: var(--accent-gold); }
.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.6;
}
.footer-links {
    display: flex;
    gap: 24px;
}
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
}
.footer-links a:hover { color: var(--accent-gold); }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 11px;
}

/* --- 15. System Utilities & Responsiveness --- */
.hidden { display: none !important; }

@media (max-width: 992px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
    }
    .app-header .container {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    .ad-leaderboard {
        width: 100%;
        height: auto;
        min-height: 50px;
    }
    .ad-placeholder { padding: 12px; }
}

@media (max-width: 576px) {
    .radio-tiles {
        grid-template-columns: 1fr;
    }
    .term-tiles {
        grid-template-columns: repeat(3, 1fr);
    }
    .age-tiles {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        flex-direction: column;
        gap: 24px;
    }
}
