@charset "UTF-8";

/* =============================================
   Kuwait Explorer - Modern Dashboard Theme
   ============================================= */

:root {
    --kw-primary: #0891b2;
    --kw-primary-hover: #0e7490;
    --kw-primary-light: #e0f7fa;
    --kw-secondary: #1e293b;
    --kw-secondary-hover: #334155;
    --kw-accent: #f59e0b;
    --kw-accent-light: #fef3c7;
    --kw-success: #10b981;
    --kw-danger: #ef4444;
    --kw-info: #6366f1;
    --kw-surface: #f8fafc;
    --kw-card: #ffffff;
    --kw-text: #334155;
    --kw-text-muted: #94a3b8;
    --kw-border: #e2e8f0;

    /* Gradients for stat cards */
    --kw-gradient-1: linear-gradient(135deg, #0891b2, #06b6d4);
    --kw-gradient-2: linear-gradient(135deg, #10b981, #34d399);
    --kw-gradient-3: linear-gradient(135deg, #6366f1, #818cf8);
    --kw-gradient-4: linear-gradient(135deg, #f59e0b, #fbbf24);
    --kw-gradient-5: linear-gradient(135deg, #ef4444, #f87171);
    --kw-gradient-6: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

/* Font */
@font-face {
    src: url('base_regular.otf');
    font-family: base;
}
body {
    font-family: base, sans-serif !important;
    background: var(--kw-surface) !important;
    color: var(--kw-text);
}

/* =============================================
   Sidebar RTL Support
   ============================================= */

/* Desktop (>=768px): sidebar-fixed positions with left:0 — flip to right */
html[dir="rtl"] .sidebar.sidebar-fixed:not(.sidebar-end) {
    left: auto !important;
    right: 0 !important;
}

/* Desktop: sidebar uses margin-left for show/hide — flip to margin-right */
html[dir="rtl"] .sidebar:not(.sidebar-end) {
    margin-left: unset !important;
    margin-right: 0 !important;
}

/* Desktop: hiding sidebar uses negative margin-left — flip to margin-right */
@media (min-width: 768px) {
    html[dir="rtl"] .sidebar.hide:not(.sidebar-end) {
        margin-left: unset !important;
        margin-right: calc(-1 * var(--cui-sidebar-width)) !important;
    }
}

/* Mobile (<768px): sidebar is fixed with left:0 — flip to right */
@media (max-width: 767.98px) {
    html[dir="rtl"] .sidebar:not(.sidebar-end) {
        left: auto !important;
        right: 0 !important;
    }
    html[dir="rtl"] .sidebar:not(.sidebar-end):not(.show) {
        margin-left: unset !important;
        margin-right: calc(-1 * var(--cui-sidebar-width)) !important;
    }
}

/* Sidebar border: flip from border-right to border-left */
html[dir="rtl"] .sidebar:not(.sidebar-end) {
    border-right: none !important;
    border-left: var(--cui-sidebar-border-width) solid var(--cui-sidebar-border-color) !important;
}

/* Sidebar transition: flip margin-left to margin-right */
html[dir="rtl"] .sidebar {
    transition: margin-right .15s, margin-left .15s, box-shadow 75ms, transform .15s, width .15s, z-index 0s ease .15s !important;
}

/* Sidebar nav items: flip icon margin and group items padding */
html[dir="rtl"] .sidebar-nav .nav-icon:first-child {
    margin-left: 0 !important;
    margin-right: calc(var(--cui-sidebar-nav-link-padding-x) * -1) !important;
}
html[dir="rtl"] .sidebar-nav .nav-group-toggle::after {
    margin-left: 0 !important;
    margin-right: auto !important;
}
html[dir="rtl"] .sidebar-nav .nav-group-items .nav-link {
    padding-left: 0 !important;
    padding-right: var(--cui-sidebar-nav-icon-width) !important;
}
html[dir="rtl"] .sidebar-nav .nav-group-items .nav-link .nav-icon {
    margin-left: 0 !important;
    margin-right: calc(var(--cui-sidebar-nav-icon-width) * -1) !important;
}

/* Sidebar close button: flip from right to left */
html[dir="rtl"] .sidebar-close {
    right: auto !important;
    left: 0 !important;
}

/* =============================================
   Sidebar
   ============================================= */
.sidebar {
    background: var(--kw-secondary) !important;
}
.sidebar-brand {
    background: #151e2d !important;
}
.sidebar-brand a {
    color: var(--kw-primary) !important;
    font-weight: 700;
    letter-spacing: 1px;
}
.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.65) !important;
    transition: all 0.2s ease;
    border-inline-start: 3px solid transparent;
}
.sidebar .nav-link:hover {
    color: #fff !important;
    background: rgba(8, 145, 178, 0.1) !important;
}
.sidebar .nav-link.active {
    background: rgba(8, 145, 178, 0.15) !important;
    color: var(--kw-primary) !important;
    border-inline-start: 3px solid var(--kw-primary);
}
.sidebar .nav-group.show .nav-group-toggle {
    color: var(--kw-primary) !important;
}
.sidebar .nav-group-items .nav-link {
    padding-inline-start: 3.5rem;
}

/* Sidebar badges */
.sidebar .badge-danger,
.sidebar .menu-badge {
    background: var(--kw-accent) !important;
    color: #fff;
    font-size: 0.65rem;
    border-radius: 50px;
    padding: 3px 8px;
    font-weight: 600;
}

/* =============================================
   Header / Navbar
   ============================================= */
.header.header-sticky {
    background: var(--kw-card) !important;
    border-bottom: 1px solid var(--kw-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* =============================================
   Cards
   ============================================= */
.body-content .card,
.container-fluid .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
    background: var(--kw-card);
}
.body-content .card:hover,
.container-fluid .card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* =============================================
   Stat Cards (gradient)
   ============================================= */
/* Stat row: equal height columns */
.stat-card-row {
    display: flex;
    flex-wrap: wrap;
}
.stat-card-row > [class*="col-"] {
    display: flex;
}
.stat-card {
    border-radius: 16px !important;
    color: #fff;
    overflow: hidden;
    position: relative;
    width: 100%;
    min-height: 130px;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: -30px;
    inset-inline-end: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}
.stat-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    inset-inline-start: -20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}
.stat-card.gradient-1 { background: var(--kw-gradient-1); }
.stat-card.gradient-2 { background: var(--kw-gradient-2); }
.stat-card.gradient-3 { background: var(--kw-gradient-3); }
.stat-card.gradient-4 { background: var(--kw-gradient-4); }
.stat-card.gradient-5 { background: var(--kw-gradient-5); }
.stat-card.gradient-6 { background: var(--kw-gradient-6); }

.stat-card .card-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}
.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}
.stat-label {
    font-size: 0.8rem;
    opacity: 0.85;
    margin-top: 4px;
}
.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.2);
}

/* =============================================
   Chart Cards
   ============================================= */
.chart-card .card-header,
.chart-card .card-body {
    border: none;
}
.chart-card .card-header {
    background: transparent;
    font-weight: 600;
    font-size: 1rem;
    color: var(--kw-secondary);
    padding: 1.25rem 1.25rem 0;
    border-bottom: none;
}

/* =============================================
   Pending Actions Panel
   ============================================= */
.pending-panel .panel-header {
    font-weight: 700;
    font-size: 1rem;
    color: var(--kw-secondary);
    padding: 1.25rem;
    border-bottom: 1px solid var(--kw-border);
}
.pending-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 1.25rem;
    text-decoration: none;
    color: var(--kw-text);
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}
.pending-item:last-child {
    border-bottom: none;
}
.pending-item:hover {
    background: var(--kw-surface);
    color: var(--kw-primary);
}
.pending-item .pending-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.pending-item .pending-icon.bg-warning {
    background: var(--kw-accent-light) !important;
    color: var(--kw-accent) !important;
}
.pending-item .pending-icon.bg-info {
    background: #ede9fe !important;
    color: var(--kw-info) !important;
}
.pending-item .pending-icon.bg-danger {
    background: #fee2e2 !important;
    color: var(--kw-danger) !important;
}
.pending-item .pending-icon.bg-primary {
    background: var(--kw-primary-light) !important;
    color: var(--kw-primary) !important;
}
.pending-item .pending-icon.bg-success {
    background: #d1fae5 !important;
    color: var(--kw-success) !important;
}
.pending-count {
    margin-inline-start: auto;
    background: var(--kw-surface);
    color: var(--kw-text);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 50px;
}
.pending-item:hover .pending-count {
    background: var(--kw-primary);
    color: #fff;
}

/* =============================================
   Recent Activity Feed
   ============================================= */
.activity-panel .panel-header {
    font-weight: 700;
    font-size: 1rem;
    color: var(--kw-secondary);
    padding: 1.25rem;
    border-bottom: 1px solid var(--kw-border);
}
.activity-list {
    padding: 0.75rem 1.25rem;
    max-height: 350px;
    overflow-y: auto;
}
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f8fafc;
}
.activity-item:last-child {
    border-bottom: none;
}
.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}
.activity-dot.dot-success { background: var(--kw-success); }
.activity-dot.dot-primary { background: var(--kw-primary); }
.activity-dot.dot-warning { background: var(--kw-accent); }
.activity-dot.dot-info { background: var(--kw-info); }
.activity-dot.dot-danger { background: var(--kw-danger); }
.activity-text {
    font-size: 0.85rem;
    color: var(--kw-text);
    line-height: 1.4;
}
.activity-time {
    font-size: 0.7rem;
    color: var(--kw-text-muted);
    margin-top: 2px;
}

/* =============================================
   Quick Actions Panel
   ============================================= */
.quick-panel .panel-header {
    font-weight: 700;
    font-size: 1rem;
    color: var(--kw-secondary);
    padding: 1.25rem;
    border-bottom: 1px solid var(--kw-border);
}
.quick-actions-list {
    padding: 1rem 1.25rem;
}
.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 8px;
    border: 1px solid var(--kw-border);
    border-radius: 10px;
    background: var(--kw-card);
    color: var(--kw-text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.quick-action-btn:last-child {
    margin-bottom: 0;
}
.quick-action-btn:hover {
    border-color: var(--kw-primary);
    color: var(--kw-primary);
    background: var(--kw-primary-light);
    transform: translateX(3px);
}
html[dir="rtl"] .quick-action-btn:hover {
    transform: translateX(-3px);
}
.quick-action-btn .action-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/* =============================================
   Dashboard Welcome Header
   ============================================= */
.dashboard-header {
    padding: 0.5rem 0 1rem;
}
.dashboard-header h2 {
    color: var(--kw-secondary);
    font-weight: 700;
    margin-bottom: 4px;
}
.dashboard-header p {
    color: var(--kw-text-muted);
    font-size: 0.9rem;
}

/* =============================================
   Forms — Create / Edit Pages
   ============================================= */

/* Hide translation UI — single language setup */
.nav-tabs-translation,
[bp-section="crud-translatable-notice"],
[bp-section="update-operation-language-dropdown"],
[bp-section="create-operation-language-dropdown"],
.alert:has([href*="_locale"]),
.card-header:has(.nav-tabs-translation),
.noty_bar:has(a[href*="_fallback_locale"]) {
    display: none !important;
}

/* Required field indicator */
.backpack-profile-form .required:after,
.form-group.required label:not(:empty):after {
    content: " \645\637\644\648\628" !important;
    color: var(--kw-danger);
    font-size: 8px;
}

/* Page header area */
div[bp-section="crud-operation-create"],
div[bp-section="crud-operation-update"] {
    padding-top: 8px;
}

/* The main form card */
div[bp-section="crud-operation-create"] .card,
div[bp-section="crud-operation-update"] .card,
div[bp-section="crud-operation-show"] .card {
    border: 1px solid var(--kw-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}
div[bp-section="crud-operation-create"] .card .card-body,
div[bp-section="crud-operation-update"] .card .card-body,
div[bp-section="crud-operation-show"] .card .card-body {
    padding: 28px 28px 20px !important;
}

/* Form labels */
.form-group label:not(:empty),
div[bp-section="crud-operation-create"] label,
div[bp-section="crud-operation-update"] label {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--kw-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

/* Text inputs, selects, textareas */
div[bp-section="crud-operation-create"] .form-control,
div[bp-section="crud-operation-update"] .form-control,
div[bp-section="crud-operation-create"] .form-select,
div[bp-section="crud-operation-update"] .form-select {
    border: 1.5px solid var(--kw-border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.88rem;
    color: var(--kw-text);
    background: var(--kw-surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
div[bp-section="crud-operation-create"] .form-control:focus,
div[bp-section="crud-operation-update"] .form-control:focus,
div[bp-section="crud-operation-create"] .form-select:focus,
div[bp-section="crud-operation-update"] .form-select:focus {
    border-color: var(--kw-primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
    background: var(--kw-card);
    outline: none;
}
div[bp-section="crud-operation-create"] .form-control::placeholder,
div[bp-section="crud-operation-update"] .form-control::placeholder {
    color: var(--kw-text-muted);
    opacity: 0.7;
}
div[bp-section="crud-operation-create"] textarea.form-control,
div[bp-section="crud-operation-update"] textarea.form-control {
    min-height: 100px;
}

/* Select2 styling */
div[bp-section="crud-operation-create"] .select2-container--default .select2-selection--single,
div[bp-section="crud-operation-update"] .select2-container--default .select2-selection--single,
div[bp-section="crud-operation-create"] .select2-container--default .select2-selection--multiple,
div[bp-section="crud-operation-update"] .select2-container--default .select2-selection--multiple {
    border: 1.5px solid var(--kw-border) !important;
    border-radius: 10px !important;
    min-height: 42px;
    padding: 4px 8px;
    background: var(--kw-surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
div[bp-section="crud-operation-create"] .select2-container--default.select2-container--focus .select2-selection,
div[bp-section="crud-operation-update"] .select2-container--default.select2-container--focus .select2-selection,
div[bp-section="crud-operation-create"] .select2-container--default.select2-container--open .select2-selection,
div[bp-section="crud-operation-update"] .select2-container--default.select2-container--open .select2-selection {
    border-color: var(--kw-primary) !important;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1) !important;
}
.select2-dropdown {
    border: 1.5px solid var(--kw-border) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden;
    margin-top: 4px;
}
.select2-results__option--highlighted[aria-selected] {
    background-color: var(--kw-primary) !important;
}
.select2-search--dropdown .select2-search__field {
    border-radius: 8px !important;
    border: 1.5px solid var(--kw-border) !important;
    padding: 8px 12px;
}

/* Form group spacing */
div[bp-section="crud-operation-create"] .form-group,
div[bp-section="crud-operation-update"] .form-group {
    margin-bottom: 20px;
}

/* Horizontal rule separators */
div[bp-section="crud-operation-create"] hr,
div[bp-section="crud-operation-update"] hr {
    border-color: var(--kw-border);
    opacity: 0.5;
    margin: 8px 0 20px;
}

/* Image upload field */
div[bp-section="crud-operation-create"] .backpack-image,
div[bp-section="crud-operation-update"] .backpack-image {
    border: 2px dashed var(--kw-border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease;
    background: var(--kw-surface);
}
div[bp-section="crud-operation-create"] .backpack-image:hover,
div[bp-section="crud-operation-update"] .backpack-image:hover {
    border-color: var(--kw-primary);
    background: var(--kw-primary-light);
}
div[bp-section="crud-operation-create"] .backpack-image img,
div[bp-section="crud-operation-update"] .backpack-image img {
    border-radius: 10px;
    max-height: 200px;
}

/* Checkbox / radio / switch */
div[bp-section="crud-operation-create"] .form-check-input:checked,
div[bp-section="crud-operation-update"] .form-check-input:checked {
    background-color: var(--kw-primary);
    border-color: var(--kw-primary);
}
div[bp-section="crud-operation-create"] .form-switch .form-check-input,
div[bp-section="crud-operation-update"] .form-switch .form-check-input {
    width: 2.5em;
    height: 1.3em;
    border-radius: 50px;
}

/* Save button area */
div[bp-section="crud-operation-create"] .card-footer,
div[bp-section="crud-operation-update"] .card-footer,
div#saveActions {
    background: var(--kw-surface) !important;
    border-top: 1px solid var(--kw-border) !important;
    padding: 16px 28px !important;
    border-radius: 0 0 14px 14px;
}
div#saveActions .btn-primary,
div#saveActions .btn-success {
    border-radius: 10px !important;
    font-weight: 600;
    padding: 10px 24px !important;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.2);
    transition: all 0.2s ease;
}
div#saveActions .btn-primary:hover,
div#saveActions .btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.3);
}
/* Dropdown part of split save button */
div#saveActions .btn-group .dropdown-toggle {
    border-radius: 0 10px 10px 0 !important;
    padding: 10px 12px !important;
}
div#saveActions .btn-group .btn:first-child {
    border-radius: 10px 0 0 10px !important;
}
div#saveActions .dropdown-menu {
    border: 1.5px solid var(--kw-border);
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: 6px;
    overflow: hidden;
}
div#saveActions .dropdown-item {
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.84rem;
    transition: background 0.15s ease;
}
div#saveActions .dropdown-item:hover {
    background: var(--kw-primary-light);
    color: var(--kw-primary);
}
/* Cancel button */
div#saveActions a.btn-default,
div#saveActions a.btn-secondary,
div#saveActions a[href]:not(.btn-primary):not(.btn-success) {
    border-radius: 10px !important;
    font-weight: 600;
    padding: 10px 20px !important;
    font-size: 0.85rem;
    border: 1.5px solid var(--kw-border) !important;
    background: var(--kw-card) !important;
    color: var(--kw-text-muted) !important;
    transition: all 0.2s ease;
}
div#saveActions a.btn-default:hover,
div#saveActions a.btn-secondary:hover,
div#saveActions a[href]:not(.btn-primary):not(.btn-success):hover {
    border-color: var(--kw-danger) !important;
    color: var(--kw-danger) !important;
    background: #fef2f2 !important;
}

/* Validation errors */
.invalid-feedback,
.text-danger {
    font-size: 0.78rem;
    font-weight: 500;
}
div[bp-section="crud-operation-create"] .is-invalid .form-control,
div[bp-section="crud-operation-update"] .is-invalid .form-control,
div[bp-section="crud-operation-create"] .form-control.is-invalid,
div[bp-section="crud-operation-update"] .form-control.is-invalid {
    border-color: var(--kw-danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Show page — field labels & values */
div[bp-section="crud-operation-show"] .card .card-body .form-group label {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--kw-text-muted);
    margin-bottom: 4px;
}

/* Page title area */
section[bp-section="page-header"] h1,
section[bp-section="page-header"] .text-capitalize {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--kw-secondary);
}
section[bp-section="page-header"] small {
    color: var(--kw-text-muted);
    font-size: 0.85rem;
}
section[bp-section="page-header"] a.text-primary,
section[bp-section="page-header"] a[bp-button] {
    font-size: 0.82rem;
    font-weight: 500;
}

/* Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 0;
    font-size: 0.82rem;
}
.breadcrumb-item + .breadcrumb-item::before {
    color: var(--kw-text-muted);
}

/* TinyMCE editor wrapper */
div[bp-section="crud-operation-create"] .tox-tinymce,
div[bp-section="crud-operation-update"] .tox-tinymce {
    border: 1.5px solid var(--kw-border) !important;
    border-radius: 10px !important;
    overflow: hidden;
}

/* File/image input button */
div[bp-section="crud-operation-create"] .btn-outline-secondary,
div[bp-section="crud-operation-update"] .btn-outline-secondary,
div[bp-section="crud-operation-create"] input[type="file"]::file-selector-button,
div[bp-section="crud-operation-update"] input[type="file"]::file-selector-button {
    border-radius: 8px;
    border: 1.5px solid var(--kw-border);
    padding: 6px 14px;
    font-size: 0.82rem;
    transition: all 0.15s ease;
}

/* Input groups (prepended/appended icons) */
div[bp-section="crud-operation-create"] .input-group-text,
div[bp-section="crud-operation-update"] .input-group-text {
    background: var(--kw-surface);
    border: 1.5px solid var(--kw-border);
    border-radius: 10px;
    color: var(--kw-text-muted);
    font-size: 0.88rem;
}

/* =============================================
   Scrollbar
   ============================================= */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: #f1f4f8;
}
::-webkit-scrollbar-thumb {
    background: var(--kw-primary);
    border-radius: 8px;
}

/* =============================================
   CRUD List Page — Full Modern Redesign
   ============================================= */

/* ---- Page Header ---- */
section[bp-section="page-header"] {
    margin-bottom: 1.25rem !important;
}
h1[bp-section="page-heading"] {
    color: var(--kw-secondary) !important;
    font-weight: 800;
    font-size: 1.6rem !important;
    letter-spacing: -0.01em;
}
#datatable_info_stack {
    color: var(--kw-text-muted) !important;
    font-size: 0.8rem !important;
}

/* ---- Top Row: Buttons + Search as unified bar ---- */
div[bp-section="crud-operation-list"] > .col-md-12 > .row.mb-2 {
    background: var(--kw-card);
    border: 1px solid var(--kw-border);
    border-radius: 14px 14px 0 0;
    padding: 16px 20px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

/* Search input */
#datatable_search_stack {
    position: relative;
}
#datatable_search_stack .input-icon {
    position: relative;
}
#datatable_search_stack .input-icon-addon {
    display: flex !important;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    color: var(--kw-text-muted);
    pointer-events: none;
}
html:not([dir="rtl"]) #datatable_search_stack .input-icon-addon {
    left: 14px;
}
html[dir="rtl"] #datatable_search_stack .input-icon-addon {
    right: 14px;
}
#datatable_search_stack input[type="search"] {
    border-radius: 10px !important;
    border: 1.5px solid var(--kw-border) !important;
    padding: 10px 16px 10px 40px !important;
    font-size: 0.88rem;
    background: var(--kw-surface) !important;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
html[dir="rtl"] #datatable_search_stack input[type="search"] {
    padding: 10px 40px 10px 16px !important;
}
#datatable_search_stack input[type="search"]:focus {
    border-color: var(--kw-primary) !important;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.08) !important;
    background: #fff !important;
    outline: none;
}
#datatable_search_stack input[type="search"]::placeholder {
    color: var(--kw-text-muted);
}

/* ---- Filter Bar ---- */
.navbar-filters {
    background: var(--kw-card) !important;
    border-left: 1px solid var(--kw-border);
    border-right: 1px solid var(--kw-border);
    padding: 10px 20px !important;
    margin-bottom: 0 !important;
}
.navbar-filters .nav-item > a,
.navbar-filters .nav-link {
    font-size: 0.82rem;
    color: var(--kw-text-muted);
    border-radius: 8px;
    padding: 6px 14px !important;
    transition: all 0.15s ease;
}
.navbar-filters .nav-item > a.active,
.navbar-filters .nav-link.active {
    background: var(--kw-primary-light) !important;
    color: var(--kw-primary) !important;
    font-weight: 600;
}
.navbar-filters .la-filter {
    color: var(--kw-text-muted);
}
#remove_filters_button {
    color: var(--kw-danger) !important;
    font-size: 0.78rem !important;
}

/* ---- Table Wrapper — unified card with top bar ---- */
#crudTable {
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
}
#crudTable.card {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Outer wrapper for the table — make it part of the card */
div[bp-section="crud-operation-list"] > .col-md-12 > div:has(#crudTable),
#crudTable_wrapper {
    background: var(--kw-card);
    border: 1px solid var(--kw-border);
    border-top: none;
    border-radius: 0 0 14px 14px;
    overflow: visible;
    box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}
/* Keep table scroll but allow dropdowns to overflow */
#crudTable_wrapper .table-responsive {
    overflow-x: auto;
    overflow-y: visible;
}
/* Column visibility dropdown */
#crudTable_wrapper .dt-buttons .dropdown-menu,
#crudTable_wrapper .buttons-columnVisibility {
    z-index: 1050;
}
#crudTable_wrapper .dt-buttons .dropdown-menu {
    border: 1.5px solid var(--kw-border);
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: 6px;
}
#crudTable_wrapper .dt-buttons .dropdown-item {
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.84rem;
    transition: background 0.15s ease;
}
#crudTable_wrapper .dt-buttons .dropdown-item:hover,
#crudTable_wrapper .dt-buttons .dropdown-item.active {
    background: var(--kw-primary-light);
    color: var(--kw-primary);
}

/* Hide footer (duplicate headers) */
#crudTable tfoot {
    display: none !important;
}

/* ---- Table Header ---- */
#crudTable thead th {
    background: var(--kw-surface) !important;
    color: var(--kw-text-muted) !important;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--kw-border) !important;
    border-top: 1px solid var(--kw-border) !important;
    padding: 13px 20px !important;
    white-space: nowrap;
}

/* Actions column header */
#crudTable thead th[data-action-column="true"] {
    text-align: center;
}

/* ---- Table Body ---- */
#crudTable tbody td {
    padding: 18px 20px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-top: none !important;
    font-size: 0.88rem;
    color: var(--kw-text);
    background: var(--kw-card);
    transition: background 0.12s ease;
}
#crudTable tbody tr:last-child td {
    border-bottom: none !important;
}

/* Row hover */
#crudTable tbody tr:hover td {
    background: #f0fdfa !important;
}

/* Remove DataTable default striping */
table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1) > * {
    box-shadow: none !important;
    background: transparent !important;
}
table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1):hover > * {
    background: #f0fdfa !important;
}

/* ---- Bottom Bar: Pagination + Info ---- */
#crudTable_wrapper .row:last-child,
.dt-layout-row:last-child {
    padding: 14px 20px !important;
    border-top: 1px solid #f1f5f9;
    align-items: center;
}

/* Items per page */
.dataTables_length,
.dt-length {
    font-size: 0.82rem;
    color: var(--kw-text-muted);
}
.dataTables_length select,
.dt-length select {
    border-radius: 8px !important;
    border: 1.5px solid var(--kw-border) !important;
    padding: 5px 10px;
    font-size: 0.82rem;
    background: var(--kw-surface);
    margin: 0 4px;
}

/* Info text */
.dataTables_info,
.dt-info {
    color: var(--kw-text-muted) !important;
    font-size: 0.78rem;
}

/* Pagination */
.dt-paging .dt-paging-button.active .page-link {
    background-color: var(--kw-primary) !important;
    border-color: var(--kw-primary) !important;
    color: #fff !important;
    font-weight: 600;
}
.dt-paging .dt-paging-button .page-link {
    border-radius: 8px !important;
    margin: 0 2px;
    font-size: 0.8rem;
    padding: 5px 11px;
    border: 1px solid var(--kw-border);
    color: var(--kw-text);
    transition: all 0.15s ease;
}
.dt-paging .dt-paging-button:not(.disabled):not(.active) .page-link:hover {
    background: var(--kw-primary-light) !important;
    border-color: var(--kw-primary) !important;
    color: var(--kw-primary) !important;
}
.dt-paging .dt-paging-button.disabled .page-link {
    color: var(--kw-text-muted) !important;
    opacity: 0.5;
}

/* =============================================
   User Avatar
   ============================================= */
.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* =============================================
   Status Badges
   ============================================= */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.status-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}
.status-active {
    background: #ecfdf5;
    color: #059669;
}
.status-active::before {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
.status-inactive {
    background: #fef2f2;
    color: #dc2626;
}
.status-inactive::before {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* =============================================
   CRUD Action Buttons (line buttons)
   ============================================= */
#crudTable td[data-action-column],
#crudTable td:last-child {
    white-space: nowrap;
    text-align: center;
}

/* Hide dropdown toggles (translation button groups) */
#crudTable td:last-child .btn-group .dropdown-toggle,
#crudTable td:last-child .btn-group .dropdown-menu {
    display: none !important;
}
/* Unwrap btn-group so the main button flows normally */
#crudTable td:last-child .btn-group {
    display: contents;
}

/* Show / Edit / Delete / Preview — icon-only pill buttons */
#crudTable td:last-child a[bp-button]:has(i),
#crudTable td:last-child .btn-sm.btn-link:has(i) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0 !important;
    margin: 0 3px;
    border-radius: 10px !important;
    border: 1.5px solid var(--kw-border) !important;
    background: var(--kw-surface) !important;
    color: var(--kw-text-muted) !important;
    text-decoration: none !important;
    transition: all 0.15s ease;
    overflow: hidden;
}
/* Hide only text nodes inside icon buttons — keep <i> visible even when inside <span> */
#crudTable td:last-child a[bp-button]:has(i) span,
#crudTable td:last-child .btn-sm.btn-link:has(i) span {
    font-size: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#crudTable td:last-child a[bp-button]:has(i) span i,
#crudTable td:last-child .btn-sm.btn-link:has(i) span i {
    font-size: 1rem !important;
}
/* Buttons without icons — compact text style */
#crudTable td:last-child a[bp-button]:not(:has(i)),
#crudTable td:last-child .btn-sm.btn-link:not(:has(i)) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px !important;
    margin: 0 3px;
    border-radius: 8px !important;
    border: 1.5px solid var(--kw-border) !important;
    background: var(--kw-surface) !important;
    color: var(--kw-text-muted) !important;
    font-size: 0.74rem !important;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.15s ease;
}
#crudTable td:last-child a[bp-button] i,
#crudTable td:last-child .btn-sm.btn-link i {
    font-size: 1rem !important;
    margin: 0 !important;
}
#crudTable td:last-child a[bp-button]:hover,
#crudTable td:last-child .btn-sm.btn-link:hover {
    background: var(--kw-primary) !important;
    border-color: var(--kw-primary) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(8, 145, 178, 0.25);
}

/* Toggle buttons — keep text visible, distinct style */
.btn-toggle-disable,
.btn-toggle-enable,
#crudTable td:last-child .btn-toggle-disable,
#crudTable td:last-child .btn-toggle-enable {
    width: auto !important;
    height: auto !important;
    font-size: 0.74rem !important;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    font-weight: 600;
    gap: 4px;
    display: inline-flex;
    align-items: center;
}
.btn-toggle-disable,
#crudTable td:last-child .btn-toggle-disable {
    background: transparent !important;
    color: #dc2626 !important;
    border: 1.5px solid #fecaca !important;
}
.btn-toggle-disable:hover,
#crudTable td:last-child .btn-toggle-disable:hover {
    background: #dc2626 !important;
    color: #fff !important;
    border-color: #dc2626 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.25) !important;
}
.btn-toggle-enable,
#crudTable td:last-child .btn-toggle-enable {
    background: transparent !important;
    color: #059669 !important;
    border: 1.5px solid #a7f3d0 !important;
}
.btn-toggle-enable:hover,
#crudTable td:last-child .btn-toggle-enable:hover {
    background: #059669 !important;
    color: #fff !important;
    border-color: #059669 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(5, 150, 105, 0.25) !important;
}

/* =============================================
   Top CRUD Buttons (Add, Export, etc.)
   ============================================= */
a.btn-primary[data-style],
.top a.btn.btn-primary {
    border-radius: 10px !important;
    font-weight: 600;
    padding: 9px 22px !important;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.2);
    transition: all 0.2s ease;
}
a.btn-primary[data-style]:hover,
.top a.btn.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.3);
}

/* =============================================
   Empty Table State
   ============================================= */
#crudTable td.dataTables_empty {
    padding: 60px 20px !important;
    text-align: center;
    color: var(--kw-text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

/* =============================================
   Processing Indicator
   ============================================= */
.dataTables_processing {
    background: rgba(255,255,255,0.9) !important;
    color: var(--kw-primary) !important;
    font-weight: 600;
    border-radius: 10px !important;
    padding: 12px 24px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
}

/* =============================================
   Buttons
   ============================================= */
.btn.btn-primary {
    --cui-btn-bg: var(--kw-primary);
    --cui-btn-border-color: var(--kw-primary);
    --cui-btn-hover-bg: var(--kw-primary-hover);
    --cui-btn-hover-border-color: var(--kw-primary-hover);
    --cui-btn-active-bg: var(--kw-primary-hover);
    --cui-btn-active-border-color: var(--kw-primary-hover);
}
.btn.btn-outline-primary {
    --cui-btn-color: var(--kw-primary);
    --cui-btn-border-color: var(--kw-primary);
    --cui-btn-hover-bg: var(--kw-primary);
    --cui-btn-hover-border-color: var(--kw-primary);
    --cui-btn-hover-color: #fff;
}
.btn-link {
    color: var(--kw-primary) !important;
}

/* =============================================
   Layout - Prevent content disappearing on sidebar toggle
   ============================================= */
.wrapper,
.body-content,
.main,
div[class*="body"] {
    overflow: visible !important;
}

/* =============================================
   Language Switcher
   ============================================= */
.lang-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--kw-primary-light);
    color: var(--kw-primary) !important;
    margin: 0 8px;
    transition: all 0.2s ease;
}
.lang-switch:hover {
    background: var(--kw-primary);
    color: #fff !important;
}

/* =============================================
   Misc overrides
   ============================================= */
.breadcrumb-item a {
    color: var(--kw-primary);
}
.page-item.active .page-link {
    background-color: var(--kw-primary);
    border-color: var(--kw-primary);
}
a {
    color: var(--kw-primary);
}
a:hover {
    color: var(--kw-primary-hover);
}

/* =============================================
   RTL Form Fixes (Arabic)
   ============================================= */

/* Form labels right-aligned */
html[dir="rtl"] div[bp-section="crud-operation-create"] label,
html[dir="rtl"] div[bp-section="crud-operation-update"] label,
html[dir="rtl"] .form-group label {
    display: block;
    text-align: right;
}

/* Text inputs direction */
html[dir="rtl"] div[bp-section="crud-operation-create"] .form-control,
html[dir="rtl"] div[bp-section="crud-operation-update"] .form-control,
html[dir="rtl"] div[bp-section="crud-operation-create"] .form-select,
html[dir="rtl"] div[bp-section="crud-operation-update"] .form-select {
    direction: rtl;
    text-align: right;
}

/* Select2 — flip dropdown arrow to left side */
html[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__arrow {
    left: 6px !important;
    right: auto !important;
}
html[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 30px;
    padding-right: 10px;
    text-align: right;
}

/* Select2 — clear button flip */
html[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__clear {
    float: left;
    margin-left: 0;
    margin-right: 4px;
}

/* Select2 search box direction */
html[dir="rtl"] .select2-search--dropdown .select2-search__field {
    direction: rtl;
    text-align: right;
}

/* Select2 results text direction */
html[dir="rtl"] .select2-results__option {
    text-align: right;
}

/* Save button group — flip border-radius for RTL */
html[dir="rtl"] div#saveActions .btn-group .dropdown-toggle {
    border-radius: 10px 0 0 10px !important;
}
html[dir="rtl"] div#saveActions .btn-group .btn:first-child {
    border-radius: 0 10px 10px 0 !important;
}

/* Validation error messages — right aligned */
html[dir="rtl"] .invalid-feedback,
html[dir="rtl"] .text-danger {
    text-align: right;
}

/* Boolean / switch label alignment */
html[dir="rtl"] div[bp-section="crud-operation-create"] .form-check,
html[dir="rtl"] div[bp-section="crud-operation-update"] .form-check {
    padding-left: 0;
    padding-right: 1.5em;
    text-align: right;
}
html[dir="rtl"] div[bp-section="crud-operation-create"] .form-check-input,
html[dir="rtl"] div[bp-section="crud-operation-update"] .form-check-input {
    float: right;
    margin-left: 0;
    margin-right: -1.5em;
}

/* Input group — flip addon sides */
html[dir="rtl"] div[bp-section="crud-operation-create"] .input-group-text,
html[dir="rtl"] div[bp-section="crud-operation-update"] .input-group-text {
    border-radius: 0 10px 10px 0 !important;
    border-left: none !important;
    border-right: 1.5px solid var(--kw-border) !important;
}
html[dir="rtl"] div[bp-section="crud-operation-create"] .input-group .form-control:first-child,
html[dir="rtl"] div[bp-section="crud-operation-update"] .input-group .form-control:first-child {
    border-radius: 10px 0 0 10px !important;
}

/* Page header — give breathing room between heading and subheading/back-link */
section[bp-section="page-header"] {
    gap: 0.5rem;
    flex-wrap: wrap;
}
section[bp-section="page-header"] [bp-section="page-heading"] {
    margin-inline-end: 0.5rem;
}

/* =================================================================
   TOPBAR — professional refresh
   ================================================================= */
header.header,
header.header.header-sticky {
    background: #ffffff !important;
    border-bottom: 1px solid var(--kw-border) !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    min-height: 64px;
}

header .header-toggler {
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 8px;
    transition: background 0.15s ease;
}
header .header-toggler:hover {
    background: var(--kw-surface);
}
header .header-toggler svg path {
    stroke: var(--kw-secondary) !important;
}

/* --- Topbar left: welcome block --- */
.topbar-welcome {
    list-style: none;
    padding: 6px 14px;
    margin-inline-start: 8px;
    line-height: 1.25;
}
.topbar-welcome-greeting {
    font-size: 0.95rem;
    color: var(--kw-secondary);
    font-weight: 500;
}
.topbar-welcome-greeting strong {
    color: var(--kw-primary);
    font-weight: 700;
}
.topbar-welcome-date {
    font-size: 0.75rem;
    color: var(--kw-text-muted);
    margin-top: 2px;
}

/* --- Topbar right: shared icon button look --- */
.header-nav .nav-item {
    list-style: none;
}
.header-nav .nav-link.topbar-icon-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--kw-secondary) !important;
    background: var(--kw-surface);
    margin: 0 4px;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    position: relative;
}
.header-nav .nav-link.topbar-icon-btn:hover {
    background: var(--kw-primary-light);
    color: var(--kw-primary) !important;
    transform: translateY(-1px);
}
.header-nav .nav-link.topbar-icon-btn i {
    font-size: 1.1rem;
}

/* Language switcher — pill */
.header-nav .nav-link.lang-switch {
    width: auto;
    min-width: 44px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--kw-primary-light);
    color: var(--kw-primary) !important;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 0 12px;
    margin: 0 6px;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}
.header-nav .nav-link.lang-switch:hover {
    background: var(--kw-primary);
    color: #fff !important;
    border-color: var(--kw-primary);
}

/* --- User menu --- */
.user-menu .user-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--kw-surface);
    color: var(--kw-secondary) !important;
    margin: 0 6px;
    border: 1px solid var(--kw-border);
    transition: background 0.15s ease, border-color 0.15s ease;
}
.user-menu .user-menu-toggle:hover,
.user-menu.show .user-menu-toggle {
    background: #fff;
    border-color: var(--kw-primary);
}
.user-menu .user-avatar {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--kw-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.user-menu .user-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
.user-menu .user-avatar-fallback {
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
}
.user-menu .user-meta {
    line-height: 1.15;
}
.user-menu .user-meta-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--kw-secondary);
}
.user-menu .user-meta-role {
    font-size: 0.7rem;
    color: var(--kw-text-muted);
    margin-top: 2px;
}
.user-menu .user-menu-caret {
    font-size: 0.7rem;
    color: var(--kw-text-muted);
    transition: transform 0.2s ease;
}
.user-menu.show .user-menu-caret {
    transform: rotate(180deg);
}

/* User dropdown menu */
.user-menu-dropdown {
    min-width: 240px;
    padding: 0;
    border: 1px solid var(--kw-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    margin-top: 8px;
}
.user-menu-dropdown .user-menu-header {
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--kw-primary) 0%, var(--kw-primary-hover) 100%);
    color: #fff;
}
.user-menu-dropdown .user-menu-header-name {
    font-weight: 700;
    font-size: 0.95rem;
}
.user-menu-dropdown .user-menu-header-email {
    font-size: 0.78rem;
    opacity: 0.85;
    margin-top: 2px;
    word-break: break-all;
}
.user-menu-dropdown .dropdown-item {
    padding: 10px 16px;
    font-size: 0.88rem;
    color: var(--kw-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-menu-dropdown .dropdown-item i {
    font-size: 1rem;
    color: var(--kw-text-muted);
    width: 18px;
    text-align: center;
}
.user-menu-dropdown .dropdown-item:hover {
    background: var(--kw-surface);
    color: var(--kw-primary);
}
.user-menu-dropdown .dropdown-item:hover i {
    color: var(--kw-primary);
}
.user-menu-dropdown .user-menu-logout:hover {
    background: #fef2f2;
    color: var(--kw-danger);
}
.user-menu-dropdown .user-menu-logout:hover i {
    color: var(--kw-danger);
}
.user-menu-dropdown .dropdown-divider {
    margin: 0;
    border-color: var(--kw-border);
}

/* RTL: keep meta block aligned correctly inside the pill */
html[dir="rtl"] .user-menu .user-meta {
    text-align: right;
}

/* =================================================================
   RTL fixes — number inputs & DataTable controls
   ================================================================= */
html[dir="rtl"] input[type="number"],
html[dir="rtl"] select,
html[dir="rtl"] .form-select,
html[dir="rtl"] .dataTables_length input,
html[dir="rtl"] .dataTables_length select {
    direction: rtl;
    text-align: right;
}

/* DataTable "items per page" wrapper */
html[dir="rtl"] .dataTables_length,
html[dir="rtl"] .dataTables_filter,
html[dir="rtl"] .dataTables_info,
html[dir="rtl"] .dataTables_paginate {
    direction: rtl;
    text-align: right;
}
html[dir="rtl"] .dataTables_length label,
html[dir="rtl"] .dataTables_filter label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* =================================================================
   Bilingual fields (AR + EN side by side)
   ================================================================= */
.bilingual-field-header {
    width: 100%;
    margin: 1rem 0 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, var(--kw-primary) 0%, var(--kw-primary-hover) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(8, 145, 178, 0.18);
}
.bilingual-field {
    margin-bottom: 0.75rem;
}
.bilingual-field label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--kw-secondary);
    margin-bottom: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.bilingual-field-ar label::before {
    content: 'AR';
    background: var(--kw-primary-light);
    color: var(--kw-primary);
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0.05em;
}
.bilingual-field-en label::before {
    content: 'EN';
    background: #ecfeff;
    color: #0e7490;
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0.05em;
}
.bilingual-field-ar input,
.bilingual-field-ar textarea {
    direction: rtl;
    text-align: right;
}
.bilingual-field-en input,
.bilingual-field-en textarea {
    direction: ltr;
    text-align: left;
}
