:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-light: #f1f5f9;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --success: #059669;
    --danger: #dc2626;
    --accent: #6d28d9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Effect - Refined for Light Theme */
.glass {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

h1,
h2,
h3 {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    color: var(--text-main);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 1rem;
    text-align: left;
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f8fafc;
}

/* Dashboard Summary */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
}

.summary-card h4 {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.summary-card .value {
    font-size: 1.5rem;
    font-weight: 800;
}

.summary-card.income .value {
    color: var(--success);
}

.summary-card.expense .value {
    color: var(--danger);
}

.summary-card.balance .value {
    color: #854d0e;
}

/* Login */
.login-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    border-radius: 1.5rem;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Filter Section */
.filter-bar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Pagination */
.pagination {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.page-link {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
}

.page-link:hover {
    background: #f8fafc;
}

.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Desktop default: Hide mobile list */
.mobile-list-view {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .summary-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .filter-bar {
        justify-content: center;
        width: 100%;
    }

    .filter-bar .form-control {
        width: 100% !important;
    }

    /* Mobile List View */
    .mobile-list-view {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .transaction-card {
        background: white;
        padding: 1rem;
        border-radius: 0.75rem;
        border: 1px solid #e2e8f0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .t-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 0.5rem;
        margin-bottom: 0.25rem;
    }

    .t-date {
        font-size: 0.8rem;
        color: var(--text-muted);
        font-weight: 600;
    }

    .t-amount {
        font-weight: 700;
        font-size: 1rem;
    }

    .t-desc {
        color: var(--text-main);
        font-size: 0.9rem;
        line-height: 1.4;
    }

    /* Hide table on mobile, show list */
    .table-container {
        display: none;
    }

    .mobile-list-view {
        display: flex;
        /* Show list */
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

/* Extra small mobile */
@media (max-width: 480px) {
    .summary-card .value {
        font-size: 1.25rem;
    }

    .btn {
        width: 100%;
    }

    .logo-text {
        font-size: 1rem;
    }
}