﻿/* =========================================
   INCOME PAGE — PREMIUM (SCOPED & FINAL)
========================================= */

#income-page {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    color: var(--text-primary);
}

    /* ================= HEADER ================= */
    #income-page .income-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #income-page h1 {
        font-size: 2rem;
        font-weight: 700;
        letter-spacing: -0.02em;
    }

    #income-page .subtitle {
        font-size: 0.95rem;
        color: var(--text-muted);
        margin-top: 0.25rem;
    }

    /* ================= PRIMARY BUTTON ================= */
    #income-page .btn-primary {
        border: none;
        padding: 0.6rem 1.1rem;
        border-radius: 999px;
        font-size: 0.85rem;
        font-weight: 600;
        color: white;
        background: linear-gradient(135deg, #6366f1, #4f46e5);
        box-shadow: 0 6px 18px rgba(99,102,241,0.35);
        cursor: pointer;
        transition: all 0.2s ease;
    }

        #income-page .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 28px rgba(99,102,241,0.45);
        }

    /* ================= GRID ================= */
    #income-page .income-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
        gap: 1.5rem;
    }

    /* ================= CARDS ================= */
    #income-page .card {
        background: var(--surface-elevated);
        border-radius: 18px;
        padding: 1.4rem;
        border: 1px solid var(--border);
        box-shadow: var(--shadow-soft);
        transition: all 0.25s ease;
        position: relative;
        overflow: hidden;
    }

        #income-page .card::after {
            content: "";
            position: absolute;
            inset: 0;
            opacity: 0;
            pointer-events: none;
            background: radial-gradient(circle at top, rgba(255,255,255,0.15), transparent 70%);
            transition: opacity 0.25s ease;
        }

        #income-page .card:hover::after {
            opacity: 1;
        }

        #income-page .card:hover {
            transform: translateY(-4px);
            box-shadow: 0 20px 45px rgba(0,0,0,0.2);
        }

    /* ================= CARD HEADER ================= */
    #income-page .card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.75rem;
    }

        #income-page .card-header h2 {
            font-size: 1.05rem;
            font-weight: 600;
        }

    /* ================= PILL ================= */
    #income-page .pill {
        padding: 0.25rem 0.7rem;
        border-radius: 999px;
        background: rgba(99,102,241,0.1);
        color: var(--primary);
        font-size: 0.8rem;
        font-weight: 500;
    }

    /* ================= FULL WIDTH ================= */
    #income-page .full-width {
        grid-column: 1 / -1;
    }

    /* =========================================
   TABLE
========================================= */

    #income-page .income-table-wrapper {
        border-radius: 16px;
        overflow: hidden;
        border: 1px solid var(--border);
        background: var(--surface-elevated);
    }

    #income-page .income-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.9rem;
    }

        #income-page .income-table thead {
            background: rgba(148,163,184,0.08);
        }

        #income-page .income-table th {
            text-align: left;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
            padding: 0.6rem 0.75rem;
        }

        #income-page .income-table td {
            padding: 0.7rem 0.75rem;
            border-top: 1px solid var(--border);
        }

        #income-page .income-table tbody tr {
            transition: background 0.2s ease;
        }

            #income-page .income-table tbody tr:hover {
                background: rgba(99,102,241,0.05);
            }

        #income-page .income-table td:nth-child(2) {
            font-weight: 600;
        }

    /* ================= ACTIONS ================= */
    #income-page .actions {
        text-align: right;
        position: relative;
        z-index: 2;
    }

    /* =========================================
   ICON BUTTONS
========================================= */

    #income-page .icon-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: var(--surface-elevated);
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.2s ease;
        position: relative;
        z-index: 3;
    }

        #income-page .icon-btn:hover {
            transform: translateY(-2px);
        }

        #income-page .icon-btn.edit:hover {
            background: #4f6df5;
            color: white;
            border-color: #4f6df5;
            box-shadow: 0 8px 18px rgba(79,109,245,0.45);
        }

        #income-page .icon-btn.danger:hover {
            background: #ef4444;
            color: white;
            border-color: #ef4444;
            box-shadow: 0 8px 18px rgba(239,68,68,0.45);
        }

        #income-page .icon-btn:active {
            transform: scale(0.95);
            box-shadow: none;
        }

/* =========================================
   ANIMATIONS
========================================= */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#income-page .card {
    animation: fadeUp 0.4s ease both;
}

    #income-page .card:nth-child(2) {
        animation-delay: 0.05s;
    }

    #income-page .card:nth-child(3) {
        animation-delay: 0.1s;
    }

/* =========================================
   DARK MODE
========================================= */

[data-theme="dark"] #income-page .card,
[data-theme="dark"] #income-page .income-table-wrapper {
    background: #18181b;
    border-color: #27272a;
}

[data-theme="dark"] #income-page .income-table thead {
    background: rgba(255,255,255,0.04);
}

[data-theme="dark"] #income-page .income-table tbody tr:hover {
    background: rgba(99,102,241,0.08);
}

[data-theme="dark"] #income-page .icon-btn {
    background: #18181b;
    border-color: #27272a;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 900px) {
    #income-page .income-grid {
        grid-template-columns: 1fr;
    }

    #income-page .full-width {
        grid-column: auto;
    }
}

/* =========================================
   PREMIUM MODAL SYSTEM (BASE)
========================================= */

.income-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(3px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

    .income-modal-overlay.visible {
        display: flex;
    }

.income-modal {
    background: var(--surface-elevated);
    border-radius: 16px;
    padding: 1.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    animation: fadeIn 0.25s ease;
    position: relative;
    z-index: 10000;
}

/* Space between header and body */
#createIncomeModal .modal-header {
    margin-bottom: 1.25rem;
}

/* Space between body and footer */
#createIncomeModal .modal-body {
    margin-bottom: 1.25rem;
}

    /* Space between form rows */
    #createIncomeModal .modal-body .form-group {
        margin-bottom: 1rem;
    }

        #createIncomeModal .modal-body .form-group:last-child {
            margin-bottom: 0;
        }

/* Space between Cancel and Save buttons */
#createIncomeModal .modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Space between header and body */
#editIncomeModal .modal-header {
    margin-bottom: 1.25rem;
}

/* Space between body and footer */
#editIncomeModal .modal-body {
    margin-bottom: 1.25rem;
}

    /* Space between form rows */
    #editIncomeModal .modal-body .form-group {
        margin-bottom: 1rem;
    }

        #editIncomeModal .modal-body .form-group:last-child {
            margin-bottom: 0;
        }

/* Space between Cancel and Save buttons */
#editIncomeModal .modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* =========================================
   PREMIUM INCOME ALLOCATION MODAL (MATCHED)
========================================= */

#income-allocation-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(3px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s ease-out;
}

    #income-allocation-modal.show {
        display: flex !important;
        opacity: 1;
    }

    #income-allocation-modal .modal-content {
        background: var(--surface-elevated);
        border-radius: 18px;
        padding: 2rem;
        width: 100%;
        max-width: 640px; /* ⭐ MEDIUM SIZE */
        box-shadow: 0 24px 60px rgba(0,0,0,0.28);
        animation: fadeIn 0.25s ease;
        position: relative;
        z-index: 10000;
        display: flex;
        flex-direction: column;
        gap: 1.5rem; /* ⭐ More breathing room */
    }


    /* ⭐ NEW: Spacing inside modal */
    #income-allocation-modal .form-group {
        margin-bottom: 0.75rem;
    }

    #income-allocation-modal h3 {
        margin-top: 0.5rem;
        margin-bottom: 0.75rem;
    }

    #income-allocation-modal table {
        margin-bottom: 1rem;
    }

        #income-allocation-modal table tr td {
            padding: 0.75rem 0.5rem;
        }

    #income-allocation-modal .modal-actions {
        margin-top: 0.5rem;
        gap: 0.75rem;
    }

    /* =========================================
   GLASSMORPHIC TABLE INSIDE ALLOCATION MODAL
========================================= */

    #income-allocation-modal table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 10px; /* spacing between rows */
        margin-bottom: 1rem;
        /* Glass background */
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(14px) saturate(180%);
        -webkit-backdrop-filter: blur(14px) saturate(180%);
        border-radius: 14px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.18);
    }

    #income-allocation-modal th {
        text-align: left;
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--text-muted);
        background: rgba(255, 255, 255, 0.08);
    }

    #income-allocation-modal tbody tr {
        background: rgba(255, 255, 255, 0.18);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        transition: all 0.25s ease;
        border-radius: 12px;
    }

        #income-allocation-modal tbody tr:hover {
            background: rgba(255, 255, 255, 0.28);
            transform: translateY(-2px);
            box-shadow: 0 8px 22px rgba(0,0,0,0.25);
        }

    #income-allocation-modal td {
        padding: 0.85rem 1rem;
        color: var(--text-primary);
        font-size: 0.9rem;
    }

        /* Right-align action buttons */
        #income-allocation-modal td:last-child {
            text-align: right;
        }

/* =========================================
   DARK MODE GLASS
========================================= */

[data-theme="dark"] #income-allocation-modal table {
    background: rgba(24, 24, 27, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] #income-allocation-modal tbody tr {
    background: rgba(24, 24, 27, 0.55);
}

    [data-theme="dark"] #income-allocation-modal tbody tr:hover {
        background: rgba(24, 24, 27, 0.75);
    }


/* =========================================
   FIX: REMOVE ROUNDED CORNERS FROM ROWS
========================================= */

#income-allocation-modal tbody tr {
    border-radius: 0 !important; /* remove rounded corners */
}

#income-allocation-modal table {
    border-radius: 14px; /* keep the whole table rounded */
    overflow: hidden; /* ensures rows stay square */
}

#alloc-income-header {
    text-align: center;
    width: 100%;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    color: lightgreen;
}

#income-allocation-modal .modal-actions {
    display: flex;
    justify-content: flex-end; /* ⭐ pushes buttons to the right */
    gap: 0.75rem; /* spacing between buttons */
    margin-top: 1rem;
}

.error-text {
    color: #ff4d4d;
    font-size: 0.8rem;
    margin-top: 4px;
}


/* =========================================
   FIX: MAKE ALLOCATION TABLE TEXT VISIBLE
========================================= */

#income-allocation-modal table th,
#income-allocation-modal table td {
    color: #ffffff !important; /* bright white text */
    text-shadow: 0 1px 2px rgba(0,0,0,0.35); /* improves readability on glass */
}

/* Make header slightly dimmer for hierarchy */
#income-allocation-modal table th {
    color: cornflowerblue !important;
    font-weight: 600;
}

#alocation-income-header {
    color: lightgreen;
}

#cancle{
    color: aliceblue
}

/* =========================================
   BASE ALLOCATE BUTTON (shared styles)
========================================= */
.allocate-btn {
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .25s ease;
    user-select: none;
    white-space: nowrap;
    width: 80%; /* ⭐ SAME LENGTH */
    justify-content: center;
}


    /* =========================================
   1️⃣ LEFT-SIDE ACCENT BAR (Fintech Style)
   ⭐ FINAL POLISHED VERSION
========================================= */

    .allocate-btn.accent {
        position: relative;
        padding: 0.55rem 1.1rem 0.55rem 1.3rem;
        background: var(--surface-elevated);
        color: var(--text-primary);
        border-radius: 10px;
        border: 1px solid rgba(255,255,255,0.12);
        backdrop-filter: blur(6px) saturate(160%);
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }

        .allocate-btn.accent::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0;
            width: 5px;
            height: 100%;
            background: var(--primary);
            border-radius: 10px 0 0 10px;
        }

        .allocate-btn.accent:hover {
            transform: translateY(-2px);
            background: #fc0fc0;
            box-shadow: 0 6px 18px rgba(239,68,68,0.45);
        }

        .allocate-btn.accent:active {
            transform: translateY(0);
            box-shadow: none;
        }

/* Dark mode */
[data-theme="dark"] .allocate-btn.accent {
    background: rgba(30, 30, 32, 0.45);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
}

data-theme="dark"] .allocate-btn.accent:hover {
    transform: translateY(-2px);
    background: #fc0fc0;
    box-shadow: 0 6px 18px rgba(239,68,68,0.45);
}



/* =========================================
   2️⃣ GRADIENT BUTTON (Stripe Style)
========================================= */

.allocate-btn.gradient {
    padding: 0.55rem 1.2rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: white;
    border: none;
}

    .allocate-btn.gradient:hover {
        filter: brightness(1.15);
        transform: translateY(-2px);
    }



/* =========================================
   3️⃣ PILL-SHAPED BUTTON (Rounded Modern)
========================================= */

.allocate-btn.pill {
    padding: 0.55rem 1.4rem;
    border-radius: 999px;
    background: var(--primary);
    color: white;
    border: none;
}

    .allocate-btn.pill:hover {
        background: var(--primary-hover);
        transform: translateY(-2px);
    }



/* =========================================
   4️⃣ GLOWING BORDER (Glassmorphism)
========================================= */

.allocate-btn.glow {
    padding: 0.55rem 1.2rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    color: var(--text-primary);
}

    .allocate-btn.glow:hover {
        border-color: var(--primary);
        box-shadow: 0 0 12px rgba(0, 150, 255, 0.35);
        transform: translateY(-2px);
    }



/* =========================================
   5️⃣ HEALTH COLOR BUTTON (Matches Progress)
========================================= */

.allocate-btn.health {
    padding: 0.55rem 1.2rem;
    border-radius: 10px;
    color: white;
    border: none;
}

    /* Green (<60%) */
    .allocate-btn.health[data-progress^="0"],
    .allocate-btn.health[data-progress^="1"],
    .allocate-btn.health[data-progress^="2"],
    .allocate-btn.health[data-progress^="3"],
    .allocate-btn.health[data-progress^="4"],
    .allocate-btn.health[data-progress^="5"] {
        background: #22c55e;
    }

    /* Orange (60–85%) */
    .allocate-btn.health[data-progress^="6"],
    .allocate-btn.health[data-progress^="7"],
    .allocate-btn.health[data-progress^="8"] {
        background: #f59e0b;
    }

    /* Red (85%+) */
    .allocate-btn.health[data-progress^="9"] {
        background: #ef4444;
    }

    .allocate-btn.health:hover {
        filter: brightness(1.15);
        transform: translateY(-2px);
    }


/* =========================================
   PROGRESS BAR
========================================= */

.remaining-cell {
    font-weight: 600;
    color: var(--text-color);
}

.alloc-progress-bar {
    width: 120px;
    height: 10px;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.alloc-progress-fill {
    height: 100%;
    width: 0%;
    background: #4caf50;
    border-radius: 6px;
    transition: width 0.4s ease, background 0.3s ease;
}

.alloc-progress-text {
    margin-left: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* =========================================
   ANIMATIONS
========================================= */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* =========================================
   PREMIUM HERO + KPI CARDS (APPENDED)
========================================= */

#income-page .income-hero {
    position: relative;
    border-radius: 22px;
    padding: 2rem 2.2rem;
    overflow: hidden;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #06b6d4 100%);
    box-shadow: 0 18px 45px rgba(79, 70, 229, 0.35);
    color: #fff;
}

#income-page .income-hero-glow {
    position: absolute;
    top: -60%;
    right: -10%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(255,255,255,0.30), transparent 65%);
    pointer-events: none;
}

#income-page .income-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

#income-page .income-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 0.35rem;
}

#income-page .income-hero-text h1 {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    color: #fff;
}

#income-page .income-hero-text p {
    margin: 0.4rem 0 0;
    font-size: 0.95rem;
    opacity: 0.92;
    max-width: 46ch;
}

#income-page .income-btn-light {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    padding: 0.7rem 1.3rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #4338ca;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#income-page .income-btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

#income-page .income-btn-light .btn-icon {
    font-size: 1.1rem;
    line-height: 1;
}

/* ---------- KPI GRID ---------- */
#income-page .income-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

#income-page .income-kpi {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    background: var(--surface-elevated, var(--surface));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.15rem 1.25rem;
    box-shadow: var(--shadow-soft, var(--shadow));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: fadeUp 0.4s ease both;
}

#income-page .income-kpi:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.16);
}

#income-page .income-kpi .kpi-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    font-size: 1.3rem;
    flex-shrink: 0;
}

#income-page .income-kpi .ico-month { background: rgba(99,102,241,0.14); }
#income-page .income-kpi .ico-sources { background: rgba(6,182,212,0.14); }
#income-page .income-kpi .ico-allocated { background: rgba(34,197,94,0.16); }
#income-page .income-kpi .ico-unallocated { background: rgba(245,158,11,0.16); }

#income-page .income-kpi .kpi-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

#income-page .income-kpi .kpi-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

#income-page .income-kpi .kpi-value {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary, var(--text));
    line-height: 1.1;
}

#income-page .income-kpi .kpi-value.text-warning { color: #f59e0b; }

#income-page .income-kpi .kpi-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ---------- DARK MODE ---------- */
[data-theme="dark"] #income-page .income-kpi {
    background: #18181b;
    border-color: #27272a;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
    #income-page .income-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    #income-page .income-kpi-grid {
        grid-template-columns: 1fr;
    }

    #income-page .income-hero {
        padding: 1.6rem 1.4rem;
    }
}


/* =========================================
   NO-BUDGET GATE (full-page CTA)
========================================= */

#income-page .income-gate {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 2rem 1rem;
}

#income-page .income-gate-card {
    text-align: center;
    max-width: 480px;
    width: 100%;
    background: var(--surface-elevated, var(--surface));
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 2.6rem 2.2rem;
    box-shadow: var(--shadow-soft, var(--shadow));
    animation: fadeUp 0.45s ease both;
}

#income-page .income-gate-ico {
    width: 78px;
    height: 78px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99,102,241,0.16), rgba(6,182,212,0.16));
}

#income-page .income-gate-card h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 0.6rem;
    color: var(--text-primary, var(--text));
}

#income-page .income-gate-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 auto 1.6rem;
    max-width: 40ch;
}

#income-page .income-gate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    border: none;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 10px 26px rgba(99,102,241,0.40);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#income-page .income-gate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(99,102,241,0.50);
}

#income-page .income-gate-hint {
    display: block;
    margin-top: 1.1rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

[data-theme="dark"] #income-page .income-gate-card {
    background: #18181b;
    border-color: #27272a;
}


/* Main content wrapper (sibling of the no-budget gate) */
#income-page .income-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* "Left to allocate" indicator in the income allocation modal */
.alloc-remaining {
    font-size: 12px;
    font-weight: 600;
    color: #0F766E;
    margin-top: 6px;
}
.alloc-remaining.none-left { color: #ef4444; }
