html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    min-height: 100%;
}

body {
    height: 87vh;
    min-height: 87vh;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

/* ============================================================
   BASE LAYOUT - LIGHT MODE
   ============================================================ */
body {
    background: #f4f7fb;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    overflow-x: hidden;
    color: #1e293b;
    transition: background 0.25s ease, color 0.25s ease;
}

.filter-select {
    font-size: 14px;
    font-weight: 400;
}

/* Fixed Header */
.top-header {
    height: 58px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    transition: background 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #2563eb;
}

.header-logo {
    height: 40px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.header-logo.logo-dark {
    display: none !important;
}

[data-theme="dark"] .header-logo.logo-light {
    display: none !important;
}

[data-theme="dark"] .header-logo.logo-dark {
    display: block !important;
}

/* Fixed Menu */
.menu-bar {
    height: 48px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    z-index: 1040;
    transition: background 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.menu-link {
    color: #475569;
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 8px;
    transition: 0.2s;
    white-space: nowrap;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 500;
}

.menu-link:hover,
.menu-link.active {
    background: #eff6ff;
    color: #2563eb;
}

/* Main Content */
.main-content {
    margin-top: 120px;
    padding: 0px 16px 16px 16px;
}

/* Cards */
.card {
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden; /* Clips children to border-radius — prevents corner bleed */
}

/* Modals: allow dropdown overflow */
.modal-content {
    overflow: visible;
}

.dashboard-card {
    border: 1px solid #e8edf5;
    border-radius: 16px;
    transition: 0.2s;
    background: #ffffff;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-3px);
}

.dashboard-card .card-body {
    padding: 18px;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* Table */
.table-card {
    border: 1px solid #e8edf5;
    border-radius: 16px;
    background: #ffffff;
    overflow: hidden;
}

.table {
    font-size: 13px;
    color: #374151;
}

/* Keep border-radius intact — do NOT use overflow:visible on table-card */
@media (min-width: 992px) {
    .table-card .table-responsive {
        overflow-x: auto;
    }
}

.table thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    white-space: nowrap;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.table tbody td {
    padding: 10px 12px;
    vertical-align: middle;
    white-space: nowrap;
    color: #374151;
}

.table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

.student-img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.alert ul {
    margin-bottom: 0px !important;
}

/* Action Button */
.action-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
.table-footer {
    background: #fafbfd;
    border-top: 1px solid #edf2f7;
}

/* Mobile */
@media(max-width:768px) {
    .menu-wrapper {
        overflow-x: auto;
    }

    .menu-wrapper::-webkit-scrollbar {
        display: none;
    }
}

.custom-pagination .page-link {
    border: none;
    min-width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin: 0 2px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    background: white;
    transition: 0.2s;
}

.custom-pagination .page-link:hover {
    background: #eff6ff;
    color: #2563eb;
}

.custom-pagination .page-item.active .page-link {
    background: #2563eb;
    color: white;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.page-size-select {
    width: 70px;
    border-radius: 10px;
    font-size: 13px;
}

/* DataTable */
.dataTables_info {
    color: #6c757d;
    font-weight: 500;
    padding-left: 15px !important;
}

.dataTables_length {
    padding-left: 15px;
    padding-top: 8px;
}

.dataTables_length label {
    font-weight: 600;
    color: #495057;
}

.dataTables_length select {
    border-radius: 2px !important;
    border: 1px solid #dfe3e8 !important;
    padding: 5px 21px 5px 5px !important;
    margin: 0 5px;
    cursor: pointer;
}

.dataTables_filter {
    margin-right: 16px;
    padding: 4px 0px !important;
}

.dataTables_filter label {
    font-weight: 600;
    color: #495057;
}

.dataTables_filter input {
    border-radius: 6px !important;
    border: 1px solid #dfe3e8 !important;
    padding: 8px 14px !important;
    margin-left: 8px !important;
    transition: 0.3s ease;
    box-shadow: none !important;
}

.dataTables_filter input:focus {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.15rem rgba(13,110,253,.15) !important;
}

.action-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom Toastr Colors */
#toast-container > .toast-success {
    background-color: #0d6efd !important;
    color: #ffffff;
}
#toast-container > .toast-error {
    background-color: #fd0d0d !important;
    color: #ffffff;
}

/* ============================================================
   DARK MODE TOGGLE BUTTON STYLES
   ============================================================ */
.theme-toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    cursor: pointer;
    gap: 10px;
    font-size: 14px;
    color: #212529;
    transition: background 0.15s ease;
}

.theme-toggle-item:hover {
    background: #f8f9fa;
    border-radius: 6px;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #cbd5e1;
    border-radius: 22px;
    transition: 0.3s;
}

.theme-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.theme-switch input:checked + .theme-slider {
    background: #2563eb;
}

.theme-switch input:checked + .theme-slider:before {
    transform: translateX(18px);
}

/* ============================================================
   DARK MODE OVERRIDES
   ============================================================ */
[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] body,
[data-theme="dark"] {
    background: #131720 !important;
    color: #d1d9e6 !important;
}

/* Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #1e2533;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #3a4560;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #4f5f80;
}

[data-theme="dark"] * {
    scrollbar-color: #3a4560 #1e2533;
}

/* Header */
[data-theme="dark"] .top-header {
    background: #1a2035 !important;
    border-bottom: 1px solid #263050 !important;
    box-shadow: 0 1px 8px rgba(0,0,0,0.35) !important;
}

[data-theme="dark"] .logo-text {
    color: #5b9cf6;
}

/* Profile Button in Header */
[data-theme="dark"] .top-header .btn-light {
    background: #232c42 !important;
    border-color: #2e3d5e !important;
    color: #d1d9e6 !important;
}

[data-theme="dark"] .top-header .btn-light:hover {
    background: #2a3454 !important;
    border-color: #3a4d74 !important;
}

/* Menu Bar */
[data-theme="dark"] .menu-bar {
    background: #1a2035 !important;
    border-bottom: 1px solid #263050 !important;
    box-shadow: 0 1px 6px rgba(0,0,0,0.25) !important;
}

[data-theme="dark"] .menu-link {
    color: #94a3b8;
}

[data-theme="dark"] .menu-link:hover,
[data-theme="dark"] .menu-link.active {
    background: #1e3a6e;
    color: #5b9cf6;
}

/* Main Body */
[data-theme="dark"] body {
    background: #131720;
}

/* Cards */
[data-theme="dark"] .card,
[data-theme="dark"] .dashboard-card,
[data-theme="dark"] .table-card {
    background: #1a2035 !important;
    border: 1px solid #263050 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3) !important;
    color: #d1d9e6 !important;
    overflow: hidden;
}

[data-theme="dark"] .card-header {
    background: #1a2035 !important;
    border-bottom: 1px solid #263050 !important;
    color: #d1d9e6 !important;
}

[data-theme="dark"] .card-header.bg-white {
    background: #1a2035 !important;
}

[data-theme="dark"] .card-body,
[data-theme="dark"] .card-footer {
    background: #1a2035 !important;
    color: #d1d9e6 !important;
}

/* Dashboard icon boxes */
[data-theme="dark"] .icon-box.bg-primary-subtle {
    background: rgba(91,156,246,0.15) !important;
    color: #5b9cf6 !important;
}

[data-theme="dark"] .icon-box.bg-success-subtle {
    background: rgba(52,199,89,0.12) !important;
    color: #4ade80 !important;
}

[data-theme="dark"] .icon-box.bg-warning-subtle {
    background: rgba(251,191,36,0.12) !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] .icon-box.bg-danger-subtle {
    background: rgba(248,113,113,0.12) !important;
    color: #f87171 !important;
}

/* Table */
[data-theme="dark"] .table {
    color: #c5cfe2 !important;
    border-color: #263050 !important;
}

[data-theme="dark"] .table thead th {
    background: #1e2845 !important;
    color: #8da4c8 !important;
    border-bottom: 1px solid #2e3d5e !important;
}

[data-theme="dark"] .table tbody td {
    border-color: #222d45 !important;
    color: #c5cfe2 !important;
}

[data-theme="dark"] .table tbody tr {
    border-bottom: 1px solid #1e2845 !important;
}

[data-theme="dark"] .table-hover tbody tr:hover td {
    background: #1f2d4a !important;
    color: #e2e8f0 !important;
}

[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) td {
    background: #1c2640 !important;
    color: #c5cfe2 !important;
}

/* Table Footer */
[data-theme="dark"] .table-footer {
    background: #1a2035 !important;
    border-top: 1px solid #263050 !important;
    color: #8da4c8 !important;
}

/* DataTables */
[data-theme="dark"] .dataTables_info {
    color: #8da4c8 !important;
}

[data-theme="dark"] .dataTables_length label,
[data-theme="dark"] .dataTables_filter label {
    color: #8da4c8 !important;
}

[data-theme="dark"] .dataTables_length select {
    background: #1e2845 !important;
    border-color: #2e3d5e !important;
    color: #c5cfe2 !important;
}

[data-theme="dark"] .dataTables_filter input {
    background: #1e2845 !important;
    border-color: #2e3d5e !important;
    color: #c5cfe2 !important;
}

[data-theme="dark"] .dataTables_filter input:focus {
    border-color: #5b9cf6 !important;
    box-shadow: 0 0 0 0.15rem rgba(91,156,246,0.2) !important;
}

[data-theme="dark"] .dataTables_paginate .paginate_button {
    color: #8da4c8 !important;
}

[data-theme="dark"] .dataTables_paginate .paginate_button.current,
[data-theme="dark"] .dataTables_paginate .paginate_button.current:hover {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: white !important;
}

[data-theme="dark"] .dataTables_paginate .paginate_button:hover {
    background: #1e3a6e !important;
    border-color: #1e3a6e !important;
    color: #5b9cf6 !important;
}

/* Form controls */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .input-group-text,
[data-theme="dark"] select {
    background: #1e2845 !important;
    border-color: #2e3d5e !important;
    color: #c5cfe2 !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] select:focus {
    background: #1e2845 !important;
    border-color: #5b9cf6 !important;
    color: #c5cfe2 !important;
    box-shadow: 0 0 0 0.15rem rgba(91,156,246,0.2) !important;
    outline: none !important;
}

[data-theme="dark"] .form-control::placeholder {
    color: #4a5e82 !important;
}

[data-theme="dark"] .form-control:disabled,
[data-theme="dark"] .form-control[readonly] {
    background: #162039 !important;
    color: #5d7299 !important;
}

[data-theme="dark"] .form-label {
    color: #94a3b8 !important;
}

[data-theme="dark"] .form-check-input {
    background-color: #1e2845 !important;
    border-color: #2e3d5e !important;
}

[data-theme="dark"] .form-check-input:checked {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}

/* Native <select> option list */
[data-theme="dark"] select option,
[data-theme="dark"] .form-select option,
[data-theme="dark"] .form-control option {
    background-color: #1e2845 !important;
    color: #c5cfe2 !important;
}

[data-theme="dark"] select option:hover,
[data-theme="dark"] select option:focus,
[data-theme="dark"] select option:checked {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

[data-theme="dark"] select optgroup {
    background-color: #151d30 !important;
    color: #8da4c8 !important;
    font-weight: 600;
}

/* Bootstrap Dropdown menus */
[data-theme="dark"] .dropdown-menu {
    background: #1a2035 !important;
    border: 1px solid #263050 !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5) !important;
    border-radius: 10px !important;
    padding: 4px !important;
}

[data-theme="dark"] .dropdown-item {
    color: #c5cfe2 !important;
    border-radius: 7px !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    font-size: 13.5px;
    padding: 7px 12px !important;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background: #1e3358 !important;
    color: #5b9cf6 !important;
}

[data-theme="dark"] .dropdown-item.active,
[data-theme="dark"] .dropdown-item:active {
    background: #2563eb !important;
    color: #ffffff !important;
}

[data-theme="dark"] .dropdown-header {
    color: #6b82a6 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
}

[data-theme="dark"] .dropdown-divider {
    border-color: #263050 !important;
    margin: 4px 0 !important;
}

/* Modals */
[data-theme="dark"] .modal-content {
    background: #1a2035 !important;
    border: 1px solid #263050 !important;
    color: #d1d9e6 !important;
    overflow: visible;
}

[data-theme="dark"] .modal-header {
    background: #1a2035 !important;
    border-bottom: 1px solid #263050 !important;
    color: #d1d9e6 !important;
}

[data-theme="dark"] .modal-footer {
    background: #1a2035 !important;
    border-top: 1px solid #263050 !important;
}

[data-theme="dark"] .modal-body {
    background: #1a2035 !important;
    color: #d1d9e6 !important;
}

[data-theme="dark"] .modal-title {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
}

/* Buttons */
[data-theme="dark"] .btn-light {
    background: #232c42 !important;
    border-color: #2e3d5e !important;
    color: #c5cfe2 !important;
}

[data-theme="dark"] .btn-light:hover {
    background: #2a3454 !important;
    border-color: #3a4d74 !important;
    color: #e2e8f0 !important;
}

[data-theme="dark"] .btn-outline-secondary {
    color: #8da4c8 !important;
    border-color: #2e3d5e !important;
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background: #1e2845 !important;
    color: #c5cfe2 !important;
}

/* Pagination */
[data-theme="dark"] .custom-pagination .page-link {
    background: #1e2845 !important;
    color: #8da4c8 !important;
    border-color: #263050 !important;
}

[data-theme="dark"] .custom-pagination .page-link:hover {
    background: #1e3a6e !important;
    color: #5b9cf6 !important;
}

[data-theme="dark"] .custom-pagination .page-item.active .page-link {
    background: #2563eb !important;
    color: white !important;
}

[data-theme="dark"] .page-size-select {
    background: #1e2845 !important;
    border-color: #2e3d5e !important;
    color: #c5cfe2 !important;
}

/* Text helpers */
[data-theme="dark"] .text-muted {
    color: #6b82a6 !important;
}

[data-theme="dark"] h1, [data-theme="dark"] h2,
[data-theme="dark"] h3, [data-theme="dark"] h4,
[data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: #e2e8f0 !important;
}

[data-theme="dark"] small {
    color: #6b82a6;
}

/* Badges */
[data-theme="dark"] .badge.bg-light {
    background: #263050 !important;
    color: #94a3b8 !important;
}

/* Alerts */
[data-theme="dark"] .alert {
    border-color: #263050 !important;
}

[data-theme="dark"] .alert-danger {
    background: rgba(248,113,113,0.1) !important;
    border-color: rgba(248,113,113,0.25) !important;
    color: #f87171 !important;
}

[data-theme="dark"] .alert-success {
    background: rgba(74,222,128,0.08) !important;
    border-color: rgba(74,222,128,0.2) !important;
    color: #4ade80 !important;
}

[data-theme="dark"] .alert-warning {
    background: rgba(251,191,36,0.08) !important;
    border-color: rgba(251,191,36,0.2) !important;
    color: #fbbf24 !important;
}

/* Profile modal dark */
[data-theme="dark"] .profile-info-card {
    background: #1e2845 !important;
    border-color: #2e3d5e !important;
}

[data-theme="dark"] .profile-info-card:hover {
    background: #22304f !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3) !important;
}

[data-theme="dark"] .modern-input .input-group-text {
    background: #1a2540 !important;
    border-color: #2e3d5e !important;
    color: #8da4c8 !important;
}

/* Filter & date range picker */
[data-theme="dark"] .daterangepicker {
    background: #1a2035 !important;
    border: 1px solid #263050 !important;
    color: #c5cfe2 !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5) !important;
}

/* Top caret/arrow */
[data-theme="dark"] .daterangepicker::before {
    border-bottom-color: #263050 !important;
}
[data-theme="dark"] .daterangepicker::after {
    border-bottom-color: #1a2035 !important;
}
[data-theme="dark"] .daterangepicker.drop-up::before {
    border-top-color: #263050 !important;
}
[data-theme="dark"] .daterangepicker.drop-up::after {
    border-top-color: #1a2035 !important;
}

/* Calendar table */
[data-theme="dark"] .daterangepicker .calendar-table {
    background: #1a2035 !important;
    border: 1px solid #263050 !important;
}

/* Month/year header text */
[data-theme="dark"] .daterangepicker .calendar-table .month {
    color: #e2e8f0 !important;
    font-weight: 600;
}

/* Nav arrows (prev/next month) */
[data-theme="dark"] .daterangepicker .prev span,
[data-theme="dark"] .daterangepicker .next span {
    border-color: #8da4c8 !important;
}
[data-theme="dark"] .daterangepicker th.prev:hover,
[data-theme="dark"] .daterangepicker th.next:hover {
    background: #1e3a6e !important;
    color: #5b9cf6 !important;
    border-radius: 6px;
}

/* Day-of-week header row */
[data-theme="dark"] .daterangepicker th.dow {
    color: #6b82a6 !important;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* Default available day cells */
[data-theme="dark"] .daterangepicker td.available {
    color: #c5cfe2 !important;
}

/* Off (greyed out adjacent month) days */
[data-theme="dark"] .daterangepicker td.off,
[data-theme="dark"] .daterangepicker td.off.in-range,
[data-theme="dark"] .daterangepicker td.off.start-date,
[data-theme="dark"] .daterangepicker td.off.end-date {
    color: #3a4a68 !important;
    background: transparent !important;
}

/* Today highlight */
[data-theme="dark"] .daterangepicker td.today {
    font-weight: 700;
    color: #5b9cf6 !important;
}
[data-theme="dark"] .daterangepicker td.today::after {
    border-bottom-color: #5b9cf6 !important;
}

/* In-range selection band */
[data-theme="dark"] .daterangepicker td.in-range {
    background: rgba(37, 99, 235, 0.18) !important;
    color: #c5cfe2 !important;
    border-radius: 0 !important;
}

/* Start / End active dates */
[data-theme="dark"] .daterangepicker td.active,
[data-theme="dark"] .daterangepicker td.active:hover,
[data-theme="dark"] .daterangepicker td.start-date,
[data-theme="dark"] .daterangepicker td.end-date {
    background: #2563eb !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    font-weight: 600;
}

/* Hover on available cells */
[data-theme="dark"] .daterangepicker td.available:hover,
[data-theme="dark"] .daterangepicker th.available:hover {
    background: #1e3a6e !important;
    color: #ffffff !important;
    border-radius: 6px !important;
}

/* Month/year select dropdowns inside the picker */
[data-theme="dark"] .daterangepicker select.monthselect,
[data-theme="dark"] .daterangepicker select.yearselect {
    background: #1e2845 !important;
    border: 1px solid #2e3d5e !important;
    color: #c5cfe2 !important;
    border-radius: 6px !important;
}

/* Apply / Cancel button row */
[data-theme="dark"] .daterangepicker .drp-buttons {
    background: #151d30 !important;
    border-top: 1px solid #263050 !important;
}

[data-theme="dark"] .daterangepicker .drp-buttons .btn-default,
[data-theme="dark"] .daterangepicker .cancelBtn {
    background: #1e2845 !important;
    border: 1px solid #2e3d5e !important;
    color: #c5cfe2 !important;
    border-radius: 6px !important;
}
[data-theme="dark"] .daterangepicker .drp-buttons .btn-default:hover,
[data-theme="dark"] .daterangepicker .cancelBtn:hover {
    background: #263050 !important;
    color: #e2e8f0 !important;
}

[data-theme="dark"] .daterangepicker .applyBtn {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    font-weight: 600;
}
[data-theme="dark"] .daterangepicker .applyBtn:hover {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

/* Selected range text below calendar */
[data-theme="dark"] .daterangepicker .drp-selected {
    color: #8da4c8 !important;
}

/* Theme toggle in dropdown */
[data-theme="dark"] .theme-toggle-item {
    color: #c5cfe2 !important;
}

[data-theme="dark"] .theme-toggle-item:hover {
    background: #1e2d4a !important;
}

/* Toastr */
[data-theme="dark"] #toast-container > .toast-success {
    background-color: #1d4ed8 !important;
}

/* Table sorting icons */
[data-theme="dark"] table.dataTable thead .sorting:before,
[data-theme="dark"] table.dataTable thead .sorting:after,
[data-theme="dark"] table.dataTable thead .sorting_asc:before,
[data-theme="dark"] table.dataTable thead .sorting_desc:after {
    opacity: 0.4;
    color: #8da4c8;
}

/* Section/page titles */
[data-theme="dark"] .fw-semibold,
[data-theme="dark"] .fw-bold {
    color: #e2e8f0;
}

/* HR dividers */
[data-theme="dark"] hr {
    border-color: #263050;
}

/* Input group */
[data-theme="dark"] .input-group > .form-control {
    background: #1e2845 !important;
    border-color: #2e3d5e !important;
    color: #c5cfe2 !important;
}

/* ============================================================
   PASSWORD SHOW / HIDE TOGGLE
   ============================================================ */

/* Input — remove right border so it visually joins the button */
.pwd-toggle-input {
    border-right: none !important;
}

/* Toggle button — light theme */
.pwd-toggle-btn {
    border: 1px solid #dbe2ea;
    border-left: none;
    background: #ffffff;
    color: #64748b;
    border-radius: 0 8px 8px 0;
    padding: 0 12px;
    transition: background 0.15s ease, color 0.15s ease;
}

.pwd-toggle-btn:hover {
    background: #f1f5f9;
    color: #374151;
    border-color: #dbe2ea;
}

.pwd-toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.15);
}

/* Toggle button — dark theme */
[data-theme="dark"] .pwd-toggle-input {
    border-right: none !important;
    border-color: #2e3d5e !important;
}

[data-theme="dark"] .pwd-toggle-btn {
    background: #1e2845 !important;
    border: 1px solid #2e3d5e !important;
    border-left: none !important;
    color: #8da4c8 !important;
}

[data-theme="dark"] .pwd-toggle-btn:hover {
    background: #263050 !important;
    color: #c5cfe2 !important;
    border-color: #3a4d74 !important;
    border-left: none !important;
}

[data-theme="dark"] .pwd-toggle-btn:focus {
    box-shadow: 0 0 0 0.15rem rgba(91, 156, 246, 0.2) !important;
}

.header-list {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

/* ============================================================
   CUSTOM SELECT DROPDOWN REPLACEMENTS
   ============================================================ */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-btn {
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
}

.custom-select-btn::after {
    display: none !important;
}

.custom-select-btn:focus,
.custom-select-btn:focus-visible {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(37, 99, 235, 0.25) !important;
    border-color: #2563eb !important;
    outline: none !important;
}

.custom-select-wrapper .dropdown-menu {
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05) !important;
    border-radius: 12px !important;
    padding: 6px !important;
    margin-top: 4px !important;
    z-index: 1060;
}

.custom-select-wrapper .dropdown-item {
    color: #475569;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.custom-select-wrapper .dropdown-item:hover,
.custom-select-wrapper .dropdown-item:focus {
    background-color: #eff6ff;
    color: #2563eb;
}

.custom-select-wrapper .dropdown-item.active,
.custom-select-wrapper .dropdown-item:active {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

/* Custom selects disabled state */
.custom-select-btn:disabled {
    background-color: #e9ecef;
    opacity: 0.65;
    cursor: not-allowed;
}

/* Validation styles */
.custom-select-btn.is-invalid,
.custom-select-btn.input-validation-error {
    border-color: #dc3545 !important;
}

.custom-select-btn.is-invalid:focus,
.custom-select-btn.input-validation-error:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
}

/* Dark mode overrides */
[data-theme="dark"] .custom-select-wrapper .dropdown-menu {
    background: #1a2035 !important;
    border: 1px solid #263050 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .custom-select-wrapper .dropdown-item {
    color: #c5cfe2 !important;
}

[data-theme="dark"] .custom-select-wrapper .dropdown-item:hover,
[data-theme="dark"] .custom-select-wrapper .dropdown-item:focus {
    background: #1e3358 !important;
    color: #5b9cf6 !important;
}

[data-theme="dark"] .custom-select-wrapper .dropdown-item.active,
[data-theme="dark"] .custom-select-wrapper .dropdown-item:active {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

[data-theme="dark"] .custom-select-btn:disabled {
    background-color: #162039 !important;
    color: #5d7299 !important;
    opacity: 1;
    border-color: #263050 !important;
}