body {
    background-color: #121212;
    color: #e0e0e0;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
}

.card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    color: #ffffff;
}

/* ============================================================
   DARK MODE TABLES
   ============================================================ */

.table {
    width: 100%;
    margin-bottom: 0;

    --bs-table-bg: #1e1e1e;
    --bs-table-color: #f1f1f1;
    --bs-table-border-color: #3a3a3a;
    --bs-table-striped-bg: #252525;
    --bs-table-striped-color: #ffffff;
    --bs-table-hover-bg: #333333;
    --bs-table-hover-color: #ffffff;

    color: #f1f1f1 !important;
    background-color: #1e1e1e !important;
}

/* Table header */
.table thead th {
    background-color: #292929 !important;
    color: #ffffff !important;
    border-color: #444444 !important;
    font-weight: 600;
    vertical-align: middle;
}

/* Table body */
.table tbody td {
    background-color: #1e1e1e !important;
    color: #f1f1f1 !important;
    border-color: #3a3a3a !important;
    vertical-align: middle;
}

/* Alternating rows */
.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #252525 !important;
    color: #f1f1f1 !important;
}

.table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: #1e1e1e !important;
    color: #f1f1f1 !important;
}

/* Hover */
.table-hover > tbody > tr:hover > * {
    background-color: #333333 !important;
    color: #ffffff !important;
}

/* Links inside tables */
.table a {
    color: #60a5fa !important;
}

.table a:hover {
    color: #93c5fd !important;
}

/* Keep tables inside cards */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

/* Prevent long payment notes from expanding the table */
.table td:nth-child(3) {
    max-width: 300px;
    overflow-wrap: anywhere;
}

/* Keep action buttons inside tables */
.table td:last-child {
    white-space: nowrap;
    width: 1%;
}

.form-control,
.form-select,
textarea {
    background-color: #1e1e1e;
    color: #ffffff;
    border: 1px solid #444;
}

.form-control:focus,
.form-select:focus {
    background-color: #252525;
    color: #ffffff;
}

.btn-primary {
    background-color: #2563eb;
}

.btn-success {
    background-color: #16a34a;
}

.btn-info {
    background-color: #0891b2;
}

a {
    color: #60a5fa;
}

.text-muted {
    color: #bdbdbd !important;
}

.report-title {
    color: #ffffff;
    font-weight: 600;
}

.navbar {
    background-color: #1b1b1b;
}

.navbar-brand {
    font-size: 1.3rem;
    color: white !important;
}

.nav-link {
    color: #bdbdbd !important;
    border-radius: 8px;
    margin-left: 6px;
    padding: 8px 14px !important;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #2d2d2d;
    color: white !important;
}

.nav-link.active {
    background: #0d6efd;
    color: white !important;
    font-weight: 600;
}

/* Dashboard Expense Status */

.expense-status-cell {
    color: #ffffff !important;
    white-space: nowrap;
    font-weight: 600;
}

.expense-status-cell .status-label {
    color: #ffffff !important;
    font-weight: 600;
}

.expense-status-cell .status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.expense-status-cell .status-red {
    background-color: #dc3545 !important;
}

.expense-status-cell .status-green {
    background-color: #198754 !important;
}

.expense-status-cell .status-gray {
    background-color: #6c757d !important;
}