/* Dark mode overrides (auto via prefers-color-scheme: dark) */
:root {
    color-scheme: dark;
}

body {
    background-color: #0f1115 !important;
    color: #e6e6e6;
}

/* Backgrounds */
.bg-light { background-color: #0f1115 !important; }
.bg-white { background-color: #151a1f !important; }
.bg-body, .bg-body-tertiary { background-color: #0f1115 !important; }

/* Text */
.text-dark { color: #e6e6e6 !important; }
.text-muted { color: #9aa4b2 !important; }
.text-secondary { color: #a0acb8 !important; }

/* Borders */
.border, .border-top, .border-bottom, .border-start, .border-end {
    border-color: #242b33 !important;
}
.border-light, .border-light-subtle {
    border-color: #1f252d !important;
}

/* Cards */
.card, .modal-content, .list-group-item {
    background-color: #151a1f !important;
    background-image: none !important;
    color: #e6e6e6;
    border-color: #242b33 !important;
}
.card-header, .card-footer {
    background-color: #14181e !important;
    background-image: none !important;
    border-color: #242b33 !important;
}

/* Override inline gradients/backgrounds on cards in admin dashboard */
.card[style], .card-body[style], .card-header[style], .card-footer[style] {
    background: #151a1f !important;
}

/* Navbar */
.navbar, .navbar.bg-white {
    background-color: #11151a !important;
    border-color: #242b33 !important;
}
.navbar .nav-link {
    color: #cbd5e1 !important;
}
.navbar .nav-link.active,
.navbar .nav-link:hover {
    color: #ffffff !important;
}

/* Dropdowns */
.dropdown-menu {
    background-color: #151a1f !important;
    border-color: #242b33 !important;
}
.dropdown-item {
    color: #e6e6e6 !important;
}
.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
    background-color: #1f252d !important;
    color: #ffffff !important;
}
.dropdown-divider {
    border-color: #242b33 !important;
}

/* Tables */
.table {
    color: #e6e6e6;
    --bs-table-bg: #151a1f;
    --bs-table-color: #e6e6e6;
    --bs-table-striped-bg: #1b2128;
    --bs-table-striped-color: #e6e6e6;
    --bs-table-hover-bg: #1e252e;
    --bs-table-hover-color: #ffffff;
    --bs-table-border-color: #242b33;
}
.table thead.bg-light,
.table thead {
    background-color: #1a2028 !important;
    color: #cbd5e1;
}
.table-hover tbody tr:hover {
    background-color: #1e252e !important;
}

/* Forms */
.form-control,
.form-select,
.form-control:focus,
.form-select:focus {
    background-color: #0f141a !important;
    color: #e6e6e6 !important;
    border-color: #24303a !important;
    box-shadow: none !important;
}
.input-premium:focus {
    background-color: #0f141a !important;
    outline: 2px solid #2a333d !important;
}
.form-control::placeholder {
    color: #8b97a6 !important;
}
.input-group-text {
    background-color: #0f141a !important;
    color: #cbd5e1 !important;
    border-color: #24303a !important;
}

/* Buttons */
.btn-light {
    background-color: #1f252d !important;
    color: #e6e6e6 !important;
    border-color: #2a333d !important;
}
.btn-light:hover {
    background-color: #222a33 !important;
    color: #ffffff !important;
}
.btn-outline-secondary {
    color: #9aa4b2 !important;
    border-color: #3a4552 !important;
}
.btn-outline-secondary:hover {
    background-color: #222a33 !important;
    color: #ffffff !important;
}

/* Badges */
.badge.bg-light {
    background-color: #1e252e !important;
    color: #e6e6e6 !important;
    border-color: #2a333d !important;
}
.bg-success-subtle { background-color: #103322 !important; color: #9be7c4 !important; }
.bg-warning-subtle { background-color: #3a2b10 !important; color: #f4d58d !important; }
.bg-danger-subtle { background-color: #3b161a !important; color: #f2a7b0 !important; }
.bg-info-subtle { background-color: #102a3a !important; color: #9cc7f0 !important; }
.bg-primary-subtle { background-color: #1b2a4a !important; color: #b3c7f6 !important; }

/* Alerts */
.alert {
    background-color: #1f252d !important;
    color: #e6e6e6 !important;
    border-color: #2a333d !important;
}

/* Pagination */
.page-link {
    background-color: #151a1f !important;
    color: #cbd5e1 !important;
    border-color: #2a333d !important;
}
.page-item.active .page-link {
    background-color: #2a7de1 !important;
    border-color: #2a7de1 !important;
    color: #ffffff !important;
}

/* Modals */
.modal-header, .modal-footer {
    border-color: #242b33 !important;
}

/* Misc */
.shadow-sm, .shadow {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
}
