:root {
    --bg-body: #0f172a;
    --bg-sidebar: #1e293b;
    --bg-card: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
}

/* Base body removed, handled by dashboard.css */

/* Sidebar styles removed, handled by dashboard.css */

/* --- MAIN CONTENT --- */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
}

/* Header styles removed, handled by dashboard.css */

/* --- CARDS & WIDGETS --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 22px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* Background Curve Effect (Lekukan) */
.stat-card::before {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(147, 51, 234, 0.15);
    /* Purple hint */
    z-index: -1;
    transition: all 0.4s ease;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    border-radius: 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    transform: rotate(15deg);
    z-index: -1;
}

.stat-card:hover::before {
    transform: scale(1.2);
    background: rgba(147, 51, 234, 0.25);
}

/* Color Varieties */
.card-income {
    background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.card-income::before {
    background: rgba(16, 185, 129, 0.1);
}

.card-income:hover {
    border-color: #10b981;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
}

.card-expense {
    background: linear-gradient(135deg, #7f1d1d 0%, #0f172a 100%);
    border-color: rgba(244, 63, 94, 0.3);
}

.card-expense::before {
    background: rgba(244, 63, 94, 0.1);
}

.card-expense:hover {
    border-color: #f43f5e;
    box-shadow: 0 10px 30px rgba(244, 63, 94, 0.2);
}

.card-balance {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

.card-balance::before {
    background: rgba(59, 130, 246, 0.1);
}

.card-balance:hover {
    border-color: #3b82f6;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.stat-val {
    font-size: 26px;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.text-green {
    color: #4ade80;
}

.text-red {
    color: #fb7185;
}

.text-blue {
    color: #60a5fa;
}

/* --- TABLES --- */
.table-container {
    background: #151b2b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th,
td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    white-space: nowrap;
}

th {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

td {
    color: #e2e8f0;
}

/* Wrap text in description column */
td.td-desc {
    white-space: normal;
    min-width: 200px;
}

.pill {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    border: 1px solid transparent;
    display: inline-block;
}

/* --- BUTTONS --- */
.btn {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 11px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sm:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* --- FORMS & MODAL --- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-box {
    background: #0b1220;
    width: 100%;
    max-width: 450px;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.2s;
}

.modal.show .modal-box {
    transform: scale(1);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    outline: none;
    font-size: 13px;
}

.input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

/* Fix for White-on-White in Dropdowns */
select option {
    background: #1e293b;
    color: white;
}

/* --- FILTER BAR --- */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: #151b2b;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    align-items: flex-end;
    flex-wrap: wrap;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        height: 100%;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
        z-index: 2000;
        overflow-y: auto;
    }

    .sidebar.active {
        left: 0;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .header span {
        display: inline-block;
    }


    .mobile-head {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-bottom: 20px;
        position: relative;
        z-index: 1001;
    }

    /* RESTORE BRAND TEXT ON MOBILE SIDEBAR */
    .brand-wrapper .brand-text,
    .brand-wrapper span,
    #brandText {
        display: inline-block !important;
        width: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        padding-left: 10px !important;
        overflow: visible !important;
    }




    .pc-head {
        display: none;
    }

    th,
    td {
        padding: 4px 2px;
        font-size: 11px;
        width: auto !important;
    }

    th:nth-child(1),
    td:nth-child(1) {
        width: 35px !important;
    }

    th:nth-child(2),
    td:nth-child(2) {
        width: 20px !important;
        text-align: center;
        padding: 0 !important;
    }

    th:nth-child(3),
    td:nth-child(3) {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    td:nth-child(3) div {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    th:nth-child(4),
    td:nth-child(4) {
        width: auto !important;
        white-space: nowrap;
        text-align: right;
    }

    th:nth-child(5),
    td:nth-child(5) {
        width: 30px !important;
        text-align: center;
    }
}

.overlay-bg {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    backdrop-filter: blur(2px);
}

.overlay-bg.active {
    display: block;
}

/* Consolidated Mobile Styles */
@media (max-width: 768px) {

    .desktop-desc,
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .mobile-desc {
        display: block;
        font-size: 11px;
        opacity: 0.75;
        font-style: italic;
        margin-top: 2px;
        line-height: 1.2;
        color: #cbd5e1;
    }
}

@media (min-width: 769px) {

    .mobile-head,
    .mobile-desc,
    .mobile-only {
        display: none !important;
    }

    .desktop-only {
        display: flex !important;
    }
}

/* FORCE UPDATE TIMESTAMP: 02/13/2026 21:12:12 */