/* Dark mode overrides - restored */

/* Root */
.theme-dark body {
    background-color: #0f1115;
    color: #e5e7eb;
}

/* Header */
.theme-dark .page-header.navbar {
    background-color: #111827;
    border-color: #1f2937;
}

/* Sidebar */
.theme-dark .page-sidebar { background-color: #0b0d11; }
.theme-dark .page-sidebar-menu > li > a { color: #cbd5e1; background-color: #0f131a !important; }
.theme-dark .page-sidebar-menu > li.active > a,
.theme-dark .page-sidebar-menu > li.open > a,
.theme-dark .page-sidebar-menu > li:hover > a { background-color: #111827 !important; color: #fff !important; }
/* Sidebar nav-link variants */
.theme-dark .page-sidebar-menu .nav-item > a.nav-link { color: #cbd5e1 !important; background: transparent !important; }
.theme-dark .page-sidebar-menu .nav-item > a.nav-link .title,
.theme-dark .page-sidebar-menu .nav-item > a.nav-link i { color: inherit !important; }
.theme-dark .page-sidebar-menu .nav-item > a.nav-link:hover { background-color: #111827 !important; color: #ffffff !important; }
.theme-dark .page-sidebar-menu .nav-item.active > a.nav-link,
.theme-dark .page-sidebar-menu .nav-item.open > a.nav-link { background-color: #111827 !important; color: #ffffff !important; }
/* Broader targets for links outside .nav-item wrapper */
.theme-dark .page-sidebar-menu a.nav-link { color: #cbd5e1 !important; background: transparent !important; }
.theme-dark .page-sidebar-menu a.nav-link .title,
.theme-dark .page-sidebar-menu a.nav-link i { color: inherit !important; }
.theme-dark .page-sidebar-menu a.nav-link:hover { background-color: #111827 !important; color: #ffffff !important; }
.theme-dark .page-sidebar-menu .sub-menu > li > a { color: #cbd5e1 !important; background-color: #0f131a !important; }
.theme-dark .page-sidebar-menu .sub-menu > li > a:hover { background-color: #111827 !important; color: #ffffff !important; }
/* Ensure submenu container uses dark background, not grey */
.theme-dark .page-sidebar-menu .sub-menu { background-color: #0f131a !important; }
.theme-dark .page-sidebar-menu.page-sidebar-menu-hover-submenu li .sub-menu { background-color: #0f131a !important; }
.theme-dark .page-sidebar-menu.page-sidebar-menu-hover-submenu > li:hover > a { background-color: #111827 !important; color: #ffffff !important; background-image: none !important; }
.theme-dark .page-sidebar-menu.page-sidebar-menu-hover-submenu > li:hover > .sub-menu { background-color: #0f131a !important; }
.theme-dark .page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed > li:not(.heading):hover > .sub-menu { background-color: #0f131a !important; }
.theme-dark .page-sidebar-closed .page-sidebar .page-sidebar-menu.page-sidebar-menu-closed > li:not(.heading):hover > a { background-color: #111827 !important; color: #ffffff !important; background-image: none !important; }
.theme-dark .page-sidebar-menu .sub-menu > li.active > a,
.theme-dark .page-sidebar-menu .sub-menu > li.open > a { background-color: #1a2230 !important; color: #ffffff !important; }

/* Sidebar: strengthen dark defaults for all nav links */
.theme-dark .page-sidebar .page-sidebar-menu > li > a,
.theme-dark .page-sidebar .page-sidebar-menu .sub-menu > li > a { background-color: #0f131a !important; color: #cbd5e1 !important; }
.theme-dark .page-sidebar .page-sidebar-menu > li > a .title,
.theme-dark .page-sidebar .page-sidebar-menu > li > a i,
.theme-dark .page-sidebar .page-sidebar-menu .sub-menu > li > a .title,
.theme-dark .page-sidebar .page-sidebar-menu .sub-menu > li > a i { color: inherit !important; }
.theme-dark .page-sidebar .page-sidebar-menu > li > a:hover,
.theme-dark .page-sidebar .page-sidebar-menu .sub-menu > li > a:hover { background-color: #111827 !important; color: #ffffff !important; }

/* Content and containers */
.theme-dark .page-content { background-color: #0f1115; }

/* Portlets */
.theme-dark .portlet,
.theme-dark .panel,
.theme-dark .note,
.theme-dark .m-heading-1 { background-color: #111827; color: #e5e7eb; border-color: #1f2937; }

.theme-dark .portlet.light { 
    background-color: #111827 !important; 
    color: #e5e7eb !important; 
}

.theme-dark .portlet.light.bordered { 
    border: 1px solid #2a2f3a !important; 
}
.theme-dark .portlet.light.default { 
    border: 1px solid #2a2f3a !important; 
}

.theme-dark .portlet.light.bordered > .portlet-title { 
    border-bottom: 1px solid #1f2937 !important; 
}

.theme-dark .portlet.light > .portlet-title { 
    background-color: #111827 !important; 
    color: #e5e7eb !important; 
}

/* Fix all portlet title borders */
.theme-dark .portlet-title { 
    border-bottom: 1px solid #1f2937 !important; 
}

.theme-dark .portlet.light > .portlet-title > .caption { 
    color: #e5e7eb !important; 
}

.theme-dark .portlet.light > .portlet-title > .caption > .caption-subject { 
    color: #e5e7eb !important; 
}

.theme-dark .portlet.light > .portlet-title > .caption > i { 
    color: #e5e7eb !important; 
}

.theme-dark .portlet.light .portlet-body { 
    background-color: #111827 !important; 
    color: #e5e7eb !important; 
}

/* Tables in portlets */
.theme-dark .portlet .table-game-info,
.theme-dark .portlet table { 
    color: #e5e7eb !important; 
}

.theme-dark .portlet .table-game-info th,
.theme-dark .portlet .table-game-info td { 
    color: #e5e7eb !important; 
    border-color: #2a2f3a !important; 
}

.theme-dark .portlet .table-game-info th { 
    background-color: #111827 !important; 
    color: #e5e7eb !important; 
}

.theme-dark .portlet .table-game-info td { 
    background-color: #111827 !important; 
    color: #e5e7eb !important; 
}

.theme-dark .portlet .table-game-info tr:hover th,
.theme-dark .portlet .table-game-info tr:hover td { 
    background-color: #141a22 !important; 
    color: #e5e7eb !important; 
}

.theme-dark .portlet .table-game-info a { 
    color: #60a5fa !important; 
}

.theme-dark .portlet .table-game-info a:hover { 
    color: #93c5fd !important; 
}

/* Buttons in portlets */
.theme-dark .portlet .btn-outline { 
    background-color: transparent !important; 
    border-color: #374151 !important; 
    color: #e5e7eb !important; 
}

.theme-dark .portlet .btn-outline:hover { 
    background-color: #374151 !important; 
    border-color: #4b5563 !important; 
    color: #ffffff !important; 
}

.theme-dark .portlet .btn-outline.red { 
    border-color: #dc2626 !important; 
    color: #dc2626 !important; 
}

.theme-dark .portlet .btn-outline.red:hover { 
    background-color: #dc2626 !important; 
    color: #ffffff !important; 
}

.theme-dark .portlet .btn-outline.yellow { 
    border-color: #d97706 !important; 
    color: #d97706 !important; 
}

.theme-dark .portlet .btn-outline.yellow:hover { 
    background-color: #d97706 !important; 
    color: #ffffff !important; 
}

.theme-dark .portlet .btn.red-pink { 
    background-color: #b91c1c !important; 
    border-color: #b91c1c !important; 
    color: #ffffff !important; 
}
.theme-dark .btn.red-pink { 
    background-color: #b91c1c !important; 
    border-color: #b91c1c !important; 
    color: #ffffff !important; 
}

/* Font colors in portlets */
.theme-dark .portlet .font-dark-sharp { 
    color: #e5e7eb !important; 
}

.theme-dark .portlet .caption-subject { 
    color: #e5e7eb !important; 
}

.theme-dark .portlet .caption-subject i { 
    color: #e5e7eb !important; 
}

/* Tabs/Navigation */
.theme-dark .nav-tabs > li.active > a,
.theme-dark .nav-tabs > li.active > a:hover,
.theme-dark .nav-tabs > li.active > a:focus { 
    background-color: #111827 !important; 
    color: #e5e7eb !important; 
    border-color: #2a2f3a !important; 
}

.theme-dark .nav-tabs > li > a { 
    background-color: #0f141a !important; 
    color: #cbd5e1 !important; 
    border-color: #2a2f3a !important; 
}

.theme-dark .nav-tabs > li > a:hover { 
    background-color: #141a22 !important; 
    color: #e5e7eb !important; 
    border-color: #374151 !important; 
}

.theme-dark .nav-tabs { 
    border-bottom-color: #2a2f3a !important; 
}

.theme-dark .tab-content { 
    background-color: #111827 !important; 
    color: #e5e7eb !important; 
}

/* Tables */
.theme-dark table,
.theme-dark .table { 
    color: #e5e7eb; 
    border-color: #2a2f3a !important;
}
/* Force table row separators */
.theme-dark table tbody tr,
.theme-dark .table tbody tr { 
    border-bottom: 1px solid #2a2f3a !important;
}
.theme-dark table tbody tr:last-child,
.theme-dark .table tbody tr:last-child { 
    border-bottom: none !important;
}
.theme-dark table tbody tr td,
.theme-dark .table tbody tr td { 
    border-bottom: 1px solid #2a2f3a !important;
}
.theme-dark table tbody tr:last-child td,
.theme-dark .table tbody tr:last-child td { 
    border-bottom: none !important;
}
.theme-dark .table > thead > tr > th { 
    background-color: #111827; 
    color: #e5e7eb; 
    border-color: #2a2f3a !important; 
}
.theme-dark .table > tbody > tr > td { 
    border-color: #2a2f3a !important; 
}
.theme-dark .table > tbody > tr { 
    background-color: #111827; 
}
.theme-dark .table-striped > tbody > tr:nth-of-type(odd) { 
    background-color: #111827; 
}
.theme-dark .table-striped > tbody > tr:nth-of-type(even) { 
    background-color: #111827; 
}
.theme-dark .table-hover > tbody > tr:hover { 
    background-color: #141a22 !important; 
    color: inherit !important; 
}
.theme-dark .table-hover > tbody > tr:hover > td,
.theme-dark .table-hover > tbody > tr:hover > th { 
    background-color: #141a22 !important; 
}
/* Specific styles for services table rows */
.theme-dark table.table tbody tr,
.theme-dark .table.table tbody tr { 
    border-bottom: 1px solid #2a2f3a !important;
    border-top: none !important;
}
.theme-dark table.table tbody tr:not(:last-child),
.theme-dark .table.table tbody tr:not(:last-child) { 
    border-bottom: 1px solid #2a2f3a !important;
}
.theme-dark table.table tbody tr:last-child,
.theme-dark .table.table tbody tr:last-child { 
    border-bottom: none !important;
}
.theme-dark table.table tbody tr td,
.theme-dark .table.table tbody tr td { 
    border-bottom: 1px solid #2a2f3a !important;
    padding: 8px !important;
}
.theme-dark table.table tbody tr:last-child td,
.theme-dark .table.table tbody tr:last-child td { 
    border-bottom: none !important;
}
.theme-dark .table-bordered { 
    border-color: #2a2f3a !important; 
}
/* Fix all table borders */
.theme-dark table td,
.theme-dark table th,
.theme-dark .table td,
.theme-dark .table th { 
    border-color: #2a2f3a !important; 
}
.theme-dark table,
.theme-dark .table { 
    border-color: #2a2f3a !important; 
}
/* Table scrollable wrapper */
.theme-dark .table-scrollable { 
    border-color: #2a2f3a !important; 
}
.theme-dark .table-scrollable table { 
    border-color: #2a2f3a !important; 
}

/* DataTables */
.theme-dark .dataTables_wrapper .dataTables_filter input,
.theme-dark .dataTables_wrapper .dataTables_length select { background-color: #0b0d11; color: #e5e7eb; border: 1px solid #2a2f3a; }
.theme-dark table.dataTable.stripe tbody tr.odd,
.theme-dark table.dataTable.display tbody tr.odd { background-color: #111827; }
.theme-dark table.dataTable.stripe tbody tr.even,
.theme-dark table.dataTable.display tbody tr.even { background-color: #111827; }
.theme-dark table.dataTable.hover tbody tr:hover,
.theme-dark table.dataTable.display tbody tr:hover,
.theme-dark table.dataTable tbody tr:hover { background-color: #141a22 !important; color: inherit !important; }
.theme-dark table.dataTable.display tbody tr:hover>.sorting_1,
.theme-dark table.dataTable.display tbody tr:hover>.sorting_2,
.theme-dark table.dataTable.display tbody tr:hover>.sorting_3 { background-color: #141a22 !important; }
/* DataTables border fixes */
.theme-dark table.dataTable td,
.theme-dark table.dataTable th { 
    border-color: #2a2f3a !important; 
}
.theme-dark table.dataTable { 
    border-color: #2a2f3a !important; 
}
.theme-dark .dataTables_wrapper .dataTables_paginate .paginate_button { color: #cbd5e1 !important; border: 1px solid #2a2f3a; background: #0f1115; }
.theme-dark .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.theme-dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover { background: #1b2330 !important; color: #fff !important; border-color: #374151 !important; }

/* DataTables: readable headers and sort icons */
.theme-dark table.dataTable thead th,
.theme-dark table.dataTable thead td { background-color: #111827 !important; color: #e5e7eb !important; border-bottom-color: #2a2f3a !important; }
/* Force darker header for any Bootstrap table thead */
.theme-dark .table > thead,
.theme-dark .table > thead > tr,
.theme-dark .table > thead > tr > th,
.theme-dark .table > thead > tr > td { background-color: #111827 !important; color: #e5e7eb !important; background-image: none !important; border-bottom-color: #2a2f3a !important; }
.theme-dark .dataTables_wrapper .dataTables_scrollHead thead th,
.theme-dark .dataTables_wrapper .dataTables_scrollHead thead td { background-color: #111827 !important; color: #e5e7eb !important; background-image: none !important; border-bottom-color: #2a2f3a !important; }
/* Force darker header on Bootstrap tables combined with DataTables */
.theme-dark .table.table-striped.table-bordered > thead,
.theme-dark .table.table-striped.table-bordered > thead > tr,
.theme-dark .table.table-striped.table-bordered > thead > tr > th,
.theme-dark .table.table-striped.table-bordered > thead > tr > td { background-color: #111827 !important; color: #e5e7eb !important; background-image: none !important; }
.theme-dark table.dataTable thead .sorting,
.theme-dark table.dataTable thead .sorting_asc,
.theme-dark table.dataTable thead .sorting_desc,
.theme-dark table.dataTable thead .sorting_asc_disabled,
.theme-dark table.dataTable thead .sorting_desc_disabled { background: none !important; position: relative; }
.theme-dark table.dataTable thead .sorting:after,
.theme-dark table.dataTable thead .sorting_asc:after,
.theme-dark table.dataTable thead .sorting_desc:after,
.theme-dark table.dataTable thead .sorting_asc_disabled:after,
.theme-dark table.dataTable thead .sorting_desc_disabled:after {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    display: inline-block !important;
    font-family: "Glyphicons Halflings"; font-style: normal; font-weight: normal;
    color: #9ca3af; opacity: 0.7;
}
.theme-dark table.dataTable thead .sorting:after { content: "\e150"; }
.theme-dark table.dataTable thead .sorting_asc:after { content: "\e155"; color: #e5e7eb; opacity: 1; }
.theme-dark table.dataTable thead .sorting_desc:after { content: "\e156"; color: #e5e7eb; opacity: 1; }
.theme-dark table.dataTable thead .sorting_asc_disabled:after,
.theme-dark table.dataTable thead .sorting_desc_disabled:after { color: #4b5563; opacity: 0.6; }
.theme-dark table.dataTable th.sorting_1,
.theme-dark table.dataTable th.sorting_2,
.theme-dark table.dataTable th.sorting_3 { background-color: #111827 !important; }
.theme-dark table.dataTable td.sorting_1,
.theme-dark table.dataTable td.sorting_2,
.theme-dark table.dataTable td.sorting_3 { background-color: #111827 !important; }
/* Headers with custom class used in some views */
.theme-dark thead.cf > tr > th { background-color: #111827 !important; color: #e5e7eb !important; border-bottom-color: #2a2f3a !important; }

/* Pagination */
.theme-dark .pagination>li>a,
.theme-dark .pagination>li>span { background-color: #0f1115; color: #cbd5e1; border: 1px solid #2a2f3a; }
.theme-dark .pagination>.active>a,
.theme-dark .pagination>.active>span,
.theme-dark .pagination>.active>a:focus,
.theme-dark .pagination>.active>span:focus,
.theme-dark .pagination>.active>a:hover,
.theme-dark .pagination>.active>span:hover { background-color: #1b2330; border-color: #374151; color: #fff; }
.theme-dark td.centered,
.theme-dark th.centered { color: #e5e7eb; }

/* Forms */
.theme-dark .form-control,
.theme-dark .select2-container .select2-selection,
.theme-dark .bootstrap-select .dropdown-toggle { background-color: #080b10; color: #e5e7eb; border-color: #0e1319; }
.theme-dark .form-control:focus,
.theme-dark .select2-container--default .select2-selection--single:focus,
.theme-dark .bootstrap-select .dropdown-toggle:focus { background-color: #0a0f15 !important; color: #e5e7eb !important; border-color: #17202b !important; box-shadow: none !important; }
.theme-dark .input-group-addon { background-color: #0b0d11; color: #cbd5e1; border-color: #1f2937; }
.theme-dark .input-group-btn .btn { 
    background-color: #0b0d11 !important; 
    color: #cbd5e1 !important; 
    border-color: #1f2937 !important; 
}
.theme-dark .input-group-btn .btn:hover,
.theme-dark .input-group-btn .btn:focus,
.theme-dark .input-group-btn .btn:active { 
    background-color: #1f2937 !important; 
    color: #ffffff !important; 
    border-color: #374151 !important; 
}
.theme-dark ::placeholder { color: #9ca3af; }

/* Selectize */
.theme-dark select.selectize,
.theme-dark select.form-control.selectize { background-color: #080b10 !important; color: #e5e7eb !important; border-color: #0e1319 !important; }
.theme-dark .selectize-control .selectize-input { background-color: #080b10 !important; color: #e5e7eb !important; border-color: #0e1319 !important; box-shadow: none !important; }
.theme-dark .selectize-control .selectize-input.focus { background-color: #0a0f15 !important; border-color: #17202b !important; }
.theme-dark .selectize-dropdown { background-color: #0f1115 !important; border: 1px solid #2a2f3a !important; }
.theme-dark .selectize-dropdown .option { color: #e5e7eb !important; }
.theme-dark .selectize-dropdown .option.active,
.theme-dark .selectize-dropdown .option:hover { background-color: #141a22 !important; color: #ffffff !important; }

/* Selectize: item chips and caret (better contrast) */
.theme-dark .selectize-input { background-image: none !important; }
.theme-dark .selectize-input.full { background-color: #080b10 !important; background-image: none !important; }
.theme-dark .selectize-control.single .selectize-input {
    background-color: #080b10 !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #e5e7eb !important;
}
.theme-dark .selectize-input.dropdown-active::before { background: #1f2937 !important; }
.theme-dark .selectize-control.multi .selectize-input > div {
    background: #243041 !important;
    color: #e5e7eb !important;
    border: 1px solid #374151 !important;
    text-shadow: none !important;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
}
.theme-dark .selectize-control.multi .selectize-input > div.active {
    background: #1b2838 !important;
    border-color: #4b5563 !important;
}
.theme-dark .selectize-control.multi .selectize-input.disabled > div,
.theme-dark .selectize-control.multi .selectize-input.disabled > div.active {
    background: #1f2937 !important;
    color: #9ca3af !important;
    border-color: #374151 !important;
}
.theme-dark .selectize-control.single .selectize-input > div {
    background: transparent !important;
    color: inherit !important;
    border: 0 !important;
    text-shadow: none !important;
}
.theme-dark .selectize-control.single .selectize-input:after {
    border-color: #9ca3af transparent transparent transparent !important;
}
.theme-dark .selectize-control.single .selectize-input.dropdown-active:after {
    border-color: transparent transparent #9ca3af transparent !important;
}
.theme-dark .selectize-input > input::placeholder {
    color: #9ca3af !important;
    opacity: 1;
}
.theme-dark .selectize-control .selectize-input.disabled {
    background-color: #0b0d11 !important;
    color: #9ca3af !important;
    border-color: #1f2937 !important;
}

/* Alerts (dark mode) */
.theme-dark .alert {
    background-color: #0f141a !important;
    color: #e5e7eb !important;
    border: 1px solid #2a2f3a !important;
    box-shadow: none !important;
}
.theme-dark .alert h4 { color: inherit !important; }
.theme-dark .alert .alert-link,
.theme-dark .alert a { color: #93c5fd !important; }
.theme-dark .alert .alert-link:hover,
.theme-dark .alert a:hover { color: #bfdbfe !important; }
.theme-dark .alert .close { color: #cbd5e1 !important; opacity: .9 !important; text-shadow: none !important; }
.theme-dark .alert .close:hover { color: #ffffff !important; }

/* Variant accents */
.theme-dark .alert-info {
    background-color: #0f172a !important; /* dark blue tint */
    border-color: #1f2a44 !important;
    color: #dbeafe !important;
}
.theme-dark .alert-warning {
    background-color: #1a1710 !important; /* dark amber tint */
    border-color: #3f300b !important;
    color: #fde68a !important;
}
.theme-dark .alert-danger {
    background-color: #1a1112 !important; /* dark red tint */
    border-color: #4c1d1d !important;
    color: #fecaca !important;
}
.theme-dark .alert-success {
    background-color: #0f1a14 !important; /* dark green tint */
    border-color: #14532d !important;
    color: #bbf7d0 !important;
}

/* Buttons */
.theme-dark .btn-default,
.theme-dark .btn.default { 
    background-color: #1f2937 !important; 
    color: #e5e7eb !important; 
    border-color: #374151 !important; 
    text-shadow: none !important;
    background-image: none !important;
    box-shadow: none !important;
}
.theme-dark .btn-default:hover,
.theme-dark .btn.default:hover,
.theme-dark .btn-default:focus,
.theme-dark .btn.default:focus,
.theme-dark .btn-default:active,
.theme-dark .btn.default:active { 
    background-color: #374151 !important; 
    color: #ffffff !important; 
    border-color: #4b5563 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
.theme-dark .btn-primary { 
    background-color: #0f172a !important; 
    border-color: #1f2a44 !important; 
    color: #dbeafe !important; 
    box-shadow: none !important; 
    text-shadow: none !important; 
}
.theme-dark .btn-primary:hover,
.theme-dark .btn-primary:focus,
.theme-dark .btn-primary:active,
.theme-dark .btn-primary.active,
.theme-dark .open > .dropdown-toggle.btn-primary { 
    background-color: #1e293b !important; 
    border-color: #334155 !important; 
    color: #ffffff !important; 
    box-shadow: none !important; 
}
.theme-dark .btn-primary i { 
    color: #dbeafe !important; 
}
.theme-dark .btn-primary:hover i,
.theme-dark .btn-primary:focus i,
.theme-dark .btn-primary:active i { 
    color: #ffffff !important; 
}
.theme-dark .btn-success { background-color: #14532d !important; border-color: #166534 !important; color: #f0fdf4 !important; }
.theme-dark .btn-success:hover,
.theme-dark .btn-success:focus,
.theme-dark .btn-success:active,
.theme-dark .btn-success.active,
.theme-dark .open > .dropdown-toggle.btn-success { background-color: #166534 !important; border-color: #1a7f3c !important; color: #ffffff !important; box-shadow: none !important; }
.theme-dark .btn-danger { background-color: #7f1d1d !important; border-color: #991b1b !important; color: #ffffff !important; }
.theme-dark a.btn.btn-danger { color: #ffffff !important; }
.theme-dark a.btn.btn-danger:hover { color: #ffffff !important; }
.theme-dark a.btn.btn-danger:focus { color: #ffffff !important; }
.theme-dark a.btn.btn-danger:active { color: #ffffff !important; }
.theme-dark .btn-danger:hover,
.theme-dark .btn-danger:focus,
.theme-dark .btn-danger:active,
.theme-dark .btn-danger.active,
.theme-dark .open > .dropdown-toggle.btn-danger { background-color: #991b1b !important; border-color: #b91c1c !important; color: #ffffff !important; box-shadow: none !important; }
.theme-dark .btn-warning { background-color: #92400e !important; border-color: #b45309 !important; color: #fff !important; }
.theme-dark .btn-warning:hover,
.theme-dark .btn-warning:focus,
.theme-dark .btn-warning:active,
.theme-dark .btn-warning.active,
.theme-dark .open > .dropdown-toggle.btn-warning { background-color: #b45309 !important; border-color: #d97706 !important; color: #ffffff !important; box-shadow: none !important; }
.theme-dark .btn.green,
.theme-dark .btn.green-jungle,
.theme-dark .btn.green-meadow { 
    background-color: #16a34a !important; 
    border-color: #22c55e !important; 
    color: #ffffff !important; 
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.3) !important;
    text-shadow: none !important;
}
.theme-dark .btn.green:hover,
.theme-dark .btn.green:focus,
.theme-dark .btn.green:active,
.theme-dark .btn.green-jungle:hover,
.theme-dark .btn.green-jungle:focus,
.theme-dark .btn.green-jungle:active,
.theme-dark .btn.green-meadow:hover,
.theme-dark .btn.green-meadow:focus,
.theme-dark .btn.green-meadow:active { 
    background-color: #22c55e !important; 
    border-color: #4ade80 !important; 
    color: #ffffff !important; 
    box-shadow: 0 4px 8px rgba(22, 163, 74, 0.4) !important; 
}
.theme-dark .btn.green-jungle i,
.theme-dark .btn.green i,
.theme-dark .btn.green-meadow i { 
    color: #ffffff !important; 
}
.theme-dark .btn.green-jungle:hover i,
.theme-dark .btn.green:hover i,
.theme-dark .btn.green-meadow:hover i { 
    color: #ffffff !important; 
}

/* Ensure text readability for green-jungle buttons with sbold class */
.theme-dark .btn.green-jungle.sbold,
.theme-dark .btn.green-jungle.sbold:hover,
.theme-dark .btn.green-jungle.sbold:focus,
.theme-dark .btn.green-jungle.sbold:active {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: none !important;
}

.theme-dark .btn.green-jungle.sbold i,
.theme-dark .btn.green-jungle.sbold:hover i,
.theme-dark .btn.green-jungle.sbold:focus i,
.theme-dark .btn.green-jungle.sbold:active i {
    color: #ffffff !important;
}

/* Small green-jungle buttons with sbold */
.theme-dark .btn.btn-sm.green-jungle.sbold,
.theme-dark .btn.btn-sm.green-jungle.sbold:hover,
.theme-dark .btn.btn-sm.green-jungle.sbold:focus,
.theme-dark .btn.btn-sm.green-jungle.sbold:active {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: none !important;
}

/* Maximum specificity for Upgrade button text readability */
.theme-dark a.btn.green-jungle.btn-sm.sbold,
.theme-dark a.btn.green-jungle.btn-sm.sbold:hover,
.theme-dark a.btn.green-jungle.btn-sm.sbold:focus,
.theme-dark a.btn.green-jungle.btn-sm.sbold:active,
.theme-dark a.btn.green-jungle.btn-sm.sbold:visited {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    text-decoration: none !important;
}

.theme-dark a.btn.green-jungle.btn-sm.sbold i,
.theme-dark a.btn.green-jungle.btn-sm.sbold:hover i,
.theme-dark a.btn.green-jungle.btn-sm.sbold:focus i,
.theme-dark a.btn.green-jungle.btn-sm.sbold:active i {
    color: #ffffff !important;
    text-shadow: none !important;
}
.theme-dark .btn.red { background-color: #7f1d1d !important; border-color: #991b1b !important; color: #ffffff !important; }
.theme-dark .btn.red:hover,
.theme-dark .btn.red:focus,
.theme-dark .btn.red:active { background-color: #991b1b !important; border-color: #b91c1c !important; color: #ffffff !important; box-shadow: none !important; }

/* Ensure white text for red button links */
.theme-dark a.btn.red,
.theme-dark a.btn.red:hover,
.theme-dark a.btn.red:focus,
.theme-dark a.btn.red:active,
.theme-dark a.btn.red:visited {
    color: #ffffff !important;
    text-decoration: none !important;
}

.theme-dark a.btn.red i,
.theme-dark a.btn.red:hover i,
.theme-dark a.btn.red:focus i,
.theme-dark a.btn.red:active i {
    color: #ffffff !important;
}
.theme-dark .btn-info { background-color: #0f172a !important; border-color: #1f2a44 !important; color: #dbeafe !important; }
.theme-dark .btn-info:hover,
.theme-dark .btn-info:focus,
.theme-dark .btn-info:active { background-color: #1e293b !important; border-color: #334155 !important; color: #ffffff !important; box-shadow: none !important; }
/* Striped buttons */
.theme-dark .btn.green-stripe { 
    background-color: #16a34a !important; 
    border-color: #22c55e !important; 
    color: #ffffff !important; 
    background-image: none !important;
}
.theme-dark .btn.green-stripe:hover,
.theme-dark .btn.green-stripe:focus,
.theme-dark .btn.green-stripe:active { 
    background-color: #22c55e !important; 
    border-color: #4ade80 !important; 
    color: #ffffff !important; 
    box-shadow: none !important; 
}
.theme-dark .btn.yellow-stripe { 
    background-color: #92400e !important; 
    border-color: #b45309 !important; 
    color: #ffffff !important; 
    background-image: none !important;
}
.theme-dark .btn.yellow-stripe:hover,
.theme-dark .btn.yellow-stripe:focus,
.theme-dark .btn.yellow-stripe:active { 
    background-color: #b45309 !important; 
    border-color: #d97706 !important; 
    color: #ffffff !important; 
    box-shadow: none !important; 
}
.theme-dark .btn.red-stripe { 
    background-color: #7f1d1d !important; 
    border-color: #991b1b !important; 
    color: #ffffff !important; 
    background-image: none !important;
}
.theme-dark .btn.red-stripe:hover,
.theme-dark .btn.red-stripe:focus,
.theme-dark .btn.red-stripe:active { 
    background-color: #991b1b !important; 
    border-color: #b91c1c !important; 
    color: #ffffff !important; 
    box-shadow: none !important; 
}
/* Outline buttons */
.theme-dark .btn-outline { 
    background-color: transparent !important; 
    border-color: #374151 !important; 
    color: #e5e7eb !important; 
}
.theme-dark .btn-outline:hover,
.theme-dark .btn-outline:focus,
.theme-dark .btn-outline:active { 
    background-color: #374151 !important; 
    border-color: #4b5563 !important; 
    color: #ffffff !important; 
    box-shadow: none !important; 
}
.theme-dark .btn.btn-circle { box-shadow: none !important; text-shadow: none !important; background-image: none !important; }

/* Dropdowns */
.theme-dark .dropdown-menu { 
    background-color: #0b0d11 !important; 
    border-color: #1f2937 !important; 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}
.theme-dark .dropdown-menu > li > a { 
    color: #e5e7eb !important; 
    background-color: transparent !important;
}
.theme-dark .dropdown-menu > li > a:hover,
.theme-dark .dropdown-menu > li > a:focus,
.theme-dark .dropdown-menu > li.active > a { 
    background-color: #243041 !important; 
    color: #ffffff !important; 
}
.theme-dark .dropdown-menu > li.divider { 
    background-color: #1f2937 !important; 
    border-color: #1f2937 !important; 
}

/* User dropdown menu specific styling */
.theme-dark .dropdown-user .dropdown-menu { 
    background-color: #0b0d11 !important; 
    border-color: #1f2937 !important; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}
.theme-dark .dropdown-user .dropdown-menu > li > a { 
    color: #e5e7eb !important; 
    background-color: transparent !important;
    padding: 8px 20px !important;
}
.theme-dark .dropdown-user .dropdown-menu > li > a:hover,
.theme-dark .dropdown-user .dropdown-menu > li > a:focus { 
    background-color: #243041 !important; 
    color: #ffffff !important; 
}
.theme-dark .dropdown-user .dropdown-menu > li > a i { 
    color: #9ca3af !important; 
    margin-right: 8px !important;
}
.theme-dark .dropdown-user .dropdown-menu > li > a:hover i,
.theme-dark .dropdown-user .dropdown-menu > li > a:focus i { 
    color: #ffffff !important; 
}
.theme-dark .dropdown-language > a.dropdown-toggle:hover,
.theme-dark .dropdown-language.open > a.dropdown-toggle,
.theme-dark body.login .dropdown-language > a.dropdown-toggle:hover,
.theme-dark body.login .dropdown-language.open > a.dropdown-toggle { background-color: #1a2230 !important; color: #e5e7eb !important; }
/* Login topbar (light theme) – improve contrast on hover */
body.login #login-topbar .dropdown-language > a.dropdown-toggle { color: #f3f4f6 !important; }
body.login #login-topbar .dropdown-language > a.dropdown-toggle:hover,
body.login #login-topbar .dropdown-language.open > a.dropdown-toggle { background-color: #2d3542 !important; color: #ffffff !important; }
/* Login topbar language dropdown menu items */
body.login #login-topbar .dropdown-menu.dropdown-menu-default { background: #0b0d11 !important; border-color: #1f2937 !important; }
body.login #login-topbar .dropdown-menu.dropdown-menu-default > li > a { color: #e5e7eb !important; }
body.login #login-topbar .dropdown-menu.dropdown-menu-default > li > a:hover,
body.login #login-topbar .dropdown-menu.dropdown-menu-default > li > a:focus,
body.login #login-topbar .dropdown-menu.dropdown-menu-default > li.active > a { background: #243041 !important; color: #ffffff !important; }

/* Topbar unified hover */
.theme-dark .page-header.navbar .top-menu .nav > li > a { color: #cbd5e1 !important; }
.theme-dark .page-header.navbar .top-menu .nav > li > a:hover,
.theme-dark .page-header.navbar .top-menu .nav > li > a:focus,
.theme-dark .page-header.navbar .top-menu .nav > li.open > a { background-color: #1a2230 !important; color: #e5e7eb !important; box-shadow: none !important; }
.theme-dark body.login .nav.navbar-nav.pull-right > li > a:hover,
.theme-dark body.login .nav.navbar-nav.pull-right > li > a:focus,
.theme-dark body.login .nav.navbar-nav.pull-right > li.open > a { background-color: #1a2230 !important; color: #e5e7eb !important; }

/* Topbar nav links and user dropdown */
.theme-dark a.nav-link { color: #cbd5e1 !important; background: transparent !important; }
.theme-dark a.nav-link:hover,
.theme-dark a.nav-link:focus { background-color: #1a2230 !important; color: #ffffff !important; box-shadow: none !important; }
.theme-dark .page-header.navbar .top-menu .dropdown-user > a.dropdown-toggle { background: transparent !important; color: #e5e7eb !important; }
.theme-dark .page-header.navbar .top-menu .dropdown-user > a.dropdown-toggle:hover,
.theme-dark .page-header.navbar .top-menu .dropdown-user.open > a.dropdown-toggle { background-color: #1a2230 !important; color: #ffffff !important; }
.theme-dark .page-header.navbar .top-menu .dropdown-user .username { color: #cbd5e1 !important; }
.theme-dark .page-header.navbar .top-menu .dropdown-user img.img-circle { border: 1px solid #1f2937 !important; background: #0b0d11 !important; }

/* Theme toggle button */
.theme-dark #theme-toggle,
#theme-toggle.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: auto; height: auto; padding: 0; background: transparent; border: 1px solid transparent; }
#theme-toggle.theme-toggle { color: #f3f4f6 !important; border-color: transparent !important; }
.theme-dark #theme-toggle { color: #cbd5e1 !important; }

#theme-toggle.theme-toggle:hover,
#theme-toggle.theme-toggle:focus { background-color: rgba(0,0,0,0.08) !important; border-color: transparent !important; color: #f9fafb !important; outline: none !important; }
.theme-dark #theme-toggle:hover,
.theme-dark #theme-toggle:focus { background-color: #1a2230 !important; border-color: transparent !important; color: #ffffff !important; outline: none !important; }

.theme-dark #theme-toggle i,
#theme-toggle.theme-toggle i { font-size: 20px; line-height: 1; transition: color .15s ease, transform .15s ease; }
#theme-toggle.theme-toggle .theme-icon-sun { display: none; }
#theme-toggle.theme-toggle .theme-icon-moon { display: inline-block; }
.theme-dark #theme-toggle.theme-toggle .theme-icon-sun { display: inline-block; }
.theme-dark #theme-toggle.theme-toggle .theme-icon-moon { display: none; }

/* Light mode: emphasize moon on hover (switch to dark) */
#theme-toggle.theme-toggle:hover .theme-icon-moon { color: #ffffff !important; transform: scale(1.06); }
/* Align theme toggle vertically in topbar */
 #theme-toggle.theme-toggle { margin: 0; padding: 14px 12px; height: auto; display: inline-flex; align-items: center; }
/* Align in auth header */
.theme-dark #theme-toggle.theme-toggle:hover { border-radius: 0 !important; }

/* Icon tiles/buttons */
.theme-dark a.icon-btn,
.theme-dark .icon-btn { background: #0f1115 !important; background-image: none !important; color: #e5e7eb !important; border: 1px solid #2a2f3a !important; box-shadow: none !important; text-shadow: none !important; }
.theme-dark .icon-btn i { color: #cbd5e1 !important; }
.theme-dark .icon-btn > div { color: inherit !important; }
.theme-dark .icon-btn:hover,
.theme-dark a.icon-btn:hover { background: #141a22 !important; color: #fff !important; border-color: #374151 !important; }
.theme-dark .icon-btn:hover i { color: #e5e7eb !important; }
.theme-dark .icon-btn.mhover,
.theme-dark a.icon-btn.mhover { background: #141a22 !important; background-image: none !important; color: #fff !important; border-color: #374151 !important; }
.theme-dark .icon-btn:focus,
.theme-dark .icon-btn:active { background: #141a22 !important; background-image: none !important; color: #fff !important; outline: none !important; border-color: #374151 !important; box-shadow: none !important; }

/* Dashboard tiles */
.theme-dark .tiles .tile { background: #111827 !important; border: 1px solid #2a2f3a !important; box-shadow: none !important; color: #e5e7eb !important; }
.theme-dark .tiles .tile:hover { background: #141a22 !important; }
.theme-dark .tiles .tile .tile-body i,
.theme-dark .tiles .tile .tile-body h4 { color: #e5e7eb !important; }
.theme-dark .tiles .tile .tile-object .name,
.theme-dark .tiles .tile .tile-object .number { color: #e5e7eb !important; }
.theme-dark .tiles .tile.image .tile-object .name,
.theme-dark .tiles .tile.image .tile-object .number { color: #e5e7eb !important; }
.theme-dark .tiles .tile.image .tile-body { position: relative; overflow: hidden; }
.theme-dark .tiles .tile.image .tile-body::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.35); pointer-events: none; }
.theme-dark .tiles .tile.image .tile-body img { display: block; width: 100%; height: auto; filter: brightness(0.8) saturate(0.9) contrast(0.98); }
.theme-dark .tiles .tile.bg-grey { background: #1f2937 !important; }
.theme-dark .tiles .tile.bg-green-turquoise { background: #14532d !important; }
.theme-dark .tiles .tile.bg-yellow-crusta { background: #3b2f0e !important; }
.theme-dark .tiles .tile.bg-yellow-casablanca { background: #3b2f0e !important; }
.theme-dark .tiles .tile.bg-blue { background: #0f2a44 !important; }
.theme-dark .tiles .tile.bg-red-sunglo { background: #7f1d1d !important; }

/* Tickets chat bubbles */
.theme-dark .chats .message { background-color: #0f141a !important; color: #e5e7eb !important; border: 1px solid #2a2f3a !important; }
.theme-dark .chats .in .message .arrow { border-right-color: #0f141a !important; }
.theme-dark .chats .out .message .arrow { border-left-color: #0f141a !important; }
.theme-dark .chats .name { color: #e5e7eb !important; }
.theme-dark .chats .datetime,
.theme-dark .chats .datetime small { color: #9ca3af !important; }

/* Chat form */
.theme-dark .chat-form { background-color: #0c1016 !important; border: 1px solid #17202b !important; border-radius: 4px; }
.theme-dark .chat-form textarea.form-control { background-color: #080b10 !important; background-image: none !important; color: #e5e7eb !important; border-color: #17202b !important; }

/* Auth pages */
.theme-dark body.login { background: #0f1115 !important; }
.theme-dark body.login .content { background: #111827 !important; border: 1px solid #2a2f3a !important; color: #e5e7eb !important; }
.theme-dark body.login .form-title,
.theme-dark body.login .form-title.font-green { color: #e5e7eb !important; }
.theme-dark body.login .form-control,
.theme-dark body.login .form-control.form-control-solid { background-color: #080b10 !important; color: #e5e7eb !important; border-color: #17202b !important; }
.theme-dark body.login .form-control:focus { background-color: #0a0f15 !important; border-color: #1f2a38 !important; box-shadow: none !important; }
.theme-dark body.login .rememberme,
.theme-dark body.login .forget-password,
.theme-dark body.login .create-account a { color: #cbd5e1 !important; }
.theme-dark body.login .mt-checkbox.mt-checkbox-outline > span { background: #0b0d11 !important; border-color: #2a2f3a !important; }
.theme-dark body.login .mt-checkbox.mt-checkbox-outline > input:checked ~ span:after { border-color: #93c5fd !important; }
.theme-dark body.login > div[style*='background-color'] { background-color: transparent !important; }
.theme-dark body.login .dropdown-menu.dropdown-menu-default { background: #0b0d11 !important; border-color: #1f2937 !important; }
.theme-dark body.login .dropdown-menu.dropdown-menu-default > li > a { color: #e5e7eb !important; }
.theme-dark body.login .dropdown-menu.dropdown-menu-default > li > a:hover,
.theme-dark body.login .dropdown-menu.dropdown-menu-default > li > a:focus,
.theme-dark body.login .dropdown-menu.dropdown-menu-default > li.active > a { background: #243041 !important; color: #ffffff !important; }
.theme-dark body.login .copyright { color: #9ca3af !important; }

/* Neutralize green accents */
.theme-dark .font-dark,
.theme-dark .font-dark-sharp { color: #e5e7eb !important; }
.theme-dark .font-green,
.theme-dark .font-green-meadow,
.theme-dark .font-green-seagreen,
.theme-dark .font-green-turquoise,
.theme-dark .font-green-haze,
.theme-dark .font-green-jungle,
.theme-dark .font-green-soft,
.theme-dark .font-green-dark,
.theme-dark .font-green-sharp,
.theme-dark .font-green-steel { color: #e5e7eb !important; }

/* Datepicker / Datetimepicker */
.theme-dark .datepicker,
.theme-dark .datepicker-dropdown,
.theme-dark .bootstrap-datetimepicker-widget { background-color: #0f1115 !important; color: #e5e7eb !important; border: 1px solid #2a2f3a !important; }
.theme-dark .datepicker table.table-condensed,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed { background: transparent !important; color: inherit !important; }
.theme-dark .datepicker table.table-condensed thead tr th,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed thead tr th { color: #e5e7eb !important; background: #111827 !important; border-color: #2a2f3a !important; }
.theme-dark .datepicker table.table-condensed thead tr th.prev,
.theme-dark .datepicker table.table-condensed thead tr th.next,
.theme-dark .datepicker table.table-condensed thead tr th.switch,
.theme-dark .datepicker table.table-condensed thead tr th.datepicker-switch,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed thead tr th.prev,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed thead tr th.next,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed thead tr th.switch,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed thead tr th.datepicker-switch { cursor: pointer; }
.theme-dark .datepicker table.table-condensed thead tr th.prev:hover,
.theme-dark .datepicker table.table-condensed thead tr th.next:hover,
.theme-dark .datepicker table.table-condensed thead tr th.switch:hover,
.theme-dark .datepicker table.table-condensed thead tr th.datepicker-switch:hover,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed thead tr th.prev:hover,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed thead tr th.next:hover,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed thead tr th.switch:hover,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed thead tr th.datepicker-switch:hover { background: #1a2230 !important; }
.theme-dark .datepicker table.table-condensed tbody tr td,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td { color: #e5e7eb !important; border-radius: 4px; }
.theme-dark .datepicker table.table-condensed tbody tr td.day,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.day { 
    background: transparent !important; 
    color: #e5e7eb !important;
    padding: 8px !important;
    text-align: center !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}
.theme-dark .datepicker table.table-condensed tbody tr td.day:hover,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.day:hover { 
    background: #141a22 !important; 
    color: #ffffff !important;
}
.theme-dark .datepicker table.table-condensed tbody tr td.day.active,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.day.active { 
    background: #243041 !important; 
    color: #ffffff !important; 
    border-color: #374151 !important; 
    font-weight: bold !important;
}
.theme-dark .datepicker table.table-condensed tbody tr td.day.active:hover,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.day.active:hover { 
    background: #1e40af !important; 
    color: #ffffff !important;
}
.theme-dark .datepicker table.table-condensed tbody tr td.day.disabled,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.day.disabled { 
    color: #6b7280 !important; 
    background: transparent !important; 
    cursor: not-allowed !important;
}
.theme-dark .datepicker table.table-condensed tbody tr td.day.disabled:hover,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.day.disabled:hover { 
    background: transparent !important; 
    color: #6b7280 !important;
}
.theme-dark .datepicker table.table-condensed tbody tr td.day.old,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.day.old,
.theme-dark .datepicker table.table-condensed tbody tr td.day.new,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.day.new { 
    color: #9ca3af !important; 
    background: transparent !important;
}
.theme-dark .datepicker table.table-condensed tbody tr td.day.old:hover,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.day.old:hover,
.theme-dark .datepicker table.table-condensed tbody tr td.day.new:hover,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.day.new:hover { 
    background: #141a22 !important; 
    color: #cbd5e1 !important;
}

/* Force calendar day visibility with higher specificity */
.theme-dark .datepicker table.table-condensed tbody tr td,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td,
.theme-dark .datepicker table.table-condensed tbody tr td.day,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.day { 
    color: #ffffff !important; 
    background-color: transparent !important;
    font-weight: 500 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}
.theme-dark .datepicker table.table-condensed tbody tr td.day.old,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.day.old,
.theme-dark .datepicker table.table-condensed tbody tr td.day.new,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.day.new { 
    color: #d1d5db !important; 
    background-color: transparent !important;
    font-weight: 400 !important;
}
.theme-dark .datepicker table.table-condensed tbody tr td.day.disabled,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.day.disabled { 
    color: #9ca3af !important; 
    background-color: transparent !important;
    font-weight: 400 !important;
}
.theme-dark .datepicker table.table-condensed tbody tr td.day.active,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.day.active { 
    color: #ffffff !important; 
    background-color: #1e40af !important;
    font-weight: bold !important;
    text-shadow: none !important;
}

/* Maximum priority calendar day visibility */
.theme-dark table.table-condensed tbody tr td,
.theme-dark table.table-condensed tbody tr td.day { 
    color: #ffffff !important; 
    background-color: transparent !important;
    font-weight: 500 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
}
.theme-dark table.table-condensed tbody tr td.day.old,
.theme-dark table.table-condensed tbody tr td.day.new { 
    color: #d1d5db !important; 
    background-color: transparent !important;
    font-weight: 400 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}
.theme-dark table.table-condensed tbody tr td.day.disabled { 
    color: #9ca3af !important; 
    background-color: transparent !important;
    font-weight: 400 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}
.theme-dark table.table-condensed tbody tr td.day.active { 
    color: #ffffff !important; 
    background-color: #1e40af !important;
    font-weight: bold !important;
    text-shadow: none !important;
}
.theme-dark .datepicker table.table-condensed tbody tr td.disabled,
.theme-dark .datepicker table.table-condensed tbody tr td.disabled:hover,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.disabled,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.disabled:hover { color: #6b7280 !important; background: transparent !important; }
.theme-dark .datepicker table.table-condensed tbody tr td.old,
.theme-dark .datepicker table.table-condensed tbody tr td.new,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.old,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.new { color: #6b7280 !important; }
.theme-dark .datepicker table.table-condensed tbody tr td.active,
.theme-dark .datepicker table.table-condensed tbody tr td.active:hover,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.active,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tbody tr td.active:hover { background: #243041 !important; color: #ffffff !important; border-color: #374151 !important; }
.theme-dark .datepicker table.table-condensed tfoot tr th.today,
.theme-dark .bootstrap-datetimepicker-widget table.table-condensed tfoot tr th.today { background: #0e1319 !important; color: #93c5fd !important; }

/* Multiselect */
.theme-dark .ms-container { 
    border: 1px solid #2a2f3a !important; 
}
.theme-dark .ms-container .ms-selectable,
.theme-dark .ms-container .ms-selection { 
    background-color: #0f1115 !important; 
    border: 1px solid #2a2f3a !important; 
    color: #e5e7eb !important; 
}
.theme-dark .ms-container .ms-list { 
    background: transparent !important; 
    color: inherit !important; 
    border: none !important;
}
.theme-dark .ms-container .ms-list li { 
    border: none !important; 
    border-bottom: 1px solid #2a2f3a !important;
}
.theme-dark .ms-container .ms-list li:last-child { 
    border-bottom: none !important; 
}
.theme-dark .ms-container .ms-list .ms-elem-selectable,
.theme-dark .ms-container .ms-list .ms-elem-selected { 
    color: #e5e7eb !important; 
    background: transparent !important; 
}
.theme-dark .ms-container .ms-list .ms-elem-selectable.ms-hover,
.theme-dark .ms-container .ms-list .ms-elem-selected.ms-hover,
.theme-dark .ms-container .ms-list .ms-elem-selectable:hover,
.theme-dark .ms-container .ms-list .ms-elem-selected:hover { 
    background: #141a22 !important; 
    color: #ffffff !important; 
}
.theme-dark .ms-container .ms-list .ms-elem-selected { 
    background: #243041 !important; 
    color: #ffffff !important; 
}

/* Timepicker (bootstrap-timepicker) */
.theme-dark .bootstrap-timepicker-widget { background: #0f1115 !important; color: #e5e7eb !important; border: 1px solid #2a2f3a !important; box-shadow: none !important; }
.theme-dark .bootstrap-timepicker-widget table { width: 100%; }
.theme-dark .bootstrap-timepicker-widget table td { text-align: center; }
.theme-dark .bootstrap-timepicker-widget table td a { display: inline-block; padding: 6px; color: #e5e7eb !important; background: transparent !important; border-radius: 4px; }
.theme-dark .bootstrap-timepicker-widget table td a:hover { background: #141a22 !important; color: #ffffff !important; }
.theme-dark .bootstrap-timepicker-widget .bootstrap-timepicker-hour,
.theme-dark .bootstrap-timepicker-widget .bootstrap-timepicker-minute { background: #080b10 !important; color: #e5e7eb !important; border: 1px solid #17202b !important; text-align: center; border-radius: 4px; }
.theme-dark .bootstrap-timepicker-widget .separator { color: #cbd5e1 !important; }

/* Links */
.theme-dark a { color: #93c5fd; }
.theme-dark a:hover { color: #bfdbfe; }

/* Horizontal rules */
.theme-dark hr { 
    border-color: #2a2f3a !important; 
    background-color: #2a2f3a !important; 
}

/* Modals */
.theme-dark .modal-content { background-color: #111827 !important; color: #e5e7eb !important; border: 1px solid #2a2f3a !important; box-shadow: none !important; }
.theme-dark .modal-header { border-bottom: 1px solid #1f2937 !important; background-color: #111827 !important; }
.theme-dark .modal-title { color: #e5e7eb !important; }
.theme-dark .modal-body { background-color: #111827 !important; color: #e5e7eb !important; }
.theme-dark .modal-footer { border-top: 1px solid #1f2937 !important; background-color: #111827 !important; }
.theme-dark .modal-header .close, .theme-dark .modal-header .close:focus, .theme-dark .modal-header .close:hover { color: #cbd5e1 !important; text-shadow: none !important; opacity: 1 !important; }
.theme-dark .modal-backdrop.in { background-color: #000 !important; opacity: 0.7 !important; }
.theme-dark .help-block { color: #9ca3af !important; }

/* Mobile top menu (dark, small screens) */
@media (max-width: 991px) {
    .theme-dark .page-header.navbar .top-menu,
    .theme-dark .page-header.navbar .top-menu .navbar-nav { background-color: #0f141a !important; }
    .theme-dark .page-header.navbar .top-menu .nav > li > a { color: #e5e7eb !important; }
    .theme-dark .page-header.navbar .top-menu .nav > li > a:hover,
    .theme-dark .page-header.navbar .top-menu .nav > li.open > a { background-color: #1a2230 !important; color: #ffffff !important; }
    .theme-dark .page-header.navbar .top-menu .dropdown-menu { background-color: #0b0d11 !important; border-color: #1f2937 !important; }
}

/* Dashboard stats */
.theme-dark .dashboard-stat {
    background-color: #111827 !important;
    color: #e5e7eb !important;
    border: 1px solid #2a2f3a !important;
    box-shadow: none !important;
}
.theme-dark .dashboard-stat .visual > i { color: #e5e7eb !important; opacity: .12 !important; }
.theme-dark .dashboard-stat .details .number,
.theme-dark .dashboard-stat .details .desc { color: #e5e7eb !important; }
.theme-dark .dashboard-stat .more { background-color: #0f141a !important; color: #cbd5e1 !important; border-top: 1px solid #1f2937 !important; }
.theme-dark .dashboard-stat .more:hover { background-color: #141a22 !important; color: #ffffff !important; }

/* Variant: red */
.theme-dark .dashboard-stat.red { background-color: #1a1112 !important; border-color: #4c1d1d !important; }
.theme-dark .dashboard-stat.red .more { background-color: #241314 !important; color: #fecaca !important; border-top-color: #4c1d1d !important; }

/* Buttons: red-sunglo (dark mode) */
.theme-dark .btn.red-sunglo { background-color: #7f1d1d !important; border-color: #991b1b !important; color: #ffffff !important; box-shadow: none !important; text-shadow: none !important; }
.theme-dark .btn.red-sunglo:hover,
.theme-dark .btn.red-sunglo:focus,
.theme-dark .btn.red-sunglo:active { background-color: #991b1b !important; border-color: #b91c1c !important; color: #ffffff !important; box-shadow: none !important; }

/* Red outline button (dark mode) - neutral text color */
.theme-dark .btn.btn-outline.red { color: #e5e7eb !important; border-color: #e7505a !important; }
.theme-dark .btn.btn-outline.red:hover,
.theme-dark .btn.btn-outline.red:focus,
.theme-dark .btn.btn-outline.red:active { color: #e5e7eb !important; background-color: #e7505a !important; border-color: #e7505a !important; }

/* Bootstrap Switch (dark mode) */
.theme-dark .bootstrap-switch { background: #0f1115 !important; border-color: #2a2f3a !important; }
.theme-dark .bootstrap-switch .bootstrap-switch-label { background: #0b0d11 !important; color: #cbd5e1 !important; border-left: 1px solid #1f2937 !important; border-right: 1px solid #1f2937 !important; }
.theme-dark .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary { background: #166534 !important; color: #f0fdf4 !important; }
.theme-dark .bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default { background: #1f2937 !important; color: #e5e7eb !important; }
.theme-dark .bootstrap-switch.bootstrap-switch-focused { border-color: #374151 !important; box-shadow: none !important; }
.theme-dark .bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label { background: #0b0d11 !important; }
.theme-dark .bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label { background: #0b0d11 !important; }
/* Fix low-contrast inline light backgrounds in tables (e.g., #e6ffd8) */
.theme-dark tr[style*="#e6ffd8"],
.theme-dark tr[style*="background:#e6ffd8"],
.theme-dark tr[style*="background: #e6ffd8"],
.theme-dark tr[style*="background-color:#e6ffd8"],
.theme-dark tr[style*="background-color: #e6ffd8"] {
    background-color: #11301a !important; /* dark green */
    color: #e5e7eb !important;
}
.theme-dark tr[style*="#e6ffd8"] > td { background-color: transparent !important; }

/* Fix low-contrast inline light pink rows (e.g., #ffeaf6) */
.theme-dark tr[style*="#ffeaf6"],
.theme-dark tr[style*="background:#ffeaf6"],
.theme-dark tr[style*="background: #ffeaf6"],
.theme-dark tr[style*="background-color:#ffeaf6"],
.theme-dark tr[style*="background-color: #ffeaf6"] {
    background-color: #2a161b !important; /* dark maroon */
    color: #e5e7eb !important;
}
.theme-dark tr[style*="#ffeaf6"] > td { background-color: transparent !important; }

/* Country list dropdown (International Telephone Input) */
.theme-dark .country-list {
    background-color: #111827 !important;
    border: 1px solid #2a2f3a !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.theme-dark .country-list li.country {
    background-color: #111827 !important;
    color: #e5e7eb !important;
    border-bottom: 1px solid #2a2f3a !important;
}

.theme-dark .country-list li.country:hover,
.theme-dark .country-list li.country.highlight {
    background-color: #141a22 !important;
    color: #ffffff !important;
}

.theme-dark .country-list li.country.active,
.theme-dark .country-list li.country.preferred {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

.theme-dark .country-list li.country .country-name {
    color: inherit !important;
}

.theme-dark .country-list li.country .dial-code {
    color: #9ca3af !important;
}

.theme-dark .country-list li.country:hover .dial-code,
.theme-dark .country-list li.country.highlight .dial-code,
.theme-dark .country-list li.country.active .dial-code {
    color: #cbd5e1 !important;
}

.theme-dark .country-list li.divider {
    background-color: #2a2f3a !important;
    border-top: 1px solid #374151 !important;
}

/* Form actions */
.theme-dark .form-actions {
    background-color: #111827 !important;
    border-top: 1px solid #1f2937 !important;
    color: #e5e7eb !important;
}
.theme-dark .form-actions.top {
    border-bottom: 1px solid #1f2937 !important;
    border-top: none !important;
}
.theme-dark .form-actions.nobg {
    background-color: transparent !important;
}
.theme-dark .form-actions.noborder {
    border-top: none !important;
    border-bottom: none !important;
}

/* Login form actions - override login.min.css */
.theme-dark .login .content .form-actions {
    border-bottom: 1px solid #1f2937 !important;
    background-color: #111827 !important;
    color: #e5e7eb !important;
}

/* Thumbnails (dark mode) */
.theme-dark .thumbnail {
    background-color: #111827 !important;
    border-color: #2a2f3a !important;
    color: #e5e7eb !important;
}
.theme-dark .thumbnail .caption {
    color: #e5e7eb !important;
}
.theme-dark .thumbnail:hover {
    border-color: #374151 !important;
}

/* AmCharts dark mode support */
.theme-dark .chart,
.theme-dark #chartdiv,
.theme-dark .amcharts-main-div {
    background-color: #111827 !important;
    color: #e5e7eb !important;
}
.theme-dark .amcharts-main-div svg text {
    fill: #e5e7eb !important;
}
.theme-dark .amcharts-main-div svg .amcharts-axis-label,
.theme-dark .amcharts-main-div svg .amcharts-axis-title {
    fill: #e5e7eb !important;
}
.theme-dark .amcharts-main-div svg .amcharts-grid-line {
    stroke: #374151 !important;
}
.theme-dark .amcharts-main-div svg .amcharts-axis-line {
    stroke: #6b7280 !important;
}


