
html {
    font-size: 14px;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f3f4f6;
    color: #212529;
}

/* APPLICATION LAYOUT */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 215px;
    min-width: 215px;
    background: #1F2937;
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.logo {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.logo h3 {
    margin: 0;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
}

.logo small {
    color: #cbd5e1;
}

/* SIDEBAR MENU */
.sidebar nav {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar nav a {
    color: #d1d5db;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    transition: background-color .2s, color .2s;
    font-size: 15px;
}

.sidebar nav a:hover,
.sidebar nav a:focus {
    background: #374151;
    color: white;
}

.sidebar nav a i {
    font-size: 18px;
    width: 22px;
    flex-shrink: 0;
}

/* MAIN CONTENT */
.content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* TOP BAR */
.topbar {
    background: white;
    min-height: 66px;
    display: flex;
    align-items: center;
    padding: 0 28px;
    border-bottom: 1px solid #e5e7eb;
}

.topbar h4 {
    margin: 0;
    font-weight: 600;
}

/* PAGE */
.page-content {
    padding: 28px;
    flex: 1;
    min-width: 0;
}

.page-title {
    color: #212529;
    font-weight: 500;
}

/* CARDS */
.card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    background: white;
}

.card-body {
    min-width: 0;
}

/* ALL TABLES */
.table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse !important;
    border-color: #dee2e6;
    color: #212529;
    vertical-align: middle;
    background-color: white;
}

.table thead th {
    background: #2563EB !important;
    color: white !important;
    font-weight: 700;
    border: 1px solid #cbd5e1 !important;
    padding: 12px 10px;
    vertical-align: middle;
}

.table tbody td {
    border: 1px solid #dee2e6 !important;
    padding: 12px 10px;
    vertical-align: middle;
}

.table tbody tr:nth-child(even) > td {
    background-color: #f8fafc;
}

.table tbody tr:hover > td {
    background-color: #eef4ff;
}

/* EXPENSES TABLE */
.expense-table {
    min-width: 1100px;
    font-size: 14px;
}

.expense-table .col-expense-id {
    width: 90px;
}

.expense-table .col-expense-date {
    width: 115px;
}

.expense-table .col-expense-payee {
    width: 180px;
}

.expense-table .col-expense-description {
    min-width: 250px;
}

.expense-table .col-expense-amount {
    width: 135px;
}

.expense-table .col-expense-payment {
    width: 145px;
}

.expense-table .col-expense-actions {
    width: 225px;
}

.expense-table .description-cell,
.expense-table .payee-cell {
    overflow-wrap: anywhere;
    line-height: 1.5;
}

.expense-table .amount-cell,
.expense-table .actions-cell {
    white-space: nowrap;
}

.expense-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
}

.expense-actions .btn {
    flex-shrink: 0;
    padding: 5px 8px;
    border-radius: 6px;
}

/* BUTTONS */
.btn {
    border-radius: 8px;
}

.btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

/* FORMS */
.form-control,
.form-select {
    border-radius: 8px;
}

/* RESPONSIVE */
@media (max-width: 991px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 0;
    }

    .sidebar nav {
        flex-direction: row;
        overflow-x: auto;
        margin-top: 0;
    }

    .sidebar nav a {
        white-space: nowrap;
    }

    .page-content {
        padding: 20px;
    }

    .topbar {
        padding: 0 20px;
    }
}

@media (max-width: 576px) {
    .page-content {
        padding: 14px;
    }
}

/* PRINT */
@media print {
    .sidebar,
    .topbar,
    .btn {
        display: none !important;
    }

    .app-layout {
        display: block;
    }

    .content {
        display: block;
    }

    .page-content {
        padding: 0;
    }

    .card {
        box-shadow: none;
    }

    .table-responsive {
        overflow: visible !important;
    }

    .expense-table {
        min-width: 0;
        font-size: 10px;
    }
}
