/* ═══ Bootstrap CSS Variables — Dark Override ═══ */
:root {
    --bs-body-bg: #0d1017;
    --bs-body-color: #e8eaf0;
    --bs-white: #0d1017;
    --bs-white-rgb: 13, 16, 23;
    --bs-light: #161a26;
    --bs-light-rgb: 22, 26, 38;
    --bs-gray-100: #161a26;
    --bs-gray-200: #1a1e2e;
    --bs-gray-300: #1e2233;
    --bs-gray-400: #2a2e40;
    --bs-gray-500: #6b7294;
    --bs-gray-600: #b0b4c8;
    --bs-gray-700: #b0b4c8;
    --bs-gray-800: #e8eaf0;
    --bs-gray-900: #e8eaf0;
    --bs-dark: #0d1017;
    --bs-dark-rgb: 13, 16, 23;
    --bs-primary: #d4a853;
    --bs-primary-rgb: 212, 168, 83;
    --bs-secondary: #6b7294;
    --bs-success: #4eca7b;
    --bs-info: #5bc9e8;
    --bs-warning: #e8c45b;
    --bs-danger: #e86b6b;
    --bs-body-bg: #0d1017;
    --bs-link-color: #d4a853;
    --bs-link-hover-color: #c9952e;
}

/* ═══ Utility Classes — Dark Theme ═══ */
.gradient-blue {
    background: linear-gradient(135deg, #5b8def 0%, #7ba4f7 100%);
}

.gradient-green {
    background: linear-gradient(135deg, #4eca7b 0%, #6dd99a 100%);
}

.gradient-orange {
    background: linear-gradient(135deg, #e8995b 0%, #f0ad7a 100%);
}

.gradient-purple {
    background: linear-gradient(135deg, #9d7ce8 0%, #b99cf0 100%);
}

.transition-all {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.transition-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ═══ Dark Bootstrap Overrides ═══ */

/* Cards */
.card {
    background: #161a26 !important;
    border-color: #1e2233 !important;
    color: #e8eaf0 !important;
}

.card-header {
    background: #1a1e2e !important;
    border-color: #1e2233 !important;
    color: #e8eaf0 !important;
}

.card-body {
    color: #e8eaf0 !important;
}

/* Alerts */
.alert {
    border-color: #2a2e40 !important;
}

.alert-danger {
    background: rgba(232,107,107,0.08) !important;
    border-color: rgba(232,107,107,0.2) !important;
    color: #e86b6b !important;
}

.alert-warning {
    background: rgba(232,196,91,0.08) !important;
    border-color: rgba(232,196,91,0.2) !important;
    color: #e8c45b !important;
}

.alert-success {
    background: rgba(78,202,123,0.08) !important;
    border-color: rgba(78,202,123,0.2) !important;
    color: #4eca7b !important;
}

.alert-info {
    background: rgba(91,201,232,0.08) !important;
    border-color: rgba(91,201,232,0.2) !important;
    color: #5bc9e8 !important;
}

/* Tables */
.table {
    color: #b0b4c8 !important;
}

.table > :not(caption) > * > * {
    background-color: transparent !important;
    color: #b0b4c8 !important;
    border-bottom-color: #1e2233 !important;
}

.table > thead {
    background: #1a1e2e !important;
}

.table > thead > tr > th {
    color: #6b7294 !important;
    border-color: #2a2e40 !important;
}

.table-hover > tbody > tr:hover > * {
    background-color: rgba(212, 168, 83, 0.03) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255,255,255,0.02) !important;
}

.table-dark {
    background: #1a1e2e !important;
}

.table-dark > th,
.table-dark > td {
    background: #1a1e2e !important;
    color: #b0b4c8 !important;
    border-color: #2a2e40 !important;
}

.table-dark thead th {
    background: #1a1e2e !important;
    color: #6b7294 !important;
    border-color: #2a2e40 !important;
}

/* Dark modal */
.modal-content {
    background: #161a26 !important;
    border-color: #2a2e40 !important;
    color: #e8eaf0 !important;
}

.modal-header {
    border-bottom-color: #1e2233 !important;
}

.modal-footer {
    border-top-color: #1e2233 !important;
}

/* Dark dropdown */
.dropdown-menu {
    background: #1a1e2e !important;
    border-color: #2a2e40 !important;
}

.dropdown-item {
    color: #b0b4c8 !important;
}

.dropdown-item:hover, .dropdown-item:focus {
    background: rgba(212, 168, 83, 0.08) !important;
    color: #e8eaf0 !important;
}

/* Dark list group */
.list-group-item {
    background: #161a26 !important;
    border-color: #1e2233 !important;
    color: #e8eaf0 !important;
}

/* Dark accordion */
.accordion-item {
    background: #161a26 !important;
    border-color: #1e2233 !important;
}

.accordion-button {
    background: #1a1e2e !important;
    color: #e8eaf0 !important;
}

.accordion-button:not(.collapsed) {
    background: rgba(212, 168, 83, 0.08) !important;
    color: #d4a853 !important;
}

.accordion-button::after {
    filter: invert(1);
}

/* Dark pagination */
.page-link {
    background: #1a1e2e !important;
    border-color: #2a2e40 !important;
    color: #b0b4c8 !important;
}

.page-item.active .page-link {
    background: #d4a853 !important;
    border-color: #d4a853 !important;
    color: #0f1219 !important;
}

/* Dark tabs */
.nav-tabs .nav-link {
    color: #6b7294 !important;
    border-color: #1e2233 !important;
}

.nav-tabs .nav-link:hover {
    color: #e8eaf0 !important;
    border-color: #2a2e40 #2a2e40 #1e2233 !important;
}

.nav-tabs .nav-link.active {
    background: #161a26 !important;
    border-color: #2a2e40 #2a2e40 #161a26 !important;
    color: #d4a853 !important;
}

/* Dark breadcrumb */
.breadcrumb {
    background: transparent !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #5a6078 !important;
}

/* ═══ Buttons — Dark Theme ═══ */

.btn {
    font-family: inherit !important;
}

.btn-primary {
    background: linear-gradient(135deg, #d4a853, #c9952e) !important;
    border-color: #d4a853 !important;
    color: #0f1219 !important;
    font-weight: 600;
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #c9952e, #b8862a) !important;
    border-color: #c9952e !important;
    color: #0f1219 !important;
    box-shadow: 0 4px 14px rgba(212,168,83,0.3);
}

.btn-outline-primary {
    color: #d4a853 !important;
    border-color: #d4a853 !important;
    background: transparent !important;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background: rgba(212,168,83,0.1) !important;
    color: #d4a853 !important;
    border-color: #d4a853 !important;
}

.btn-outline-secondary {
    color: #b0b4c8 !important;
    border-color: #2a2e40 !important;
    background: transparent !important;
}

.btn-outline-secondary:hover {
    background: rgba(255,255,255,0.05) !important;
    color: #e8eaf0 !important;
    border-color: #2a2e40 !important;
}

.btn-success {
    background: linear-gradient(135deg, #4eca7b, #3ba866) !important;
    border-color: #4eca7b !important;
    color: #0f1219 !important;
}

.btn-danger {
    background: linear-gradient(135deg, #e86b6b, #d04e4e) !important;
    border-color: #e86b6b !important;
    color: #0f1219 !important;
}

.btn-warning {
    background: linear-gradient(135deg, #e8c45b, #d4a853) !important;
    border-color: #e8c45b !important;
    color: #0f1219 !important;
}

.btn-info {
    background: linear-gradient(135deg, #5bc9e8, #42a8d9) !important;
    border-color: #5bc9e8 !important;
    color: #0f1219 !important;
}

.btn-close {
    filter: invert(1);
}

/* ═══ Forms — Dark Theme ═══ */

.form-control, .form-select {
    background-color: #1a1e2e !important;
    border-color: #2a2e40 !important;
    color: #e8eaf0 !important;
}

.form-control:focus, .form-select:focus {
    background-color: #1e2232 !important;
    border-color: #d4a853 !important;
    box-shadow: 0 0 0 3px rgba(212,168,83,0.15) !important;
    color: #e8eaf0 !important;
}

.form-control::placeholder {
    color: #6b7294 !important;
}

.form-label {
    color: #b0b4c8 !important;
}

.form-check-input {
    background-color: #1a1e2e !important;
    border-color: #2a2e40 !important;
}

.form-check-input:checked {
    background-color: #d4a853 !important;
    border-color: #d4a853 !important;
}

/* ═══ Text Utilities — Dark Theme ═══ */

.text-primary {
    color: #d4a853 !important;
}

.text-success {
    color: #4eca7b !important;
}

.text-danger {
    color: #e86b6b !important;
}

.text-warning {
    color: #e8c45b !important;
}

.text-info {
    color: #5bc9e8 !important;
}

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

.text-white {
    color: #e8eaf0 !important;
}

/* ═══ Background Utilities — Dark Theme ═══ */

.bg-primary {
    background-color: #d4a853 !important;
}

.bg-success {
    background-color: #4eca7b !important;
}

.bg-danger {
    background-color: #e86b6b !important;
}

.bg-warning {
    background-color: #e8c45b !important;
}

.bg-info {
    background-color: #5bc9e8 !important;
}

.bg-dark {
    background-color: #0d1017 !important;
}

.bg-light {
    background-color: #161a26 !important;
}

/* ═══ Badge — Dark Theme ═══ */

.badge {
    font-family: inherit !important;
}

.badge.bg-info {
    background: rgba(91, 201, 232, 0.15) !important;
    color: #5bc9e8 !important;
}

.badge.bg-success {
    background: rgba(78,202,123,0.15) !important;
    color: #4eca7b !important;
}

.badge.bg-danger {
    background: rgba(232,107,107,0.15) !important;
    color: #e86b6b !important;
}

.badge.bg-warning {
    background: rgba(232,196,91,0.15) !important;
    color: #e8c45b !important;
}

.badge.bg-primary {
    background: rgba(212,168,83,0.15) !important;
    color: #d4a853 !important;
}

/* ═══ Scrollbar — Dark ═══ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0d1017;
}

::-webkit-scrollbar-thumb {
    background: #2a2e40;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3e52;
}

/* ═══ Misc — Dark ═══ */

code {
    background: #1e2235 !important;
    color: #9da3b8 !important;
}

::selection {
    background: rgba(212,168,83,0.3);
    color: #e8eaf0;
}

/* ═══ Container Fluid — Dark ═══ */

.container-fluid {
    color: #e8eaf0 !important;
}

/* ═══ Heading Colors ═══ */

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

/* ═══ Aggressive Bootstrap White Kill ═══ */
/* Force dark backgrounds on ALL Bootstrap containers and layout elements */
body, html, .container, .container-fluid, .row, .col, .col-auto,
.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8,
.col-9, .col-10, .col-11, .col-12, .col-md-2, .col-md-3, .col-md-4,
.col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10,
.col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9 {
    background-color: transparent !important;
}

body {
    background: #0d1017 !important;
}

/* Force dark on ALL Bootstrap form elements */
.form-control, .form-select, .input-group-text, input, select, textarea,
.form-check, .form-check-inline, .form-floating {
    background-color: #1a1e2e !important;
    border-color: #2a2e40 !important;
    color: #e8eaf0 !important;
}

/* Force dark on ALL Bootstrap buttons */
.btn {
    font-family: inherit !important;
    border-color: #2a2e40 !important;
}

.btn-light {
    background: #161a26 !important;
    color: #e8eaf0 !important;
    border-color: #2a2e40 !important;
}

/* Force dark on ALL card variants */
.card, .card-body, .card-header, .card-footer {
    background-color: #161a26 !important;
    border-color: #1e2233 !important;
    color: #e8eaf0 !important;
}

/* Force dark on ALL table variants */
.table, .table-responsive, .table-group-divider {
    background-color: transparent !important;
}

.table-dark, .table-dark > th, .table-dark > td,
.table-dark thead th {
    background-color: #1a1e2e !important;
    color: #b0b4c8 !important;
    border-color: #2a2e40 !important;
}

/* Force dark on modal backgrounds */
.modal-backdrop {
    background: rgba(0,0,0,0.8) !important;
}

/* Force dark on offcanvas */
.offcanvas {
    background-color: #161a26 !important;
    color: #e8eaf0 !important;
}

/* Force dark on popovers */
.popover {
    background-color: #1a1e2e !important;
    border-color: #2a2e40 !important;
    color: #e8eaf0 !important;
}

/* Force dark on toast */
.toast {
    background-color: #1a1e2e !important;
    color: #e8eaf0 !important;
    border-color: #2a2e40 !important;
}

/* Force dark on all img thumbnails */
.img-thumbnail {
    background-color: #1a1e2e !important;
    border-color: #2a2e40 !important;
}

/* Force dark on progress bars */
.progress {
    background-color: #1a1e2e !important;
}

/* Force dark on spinner */
.spinner-border {
    border-color: #2a2e40 !important;
    border-top-color: #d4a853 !important;
}

.spinner-grow {
    background-color: #d4a853 !important;
}

/* Force dark on all hr elements */
hr {
    border-color: #1e2233 !important;
    opacity: 0.5;
}
