/* Dark Mode Override - Black background, white text, green accent */
:root {
    --bs-body-bg: #0d0d0d !important;
    --bs-body-color: #ffffff !important;
    --bs-primary: #22c55e !important;
    --bs-primary-rgb: 34, 197, 94 !important;
    --bs-link-color: #22c55e !important;
    --bs-link-hover-color: #16a34a !important;
    --bs-card-bg: #1a1a1a !important;
    --bs-border-color: #333333 !important;
}

html, body {
    background-color: #0d0d0d !important;
    color: #ffffff !important;
}

/* Main containers */
.layout-wrapper,
.layout-container,
.layout-page,
.content-wrapper,
.container-xxl,
.container-fluid {
    background-color: #0d0d0d !important;
}

/* Cards */
.card,
.card-body,
.card-header,
.card-footer {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border-color: #333333 !important;
}

/* Sidebar Menu */
.menu,
.menu-inner,
.bg-menu-theme,
.layout-menu,
aside.menu {
    background-color: #111111 !important;
}

.menu-item .menu-link,
.menu-item a,
.menu-inner > .menu-item > .menu-link {
    color: #cccccc !important;
}

.menu-item .menu-link:hover,
.menu-item.active > .menu-link,
.menu-item.open > .menu-link {
    color: #22c55e !important;
    background-color: #1a1a1a !important;
}

.menu-header,
.menu-header span {
    color: #666666 !important;
}

/* Navbar */
.navbar,
.layout-navbar,
.navbar-nav,
.bg-navbar-theme {
    background-color: #111111 !important;
    border-color: #333333 !important;
}

.navbar-nav .nav-link,
.navbar .nav-item a {
    color: #ffffff !important;
}

/* Tables */
.table,
.table > thead,
.table > tbody,
.table th,
.table td,
.bootstrap-table,
.fixed-table-container,
.fixed-table-body {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border-color: #333333 !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #222222 !important;
    color: #ffffff !important;
}

.table-hover > tbody > tr:hover > * {
    background-color: #2a2a2a !important;
}

.fixed-table-toolbar {
    background-color: #1a1a1a !important;
}

/* Forms */
.form-control,
.form-select,
input,
select,
textarea {
    background-color: #222222 !important;
    color: #ffffff !important;
    border-color: #444444 !important;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
    border-color: #22c55e !important;
    box-shadow: 0 0 0 0.2rem rgba(34, 197, 94, 0.25) !important;
}

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

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

/* Select2 */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple,
.select2-dropdown {
    background-color: #222222 !important;
    color: #ffffff !important;
    border-color: #444444 !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    color: #ffffff !important;
}

.select2-container--default .select2-results__option {
    background-color: #222222 !important;
    color: #ffffff !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #22c55e !important;
    color: #000000 !important;
}

/* Buttons - Primary to Green */
.btn-primary {
    background-color: #22c55e !important;
    border-color: #22c55e !important;
    color: #000000 !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #16a34a !important;
    border-color: #16a34a !important;
    color: #000000 !important;
}

.btn-outline-primary {
    color: #22c55e !important;
    border-color: #22c55e !important;
}

.btn-outline-primary:hover {
    background-color: #22c55e !important;
    color: #000000 !important;
}

/* Secondary buttons */
.btn-secondary,
.btn-outline-secondary {
    background-color: #333333 !important;
    border-color: #444444 !important;
    color: #ffffff !important;
}

.btn-secondary:hover {
    background-color: #444444 !important;
}

/* Links */
a {
    color: #22c55e !important;
}

a:hover {
    color: #16a34a !important;
}

/* Text colors */
.text-primary {
    color: #22c55e !important;
}

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

.text-dark {
    color: #ffffff !important;
}

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

/* Modals */
.modal-content {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border-color: #333333 !important;
}

.modal-header,
.modal-footer {
    border-color: #333333 !important;
}

.modal-title {
    color: #ffffff !important;
}

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

/* Dropdowns */
.dropdown-menu {
    background-color: #1a1a1a !important;
    border-color: #333333 !important;
}

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

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #22c55e !important;
    color: #000000 !important;
}

.dropdown-divider {
    border-color: #333333 !important;
}

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

/* Badges */
.badge.bg-primary,
.bg-primary {
    background-color: #22c55e !important;
    color: #000000 !important;
}

.badge.bg-label-primary {
    background-color: rgba(34, 197, 94, 0.2) !important;
    color: #22c55e !important;
}

/* Progress bars */
.progress {
    background-color: #333333 !important;
}

.progress-bar {
    background-color: #22c55e !important;
}

/* Pagination */
.page-link {
    background-color: #222222 !important;
    color: #ffffff !important;
    border-color: #444444 !important;
}

.page-link:hover {
    background-color: #22c55e !important;
    color: #000000 !important;
}

.page-item.active .page-link {
    background-color: #22c55e !important;
    border-color: #22c55e !important;
    color: #000000 !important;
}

/* Breadcrumbs */
.breadcrumb {
    background-color: transparent !important;
}

.breadcrumb-item a {
    color: #22c55e !important;
}

.breadcrumb-item.active {
    color: #888888 !important;
}

/* Calendar */
.fc-theme-standard td,
.fc-theme-standard th,
.fc-theme-standard .fc-scrollgrid {
    border-color: #333333 !important;
}

.fc .fc-daygrid-day {
    background-color: #1a1a1a !important;
}

.fc .fc-col-header-cell {
    background-color: #222222 !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #22c55e;
}

/* Toasts */
.toast {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

/* Offcanvas */
.offcanvas {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

/* App branding */
.app-brand-link,
.app-brand-text {
    color: #22c55e !important;
}

/* Footer */
.footer,
footer {
    background-color: #111111 !important;
    color: #888888 !important;
}

/* Login page specific */
.authentication-wrapper {
    background-color: #0d0d0d !important;
}

.authentication-inner {
    background-color: #1a1a1a !important;
}

/* Chat icon */
.chat-img {
    filter: brightness(0.8) !important;
}

/* List groups */
.list-group-item {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border-color: #333333 !important;
}

.list-group-item:hover {
    background-color: #222222 !important;
}

/* Kanban */
.kanban-board,
.kanban-column {
    background-color: #1a1a1a !important;
}

.kanban-item {
    background-color: #222222 !important;
    color: #ffffff !important;
}

/* TinyMCE Editor */
.tox .tox-edit-area__iframe {
    background-color: #222222 !important;
}

.tox .tox-toolbar,
.tox .tox-toolbar__overflow,
.tox .tox-toolbar__primary {
    background-color: #1a1a1a !important;
}

.tox .tox-tbtn {
    color: #ffffff !important;
}

/* Lightbox */
.lb-data .lb-details,
.lb-data .lb-caption {
    color: #ffffff !important;
}

/* Fix any remaining white backgrounds */
[class*="bg-white"],
.bg-white {
    background-color: #1a1a1a !important;
}

[class*="bg-light"],
.bg-light {
    background-color: #222222 !important;
}

/* Statistics cards */
.avatar,
.avatar-initial {
    background-color: rgba(34, 197, 94, 0.2) !important;
    color: #22c55e !important;
}

/* Borders */
.border,
[class*="border-"] {
    border-color: #333333 !important;
}

/* Shadow adjustments */
.shadow,
.shadow-sm,
.shadow-lg {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.5) !important;
}

/* Icons in menu */
.menu-icon i,
.bx {
    color: inherit !important;
}
