:root {
    --glass: rgba(255, 255, 255, 0.1);
    --border: rgba(255, 255, 255, 0.2);
    --text: #ffffff;
    --primary: #3498db;
    --success: #2ecc71;
    --warning: #f1c40f;
    --revenue: rgba(46, 204, 113, 0.2);
    --expense: rgba(231, 76, 60, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    font-family: 'Segoe UI', sans-serif;
    color: var(--text);
    min-height: 100vh;
    padding: 20px;
}

.glass-container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 25px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--glass);
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn.secondary {
    background: rgba(52, 152, 219, 0.3);
}

/* Stats Grid Highlights */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.net-revenue-highlight {
    border: 2px solid var(--success) !important;
    background: rgba(46, 204, 113, 0.15) !important;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.2);
}

.bank-balance-highlight {
    border: 2px solid var(--warning) !important;
    background: rgba(241, 196, 15, 0.1) !important;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.2);
}

/* Table Animation & Scrolling Fix */
.table-container {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
}

.section-header {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 0;
    /* Sliding fix */
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
}

.table-container.active .table-wrapper {
    max-height: 2000px;
    /* Reveal content */
    transition: max-height 0.5s ease-in-out;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.table-container.active .toggle-icon {
    transform: rotate(180deg);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    font-size: 0.9rem;
}

th,
td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.header-revenue {
    background: var(--revenue);
}

.header-expense {
    background: var(--expense);
}

/* Custom Scrollbar */
.table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        width: 100%;
        margin-bottom: 10px;
    }
}