:root {
    /* Cashiar Theme Palette */
    --primary-color: #6f4ef6;
    /* Indigo */
    --primary-hover: #5c3ce4;
    --secondary-color: #fca5a5;

    --bg-body: #f1f5f9;
    /* Slate 100 - Slightly darker than previous */
    --bg-card: #ffffff;
    --bg-sidebar: #f8fafc;
    /* Slate 50 - Softer than pure white */

    --text-primary: #0f172a;
    /* Slate 900 - Darker for ultra sharp contrast */
    --text-secondary: #475569;
    /* Slate 600 - More legible than Slate 500 */
    --text-light: #64748b;
    /* Slate 500 - Good for muted text */

    --border-color: #e2e8f0;

    /* Metrics - Softened */
    --radius-sm: 8px;
    /* Was 6px */
    --radius-md: 12px;
    /* Was 10px */
    --radius-lg: 20px;
    /* Was 16px */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

@font-face {
    font-family: 'beIN Normal';
    src: url('../fonts/bein-ar-normal.woff') format('woff');
}

body {
    font-family: 'beIN Normal', 'Inter', 'Segoe UI', sans-serif !important;
    font-size: 14px;
    /* Slightly smaller for better density */
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* RTL Layout Fixes */
body.rtls #page-wrapper {
    margin: 0 250px 0 0 !important;
    min-height: 100vh;
}

/* Mini Navbar (Collapsed) Fixes */
body.rtls.mini-navbar #page-wrapper {
    margin: 0 70px 0 0 !important;
}

/* Mini Navbar (Collapsed) Fixes - ROBUST */
body.mini-navbar .navbar-static-side {
    width: 70px !important;
    overflow: visible !important;
    /* Critical for pop-outs */
    z-index: 2001 !important;
}

/* NUCLEAR OPTION: Hide Labels and Arrows by DEFAULT */
body.mini-navbar .nav-label,
body.mini-navbar .fa-arrow {
    display: none !important;
    visibility: hidden;
    opacity: 0;
    width: 0;
    font-size: 0;
}

/* RESTORE Label on Hover as TOOLTIP */
body.mini-navbar .nav>li:hover>a>.nav-label,
body.mini-navbar .nav>li:focus>a>.nav-label {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    font-size: 14px !important;
    position: absolute;
    left: 70px;
    /* LTR Position */
    top: 5px;
    background-color: #ffffff;
    color: #676a6c;
    padding: 10px 15px;
    border-radius: 0 4px 4px 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    z-index: 100001;
    /* Above submenu */
}

/* RTL Tooltip Position */
body.rtls.mini-navbar .nav>li:hover>a>.nav-label,
body.rtls.mini-navbar .nav>li:focus>a>.nav-label {
    left: auto;
    right: 70px;
    border-radius: 4px 0 0 4px;
    /* Flip radius */
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

/* Dark Mode Tooltip */
body.dark-mode.mini-navbar .nav>li:hover>a>.nav-label,
body.dark-mode.mini-navbar .nav>li:focus>a>.nav-label {
    background-color: #182235;
    color: #cbd5e1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.mini-navbar .nav>li>a {
    margin: 0 !important;
    padding: 14px 10px !important;
    text-align: center;
    border-radius: 0 !important;
    position: relative;
    min-height: 50px;
}

body.mini-navbar .nav>li>a i {
    margin: 0 !important;
    font-size: 20px;
    display: block;
    width: 100%;
}

body.mini-navbar .nav>li.active>a {
    box-shadow: none;
    background: transparent !important;
    color: var(--primary-color) !important;
    border: none !important;
    border-left: none !important;
}


/* Submenu Pop-out Logic */
body.mini-navbar .nav-second-level {
    display: none;
    position: absolute;
    left: 70px;
    top: 0;
    background-color: #ffffff !important;
    padding: 10px 0;
    min-width: 260px;
    box-shadow: var(--shadow-md);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    z-index: 99999;
    /* Highest Z-Index */
}

/* Force Show on Hover */
body.mini-navbar .nav>li:hover>.nav-second-level {
    display: block !important;
    opacity: 1;
    visibility: visible;
}

/* RTL Support */
body.rtls.mini-navbar .nav-second-level {
    left: auto !important;
    right: 70px !important;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

@media (max-width: 768px) {
    body.rtls #page-wrapper {
        margin: 0 !important;
    }
}

/* =========================================
   SCROLLBARS (Slim & Soft)
   ========================================= */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* =========================================
   SIDEBAR (Cashiar White Style)
   ========================================= */
/* =========================================
   SIDEBAR (Cashiar White Style - High Specificity)
   ========================================= */
body .navbar-default,
body .navbar-static-side {
    background-color: var(--bg-sidebar) !important;
    box-shadow: var(--shadow-sm);
    border-right: 1px solid var(--border-color);
    width: 250px;
}

body .nav-header {
    background: transparent !important;
    padding: 30px 20px;
}

body .img-circle {
    border: 2px solid var(--primary-color);
    padding: 2px;
}

/* Menu Items Overrides (Soft Pill Style) */
body .nav>li>a {
    color: var(--text-secondary) !important;
    font-weight: 500;
    /* padding: 12px 16px; */
    /* border-radius: var(--radius-md) !important; */
    /* margin: 4px 12px !important; */
    border: none !important;
    transition: all 0.2s;
    background: transparent;
}

body .nav>li>a:hover,
body .nav>li>a:focus {
    background-color: #f1f5f9 !important;
    /* Darker on hover */
    color: var(--primary-color) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* Active State - Floating Pill */
body .navbar-default .nav>li.active,
body .nav>li.active {
    border-left: none !important;
    border-right: none !important;
    background: transparent !important;
}

body .navbar-default .nav>li.active>a,
body .nav>li.active>a {
    color: var(--primary-color) !important;
    background-color: rgba(111, 78, 246, 0.08) !important;
    /* Subtle primary tint */
    font-weight: 600;
    box-shadow: none;
    /* Removed shadow for cleaner flat look */
    border: none !important;
    /* Kill the Green Line */
    border-left: none !important;
    border-right: none !important;
}

body .nav>li>a i {
    color: #94a3b8 !important;
    /* Muted icon */
    margin-left: 10px;
    font-size: 18px;
    transition: color 0.2s;
}

body .nav>li.active>a i,
body .nav>li>a:hover i {
    color: var(--primary-color) !important;
}

/* =========================================
   SUB-MENUS (Cashiar Light Style)
   ========================================= */
body .nav-second-level {
    background: #f8fafc !important;
    /* Light Gray instead of Dark */
    padding: 10px 0;
}

body .nav-second-level li a {
    color: var(--text-secondary) !important;
    padding: 8px 30px 8px 10px !important;
    font-size: 13px;
    border-radius: var(--radius-sm);
    margin: 2px 20px;
}

body .nav-second-level li a:hover {
    color: var(--primary-color) !important;
    background-color: #e2e8f0 !important;
}

body .nav-second-level li.active a {
    color: var(--primary-color) !important;
    background-color: transparent !important;
    font-weight: 600;
}

/* =========================================
   TOP NAVIGATION (Cashiar Floating Style)
   ========================================= */
body .navbar-static-top {
    background: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    border-bottom: 1px solid var(--border-color) !important;
    margin-bottom: 0;
}

body .navbar-top-links li a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

body .navbar-top-links li a:hover {
    color: var(--primary-color);
    background-color: transparent;
}

body .minimalize-styl-2 {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    border-radius: var(--radius-sm);
}

/* =========================================
   CARDS (Clean & Soft Shadow)
   ========================================= */
.ibox {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: none !important;
    margin-bottom: 24px;
    overflow: hidden;
}

.ibox-title {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
}

.ibox-title h5 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.ibox-content {
    background: transparent;
    padding: 24px;
    border: none;
}

/* =========================================
   GROUPED FORMS (Premium Cashiar Layout)
   ========================================= */
.form-container {
    background-color: #f1f5f9;
    /* Slate 100 - More solid */
    padding: 30px;
    /* Increased padding */
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    /* Subtle inner depth */
}

.form-section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px !important;
    /* Small margin between them */
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.form-section-header {
    background: #ffffff;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Default LTR (Title Left, Tools Right) */
.form-section-header {
    flex-direction: row;
}

/* RTL Support (Title Right, Tools Left) */
body.rtls .form-section-header,
body.rtl .form-section-header {
    flex-direction: row-reverse;
}

.form-section-header .ibox-tools {
    position: static !important;
    float: none !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    gap: 10px;
}

.form-section-header .ibox-tools a {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 5px !important;
}

.form-section-header h5,
.form-section-header h5 a {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
}

/* Accent line for headers */
.form-section-header h5::before {
    content: "";
    width: 4px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 4px;
}

.form-section-body {
    padding: 20px;
}

/* Dark Mode Support for Grouped Forms */
body.dark-mode .form-container {
    background-color: rgba(15, 23, 42, 0.5);
    border-color: #334155;
}

body.dark-mode .form-section {
    background-color: #1e293b;
    border-color: #334155;
}

body.dark-mode .form-section-header {
    background-color: #1e293b;
    border-bottom-color: #334155;
}

/* =========================================
   GENERIC DROPDOWNS (Cashiar Style)
   ========================================= */
.dropdown-menu {
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    margin-top: 5px;
}

.dropdown-menu>li>a {
    padding: 8px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.dropdown-menu>li>a:hover {
    color: var(--primary-color);
    background-color: #f8fafc;
}

.dropdown-menu>.divider {
    background-color: var(--border-color);
    margin: 4px 0;
}

/* =========================================
   INPUTS (Cashiar Style)
   ========================================= */
.form-control {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    height: 45px;
    /* Slightly taller for modern feel */
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(111, 78, 246, 0.1);
    outline: none;
}

label {
    font-weight: 600 !important;
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 8px;
    display: inline-block;
}

/* =========================================
   DATEPICKER (Premium Look)
   ========================================= */
/* Datepicker Popup (Only Dropdown) */
.datepicker-dropdown,
.datepicker.dropdown-menu {
    padding: 15px !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    font-family: 'beIN Normal', 'Cairo', sans-serif !important;
    background-color: #ffffff !important;
    color: var(--text-primary) !important;
    z-index: 10001 !important;
    min-width: 280px !important;
    max-width: 300px !important;
    position: absolute !important;
}

/* Fix: The input field should not get the popup styles even if it has the .datepicker class */
input.datepicker,
input.datepicker-rtl {
    padding: 8px 12px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-shadow: none !important;
    border: 1px solid var(--border-color) !important;
}

.datepicker table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 2px !important;
    margin: 0 !important;
}

.datepicker-dropdown table tr td, 
.datepicker-dropdown table tr th {
    width: 36px !important;
    height: 36px !important;
    border-radius: var(--radius-sm) !important;
    border: none !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-align: center;
    vertical-align: middle;
    padding: 0 !important;
}

.datepicker-dropdown table tr td.day:hover,
.datepicker-dropdown table tr td.focused {
    background: #f1f5f9 !important;
    color: var(--primary-color) !important;
    cursor: pointer;
    transform: scale(1.05);
}

.datepicker-dropdown table tr td.old,
.datepicker-dropdown table tr td.new {
    color: var(--text-light) !important;
    opacity: 0.4;
}

.datepicker-dropdown table tr td.today {
    background: #fef3c7 !important;
    color: #92400e !important;
    font-weight: 700 !important;
    border: 1px solid #fde68a !important;
}

.datepicker-dropdown table tr td.active,
.datepicker-dropdown table tr td.active:hover {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 6px -1px rgba(111, 78, 246, 0.2) !important;
}

/* Header Arrows and Month/Year Switch */
.datepicker thead tr:first-child th {
    background-color: transparent !important;
    color: var(--text-primary) !important;
    cursor: pointer;
    vertical-align: middle;
    height: 48px !important;
}

.datepicker-dropdown th.datepicker-switch {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    letter-spacing: -0.5px;
}

.datepicker-dropdown th.next, .datepicker-dropdown th.prev {
    color: var(--primary-color) !important;
    font-size: 18px !important;
    background: #f1f5f9 !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    display: table-cell;
    transition: all 0.3s;
}

.datepicker-dropdown th.next:hover, .datepicker-dropdown th.prev:hover {
    background: var(--primary-color-light) !important;
    color: var(--primary-color) !important;
}

/* Weekday Names (dow) */
.datepicker-dropdown thead tr:nth-child(2) th {
    color: var(--text-secondary) !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    padding: 8px 0 !important;
    text-transform: uppercase;
    border-bottom: 1px solid #f1f5f9 !important;
}

/* Selected range or other states */
.datepicker-dropdown table tr td.selected,
.datepicker-dropdown table tr td.selected:hover {
    background-color: var(--primary-color-light) !important;
    color: var(--primary-color) !important;
}

/* Input Group Addon for Datepicker */
.input-group.date {
    display: table !important; /* Revert to stable table layout to avoid grid overlap */
    width: 100% !important;
    border-collapse: separate !important;
    position: relative;
    border-spacing: 0;
}

.input-group.date .input-group-addon,
.input-group.date .form-control {
    display: table-cell !important;
    float: none !important;
    vertical-align: middle;
}

.input-group.date .input-group-addon {
    background-color: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    padding: 6px 15px !important;
    transition: all 0.2s;
    cursor: pointer;
    min-width: 45px;
    text-align: center;
}

.input-group.date:focus-within .input-group-addon {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

/* RTL Layout Logic for Date Picker Group (BS3 Compatible) */
body.rtls .input-group.date .input-group-addon {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
    border-left: none !important;
}

body.rtls .input-group.date .form-control {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
    border-right: none !important;
    border-left: 1px solid var(--border-color) !important;
}

/* Fix for possible floating label or column spacing */
.form-group .input-group.date {
    margin-bottom: 0;
}

/* =========================================
   SELECT2 OVERRIDES (Cashiar Style)
   ========================================= */
.select2-container .select2-selection--single {
    height: 45px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    outline: none;
    background: #ffffff;
    transition: all 0.2s;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 45px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    font-size: 14px;
    color: var(--text-primary);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 43px !important;
}

.select2-container--default .select2-selection--single:focus,
.select2-container--open .select2-selection--single {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(111, 78, 246, 0.1);
}

.select2-dropdown {
    border-color: var(--border-color) !important;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
}

.select2-results__option {
    color: var(--text-primary) !important;
    /* Ensure visibility */
    padding: 8px 12px;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

/* Default Select Option Fix */
select option {
    color: #333;
    background: #fff;
    padding: 5px;
}

/* Messages & Notifications Dropdowns */
.btn {
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-weight: 500;
    font-size: 14px;
    border: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-circle {
    width: 50px;
    height: 50px;
    padding: 10px 16px;
    border-radius: 25px;
    font-size: 18px;
    line-height: 1.33;
}

/* =========================================
   TABLES (Minimalist)
   ========================================= */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    border-collapse: separate;
    /* Allow border-radius */
    border-spacing: 0 6px;
    /* Space between rows */
}

/* Header */
.table thead th {
    background-color: #f1f5f9;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    padding: 14px 16px;
}

.table thead th:first-child {
    border-top-left-radius: var(--radius-sm);
    border-bottom-left-radius: var(--radius-sm);
}

.table thead th:last-child {
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
}

/* Rows */
.table tbody tr {
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: var(--radius-sm);
}

.table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background-color: #ffffff;
    /* Keep white on hover */
    z-index: 1;
    position: relative;
}

.table td {
    padding: 16px;
    vertical-align: middle;
    border-style: solid;
    border-width: 1px 0;
    border-color: var(--border-color);
    background-clip: padding-box;
}

.table td:first-child {
    border-left-width: 1px;
    border-top-left-radius: var(--radius-sm);
    border-bottom-left-radius: var(--radius-sm);
}

.table td:last-child {
    border-right-width: 1px;
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
}

/* Fix for .table-bordered (Collapse borders for grids if needed) */
.table-bordered {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    border: 1px solid var(--border-color);
}

.table-bordered tbody tr {
    box-shadow: none !important;
    transition: none !important;
    transform: none !important;
    border-radius: 0;
}

.table-bordered td,
.table-bordered th {
    border: 1px solid var(--border-color) !important;
    border-radius: 0 !important;
}

/* =========================================
   SMOOTH DARK MODE (Refined Slate Palette)
   ========================================= */
body.dark-mode,
body.skin-1,
body.skin-dark {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-light: #94a3b8;
    --border-color: #334155;

    /* Toolbar & Grid Variables */
    --card-bg: #1e293b;
    --card-text: #f8fafc;
    --card-border: #334155;
    --header-bg: #1e293b;
    --header-text: #f8fafc;
    --text-main: #f8fafc;
    --muted-text: #94a3b8;
    --input-bg: #0f172a;
    --input-border: #475569;

    background-color: var(--bg-body) !important;
    color: var(--text-primary) !important;
}

body.dark-mode #page-wrapper,
body.skin-1 #page-wrapper {
    background-color: var(--bg-body) !important;
}

body.dark-mode .navbar-static-side,
body.skin-1 .navbar-static-side {
    background-color: var(--bg-sidebar) !important;
    border-right-color: var(--border-color);
}

body.dark-mode .nav>li>a,
body.skin-1 .nav>li>a {
    color: var(--text-secondary);
}

body.dark-mode .nav>li>a:hover,
body.skin-1 .nav>li>a:hover {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

body.dark-mode .nav>li.active>a,
body.skin-1 .nav>li.active>a {
    background-color: rgba(111, 78, 246, 0.2);
    color: var(--primary-color);
}

/* Dark Mode Submenus */
body.dark-mode .nav-second-level,
body.skin-1 .nav-second-level {
    background: var(--bg-body) !important;
}

/* Mini-Navbar Dark Mode Unified Look */
body.dark-mode.mini-navbar .nav-second-level,
body.skin-1.mini-navbar .nav-second-level {
    background-color: var(--bg-card) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* =========================================
   LEGACY CONTROL PANEL FIXES (chatUsers)
   ========================================= */
/* =========================================
   TRANSPARENT (60%) & ROBUST PANEL
   ========================================= */

/* Base Drawer Style with Smooth Transition */
.chatUsers {
    height: 100%;
    position: absolute;
    right: 0;
    z-index: 100;
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.3s ease;
    overflow: hidden;
}

body.rtls .chatUsers {
    right: 0;
    left: auto;
}

/* Button/Panel Expanded State */
.chatUsersshow {
    background: rgba(255, 255, 255, 0.6) !important;
    /* Balanced Transparency */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-left: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.05);
    color: var(--text-color) !important;
    padding-top: 72px !important;
    position: absolute;
    z-index: 1001;
    overflow-y: auto;
    height: 100%;
    width: 230px !important;
    opacity: 1;
}

/* 
   SAFER GAP FIX:
   Instead of font-size:0 which might hide content, use flex-like behavior or strict margins.
*/
.chatUsersshow .row {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    /* Prevent flex weirdness in rows */
}

.chatUsersshow .col-md-12 {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

/* Compact Multi-line Button Style */
.chatUsersshow .button,
.chatUsersshow .btn-block {
    background: rgba(255, 255, 255, 0.8) !important;
    color: #495057 !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    margin: 2px auto 6px auto !important;
    /* Tight margins */
    font-family: 'Segoe UI', sans-serif !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    width: 90% !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    cursor: pointer;
    line-height: 1.3 !important;
    white-space: normal !important;
}

/* HIDE DISABLED BUTTONS (User Request) */
.chatUsersshow .button[disabled],
.chatUsersshow .btn-block[disabled],
.chatUsersshow .aspNetDisabled {
    display: none !important;
}

.chatUsersshow .button:hover,
.chatUsersshow .btn-block:hover {
    background: #ffffff !important;
    color: #1c84c6 !important;
    border-color: #1c84c6 !important;
    box-shadow: 0 6px 15px rgba(28, 132, 198, 0.2) !important;
    transform: translateY(-2px);
}

/* Panel Collapsed State */
.chatUsershide {
    background: transparent !important;
    width: 0 !important;
    overflow: hidden;

    /* FLOATING TOOLBAR - RESTORED CIRCLE DESIGN */
    .floating-toolbar {
        position: absolute;
        top: 6px;
        /* Centered between upper edge and line */
        left: 20px;
        /* Default for RTL (Tools on Left) */
        right: auto;
        display: flex;
        align-items: center;
        background: transparent;
        /* No capsule, just buttons */
        padding: 0;
        border: none;
        box-shadow: none;
        z-index: 2001;
        gap: 10px;
        /* Space between the circles */
        min-width: auto;
        border-radius: 0;
    }

    /* RTL/LTR Logic */
    body:not(.rtls) .floating-toolbar {
        right: 20px;
        left: auto;
    }

    /* Individual Circle Buttons */
    .toolbar-btn {
        width: 32px;
        height: 32px;
        background: #ffffff;
        border: 1px solid #e7eaec;
        /* Subtle border */
        border-radius: 50%;
        /* Perfect Circle */
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        /* Soft floating shadow */
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #676a6c;
        transition: all 0.2s ease-in-out;
    }

    .toolbar-btn:hover {
        background: var(--primary-color);
        /* Primary Color */
        color: #ffffff;
        /* White icon */
        border-color: var(--primary-color);
        transform: translateY(-2px);
        /* Slight lift */
        box-shadow: 0 4px 8px rgba(26, 179, 148, 0.25);
    }

    .toolbar-btn i {
        font-size: 14px;
    }

    /* Animation */
    .toolbar-btn .fa-cog {
        animation: none !important;
    }

    .toolbar-btn:hover .fa-cog {
        animation: fa-spin 2s infinite linear !important;
    }
}


.floating-toolbar .toolbar-btn {
    position: relative;
    cursor: pointer;
    color: #444 !important;
    /* STRONG DARK COLOR */
    font-size: 18px !important;
    /* Slightly larger */
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    /* Explicit width */
    height: 24px;
}

.floating-toolbar .toolbar-btn:hover {
    color: #1c84c6 !important;
}

/* Dark Mode Overrides */
body.dark-mode .floating-toolbar {
    background: rgba(31, 41, 55, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .floating-toolbar .toolbar-btn {
    color: #ccc !important;
}

body.dark-mode .floating-toolbar .toolbar-btn:hover {
    color: #60a5fa !important;
}

body.dark-mode .chatUsersshow {
    background: rgba(17, 24, 39, 0.6) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .chatUsersshow .button,
body.dark-mode .chatUsersshow .btn-block {
    background: rgba(31, 41, 55, 0.7) !important;
    color: #e5e7eb !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .chatUsersshow .button:hover,
body.dark-mode .chatUsersshow .btn-block:hover {
    background: #374151 !important;
    color: #60a5fa !important;
}

/* Content Area */
.chatEntries {
    background: transparent !important;
    /* Remove #ccc */
    border: none !important;
    min-height: 600px;
    /* Ensure height */
}

/* Dark Mode Overrides for Control Panel */
body.dark-mode .chatUsersshow {
    background: #1e293b !important;
    /* Slate 800 */
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

body.dark-mode .chatUsershide {
    background: #334155 !important;
}

/* Fix specific button inside if needed */
#show.chatUsersshow {
    width: auto !important;
    min-width: 100px;
    border-radius: var(--radius-md) !important;
    background: #ffffff !important;
    /* White background for cleaner look */
    color: #676a6c !important;
    /* Dark text */
    border: 1px solid #e7eaec !important;
    /* Subtle border */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    background-image: none !important;
    margin-top: 15px !important;
    /* Add margin to top */
}

/* Dark Mode Show/Hide */

/* FLOATING TOOLBAR (Merged Note + Gear) */
.floating-toolbar {
    position: absolute;
    top: 10px;
    right: 20px;
    display: flex;
    align-items: center;
    background: transparent;
    /* Removed container background */
    padding: 0;
    /* Removed container padding */
    z-index: 2001;
    transition: all 0.3s ease;
    gap: 12px;
    /* Gap between separate buttons */
}

body.rtl .floating-toolbar,
body.rtls .floating-toolbar {
    right: auto;
    left: 20px;
}

.floating-toolbar .toolbar-btn {
    width: 44px;
    /* Slightly larger circles */
    height: 44px;
    border-radius: 12px;
    /* Modern squircle/rounded look */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #444;
    background: #ffffff;
    border: 1px solid #e7eaec;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

.floating-toolbar .toolbar-btn:hover {
    background-color: #ffffff;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

/* Specific Styles for Note Button (Hidden by default) */
#noteToolTrigger {
    display: none;
    /* Logic in RequestInfo.ascx will show this */
}

#noteToolTrigger:hover {
    color: #f8ac59 !important;
    /* Warning color */
}

/* Specific Styles for Settings (Gear) */
#show {
    /* Resetting previous specific ID styles to match class */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    width: 40px !important;
    min-width: unset !important;
}

/* Dark Mode Support */
body.dark-mode .floating-toolbar {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .floating-toolbar .toolbar-btn {
    color: #cbd5e1;
}

body.dark-mode .floating-toolbar .toolbar-btn:hover {
    background-color: #334155;
    color: #fff;
}

body.dark-mode #noteToolTrigger:hover {
    color: #f59e0b !important;
}

body.dark-mode #show.chatUsersshow {
    background: var(--warning-color) !important;
    color: #fff !important;
}

body.dark-mode.mini-navbar .nav>li:hover>a,
body.dark-mode.mini-navbar .nav>li:focus>a,
/* Global Dark Mode Page Wrappers - Deep Smooth Background */
body.dark-mode #page-wrapper,
body.skin-1 #page-wrapper,
body.dark-mode .gray-bg,
body.skin-1 .gray-bg,
body.dark-mode .wrapper,
body.skin-1 .wrapper,
body.dark-mode .wrapper-content,
body.skin-1 .wrapper-content {
    background-color: var(--bg-body) !important;
    color: var(--text-primary);
}

body.dark-mode .unified-toolbar,
body.skin-1 .unified-toolbar {
    background: var(--card-bg) !important;
    border-color: var(--card-border) !important;
}

body.dark-mode .toolbar-input,
body.skin-1 .toolbar-input,
body.dark-mode .form-control,
body.skin-1 .form-control {
    background-color: var(--input-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--input-border) !important;
}

body.dark-mode.mini-navbar .nav>li.active:hover>a {
    background-color: #182235 !important;
    /* Seamless match with popup */
    color: #fff !important;
}

body.dark-mode .nav-second-level li a {
    color: #94a3b8 !important;
}

body.dark-mode .nav-second-level li a:hover {
    color: #fff !important;
    background-color: #334155 !important;
}

body.dark-mode .ibox,
body.dark-mode .ibox-content,
body.dark-mode .ibox-title,
body.skin-1 .ibox,
body.skin-1 .ibox-content,
body.skin-1 .ibox-title {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.dark-mode .ibox-title,
body.skin-1 .ibox-title {
    border-bottom: 1px solid var(--border-color);
}

body.dark-mode .form-control,
body.skin-1 .form-control {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

body.dark-mode .form-control:focus,
body.skin-1 .form-control:focus {
    border-color: var(--primary-color);
    background-color: var(--input-bg);
}

body.dark-mode .select2-container .select2-selection--single,
body.skin-1 .select2-container .select2-selection--single {
    background-color: var(--input-bg);
    border-color: var(--input-border) !important;
}

body.dark-mode .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #fff;
}

body.dark-mode .select2-dropdown,
body.skin-1 .select2-dropdown {
    background-color: var(--input-bg);
    border-color: var(--input-border);
}

/* Tables in Dark Mode */
body.dark-mode .table thead th,
body.skin-1 .table thead th {
    background-color: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

body.dark-mode .table tbody tr,
body.skin-1 .table tbody tr {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

body.dark-mode .table td,
body.skin-1 .table td {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

/* Override Striped Rows */
body.dark-mode .table-striped>tbody>tr:nth-of-type(odd),
body.skin-1 .table-striped>tbody>tr:nth-of-type(odd) {
    background-color: var(--bg-body) !important;
}

body.dark-mode .table-striped>tbody>tr:nth-of-type(odd)>td {
    background-color: var(--bg-body) !important;
}

body.dark-mode .table tbody tr:hover {
    background-color: var(--border-color) !important;
    transform: none;
}

body.dark-mode .table tbody tr:hover>td {
    background-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Scrollbars */
body.dark-mode ::-webkit-scrollbar-thumb {
    background: #475569;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Navbar */
body.dark-mode .navbar-default,
body.dark-mode .navbar-static-top {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
}

/* Toggle Button */
.theme-toggle-btn {
    background: rgba(0, 0, 0, 0);
    /* color: #64748b; */
    border: none;
    padding: 5px 5px;
    /* border-radius: 50%; */
    cursor: pointer;
    transition: all 0.3s;
}

/* =========================================
   COMPONENTS (Unified Toolbar)
   ========================================= */
.unified-toolbar {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: var(--shadow-sm);
    direction: rtl;
}

.toolbar-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.toolbar-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
}

.toolbar-input {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
    height: 34px;
    background-color: #ffffff;
}

.toolbar-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(111, 78, 246, 0.1);
}

.hidden-col {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .unified-toolbar {
        flex-wrap: wrap;
    }

    .toolbar-group {
        flex: 1 1 100% !important;
    }
}

/* Workflow History Components */
.history-time {
    color: #888;
    font-size: 11px;
}

body.dark-mode .history-time,
body.skin-1 .history-time {
    color: #cbd5e1 !important;
}

.history-notes {
    color: #555;
    font-size: 13px;
}

body.dark-mode .history-notes,
body.skin-1 .history-notes {
    color: #cbd5e1 !important;
}

.history-emp-name {
    font-weight: 700;
    color: #4a4a4a;
    font-size: 13px;
}

body.dark-mode .history-emp-name,
body.skin-1 .history-emp-name {
    color: var(--text-primary) !important;
}

.history-section-name {
    font-size: 12px;
    color: #676a6c;
}

body.dark-mode .history-section-name,
body.skin-1 .history-section-name {
    color: var(--text-secondary) !important;
}

/* =========================================
   AUDIT/EXCEPTION SECTION STYLING (Cashiar Style)
   ========================================= */
.audit-section {
    background-color: #fff;
    border: 1px solid #e7eaec;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    transition: all 0.3s ease;
    border-right: 4px solid #1c84c6;
    /* Default accent (Primary) */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
}

.audit-section:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.audit-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.audit-section h3 i {
    color: #1c84c6;
}

/* Exception Mode */
.audit-section.exception-mode {
    border-right-color: #f8ac59;
    /* Warning Color */
}

.audit-section.exception-mode h3 i {
    color: #f8ac59;
}

/* Acceptance Mode (Green if needed, or just Primary) */
/* .audit-section h3 .fa-university { color: #1c84c6; } */


body.dark-mode .theme-toggle-btn {
    color: #fbbf24;
    /* Amber 400 */
    background: rgba(251, 191, 36, 0.1);
}

/* DataTables & Dropdowns */
.dt-buttons.btn-group {
    margin-bottom: 20px;
}

.dt-button {
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    padding: 6px 16px !important;
    font-size: 13px !important;
    color: var(--text-secondary) !important;
    font-weight: 700 !important;
    transition: all 0.2s !important;
    margin-right: 8px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

.dt-button:hover {
    background: var(--primary-color-light) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.dt-button.buttons-excel {
    color: #166534 !important; /* Green for Excel */
}

.dt-button.buttons-excel:hover {
    background: #f0fdf4 !important;
    border-color: #166534 !important;
}

.dt-button.buttons-pdf {
    color: #991b1b !important; /* Red for PDF */
}

.dt-button.buttons-pdf:hover {
    background: #fef2f2 !important;
    border-color: #991b1b !important;
}

body.dark-mode .dt-button {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

body.dark-mode .dataTables_wrapper .dataTables_filter input,
body.dark-mode .dataTables_wrapper .dataTables_length select {
    background-color: #0f172a;
    border: 1px solid #334155;
    color: #e2e8f0;
}

body.dark-mode .dropdown-menu {
    background-color: #1e293b;
    border: 1px solid #334155;
}

body.dark-mode .dropdown-menu>li>a {
    color: #e2e8f0;
}

body.dark-mode .dropdown-menu>li>a:hover {
    background-color: #334155;
}

body.dark-mode .footer {
    background: #1e293b !important;
    border-top: 1px solid #334155;
    color: #94a3b8 !important;
}

/* Button Dark Mode overrides */
body.dark-mode .btn {
    box-shadow: none;
}

body.dark-mode .btn-default {
    background: #334155;
    color: #e2e8f0;
}

/* Floating Toolbar Dark Mode - Ensure Visibility */
body.dark-mode .floating-toolbar {
    background: transparent;
    box-shadow: none;
}

/* In Dark Mode, keep the buttons separate and visible */
body.dark-mode .toolbar-btn {
    background: rgba(255, 255, 255, 0.1);
    /* Subtle semi-transparent white */
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f8fafc;
    /* White icon */
}

body.dark-mode .toolbar-btn:hover {
    background: #fbbf24;
    /* Amber hover */
    border-color: #fbbf24;
    color: #111827;
    /* Dark icon on amber */
}

/* Chat/Control Panel Drawer Dark Mode - Smooth Degree */
body.dark-mode .chatEntries,
body.dark-mode .chatEntriesshow,
body.dark-mode .chatUsers,
body.dark-mode .chatUsersshow,
body.dark-mode .chat-users {
    background-color: #1f2937 !important;
    /* Gray 800 - Smooth */
    color: #f1f5f9 !important;
    border-color: #374151 !important;
}

/* Sidebar Profile - Smooth Look */
.profile-element .img-circle {
    width: 48px;
    /* Constraint width */
    height: 48px;
    /* Constraint height */
    object-fit: cover;
    /* Ensure aspect ratio */
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

body.dark-mode .profile-element .img-circle {
    border-color: rgba(255, 255, 255, 0.2);
    background-color: #1f2937;
}

/* Fix for inline style="background-color: white" injected by UpdatePanel/Control */
body.dark-mode .chatEntries div[style*="background-color: white"],
body.dark-mode .chatEntries div[style*="background-color:white"],
body.dark-mode .chatEntries div[style*="background-color: #ffffff"],
body.dark-mode .chatEntries div[style*="background-color:#ffffff"] {
    background-color: transparent !important;
    color: #f1f5f9 !important;
}

/* =========================================
   REQUEST INFO CARD (Modern Grid)
   ========================================= */
/* =========================================
   REQUEST INFO CARD (Modern Grid - Compact)
   ========================================= */
.req-info-card {
    font-family: 'Cairo', 'beIN Normal', 'Segoe UI', sans-serif;
    background: #fff;
    direction: rtl;
    text-align: right;
    padding: 24px;
    /* Use 24px to match audit-section */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
    border: 1px solid #e7eaec;
    border-right: 4px solid #e7eaec;
    /* Default Neutral Accent */
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.req-info-card:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-right-color: var(--primary-color);
    /* Hover Accent */
}

.req-info-row {
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 0;
    /* Increased breathing room */
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.req-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.req-info-item {
    display: flex;
    flex-direction: column;
    /* Stack label and value */
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 0;
    min-height: auto;
    /* Allow auto height */
    padding: 0 10px;
    width: 100%;
}

.req-info-label {
    font-size: 13px;
    color: #676a6c;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    display: block;
}

.req-info-value-container {
    background: #f8f9fa;
    padding: 6px 10px;
    /* Tighter padding */
    border-radius: 4px;
    border: 1px solid #e7eaec;
    min-height: 34px;
    /* Reduced height */
    width: 100%;
    display: flex;
    align-items: center;
}

.req-info-value {
    font-size: 14px;
    color: #ae0000;
    font-weight: 500;
    text-align: right;
    width: 100%;
    margin: 0;
    line-height: 1.4;
}

/* Dark Mode Support for Req Info */
body.dark-mode .req-info-card,
body.skin-1 .req-info-card {
    background: var(--bg-card);
    border-color: var(--border-color);
    border-right-color: var(--primary-color);
}

body.dark-mode .req-info-row,
body.skin-1 .req-info-row {
    border-bottom-color: var(--border-color);
}

body.dark-mode .req-info-label,
body.skin-1 .req-info-label {
    color: #cbd5e1;
    /* Clearer label color - Slate 300 */
}

body.dark-mode .req-info-value-container,
body.skin-1 .req-info-value-container {
    background: var(--bg-body);
    border-color: var(--border-color);
}

body.dark-mode .req-info-value,
body.skin-1 .req-info-value {
    color: #fca5a5;
    /* Keep the subtle value highlight */
}

/* =========================================
   STANDARD BUTTON STYLES (Cashiar Theme)
   ========================================= */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.btn-success {
    background-color: #10b981 !important;
    /* Emerald 500 */
    border-color: #10b981 !important;
    color: #fff !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    background-color: #059669 !important;
    /* Emerald 600 */
    border-color: #059669 !important;
}

.btn-info {
    background-color: #0ea5e9 !important;
    /* Sky 500 */
    border-color: #0ea5e9 !important;
    color: #fff !important;
}

.btn-info:hover,
.btn-info:focus,
.btn-info:active {
    background-color: #0284c7 !important;
    /* Sky 600 */
    border-color: #0284c7 !important;
}

.btn-warning {
    background-color: #f59e0b !important;
    /* Amber 500 */
    border-color: #f59e0b !important;
    color: #fff !important;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
    background-color: #d97706 !important;
    /* Amber 600 */
    border-color: #d97706 !important;
}

.btn-danger {
    background-color: #ef4444 !important;
    /* Red 500 */
    border-color: #ef4444 !important;
    color: #fff !important;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
    background-color: #dc2626 !important;
    /* Red 600 */
    border-color: #dc2626 !important;
}

.btn-default {
    background-color: #fff !important;
    border-color: #e2e8f0 !important;
    color: #64748b !important;
}

.btn-default:hover,
.btn-default:focus,
.btn-default:active {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
}

/* =========================================
   COMPACT INFO BOX FIELD (User Requested Design)
   ========================================= */
.info-box-field {
    margin-bottom: 15px;
    font-family: 'Cairo', 'beIN Normal', sans-serif !important;
    text-align: right;
}

.info-box-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 700;
    color: #676a6c;
    text-align: right;
}

.info-box-value {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: #ed5565;
    /* Red text */
    background-color: #fdfdfd;
    /* Very light grey */
    border: 1px solid #e7eaec;
    border-radius: 4px;
    min-height: 38px;
    text-align: right;
}

/* Specific tweaks for form semantic feeling */
.form-section-body {
    padding: 20px 30px !important;
}

.display-flex {
    display: flex;
    flex-wrap: wrap;
}

.display-flex>[class*='col-'] {
    display: flex;
    flex-direction: column;
}

.display-flex>[class*='col-']>.info-box-field {
    flex-grow: 1;
}

/* =========================================
   STATUS WRAPPERS (Simplified Design)
   ========================================= */
.status-wrapper {
    position: relative;
    border-right: 4px solid #e7eaec;
    /* Default/Pending color */
    background-color: #fff;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    border-radius: 4px;
}

.status-wrapper.status-valid {
    border-right-color: var(--primary-color);
}

.status-wrapper.status-error {
    border-right-color: #ed5565;
}

.status-wrapper.status-pending {
    border-right-color: #e7eaec;
}

/* Status Icons */
.status-wrapper::after {
    font-family: 'FontAwesome';
    position: absolute;
    top: 50%;
    /* In RTL layout, left is the 'end' side usually, or right? */
    /* Assuming standard RTL page, we want icon on the far LEFT side */
    left: 15px;
    transform: translateY(-50%);
    font-size: 24px;
    display: block;
}

/* Icon Content */
.status-wrapper.status-valid::after {
    content: "\f058";
    /* fa-check-circle */
    color: var(--primary-color);
}

.status-wrapper.status-error::after {
    content: "\f057";
    /* fa-times-circle */
    color: #ed5565;
}

.status-wrapper.status-pending::after {
    content: "\f252";
    /* fa-hourglass-o */
    color: #d1d5db;
    /* Light Gray */
    font-size: 20px;
}

/* Status Wrapper Layout Fixes */
.status-wrapper .info-box-field {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: auto !important;
}

.status-wrapper .info-box-field label {
    margin-bottom: 4px;
    color: #676a6c;
}

.status-wrapper .info-box-field .info-box-value {
    font-weight: 700;
    color: #1e293b;
    display: block;
}

/* Adjust padding for the icon space */
.status-wrapper {
    padding-left: 50px;
    /* Make space for the icon on the left */
}

/* =========================================
   AUDIT/EXCEPTION SECTION STYLING (Cashiar Style)
   ========================================= */
.audit-section {
    background-color: #fff;
    border: 1px solid #e7eaec;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
    transition: all 0.3s ease;
    border-right: 5px solid #1c84c6;
    /* Default accent */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
}

.audit-section:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.audit-section h3 {
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px dashed #e7eaec;
    color: #4a4a4a;
    display: flex;
    align-items: center;
}

.audit-section h3 i {
    margin-left: 12px;
    font-size: 20px;
    opacity: 0.9;
}

/* Exception Mode (The specific request) */
.audit-section.exception-mode {
    border-right-color: #f8ac59;
    /* Warning/Exception Color */
}

/* Only color the side border and icon, preserve clean white background as requested ("not the whole field") */
.audit-section.exception-mode h3 i {
    color: #f8ac59;
}

.audit-section.exception-mode h3 {
    color: #d68100;
    /* Darker shade of orange for text */
}

/* If you want a very subtle tint for the whole box, uncomment below, 
   but user specifically said 'not the whole field' so white is safer/cleaner. 
   Maybe a very light gradient on the right edge? */
.audit-section.exception-mode {
    background: linear-gradient(to left, #fffbf2 0%, #ffffff 15%);
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .audit-section {
        padding: 15px;
    }
}

/* UI Modernization: Pastel Colors & Badges */
.badge-soft-success {
    background-color: #d1fae5;
    color: #065f46;
}

body.dark-mode .badge-soft-success,
body.skin-1 .badge-soft-success {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.badge-soft-warning {
    background-color: #fef3c7;
    color: #92400e;
}

body.dark-mode .badge-soft-warning,
body.skin-1 .badge-soft-warning {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.badge-soft-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

body.dark-mode .badge-soft-danger,
body.skin-1 .badge-soft-danger {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.badge-soft-info {
    background-color: #dbeafe;
    color: #1e40af;
}

body.dark-mode .badge-soft-info,
body.skin-1 .badge-soft-info {
    background-color: rgba(14, 165, 233, 0.2);
    color: #7dd3fc;
}

.badge-soft-primary {
    background-color: #e0e7ff;
    color: #3730a3;
}

body.dark-mode .badge-soft-primary,
body.skin-1 .badge-soft-primary {
    background-color: rgba(79, 70, 229, 0.2);
    color: #a5b4fc;
}

.table-pastel tr:hover td {
    background-color: #f0f9ff !important;
}

body.dark-mode .table-pastel tr:hover td,
body.skin-1 .table-pastel tr:hover td {
    background-color: var(--border-color) !important;
}

/* Modern Aesthetics from Session fb014765 */

/* Cards (.ibox) */
.ibox {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ibox:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.ibox-title {
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #e2e8f0;
}

.ibox-content {
    border-radius: 0 0 12px 12px;
}

/* Buttons */
.btn {
    border-radius: 6px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Inputs */
.form-control {
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
}

.form-control:focus {
    border-color: #6f4ef6;
    box-shadow: 0 0 0 3px rgba(111, 78, 246, 0.2);
}

/* Loader Overlay */
#loading-overlay {
    backdrop-filter: blur(4px);
    background-color: rgba(255, 255, 255, 0.8);
}

/* Modern Modal Styling (SweetAlert2) */
.modern-modal-popup {
    border-radius: 12px !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
}

.swal2-html-container {
    margin: 1.5em 1.5em 0.5em !important;
    text-align: right !important;
    font-family: 'Tahoma', 'Cairo', sans-serif !important;
}

.swal2-confirm {
    border-radius: 6px !important;
    padding: 10px 30px !important;
    font-weight: 600 !important;
    font-family: 'Cairo', sans-serif !important;
}

.swal2-close {
    font-family: serif !important;
}

/* ==========================================================================
   PREMIUM DESIGN SYSTEM (Standardized from CEnewReqInfo)
   ========================================================================== */
:root {
    --card-bg: #fff;
    --card-text: #333;
    --card-border: #e7eaec;
    --header-bg: #f5f5f6;
    --header-text: #676a6c;
    --input-bg: #fff;
    --input-text: #555;
    --input-border: #e5e6e7;
    --hover-bg: #f3f3f4;
    --table-stripe: #f9f9f9;
    --highlight: var(--primary-color);
    --highlight-text: #fff;
    --muted-text: #888;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --card-bg: #1f2937;
        --card-text: #e5e7eb;
        --card-border: #374151;
        --header-bg: #111827;
        --header-text: #9ca3af;
        --input-bg: #374151;
        --input-text: #fff;
        --input-border: #4b5563;
        --hover-bg: #2d3748;
        --table-stripe: #2d3748;
        --highlight: #10b981;
        --highlight-text: #fff;
        --muted-text: #9ca3af;
    }
}

.dark-mode,
.dark-theme,
body.skin-dark {
    --card-bg: var(--bg-card);
    --card-text: var(--text-primary);
    --card-border: var(--border-color);
    --header-bg: var(--bg-body);
    --header-text: var(--text-secondary);
    --input-bg: var(--bg-body);
    --input-text: var(--text-primary);
    --input-border: var(--border-color);
    --hover-bg: #2d3748;
    --table-stripe: #2d3748;
    --highlight: #10b981;
    --highlight-text: #fff;
    --muted-text: #9ca3af;
}

/* Base Form Shared Styles */
.premium-info-container {
    clear: both;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-top: 3px solid var(--primary-color);
    border-radius: 4px;
    padding: 0;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.info-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--card-border);
    background: var(--header-bg);
}

body.dark-mode .info-header-row,
body.skin-1 .info-header-row {
    background: var(--bg-card) !important;
    border-bottom-color: var(--primary-color);
}

.student-identity {
    display: flex;
    align-items: center;
    gap: 15px;
}

.student-icon {
    width: 45px;
    height: 45px;
    background: var(--card-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-color);
}

.student-details h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--card-text);
}

.student-id-badge {
    font-size: 12px;
    color: #888;
    background: #f9f9f9;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #eee;
}

body.dark-mode .student-id-badge,
body.skin-1 .student-id-badge {
    background: var(--bg-body);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.main-status-badge {
    background: var(--primary-color);
    color: #fff;
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(111, 78, 246, 0.2);
}

/* Premium Table Styles */
.premium-table {
    margin-bottom: 0;
    border: none;
}

.premium-table td,
.premium-table th {
    padding: 12px 15px !important;
    vertical-align: middle !important;
    border: 1px solid var(--card-border);
}

.premium-table th {
    background-color: var(--header-bg);
    color: var(--header-text);
    font-weight: 600;
    width: 15%;
    font-size: 13px;
}

.premium-table th i {
    color: var(--primary-color);
    margin-left: 5px;
    width: 15px;
    text-align: center;
}

.premium-table td {
    background-color: var(--card-bg);
    color: var(--card-text);
    font-size: 13px;
}

/* Req Info Cards (Refined from CE) */
.req-info-card {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-top: 4px solid var(--border-color);
    transition: all 0.3s;
}

body.dark-mode .req-info-card,
body.skin-1 .req-info-card {
    border-top-color: var(--accent);
}

.card-status-ok {
    border-top-color: var(--primary-color) !important;
    border-left: 1px solid var(--primary-color);
}

.card-status-error {
    border-top-color: #ed5565 !important;
    border-left: 1px solid #ed5565;
}

.card-status-pending {
    border-top-color: #f8ac59 !important;
    border-left: 1px solid #f8ac59;
}

/* Verification Actions */
.verification-action-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 5px 0;
}

.btn-ghost-blue {
    background-color: transparent;
    border: 1px solid #1c84c6;
    color: #1c84c6;
    border-radius: 20px;
    padding: 4px 15px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-verification-circle {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Premium Pill Buttons */
.btn-premium-pill {
    border-radius: 50px !important;
    padding: 6px 20px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.3s ease !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.btn-premium-pill:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
    filter: brightness(1.1);
}

.btn-premium-cyan {
    background-color: #00aeef !important;
    color: #ffffff !important;
}

.btn-premium-purple {
    background-color: #6f4ef6 !important;
    color: #ffffff !important;
}

.btn-premium-outline-cyan {
    background-color: transparent !important;
    border: 1px solid #00aeef !important;
    color: #00aeef !important;
}

.btn-premium-outline-purple {
    background-color: transparent !important;
    border: 1px solid #6f4ef6 !important;
    color: #6f4ef6 !important;
}

/* Premium Profile & Info Grid Styles */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    padding: 8px 0;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border-right: 2px solid var(--accent);
    transition: all 0.2s ease;
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(-2px);
}

.info-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.info-value {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 500;
}

/* Ultra Compact Utilities - Refined */
/* Ultra Compact Utilities - Organized Grid */
.info-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px;
    /* Reduced gap from 12px for tighter layout */
    padding: 5px 0;
}

.info-item-compact {
    display: flex;
    flex-direction: column;
    /* Stack label and value for cleaner look */
    justify-content: center;
    align-items: flex-start;
    gap: 2px;
    /* Reduced gap inside card */
    padding: 8px 12px;
    /* Reduced padding */
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    /* Softer pill-like corners */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    border-right: 4px solid #f1f5f9;
    /* Subtle accent placeholder */
    transition: all 0.2s ease;
}

.info-item-compact:hover {
    border-color: var(--primary-color);
    border-right-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
    z-index: 10;
}

.info-item-compact .info-label {
    min-width: auto;
    /* Remove fixed width since we are stacking */
    margin-bottom: 0;
    font-size: 12px;
    /* Slightly smaller label */
    font-weight: 600;
    color: #94a3b8;
    /* Muted Slate */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item-compact .info-value {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    /* Dark Slate */
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Prevent overflow */
}

.req-info-card.ultra-compact .ibox-content {
    padding: 8px 12px 12px 12px !important;
}

.req-info-card.ultra-compact h4 {
    font-size: 12px;
    /* Smaller font */
    font-weight: 600;
    /* Smoother weight */
    color: #666;
    /* Softer color */
    background: #f8fafb;
    /* Light background for shape */
    padding: 8px 18px;
    /* Padding for rectangle shape */
    border-radius: 30px;
    /* Round/Rectangle shape */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 15px 0 12px 0 !important;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.req-info-card.ultra-compact h4 i {
    color: var(--accent);
    /* Keep icon accent colored */
    font-size: 13px;
}

/* Compact Table Styles */
.req-info-card.ultra-compact .table {
    font-size: 13px;
    margin-bottom: 0;
}

.req-info-card.ultra-compact .table th {
    font-weight: 600;
    color: var(--text-dark);
    padding: 10px !important;
    background-color: rgba(0, 0, 0, 0.02);
}

.req-info-card.ultra-compact .table td {
    padding: 8px 10px !important;
    vertical-align: middle;
}

/* Dashboard Layout Mixins */
.profile-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 992px) {
    .profile-dashboard {
        grid-template-columns: 1fr;
    }
}

.req-info-card .ibox-content {
    padding: 15px 20px 20px 20px !important;
}

.req-info-card.compact-card .ibox-content {
    padding: 10px 15px !important;
}

/* Clean Header Design (White with Top Border) */
.profile-header-card {
    background: #ffffff;
    border-top: 3px solid #6f4ef6;
    /* Purple Top Border */
    border-radius: 4px;
    padding: 20px 25px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    /* Subtle shadow */
    border-left: 1px solid #e7eaec;
    border-right: 1px solid #e7eaec;
    border-bottom: 1px solid #e7eaec;
}

.profile-header-info h2 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    /* Dark Text */
}

.profile-user-icon-container {
    width: 48px;
    height: 48px;
    background-color: #f3f0ff;
    /* Light Purple Bg */
    border-radius: 50%;
    /* Circle */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6f4ef6;
    /* Purple Icon */
    font-size: 20px;
}

.id-badge {
    background-color: #f3f4f6;
    color: #6b7280;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Tahoma', sans-serif;
    letter-spacing: 0.5px;
}

.profile-header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.status-badge-purple {
    background-color: #6f4ef6;
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.btn-rounded.btn-outline {
    border-radius: 20px;
    padding: 6px 20px;
    font-weight: 600;
}



.profile-header-info h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.profile-header-id {
    opacity: 0.8;
    font-size: 14px;
    margin-top: 5px;
}

.btn-premium-outline-cyan:hover,
.btn-premium-outline-purple:hover {
    background-color: rgba(0, 174, 239, 0.05) !important;
}

/* Status Labels (Subtle Badges) */
.status-label-subtle {
    font-size: 11px;
    padding: 3px 12px;
    border-radius: 20px;
    margin-left: 5px;
    font-weight: 600;
}

.status-label-pending {
    background: #fdf2e1;
    color: #db8b0b;
    border: 1px solid #fae1be;
}

.status-label-ok {
    background: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.status-label-error {
    background: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

/* Premium Table Styles */
.premium-table {
    border: none !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.premium-table thead th {
    background: #f8f9fa !important;
    color: #444 !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 12px 15px !important;
    border: none !important;
    border-bottom: 2px solid #eee !important;
}

body.dark-mode .premium-table thead th,
body.skin-1 .premium-table thead th {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1) !important;
}

.premium-table tbody td {
    padding: 12px 15px !important;
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
    font-size: 13px;
    vertical-align: middle;
}

body.dark-mode .premium-table tbody td,
body.skin-1 .premium-table tbody td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #ccc !important;
}

.premium-table tbody tr:last-child td {
    border-bottom: none !important;
}

.premium-table tbody tr:hover {
    background-color: rgba(var(--accent-rgb), 0.02) !important;
}

body.dark-mode .premium-table tbody tr:hover,
body.skin-1 .premium-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

.status-label-info {
    background: #d9edf7;
    color: #31708f;
    border: 1px solid #bce8f1;
}

.dark-mode .status-label-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

.dark-mode .status-label-ok {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.dark-mode .status-label-error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.dark-mode .status-label-info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

/* Field Value Highlights */
.req-val-red {
    color: #ed5565;
    font-weight: 700;
}

.req-val-normal {
    color: var(--card-text);
    font-weight: 600;
}

/* Custom DataTables Styling */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 4px !important;
    border: 1px solid #e7eaec !important;
    background: #fff !important;
    color: #676a6c !important;
    margin: 0 2px !important;
    padding: 5px 10px !important;
    cursor: pointer !important;
    /* Fix clickable area */
    display: inline-block !important;
    /* Fix alignment */
    text-decoration: none !important;
    /* Fix link underline */
}



/* Force Pagination Alignment (User Design: Info Right, Paging Left) */
.dataTables_info {
    float: right !important;
    text-align: right !important;
    padding-top: 8px;
    /* Alignment fix */
}

.dataTables_paginate {
    float: left !important;
    text-align: left !important;
    margin-top: 5px;
    /* Spacing fix */
}

/* Clearfix for DataTables wrapper footer area */
.dataTables_wrapper:after {
    content: "";
    display: table;
    clear: both;
}

/* Premium Reference Layout (Search Right, Buttons Below Left, Paging Footer) */
.dt-toolbar-top {
    display: flex;
    justify-content: flex-end; /* Align Search to Right exclusively */
    align-items: center;
    background: #fdfdfe;
    border: 1px solid #eef2f6;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 14px 14px 0 0;
    padding: 10px 20px;
    width: 100%;
}

.dt-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fdfdfe;
    border: 1px solid #eef2f6;
    border-top: 1px solid #f1f5f9;
    border-radius: 0 0 14px 14px;
    padding: 12px 20px;
    margin-top: 0;
}

/* Modernized Pagination Buttons (Footer Left) */
.dataTables_paginate {
    display: flex !important;
    gap: 5px;
}

.dataTables_paginate .paginate_button {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 6px 14px !important;
    margin: 0 !important;
    font-size: 13px !important;
    color: #4b5563 !important;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dataTables_paginate .paginate_button:hover:not(.disabled) {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #111827 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.dataTables_paginate .paginate_button.current {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

.dt-toolbar-tools {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background: #fdfdfe;
    border: 1px solid #eef2f6;
    border-top: none;
    border-bottom: none;
    padding: 8px 20px 14px;
    width: 100%;
    gap: 10px;
}

body.rtls .dt-toolbar-top .text-right {
    flex: 1;
    display: flex;
    justify-content: flex-start; /* Length on Right in RTL */
}

body.rtls .dt-toolbar-top .text-left {
    flex: 1;
    display: flex;
    justify-content: flex-end; /* Search on Left in RTL */
}

/* Premium Button Styling (Tools Row) */
.dt-toolbar-tools .dt-buttons {
    display: flex;
    gap: 8px;
}

.dt-toolbar-tools .dt-button {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 6px 16px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #4b5563 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dt-toolbar-tools .dt-button:hover {
    background: #f9fafb !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Remove Bootstrap col padding interference */
.dt-toolbar [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
}

.dt-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fcfdfe;
    border: 1px solid #e2e8f0;
    border-top: 1px solid #f1f5f9;
    border-radius: 0 0 12px 12px;
    padding: 16px 20px !important;
    margin-top: 0;
}

/* ============================================================ 
   MINIMALIST SEGMENTED DATATABLE TOOLBAR (Final Refined)
   ============================================================ */

.dt-toolbar-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
    padding: 12px 0 !important;
    background: transparent !important; /* Kill the white wrapper background */
    background-color: transparent !important;
}

.dt-toolbar-top label {
    display: contents !important;
    background: transparent !important;
    background-color: transparent !important;
    margin: 0 !important;
    font-weight: normal !important;
}

/* ── Entries group (Length Selection) ── */
.dt-toolbar-top .dataTables_length {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    background: transparent !important;
}

.dt-toolbar-top .dataTables_length::before {
    content: "عرض";
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    color: #888;
    background: transparent !important;
    border: 0.5px solid #ddd;
    border-radius: 7px !important;
    white-space: nowrap !important;
}

.dt-toolbar-top .dataTables_length::after {
    content: "سجلات";
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    color: #888;
    background: transparent !important;
    border: 0.5px solid #ddd;
    border-radius: 7px !important;
    white-space: nowrap !important;
}

.dt-toolbar-top .dataTables_length select.form-control {
    height: 34px !important;
    min-width: 60px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    color: #222 !important;
    background: transparent !important;
    border: 0.5px solid #ddd !important;
    border-radius: 7px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    outline: none !important;
    cursor: pointer !important;
    text-align: center !important;
    box-shadow: none !important;
    width: auto !important;
}

.dt-toolbar-top .dataTables_length select.form-control:focus {
    border-color: #aaa !important;
    box-shadow: none !important;
}

/* ── Search box ── */
.dt-toolbar-top .dataTables_filter {
    display: flex !important;
    align-items: center !important;
    height: 36px !important;
    border: 0.5px solid #ddd !important;
    border-radius: 7px !important;
    background: transparent !important; /* Kill search box background */
    overflow: hidden !important;
    flex: 1 !important;
    max-width: 6000px !important;
    transition: border-color .15s !important;
    margin: 0 !important;
}

.dt-toolbar-top .dataTables_filter:focus-within {
    border-color: #aaa !important;
}

.dt-toolbar-top .dataTables_filter::before {
    content: "" !important;
    width: 38px !important;
    height: 36px !important;
    flex-shrink: 0 !important;
    border-right: 0.5px solid #eee !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='6.5' cy='6.5' r='5' stroke='%23999' stroke-width='1.5'/%3E%3Cpath d='M10.5 10.5L14 14' stroke='%23999' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

.dt-toolbar-top .dataTables_filter input.form-control {
    flex: 1 !important;
    height: 36px !important;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 13px !important;
    padding: 0 12px !important;
    direction: rtl !important;
    text-align: right !important;
    color: #222 !important;
    border-radius: 0 !important;
    width: 100% !important;
}

/* Dark Mode Overrides (Matching body class for manual toggle support) */
body.dark-mode .dt-toolbar-top .dataTables_length::before,
body.dark-mode .dt-toolbar-top .dataTables_length::after,
body.dark-mode .dt-toolbar-top .dataTables_length select.form-control,
body.dark-mode .dt-toolbar-top .dataTables_filter {
    background: transparent !important;
    border-color: #3a4460 !important;
    color: #ccc !important;
}

body.dark-mode .dt-toolbar-top .dataTables_filter::before {
    border-right-color: #3a4460 !important;
}

/* Force input background to transparent so it inherits the parent dark bg */
body.dark-mode .dt-toolbar-top .dataTables_filter input.form-control,
body.dark-mode .dt-toolbar-top .dataTables_filter input.form-control:focus,
body.dark-mode .dt-toolbar-top .dataTables_filter input.form-control:active,
body.dark-mode .dt-toolbar-top .dataTables_filter input.form-control:hover {
    background: transparent !important;
    background-color: transparent !important;
    color: #ccc !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    width: 100% !important;
    border: none !important;
}

body.dark-mode .dt-toolbar-top .dataTables_filter input.form-control::placeholder {
    color: #555 !important;
}

/* Action Buttons Piece (Below) */
.dt-toolbar-tools {
    background: #f8fafc !important;
    border: 0.5px solid #ddd !important;
    border-radius: 7px !important;
    padding: 10px 15px !important;
    margin-bottom: 20px !important;
    display: flex !important;
    gap: 8px !important;
}

body.dark-mode .dt-toolbar-tools {
    background: #0f172a !important;
    border-color: #334155 !important;
}

.dt-toolbar-tools .dt-button {
    border-radius: 7px !important;
    background: #fff !important;
    border: 0.5px solid #ddd !important;
    font-size: 12px !important;
    padding: 5px 12px !important;
}

body.dark-mode .dt-toolbar-tools .dt-button {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

/* Table Header Styles */
.table thead th {
    background: #f8fafc !important;
    color: #475569 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-size: 13px !important;
    text-transform: none !important;
}

body.dark-mode .table thead th {
    background: #1e293b !important;
    color: #f1f5f9 !important;
    border-bottom: 1px solid #334155 !important;
}

/* ------------------------------------------------------------------------- */
/* STYLES MIGRATED FROM OTHER REQUESTS (Modern Green Design)                 */
/* ------------------------------------------------------------------------- */

/* Modern Ibox Styles */
.modern-ibox-title {
    border-bottom: 1px solid #e7eaec;
    background: #fff;
    padding: 15px 15px 7px;
    min-height: 48px;
}

.navbar-top-links li a {
    /* padding: 20px 10px; */
    /* min-height: 50px; */
}

.modern-ibox-content {
    background: #fff;
    padding: 15px 20px;
}

/* Green Card Variables & Components */
.req-info-modern {
    --primary: #008d4c;
    --light-bg: #f9fbfd;
    --card-bg: #ffffff;
    --card-border: #e1e4e8;
    --header-text: #5e6e82;
    --hover-bg: #f8f9fa;
    --muted-text: #8898aa;
    --highlight: var(--primary-color);
    font-family: 'Tajawal', sans-serif;
}

.green-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-top: 3px solid var(--primary);
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.green-card-header {
    padding: 10px;
    border-bottom: 1px solid #f4f4f4;
}

.green-card-title {
    font-size: 18px;
    margin: 0;
    font-weight: 500;
    display: inline-block;
}

.green-card-tools {
    float: left;
    margin-top: 5px;
}

/* LTR for RTL */

.profile-section {
    padding: 20px;
    text-align: center;
    background: url('../img/profile-bg-pattern.png') no-repeat top center;
    /* Adjusted path */
    background-size: cover;
    border-bottom: 1px solid #eee;
}

.profile-img-circle {
    width: 100px;
    height: 100px;
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    object-fit: cover;
    margin-bottom: 15px;
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.profile-id {
    display: inline-block;
    background: #eee;
    color: #555;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Tahoma';
}

.info-list-group {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list-item {
    border-bottom: 1px solid #eee;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    color: #666;
    font-size: 14px;
    font-weight: 600;
}

.info-value {
    color: #333;
    font-weight: 700;
}

/* Verification Table (Specific to OtherRequests) */
.verification-table th {
    background-color: #f5f5f6;
    color: #333;
    font-weight: bold;
    text-align: center;
}

.verification-table td {
    vertical-align: middle !important;
    text-align: center;
}

.status-badge-ok,
.status-badge-error {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
}

.status-badge-ok {
    background-color: var(--primary-color);
}

.status-badge-error {
    background-color: #ed5565;
}

.status-badge-pending {
    background-color: #f8ac59;
}

/* Form Header Toolbar (Migrated & Fixed) */
.form-header-toolbar {
    display: flex;
    justify-content: flex-start;
    /* Align to Start (Right in RTL) */
    align-items: center;
    padding: 5px 0;
    margin-bottom: 5px;
    gap: 10px;
}

.header-action-btn {
    border: none;
    background: transparent !important;
    color: #a7b1c2;
    font-size: 16px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    /* Ensure z-index applies */
    z-index: 1002;
    /* Button HIGHER than menu */
}


.header-action-btn:hover {
    background-color: #f3f3f4 !important;
    color: var(--primary-color);
}

/* Custom Dropdown for Gear Icon */
.dropdown-menu-custom {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1001;
    /* Menu below button structure if overlapping */
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    min-width: 160px;
    padding: 5px 0;
    border: 1px solid #e7eaec;
    text-align: right;
}

.dropdown-container {
    position: relative;
    z-index: 10000;
}

.dropdown-container:hover .dropdown-menu-custom,
.dropdown-container.active .dropdown-menu-custom {
    display: block;
}

.dropdown-menu-custom a {
    display: block;
    padding: 8px 15px;
    color: #676a6c;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s;
}

.dropdown-menu-custom a:hover {
    background-color: #f5f5f5;
    color: var(--primary-color);
}

/* Unified Toolbar (Reusable) */
.unified-toolbar {
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 20px;
    color: #e5e7eb;
    width: 100%;
    box-sizing: border-box;
    direction: rtl;
}

.toolbar-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.toolbar-label {
    font-weight: 600;
    font-size: 13px;
    color: #5e6e82;
}

.toolbar-input {
    border: 1px solid #e5e6e7;
    border-radius: 2px;
    padding: 6px 12px;
    height: 34px;
    width: 100%;
}

/* Base Light Mode Defaults */
select.toolbar-input,
.toolbar-input {
    color: #333;
    background-color: #ffffff;
}

/* Force Select2 Rendered Text Color (Light) */
.select2-selection__rendered {
    color: #333;
}

/* Advanced Attachments Grid Styles */
.file-cell-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.file-text {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.file-name-styled {
    font-weight: 700;
    font-size: 13px;
    color: #333;
    margin-bottom: 3px;
}

.file-meta-styled {
    font-size: 11px;
    color: #8898aa;
    font-family: 'Tahoma', sans-serif;
}

.file-icon-centered img {
    width: 32px !important;
    height: 32px !important;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    transition: transform 0.2s;
}

.file-icon-centered:hover img {
    transform: scale(1.1);
}

.status-cell-content {
    color: var(--primary-color);
    font-weight: 700;
}

/* Adnvanced Workflow Grid Styles */
.history-emp-name {
    font-weight: 700;
    color: #333;
    font-size: 13px;
    display: block;
    margin-bottom: 2px;
}

.history-section-name {
    font-size: 11px;
    color: #8898aa;
    display: block;
    font-family: 'Tahoma', sans-serif;
}

.history-section-name::before {
    content: '\f1ad';
    font-family: FontAwesome;
    margin-left: 4px;
    color: #aaa;
}

.history-status-badge {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 4px;
    background-color: #f8f9fa;
    color: #333;
    font-weight: 700;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.history-time {
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    color: #999;
    direction: ltr;
    display: inline-block;
    margin-top: 2px;
}

.hidden-col {
    display: none !important;
}

/* Responsive Toolbar */
@media (max-width: 768px) {
    .unified-toolbar {
        flex-wrap: wrap;
    }

    .toolbar-group {
        flex: 1 1 100% !important;
    }
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
}

/* =========================================
   DARK MODE SUPPORT (Skin-1)
   ========================================= */
body.skin-1 .unified-toolbar,
.skin-1 .unified-toolbar {
    background: #233646 !important;
    border-color: #2f4050 !important;
}

body.skin-1 .toolbar-label,
.skin-1 .toolbar-label {
    color: #a7b1c2 !important;
}

body.skin-1 .toolbar-input,
body.skin-1 select.toolbar-input,
body.skin-1 .select2-container--default .select2-selection--single,
body.skin-1 .select2-dropdown,
body.skin-1 .select2-search__field,
.skin-1 .toolbar-input,
.skin-1 select.toolbar-input,
.skin-1 .select2-container--default .select2-selection--single,
.skin-1 .select2-dropdown,
.skin-1 .select2-search__field,
.skin-1 .unified-toolbar select,
.skin-1 .unified-toolbar input,
.skin-1 .unified-toolbar .form-control {
    background-color: #2f4050 !important;
    background: #2f4050 !important;
    color: #e7eaec !important;
    border-color: #4f5f6f !important;
}

body.skin-1 .select2-selection__rendered,
.skin-1 .select2-selection__rendered {
    color: #e7eaec !important;
}

body.skin-1 .select2-results__option,
.skin-1 .select2-results__option {
    color: #e7eaec !important;
}

body.skin-1 .select2-results__option--highlighted[aria-selected],
.skin-1 .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

/* Fix standard select options in dark mode */
body.skin-1 select.toolbar-input option,
.skin-1 select.toolbar-input option {
    background-color: #2f4050 !important;
    color: #e7eaec !important;
}

/* ==========================================================================
   DATATABLES MODERN DARK MODE REFINEMENT
   ========================================================================== */

/* DataTables Wrapper RTL Support */
body.dark-mode .dataTables_wrapper,
body.skin-1 .dataTables_wrapper {
    direction: rtl;
}

/* Pagination Container */
body.dark-mode .dataTables_paginate,
body.skin-1 .dataTables_paginate {
    text-align: left !important;
    direction: rtl;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Pagination Buttons */
body.dark-mode .dataTables_paginate .paginate_button,
body.skin-1 .dataTables_paginate .paginate_button {
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    margin: 0 3px !important;
    padding: 6px 12px !important;
    transition: all 0.2s ease !important;
}

body.dark-mode .dataTables_paginate .paginate_button:hover,
body.skin-1 .dataTables_paginate .paginate_button:hover {
    background: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
}

body.dark-mode .dataTables_paginate .paginate_button.current,
body.skin-1 .dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
    font-weight: 700 !important;
}

body.dark-mode .dataTables_paginate .paginate_button.disabled,
body.skin-1 .dataTables_paginate .paginate_button.disabled {
    background: var(--bg-body) !important;
    color: var(--text-light) !important;
    border-color: var(--border-color) !important;
    opacity: 0.5 !important;
}

/* DataTables Export Buttons Container - Position on Left */
body.dark-mode .dt-buttons,
body.skin-1 .dt-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    direction: ltr !important;
    float: left !important;
    margin-bottom: 10px;
}

/* DataTables Export Buttons - Icon Only Style */
body.dark-mode .dt-buttons .dt-button,
body.skin-1 .dt-buttons .dt-button,
body.dark-mode .dt-buttons a.dt-button,
body.skin-1 .dt-buttons a.dt-button,
body.dark-mode .dt-buttons button.dt-button,
body.skin-1 .dt-buttons button.dt-button {
    background: var(--bg-card) !important;
    background-image: none !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    margin: 0 !important;
    font-size: 13px !important;
    transition: all 0.2s !important;
    box-shadow: none !important;
    white-space: nowrap !important;
}

body.dark-mode .dt-buttons .dt-button:hover,
body.skin-1 .dt-buttons .dt-button:hover {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

/* Info and Search Labels */
body.dark-mode .dataTables_info,
body.skin-1 .dataTables_info,
body.dark-mode .dataTables_filter label,
body.skin-1 .dataTables_filter label {
    color: var(--text-secondary) !important;
    font-size: 13px !important;
}

body.dark-mode .dataTables_filter input,
body.skin-1 .dataTables_filter input {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 6px !important;
    padding: 4px 10px !important;
}

/* Previous/Next buttons */
body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.previous,
body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.next,
body.skin-1 .dataTables_wrapper .dataTables_paginate .paginate_button.previous,
body.skin-1 .dataTables_wrapper .dataTables_paginate .paginate_button.next {
    padding: 6px 15px !important;
}

/* Filter Dropdown - Fix Text Visibility */
body.dark-mode select.toolbar-input option,
body.skin-1 select.toolbar-input option,
body.dark-mode #customStatusFilter option,
body.skin-1 #customStatusFilter option,
body.dark-mode #customLengthSelect option,
body.skin-1 #customLengthSelect option {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    padding: 8px !important;
    text-align: center !important;
}

/* Ensure select dropdowns are readable */
body.dark-mode select.toolbar-input,
body.skin-1 select.toolbar-input,
body.dark-mode #customStatusFilter,
body.skin-1 #customStatusFilter,
body.dark-mode #customLengthSelect,
body.skin-1 #customLengthSelect {
    background-color: var(--input-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1.5 !important;
}

/* Refined DataTables controls for Dark Mode - Ensure visibility unless custom toolbar is present */
body.dark-mode .dataTables_wrapper .dataTables_filter input,
body.skin-1 .dataTables_wrapper .dataTables_filter input {
    background-color: var(--input-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--input-border) !important;
}

body.dark-mode .dataTables_wrapper .dataTables_filter label,
body.skin-1 .dataTables_wrapper .dataTables_filter label {
    color: var(--text-secondary) !important;
}


/* Improve table text contrast in dark mode */
body.dark-mode table.dataTable tbody td,
body.skin-1 table.dataTable tbody td {
    color: var(--text-primary) !important;
}

body.dark-mode table.dataTable tbody tr,
body.skin-1 table.dataTable tbody tr {
    background-color: var(--bg-card) !important;
}

body.dark-mode table.dataTable tbody tr:hover,
body.skin-1 table.dataTable tbody tr:hover {
    background-color: #2d3748 !important;
}

body.dark-mode table.dataTable thead th,
body.skin-1 table.dataTable thead th {
    color: var(--text-primary) !important;
    background-color: var(--bg-body) !important;
    border-color: var(--border-color) !important;
}


/* Ensuring search functionality is visible across all themes and toolbars where intended */
div.dataTables_wrapper div.dataTables_filter {
    display: block !important;
    visibility: visible !important;
    margin-bottom: 2px !important;
    text-align: right;
    margin-left: 10px !important;
}

/* Hide default controls specifically when using our modern Premium Unified Toolbar */
.has-unified-toolbar .dataTables_length,
.has-unified-toolbar .dataTables_filter {
    display: none !important;
}

body.dark-mode .dataTables_wrapper .dataTables_filter input,
body.skin-1 .dataTables_wrapper .dataTables_filter input {
    background: var(--input-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--input-border) !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
}

body.dark-mode .dataTables_wrapper .dataTables_filter label,
body.skin-1 .dataTables_wrapper .dataTables_filter label {
    color: var(--text-secondary) !important;
}




/* Request Info tags */

/* Premium Dashboard Styles */
:root {
    --primary-bg: #f8fafc;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --header-bg: #f1f5f9;
    --header-text: #1e293b;
    --accent: #6f4ef6;
    --text-main: #1e293b;
    --muted-text: #64748b;
    --hover-bg: #f8fafc;
    --input-border: #e2e8f0;
    --input-bg: #ffffff;
}

body.dark-mode,
body.skin-1 {
    --primary-bg: #0f172a;
    --card-bg: #1e293b;
    --card-border: #334155;
    --header-bg: #1e293b;
    --header-text: #f8fafc;
    --text-main: #f8fafc;
    --muted-text: #94a3b8;
    --hover-bg: #1e293b;
    --input-border: #475569;
    --input-bg: #0f172a;
}

/* Unified Toolbar */
.unified-toolbar {
    background: #f8fafc;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 20px;
    color: var(--text-main);
    width: 100%;
    box-sizing: border-box;
    direction: rtl;
}

.toolbar-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toolbar-label {
    font-weight: 600;
    font-size: 12px;
    color: #4b5563;
    font-family: 'Tahoma', sans-serif;
}

.toolbar-input {
    border: 1px solid var(--input-border);
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    color: #374151;
    outline: none;
    transition: all 0.2s;
    height: 36px;
    background-color: var(--input-bg);
    font-family: 'Tahoma', sans-serif;
}

.toolbar-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(111, 78, 246, 0.1);
}

.hidden-col {
    display: none !important;
}

.info-header-row {
    background: var(--card-bg) !important;
    border-bottom: 2px solid var(--accent);
    color: var(--text-main) !important;
}

body.dark-mode .info-header-row,
body.skin-1 .info-header-row {
    background: var(--card-bg) !important;
    color: #ffffff !important;
}

.student-identity h3 {
    color: var(--text-main) !important;
}

body.dark-mode .student-identity h3,
body.skin-1 .student-identity h3 {
    color: #ffffff !important;
}

.student-icon {
    background: rgba(111, 78, 246, 0.1) !important;
    color: var(--accent) !important;
}

.main-status-badge {
    background: var(--accent) !important;
    box-shadow: 0 2px 10px rgba(111, 78, 246, 0.2) !important;
}

.paginate_button.current {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: white !important;
}

/* Refined Modern Table */
.table-bordered {
    border: 1px solid var(--card-border) !important;
    /* Slightly Darker Border */
}

.table-bordered>tbody>tr>td {
    border: 1px solid var(--card-border) !important;
    vertical-align: middle !important;
    padding: 8px 10px !important;
}

.table-hover tbody tr:hover {
    background-color: var(--hover-bg);
    /* Darker Hover */
}

/* Header Styling */
.table>thead>tr>th {
    background-color: var(--header-bg);
    /* Darker Header */
    color: var(--header-text);
    font-weight: bold;
}

/* Content Layout */
.file-cell-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.file-text {
    display: flex;
    flex-direction: column;
    text-align: right;
    /* Changed to Right for RTL */
}

/* Table Row Styling matching Image 1 */
.history-status-badge {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 4px;
    background-color: var(--hover-bg);
    /* Matching Gray */
    color: var(--card-text);
    font-weight: 700;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.file-cell-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.file-text {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.history-time {
    font-family: 'Tahoma', sans-serif;
    font-size: 11px;
    color: #999;
    direction: ltr;
    display: inline-block;
    margin-top: 2px;
}

.history-emp-name {
    font-weight: 700;
    color: var(--card-text);
    font-size: 13px;
    display: block;
    margin-bottom: 2px;
}

.history-section-name {
    font-size: 11px;
    color: var(--muted-text);
    display: block;
    font-family: 'Tahoma', sans-serif;
}

.history-section-name::before {
    content: '\f1ad';
    font-family: FontAwesome;
    margin-left: 4px;
    color: #aaa;
}

.file-name-styled {
    font-weight: 700;
    font-size: 13px;
    color: var(--card-text);
    margin-bottom: 3px;
}

.file-meta-styled {
    font-size: 11px;
    color: var(--muted-text);
    font-family: 'Tahoma', sans-serif;
}

.file-icon-centered {
    width: fit-content;
    margin: 0 auto;
}

.file-icon-centered img {
    width: 40px !important;
    height: 40px !important;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    transition: transform 0.2s;
}

.status-cell-content {
    text-align: center;
}

.file-icon-centered:hover img {
    transform: scale(1.1);
}

/* Control panel */

/* Modern Glassmorphism Sidebar */
.chatUsers {
    position: absolute;
    /* Force overlay */
    top: 0;
    height: auto;
    /* Fit content height only */
    min-height: 400px;
    /* Reasonable base height */
    width: 280px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: -5px 5px 25px rgba(0, 0, 0, 0.1);
    /* Shadow added to bottom */
    padding: 20px;
    border-radius: 20px 0 20px 20px;
    /* Rounded bottom-left corner too */
    overflow-y: auto;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Toggle States */
.chatUsers.chatUsersshow {
    right: 0 !important;
}

.chatUsers.chatUsershide {
    right: -320px !important;
    /* Fully Hide off-screen */
    box-shadow: none;
}

/* Compact & Modern Groups */
.sidebar-group {
    margin-bottom: 15px;
    /* Less space between groups */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 10px;
}

.sidebar-group:last-child {
    border-bottom: none;
}

/* Modern Typography */
.sidebar-header {
    font-family: 'Tajawal', sans-serif;
    /* Example modern font if available, or inherit */
    font-weight: bold;
    color: #676a6c;
    margin-bottom: 8px;
    padding-right: 5px;
    font-size: 13px;
    opacity: 0.8;
}

/* Compact Buttons */
.sidebar-item {
    margin-bottom: 5px;
    /* Tighter spacing */
    transition: all 0.2s;
}

/* Modern Button Style */
.sidebar-item .button {
    border-radius: 8px;
    /* Rounded corners */
    background: white;
    border: 1px solid #e7eaec;
    color: #676a6c;
    font-size: 13px;
    padding: 8px 15px;
    text-align: right;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.sidebar-item .button:hover {
    background: #f3f3f4;
    border-color: #1ab394;
    color: #1ab394;
    transform: translateX(-3px);
    /* Subtle slide effect */
    box-shadow: 0 2px 8px rgba(26, 179, 148, 0.15);
}

/* Ensure Content doesn't trap Z-Index */
.chatEntries {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    z-index: auto !important;
}

/* =========================================
   MOBILE & TABLET RESPONSIVENESS (ADDITIVE)
   ========================================= */

/* Tablet (769px - 1024px) and Mobile (<= 768px) Shared Rules */
@media screen and (max-width: 1024px) {
    /* Safe Table Responsiveness Wrapper */
    .table-responsive,
    .dataTables_wrapper,
    .table-container {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: none;
    }

    /* Prevent text and inputs from overflowing */
    input, select, textarea, .form-control {
        max-width: 100%;
    }

    /* Fix potential padding issues in forms */
    .ibox-content {
        padding: 15px;
    }

    .form-container {
        padding: 15px;
    }
}

/* Mobile Specific (<= 768px) */
@media screen and (max-width: 768px) {
    /* Scale text down slightly for small screens */
    body {
        font-size: 13px !important;
    }

    /* Button scaling on touch devices WITHOUT breaking float flow */
    .btn, .button {
        min-height: 40px; /* touch target size */
    }

    /* Stack DataTables Centered: Paginate on TOP, Info UNDERNEATH */
    .dataTables_wrapper {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .dataTables_paginate {
        order: 1 !important; /* Buttons on Top */
        text-align: center !important;
        float: none !important;
        display: block !important;
        width: 100% !important;
        margin: 10px auto !important;
        padding: 0 !important;
        clear: both !important;
    }

    .dataTables_info {
        order: 2 !important; /* Info Text Underneath */
        text-align: center !important;
        float: none !important;
        display: block !important;
        width: 100% !important;
        margin: 5px auto 15px auto !important;
        padding: 0 10px !important;
        white-space: normal !important;
        font-size: 13px !important;
        color: #94a3b8 !important;
        clear: both !important;
    }

/* ==========================================================================
   MOBILE NAVIGATION DRAWER (Targeted Mobile-Only)
   ========================================================================== */
@media (max-width: 768px) {
    /* Main container: Force standard height and flex */
    .navbar-top-links {
        display: flex !important;
        flex-direction: row !important;
        float: left !important;
        margin: 0 !important;
        padding: 0 10px !important;
        height: 60px !important;
        align-items: center;
    }

    /* Keep Notify, Home, Theme, Ellipsis ALWAYS in the header */
    .navbar-top-links > li:nth-child(1), /* Home */
    .navbar-top-links > li:nth-child(3), /* Notify */
    .navbar-top-links > li:nth-child(7), /* Theme */
    .navbar-top-links > li:nth-child(8) { /* Ellipsis */
        display: flex !important;
        order: 1 !important;
    }

    /* THE SHELF ITEMS (Report, Previous, Logout) */
    .navbar-top-links.mobile-closed > li:has([id*="btn_report"]),
    .navbar-top-links.mobile-closed > li:has([id*="posturl"]),
    .navbar-top-links.mobile-closed > li:has([id*="LinkButton2"]),
    .navbar-top-links.mobile-closed > li:nth-child(4),
    .navbar-top-links.mobile-closed > li:nth-child(5),
    .navbar-top-links.mobile-closed > li:nth-child(6) {
        display: none !important;
    }

    /* When OPENED: Show them as a UNIFIED CARD below the header */
    .navbar-top-links:not(.mobile-closed) > li:has([id*="btn_report"]),
    .navbar-top-links:not(.mobile-closed) > li:has([id*="posturl"]),
    .navbar-top-links:not(.mobile-closed) > li:has([id*="LinkButton2"]),
    .navbar-top-links:not(.mobile-closed) > li:nth-child(4),
    .navbar-top-links:not(.mobile-closed) > li:nth-child(5),
    .navbar-top-links:not(.mobile-closed) > li:nth-child(6) {
        display: block !important;
        position: fixed !important;
        left: 10px !important;
        right: 10px !important;
        width: calc(100% - 20px) !important;
        background: #ffffff !important;
        z-index: 3000 !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        padding: 0 !important;
    }

    /* Specific offsets to stack into a single block visually */
    .navbar-top-links:not(.mobile-closed) > li:has([id*="btn_report"]) { top: 70px !important; border-bottom: none !important; border-radius: 12px 12px 0 0 !important; }
    .navbar-top-links:not(.mobile-closed) > li:has([id*="posturl"])   { top: 121px !important; border-top: none !important; border-bottom: none !important; border-radius: 0 !important; }
    .navbar-top-links:not(.mobile-closed) > li:has([id*="LinkButton2"]) { top: 172px !important; border-top: none !important; border-radius: 0 0 12px 12px !important; }

    /* Link item styling for the card */
    .navbar-top-links:not(.mobile-closed) > li > a,
    .navbar-top-links:not(.mobile-closed) > li > .btn {
        height: 52px !important;
        display: flex !important;
        align-items: center;
        justify-content: flex-start !important; /* Text to Right in RTL */
        padding: 0 20px !important;
        font-size: 14px !important;
        color: #334155 !important;
        font-weight: 600 !important;
    }

    .navbar-top-links:not(.mobile-closed) > li i {
        margin-left: 12px !important;
        font-size: 18px !important;
        opacity: 0.8;
    }

    /* Logout special color */
    .navbar-top-links:not(.mobile-closed) > li:has([id*="LinkButton2"]) a {
        color: #ef4444 !important;
    }

    /* Welcome text goes away */
    .navbar-top-links > li:nth-child(2) { display: none !important; }
}


/* Desktop-Friendly Stacking Fix */
@media (min-width: 769px) {
    .navbar-top-links > li {
        float: right !important; /* In RTL boostrap, float right puts them on LEFT end */
    }
}



/* Dark Mode DataTable Background Fix */
body.dark-mode .dataTables_wrapper,
body.dark-mode .dataTables_info,
body.dark-mode .dataTables_paginate,
body.dark-mode .dataTables_length,
body.dark-mode .dataTables_filter,
body.dark-mode .paging_simple_numbers {
    background-color: transparent !important;
    background: transparent !important;
    color: #cbd5e1 !important;
    border: none !important;
    box-shadow: none !important;
}

/* User Requested Dark Mode Pagination Styling */
body.dark-mode .pagination > li > a, 
body.dark-mode .pagination > li > span {
    background-color: #0f172a !important;
    border: 1px solid #334155 !important; /* Softened border for dark mode */
    color: inherit !important;
    float: left;
    line-height: 1.42857;
    margin-left: -1px;
    padding: 4px 10px;
    position: relative;
    text-decoration: none;
}

body.dark-mode .dt-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0f172a !important;
    border: 1px solid #1e293b !important;
    border-top: 1px solid #334155 !important;
    border-radius: 0 0 12px 12px;
    padding: 16px 20px !important;
    margin-top: 0;
}

/* Ensure the wrapper doesn't force a white border */
body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button {
    background-color: #0f172a !important;
    color: #cbd5e1 !important;
    border: 1px solid #334155 !important;
    border-radius: 6px !important;
    margin: 0 2px !important;
    padding: 6px 12px !important;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #6f4ef6 !important;
    border-color: #6f4ef6 !important;
    color: white !important;
}

/* =========================================
   LIGHT MODE CONTRAST BOOST
   ========================================= */
body:not(.dark-mode) .text-muted,
body:not(.dark-mode) .muted,
body:not(.dark-mode) .text-muted i,
body:not(.dark-mode) small {
    color: #475569 !important; /* Slate 600 - much clearer than #888 */
}

body:not(.dark-mode) label {
    color: #0f172a !important; /* Slate 900 */
}

body:not(.dark-mode) .info-label,
body:not(.dark-mode) .req-info-label {
    color: #334155 !important; /* Slate 700 */
}

/* Fix for disabled inputs that look like empty space */
body:not(.dark-mode) .form-control[disabled],
body:not(.dark-mode) .form-control[readonly],
body:not(.dark-mode) fieldset[disabled] .form-control {
    color: #334155 !important;
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    opacity: 1; /* Override Bootstrap's low opacity */
}
 / *   M a k e   . t e x t - d a r k   a d a p t i v e   f o r   b o t h   l i g h t   a n d   d a r k   m o d e s   * / 
 . t e x t - d a r k   {   c o l o r :   # 1 1 1 8 2 7   ! i m p o r t a n t ;   } 
 b o d y . d a r k - m o d e   . t e x t - d a r k ,   . s k i n - 1   . t e x t - d a r k   {   c o l o r :   # f 1 f 5 f 9   ! i m p/* =========================================
   DATATABLES SORTING & FILTER FIXES
   ========================================= */

/* 1. Reserve space in the header for the arrow */
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    position: relative !important;
    padding-right: 50px !important; /* Significant space for arrow */
    vertical-align: top !important;
}

/* RTL: Reverse the padding if icons are on the left */
body.rtls table.dataTable thead th.sorting,
body.rtls table.dataTable thead th.sorting_asc,
body.rtls table.dataTable thead th.sorting_desc {
    padding-left: 50px !important;
    padding-right: 15px !important;
}

/* 2. Position the arrow icon with space from the edge */
table.dataTable thead .sorting:after, 
table.dataTable thead .sorting_asc:after, 
table.dataTable thead .sorting_desc:after, 
table.dataTable thead .sorting_asc_disabled:after, 
table.dataTable thead .sorting_desc_disabled:after {
    position: absolute !important;
    bottom: 12px !important; /* Centered relative to label + input */
    right: 15px !important;  /* Space from the right edge as seen in image */
    left: auto !important;
    display: block !important;
    font-family: 'Glyphicons Halflings' !important;
    opacity: 0.6 !important;
    font-size: 11px !important;
}

/* RTL Arrow Position */
body.rtls table.dataTable thead .sorting:after,
body.rtls table.dataTable thead .sorting_asc:after,
body.rtls table.dataTable thead .sorting_desc:after {
    left: 15px !important;
    right: auto !important;
}

/* 3. Modern styling for the column search textbox */
.col-filter-wrap {
    margin-top: 10px;
    display: block;
    width: 100%;
}

.col-filter {
    width: 100% !important;
    height: 34px !important;
    border-radius: 10px !important;
    border: 1px solid var(--border-color) !important;
    background-color: var(--bg-sidebar) !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02) !important;
}

.col-filter:focus {
    border-color: var(--primary-color) !important;
    background-color: #fff !important;
    outline: none;
    box-shadow: 0 0 0 4px rgba(111, 78, 246, 0.1) !important;
}

