/* ===================================================
   HRSALE / TimeHRM - Premium Charcoal Dark Theme
   Zero-Flash / High Performance Dark Mode Stylesheet
   Reference Palette: Deep Neutral Charcoal (#121214 & #18181b)
   =================================================== */

/* Root, Body & Preloader */
html.dark-mode,
html.dark-mode body,
body.dark-mode {
    background-color: #121214 !important;
    color: #e4e4e7 !important;
}

html.dark-mode .loader-bg,
body.dark-mode .loader-bg {
    background-color: #121214 !important;
}

html.dark-mode .loader-track,
body.dark-mode .loader-track {
    background-color: #18181b !important;
}

/* Base Text & High Contrast Typography (White & Light Zinc) */
html.dark-mode h1, html.dark-mode h2, html.dark-mode h3, 
html.dark-mode h4, html.dark-mode h5, html.dark-mode h6,
html.dark-mode .h1, html.dark-mode .h2, html.dark-mode .h3, 
html.dark-mode .h4, html.dark-mode .h5, html.dark-mode .h6,
html.dark-mode strong, html.dark-mode b, html.dark-mode th,
html.dark-mode .card-title, html.dark-mode .card-header h5,
html.dark-mode .user-name, html.dark-mode .text-dark,
html.dark-mode .value, html.dark-mode .number, html.dark-mode .counter,
html.dark-mode .display-1, html.dark-mode .display-2, html.dark-mode .display-3, html.dark-mode .display-4,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, 
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6,
body.dark-mode .h1, body.dark-mode .h2, body.dark-mode .h3, 
body.dark-mode .h4, body.dark-mode .h5, body.dark-mode .h6,
body.dark-mode strong, body.dark-mode b, body.dark-mode th,
body.dark-mode .card-title, body.dark-mode .card-header h5,
body.dark-mode .user-name, body.dark-mode .text-dark,
body.dark-mode .value, body.dark-mode .number, body.dark-mode .counter,
body.dark-mode .display-1, body.dark-mode .display-2, body.dark-mode .display-3, body.dark-mode .display-4 {
    color: #ffffff !important;
}

html.dark-mode p, html.dark-mode span, html.dark-mode td, 
html.dark-mode label, html.dark-mode li, html.dark-mode a:not(.btn),
body.dark-mode p, body.dark-mode span, body.dark-mode td, 
body.dark-mode label, body.dark-mode li, body.dark-mode a:not(.btn) {
    color: #e4e4e7;
}

html.dark-mode .text-muted, html.dark-mode small, html.dark-mode .user-desc,
body.dark-mode .text-muted, body.dark-mode small, body.dark-mode .user-desc {
    color: #a1a1aa !important;
}

/* Header & Top Bar */
html.dark-mode .pc-header,
html.dark-mode .pc-mob-header,
html.dark-mode .pc-header.bg-dark,
html.dark-mode .pc-header.bg-blue,
html.dark-mode .pc-header.bg-danger,
html.dark-mode .pc-header.bg-warning,
html.dark-mode .pc-header.bg-success,
html.dark-mode .pc-header.bg-primary,
body.dark-mode .pc-header,
body.dark-mode .pc-mob-header,
body.dark-mode .pc-header.bg-dark,
body.dark-mode .pc-header.bg-blue,
body.dark-mode .pc-header.bg-danger,
body.dark-mode .pc-header.bg-warning,
body.dark-mode .pc-header.bg-success,
body.dark-mode .pc-header.bg-primary {
    background-color: #18181b !important;
    border-bottom: 1px solid #27272a !important;
    color: #ffffff !important;
}

html.dark-mode .pc-head-link,
body.dark-mode .pc-head-link {
    color: #e4e4e7 !important;
}

html.dark-mode .pc-head-link:hover,
html.dark-mode .pc-head-link.active,
body.dark-mode .pc-head-link:hover,
body.dark-mode .pc-head-link.active {
    color: #ffffff !important;
    background-color: #27272a !important;
}

/* Sidebar Navigation */
html.dark-mode .pc-sidebar,
html.dark-mode .pc-sidebar.light-sidebar,
html.dark-mode .pc-sidebar .navbar-content,
html.dark-mode .pc-sidebar.light-sidebar .navbar-content,
body.dark-mode .pc-sidebar,
body.dark-mode .pc-sidebar.light-sidebar,
body.dark-mode .pc-sidebar .navbar-content,
body.dark-mode .pc-sidebar.light-sidebar .navbar-content {
    background-color: #18181b !important;
    background: #18181b !important;
    border-right: 1px solid #27272a !important;
}

html.dark-mode .pc-sidebar .pc-caption label,
html.dark-mode .pc-sidebar.light-sidebar .pc-caption label,
body.dark-mode .pc-sidebar .pc-caption label,
body.dark-mode .pc-sidebar.light-sidebar .pc-caption label {
    color: #71717a !important;
}

html.dark-mode .pc-sidebar .pc-link,
html.dark-mode .pc-sidebar.light-sidebar .pc-link,
body.dark-mode .pc-sidebar .pc-link,
body.dark-mode .pc-sidebar.light-sidebar .pc-link {
    color: #d4d4d8 !important;
}

html.dark-mode .pc-sidebar .pc-micon i,
html.dark-mode .pc-sidebar .pc-micon svg,
html.dark-mode .pc-sidebar.light-sidebar .pc-link .pc-micon i,
html.dark-mode .pc-sidebar.light-sidebar .pc-link .pc-micon svg,
body.dark-mode .pc-sidebar .pc-micon i,
body.dark-mode .pc-sidebar .pc-micon svg,
body.dark-mode .pc-sidebar.light-sidebar .pc-link .pc-micon i,
body.dark-mode .pc-sidebar.light-sidebar .pc-link .pc-micon svg {
    color: #a1a1aa !important;
}

/* Active & Hover Main Menu Item */
html.dark-mode .pc-sidebar .pc-item.active > .pc-link,
html.dark-mode .pc-sidebar .pc-item:focus > .pc-link,
html.dark-mode .pc-sidebar .pc-item:hover > .pc-link,
html.dark-mode .pc-sidebar.light-sidebar .pc-item.active > .pc-link,
html.dark-mode .pc-sidebar.light-sidebar .pc-item:focus > .pc-link,
html.dark-mode .pc-sidebar.light-sidebar .pc-item:hover > .pc-link,
html.dark-mode .pc-sidebar .pc-navbar > .pc-item.active > .pc-link,
html.dark-mode .pc-sidebar.light-sidebar .pc-navbar > .pc-item.active > .pc-link,
html.dark-mode .pc-sidebar.light-sidebar .pc-navbar > .pc-item.active .pc-link,
body.dark-mode .pc-sidebar .pc-item.active > .pc-link,
body.dark-mode .pc-sidebar .pc-item:focus > .pc-link,
body.dark-mode .pc-sidebar .pc-item:hover > .pc-link,
body.dark-mode .pc-sidebar.light-sidebar .pc-item.active > .pc-link,
body.dark-mode .pc-sidebar.light-sidebar .pc-item:focus > .pc-link,
body.dark-mode .pc-sidebar.light-sidebar .pc-item:hover > .pc-link,
body.dark-mode .pc-sidebar .pc-navbar > .pc-item.active > .pc-link,
body.dark-mode .pc-sidebar.light-sidebar .pc-navbar > .pc-item.active > .pc-link,
body.dark-mode .pc-sidebar.light-sidebar .pc-navbar > .pc-item.active .pc-link {
    background: #27272a !important;
    color: #ffffff !important;
}

html.dark-mode .pc-sidebar .pc-item.active > .pc-link .pc-micon i,
html.dark-mode .pc-sidebar .pc-item.active > .pc-link .pc-micon svg,
html.dark-mode .pc-sidebar.light-sidebar .pc-item.active > .pc-link .pc-micon i,
html.dark-mode .pc-sidebar.light-sidebar .pc-item.active > .pc-link .pc-micon svg,
body.dark-mode .pc-sidebar .pc-item.active > .pc-link .pc-micon i,
body.dark-mode .pc-sidebar .pc-item.active > .pc-link .pc-micon svg,
body.dark-mode .pc-sidebar.light-sidebar .pc-item.active > .pc-link .pc-micon i,
body.dark-mode .pc-sidebar.light-sidebar .pc-item.active > .pc-link .pc-micon svg {
    color: #38bdf8 !important;
}

/* SUBMENU OVERRIDES (EXPANDED SUBMENU INSTANT FIX) */
html.dark-mode .pc-sidebar .pc-submenu,
html.dark-mode .pc-sidebar.light-sidebar .pc-submenu,
html.dark-mode .pc-sidebar .pc-hasmenu.pc-trigger > .pc-submenu,
html.dark-mode .pc-sidebar.light-sidebar .pc-hasmenu.pc-trigger > .pc-submenu,
html.dark-mode body:not(.minimenu) .pc-sidebar .pc-submenu,
html.dark-mode body:not(.minimenu) .pc-sidebar.light-sidebar .pc-submenu,
body.dark-mode .pc-sidebar .pc-submenu,
body.dark-mode .pc-sidebar.light-sidebar .pc-submenu,
body.dark-mode .pc-sidebar .pc-hasmenu.pc-trigger > .pc-submenu,
body.dark-mode .pc-sidebar.light-sidebar .pc-hasmenu.pc-trigger > .pc-submenu,
body.dark-mode:not(.minimenu) .pc-sidebar .pc-submenu,
body.dark-mode:not(.minimenu) .pc-sidebar.light-sidebar .pc-submenu {
    background-color: #121214 !important;
    background: #121214 !important;
    border: none !important;
}

html.dark-mode .pc-sidebar .pc-submenu .pc-item,
html.dark-mode .pc-sidebar.light-sidebar .pc-submenu .pc-item,
body.dark-mode .pc-sidebar .pc-submenu .pc-item,
body.dark-mode .pc-sidebar.light-sidebar .pc-submenu .pc-item {
    background-color: transparent !important;
}

html.dark-mode .pc-sidebar .pc-submenu .pc-link,
html.dark-mode .pc-sidebar.light-sidebar .pc-submenu .pc-link,
body.dark-mode .pc-sidebar .pc-submenu .pc-link,
body.dark-mode .pc-sidebar.light-sidebar .pc-submenu .pc-link {
    background-color: transparent !important;
    color: #d4d4d8 !important;
}

html.dark-mode .pc-sidebar .pc-submenu .pc-link:hover,
html.dark-mode .pc-sidebar.light-sidebar .pc-submenu .pc-link:hover,
html.dark-mode .pc-sidebar .pc-submenu .pc-item.active > .pc-link,
html.dark-mode .pc-sidebar.light-sidebar .pc-submenu .pc-item.active > .pc-link,
body.dark-mode .pc-sidebar .pc-submenu .pc-link:hover,
body.dark-mode .pc-sidebar.light-sidebar .pc-submenu .pc-link:hover,
body.dark-mode .pc-sidebar .pc-submenu .pc-item.active > .pc-link,
body.dark-mode .pc-sidebar.light-sidebar .pc-submenu .pc-item.active > .pc-link {
    background-color: #27272a !important;
    color: #ffffff !important;
}

/* Dot Bullet for Submenu */
html.dark-mode body:not(.minimenu) .pc-sidebar .pc-submenu .pc-item:before,
html.dark-mode body:not(.minimenu) .pc-sidebar.light-sidebar .pc-submenu .pc-item:before,
body.dark-mode:not(.minimenu) .pc-sidebar .pc-submenu .pc-item:before,
body.dark-mode:not(.minimenu) .pc-sidebar.light-sidebar .pc-submenu .pc-item:before {
    background: #71717a !important;
}

html.dark-mode body:not(.minimenu) .pc-sidebar .pc-submenu .pc-item.active:before,
html.dark-mode body:not(.minimenu) .pc-sidebar.light-sidebar .pc-submenu .pc-item.active:before,
html.dark-mode body:not(.minimenu) .pc-sidebar .pc-submenu .pc-item:hover:before,
html.dark-mode body:not(.minimenu) .pc-sidebar.light-sidebar .pc-submenu .pc-item:hover:before,
body.dark-mode:not(.minimenu) .pc-sidebar .pc-submenu .pc-item.active:before,
body.dark-mode:not(.minimenu) .pc-sidebar.light-sidebar .pc-submenu .pc-item.active:before,
body.dark-mode:not(.minimenu) .pc-sidebar .pc-submenu .pc-item:hover:before,
body.dark-mode:not(.minimenu) .pc-sidebar.light-sidebar .pc-submenu .pc-item:hover:before {
    background: #38bdf8 !important;
}

/* Main Container & Content */
html.dark-mode .pc-container,
html.dark-mode .pcoded-content,
body.dark-mode .pc-container,
body.dark-mode .pcoded-content {
    background-color: #121214 !important;
}

/* Cards & Widgets */
html.dark-mode .card,
html.dark-mode .box,
html.dark-mode .panel,
html.dark-mode .card-header,
html.dark-mode .card-footer,
html.dark-mode .bg-white,
html.dark-mode .bg-light,
body.dark-mode .card,
body.dark-mode .box,
body.dark-mode .panel,
body.dark-mode .card-header,
body.dark-mode .card-footer,
body.dark-mode .bg-white,
body.dark-mode .bg-light {
    background-color: #18181b !important;
    border-color: #27272a !important;
    color: #ffffff !important;
}

html.dark-mode .card-header,
body.dark-mode .card-header {
    border-bottom: 1px solid #27272a !important;
}

html.dark-mode .card-footer,
body.dark-mode .card-footer {
    border-top: 1px solid #27272a !important;
}

/* Nav Pills / Module Shortcuts Bar */
html.dark-mode .nav-pills .nav-link,
html.dark-mode .nav-pills .nav-link:not(.active),
body.dark-mode .nav-pills .nav-link,
body.dark-mode .nav-pills .nav-link:not(.active) {
    background-color: #18181b !important;
    border: 1px solid #27272a !important;
    color: #cbd5e1 !important;
}

html.dark-mode .nav-pills .nav-link.active,
body.dark-mode .nav-pills .nav-link.active {
    background-color: #27272a !important;
    color: #ffffff !important;
    border-color: #38bdf8 !important;
}

html.dark-mode .nav-pills .nav-link *,
body.dark-mode .nav-pills .nav-link * {
    color: inherit !important;
}

/* ===================================================
   TABLES & DATATABLES DARK MODE OVERRIDES
   =================================================== */

/* All Tables, DataTables & Containers */
html.dark-mode table,
html.dark-mode table.table,
html.dark-mode table.dataTable,
html.dark-mode .table-responsive,
html.dark-mode .dataTables_wrapper,
body.dark-mode table,
body.dark-mode table.table,
body.dark-mode table.dataTable,
body.dark-mode .table-responsive,
body.dark-mode .dataTables_wrapper {
    color: #e4e4e7 !important;
    background-color: #18181b !important;
}

/* Table Body Cells & Rows (Fix White Row / Empty Row) */
html.dark-mode table.table tbody,
html.dark-mode table.table tbody tr,
html.dark-mode table.table tbody td,
html.dark-mode table.table tbody th,
html.dark-mode table.dataTable tbody,
html.dark-mode table.dataTable tbody tr,
html.dark-mode table.dataTable tbody td,
html.dark-mode table.dataTable tbody th,
html.dark-mode table.dataTable td.dataTables_empty,
html.dark-mode table.dataTable th.dataTables_empty,
body.dark-mode table.table tbody,
body.dark-mode table.table tbody tr,
body.dark-mode table.table tbody td,
body.dark-mode table.table tbody th,
body.dark-mode table.dataTable tbody,
body.dark-mode table.dataTable tbody tr,
body.dark-mode table.dataTable tbody td,
body.dark-mode table.dataTable tbody th,
body.dark-mode table.dataTable td.dataTables_empty,
body.dark-mode table.dataTable th.dataTables_empty {
    background-color: #18181b !important;
    background: #18181b !important;
    border-color: #27272a !important;
    color: #e4e4e7 !important;
}

/* Table Headers */
html.dark-mode table.table thead,
html.dark-mode table.table thead tr,
html.dark-mode table.table thead th,
html.dark-mode table.table thead td,
html.dark-mode table.dataTable thead,
html.dark-mode table.dataTable thead tr,
html.dark-mode table.dataTable thead th,
html.dark-mode table.dataTable thead td,
body.dark-mode table.table thead,
body.dark-mode table.table thead tr,
body.dark-mode table.table thead th,
body.dark-mode table.table thead td,
body.dark-mode table.dataTable thead,
body.dark-mode table.dataTable thead tr,
body.dark-mode table.dataTable thead th,
body.dark-mode table.dataTable thead td {
    background-color: #121214 !important;
    background: #121214 !important;
    color: #ffffff !important;
    border-color: #27272a !important;
}

/* Striped & Hover Rows */
html.dark-mode table.table-striped tbody tr:nth-of-type(odd),
html.dark-mode table.dataTable.stripe tbody tr.odd,
html.dark-mode table.dataTable.display tbody tr.odd,
body.dark-mode table.table-striped tbody tr:nth-of-type(odd),
body.dark-mode table.dataTable.stripe tbody tr.odd,
body.dark-mode table.dataTable.display tbody tr.odd {
    background-color: #141417 !important;
}

html.dark-mode table.table-hover tbody tr:hover,
html.dark-mode table.dataTable.hover tbody tr:hover,
html.dark-mode table.dataTable.display tbody tr:hover,
body.dark-mode table.table-hover tbody tr:hover,
body.dark-mode table.dataTable.hover tbody tr:hover,
body.dark-mode table.dataTable.display tbody tr:hover {
    background-color: #27272a !important;
    color: #ffffff !important;
}

/* DataTables Controls: Search Input & Length Select */
html.dark-mode .dataTables_wrapper .dataTables_length label,
html.dark-mode .dataTables_wrapper .dataTables_filter label,
html.dark-mode .dataTables_wrapper .dataTables_info,
html.dark-mode .dataTables_wrapper .dataTables_processing,
body.dark-mode .dataTables_wrapper .dataTables_length label,
body.dark-mode .dataTables_wrapper .dataTables_filter label,
body.dark-mode .dataTables_wrapper .dataTables_info,
body.dark-mode .dataTables_wrapper .dataTables_processing {
    color: #a1a1aa !important;
}

html.dark-mode .dataTables_wrapper .dataTables_length select,
html.dark-mode .dataTables_wrapper .dataTables_filter input,
body.dark-mode .dataTables_wrapper .dataTables_length select,
body.dark-mode .dataTables_wrapper .dataTables_filter input {
    background-color: #121214 !important;
    border: 1px solid #3f3f46 !important;
    color: #ffffff !important;
    border-radius: 4px;
    padding: 4px 8px;
}

/* DataTables Pagination (Fix White Next/Previous Buttons) */
html.dark-mode .dataTables_wrapper .dataTables_paginate .pagination,
html.dark-mode .dataTables_wrapper .dataTables_paginate .page-item,
html.dark-mode .dataTables_wrapper .dataTables_paginate .page-link,
html.dark-mode .pagination .page-item .page-link,
body.dark-mode .dataTables_wrapper .dataTables_paginate .pagination,
body.dark-mode .dataTables_wrapper .dataTables_paginate .page-item,
body.dark-mode .dataTables_wrapper .dataTables_paginate .page-link,
body.dark-mode .pagination .page-item .page-link {
    background-color: #18181b !important;
    background: #18181b !important;
    border-color: #27272a !important;
    color: #e4e4e7 !important;
}

html.dark-mode .pagination .page-item.disabled .page-link,
html.dark-mode .dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link,
body.dark-mode .pagination .page-item.disabled .page-link,
body.dark-mode .dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link {
    background-color: #121214 !important;
    background: #121214 !important;
    border-color: #27272a !important;
    color: #52525b !important;
}

html.dark-mode .pagination .page-item.active .page-link,
html.dark-mode .dataTables_wrapper .dataTables_paginate .page-item.active .page-link,
body.dark-mode .pagination .page-item.active .page-link,
body.dark-mode .dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
    background-color: #27272a !important;
    background: #27272a !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
}

html.dark-mode .pagination .page-item .page-link:hover,
html.dark-mode .dataTables_wrapper .dataTables_paginate .page-item .page-link:hover,
body.dark-mode .pagination .page-item .page-link:hover,
body.dark-mode .dataTables_wrapper .dataTables_paginate .page-item .page-link:hover {
    background-color: #27272a !important;
    background: #27272a !important;
    color: #38bdf8 !important;
}

/* Form Controls & Inputs */
html.dark-mode .form-control,
html.dark-mode .custom-select,
html.dark-mode input[type="text"],
html.dark-mode input[type="password"],
html.dark-mode input[type="email"],
html.dark-mode input[type="number"],
html.dark-mode input[type="date"],
html.dark-mode input[type="time"],
html.dark-mode textarea,
html.dark-mode select,
body.dark-mode .form-control,
body.dark-mode .custom-select,
body.dark-mode input[type="text"],
body.dark-mode input[type="password"],
body.dark-mode input[type="email"],
body.dark-mode input[type="number"],
body.dark-mode input[type="date"],
body.dark-mode input[type="time"],
body.dark-mode textarea,
body.dark-mode select {
    background-color: #121214 !important;
    border: 1px solid #3f3f46 !important;
    color: #ffffff !important;
}

html.dark-mode .form-control:focus,
html.dark-mode .custom-select:focus,
html.dark-mode input:focus,
html.dark-mode textarea:focus,
html.dark-mode select:focus,
body.dark-mode .form-control:focus,
body.dark-mode .custom-select:focus,
body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.2) !important;
    background-color: #121214 !important;
    color: #ffffff !important;
}

html.dark-mode .input-group-text,
body.dark-mode .input-group-text {
    background-color: #27272a !important;
    border-color: #3f3f46 !important;
    color: #e4e4e7 !important;
}

/* Select2 Dropdowns */
html.dark-mode .select2-container--default .select2-selection--single,
html.dark-mode .select2-container--default .select2-selection--multiple,
body.dark-mode .select2-container--default .select2-selection--single,
body.dark-mode .select2-container--default .select2-selection--multiple {
    background-color: #121214 !important;
    border-color: #3f3f46 !important;
    color: #ffffff !important;
}

html.dark-mode .select2-container--default .select2-selection--single .select2-selection__rendered,
body.dark-mode .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #ffffff !important;
}

html.dark-mode .select2-dropdown,
body.dark-mode .select2-dropdown {
    background-color: #18181b !important;
    border-color: #3f3f46 !important;
    color: #ffffff !important;
}

html.dark-mode .select2-container--default .select2-results__option--highlighted[aria-selected],
body.dark-mode .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #27272a !important;
    color: #38bdf8 !important;
}

/* Dropdowns & Popovers */
html.dark-mode .dropdown-menu,
html.dark-mode .pc-h-dropdown,
body.dark-mode .dropdown-menu,
body.dark-mode .pc-h-dropdown {
    background-color: #18181b !important;
    border: 1px solid #27272a !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7) !important;
}

html.dark-mode .dropdown-item,
body.dark-mode .dropdown-item {
    color: #e4e4e7 !important;
}

html.dark-mode .dropdown-item:hover,
html.dark-mode .dropdown-item:focus,
body.dark-mode .dropdown-item:hover,
body.dark-mode .dropdown-item:focus {
    background-color: #27272a !important;
    color: #ffffff !important;
}

html.dark-mode .dropdown-divider,
body.dark-mode .dropdown-divider {
    border-top: 1px solid #27272a !important;
}

/* Modals */
html.dark-mode .modal-content,
body.dark-mode .modal-content {
    background-color: #18181b !important;
    border: 1px solid #27272a !important;
    color: #e4e4e7 !important;
}

html.dark-mode .modal-header,
html.dark-mode .modal-footer,
body.dark-mode .modal-header,
body.dark-mode .modal-footer {
    border-color: #27272a !important;
}

html.dark-mode .close,
body.dark-mode .close {
    color: #ffffff !important;
    text-shadow: none !important;
}

/* ApexCharts & Peity Charts in Dark Mode */
html.dark-mode .apexcharts-canvas text,
body.dark-mode .apexcharts-canvas text {
    fill: #a1a1aa !important;
}
html.dark-mode .apexcharts-legend-text,
body.dark-mode .apexcharts-legend-text {
    color: #e4e4e7 !important;
}
html.dark-mode .apexcharts-tooltip,
body.dark-mode .apexcharts-tooltip {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #ffffff !important;
}

/* Theme Toggle Button Highlight */
#theme-toggle-btn {
    transition: transform 0.2s ease;
}

#theme-toggle-btn:hover {
    transform: scale(1.1);
}

html.dark-mode #theme-toggle-btn,
body.dark-mode #theme-toggle-btn {
    color: #fbbf24 !important; /* warm yellow sun icon */
}

/* Logo Theme Switching (Light vs Dark Mode) */
.logo-light-mode {
    display: inline-block !important;
}

.logo-dark-mode {
    display: none !important;
}

html.dark-mode .logo-light-mode,
body.dark-mode .logo-light-mode {
    display: none !important;
}

html.dark-mode .logo-dark-mode,
body.dark-mode .logo-dark-mode {
    display: inline-block !important;
}

/* Base Logo Visibility (Always hide collapsed icon by default) */
.b-brand .logo-collapsed,
.logo-collapsed {
    display: none !important;
}
.b-brand .logo-expanded,
.logo-expanded {
    display: inline-block !important;
}

/* ===================================================
   Collapsed Sidebar (Minimenu) Responsive Layout & Submenu
   =================================================== */

/* 1. Desktop Workspace & Header Spacing (Top-left logo anchored at left: 0, no shift) */
@media (min-width: 1025px) {
    .pc-header {
        left: 0 !important;
        transition: none !important;
    }

    body.minimenu .pc-sidebar,
    html.minimenu .pc-sidebar {
        width: 80px !important;
        transition: width 0.2s ease-in-out;
    }

    body.minimenu .pc-container,
    html.minimenu .pc-container {
        margin-left: 100px !important;
        transition: margin-left 0.2s ease-in-out;
    }
    
    .m-header {
        width: 280px;
        transition: width 0.2s ease-in-out;
    }

    body.minimenu .m-header,
    html.minimenu .m-header {
        width: 80px !important;
        padding: 0 10px !important;
        justify-content: center !important;
    }

    /* Logo visibility toggling based on sidebar expanded/collapsed state */
    .b-brand .logo-expanded,
    .logo-expanded {
        display: inline-block !important;
    }
    .b-brand .logo-collapsed,
    .logo-collapsed {
        display: none !important;
    }

    body.minimenu .b-brand .logo-expanded,
    html.minimenu .b-brand .logo-expanded,
    body.minimenu .logo-expanded,
    html.minimenu .logo-expanded {
        display: none !important;
    }
    body.minimenu .b-brand .logo-collapsed,
    html.minimenu .b-brand .logo-collapsed,
    body.minimenu .logo-collapsed,
    html.minimenu .logo-collapsed {
        display: inline-block !important;
        margin: 0 auto !important;
    }
}

/* 2. Hide text labels & captions on the collapsed rail to prevent overlap */
body.minimenu .pc-sidebar .pc-mtext,
html.minimenu .pc-sidebar .pc-mtext,
body.minimenu .pc-sidebar .pc-caption,
html.minimenu .pc-sidebar .pc-caption,
body.minimenu .pc-sidebar .pc-arrow,
html.minimenu .pc-sidebar .pc-arrow {
    display: none !important;

}

/* Center icons cleanly on the 80px collapsed rail */
body.minimenu .pc-sidebar .pc-navbar > .pc-item > .pc-link,
html.minimenu .pc-sidebar .pc-navbar > .pc-item > .pc-link {
    padding: 15px 0 !important;
    width: 80px !important;
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
    border-radius: 0 !important;
}

body.minimenu .pc-sidebar .pc-micon,
html.minimenu .pc-sidebar .pc-micon {
    margin-right: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
}

body.minimenu .pc-sidebar .pc-micon svg,
body.minimenu .pc-sidebar .pc-micon i,
html.minimenu .pc-sidebar .pc-micon svg,
html.minimenu .pc-sidebar .pc-micon i {
    width: 20px !important;
    height: 20px !important;
    font-size: 20px !important;
}

/* 3. AUTOHIDE SUBMENU: Submenu displays ONLY when hovering over .pc-item */
body.minimenu .pc-sidebar .pc-submenu,
html.minimenu .pc-sidebar .pc-submenu {
    display: none !important;
}

body.minimenu .pc-sidebar .pc-item:hover > .pc-submenu,
html.minimenu .pc-sidebar .pc-item:hover > .pc-submenu {
    display: block !important;
    position: absolute !important;
    left: 80px !important;
    top: 0 !important;
    width: 220px !important;
    background: #ffffff !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    border: 1px solid #e4e4e7 !important;
    padding: 8px 0 !important;
    z-index: 1050 !important;
}

body.minimenu .pc-sidebar .pc-submenu .pc-item,
html.minimenu .pc-sidebar .pc-submenu .pc-item {
    margin: 2px 8px !important;
    display: block !important;
}

body.minimenu .pc-sidebar .pc-submenu .pc-link,
html.minimenu .pc-sidebar .pc-submenu .pc-link {
    display: block !important;
    padding: 9px 16px !important;
    color: #3f3f46 !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.minimenu .pc-sidebar .pc-submenu .pc-link:hover,
body.minimenu .pc-sidebar .pc-submenu .pc-item.active > .pc-link,
html.minimenu .pc-sidebar .pc-submenu .pc-link:hover,
html.minimenu .pc-sidebar .pc-submenu .pc-item.active > .pc-link {
    background: #f4f4f5 !important;
    color: #2563eb !important;
}

/* 4. Autohide Submenu in Dark Mode */
html.dark-mode body.minimenu .pc-sidebar .pc-item:hover > .pc-submenu,
body.dark-mode.minimenu .pc-sidebar .pc-item:hover > .pc-submenu,
html.dark-mode.minimenu .pc-sidebar .pc-item:hover > .pc-submenu {
    background: #18181b !important;
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.65) !important;
    border: 1px solid #27272a !important;
}

html.dark-mode body.minimenu .pc-sidebar .pc-submenu .pc-link,
body.dark-mode.minimenu .pc-sidebar .pc-submenu .pc-link,
html.dark-mode.minimenu .pc-sidebar .pc-submenu .pc-link {
    color: #e4e4e7 !important;
}

html.dark-mode body.minimenu .pc-sidebar .pc-submenu .pc-link:hover,
html.dark-mode body.minimenu .pc-sidebar .pc-submenu .pc-item.active > .pc-link,
body.dark-mode.minimenu .pc-sidebar .pc-submenu .pc-link:hover,
body.dark-mode.minimenu .pc-sidebar .pc-submenu .pc-item.active > .pc-link,
html.dark-mode.minimenu .pc-sidebar .pc-submenu .pc-link:hover,
html.dark-mode.minimenu .pc-sidebar .pc-submenu .pc-item.active > .pc-link {
    background: #27272a !important;
    color: #38bdf8 !important;
}


