/* Wincos Dark Mode Additional Fixes */
/* File ini berisi perbaikan tambahan untuk memastikan semua elemen tampil dengan benar di dark mode */

/* Dark Mode - Main Content Area */
[data-bs-theme="dark"] .main-content,
[data-bs-theme="dark"] .app-content,
[data-bs-theme="dark"] .page-content {
    background: #1a202c !important;
    color: #cbd5e0 !important;
}

/* Dark Mode - Page Header and Title */
[data-bs-theme="dark"] .page-title-box {
    background: transparent !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .page-title {
    color: #f7fafc !important;
}

[data-bs-theme="dark"] .breadcrumb-item {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .breadcrumb-item.active {
    color: #cbd5e0 !important;
}

/* Dark Mode - DataTables Specific Fixes */
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_info,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate {
    color: #cbd5e0 !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length label,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter label {
    color: #cbd5e0 !important;
}

/* Dark Mode - Search Input Specific */
[data-bs-theme="dark"] .dataTables_filter input[type="search"] {
    background: #2d3748 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #e2e8f0 !important;
    border-radius: 6px !important;
}

[data-bs-theme="dark"] .dataTables_filter input[type="search"]:focus {
    background: #374151 !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.1) !important;
    outline: none !important;
}

[data-bs-theme="dark"] .dataTables_filter input[type="search"]::placeholder {
    color: #9ca3af !important;
}

/* Dark Mode - Select Dropdown */
[data-bs-theme="dark"] .dataTables_length select {
    background: #2d3748 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #e2e8f0 !important;
    border-radius: 6px !important;
}

[data-bs-theme="dark"] .dataTables_length select:focus {
    background: #374151 !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.1) !important;
    outline: none !important;
}

[data-bs-theme="dark"] .dataTables_length select option {
    background: #2d3748 !important;
    color: #e2e8f0 !important;
}

/* Dark Mode - Table Row Hover Effects */
[data-bs-theme="dark"] .table tbody tr:hover {
    background: rgba(74, 85, 104, 0.3) !important;
}

[data-bs-theme="dark"] .table tbody tr:hover td {
    background: rgba(74, 85, 104, 0.3) !important;
    color: #f7fafc !important;
}

/* Dark Mode - Action Buttons in Table */
[data-bs-theme="dark"] .btn-sm {
    border-radius: 4px !important;
}

[data-bs-theme="dark"] .btn-outline-primary {
    color: #60a5fa !important;
    border-color: #60a5fa !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .btn-outline-primary:hover {
    background: #60a5fa !important;
    border-color: #60a5fa !important;
    color: #1a202c !important;
}

[data-bs-theme="dark"] .btn-outline-success {
    color: #34d399 !important;
    border-color: #34d399 !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .btn-outline-success:hover {
    background: #34d399 !important;
    border-color: #34d399 !important;
    color: #1a202c !important;
}

[data-bs-theme="dark"] .btn-outline-danger {
    color: #f87171 !important;
    border-color: #f87171 !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .btn-outline-danger:hover {
    background: #f87171 !important;
    border-color: #f87171 !important;
    color: #1a202c !important;
}

/* Dark Mode - Status Badges */
[data-bs-theme="dark"] .badge {
    font-weight: 500 !important;
}

[data-bs-theme="dark"] .badge.bg-warning {
    background: #d97706 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .badge.bg-success {
    background: #059669 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .badge.bg-danger {
    background: #dc2626 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .badge.bg-info {
    background: #0284c7 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .badge.bg-primary {
    background: #2563eb !important;
    color: #ffffff !important;
}

/* Dark Mode - Pagination Improvements */
[data-bs-theme="dark"] .pagination {
    margin: 0 !important;
}

[data-bs-theme="dark"] .pagination .page-item .page-link {
    background: #2d3748 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #cbd5e0 !important;
    margin: 0 2px !important;
    border-radius: 6px !important;
}

[data-bs-theme="dark"] .pagination .page-item .page-link:hover {
    background: #4a5568 !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #f7fafc !important;
}

[data-bs-theme="dark"] .pagination .page-item.active .page-link {
    background: #4a5568 !important;
    border-color: #4a5568 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .pagination .page-item.disabled .page-link {
    background: #374151 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #6b7280 !important;
}

/* Dark Mode - DataTables Info Text */
[data-bs-theme="dark"] .dataTables_info {
    color: #9ca3af !important;
    font-size: 0.875rem !important;
}

/* Dark Mode - Loading States */
[data-bs-theme="dark"] .dataTables_processing {
    background: rgba(26, 32, 44, 0.95) !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Dark Mode - Empty State */
[data-bs-theme="dark"] .dataTables_empty {
    color: #9ca3af !important;
    font-style: italic !important;
}

/* Dark Mode - Scrollbar for Tables */
[data-bs-theme="dark"] .dataTables_scrollBody::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

[data-bs-theme="dark"] .dataTables_scrollBody::-webkit-scrollbar-track {
    background: #374151 !important;
    border-radius: 4px !important;
}

[data-bs-theme="dark"] .dataTables_scrollBody::-webkit-scrollbar-thumb {
    background: #6b7280 !important;
    border-radius: 4px !important;
}

[data-bs-theme="dark"] .dataTables_scrollBody::-webkit-scrollbar-thumb:hover {
    background: #9ca3af !important;
}

/* Dark Mode - Card Improvements */
[data-bs-theme="dark"] .card {
    background: #1a202c !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

[data-bs-theme="dark"] .card-header {
    background: linear-gradient(90deg, #1a202c 0%, #2d3748 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .card-body {
    background: #1a202c !important;
    color: #cbd5e0 !important;
}

[data-bs-theme="dark"] .card-title {
    color: #f7fafc !important;
}

/* Dark Mode - Form Controls */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background: #2d3748 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background: #374151 !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: #9ca3af !important;
}

/* Dark Mode - Labels and Text */
[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] label {
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #9ca3af !important;
}

[data-bs-theme="dark"] .text-dark {
    color: #e2e8f0 !important;
}

/* Dark Mode - Responsive Table */
[data-bs-theme="dark"] .table-responsive {
    background: #1a202c !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
}

/* Dark Mode - Additional Button Styles */
[data-bs-theme="dark"] .btn-light {
    background: #374151 !important;
    border-color: #374151 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .btn-light:hover {
    background: #4b5563 !important;
    border-color: #4b5563 !important;
    color: #f7fafc !important;
}

/* Dark Mode - Icon Colors */
[data-bs-theme="dark"] .bi,
[data-bs-theme="dark"] .ri,
[data-bs-theme="dark"] i {
    color: inherit !important;
}

/* Dark Mode - Dropdown Menu */
[data-bs-theme="dark"] .dropdown-menu {
    background: #2d3748 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #cbd5e0 !important;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background: #4a5568 !important;
    color: #f7fafc !important;
}

/* Dark Mode - Modal */
[data-bs-theme="dark"] .modal-content {
    background: #1a202c !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] .modal-header {
    background: #2d3748 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .modal-body {
    background: #1a202c !important;
    color: #cbd5e0 !important;
}

[data-bs-theme="dark"] .modal-footer {
    background: #2d3748 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Dark Mode - Modal Title */
[data-bs-theme="dark"] .modal-title {
    color: #f7fafc !important;
}

/* Dark Mode - Modal Text Areas and Inputs */
[data-bs-theme="dark"] .modal textarea,
[data-bs-theme="dark"] .modal input[type="text"],
[data-bs-theme="dark"] .modal input[type="email"],
[data-bs-theme="dark"] .modal input[type="password"],
[data-bs-theme="dark"] .modal input[type="number"],
[data-bs-theme="dark"] .modal .form-control {
    background: #2d3748 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #e2e8f0 !important;
    border-radius: 6px !important;
}

[data-bs-theme="dark"] .modal textarea:focus,
[data-bs-theme="dark"] .modal input:focus,
[data-bs-theme="dark"] .modal .form-control:focus {
    background: #374151 !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.1) !important;
    outline: none !important;
}

[data-bs-theme="dark"] .modal textarea::placeholder,
[data-bs-theme="dark"] .modal input::placeholder,
[data-bs-theme="dark"] .modal .form-control::placeholder {
    color: #9ca3af !important;
}

/* Dark Mode - Modal Labels and Text */
[data-bs-theme="dark"] .modal label,
[data-bs-theme="dark"] .modal .form-label {
    color: #e2e8f0 !important;
    font-weight: 500 !important;
}

[data-bs-theme="dark"] .modal p,
[data-bs-theme="dark"] .modal span,
[data-bs-theme="dark"] .modal div {
    color: #cbd5e0 !important;
}

/* Dark Mode - Modal Section Headers */
[data-bs-theme="dark"] .modal h1,
[data-bs-theme="dark"] .modal h2,
[data-bs-theme="dark"] .modal h3,
[data-bs-theme="dark"] .modal h4,
[data-bs-theme="dark"] .modal h5,
[data-bs-theme="dark"] .modal h6 {
    color: #f7fafc !important;
}

/* Dark Mode - Modal Dividers */
[data-bs-theme="dark"] .modal hr {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Dark Mode - Modal Tables inside Modal */
[data-bs-theme="dark"] .modal table,
[data-bs-theme="dark"] .modal .table {
    background: transparent !important;
}

[data-bs-theme="dark"] .modal table th,
[data-bs-theme="dark"] .modal .table th {
    background: #374151 !important;
    color: #e2e8f0 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-bs-theme="dark"] .modal table td,
[data-bs-theme="dark"] .modal .table td {
    background: #2d3748 !important;
    color: #cbd5e0 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Dark Mode - Modal Cards inside Modal */
[data-bs-theme="dark"] .modal .card {
    background: #2d3748 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-bs-theme="dark"] .modal .card-header {
    background: #374151 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .modal .card-body {
    background: #2d3748 !important;
    color: #cbd5e0 !important;
}

/* Dark Mode - Modal List Groups */
[data-bs-theme="dark"] .modal .list-group-item {
    background: #2d3748 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #cbd5e0 !important;
}

/* Dark Mode - Modal Badges inside Modal */
[data-bs-theme="dark"] .modal .badge {
    color: #ffffff !important;
    font-weight: 500 !important;
}

/* Dark Mode - Modal Row and Column Text */
[data-bs-theme="dark"] .modal .row,
[data-bs-theme="dark"] .modal .col,
[data-bs-theme="dark"] .modal .col-md-6,
[data-bs-theme="dark"] .modal .col-lg-4,
[data-bs-theme="dark"] .modal .col-sm-12 {
    color: inherit !important;
}

/* Dark Mode - Modal Strong/Bold Text */
[data-bs-theme="dark"] .modal strong,
[data-bs-theme="dark"] .modal b {
    color: #f7fafc !important;
}

/* Dark Mode - Close Button */
[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
}

/* Dark Mode - Alerts */
[data-bs-theme="dark"] .alert {
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-bs-theme="dark"] .alert-success {
    background: rgba(52, 211, 153, 0.1) !important;
    border-color: rgba(52, 211, 153, 0.3) !important;
    color: #34d399 !important;
}

[data-bs-theme="dark"] .alert-danger {
    background: rgba(248, 113, 113, 0.1) !important;
    border-color: rgba(248, 113, 113, 0.3) !important;
    color: #f87171 !important;
}

[data-bs-theme="dark"] .alert-warning {
    background: rgba(251, 191, 36, 0.1) !important;
    border-color: rgba(251, 191, 36, 0.3) !important;
    color: #fbbf24 !important;
}

[data-bs-theme="dark"] .alert-info {
    background: rgba(96, 165, 250, 0.1) !important;
    border-color: rgba(96, 165, 250, 0.3) !important;
    color: #60a5fa !important;
}/
* Dark Mode - Modal Specific Fixes for Detail Modal */
/* Perbaikan khusus untuk modal detail yang memiliki textarea dan form elements */

/* Dark Mode - All textarea elements in modal */
[data-bs-theme="dark"] .modal textarea,
[data-bs-theme="dark"] .modal-body textarea,
[data-bs-theme="dark"] .modal .form-control[rows] {
    background: #2d3748 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #e2e8f0 !important;
    border-radius: 6px !important;
    resize: vertical !important;
}

/* Dark Mode - Textarea focus state */
[data-bs-theme="dark"] .modal textarea:focus,
[data-bs-theme="dark"] .modal-body textarea:focus {
    background: #374151 !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.1) !important;
    outline: none !important;
}

/* Dark Mode - All input elements in modal */
[data-bs-theme="dark"] .modal input,
[data-bs-theme="dark"] .modal-body input,
[data-bs-theme="dark"] .modal select,
[data-bs-theme="dark"] .modal-body select {
    background: #2d3748 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #e2e8f0 !important;
    border-radius: 6px !important;
}

/* Dark Mode - Input focus states */
[data-bs-theme="dark"] .modal input:focus,
[data-bs-theme="dark"] .modal-body input:focus,
[data-bs-theme="dark"] .modal select:focus,
[data-bs-theme="dark"] .modal-body select:focus {
    background: #374151 !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.1) !important;
    outline: none !important;
}

/* Dark Mode - Modal content sections */
[data-bs-theme="dark"] .modal .modal-body > div,
[data-bs-theme="dark"] .modal .modal-body > section,
[data-bs-theme="dark"] .modal .modal-body > article {
    background: transparent !important;
    color: #cbd5e0 !important;
}

/* Dark Mode - Modal information sections with borders */
[data-bs-theme="dark"] .modal .border,
[data-bs-theme="dark"] .modal .border-top,
[data-bs-theme="dark"] .modal .border-bottom,
[data-bs-theme="dark"] .modal .border-left,
[data-bs-theme="dark"] .modal .border-right {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Dark Mode - Modal section with background */
[data-bs-theme="dark"] .modal .bg-light,
[data-bs-theme="dark"] .modal .bg-white,
[data-bs-theme="dark"] .modal .bg-gray-50,
[data-bs-theme="dark"] .modal .bg-gray-100 {
    background: #2d3748 !important;
    color: #cbd5e0 !important;
}

/* Dark Mode - Modal readonly inputs */
[data-bs-theme="dark"] .modal input[readonly],
[data-bs-theme="dark"] .modal textarea[readonly],
[data-bs-theme="dark"] .modal .form-control[readonly] {
    background: #374151 !important;
    color: #9ca3af !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Dark Mode - Modal disabled inputs */
[data-bs-theme="dark"] .modal input[disabled],
[data-bs-theme="dark"] .modal textarea[disabled],
[data-bs-theme="dark"] .modal .form-control[disabled] {
    background: #374151 !important;
    color: #6b7280 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    opacity: 0.7 !important;
}

/* Dark Mode - Modal placeholder text */
[data-bs-theme="dark"] .modal input::placeholder,
[data-bs-theme="dark"] .modal textarea::placeholder,
[data-bs-theme="dark"] .modal .form-control::placeholder {
    color: #9ca3af !important;
    opacity: 0.8 !important;
}

/* Dark Mode - Modal form groups and sections */
[data-bs-theme="dark"] .modal .form-group,
[data-bs-theme="dark"] .modal .mb-3,
[data-bs-theme="dark"] .modal .mb-4 {
    color: #cbd5e0 !important;
}

/* Dark Mode - Modal small text and help text */
[data-bs-theme="dark"] .modal .form-text,
[data-bs-theme="dark"] .modal .text-small,
[data-bs-theme="dark"] .modal .small,
[data-bs-theme="dark"] .modal small {
    color: #9ca3af !important;
}

/* Dark Mode - Modal validation states */
[data-bs-theme="dark"] .modal .is-valid {
    border-color: #34d399 !important;
}

[data-bs-theme="dark"] .modal .is-invalid {
    border-color: #f87171 !important;
}

[data-bs-theme="dark"] .modal .valid-feedback {
    color: #34d399 !important;
}

[data-bs-theme="dark"] .modal .invalid-feedback {
    color: #f87171 !important;
}

/* Dark Mode - Modal buttons in footer */
[data-bs-theme="dark"] .modal-footer .btn {
    border-radius: 6px !important;
}

[data-bs-theme="dark"] .modal-footer .btn-secondary {
    background: #4b5563 !important;
    border-color: #4b5563 !important;
    color: #f7fafc !important;
}

[data-bs-theme="dark"] .modal-footer .btn-secondary:hover {
    background: #6b7280 !important;
    border-color: #6b7280 !important;
}

/* Dark Mode - Modal backdrop */
[data-bs-theme="dark"] .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

/* Dark Mode - Modal scrollbar */
[data-bs-theme="dark"] .modal-body::-webkit-scrollbar {
    width: 8px !important;
}

[data-bs-theme="dark"] .modal-body::-webkit-scrollbar-track {
    background: #374151 !important;
    border-radius: 4px !important;
}

[data-bs-theme="dark"] .modal-body::-webkit-scrollbar-thumb {
    background: #6b7280 !important;
    border-radius: 4px !important;
}

[data-bs-theme="dark"] .modal-body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af !important;
}

/* Dark Mode - Force override any white backgrounds in modal */
[data-bs-theme="dark"] .modal *[style*="background-color: white"],
[data-bs-theme="dark"] .modal *[style*="background-color: #fff"],
[data-bs-theme="dark"] .modal *[style*="background-color: #ffffff"],
[data-bs-theme="dark"] .modal *[style*="background: white"],
[data-bs-theme="dark"] .modal *[style*="background: #fff"],
[data-bs-theme="dark"] .modal *[style*="background: #ffffff"] {
    background: #2d3748 !important;
    color: #cbd5e0 !important;
}

/* Dark Mode - Force override any black text in modal */
[data-bs-theme="dark"] .modal *[style*="color: black"],
[data-bs-theme="dark"] .modal *[style*="color: #000"],
[data-bs-theme="dark"] .modal *[style*="color: #000000"] {
    color: #cbd5e0 !important;
}/* Dark Mod
e - Ultra Specific Modal Fixes */
/* Perbaikan dengan prioritas tertinggi untuk modal elements */

/* Force all white backgrounds in modal to dark */
[data-bs-theme="dark"] .modal *,
[data-bs-theme="dark"] .modal-dialog *,
[data-bs-theme="dark"] .modal-content * {
    background-color: inherit !important;
}

/* Specific textarea fixes with maximum priority */
[data-bs-theme="dark"] .modal textarea,
[data-bs-theme="dark"] .modal-body textarea,
[data-bs-theme="dark"] .modal-dialog textarea,
[data-bs-theme="dark"] .modal-content textarea {
    background-color: #2d3748 !important;
    background: #2d3748 !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 6px !important;
}

/* Override any inline styles on textarea */
[data-bs-theme="dark"] .modal textarea[style],
[data-bs-theme="dark"] .modal-body textarea[style] {
    background-color: #2d3748 !important;
    background: #2d3748 !important;
    color: #e2e8f0 !important;
}

/* Force all form controls in modal */
[data-bs-theme="dark"] .modal input,
[data-bs-theme="dark"] .modal select,
[data-bs-theme="dark"] .modal .form-control,
[data-bs-theme="dark"] .modal .form-select {
    background-color: #2d3748 !important;
    background: #2d3748 !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Modal body background override */
[data-bs-theme="dark"] .modal-body {
    background-color: #1a202c !important;
    background: #1a202c !important;
    color: #cbd5e0 !important;
}

/* Modal content background override */
[data-bs-theme="dark"] .modal-content {
    background-color: #1a202c !important;
    background: #1a202c !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Modal header background override */
[data-bs-theme="dark"] .modal-header {
    background-color: #2d3748 !important;
    background: #2d3748 !important;
    color: #e2e8f0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Modal footer background override */
[data-bs-theme="dark"] .modal-footer {
    background-color: #2d3748 !important;
    background: #2d3748 !important;
    color: #e2e8f0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Override Bootstrap's default white backgrounds */
[data-bs-theme="dark"] .modal .bg-white,
[data-bs-theme="dark"] .modal .bg-light,
[data-bs-theme="dark"] .modal-body .bg-white,
[data-bs-theme="dark"] .modal-body .bg-light {
    background-color: #2d3748 !important;
    background: #2d3748 !important;
    color: #cbd5e0 !important;
}

/* Force text color in modal */
[data-bs-theme="dark"] .modal,
[data-bs-theme="dark"] .modal *:not(.btn):not(.badge):not(.alert) {
    color: #cbd5e0 !important;
}

/* Modal title color */
[data-bs-theme="dark"] .modal-title,
[data-bs-theme="dark"] .modal h1,
[data-bs-theme="dark"] .modal h2,
[data-bs-theme="dark"] .modal h3,
[data-bs-theme="dark"] .modal h4,
[data-bs-theme="dark"] .modal h5,
[data-bs-theme="dark"] .modal h6 {
    color: #f7fafc !important;
}

/* Modal labels */
[data-bs-theme="dark"] .modal label,
[data-bs-theme="dark"] .modal .form-label {
    color: #e2e8f0 !important;
}

/* Modal text elements */
[data-bs-theme="dark"] .modal p,
[data-bs-theme="dark"] .modal span:not(.badge),
[data-bs-theme="dark"] .modal div:not(.btn):not(.badge):not(.alert) {
    color: #cbd5e0 !important;
}

/* Ensure modal backdrop is properly dark */
[data-bs-theme="dark"] .modal-backdrop.show {
    opacity: 0.7 !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
}