.ck-editor__editable,
textarea {
    min-height: 150px;
}

.datatable {
    width: 100% !important;
}

table.dataTable tbody td.select-checkbox::before,
table.dataTable tbody td.select-checkbox::after,
table.dataTable tbody th.select-checkbox::before,
table.dataTable tbody th.select-checkbox::after {
    top: 50%;
}

.dataTables_length,
.dataTables_filter,
.dt-buttons {
    margin-bottom: 0.333em;
    margin-top: .2rem;
}

.dataTables_filter {
    margin-right: .2rem;
}

.dt-buttons .btn {
    margin-left: 0.333em;
    border-radius: 0;
}

.table.datatable {
    box-sizing: border-box;
    border-collapse: collapse;
}

table.dataTable thead th {
    border-bottom: 2px solid #c8ced3;
}

.dataTables_wrapper.no-footer .dataTables_scrollBody {
    border-bottom: 1px solid #c8ced3;
}

.select2 {
    max-width: 100%;
    width: 100% !important;
}

.select2-selection__rendered {
    padding-bottom: 5px !important;
}

.has-error .invalid-feedback {
    display: block !important;
}

.btn-info,
.badge-info {
    color: white;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-image: none;
}

.sidebar .nav-item {
    cursor: pointer;
}

.btn-default {
    color: #23282c;
    background-color: #f0f3f5;
    border-color: #f0f3f5;
}

.btn-default.focus,
.btn-default:focus {
    box-shadow: 0 0 0 .2rem rgba(209, 213, 215, .5);
}

.btn-default:hover {
    color: #23282c;
    background-color: #d9e1e6;
    border-color: #d1dbe1;
}

.btn-group-xs > .btn,
.btn-xs {
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

.searchable-title {
    font-weight: bold;
}
.searchable-fields {
    padding-left:5px;
}
.searchable-link {
    padding:0 5px 0 5px;
}
.searchable-link:hover   {
    cursor: pointer;
    background: #eaeaea;
}

.form-group .required::after {
    content: " *";
    color: red;
}

.form-check.is-invalid ~ .invalid-feedback {
    display: block;
}

.c-sidebar-brand .c-sidebar-brand-full:hover {
    color: inherit;
}

.custom-select.form-control-sm {
    padding: 0.25rem 1.5rem;
}
/*json editor css start */
.editorWrapper {
    position: relative;
    height: 100%;
    min-height: 45vh;
}
@media (min-height: 600px) {
    .editorWrapper {
        height: 55vh;
    }
}
@media (min-height: 900px) {
    .editorWrapper {
        height: 65vh;
    }
}


.editorWrapper #editor,  .editorWrapper #meta_data_structure_editor, .editorWrapper #plugin_settings_json_editor {
    font-family: "Roboto Mono", monospace;
    font-size: 14px;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}
/*json editor css end */
#logo img{
    width: 100%;
    height: 48px;
    padding: 5px 0;
}
.log-window {
    background-color: #2a2a2a; /* Slightly lighter background for log container */
    border-radius: 8px; /* Rounded corners for a polished look */
    border: 1px solid #444; /* Subtle border for contrast */
    margin: 0 auto;
    padding: 15px;
    height: 400px;
    overflow-y: auto; /* Scrollable logs */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* Slight shadow for depth */
}

.log-entry {
    margin: 5px 0;
    display: flex;
    align-items: center;
}

.log-timestamp {
    color: #aaaaaa; /* Dimmed gray for timestamps */
    margin-right: 10px;
}

.log-status-code {
    font-weight: bold;
    color: #00ffaa; /* Highlighted status codes */
    margin-right: 10px;
}

.log-message {
    color: #ffffff; /* White for the main log message */
}
.scrollable-container {
    max-width: 500px; /* Adjust width as needed */
    overflow-x: auto; /* Enable horizontal scroll */
    white-space: pre-wrap; /* Preserve line breaks */
    word-wrap: break-word; /* Prevent text overflow */
    border: 1px solid #ddd; /* Optional: Adds a border */
    padding: 5px;
    background: #f8f9fa; /* Light background for visibility */
}
.online {
    background: #56ff00;
    padding: 0 5px;
}
.offline{
    background: #ffa500;
    padding: 0 5px;
}
.stats-header {
    font-size: 15px;
}

.stats-value {
    font-size: 15px;
}

.stats-block {
    padding: 0 10px;
}



.select2-container--default .select2-search--inline .select2-search__field{
    padding: 0 5px;
}

#deviceScreen{
    display:block; width:300px; height:600px;
}
.wsDebug{
    position:absolute; top:8px; left:8px; padding:4px 6px; background:rgba(0,0,0,0.5); color:#fff; font:11px/1.2 monospace; border-radius:4px;
}
#noFrameHint{
    position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
    color:#9aa0a6; font:13px/1.4 system-ui; text-align:center; padding:8px;
}
.device-pane {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 640px;
}
.screen-wrapper {
    min-height: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    background: #111;        /* faux device bezel */
    padding: 12px;
    width: 100%;

}
#noFrameHint {
    pointer-events: none;
}

.device-actions-rail .btn { text-align:left; white-space:nowrap; }



/*Device Remote control page */
.device-actions-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: start;
}
.device-live-action-container{
    display: grid;
    grid-template-columns:340px auto;
    gap: 15px;
}

/* status dots */
.plan-cta { display:flex; gap:.5rem; align-items:center; }
.red-bgr,.green-bgr{ width:10px;height:10px;border-radius:50%;display:inline-block }
.red-bgr{ background:#e74c3c } .green-bgr{ background:#2ecc71 }

/* layout */
.device-pane{ display:flex; align-items:flex-start; gap:12px; min-height:640px }
.device-actions-rail .btn{ text-align:left; white-space:nowrap }
.device-block{ gap:8px }

/* device frame */

/* visible viewport (fixed 300x600 “phone” window) */
.screen-viewport{
    position:relative; width:100%; height:600px;
    border-radius:10px; overflow:hidden; background:#000;
}

/* stream image (no broken icon; invisible until load) */
#process_screenshot{
    display:block; width:100%; height:100%; object-fit:contain;
    background:#000; opacity:0;   /* fade in after first load */
}
.no-frame-hint{
    position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
    color:#9aa0a6; font:13px/1.4 system-ui; text-align:center; pointer-events:none;
}

/* tiny over-screen loader pulse */
.device-loader{
    position:absolute; inset:0; display:none; align-items:center; justify-content:center;
    background:rgba(0,0,0,.25); z-index:2; pointer-events:none;
}
.device-spinner{
    width:28px;height:28px;border-radius:50%;
    border:3px solid rgba(255,255,255,.35); border-top-color:#fff;
    animation: rd-spin .9s linear infinite;
}
@keyframes rd-spin{ to{ transform:rotate(360deg) } }

@media (max-width: 1100px) {
    .device-live-action-container{
        grid-template-columns: 1fr;
    }
}
@media (max-width: 992px) {

    .device_screen_viewer{
        margin: 0 auto;
    }
    .device_screen_viewer{
        width: 100%;
    }
}
@media (max-width: 576px) {
    .screen-viewport{
        width: 100%;
    }

    .screen-wrapper{

    }
}

/* ========================================
   GLOBAL UI  —  Header, Cards, Buttons
   (Sidebar styles are in sidebar.css)
   ======================================== */

/* ── Header ── */
.c-header {
    background: #ffffff !important;
    border-bottom: 1px solid #eef0f4 !important;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.03) !important;
}

/* ── Credits ── */
.header-credits {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 8px 14px !important;
    background: rgba(30, 111, 255, 0.04) !important;
    border-radius: 10px !important;
    border: 1px solid rgba(30, 111, 255, 0.12) !important;
    font-size: 13px !important;
    margin: 12px 0 !important;
    transition: all 0.25s ease !important;
}
.header-credits:hover {
    border-color: rgba(30, 111, 255, 0.25) !important;
    box-shadow: 0 2px 8px rgba(30, 111, 255, 0.08) !important;
}
.header-credits strong { color: #374151 !important; font-weight: 600 !important; }
.header-credits .text-success { color: #059669 !important; font-weight: 600 !important; }
.header-credits .text-warning { color: #d97706 !important; font-weight: 600 !important; }
.header-credits .btn-success {
    background: #1E6FFF !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(30, 111, 255, 0.2) !important;
    transition: all 0.3s ease !important;
    font-weight: 600 !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
}
.header-credits .btn-success:hover {
    background: #1557cc !important;
    box-shadow: 0 4px 12px rgba(30, 111, 255, 0.3) !important;
    transform: translateY(-1px) !important;
}

/* ── Content area ── */
.c-body { background: #f8f9fb !important; }
.c-main { background: #f8f9fb !important; }

/* ── Cards ── */
.card {
    background: #ffffff !important;
    border: 1px solid #eef0f4 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
    border-radius: 12px !important;
}
.card-header {
    background: #ffffff !important;
    border-bottom: 1px solid #eef0f4 !important;
    font-weight: 600 !important;
    color: #111827 !important;
}

/* ── Buttons ── */
.btn-primary {
    background: #1E6FFF !important;
    border-color: #1E6FFF !important;
    box-shadow: 0 2px 6px rgba(30, 111, 255, 0.18) !important;
    transition: all 0.3s ease !important;
}
.btn-primary:hover {
    background: #1557cc !important;
    border-color: #1557cc !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(30, 111, 255, 0.28) !important;
}

.btn-outline-secondary {
    color: #3FA9F5 !important;
    border-color: #3FA9F5 !important;
    background: transparent !important;
    transition: all 0.25s ease !important;
}
.btn-outline-secondary:hover {
    background: rgba(63, 169, 245, 0.08) !important;
    border-color: #3FA9F5 !important;
    color: #3FA9F5 !important;
}

/* Badge */
.badge {
    font-weight: 600 !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
}

/* ========================================
   END GLOBAL UI
   ======================================== */

/* ========================================
   DARK MODE - Brand Dark Theme
   #0B0F14 - Dark Background
   #1E6FFF - Primary Blue
   #3FA9F5 - Secondary Blue
   #E6ECF2 - Text
   #8B97A8 - Subtext
   ======================================== */

/* (Dark-mode sidebar styles are in sidebar.css) */

/* Header Dark Mode */
body.dark-mode .c-header {
    background: #0B0F14 !important;
    border-bottom: 1px solid rgba(30, 111, 255, 0.2) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    color: #E6ECF2 !important;
}

body.dark-mode .c-header-toggler {
    color: #E6ECF2 !important;
}

body.dark-mode .header-credits {
    background: rgba(30, 111, 255, 0.1) !important;
    border: 1px solid rgba(30, 111, 255, 0.3) !important;
    box-shadow: 0 2px 4px rgba(30, 111, 255, 0.1) !important;
}

body.dark-mode .header-credits strong {
    color: #E6ECF2 !important;
}

body.dark-mode .header-credits .text-success {
    color: #10b981 !important;
}

body.dark-mode .header-credits .text-warning {
    color: #f59e0b !important;
}

/* Theme Toggle Icon - Smaller size */
#theme-toggle {
    padding: 0 !important;
    background: none !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
}

#theme-toggle i {
    color: #6b7280 !important;
    font-size: 16px !important;
    transition: all 0.2s ease !important;
}

#theme-toggle:hover i {
    color: #1E6FFF !important;
    transform: scale(1.1);
}

body.dark-mode #theme-toggle i {
    color: #8B97A8 !important;
}

body.dark-mode #theme-toggle:hover i {
    color: #1E6FFF !important;
}

/* Bell Icon - Smaller size */
.c-header-nav .nav-link .fa-bell {
    font-size: 16px !important;
}

/* Content Area Dark Mode */
body.dark-mode .c-body {
    background: #0f1419 !important;
}

body.dark-mode .c-main {
    background: #0f1419 !important;
}

/* Cards Dark Mode */
body.dark-mode .card {
    background: #0B0F14 !important;
    border: 1px solid rgba(30, 111, 255, 0.2) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    color: #E6ECF2 !important;
}

body.dark-mode .card-header {
    background: rgba(30, 111, 255, 0.05) !important;
    border-bottom: 1px solid rgba(30, 111, 255, 0.2) !important;
    color: #E6ECF2 !important;
}

body.dark-mode .card-body {
    color: #E6ECF2 !important;
}

/* Tables Dark Mode */
body.dark-mode .table {
    color: #E6ECF2 !important;
}

body.dark-mode .table thead th {
    background: rgba(30, 111, 255, 0.05) !important;
    color: #8B97A8 !important;
    border-color: rgba(30, 111, 255, 0.2) !important;
}

body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background: rgba(30, 111, 255, 0.03) !important;
}

body.dark-mode .table-hover tbody tr:hover {
    background: rgba(30, 111, 255, 0.08) !important;
}

/* Forms Dark Mode */
body.dark-mode .form-control {
    background: rgba(11, 15, 20, 0.6) !important;
    border-color: rgba(30, 111, 255, 0.2) !important;
    color: #E6ECF2 !important;
}

body.dark-mode .form-control:focus {
    background: rgba(11, 15, 20, 0.8) !important;
    border-color: #1E6FFF !important;
    color: #E6ECF2 !important;
}

body.dark-mode .form-control::placeholder {
    color: #8B97A8 !important;
}

/* Alerts Dark Mode */
body.dark-mode .alert-success {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #10b981 !important;
}

body.dark-mode .alert-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #ef4444 !important;
}

body.dark-mode .alert-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: #f59e0b !important;
}

/* Text Colors Dark Mode */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #E6ECF2 !important;
}

body.dark-mode p,
body.dark-mode span:not(.badge):not(.text-success):not(.text-warning):not(.text-danger) {
    color: #E6ECF2;
}

body.dark-mode label {
    color: #E6ECF2 !important;
}

/* Modals Dark Mode */
body.dark-mode .modal-content {
    background: #0B0F14 !important;
    border: 1px solid rgba(30, 111, 255, 0.2) !important;
    color: #E6ECF2 !important;
}

body.dark-mode .modal-header {
    border-bottom: 1px solid rgba(30, 111, 255, 0.2) !important;
}

body.dark-mode .modal-footer {
    border-top: 1px solid rgba(30, 111, 255, 0.2) !important;
}

body.dark-mode .close {
    color: #E6ECF2 !important;
    text-shadow: 0 1px 0 rgba(30, 111, 255, 0.3) !important;
}

/* ========================================
   END DARK MODE
   ======================================== */

/* ========================================
   AUTH PAGES - Refined Modern Design
   Large Border Radius, Gradient Buttons
   ======================================== */

/* Auth Page Background - Very Light Grey */
body.login-page {
    background: #f5f7fa !important;
    min-height: 100vh;
}

/* Logo Text Styling */
.auth-logo-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    letter-spacing: -0.5px;
}

/* Auth Card - Large Border Radius */
.auth-card-refined {
    background: #ffffff;
    border-radius: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    border: none;
    overflow: hidden;
}

.auth-card-body-refined {
    padding: 48px 40px;
}

/* Auth Title - Bold Dark Navy */
.auth-title-refined {
    color: #0B2F5A;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.auth-subtitle-refined {
    color: #6b7280;
    font-size: 15px;
    margin-bottom: 36px;
}

/* Form Groups */
.auth-form-group-refined {
    margin-bottom: 20px;
}

/* Input Wrapper */
.auth-input-wrapper-refined {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon-refined {
    position: absolute;
    left: 18px;
    color: #9ca3af;
    font-size: 16px;
    z-index: 2;
    transition: color 0.2s ease;
}

/* Input Fields - Light Grey Background */
.auth-input-refined {
    width: 100%;
    padding: 14px 18px 14px 50px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    font-size: 15px;
    color: #111827;
    background: #f9fafb;
    transition: all 0.2s ease;
}

.auth-input-refined:focus {
    outline: none;
    border-color: #1E6FFF;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(30, 111, 255, 0.08);
}

.auth-input-wrapper-refined:focus-within .auth-input-icon-refined {
    color: #1E6FFF;
}

.auth-input-refined::placeholder {
    color: #9ca3af;
}

.auth-input-refined.is-invalid {
    border-color: #ef4444;
    background: #fef2f2;
}

/* Error Messages */
.auth-error-refined {
    color: #ef4444;
    font-size: 13px;
    margin-top: 8px;
    display: flex;
    align-items: center;
}

/* Checkbox */
.auth-checkbox-refined {
    display: flex;
    align-items: center;
}

.auth-checkbox-input-refined {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 2px solid #d1d5db;
    cursor: pointer;
    margin-right: 10px;
    accent-color: #1E6FFF;
}

.auth-checkbox-label-refined {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
    cursor: pointer;
}

/* Options Row */
.auth-options-refined {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

/* Links - Primary Blue */
.auth-link-refined {
    color: #1E6FFF;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link-refined:hover {
    color: #1557cc;
    text-decoration: none;
}

.auth-link-bold-refined {
    color: #1E6FFF;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-link-bold-refined:hover {
    color: #1557cc;
    text-decoration: none;
}

/* Gradient Button with Shadow */
.auth-btn-gradient {
    width: 100%;
    padding: 16px 24px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #1E6FFF 0%, #3FA9F5 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(30, 111, 255, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-btn-gradient:hover {
    background: linear-gradient(135deg, #1557cc 0%, #1E6FFF 100%);
    box-shadow: 0 12px 28px rgba(30, 111, 255, 0.4);
    transform: translateY(-2px);
}

.auth-btn-gradient:active {
    transform: translateY(0);
}

/* Or Divider - Centered */
.auth-divider-refined {
    position: relative;
    text-align: center;
    margin: 28px 0;
}

.auth-divider-refined::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e5e7eb;
}

.auth-divider-refined span {
    position: relative;
    background: #ffffff;
    padding: 0 16px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
    z-index: 1;
}

/* Footer - Centered */
.auth-footer-refined {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.auth-footer-refined span {
    margin-right: 6px;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card-body-refined {
        padding: 36px 28px;
    }

    .auth-title-refined {
        font-size: 28px;
    }

    .auth-logo-text {
        font-size: 32px !important;
    }
}

/* ========================================
   END AUTH PAGES
   ======================================== */

/* ========================================
   MODERN SCROLLBAR DESIGN
   Using Brand Colors
   ======================================== */

/* Main Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1E6FFF 0%, #3FA9F5 100%);
    border-radius: 10px;
    border: 2px solid #f1f5f9;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1557cc 0%, #1E6FFF 100%);
    border: 2px solid #e2e8f0;
}

::-webkit-scrollbar-thumb:active {
    background: #1E6FFF;
}

/* Dark Mode Scrollbar */
body.dark-mode ::-webkit-scrollbar-track {
    background: #0f1419;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1E6FFF 0%, #3FA9F5 100%);
    border: 2px solid #0f1419;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3FA9F5 0%, #1E6FFF 100%);
    border: 2px solid rgba(30, 111, 255, 0.2);
}

/* Scrollbar Corner */
::-webkit-scrollbar-corner {
    background: #f1f5f9;
}

body.dark-mode ::-webkit-scrollbar-corner {
    background: #0f1419;
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #1E6FFF #f1f5f9;
}

body.dark-mode * {
    scrollbar-color: #1E6FFF #0f1419;
}

/* ========================================
   END MODERN SCROLLBAR
   ======================================== */

/* ========================================
   MODERN SELECT2 DESIGN
   Clean, rounded, with Brand Blue accents
   ======================================== */

/* Base Container */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    min-height: 44px !important;
    padding: 4px 8px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.select2-container--default .select2-selection--single:hover,
.select2-container--default .select2-selection--multiple:hover {
    border-color: #d1d5db !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06) !important;
}

/* Focus State */
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: #1E6FFF !important;
    box-shadow: 0 0 0 4px rgba(30, 111, 255, 0.12) !important;
    outline: none !important;
}

/* Single Selection Rendered Text */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #111827 !important;
    line-height: 36px !important;
    padding-left: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

/* Single Selection Arrow */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px !important;
    right: 12px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #9ca3af transparent transparent transparent !important;
    border-width: 5px 5px 0 5px !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #1E6FFF transparent !important;
    border-width: 0 5px 5px 5px !important;
}

/* Clear Button */
.select2-container--default .select2-selection--single .select2-selection__clear,
.select2-container--default .select2-selection--multiple .select2-selection__clear {
    color: #9ca3af !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    margin-right: 8px !important;
    transition: color 0.2s ease !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover,
.select2-container--default .select2-selection--multiple .select2-selection__clear:hover {
    color: #ef4444 !important;
}

/* Multiple Selection */
.select2-container--default .select2-selection--multiple {
    padding: 6px 8px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 0 !important;
}

/* Tags (Selected Items) */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: linear-gradient(135deg, #1E6FFF 0%, #3FA9F5 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    box-shadow: 0 2px 4px rgba(30, 111, 255, 0.2) !important;
    transition: all 0.2s ease !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice:hover {
    background: linear-gradient(135deg, #1557cc 0%, #1E6FFF 100%) !important;
    box-shadow: 0 4px 8px rgba(30, 111, 255, 0.3) !important;
}

/* Remove Button on Tags */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    margin-right: 0 !important;
    margin-left: 4px !important;
    order: 2 !important;
    border: none !important;
    padding: 0 4px !important;
    transition: all 0.2s ease !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 4px !important;
}

/* Search Input in Multiple */
.select2-container--default .select2-search--inline .select2-search__field {
    margin: 4px 0 !important;
    font-size: 14px !important;
    color: #111827 !important;
    min-height: 28px !important;
}

.select2-container--default .select2-search--inline .select2-search__field::placeholder {
    color: #9ca3af !important;
}

/* Dropdown */
.select2-dropdown {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important;
    margin-top: 4px !important;
    overflow: hidden !important;
}

/* Search Box in Dropdown */
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    margin: 8px !important;
    width: calc(100% - 16px) !important;
    transition: all 0.2s ease !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #1E6FFF !important;
    box-shadow: 0 0 0 3px rgba(30, 111, 255, 0.1) !important;
    outline: none !important;
}

/* Results List */
.select2-results__options {
    max-height: 280px !important;
    padding: 4px !important;
}

/* Result Items */
.select2-container--default .select2-results__option {
    padding: 10px 14px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    margin: 2px 4px !important;
    transition: all 0.15s ease !important;
    color: #374151 !important;
}

/* Hover State */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: rgba(30, 111, 255, 0.1) !important;
    color: #1E6FFF !important;
}

/* Selected State */
.select2-container--default .select2-results__option--selected {
    background: rgba(30, 111, 255, 0.08) !important;
    color: #1E6FFF !important;
    font-weight: 500 !important;
}

.select2-container--default .select2-results__option--selected::after {
    content: "\f00c" !important;
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
    float: right !important;
    color: #1E6FFF !important;
    font-size: 12px !important;
}

/* Disabled Option */
.select2-container--default .select2-results__option[aria-disabled=true] {
    color: #9ca3af !important;
    background: transparent !important;
}

/* No Results */
.select2-results__message {
    color: #9ca3af !important;
    padding: 16px !important;
    text-align: center !important;
    font-size: 14px !important;
}

/* Placeholder */
.select2-container--default .select2-selection--single .select2-selection__placeholder,
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
    color: #9ca3af !important;
}

/* Dark Mode Select2 */
body.dark-mode .select2-container--default .select2-selection--single,
body.dark-mode .select2-container--default .select2-selection--multiple {
    background: #0f1419 !important;
    border-color: rgba(30, 111, 255, 0.2) !important;
}

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

body.dark-mode .select2-dropdown {
    background: #0f1419 !important;
    border-color: rgba(30, 111, 255, 0.3) !important;
}

body.dark-mode .select2-container--default .select2-search--dropdown .select2-search__field {
    background: #0B0F14 !important;
    border-color: rgba(30, 111, 255, 0.2) !important;
    color: #E6ECF2 !important;
}

body.dark-mode .select2-container--default .select2-results__option {
    color: #E6ECF2 !important;
}

body.dark-mode .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: rgba(30, 111, 255, 0.2) !important;
}

body.dark-mode .select2-container--default .select2-results__option--selected {
    background: rgba(30, 111, 255, 0.15) !important;
}

/* ========================================
   END MODERN SELECT2 DESIGN
   ======================================== */

/* ========================================
   MODERN DATATABLE DESIGN
   Clean, Elegant with Brand Blue accents
   ======================================== */

/* Table Container Card */
.datatable-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.datatable-card .card-header {
    background: linear-gradient(135deg, rgba(30, 111, 255, 0.02) 0%, rgba(63, 169, 245, 0.02) 100%);
    border-bottom: 1px solid #e5e7eb;
    padding: 20px 24px;
}

.datatable-card .card-body {
    padding: 0;
}

/* DataTables Wrapper */
.dataTables_wrapper {
    padding: 16px;
}

/* Top Controls Row - Fix layout */
.dataTables_wrapper > .row:first-child {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* Length Selector - Make visible */
.dataTables_length {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    margin-right: 15px !important;
}

.dataTables_length label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151 !important;
    margin: 0;
    font-weight: 500;
}

/* Override Bootstrap custom-select styles for DataTables length select */
.dataTables_length select,
.dataTables_length select.custom-select,
.dataTables_length select.form-control {
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 6px 30px 6px 10px !important;
    font-size: 13px !important;
    color: #111827 !important;
    background: #ffffff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23374151' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 8px center !important;
    background-size: 12px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 70px;
    height: auto !important;
    line-height: 1.4 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.dataTables_length select:hover {
    border-color: #9ca3af !important;
}

.dataTables_length select:focus {
    border-color: #1E6FFF !important;
    box-shadow: 0 0 0 3px rgba(30, 111, 255, 0.1) !important;
    outline: none !important;
}

/* Search Filter - Make visible */
.dataTables_filter {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
    margin-right: 0 !important;
}

.dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151 !important;
    margin: 0;
    font-weight: 500;
}

.dataTables_filter input {
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    font-size: 14px !important;
    color: #111827 !important;
    background: #ffffff !important;
    width: 200px;
    transition: all 0.2s ease;
}

.dataTables_filter input:hover {
    border-color: #9ca3af !important;
}

.dataTables_filter input:focus {
    border-color: #1E6FFF !important;
    box-shadow: 0 0 0 3px rgba(30, 111, 255, 0.1) !important;
    outline: none !important;
}

.dataTables_filter input::placeholder {
    color: #9ca3af !important;
}

/* DataTable Buttons - Modern Style */
.dt-buttons {
    margin-bottom: 12px !important;
    margin-top: 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dt-buttons .btn {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #374151 !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    margin-left: 0 !important;
    transition: all 0.2s ease !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dt-buttons .btn:hover {
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
    color: #111827 !important;
}

.dt-buttons .btn-primary {
    background: linear-gradient(135deg, #1E6FFF 0%, #3FA9F5 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(30, 111, 255, 0.2) !important;
}

.dt-buttons .btn-primary:hover {
    background: linear-gradient(135deg, #1557cc 0%, #1E6FFF 100%) !important;
    box-shadow: 0 4px 8px rgba(30, 111, 255, 0.3) !important;
}

.dt-buttons .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2) !important;
}

.dt-buttons .btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3) !important;
}

/* Table Styles - Add spacing from buttons */
table.dataTable {
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    margin-top: 12px !important;
}

/* Table wrapper for horizontal scroll (without DataTables scrollX) */
.dataTables_wrapper {
    overflow-x: auto !important;
}

.card-body {
    overflow-x: auto !important;
}

/* Ensure table doesn't break on small screens */
table.dataTable {
    min-width: 100% !important;
    width: auto !important;
}

/* Table Header - Clear readable text */
table.dataTable thead th {
    background: #f8fafc !important;
    border-bottom: 2px solid #e5e7eb !important;
    border-top: 1px solid #e5e7eb !important;
    color: #374151 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 12px 14px !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    position: relative !important;
}

/* Remove default sorting icons */
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    background-image: none !important;
    padding-right: 28px !important;
}

/* Sorting Icons - Fixed positioning */
table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::after {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
    font-size: 10px !important;
    color: #9ca3af !important;
    background: none !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    display: block !important;
    opacity: 1 !important;
}

table.dataTable thead th.sorting::after {
    content: "\f0dc" !important;
}

table.dataTable thead th.sorting_asc::after {
    content: "\f0de" !important;
    color: #1E6FFF !important;
}

table.dataTable thead th.sorting_desc::after {
    content: "\f0dd" !important;
    color: #1E6FFF !important;
}

/* Table Body */
table.dataTable tbody td {
    padding: 12px 14px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f3f4f6 !important;
    font-size: 14px !important;
    color: #374151 !important;
    background: #ffffff !important;
    transition: background 0.15s ease !important;
}

table.dataTable tbody tr:hover td {
    background: rgba(30, 111, 255, 0.03) !important;
}

/* Striped Rows */
table.dataTable.table-striped tbody tr:nth-of-type(odd) td {
    background: #fafbfc !important;
}

table.dataTable.table-striped tbody tr:nth-of-type(odd):hover td {
    background: rgba(30, 111, 255, 0.05) !important;
}

/* Select Checkbox - Modern Clean Design */
table.dataTable tbody td.select-checkbox,
table.dataTable thead th.select-checkbox {
    position: relative !important;
    cursor: pointer !important;
    text-align: center !important;
    vertical-align: middle !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    padding: 8px !important;
}

table.dataTable tbody td.select-checkbox::before,
table.dataTable thead th.select-checkbox::before {
    content: "" !important;
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    border: 2px solid #d1d5db !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    transition: all 0.15s ease !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    margin: 0 !important;
}

table.dataTable tbody td.select-checkbox:hover::before,
table.dataTable thead th.select-checkbox:hover::before {
    border-color: #1E6FFF !important;
    background: #f8fafc !important;
}

table.dataTable tbody tr.selected td.select-checkbox::before,
table.dataTable thead tr.selected th.select-checkbox::before {
    border-color: #1E6FFF !important;
    background: #1E6FFF !important;
    box-shadow: 0 2px 4px rgba(30, 111, 255, 0.25) !important;
}

table.dataTable tbody tr.selected td.select-checkbox::after,
table.dataTable thead tr.selected th.select-checkbox::after {
    content: "" !important;
    display: block !important;
    width: 5px !important;
    height: 10px !important;
    border: solid #ffffff !important;
    border-width: 0 2.5px 2.5px 0 !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -55%) rotate(45deg) !important;
    margin: 0 !important;
}

/* Ensure first column (checkbox) is properly sized */
table.dataTable thead th:first-child,
table.dataTable tbody td:first-child {
    text-align: center !important;
}

/* Action Buttons in Table - Small compact inline design */
.btn-xs,
table.dataTable .btn-xs,
.btn-group-xs > .btn,
table.dataTable td .btn {
    padding: 3px 6px !important;
    font-size: 10px !important;
    border-radius: 3px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    display: inline-block !important;
    line-height: 1.3 !important;
    margin: 1px !important;
    white-space: nowrap !important;
}

table.dataTable .btn-group {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    gap: 2px !important;
}

table.dataTable .btn-group .btn {
    padding: 3px 6px !important;
    font-size: 10px !important;
    border-radius: 3px !important;
    margin: 1px !important;
}

/* Actions column - make buttons inline */
table.dataTable td:last-child {
    white-space: nowrap !important;
}

table.dataTable td:last-child form {
    display: inline !important;
}

table.dataTable td:last-child .btn {
    vertical-align: middle !important;
}

/* View Button */
.btn-info,
table.dataTable .btn-info {
    background: #3FA9F5 !important;
    border-color: #3FA9F5 !important;
    color: #ffffff !important;
}

.btn-info:hover,
table.dataTable .btn-info:hover {
    background: #1E6FFF !important;
    border-color: #1E6FFF !important;
}

/* Edit Button */
.btn-warning,
table.dataTable .btn-warning {
    background: #f59e0b !important;
    border-color: #f59e0b !important;
    color: #ffffff !important;
}

.btn-warning:hover,
table.dataTable .btn-warning:hover {
    background: #d97706 !important;
    border-color: #d97706 !important;
}

/* Delete Button */
.btn-danger,
table.dataTable .btn-danger {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

.btn-danger:hover,
table.dataTable .btn-danger:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
}

/* Badges in Table - with margin for permissions */
.badge {
    padding: 5px 10px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    margin: 2px !important;
    display: inline-block !important;
}

table.dataTable .badge {
    margin: 2px 3px !important;
}

.badge-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
}

.badge-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
}

.badge-info {
    background: linear-gradient(135deg, #3FA9F5 0%, #1E6FFF 100%) !important;
    color: #ffffff !important;
}

.badge-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
    color: #ffffff !important;
}

/* Bottom Controls */
.dataTables_wrapper .row:last-child {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

/* Info Text */
.dataTables_info {
    font-size: 14px;
    color: #6b7280;
    padding: 8px 0 !important;
}

/* Pagination */
.dataTables_paginate {
    padding: 0 !important;
}

.dataTables_paginate .paginate_button {
    padding: 8px 14px !important;
    margin: 0 3px !important;
    border-radius: 8px !important;
    border: 1px solid #e5e7eb !important;
    background: #ffffff !important;
    color: #374151 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.dataTables_paginate .paginate_button:hover {
    background: rgba(30, 111, 255, 0.08) !important;
    border-color: #1E6FFF !important;
    color: #1E6FFF !important;
    box-shadow: 0 2px 4px rgba(30, 111, 255, 0.1) !important;
}

.dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #1E6FFF 0%, #3FA9F5 100%) !important;
    border-color: #1E6FFF !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(30, 111, 255, 0.25) !important;
}

.dataTables_paginate .paginate_button.current:hover {
    background: linear-gradient(135deg, #1557cc 0%, #1E6FFF 100%) !important;
    color: #ffffff !important;
}

.dataTables_paginate .paginate_button.disabled {
    color: #d1d5db !important;
    background: #fafafa !important;
    border-color: #f3f4f6 !important;
    cursor: not-allowed !important;
}

.dataTables_paginate .paginate_button.disabled:hover {
    color: #d1d5db !important;
    background: #fafafa !important;
    border-color: #f3f4f6 !important;
    box-shadow: none !important;
}

/* Ensure DataTables wrapper has position for absolute children */
.dataTables_wrapper {
    position: relative !important;
}

/* Loading State - Centered on screen */
.dataTables_processing {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    margin-top: -25px !important;
    margin-left: -75px !important;
    width: 150px !important;
    height: 50px !important;
    line-height: 50px !important;
    padding: 0 !important;
    z-index: 9999 !important;
    background: linear-gradient(135deg, #1e6fff 0%, #3fa9f5 100%) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    text-align: center !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    box-shadow: 0 10px 40px rgba(30, 111, 255, 0.4) !important;
}

/* Empty Table */
table.dataTable tbody td.dataTables_empty {
    padding: 40px !important;
    text-align: center !important;
    color: #9ca3af !important;
    font-size: 15px !important;
    background: #fafbfc !important;
}

/* Custom Toggle Switch for DataTables - Compact Inline Style */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    vertical-align: middle;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: all 0.3s ease;
    border-radius: 20px;
}

.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .slider {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(16px);
}

.toggle-switch input:focus + .slider {
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.toggle-switch input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Bootstrap custom-switch fix - Compact */
.custom-control.custom-switch {
    padding-left: 2.25rem;
    min-height: 1.25rem;
}

.custom-switch .custom-control-label {
    cursor: pointer;
}

.custom-switch .custom-control-label::before {
    width: 34px !important;
    height: 18px !important;
    border-radius: 10px !important;
    background: #e5e7eb !important;
    border: none !important;
    left: -2.25rem !important;
    top: 0 !important;
    transition: all 0.3s ease !important;
}

.custom-switch .custom-control-label::after {
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
    left: calc(-2.25rem + 2px) !important;
    top: 2px !important;
    transition: all 0.3s ease !important;
}

.custom-switch .custom-control-input:checked ~ .custom-control-label::before {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.custom-switch .custom-control-input:checked ~ .custom-control-label::after {
    transform: translateX(18px) !important;
}

.custom-switch .custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
}

.custom-switch .custom-control-input:disabled ~ .custom-control-label::before {
    opacity: 0.5;
}

/* Dark Mode DataTable */
body.dark-mode table.dataTable thead th {
    background: linear-gradient(135deg, #0f1419 0%, #0B0F14 100%) !important;
    border-color: rgba(30, 111, 255, 0.2) !important;
    color: #E6ECF2 !important;
}

body.dark-mode table.dataTable tbody td {
    background: #0B0F14 !important;
    border-color: rgba(30, 111, 255, 0.1) !important;
    color: #E6ECF2 !important;
}

body.dark-mode table.dataTable tbody tr:hover td {
    background: rgba(30, 111, 255, 0.08) !important;
}

body.dark-mode table.dataTable.table-striped tbody tr:nth-of-type(odd) td {
    background: rgba(30, 111, 255, 0.03) !important;
}

body.dark-mode .dataTables_length select,
body.dark-mode .dataTables_filter input {
    background-color: #0f1419 !important;
    border-color: rgba(30, 111, 255, 0.2) !important;
    color: #E6ECF2 !important;
}

body.dark-mode .dataTables_info {
    color: #8B97A8 !important;
}

body.dark-mode .dataTables_paginate .paginate_button {
    background: #0f1419 !important;
    border-color: rgba(30, 111, 255, 0.2) !important;
    color: #E6ECF2 !important;
}

body.dark-mode .dataTables_paginate .paginate_button:hover {
    background: rgba(30, 111, 255, 0.15) !important;
}

body.dark-mode .datatable-card {
    background: #0B0F14 !important;
    border-color: rgba(30, 111, 255, 0.2) !important;
}

/* ========================================
   END MODERN DATATABLE DESIGN
   ======================================== */

/* ========================================
   MODERN FORM INPUTS
   Consistent styling across all forms
   ======================================== */

.form-control {
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    color: #374151 !important;
    background: #ffffff !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

/* Auth Form Inputs with Icons - Need extra padding-left */
.login-page .form-control,
body.login-page .form-control {
    padding: 14px 18px 14px 52px !important;
    border-radius: 14px !important;
    font-size: 15px !important;
    background: #f9fafb !important;
}

.login-page .form-control:focus,
body.login-page .form-control:focus {
    background: #ffffff !important;
}

.form-control:hover {
    border-color: #d1d5db !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06) !important;
}

.form-control:focus {
    border-color: #1E6FFF !important;
    box-shadow: 0 0 0 4px rgba(30, 111, 255, 0.12) !important;
    outline: none !important;
}

.form-control::placeholder {
    color: #9ca3af !important;
}

/* Form Labels */
.form-group label,
label.required {
    font-weight: 600 !important;
    color: #374151 !important;
    font-size: 14px !important;
    margin-bottom: 8px !important;
}

/* Select All / Deselect All Buttons */
.select-all,
.deselect-all {
    padding: 6px 14px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    margin: 4px 2px !important;
    transition: all 0.2s ease !important;
}

.select-all {
    background: rgba(30, 111, 255, 0.1) !important;
    border: 1px solid rgba(30, 111, 255, 0.2) !important;
    color: #1E6FFF !important;
}

.select-all:hover {
    background: rgba(30, 111, 255, 0.2) !important;
    border-color: #1E6FFF !important;
}

.deselect-all {
    background: rgba(107, 114, 128, 0.1) !important;
    border: 1px solid rgba(107, 114, 128, 0.2) !important;
    color: #6b7280 !important;
}

.deselect-all:hover {
    background: rgba(107, 114, 128, 0.2) !important;
    border-color: #6b7280 !important;
}

/* Dark Mode Forms */
body.dark-mode .form-control {
    background: #0f1419 !important;
    border-color: rgba(30, 111, 255, 0.2) !important;
    color: #E6ECF2 !important;
}

body.dark-mode .form-control:focus {
    border-color: #1E6FFF !important;
    box-shadow: 0 0 0 4px rgba(30, 111, 255, 0.2) !important;
}

body.dark-mode .form-group label,
body.dark-mode label.required {
    color: #E6ECF2 !important;
}

/* ========================================
   END MODERN FORM INPUTS
   ======================================== */

/* ========================================
   TOASTR NOTIFICATIONS - Modern Style
   ======================================== */

.toast {
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

#toast-container > .toast-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

#toast-container > .toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

#toast-container > .toast-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

#toast-container > .toast-info {
    background: linear-gradient(135deg, #3FA9F5 0%, #1E6FFF 100%) !important;
}

/* ========================================
   END TOASTR NOTIFICATIONS
   ======================================== */

/* ========================================
   DASHBOARD HOME PAGE STYLES
   ======================================== */

/* Welcome Header */
.dashboard-welcome {
    background: linear-gradient(135deg, #1E6FFF 0%, #3FA9F5 100%);
    border-radius: 16px;
    padding: 24px 32px;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(30, 111, 255, 0.25);
}

.dashboard-welcome h2 {
    color: #ffffff;
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 4px;
}

.dashboard-welcome p,
.dashboard-welcome .welcome-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 0;
    font-size: 15px;
}

.dashboard-welcome .welcome-date {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 14px;
}

/* Dashboard Cards */
.dashboard-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}

.dashboard-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.dashboard-card .card-header {
    background: #ffffff;
    border-bottom: 1px solid #f3f4f6;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0;
}

.dashboard-card .card-header h5 {
    color: #111827;
    font-weight: 600;
    font-size: 16px;
    margin: 0;
}

.dashboard-card .card-body {
    padding: 20px;
}

/* KPI Stat Cards */
.dashboard-stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    height: 100%;
}

.dashboard-stat-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.dashboard-stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
    flex-shrink: 0;
}

.dashboard-stat-card .stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dashboard-stat-card .stat-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.dashboard-stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 6px;
}

.dashboard-stat-card .stat-change {
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.dashboard-stat-card .stat-change.positive {
    color: #10b981;
}

.dashboard-stat-card .stat-change.negative {
    color: #ef4444;
}

.dashboard-stat-card .stat-change.warning {
    color: #f59e0b;
}

.dashboard-stat-card .stat-change.neutral {
    color: #6b7280;
}

.dashboard-stat-card .stat-action {
    font-size: 12px;
    font-weight: 600;
    color: #1E6FFF;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.dashboard-stat-card .stat-action:hover {
    color: #1557cc;
    text-decoration: underline;
}

/* Stat Card Color Variations */
.stat-users .stat-icon { background: linear-gradient(135deg, #1E6FFF 0%, #3FA9F5 100%); }
.stat-revenue .stat-icon { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.stat-jobs .stat-icon { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }
.stat-success .stat-icon { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.stat-projects .stat-icon { background: linear-gradient(135deg, #1E6FFF 0%, #3FA9F5 100%); }
.stat-tasks .stat-icon { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.stat-credits .stat-icon { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }

/* Job Status Grid */
.job-status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.job-status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.job-status-item .status-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ffffff;
}

.job-status-item .status-info {
    display: flex;
    flex-direction: column;
}

.job-status-item .status-count {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.job-status-item .status-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.job-status-item.queued .status-icon { background: #6b7280; }
.job-status-item.running .status-icon { background: #f59e0b; }
.job-status-item.completed .status-icon { background: #10b981; }
.job-status-item.failed .status-icon { background: #ef4444; }

/* Success Rate Circle Widget */
.success-rate-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.rate-circle {
    position: relative;
    width: 120px;
    height: 120px;
}

.rate-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.rate-circle .circle-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 3;
}

.rate-circle .circle-fill {
    fill: none;
    stroke: #10b981;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}

.rate-circle .rate-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.success-rate-widget .rate-label {
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* Quick Actions List */
.quick-actions-list {
    display: flex;
    flex-direction: column;
}

.quick-action-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.quick-action-item:last-child {
    border-bottom: none;
}

.quick-action-item:hover {
    background: #f9fafb;
    text-decoration: none;
}

.quick-action-item .action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.quick-action-item:hover .action-icon {
    transform: scale(1.1);
}

.quick-action-item .action-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.quick-action-item .action-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.quick-action-item .action-desc {
    font-size: 12px;
    color: #6b7280;
}

.quick-action-item > .fa-chevron-right {
    color: #d1d5db;
    font-size: 12px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.quick-action-item:hover > .fa-chevron-right {
    color: #1E6FFF;
    transform: translateX(3px);
}

/* Background color helpers */
.bg-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
}

/* Activity Feed */
.activity-feed {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: #f9fafb;
}

.activity-item .activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-item .activity-icon.completed { background: #10b981; }
.activity-item .activity-icon.failed { background: #ef4444; }
.activity-item .activity-icon.running { background: #f59e0b; }
.activity-item .activity-icon.queued { background: #6b7280; }
.activity-item .activity-icon.cancelled { background: #9ca3af; }

.activity-item .activity-content {
    flex: 1;
    min-width: 0;
}

.activity-item .activity-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.activity-item .activity-title strong {
    color: #111827;
    font-size: 14px;
}

.activity-item .activity-user {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.activity-item .activity-time {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

/* Chart Legend */
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.empty-state i {
    opacity: 0.5;
}

/* Alerts Section */
.alerts-section .alert {
    border-radius: 10px;
    border: none;
    padding: 14px 20px;
    margin-bottom: 12px;
}

.alerts-section .alert:last-child {
    margin-bottom: 0;
}

.alerts-section .alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.alerts-section .alert-info {
    background: linear-gradient(135deg, rgba(30, 111, 255, 0.1) 0%, rgba(63, 169, 245, 0.1) 100%);
    color: #1e40af;
    border-left: 4px solid #1E6FFF;
}

.alerts-section .alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Table Styles in Dashboard */
.dashboard-card .table {
    margin-bottom: 0;
}

.dashboard-card .table thead th {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    border-top: none;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    padding: 12px 16px;
}

.dashboard-card .table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #374151;
}

.dashboard-card .table tbody tr:last-child td {
    border-bottom: none;
}

.dashboard-card .table tbody tr:hover {
    background: #f9fafb;
}

/* Button Sizes */
.btn-xs {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .job-status-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .success-rate-widget {
        margin-top: 20px;
    }
}

@media (max-width: 767px) {
    .dashboard-welcome {
        text-align: center;
        padding: 20px;
    }

    .dashboard-welcome .text-md-right {
        text-align: center !important;
        margin-top: 10px;
    }

    .dashboard-stat-card {
        padding: 16px;
    }

    .dashboard-stat-card .stat-value {
        font-size: 24px;
    }

    .job-status-grid {
        grid-template-columns: 1fr;
    }

    .rate-circle {
        width: 100px;
        height: 100px;
    }

    .rate-circle .rate-value {
        font-size: 20px;
    }
}

/* Dark Mode Support */
body.dark-mode .dashboard-welcome {
    background: linear-gradient(135deg, #1557cc 0%, #1E6FFF 100%);
}

body.dark-mode .dashboard-card,
body.dark-mode .dashboard-stat-card {
    background: #192734;
    border-color: rgba(30, 111, 255, 0.15);
}

body.dark-mode .dashboard-card .card-header {
    background: #192734;
    border-color: rgba(30, 111, 255, 0.1);
}

body.dark-mode .dashboard-card .card-header h5,
body.dark-mode .dashboard-stat-card .stat-value,
body.dark-mode .job-status-item .status-count,
body.dark-mode .activity-item .activity-title strong,
body.dark-mode .quick-action-item .action-title {
    color: #E6ECF2;
}

body.dark-mode .dashboard-stat-card .stat-label,
body.dark-mode .job-status-item .status-label,
body.dark-mode .activity-item .activity-user,
body.dark-mode .activity-item .activity-time,
body.dark-mode .quick-action-item .action-desc,
body.dark-mode .legend-item {
    color: #8899A6;
}

body.dark-mode .job-status-item {
    background: #0f1419;
    border-color: rgba(30, 111, 255, 0.15);
}

body.dark-mode .quick-action-item:hover,
body.dark-mode .activity-item:hover {
    background: rgba(30, 111, 255, 0.05);
}

body.dark-mode .dashboard-card .table thead th {
    background: #0f1419;
    border-color: rgba(30, 111, 255, 0.1);
    color: #8899A6;
}

body.dark-mode .dashboard-card .table tbody td {
    border-color: rgba(30, 111, 255, 0.08);
    color: #E6ECF2;
}

body.dark-mode .dashboard-card .table tbody tr:hover {
    background: rgba(30, 111, 255, 0.05);
}

body.dark-mode .rate-circle .circle-bg {
    stroke: rgba(30, 111, 255, 0.2);
}

body.dark-mode .rate-circle .rate-value {
    color: #E6ECF2;
}

body.dark-mode .alerts-section .alert-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

body.dark-mode .alerts-section .alert-info {
    background: rgba(30, 111, 255, 0.15);
    color: #60a5fa;
}

body.dark-mode .alerts-section .alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Plugin Cards */
.plugin-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    height: 100%;
    transition: all 0.2s ease;
}

.plugin-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    transform: translateY(-2px);
}

.plugin-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.plugin-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.plugin-info {
    flex-grow: 1;
    overflow: hidden;
}

.plugin-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plugin-type {
    font-size: 12px;
}

.plugin-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.plugin-badges .badge-sm {
    font-size: 10px;
    padding: 3px 6px;
}

.plugin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.plugin-actions .btn-sm {
    font-size: 11px;
    padding: 4px 8px;
}

/* Dark mode plugin cards */
body.dark-mode .plugin-card {
    background: #15202B;
    border-color: rgba(30, 111, 255, 0.15);
}

body.dark-mode .plugin-card:hover {
    border-color: #1e6fff;
    box-shadow: 0 4px 12px rgba(30, 111, 255, 0.2);
}

body.dark-mode .plugin-name {
    color: #E6ECF2;
}

body.dark-mode .plugin-type {
    color: #8899A6;
}

body.dark-mode .plugin-icon {
    background: linear-gradient(135deg, #1e6fff 0%, #764ba2 100%);
}

/* Activity Actions */
.activity-item {
    display: flex;
    align-items: flex-start;
}

.activity-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
    margin-left: 10px;
}

.activity-actions .btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

/* ========================================
   END DASHBOARD HOME PAGE STYLES
   ======================================== */

/* ========================================
   DATATABLE FILTER BAR
   ======================================== */
.dt-filter-bar {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: visible;
    transition: box-shadow 0.2s ease;
}

.dt-filter-bar:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

.dt-filter-bar-inner {
    display: flex;
    align-items: stretch;
    padding: 0;
}

.dt-filter-bar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-width: 48px;
    background: linear-gradient(135deg, #1E6FFF 0%, #3FA9F5 100%);
    color: #ffffff;
    font-size: 15px;
    border-radius: 14px 0 0 14px;
}

.dt-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    padding: 12px 16px;
    flex: 1;
}

.dt-filter-group {
    display: flex;
    flex-direction: column;
    min-width: 160px;
    flex: 1;
    max-width: 240px;
    position: relative; /* anchor for Select2 dropdown */
}

.dt-filter-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin-bottom: 4px;
    padding-left: 2px;
}

/* Select2 override specific to filter bar — compact size */
.dt-filter-bar .select2-container--default .select2-selection--single {
    min-height: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    padding: 2px 8px !important;
    border: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
    transition: all 0.2s ease !important;
}

.dt-filter-bar .select2-container--default .select2-selection--single:hover {
    border-color: #1E6FFF !important;
    background: #ffffff !important;
}

.dt-filter-bar .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 32px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    padding-left: 6px !important;
}

.dt-filter-bar .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 34px !important;
    right: 8px !important;
}

.dt-filter-bar .select2-container--default.select2-container--focus .select2-selection--single,
.dt-filter-bar .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #1E6FFF !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(30, 111, 255, 0.1) !important;
}

/* Date and text inputs in filter bar */
.dt-filter-date,
.dt-filter-text {
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    background: #f9fafb;
    transition: all 0.2s ease;
    outline: none;
    width: 100%;
}

.dt-filter-date:hover,
.dt-filter-text:hover {
    border-color: #1E6FFF;
    background: #ffffff;
}

.dt-filter-date:focus,
.dt-filter-text:focus {
    border-color: #1E6FFF;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(30, 111, 255, 0.1);
}

/* Reset button */
.dt-filter-actions {
    min-width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
}

.dt-filter-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dt-filter-reset-btn:hover {
    border-color: #ef4444;
    background: #fef2f2;
    color: #ef4444;
}

.dt-filter-reset-btn i {
    font-size: 12px;
}

/* --- Dark Mode --- */
body.dark-mode .dt-filter-bar {
    background: #0f1419;
    border-color: rgba(30, 111, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .dt-filter-bar:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.dark-mode .dt-filter-label {
    color: #9ca3af;
}

body.dark-mode .dt-filter-bar .select2-container--default .select2-selection--single {
    background: #0B0F14 !important;
    border-color: rgba(30, 111, 255, 0.2) !important;
}

body.dark-mode .dt-filter-bar .select2-container--default .select2-selection--single:hover {
    border-color: #1E6FFF !important;
    background: #151b23 !important;
}

body.dark-mode .dt-filter-bar .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #E6ECF2 !important;
}

body.dark-mode .dt-filter-date,
body.dark-mode .dt-filter-text {
    background: #0B0F14;
    border-color: rgba(30, 111, 255, 0.2);
    color: #E6ECF2;
}

body.dark-mode .dt-filter-date:hover,
body.dark-mode .dt-filter-text:hover {
    border-color: #1E6FFF;
    background: #151b23;
}

body.dark-mode .dt-filter-date:focus,
body.dark-mode .dt-filter-text:focus {
    border-color: #1E6FFF;
    background: #151b23;
    box-shadow: 0 0 0 3px rgba(30, 111, 255, 0.15);
}

body.dark-mode .dt-filter-reset-btn {
    background: #0B0F14;
    border-color: rgba(30, 111, 255, 0.2);
    color: #9ca3af;
}

body.dark-mode .dt-filter-reset-btn:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .dt-filter-bar-inner {
        flex-direction: column;
    }

    .dt-filter-bar-icon {
        width: 100%;
        min-width: unset;
        height: 36px;
        border-radius: 14px 14px 0 0;
        font-size: 13px;
    }

    .dt-filter-bar-icon::after {
        content: 'Filters';
        margin-left: 8px;
        font-family: inherit;
        font-weight: 600;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .dt-filter-form {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

    .dt-filter-group {
        max-width: 100%;
        min-width: unset;
        width: 100%;
    }
}
/* ========================================
   END DATATABLE FILTER BAR
   ======================================== */
