/**
 * NiceAdmin Pro Dark Theme
 */

/* Base styles for dark theme */
html.theme-dark {
    --bs-body-bg: #222;
    --bs-body-color: #e4e6eb;
    --bs-border-color: #444;
    --bs-card-bg: #2d2d2d;
    --bs-card-border-color: transparent;
    --bs-card-cap-bg: #333;
    --bs-card-cap-color: #e4e6eb;
    --bs-table-bg: #2d2d2d;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.075);
    --bs-table-border-color: #444;
    --bs-input-bg: #333;
    --bs-input-border-color: #444;
    --bs-input-color: #e4e6eb;
    --bs-input-focus-bg: #3a3a3a;
    --bs-input-focus-border-color: #4154f1;
    --bs-input-focus-color: #e4e6eb;
    --bs-input-placeholder-color: #adb5bd;
    --bs-input-disabled-bg: #252525;
    --bs-input-disabled-color: #adb5bd;
    --bs-btn-light-bg: #333;
    --bs-btn-light-border-color: #444;
    --bs-btn-light-color: #e4e6eb;
    --bs-btn-light-hover-bg: #3a3a3a;
    --bs-btn-light-hover-border-color: #555;
    --bs-btn-light-hover-color: #fff;
    --bs-text-muted: #adb5bd;
    --bs-breadcrumb-color: #adb5bd;
    --bs-breadcrumb-item-active-color: #e4e6eb;
    --bs-modal-bg: #2d2d2d;
    --bs-modal-border-color: #444;
    --bs-modal-header-bg: #333;
    --bs-modal-header-border-color: #444;
    --bs-modal-footer-bg: #333;
    --bs-modal-footer-border-color: #444;
    --bs-link-color: #6776f4;
    --bs-link-hover-color: #8590f7;
}

/* Main layout elements */
html.theme-dark body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

html.theme-dark #main {
    background-color: var(--bs-body-bg);
}

/* Header */
html.theme-dark .header {
    background-color: #2d2d2d;
    border-bottom: 1px solid #444;
}

html.theme-dark .logo span {
    color: #e4e6eb;
}

html.theme-dark .header-nav .nav-profile span {
    color: #e4e6eb;
}

html.theme-dark .header-nav .badge-number {
    background-color: #4154f1;
}

html.theme-dark .header-nav .notifications .notification-item {
    background-color: #333;
}

html.theme-dark .header-nav .messages .message-item {
    background-color: #333;
}

html.theme-dark .header-nav .profile .dropdown-menu {
    background-color: #333;
    border-color: #444;
}

html.theme-dark .header-nav .profile .dropdown-item {
    color: #e4e6eb;
}

html.theme-dark .header-nav .profile .dropdown-item:hover {
    background-color: #3a3a3a;
}

html.theme-dark .header-nav .profile .dropdown-divider {
    border-color: #444;
}

/* Sidebar */
html.theme-dark .sidebar {
    background-color: #2d2d2d;
    border-right: 1px solid #444;
}

html.theme-dark .sidebar-nav .nav-link {
    color: #e4e6eb;
    background: #2d2d2d;
}

html.theme-dark .sidebar-nav .nav-link i {
    color: #c2c7d0;
}

html.theme-dark .sidebar-nav .nav-link:hover {
    color: #ffffff;
    background: #3a3a3a;
}

html.theme-dark .sidebar-nav .nav-link:hover i {
    color: #ffffff;
}

html.theme-dark .sidebar-nav .nav-link.collapsed {
    color: #e4e6eb;
    background: #2d2d2d;
}

html.theme-dark .sidebar-nav .nav-link:not(.collapsed) {
    color: #ffffff;
    background: #5563f7;
}

html.theme-dark .sidebar-nav .nav-link:not(.collapsed) i {
    color: #ffffff;
}

html.theme-dark .sidebar-nav .nav-content a {
    color: #e4e6eb;
}

html.theme-dark .sidebar-nav .nav-content a:hover,
html.theme-dark .sidebar-nav .nav-content a.active {
    color: #6776f4;
}

html.theme-dark .sidebar-nav .nav-heading {
    color: #adb5bd;
}

/* Dropdowns */
html.theme-dark .dropdown-menu {
    background-color: #333;
    border-color: #444;
}

html.theme-dark .dropdown-item {
    color: #e4e6eb;
}

html.theme-dark .dropdown-item:hover,
html.theme-dark .dropdown-item:focus {
    background-color: #3a3a3a;
    color: #fff;
}

html.theme-dark .dropdown-divider {
    border-color: #444;
}

/* Modals */
html.theme-dark .modal-content {
    background-color: #2d2d2d;
    border-color: #444;
}

html.theme-dark .modal-header {
    background-color: #333;
    border-color: #444;
}

html.theme-dark .modal-title {
    color: #e4e6eb;
}

html.theme-dark .modal-footer {
    background-color: #333;
    border-color: #444;
}

/* Alerts */
html.theme-dark .alert-primary {
    background-color: rgba(85, 99, 247, 0.2);
    border-color: rgba(85, 99, 247, 0.3);
    color: #a8b4fe;
}

html.theme-dark .alert-secondary {
    background-color: rgba(108, 117, 125, 0.2);
    border-color: rgba(108, 117, 125, 0.3);
    color: #c2c7cc;
}

html.theme-dark .alert-success {
    background-color: rgba(46, 202, 106, 0.2);
    border-color: rgba(46, 202, 106, 0.3);
    color: #75e0a7;
}

html.theme-dark .alert-info {
    background-color: rgba(23, 162, 184, 0.2);
    border-color: rgba(23, 162, 184, 0.3);
    color: #5dbecd;
}

html.theme-dark .alert-warning {
    background-color: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffda6a;
}

html.theme-dark .alert-danger {
    background-color: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.3);
    color: #ea868f;
}

html.theme-dark .alert-light {
    background-color: rgba(248, 249, 250, 0.2);
    border-color: rgba(248, 249, 250, 0.3);
    color: #f8f9fa;
}

html.theme-dark .alert-dark {
    background-color: rgba(33, 37, 41, 0.2);
    border-color: rgba(33, 37, 41, 0.3);
    color: #c6c7c8;
}

/* Page title */
html.theme-dark .pagetitle h1 {
    color: #f0f2f5;
}

/* Cards */
html.theme-dark .card {
    background-color: #2d2d2d;
    border: none;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

html.theme-dark .card-title {
    color: #f0f2f5;
}

html.theme-dark .card-subtitle {
    color: #adb5bd;
}

html.theme-dark .card-header,
html.theme-dark .card-footer {
    background-color: #333;
    border-color: #444;
    color: #e4e6eb;
}

html.theme-dark .card-text {
    color: #e4e6eb;
}

html.theme-dark .card-link {
    color: var(--bs-link-color);
}

html.theme-dark .card-link:hover {
    color: var(--bs-link-hover-color);
}

/* Card icons */
html.theme-dark .card-icon {
    background-color: #333;
    color: #e4e6eb;
}

html.theme-dark .dashboard .card-icon {
    background-color: rgba(85, 99, 247, 0.2);
    color: #6776f4;
}

html.theme-dark .dashboard .productionruns-card .card-icon {
    background-color: rgba(219, 7, 61, 0.2);
    color: #db073d;
}

/* Activity cards */
html.theme-dark .activity-item {
    border-left-color: #444;
}

html.theme-dark .activity-content {
    color: #e4e6eb;
}

/* Recent activity */
html.theme-dark .recent-activity .activity-item {
    border-left-color: #444;
}

html.theme-dark .recent-activity .activity-item::before {
    background-color: #444;
}

html.theme-dark .recent-activity .activity-content {
    color: #e4e6eb;
}

/* News & Updates */
html.theme-dark .news .post-item {
    border-bottom-color: #444;
}

html.theme-dark .news .post-item .post-title {
    color: #f0f2f5;
}

html.theme-dark .news .post-item .post-category {
    background-color: #333;
    color: #e4e6eb;
}

/* Dashboard cards */
html.theme-dark .dashboard .info-card {
    background-color: #2d2d2d;
}

html.theme-dark .dashboard .info-card h6 {
    color: #f0f2f5;
}

html.theme-dark .dashboard .info-card .card-icon {
    background-color: rgba(85, 99, 247, 0.2);
}

html.theme-dark .dashboard .sales-card .card-icon {
    background-color: rgba(46, 202, 106, 0.2);
    color: #2eca6a;
}

html.theme-dark .dashboard .revenue-card .card-icon {
    background-color: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

html.theme-dark .dashboard .customers-card .card-icon {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

/* Tables */
html.theme-dark .table {
    color: #e4e6eb;
    border-color: #444;
    background-color: #2d2d2d;
}

html.theme-dark .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.03);
}

html.theme-dark .table-hover > tbody > tr:hover {
    background-color: rgba(85, 99, 247, 0.08);
    color: #ffffff;
}

html.theme-dark .table th,
html.theme-dark .table td {
    border-color: #444;
    padding: 0.75rem;
}

html.theme-dark .table thead th {
    background-color: #333;
    color: #ffffff;
    border-bottom: 2px solid #555;
    font-weight: 600;
}

html.theme-dark .table-bordered {
    border-color: #444;
}

html.theme-dark .table-bordered th,
html.theme-dark .table-bordered td {
    border-color: #444;
}

html.theme-dark .table caption {
    color: #adb5bd;
    padding: 0.75rem;
}

/* Table variants */
html.theme-dark .table-light {
    background-color: #333;
    color: #e4e6eb;
}

html.theme-dark .table-dark {
    background-color: #1a1a1a;
    color: #e4e6eb;
}

/* Forms */
html.theme-dark .form-control,
html.theme-dark .form-select {
    background-color: #333;
    border-color: #444;
    color: #e4e6eb;
}

html.theme-dark .form-control:focus,
html.theme-dark .form-select:focus {
    background-color: #3a3a3a;
    border-color: #5563f7;
    color: #e4e6eb;
    box-shadow: 0 0 0 0.25rem rgba(85, 99, 247, 0.25);
}

html.theme-dark .form-control::placeholder {
    color: #adb5bd;
}

html.theme-dark .form-control:disabled,
html.theme-dark .form-control[readonly],
html.theme-dark .form-select:disabled {
    background-color: #252525;
    color: #adb5bd;
}

html.theme-dark .form-text {
    color: #adb5bd;
}

html.theme-dark .form-check-input {
    background-color: #333;
    border-color: #444;
}

html.theme-dark .form-check-input:checked {
    background-color: #5563f7;
    border-color: #5563f7;
}

html.theme-dark .form-check-input:focus {
    border-color: #5563f7;
    box-shadow: 0 0 0 0.25rem rgba(85, 99, 247, 0.25);
}

html.theme-dark .form-check-label {
    color: #e4e6eb;
}

html.theme-dark .form-range::-webkit-slider-thumb {
    background-color: #4154f1;
}

html.theme-dark .form-range::-moz-range-thumb {
    background-color: #4154f1;
}

html.theme-dark .form-range::-webkit-slider-runnable-track {
    background-color: #333;
}

html.theme-dark .form-range::-moz-range-track {
    background-color: #333;
}

html.theme-dark .input-group-text {
    background-color: #333;
    border-color: #444;
    color: #e4e6eb;
}

html.theme-dark .form-floating > .form-control:focus ~ label,
html.theme-dark .form-floating > .form-control:not(:placeholder-shown) ~ label,
html.theme-dark .form-floating > .form-select ~ label {
    color: #adb5bd;
}

html.theme-dark .form-floating > label {
    color: #adb5bd;
}

/* Buttons */
html.theme-dark .btn-light {
    background-color: #333;
    border-color: #444;
    color: #e4e6eb;
}

html.theme-dark .btn-light:hover {
    background-color: #3a3a3a;
    border-color: #555;
    color: #fff;
}

html.theme-dark .btn-dark {
    background-color: #1a1a1a;
    border-color: #000;
    color: #fff;
}

html.theme-dark .btn-dark:hover {
    background-color: #000;
    border-color: #000;
    color: #fff;
}

html.theme-dark .btn-outline-light {
    color: #e4e6eb;
    border-color: #444;
}

html.theme-dark .btn-outline-light:hover {
    background-color: #333;
    color: #fff;
}

html.theme-dark .btn-outline-dark {
    color: #e4e6eb;
    border-color: #1a1a1a;
}

html.theme-dark .btn-outline-dark:hover {
    background-color: #1a1a1a;
    color: #fff;
}

html.theme-dark .btn-link {
    color: var(--bs-link-color);
}

html.theme-dark .btn-link:hover {
    color: var(--bs-link-hover-color);
}

html.theme-dark .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Text elements */
html.theme-dark h1, 
html.theme-dark h2, 
html.theme-dark h3, 
html.theme-dark h4, 
html.theme-dark h5, 
html.theme-dark h6 {
    color: #f0f2f5;
}

html.theme-dark .text-muted {
    color: var(--bs-text-muted) !important;
}

html.theme-dark .text-primary {
    color: #6776f4 !important;
}

html.theme-dark .text-success {
    color: #2eca6a !important;
}

html.theme-dark .text-danger {
    color: #ea868f !important;
}

html.theme-dark .text-info {
    color: #17a2b8 !important;
}

html.theme-dark .text-warning {
    color: #ffda6a !important;
}

html.theme-dark .text-dark {
    color: #e4e6eb !important;
}

html.theme-dark a {
    color: #6776f4;
}

html.theme-dark a:hover {
    color: #8590f7;
}

/* Badges */
html.theme-dark .badge.bg-light {
    background-color: #333 !important;
    color: #e4e6eb;
}

html.theme-dark .badge.bg-dark {
    background-color: #111 !important;
    color: #fff;
}

html.theme-dark .badge.bg-primary {
    background-color: #5563f7 !important;
}

html.theme-dark .badge.bg-info {
    background-color: #17a2b8 !important;
}

/* Breadcrumbs */
html.theme-dark .breadcrumb {
    color: var(--bs-text-muted);
}

html.theme-dark .breadcrumb a {
    color: var(--bs-text-muted);
}

html.theme-dark .breadcrumb a:hover {
    color: var(--bs-body-color);
}

html.theme-dark .breadcrumb .breadcrumb-item::before {
    color: var(--bs-text-muted);
}

html.theme-dark .breadcrumb .active {
    color: #e4e6eb;
}

/* Progress bar */
html.theme-dark .progress {
    background-color: #333;
}

/* Select2 */
html.theme-dark .select2-container--default .select2-selection--single,
html.theme-dark .select2-container--default .select2-selection--multiple {
    background-color: #333;
    border-color: #444;
}

html.theme-dark .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #e4e6eb;
}

html.theme-dark .select2-container--default .select2-dropdown {
    background-color: #333;
    border-color: #444;
}

html.theme-dark .select2-container--default .select2-results__option {
    color: #e4e6eb;
}

html.theme-dark .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #4154f1;
    color: #fff;
}

html.theme-dark .select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #3a3a3a;
}

html.theme-dark .select2-search--dropdown .select2-search__field {
    background-color: #333;
    border-color: #444;
    color: #e4e6eb;
}

html.theme-dark .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #3a3a3a;
    border-color: #444;
    color: #e4e6eb;
}

html.theme-dark .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #adb5bd;
}

/* DataTables */
html.theme-dark .dataTable-table {
    color: #e4e6eb;
    border-color: #444;
    background-color: #2d2d2d;
}

html.theme-dark .dataTable-table thead th {
    background-color: #333;
    border-color: #444;
    color: #ffffff;
    font-weight: 600;
    border-bottom: 2px solid #555;
    padding: 0.75rem;
}

html.theme-dark .dataTable-table tbody tr {
    background-color: #2d2d2d;
    border-bottom: 1px solid #444;
}

html.theme-dark .dataTable-table tbody tr:nth-child(odd) {
    background-color: rgba(255, 255, 255, 0.03);
}

html.theme-dark .dataTable-table tbody tr:hover {
    background-color: rgba(85, 99, 247, 0.08);
    color: #ffffff;
}

html.theme-dark .dataTable-table tbody td {
    padding: 0.75rem;
}

html.theme-dark .dataTable-wrapper .dataTable-top,
html.theme-dark .dataTable-wrapper .dataTable-bottom {
    background-color: #2d2d2d;
    border-color: #444;
    color: #e4e6eb;
    padding: 0.75rem;
}

html.theme-dark .dataTable-selector {
    background-color: #333;
    border-color: #444;
    color: #e4e6eb;
    padding: 0.375rem 1.75rem 0.375rem 0.75rem;
}

html.theme-dark .dataTable-input {
    background-color: #333;
    border-color: #444;
    color: #e4e6eb;
    padding: 0.375rem 0.75rem;
}

html.theme-dark .dataTable-info {
    margin: 7px 0;
    color: #adb5bd;
}

html.theme-dark .dataTable-pagination {
    margin: 0;
}

html.theme-dark .dataTable-pagination a {
    background-color: #333;
    border-color: #444;
    color: #e4e6eb;
    margin: 0 2px;
}

html.theme-dark .dataTable-pagination a:hover {
    background-color: #3a3a3a;
    border-color: #555;
    color: #fff;
}

html.theme-dark .dataTable-pagination .active a {
    background-color: #5563f7;
    border-color: #5563f7;
    color: #fff;
}

/* Theme toggle button */
#toggleTheme {
    transition: all 0.3s ease;
}

html.theme-dark #toggleTheme {
    background-color: #333;
    border-color: #444;
    color: #e4e6eb;
}

html.theme-dark #toggleTheme:hover {
    background-color: #3a3a3a;
    border-color: #555;
}

/* Charts */
html.theme-dark .apexcharts-canvas .apexcharts-title-text,
html.theme-dark .apexcharts-canvas .apexcharts-legend-text,
html.theme-dark .apexcharts-canvas .apexcharts-xaxis-label,
html.theme-dark .apexcharts-canvas .apexcharts-yaxis-label {
    fill: #e4e6eb !important;
}

html.theme-dark .apexcharts-canvas .apexcharts-grid line {
    stroke: #444 !important;
}

html.theme-dark .apexcharts-canvas .apexcharts-tooltip {
    background-color: #333 !important;
    border-color: #444 !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3) !important;
}

html.theme-dark .apexcharts-canvas .apexcharts-tooltip-title {
    background-color: #3a3a3a !important;
    border-color: #444 !important;
}

html.theme-dark .apexcharts-canvas .apexcharts-tooltip-text {
    color: #e4e6eb !important;
}

html.theme-dark .apexcharts-canvas .apexcharts-menu {
    background-color: #333 !important;
    border-color: #444 !important;
}

html.theme-dark .apexcharts-canvas .apexcharts-menu-item {
    color: #e4e6eb !important;
}

html.theme-dark .apexcharts-canvas .apexcharts-menu-item:hover {
    background-color: #3a3a3a !important;
}

html.theme-dark .apexcharts-canvas .apexcharts-legend-marker {
    stroke: #444 !important;
}

html.theme-dark .apexcharts-canvas .apexcharts-legend-series {
    color: #e4e6eb !important;
}

html.theme-dark .apexcharts-canvas .apexcharts-gridline {
    stroke: #444 !important;
}

html.theme-dark .apexcharts-canvas .apexcharts-series-area {
    fill-opacity: 0.3 !important;
}

html.theme-dark .apexcharts-canvas .apexcharts-zoom-icon svg,
html.theme-dark .apexcharts-canvas .apexcharts-zoomin-icon svg,
html.theme-dark .apexcharts-canvas .apexcharts-zoomout-icon svg,
html.theme-dark .apexcharts-canvas .apexcharts-reset-icon svg,
html.theme-dark .apexcharts-canvas .apexcharts-pan-icon svg,
html.theme-dark .apexcharts-canvas .apexcharts-selection-icon svg,
html.theme-dark .apexcharts-canvas .apexcharts-menu-icon svg,
html.theme-dark .apexcharts-canvas .apexcharts-toolbar-custom-icon svg {
    fill: #e4e6eb !important;
}

/* Sparklines */
html.theme-dark #sparkline-active,
html.theme-dark #sparkline-completed,
html.theme-dark #sparkline-canceled {
    background-color: transparent !important;
}

/* Other visualizations */
html.theme-dark .echart-line-chart,
html.theme-dark .echart-bar-chart,
html.theme-dark .echart-pie-chart {
    background-color: transparent !important;
}

/* Footer */
html.theme-dark .footer {
    background-color: #2d2d2d;
    border-top: 1px solid #444;
    color: #e4e6eb;
}

html.theme-dark .footer a {
    color: var(--bs-link-color);
}

html.theme-dark .footer a:hover {
    color: var(--bs-link-hover-color);
}

/* Scrollbar */
html.theme-dark ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

html.theme-dark ::-webkit-scrollbar-track {
    background: #2d2d2d;
}

html.theme-dark ::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 5px;
}

html.theme-dark ::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Tooltips */
html.theme-dark .tooltip .tooltip-inner {
    background-color: #333;
    color: #e4e6eb;
}

html.theme-dark .tooltip .tooltip-arrow::before {
    border-top-color: #333;
    border-bottom-color: #333;
}

html.theme-dark .bs-tooltip-top .tooltip-arrow::before,
html.theme-dark .bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before {
    border-top-color: #333;
}

html.theme-dark .bs-tooltip-bottom .tooltip-arrow::before,
html.theme-dark .bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before {
    border-bottom-color: #333;
}

html.theme-dark .bs-tooltip-start .tooltip-arrow::before,
html.theme-dark .bs-tooltip-auto[data-popper-placement^=left] .tooltip-arrow::before {
    border-left-color: #333;
}

html.theme-dark .bs-tooltip-end .tooltip-arrow::before,
html.theme-dark .bs-tooltip-auto[data-popper-placement^=right] .tooltip-arrow::before {
    border-right-color: #333;
}

/* Popovers */
html.theme-dark .popover {
    background-color: #333;
    border-color: #444;
}

html.theme-dark .popover-header {
    background-color: #3a3a3a;
    border-bottom-color: #444;
    color: #e4e6eb;
}

html.theme-dark .popover-body {
    color: #e4e6eb;
}

html.theme-dark .bs-popover-top .popover-arrow::before,
html.theme-dark .bs-popover-auto[data-popper-placement^=top] .popover-arrow::before {
    border-top-color: #444;
}

html.theme-dark .bs-popover-top .popover-arrow::after,
html.theme-dark .bs-popover-auto[data-popper-placement^=top] .popover-arrow::after {
    border-top-color: #333;
}

html.theme-dark .bs-popover-bottom .popover-arrow::before,
html.theme-dark .bs-popover-auto[data-popper-placement^=bottom] .popover-arrow::before {
    border-bottom-color: #444;
}

html.theme-dark .bs-popover-bottom .popover-arrow::after,
html.theme-dark .bs-popover-auto[data-popper-placement^=bottom] .popover-arrow::after {
    border-bottom-color: #333;
}

html.theme-dark .bs-popover-start .popover-arrow::before,
html.theme-dark .bs-popover-auto[data-popper-placement^=left] .popover-arrow::before {
    border-left-color: #444;
}

html.theme-dark .bs-popover-start .popover-arrow::after,
html.theme-dark .bs-popover-auto[data-popper-placement^=left] .popover-arrow::after {
    border-left-color: #333;
}

html.theme-dark .bs-popover-end .popover-arrow::before,
html.theme-dark .bs-popover-auto[data-popper-placement^=right] .popover-arrow::before {
    border-right-color: #444;
}

html.theme-dark .bs-popover-end .popover-arrow::after,
html.theme-dark .bs-popover-auto[data-popper-placement^=right] .popover-arrow::after {
    border-right-color: #333;
}

/* Improved contrast for buttons in dark mode */
html.theme-dark .btn-primary {
    background-color: #4d5ef7;
    border-color: #4d5ef7;
    color: #ffffff;
}

html.theme-dark .btn-primary:hover {
    background-color: #6271f9;
    border-color: #6271f9;
}

html.theme-dark .btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #ffffff;
}

html.theme-dark .btn-info:hover {
    background-color: #1fc8e3;
    border-color: #1fc8e3;
}

html.theme-dark .btn-outline-primary {
    color: #6776f4;
    border-color: #6776f4;
}

html.theme-dark .btn-outline-primary:hover {
    background-color: #6776f4;
    color: #ffffff;
}

html.theme-dark .btn-outline-info {
    color: #17a2b8;
    border-color: #17a2b8;
}

html.theme-dark .btn-outline-info:hover {
    background-color: #17a2b8;
    color: #ffffff;
}

/* Enhanced sidebar menu icons */
html.theme-dark .sidebar-nav .nav-link i {
    color: #c2c7d0;
}

html.theme-dark .sidebar-nav .nav-link:hover i {
    color: #ffffff;
}

html.theme-dark .sidebar-nav .nav-link.collapsed i {
    color: #c2c7d0;
}

html.theme-dark .sidebar-nav .nav-link:not(.collapsed) i {
    color: #ffffff;
}

/* Enhanced text colors for better contrast */
html.theme-dark .text-primary {
    color: #6776f4 !important;
}

html.theme-dark .text-info {
    color: #17a2b8 !important;
}

/* Enhanced link colors */
html.theme-dark a {
    color: #6776f4;
}

html.theme-dark a:hover {
    color: #8590f7;
}

/* Enhanced toggle sidebar button */
html.theme-dark .toggle-sidebar-btn {
    color: #ffffff;
    font-size: 24px;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

html.theme-dark .toggle-sidebar-btn:hover {
    color: #6776f4;
}

/* Enhanced header icons */
html.theme-dark .header .nav-icon {
    color: #c2c7d0;
}

html.theme-dark .header .nav-icon:hover {
    color: #ffffff;
}

/* Enhanced active menu items */
html.theme-dark .sidebar-nav .nav-link:not(.collapsed) {
    color: #ffffff;
    background: #5563f7;
}

html.theme-dark .sidebar-nav .nav-content a.active {
    color: #6776f4;
}

/* Enhanced badge colors */
html.theme-dark .badge.bg-primary {
    background-color: #5563f7 !important;
}

html.theme-dark .badge.bg-info {
    background-color: #17a2b8 !important;
}

/* Enhanced progress bars */
html.theme-dark .progress-bar.bg-primary {
    background-color: #5563f7 !important;
}

html.theme-dark .progress-bar.bg-info {
    background-color: #17a2b8 !important;
}

/* Enhanced alerts */
html.theme-dark .alert-primary {
    background-color: rgba(85, 99, 247, 0.2);
    border-color: rgba(85, 99, 247, 0.3);
    color: #a8b4fe;
}

html.theme-dark .alert-info {
    background-color: rgba(23, 162, 184, 0.2);
    border-color: rgba(23, 162, 184, 0.3);
    color: #5dbecd;
}

/* Enhanced form focus states */
html.theme-dark .form-control:focus,
html.theme-dark .form-select:focus {
    border-color: #5563f7;
    box-shadow: 0 0 0 0.25rem rgba(85, 99, 247, 0.25);
}

html.theme-dark .form-check-input:checked {
    background-color: #5563f7;
    border-color: #5563f7;
}

html.theme-dark .form-check-input:focus {
    border-color: #5563f7;
    box-shadow: 0 0 0 0.25rem rgba(85, 99, 247, 0.25);
}

/* Enhanced pagination */
html.theme-dark .dataTable-pagination .active a {
    background-color: #5563f7;
    border-color: #5563f7;
}

/* Enhanced dropdown active items */
html.theme-dark .dropdown-item.active, 
html.theme-dark .dropdown-item:active {
    background-color: #5563f7;
    color: #ffffff;
}

/* Responsive tables */
html.theme-dark .table-responsive {
    border-color: #444;
    background-color: #2d2d2d;
    position: relative;
}

html.theme-dark .table-responsive .table {
    background-color: #2d2d2d;
}

/* Fix for table-responsive scrollbar */
html.theme-dark .table-responsive::-webkit-scrollbar {
    height: 8px;
    background-color: #2d2d2d;
}

html.theme-dark .table-responsive::-webkit-scrollbar-thumb {
    background-color: #444;
    border-radius: 4px;
}

html.theme-dark .table-responsive::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

/* Right shadow for horizontal scroll indication */
html.theme-dark .table-responsive.has-scroll::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(to right, rgba(45, 45, 45, 0), rgba(45, 45, 45, 1));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

html.theme-dark .table-responsive.has-scroll.has-right-scroll::after {
    opacity: 1;
}

/* Left shadow for horizontal scroll indication */
html.theme-dark .table-responsive.has-scroll::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(to left, rgba(45, 45, 45, 0), rgba(45, 45, 45, 1));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

html.theme-dark .table-responsive.has-scroll.has-left-scroll::before {
    opacity: 1;
}

/* Enhanced table row actions and buttons */
html.theme-dark .table .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

html.theme-dark .table .btn-outline-primary {
    color: #6776f4;
    border-color: #6776f4;
}

html.theme-dark .table .btn-outline-primary:hover {
    background-color: #6776f4;
    color: #ffffff;
}

html.theme-dark .table .btn-outline-info {
    color: #17a2b8;
    border-color: #17a2b8;
}

html.theme-dark .table .btn-outline-info:hover {
    background-color: #17a2b8;
    color: #ffffff;
}

html.theme-dark .table .btn-outline-success {
    color: #2eca6a;
    border-color: #2eca6a;
}

html.theme-dark .table .btn-outline-success:hover {
    background-color: #2eca6a;
    color: #ffffff;
}

html.theme-dark .table .btn-outline-danger {
    color: #ea868f;
    border-color: #ea868f;
}

html.theme-dark .table .btn-outline-danger:hover {
    background-color: #ea868f;
    color: #ffffff;
}

/* Enhanced table badges */
html.theme-dark .table .badge {
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 600;
}

/* Enhanced table status indicators */
html.theme-dark .table .status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

html.theme-dark .table .status-active {
    background-color: #2eca6a;
}

html.theme-dark .table .status-inactive {
    background-color: #adb5bd;
}

html.theme-dark .table .status-pending {
    background-color: #ffc107;
}

html.theme-dark .table .status-error {
    background-color: #dc3545;
}

/* Enhanced table icons */
html.theme-dark .table i.bi,
html.theme-dark .table i.bx {
    font-size: 1.1rem;
}

/* Enhanced table action buttons group */
html.theme-dark .table .action-buttons {
    display: flex;
    gap: 0.25rem;
}

/* Enhanced table row details */
html.theme-dark .table .row-details {
    background-color: #333;
    border-top: 1px solid #444;
    padding: 1rem;
}

/* Enhanced table card view (for mobile) */
@media (max-width: 767.98px) {
    html.theme-dark .table-card-view .card {
        background-color: #2d2d2d;
        border: 1px solid #444;
        margin-bottom: 1rem;
    }
    
    html.theme-dark .table-card-view .card-header {
        background-color: #333;
        border-bottom: 1px solid #444;
        padding: 0.75rem 1rem;
    }
    
    html.theme-dark .table-card-view .card-body {
        padding: 1rem;
    }
}

/* Enhanced table header and footer */
html.theme-dark .table thead {
    background-color: #333;
    vertical-align: bottom;
}

html.theme-dark .table thead th {
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 2px solid #555;
}

html.theme-dark .table thead th.sortable {
    cursor: pointer;
}

html.theme-dark .table thead th.sortable:hover {
    background-color: #3a3a3a;
}

html.theme-dark .table thead th.sortable:after {
    content: "\F282"; /* Bootstrap icon sort */
    font-family: "bootstrap-icons";
    font-size: 0.8rem;
    margin-left: 0.5rem;
    opacity: 0.5;
}

html.theme-dark .table thead th.sortable.asc:after {
    content: "\F57A"; /* Bootstrap icon sort-up */
    opacity: 1;
}

html.theme-dark .table thead th.sortable.desc:after {
    content: "\F575"; /* Bootstrap icon sort-down */
    opacity: 1;
}

html.theme-dark .table tfoot {
    background-color: #333;
    border-top: 2px solid #555;
}

html.theme-dark .table tfoot th,
html.theme-dark .table tfoot td {
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem;
}

/* Enhanced table search and filter section */
html.theme-dark .table-filter-bar {
    background-color: #2d2d2d;
    border: 1px solid #444;
    border-bottom: none;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

html.theme-dark .table-filter-bar .form-control,
html.theme-dark .table-filter-bar .form-select {
    background-color: #333;
    border-color: #444;
    color: #e4e6eb;
}

html.theme-dark .table-filter-bar .form-control:focus,
html.theme-dark .table-filter-bar .form-select:focus {
    background-color: #3a3a3a;
    border-color: #5563f7;
    color: #e4e6eb;
}

/* Enhanced table pagination */
html.theme-dark .table-pagination {
    background-color: #2d2d2d;
    border: 1px solid #444;
    border-top: none;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

html.theme-dark .table-pagination .pagination {
    margin-bottom: 0;
}

html.theme-dark .table-pagination .pagination .page-item .page-link {
    background-color: #333;
    border-color: #444;
    color: #e4e6eb;
}

html.theme-dark .table-pagination .pagination .page-item.active .page-link {
    background-color: #5563f7;
    border-color: #5563f7;
    color: #ffffff;
}

html.theme-dark .table-pagination .pagination .page-item .page-link:hover {
    background-color: #3a3a3a;
    border-color: #555;
    color: #ffffff;
}

html.theme-dark .table-pagination .pagination .page-item.disabled .page-link {
    background-color: #2d2d2d;
    border-color: #444;
    color: #6c757d;
}

/* Fix for responsive tables at smaller screen sizes */
@media (max-width: 767.98px) {
    html.theme-dark .table-responsive {
        border: 1px solid #444;
        border-radius: 0.25rem;
        overflow: hidden;
    }
    
    html.theme-dark .table-responsive .table {
        border-color: #444;
        margin-bottom: 0;
    }
    
    html.theme-dark .table-responsive .table th,
    html.theme-dark .table-responsive .table td {
        white-space: nowrap;
    }
    
    /* Improve mobile table appearance */
    html.theme-dark .table-sm-stack {
        display: block;
        width: 100%;
    }
    
    html.theme-dark .table-sm-stack thead {
        display: none;
    }
    
    html.theme-dark .table-sm-stack tr {
        display: block;
        border-bottom: 2px solid #444;
        margin-bottom: 0.5rem;
    }
    
    html.theme-dark .table-sm-stack td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #444;
        padding: 0.75rem;
        text-align: right;
    }
    
    html.theme-dark .table-sm-stack td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: auto;
        text-align: left;
    }
} 