/**
 * Main Stylesheet - Modern RTL/LTR Support
 * Black, White, Gray Color Scheme
 */

/* WhatsApp Button Styles */
.whatsapp-btn {
    background-color: #25D366 !important;
    border-color: #25D366 !important;
    color: white !important;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.whatsapp-btn:hover {
    background-color: #20BA5A !important;
    border-color: #20BA5A !important;
    color: white !important;
    transform: scale(1.05);
}

.whatsapp-btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(37, 211, 102, 0.25);
}

.whatsapp-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s;
}

.whatsapp-link:hover {
    transform: scale(1.2);
}

.whatsapp-link i {
    transition: all 0.2s;
}

.whatsapp-link:hover i {
    filter: brightness(1.1);
}

/* Email link styles */
a[href^="mailto:"] {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a[href^="mailto:"]:hover {
    color: var(--info-color);
    text-decoration: underline;
}

:root {
    --primary-color: #000000;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #374151;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --text-color: #111827;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow: 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);
    --hover-bg: #f3f4f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    direction: ltr;
    font-size: 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* Arabic font - Cairo */
html[lang="ar"] body {
    font-family: 'Cairo', sans-serif;
}

/* Ensure FontAwesome icons are NOT affected by Cairo font in Arabic */
html[lang="ar"] body .fas,
html[lang="ar"] body .far,
html[lang="ar"] body .fab,
html[lang="ar"] body .fal,
html[lang="ar"] body .fad,
html[lang="ar"] body i.fas,
html[lang="ar"] body i.far,
html[lang="ar"] body i.fab,
html[lang="ar"] body i.fal,
html[lang="ar"] body i.fad,
html[lang="ar"] body [class*="fa-"],
html[lang="ar"] body [class^="fa-"],
html[lang="ar"] body i[class*="fa-"],
html[lang="ar"] body i[class^="fa-"] {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Pro", "Font Awesome 5 Brands" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html[lang="ar"] body p,
html[lang="ar"] body span:not([class*="fa"]):not(i),
html[lang="ar"] body div:not([class*="fa"]),
html[lang="ar"] body h1,
html[lang="ar"] body h2,
html[lang="ar"] body h3,
html[lang="ar"] body h4,
html[lang="ar"] body h5,
html[lang="ar"] body h6,
html[lang="ar"] body a:not([class*="fa"]),
html[lang="ar"] body label,
html[lang="ar"] body input,
html[lang="ar"] body textarea,
html[lang="ar"] body select,
html[lang="ar"] body button:not([class*="fa"]),
html[lang="ar"] body td,
html[lang="ar"] body th,
html[lang="ar"] body li {
    font-family: 'Cairo', sans-serif;
}

body.rtl {
    direction: rtl;
    font-family: 'Rubik', sans-serif;
}

/* Ensure Arabic uses Cairo even in RTL */
html[lang="ar"] body.rtl {
    font-family: 'Cairo', sans-serif;
}

html[lang="ar"] body.rtl p,
html[lang="ar"] body.rtl span:not([class*="fa"]):not(i),
html[lang="ar"] body.rtl div:not([class*="fa"]),
html[lang="ar"] body.rtl h1,
html[lang="ar"] body.rtl h2,
html[lang="ar"] body.rtl h3,
html[lang="ar"] body.rtl h4,
html[lang="ar"] body.rtl h5,
html[lang="ar"] body.rtl h6,
html[lang="ar"] body.rtl a:not([class*="fa"]),
html[lang="ar"] body.rtl label,
html[lang="ar"] body.rtl input,
html[lang="ar"] body.rtl textarea,
html[lang="ar"] body.rtl select,
html[lang="ar"] body.rtl button:not([class*="fa"]),
html[lang="ar"] body.rtl td,
html[lang="ar"] body.rtl th,
html[lang="ar"] body.rtl li {
    font-family: 'Cairo', sans-serif;
}

/* Ensure FontAwesome icons always use their own font */
.fas, .far, .fab, .fal, .fad,
i.fas, i.far, i.fab, i.fal, i.fad,
i[class*="fa-"],
i[class^="fa "],
[class*=" fa-"],
.table i,
.table .fas,
.table .far,
.table .fab,
.table td i,
.table th i,
.table button i,
.table a i {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure FontAwesome icons in Arabic mode are NOT affected by Cairo font */
html[lang="ar"] .fas,
html[lang="ar"] .far,
html[lang="ar"] .fab,
html[lang="ar"] .fal,
html[lang="ar"] .fad,
html[lang="ar"] i.fas,
html[lang="ar"] i.far,
html[lang="ar"] i.fab,
html[lang="ar"] i.fal,
html[lang="ar"] i.fad,
html[lang="ar"] i[class*="fa-"],
html[lang="ar"] i[class^="fa "],
html[lang="ar"] [class*=" fa-"],
html[lang="ar"] .table i,
html[lang="ar"] .table .fas,
html[lang="ar"] .table .far,
html[lang="ar"] .table .fab,
html[lang="ar"] .table td i,
html[lang="ar"] .table th i,
html[lang="ar"] .table button i,
html[lang="ar"] .table a i,
html[lang="ar"] body.rtl .fas,
html[lang="ar"] body.rtl .far,
html[lang="ar"] body.rtl .fab,
html[lang="ar"] body.rtl i.fas,
html[lang="ar"] body.rtl i.far,
html[lang="ar"] body.rtl i.fab,
html[lang="ar"] body.rtl i[class*="fa-"],
html[lang="ar"] body.rtl .table i,
html[lang="ar"] body.rtl .table td i,
html[lang="ar"] body.rtl .table th i {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-block !important;
}

/* RTL text alignment - but not for buttons and specific elements */
body.rtl {
    text-align: right;
}

body.rtl .card,
body.rtl .form-group,
body.rtl .table-container,
body.rtl p,
body.rtl div:not(.btn):not(.card-header):not(.modal-header):not(.nav-container):not(.nav-menu) {
    text-align: right;
}

body.rtl .btn,
body.rtl button,
body.rtl input[type="submit"],
body.rtl input[type="button"] {
    text-align: center;
}

/* Navbar */
.navbar {
    background: var(--card-bg);
    box-shadow: var(--shadow-md);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    min-height: 70px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.mobile-menu-toggle:hover {
    background-color: var(--hover-bg);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

.nav-brand i {
    font-size: 1.5rem;
}

.nav-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

.nav-menu {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    flex: 1;
    justify-content: center;
}

/* RTL: Reverse menu items order so Dashboard appears first on right */
body.rtl .nav-menu {
    flex-direction: row-reverse;
}

.nav-link {
    padding: 0.75rem 1.25rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-link:hover {
    background-color: var(--hover-bg);
    color: var(--primary-color);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
}

.nav-link.active:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    opacity: 0.9;
}

.nav-link i {
    font-size: 1rem;
}

.nav-user {
    position: relative;
    margin-left: auto;
}

body.rtl .nav-user {
    margin-left: 0;
    margin-right: auto;
}

.user-menu {
    position: relative;
}

.user-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
    font-weight: 500;
    color: var(--text-color);
}

.user-name-text {
    display: inline;
}

@media (max-width: 768px) {
    .user-name-text {
        display: none;
    }
}

.user-name-text {
    display: inline;
}

@media (max-width: 768px) {
    .user-name-text {
        display: none;
    }
}

.user-name:hover {
    background-color: var(--hover-bg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--card-bg);
    box-shadow: var(--shadow-lg);
    border-radius: 0.5rem;
    min-width: 180px;
    display: none;
    border: 1px solid var(--border-color);
    overflow: visible;
    z-index: 100;
}

.user-dropdown > a {
    overflow: hidden;
    border-radius: 0;
}

.user-dropdown > a:first-child {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.user-dropdown > a:last-child {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

body.rtl .user-dropdown {
    left: 0;
    right: auto;
}

.user-menu {
    position: relative;
}

.user-menu-arrow {
    font-size: 0.7rem;
    margin-left: 0.5rem;
    transition: transform 0.2s;
}

body.rtl .user-menu-arrow {
    margin-left: 0;
    margin-right: 0.5rem;
}

.user-menu.open .user-menu-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    pointer-events: auto;
}

.user-menu.open .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--border-light);
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background-color: var(--hover-bg);
}

/* Language Menu */
.language-menu {
    position: relative;
}

.language-toggle {
    position: relative;
}

.language-arrow {
    font-size: 0.7rem;
    margin-left: auto;
    transition: transform 0.2s;
}

body.rtl .language-arrow {
    transform: rotate(180deg);
}

.language-menu:hover .language-arrow {
    transform: rotate(90deg);
}

body.rtl .language-menu:hover .language-arrow {
    transform: rotate(-90deg);
}

.language-submenu {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% - 0.25rem);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    min-width: 120px;
    z-index: 201;
    overflow: hidden;
    padding-top: 0.5rem;
    padding-bottom: 0.25rem;
}

body.rtl .language-submenu {
    left: auto;
    right: 0;
}

.user-dropdown .language-menu:hover .language-submenu {
    display: block;
}

.language-menu:hover .language-submenu {
    display: block;
}

.language-submenu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s;
}

.language-submenu a:last-child {
    border-bottom: none;
}

.language-submenu a:hover {
    background-color: var(--hover-bg);
}

.language-submenu a.active {
    background-color: var(--hover-bg);
    color: var(--primary-color);
    font-weight: 600;
}

/* Mobile Language Menu */
.mobile-language-menu {
    position: relative;
}

.mobile-language-submenu {
    display: none;
    background: var(--bg-color);
    padding-left: 1rem;
}

.mobile-language-submenu a.active {
    background-color: var(--hover-bg);
    color: var(--primary-color);
    font-weight: 600;
}

/* Main Content */
.main-content {
    width: 100%;
    margin: 2.5rem auto;
    padding: 0 2rem;
    flex: 1;
    box-sizing: border-box;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid var(--border-light);
}

.card-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1f1f1f;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.85rem;
}

/* Action buttons container - consistent spacing */
.action-buttons-container {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    justify-content: center;
    min-width: 0;
}

/* Ensure action buttons stay on one line in mobile */
@media (max-width: 768px) {
    .action-buttons-container {
        flex-wrap: nowrap !important;
        gap: 0.25rem;
        overflow: visible;
    }
    
    .action-buttons-container .action-btn {
        flex-shrink: 0;
        min-width: 36px;
        padding: 0.375rem 0.5rem;
    }
}

/* Action buttons in tables - consistent spacing */
.table td .action-buttons-container,
table.dataTable td .action-buttons-container {
    gap: 0.5rem;
}

.table td .action-btn,
table.dataTable td .action-btn {
    margin: 0 !important;
    flex-shrink: 0;
    min-width: auto;
}

/* Legacy support - keep old styles but override for action-buttons-container */
.table td .btn,
table.dataTable td .btn {
    margin: 0 0.25rem;
}

.table td .action-buttons-container .btn,
table.dataTable td .action-buttons-container .btn {
    margin: 0 !important;
}

.table td .btn:first-child,
table.dataTable td .btn:first-child {
    margin-left: 0;
}

.table td .btn:last-child,
table.dataTable td .btn:last-child {
    margin-right: 0;
}

body.rtl .table td .btn:first-child,
body.rtl table.dataTable td .btn:first-child {
    margin-right: 0;
    margin-left: 0.25rem;
}

body.rtl .table td .btn:last-child,
body.rtl table.dataTable td .btn:last-child {
    margin-left: 0;
    margin-right: 0.25rem;
}

/* Better spacing for action buttons */
.table td,
table.dataTable td {
    white-space: nowrap;
}

.table td .btn + .btn,
table.dataTable td .btn + .btn {
    margin-left: 0.5rem;
}

.table td .action-buttons-container .btn + .btn,
table.dataTable td .action-buttons-container .btn + .btn {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.rtl .table td .btn + .btn,
body.rtl table.dataTable td .btn + .btn {
    margin-left: 0;
    margin-right: 0.5rem;
}

body.rtl .table td .action-buttons-container .btn + .btn,
body.rtl table.dataTable td .action-buttons-container .btn + .btn {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-label .required-indicator {
    color: var(--danger-color);
    margin-left: 0.25rem;
    font-size: 0.85rem;
    vertical-align: middle;
}

body.rtl .form-label .required-indicator {
    margin-left: 0;
    margin-right: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: var(--card-bg);
    color: var(--text-color);
}

.form-control[readonly],
.form-control:read-only {
    background-color: #e9ecef !important;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Native select elements - hide default browser arrow */
select.form-control:not([data-searchable-initialized]) {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

body.rtl select.form-control:not([data-searchable-initialized]) {
    background-position: left 0.75rem center;
    padding-right: 1rem;
    padding-left: 2.5rem;
}

/* Hide searchable dropdown original select completely */
select.form-control[data-searchable-initialized] {
    display: none !important;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Invalid input styles */
.form-control.is-invalid,
.employee-date-input.is-invalid {
    border-color: #ef4444 !important;
    background-color: #fef2f2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-control.is-invalid:focus,
.employee-date-input.is-invalid:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Date input error message */
.date-input-error {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modern date input styling */
.employee-date-input {
    transition: all 0.2s ease;
}

.employee-date-input:hover:not(:disabled) {
    border-color: var(--primary-color);
}

.employee-date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.employee-date-input:hover::-webkit-calendar-picker-indicator {
    opacity: 1;
}

/* Modern Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin-right: 0.75rem;
    vertical-align: middle;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

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

.toggle-switch:hover .toggle-slider {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

input:checked + .toggle-slider:hover {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15);
}

/* RTL Support for Toggle */
body.rtl .toggle-switch {
    margin-right: 0;
    margin-left: 0.75rem;
}

body.rtl .toggle-slider:before {
    left: auto;
    right: 3px;
}

body.rtl input:checked + .toggle-slider:before {
    transform: translateX(-24px);
    right: 3px;
    left: auto;
}

/* Option Selector Styles */
.option-selector {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.625rem;
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.option-item:hover {
    border-color: var(--primary-color);
    background: var(--hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.option-item.active {
    border-color: var(--primary-color);
    background: var(--hover-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.option-indicator {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.option-content i {
    font-size: 1.1rem;
    color: var(--text-color);
}

.option-content span {
    font-weight: 500;
    color: var(--text-color);
}

.option-check {
    font-size: 1rem;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s;
}

.option-item.active .option-check {
    opacity: 1;
}

/* Priority Colors */
.option-indicator.priority-low {
    background-color: #10b981;
}

.option-indicator.priority-medium {
    background-color: #f59e0b;
}

.option-indicator.priority-high {
    background-color: #ef4444;
}

.option-indicator.priority-urgent {
    background-color: #dc2626;
}

/* Status Colors */
.option-indicator.status-pending {
    background-color: #6b7280;
}

.option-indicator.status-in-progress {
    background-color: #3b82f6;
}

.option-indicator.status-completed {
    background-color: #10b981;
}

/* RTL Support */
body.rtl .option-item {
    flex-direction: row-reverse;
}

body.rtl .option-content {
    flex-direction: row-reverse;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* Native select elements - only style non-searchable selects */
select.form-control:not([data-searchable-initialized]) {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

body.rtl select.form-control:not([data-searchable-initialized]) {
    background-position: left 0.75rem center;
    padding-right: 1rem;
    padding-left: 2.5rem;
}

/* Hide searchable dropdown original selects completely */
select.form-control[data-searchable-initialized] {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

body.rtl .table th,
body.rtl .table td {
    text-align: right;
}

.table th {
    background-color: var(--bg-color);
    font-weight: 700;
    color: var(--text-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.table tr:hover {
    background-color: var(--hover-bg);
}

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

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Old status badges (kept for backward compatibility) */
.badge-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-in-progress {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-completed {
    background-color: #d1fae5;
    color: #065f46;
}

/* New status badges */
.badge-interested {
    background-color: #8b5cf6;
    color: white;
}

.badge-new-customer {
    background-color: #3b82f6;
    color: white;
}

.badge-preparing-documents {
    background-color: #f59e0b;
    color: white;
}

.badge-in-process-submission {
    background-color: #06b6d4;
    color: white;
}

.badge-submitted-registrar {
    background-color: #6366f1;
    color: white;
}

.badge-completions-sent {
    background-color: #14b8a6;
    color: white;
}

.badge-approved {
    background-color: #10b981;
    color: white;
}

.badge-withdrawn {
    background-color: #6b7280;
    color: white;
}

.badge-rejected {
    background-color: #ef4444;
    color: white;
}

.badge-low {
    background-color: #f3f4f6;
    color: #374151;
}

.badge-medium {
    background-color: #e5e7eb;
    color: #1f2937;
}

.badge-high {
    background-color: #d1d5db;
    color: #111827;
}

.badge-urgent {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Search & Filters */
.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 250px;
}

.filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

body.rtl .filter-group {
    flex-direction: row-reverse;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(2px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 2.5rem;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

/* Confirmation Modal Specific Styles */
#confirmModal .modal-content,
#alertModal .modal-content {
    max-width: 500px;
}

#confirmModal .modal-header,
#alertModal .modal-header {
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

#confirmModal .modal-title {
    color: var(--danger-color);
    font-size: 1.5rem;
}

#alertModal .modal-title {
    font-size: 1.5rem;
    font-weight: 600;
}

#confirmModalMessage,
#alertModalMessage {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
}

#confirmModalBtn,
#alertModalBtn {
    min-width: 100px;
}

#confirmModalCancelBtn {
    min-width: 100px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid var(--border-light);
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: var(--hover-bg);
    color: var(--text-color);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
    font-weight: 500;
}

body.rtl .alert {
    border-left: none;
    border-right: 4px solid;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-color: var(--success-color);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: var(--danger-color);
}

.alert-info {
    background-color: #e5e7eb;
    color: #1f2937;
    border-color: var(--info-color);
}

/* Task Details Modal Styles */
.task-details-container {
    padding: 0;
}

.task-details-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-light);
}

.task-details-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.task-details-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.task-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.625rem;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.task-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.task-badge i {
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Blinking animation for urgent/high priority and in_progress status */
.badge-blinking i {
    animation: badgePulse 1.5s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Enhanced badge styles for different statuses */
.task-badge-status {
    min-width: 120px;
    justify-content: center;
}

.task-badge-priority {
    min-width: 100px;
    justify-content: center;
}

/* Status-specific enhancements */
.task-badge-status[style*="interested"] {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
}

.task-badge-status[style*="new_customer"] {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

.task-badge-status[style*="preparing_documents"] {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.task-badge-status[style*="in_process_submission"] {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.task-badge-status[style*="submitted_registrar"] {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
}

.task-badge-status[style*="completions_sent"] {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%) !important;
}

.task-badge-status[style*="approved"] {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.task-badge-status[style*="withdrawn"] {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
}

.task-badge-status[style*="rejected"] {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

/* Priority-specific enhancements */
.task-badge-priority[style*="low"] {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.task-badge-priority[style*="medium"] {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.task-badge-priority[style*="high"] {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.task-badge-priority[style*="urgent"] {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
    animation: urgentGlow 2s ease-in-out infinite;
}

@keyframes urgentGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(220, 38, 38, 0.6);
    }
}

.task-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.task-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-color);
    border-radius: 0.75rem;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}

.task-info-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.task-info-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #333);
    color: white;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.task-info-content {
    flex: 1;
    min-width: 0;
}

.task-info-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-info-value {
    font-size: 1rem !important;
    color: var(--text-color);
    font-weight: 600;
    word-break: break-word;
    text-align: left;
    margin: 0;
    padding: 0;
}

.task-info-value * {
    font-size: 1rem !important;
}

.task-info-value .badge {
    font-size: 1rem !important;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 600;
    padding: 0;
}

body.rtl .task-info-value {
    text-align: right;
    margin: 0;
    padding: 0;
}

body.rtl .task-info-value * {
    font-size: 1rem !important;
}

body.rtl .task-info-value .badge {
    font-size: 1rem !important;
    padding: 0;
}

.task-details-section {
    margin-bottom: 2rem;
}

.task-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 1.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light);
}

.task-section-title i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.task-description {
    padding: 1.25rem;
    background: var(--bg-color);
    border-radius: 0.75rem;
    border: 1px solid var(--border-light);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 0.95rem;
    text-align: left;
    margin: 0;
}

body.rtl .task-description {
    text-align: right;
    padding: 1.25rem;
    margin: 0;
}

.task-timeline {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

body.rtl .task-timeline {
    padding-left: 0;
    padding-right: 2rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    padding-left: 2rem;
}

body.rtl .timeline-item {
    padding-left: 0;
    padding-right: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -0.5rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--card-bg);
    box-shadow: 0 0 0 2px var(--primary-color);
    z-index: 1;
}

body.rtl .timeline-marker {
    left: auto;
    right: -0.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.25rem;
    top: 1rem;
    bottom: -1.5rem;
    width: 2px;
    background: var(--border-light);
}

body.rtl .timeline-item::before {
    left: auto;
    right: -0.25rem;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.2s;
}

.timeline-content:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.timeline-note {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    white-space: pre-wrap;
}

.timeline-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.timeline-meta i {
    font-size: 0.8rem;
}

.timeline-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.timeline-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.task-add-note {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-light);
}

.task-add-note .form-group {
    margin-bottom: 1rem;
}

/* RTL adjustments for task details */
body.rtl .task-info-item {
    flex-direction: row-reverse;
}

body.rtl .task-info-content {
    text-align: right;
    flex: 1;
}

body.rtl .task-info-label {
    text-align: right;
}

body.ltr .task-info-content {
    text-align: left;
    flex: 1;
}

body.ltr .task-info-label {
    text-align: left;
}

body.rtl .task-section-title {
    flex-direction: row-reverse;
    text-align: right;
    justify-content: flex-end;
}

body.rtl .task-details-badges {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 2.5rem 2rem;
    margin-top: auto;
    border-top: 2px solid var(--primary-color);
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.footer-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    display: block;
    margin-bottom: 0.75rem;
    opacity: 1;
    visibility: visible;
    background: transparent;
    border-radius: 8px;
    /* Remove filter to show logo naturally - if logo needs to be white, upload a white version */
    filter: none;
}

.footer-content p {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    letter-spacing: 0.5px;
}

body.rtl .footer-content {
    text-align: center;
}

/* Footer responsive */
@media (max-width: 768px) {
    .footer {
        padding: 2rem 1rem;
    }
    
    .footer-content p {
        font-size: 0.85rem;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        padding: 0 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
}

/* Task Alert Notification */
.task-alert {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    max-width: 600px;
    width: calc(100% - 2rem);
    animation: slideDownAlert 0.3s ease;
}

body.rtl .task-alert {
    left: auto;
    right: 50%;
    transform: translateX(50%);
}

@keyframes slideDownAlert {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

body.rtl @keyframes slideDownAlert {
    from {
        opacity: 0;
        transform: translateX(50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(50%) translateY(0);
    }
}

.task-alert-content {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.task-alert-icon {
    font-size: 1.75rem;
    color: white;
}

.task-alert-text {
    flex: 1;
}

.task-alert-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.task-alert-text p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.95;
}

.task-alert-actions {
    display: flex;
    gap: 0.5rem;
}

.task-alert-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.task-alert-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .task-alert {
        top: 70px;
        width: calc(100% - 1rem);
    }
    
    .task-alert-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .task-alert-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Mobile Sidebar - Modern Redesign */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: linear-gradient(180deg, var(--card-bg) 0%, #ffffff 100%);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    direction: ltr;
    font-family: 'Rubik', sans-serif;
}

html[lang="ar"] .mobile-sidebar {
    font-family: 'Cairo', sans-serif !important;
}

/* Apply Cairo font to text elements but NOT to FontAwesome icons */
html[lang="ar"] .mobile-sidebar span,
html[lang="ar"] .mobile-sidebar a:not([class*="fa"]):not(i),
html[lang="ar"] .mobile-sidebar div:not([class*="fa"]):not(i),
html[lang="ar"] .mobile-sidebar button:not([class*="fa"]):not(i),
html[lang="ar"] .mobile-sidebar p,
html[lang="ar"] .mobile-sidebar label {
    font-family: 'Cairo', sans-serif !important;
}

/* Ensure FontAwesome icons use their own font */
.mobile-sidebar i:not(.mobile-user-icon i):not(.mobile-user-info i),
.mobile-sidebar .fas,
.mobile-sidebar .far,
.mobile-sidebar .fal,
.mobile-sidebar .fab,
.mobile-sidebar .fa,
.mobile-sidebar [class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-block !important;
}

/* Special handling for mobile-user-info icon */
.mobile-user-icon i.fas,
.mobile-user-icon i[class*="fa-"],
.mobile-user-icon i.fa-user {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    color: black !important;
}

/* Ensure FontAwesome icons are visible in Arabic mode */
html[lang="ar"] .mobile-sidebar i:not(.mobile-user-icon i):not(.mobile-user-info i),
html[lang="ar"] .mobile-sidebar .fas,
html[lang="ar"] .mobile-sidebar .far,
html[lang="ar"] .mobile-sidebar .fab {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: inline-block !important;
}

/* Special handling for mobile-user-info icon in Arabic mode */
html[lang="ar"] .mobile-user-icon i,
html[lang="ar"] .mobile-user-icon i.fas,
html[lang="ar"] .mobile-user-icon i[class*="fa-"],
html[lang="ar"] .mobile-user-icon i.fa-user {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    color: black !important;
}

body.rtl .mobile-sidebar {
    left: auto;
    right: -320px;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    direction: rtl;
}

.mobile-sidebar.active {
    transform: translateX(320px);
}

body.rtl .mobile-sidebar.active {
    transform: translateX(-320px);
}

.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Modern Header */
.mobile-sidebar-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%) !important;
    background-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    position: relative !important;
    z-index: 10000 !important;
    flex-shrink: 0 !important;
    min-height: 76px !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
}

body.rtl .mobile-sidebar-header {
    flex-direction: row-reverse;
}

.mobile-sidebar-header > a {
    display: flex !important;
    align-items: center;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    position: relative;
    z-index: 10001 !important;
    flex-shrink: 0;
}

.mobile-sidebar-header > a * {
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.mobile-sidebar-logo {
    width: 44px !important;
    height: 44px !important;
    object-fit: contain;
    display: block !important;
    flex-shrink: 0;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 10001 !important;
    background: transparent;
}

body.rtl .mobile-sidebar-logo {
    order: 2;
}

.mobile-sidebar-close {
    background: rgba(255, 255, 255, 0.2) !important;
    border: none;
    font-size: 1.25rem;
    color: white !important;
    cursor: pointer;
    padding: 0.625rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    width: 2.75rem;
    height: 2.75rem;
    display: flex !important;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 10001 !important;
}

.mobile-sidebar-close i {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Scrollable Menu Container - wraps menu and footer */
.mobile-sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    min-height: 0; /* Important for flex scrolling */
    display: flex !important;
    flex-direction: column;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 1;
}

/* Menu items wrapper */
.mobile-sidebar-menu-items {
    padding: 1rem 0;
    flex-shrink: 0;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    position: relative;
    z-index: 1;
}

.mobile-sidebar-menu-items > .mobile-nav-link {
    flex-shrink: 0;
}

.mobile-sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.mobile-sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.mobile-sidebar-menu::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.mobile-sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Modern Nav Links */
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    margin: 0.25rem 0.75rem;
    border-radius: 0.75rem;
    flex-shrink: 0;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--primary-color);
    border-radius: 0 4px 4px 0;
    transition: height 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.1) 0%, transparent 100%);
    color: var(--primary-color);
    transform: translateX(4px);
    padding-left: 1.75rem;
}

.mobile-nav-link:hover::before,
.mobile-nav-link.active::before {
    height: 60%;
}

.mobile-nav-link i {
    font-size: 1.25rem;
    width: 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: all 0.3s ease;
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
}

.mobile-nav-link:hover i,
.mobile-nav-link.active i {
    color: var(--primary-color);
    transform: scale(1.1);
}

.mobile-nav-link span {
    flex: 1;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* RTL Support for Nav Links */
body.rtl .mobile-nav-link {
    flex-direction: row;
    text-align: right;
    direction: rtl;
}

body.rtl .mobile-nav-link::before {
    left: auto;
    right: 0;
    border-radius: 4px 0 0 4px;
}

body.rtl .mobile-nav-link:hover,
body.rtl .mobile-nav-link.active {
    transform: translateX(-4px);
    padding-left: 1.5rem;
    padding-right: 1.75rem;
    background: linear-gradient(270deg, rgba(var(--primary-rgb), 0.1) 0%, transparent 100%);
}

body.rtl .mobile-nav-link i {
    order: 2;
    margin-right: 0;
    margin-left: 0.5rem;
}

body.rtl .mobile-nav-link span {
    order: 1;
    text-align: right;
}

/* Footer Section - Now scrollable with menu */
.mobile-sidebar-footer {
    border-top: 2px solid var(--border-light);
    padding: 0;
    background: var(--bg-color);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    margin-top: auto; /* Push to bottom */
    min-height: fit-content;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    position: relative;
    z-index: 1;
}

.mobile-user-info {
    padding: 1.25rem 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.875rem !important;
    color: var(--text-color) !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05) 0%, transparent 100%) !important;
    border-bottom: 1px solid var(--border-light) !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 5 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.mobile-user-icon {
    width: 2.5rem !important;
    min-width: 2.5rem !important;
    min-height: 2.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%) !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3) !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

.mobile-user-icon i,
.mobile-user-info i {
    font-size: 1.1rem !important;
    color: black !important;
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    line-height: 1 !important;
    text-align: center !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    width: 100% !important;
    height: 100% !important;
}

/* Force icon content to show */
.mobile-user-icon i.fas.fa-user::before {
    content: "\f007" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: black !important;
}

body.rtl .mobile-user-info {
    flex-direction: row !important;
    text-align: right !important;
    direction: rtl !important;
}

body.rtl .mobile-user-icon {
    order: 1 !important;
    margin-right: 0.875rem !important;
    margin-left: 0 !important;
}

body.rtl .mobile-user-info span {
    order: 2 !important;
    text-align: right !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* Footer Actions */
.mobile-sidebar-actions {
    display: flex !important;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 1;
}

.mobile-sidebar-actions .mobile-nav-link {
    margin: 0 0.75rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
}

.mobile-sidebar-actions .mobile-nav-link:last-child {
    color: #dc3545;
}

.mobile-sidebar-actions .mobile-nav-link:last-child:hover {
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.1) 0%, transparent 100%);
    color: #dc3545;
}

body.rtl .mobile-sidebar-actions .mobile-nav-link:last-child:hover {
    background: linear-gradient(270deg, rgba(220, 53, 69, 0.1) 0%, transparent 100%);
}

/* Language Menu */
.mobile-language-menu {
    position: relative;
}

.mobile-language-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.mobile-language-arrow {
    font-size: 0.75rem;
    margin-left: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
}

body.rtl .mobile-language-arrow {
    margin-left: 0;
    margin-right: auto;
    order: -1;
}

body.rtl .mobile-language-toggle {
    justify-content: flex-end;
    text-align: right;
    direction: rtl;
}

.mobile-language-menu.active .mobile-language-arrow {
    transform: rotate(180deg);
}

.mobile-language-submenu {
    display: none;
    background: rgba(var(--primary-rgb), 0.03);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    animation: slideDown 0.3s ease;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 300px;
    }
}

.mobile-language-menu.active .mobile-language-submenu {
    display: block !important;
}

.mobile-language-submenu .mobile-nav-link {
    padding-left: 3.5rem;
    padding-right: 1.5rem;
    font-size: 0.875rem;
    margin: 0.125rem 0.75rem;
    color: var(--text-color) !important; /* Default text color for all languages */
}

.mobile-language-submenu .mobile-nav-link:not(.active) {
    color: var(--text-color) !important; /* Ensure non-active languages use normal text color */
}

body.rtl .mobile-language-submenu .mobile-nav-link {
    padding-left: 1.5rem;
    padding-right: 3.5rem;
    text-align: right;
    justify-content: flex-end;
    direction: rtl;
}

.mobile-language-submenu .mobile-nav-link.active {
    background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.15) 0%, transparent 100%);
    color: var(--primary-color) !important;
    font-weight: 600;
}

.mobile-language-submenu .mobile-nav-link.active span {
    color: var(--primary-color) !important;
}

body.rtl .mobile-language-submenu .mobile-nav-link.active {
    background: linear-gradient(270deg, rgba(var(--primary-rgb), 0.15) 0%, transparent 100%);
}

.mobile-language-submenu .mobile-nav-link i.fa-check {
    color: var(--primary-color);
    font-weight: 700;
    opacity: 0 !important; /* Hide by default */
    visibility: hidden !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Show checkmark only for active language */
.mobile-language-submenu .mobile-nav-link.active i.fa-check {
    opacity: 1 !important;
    visibility: visible !important;
    width: 1.25rem !important;
    margin-right: 0.5rem !important;
    padding: 0 !important;
}

body.rtl .mobile-language-submenu .mobile-nav-link.active i.fa-check {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .main-content {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .nav-container {
        padding: 0 1rem;
        min-height: 60px;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        order: 0;
        z-index: 100;
        position: relative;
        min-width: 44px;
        min-height: 44px;
    }
    
    body.rtl .mobile-menu-toggle {
        order: 0;
    }
    
    .nav-brand {
        font-size: 1.15rem;
        order: 1;
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }
    
    body.rtl .nav-brand {
        order: 1;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-user {
        order: 2;
        min-width: 0;
    }
    
    body.rtl .nav-user {
        order: 2;
    }
    
    .main-content {
        padding: 0 1rem;
        margin-top: 1.5rem;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .card {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
        min-width: auto;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .table-container {
        font-size: 0.875rem;
        overflow-x: auto;
        width: 100%;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Ensure Bootstrap Table pagination is visible on mobile */
    .table-container .fixed-table-pagination,
    .bootstrap-table .fixed-table-pagination {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }
    
    /* DataTables responsive will handle mobile layout */
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        box-sizing: border-box;
    }
}

/* Admin Tabs - Modern Responsive Design */
.admin-tabs-container {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    overflow-x: hidden;
}

.admin-tabs-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    padding-bottom: 0.5rem;
}

.admin-tabs-wrapper::-webkit-scrollbar {
    height: 4px;
}

.admin-tabs-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.admin-tabs-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.admin-tabs-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.admin-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-light);
    background: var(--bg-light);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
}

.admin-tab-btn:hover {
    background: var(--hover-bg);
    color: var(--text-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.admin-tab-btn i {
    font-size: 1rem;
}

.admin-tab-btn span {
    display: inline-block;
}

@media (max-width: 480px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .main-content {
        padding: 0 0.75rem;
        overflow-x: hidden;
    }
    
    .nav-container {
        padding: 0.75rem 1rem;
        max-width: 100vw;
    }
    
    .mobile-menu-toggle {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        min-width: 44px;
        min-height: 44px;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card-value {
        font-size: 1.75rem;
    }
    
    .chart-card {
        padding: 0.75rem;
    }
    
    .bar-chart {
        gap: 0.2rem;
        padding: 0 0.2rem;
    }
    
    .bar {
        max-width: 35px;
        min-width: 25px;
    }
    
    .bar-label {
        font-size: 0.6rem;
    }
    
    /* Admin tabs mobile optimization */
    .admin-tabs-container {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .admin-tabs-wrapper {
        gap: 0.5rem;
        padding-bottom: 0.75rem;
    }
    
    .admin-tab-btn {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
    
    .admin-tab-btn i {
        font-size: 0.9rem;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center {
    text-align: center !important;
}

body.rtl .text-center {
    text-align: center !important;
}

/* Empty table messages - always centered */
.table td.text-center {
    text-align: center !important;
}

body.rtl .table td.text-center {
    text-align: center !important;
}

/* Modern DataTables Styling - Complete Redesign */
.dataTables_wrapper {
    padding: 1.5rem 0;
    font-family: 'Rubik', sans-serif;
}

html[lang="ar"] .dataTables_wrapper,
html[lang="ar"] .dataTables_wrapper * {
    font-family: 'Cairo', sans-serif !important;
}

.dataTables_wrapper .row {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 0;
    padding: 0.75rem 0;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
    margin: 0;
    white-space: nowrap;
}

.dataTables_wrapper .dataTables_length select {
    padding: 0.625rem 2.5rem 0.625rem 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
}

.dataTables_wrapper .dataTables_length select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.dataTables_wrapper .dataTables_length select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.dataTables_wrapper .dataTables_filter {
    margin-left: auto;
    margin-right: 0;
}

.dataTables_wrapper .dataTables_filter input {
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 280px;
    min-width: 200px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.dataTables_wrapper .dataTables_info {
    padding: 1rem 0;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0;
    border: 2px solid var(--border-color);
    border-radius: 0.625rem;
    background: var(--card-bg);
    color: var(--text-color) !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    min-width: 42px;
    height: 42px;
    position: relative;
    overflow: hidden;
    margin: 0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button a {
    padding: 0.625rem 1rem;
    border: none !important;
    border-radius: 0.625rem;
    background: transparent !important;
    color: var(--text-color) !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.dataTables_wrapper .dataTables_paginate .paginate_button span,
.dataTables_wrapper .dataTables_paginate .paginate_button {
    position: relative;
    z-index: 1;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.4);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current)::before {
    opacity: 1;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
    border-color: var(--primary-color);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
    transform: scale(1.05);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current a {
    color: white !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--bg-color);
    border-color: var(--border-light);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Remove Bootstrap page-item borders if present */
.dataTables_wrapper .dataTables_paginate .page-item,
.dataTables_wrapper .dataTables_paginate .page-item .page-link {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.dataTables_wrapper .dataTables_processing {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    font-size: 1rem;
    border: none;
}

table.dataTable {
    border-collapse: separate;
    border-spacing: 0;
    width: 100% !important;
    margin-top: 1rem;
}

table.dataTable thead th {
    background: linear-gradient(to bottom, var(--bg-color), #f8f9fa);
    font-weight: 700;
    color: var(--text-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 3px solid var(--border-color);
    padding: 1.25rem 1rem;
    position: relative;
    white-space: nowrap;
}

table.dataTable tbody td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

table.dataTable tbody tr {
    transition: all 0.2s ease;
}

table.dataTable tbody tr:hover {
    background-color: var(--hover-bg);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

/* RTL Support for DataTables */
body.rtl .dataTables_wrapper {
    direction: rtl;
    text-align: right;
}

body.rtl .dataTables_wrapper .row {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

body.rtl .dataTables_wrapper .dataTables_length {
    margin-right: auto !important;
    margin-left: 0 !important;
    order: 2;
    text-align: right !important;
    direction: rtl !important;
}

body.rtl .dataTables_wrapper .dataTables_filter {
    margin-left: 0 !important;
    margin-right: 0 !important;
    order: 1;
    text-align: right !important;
    direction: rtl !important;
}

body.rtl .dataTables_wrapper .dataTables_length label,
body.rtl .dataTables_wrapper .dataTables_filter label {
    text-align: right !important;
    direction: rtl !important;
    justify-content: flex-end !important;
}

body.rtl .dataTables_wrapper .dataTables_info {
    text-align: right !important;
    direction: rtl !important;
    margin-right: 0 !important;
    margin-left: auto !important;
    float: right !important;
}

body.rtl .dataTables_wrapper .dataTables_paginate {
    text-align: right !important;
    direction: rtl !important;
    justify-content: flex-end !important;
    float: left !important;
}

body.rtl .dataTables_wrapper .dataTables_length select {
    margin: 0 0 0 0.5rem;
    padding-right: 2.5rem;
    padding-left: 0.875rem;
    background-position: left 0.75rem center;
}

body.rtl .dataTables_wrapper .dataTables_filter input {
    margin-right: 0.5rem;
    margin-left: 0;
    padding-right: 2.75rem;
    padding-left: 1rem;
    text-align: right;
}

body.rtl .dataTables_wrapper .dataTables_filter label {
    flex-direction: row-reverse;
}

body.rtl .dataTables_wrapper .dataTables_length label {
    flex-direction: row-reverse;
}

body.rtl .dataTables_wrapper .dataTables_paginate {
    justify-content: flex-end;
    text-align: right;
}

body.rtl .dataTables_wrapper .dataTables_paginate .paginate_button {
    margin-right: 0;
    margin-left: 0;
}

body.rtl table.dataTable thead th,
body.rtl table.dataTable tbody td {
    text-align: right;
}

body.rtl table.dataTable thead th.sorting:before,
body.rtl table.dataTable thead th.sorting_asc:before,
body.rtl table.dataTable thead th.sorting_desc:before {
    left: auto;
    right: 0.75rem;
}

body.rtl table.dataTable thead th.sorting:after,
body.rtl table.dataTable thead th.sorting_asc:after,
body.rtl table.dataTable thead th.sorting_desc:after {
    left: auto;
    right: 0.75rem;
}

/* Responsive DataTables - Mobile */
@media screen and (max-width: 767px) {
    .dataTables_wrapper {
        padding: 1rem 0;
    }
    
    .dataTables_wrapper .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        width: 100%;
        margin-bottom: 0;
    }
    
    .dataTables_wrapper .dataTables_length label,
    .dataTables_wrapper .dataTables_filter label {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    body.rtl .dataTables_wrapper .dataTables_length label,
    body.rtl .dataTables_wrapper .dataTables_filter label {
        align-items: flex-end;
    }
    
    .dataTables_wrapper .dataTables_length select,
    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        min-width: 100%;
    }
    
    .dataTables_wrapper .dataTables_info {
        width: 100%;
        text-align: center;
        padding: 0.75rem 0;
        font-size: 0.8rem;
    }
    
    .dataTables_wrapper .dataTables_paginate {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
        gap: 0.25rem;
    }
    
    body.rtl .dataTables_wrapper .dataTables_paginate {
        justify-content: center;
    }
    
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        min-width: 36px;
        height: 36px;
    }
    
    table.dataTable thead th,
    table.dataTable tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    
    table.dataTable thead th {
        font-size: 0.7rem !important;
        padding: 0.875rem 0.5rem;
    }
}

/* Mobile: Reduce all table header font sizes */
@media screen and (max-width: 768px) {
    .table th,
    table th,
    thead th,
    .fixed-table-header table thead th,
    .bootstrap-table table thead th,
    table.dataTable thead th,
    .fixed-table-container table thead th {
        font-size: 0.7rem !important;
    }
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

/* Keep justify-between normal - don't reverse flex direction */

.align-center {
    align-items: center;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

/* Login Page Specific */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
}

.login-card {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.login-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
    margin: 0 auto 1rem;
}

.login-header p {
    color: var(--text-light);
    font-size: 1rem;
}

/* Dashboard Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card h3 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
}

.stat-card p {
    color: var(--text-light);
    font-weight: 500;
    margin: 0;
    font-size: 0.95rem;
}

/* Request ID Suggestions Dropdown */
.request-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 0.25rem;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-color);
    font-size: 0.9rem;
}

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

.suggestion-item:hover,
.suggestion-item.active {
    background: var(--primary-color);
    color: white;
}

.suggestion-item.suggestion-add-new {
    background: var(--hover-bg);
    font-weight: 600;
    color: var(--primary-color);
}

.suggestion-item.suggestion-add-new:hover,
.suggestion-item.suggestion-add-new.active {
    background: var(--primary-color);
    color: white;
}

/* Employee Multi-Select Component */
.employee-multi-select {
    position: relative;
    width: 100%;
}

.employee-select-container {
    position: relative;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
    min-height: 50px;
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    cursor: text;
    transition: all 0.2s ease;
}

.employee-select-container:hover {
    border-color: var(--primary-color);
}

.employee-select-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.employee-selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 0 0 auto;
    min-width: 0;
}

.employee-search-wrapper {
    flex: 1;
    min-width: 200px;
    position: relative;
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.employee-select-container:focus-within .employee-search-wrapper {
    border-color: var(--primary-color);
    background: var(--card-bg);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.employee-search-icon {
    color: var(--text-light);
    margin-right: 0.5rem;
    font-size: 0.9rem;
    pointer-events: none;
}

body.rtl .employee-search-icon {
    margin-right: 0;
    margin-left: 0.5rem;
}

.employee-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.employee-chip-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.employee-chip-remove:hover {
    background: rgba(255, 255, 255, 0.2);
}

.employee-chip-remove i {
    font-size: 0.75rem;
}

.employee-search-input {
    flex: 1;
    min-width: 150px;
    border: none;
    outline: none;
    background: transparent;
    padding: 0;
    font-size: 0.95rem;
    color: var(--text-color);
    width: 100%;
}

.employee-search-input::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.employee-dropdown-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    min-width: 2.5rem;
    height: 100%;
}

.employee-dropdown-toggle:hover {
    border-color: var(--primary-color);
    background: var(--bg-color);
    color: var(--primary-color);
}

.employee-dropdown-toggle:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.employee-select-container:focus-within .employee-dropdown-toggle {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.employee-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 0.25rem;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    overflow: hidden;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.employee-dropdown-menu .employee-option:first-child {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.employee-dropdown-menu .employee-option:last-child {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.employee-options-list {
    padding: 0.5rem;
}

.employee-option {
    padding: 0.75rem 1rem;
    transition: background 0.2s ease;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
}

.employee-option:last-child {
    border-bottom: none;
}

.employee-option:hover {
    background: var(--hover-bg);
}

.employee-option.selected {
    background: rgba(0, 0, 0, 0.05);
}

.employee-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
}

/* Modern Custom Checkbox Styles */
.modern-checkbox-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.modern-checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

.modern-checkbox-wrapper .checkmark {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 22px;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.modern-checkbox-wrapper:hover .checkmark {
    border-color: var(--text-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
    transform: scale(1.05);
}

.modern-checkbox-wrapper input[type="checkbox"]:checked ~ .checkmark {
    background-color: var(--text-color);
    border-color: var(--text-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modern-checkbox-wrapper .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

.modern-checkbox-wrapper input[type="checkbox"]:checked ~ .checkmark:after {
    display: block;
}

.modern-checkbox-wrapper input[type="checkbox"]:focus ~ .checkmark {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.modern-checkbox-wrapper input[type="checkbox"]:disabled ~ .checkmark {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--bg-light);
}

/* RTL Support */
body.rtl .modern-checkbox-wrapper .checkmark:after {
    left: 50%;
    right: auto;
    transform: translate(-50%, -60%) rotate(45deg);
}

/* Apply to all checkboxes by default */
input[type="checkbox"]:not(.toggle-switch input):not(.modern-checkbox-wrapper input) {
    position: relative;
    width: 22px;
    height: 22px;
    margin: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

input[type="checkbox"]:not(.toggle-switch input):not(.modern-checkbox-wrapper input):hover {
    border-color: var(--text-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
    transform: scale(1.05);
}

input[type="checkbox"]:not(.toggle-switch input):not(.modern-checkbox-wrapper input):checked {
    background-color: var(--text-color);
    border-color: var(--text-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type="checkbox"]:not(.toggle-switch input):not(.modern-checkbox-wrapper input):focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

input[type="checkbox"]:not(.toggle-switch input):not(.modern-checkbox-wrapper input):disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--bg-light);
}

.employee-checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
}

/* Working day checkbox specific styling */
.working-day-checkbox {
    width: 22px !important;
    height: 22px !important;
    border-radius: 5px !important;
}

.working-day-checkbox:checked {
    background-size: 16px 16px !important;
}

.employee-name {
    font-weight: 500;
    color: var(--text-color);
    flex: 1;
}

.employee-id {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 400;
}

.employee-loading,
.employee-no-results {
    padding: 1rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Status Filter Dropdown */
.status-filter-dropdown {
    position: relative;
    display: inline-block;
}

.status-filter-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    min-width: 180px;
}

.status-filter-toggle:hover {
    border-color: var(--primary-color);
    background: var(--bg-color);
}

.status-filter-toggle:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.status-filter-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 0.25rem;
    min-width: 250px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    overflow: visible;
}

.status-filter-option {
    padding: 0;
}

.status-filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    margin: 0;
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--border-light);
}

.status-filter-checkbox-label:last-child {
    border-bottom: none;
}

.status-filter-checkbox-label:hover {
    background-color: var(--bg-light);
}

.status-filter-checkbox {
    margin: 0;
    cursor: pointer;
    width: 1.125rem;
    height: 1.125rem;
}

.status-filter-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0.5rem 0;
}

/* RTL Support for Status Filter */
body.rtl .status-filter-menu {
    left: auto;
    right: 0;
}

body.rtl .status-filter-toggle {
    flex-direction: row-reverse;
}

/* RTL Support for Employee Multi-Select */
body.rtl .employee-select-container {
    direction: rtl;
}

body.rtl .employee-selected-chips {
    direction: rtl;
}

body.rtl .employee-checkbox-label {
    direction: rtl;
}

/* Modern Dropdown (Non-searchable) */
.modern-dropdown {
    position: relative;
    width: 100%;
}

.modern-dropdown-toggle {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    text-align: left;
}

.modern-dropdown-toggle:hover {
    border-color: var(--primary-color);
    background: var(--bg-color);
}

.modern-dropdown-toggle:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.modern-dropdown.open .modern-dropdown-toggle {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.modern-dropdown-selected {
    flex: 1;
    font-weight: 500;
}

.modern-dropdown-arrow {
    transition: transform 0.2s ease;
    color: var(--text-light);
    font-size: 0.85rem;
}

.modern-dropdown.open .modern-dropdown-arrow {
    transform: rotate(180deg);
}

.modern-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    width: 100%;
    min-width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    animation: slideDown 0.2s ease;
    box-sizing: border-box;
}

/* Scrollbar styling for modern dropdown */
.modern-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.modern-dropdown-menu::-webkit-scrollbar-track {
    background: var(--bg-color);
}

.modern-dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.modern-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modern-dropdown-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: var(--text-color);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-light);
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modern-dropdown-option:last-child {
    border-bottom: none;
}

.modern-dropdown-option:hover {
    background-color: var(--hover-bg);
    color: var(--primary-color);
}

.modern-dropdown-option.selected {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.modern-dropdown-option.selected:hover {
    background-color: var(--primary-color);
    color: white;
    opacity: 0.9;
}

/* Icons and colors in modern dropdown options */
.modern-dropdown-option i {
    margin-right: 0.5rem;
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
}

body.rtl .modern-dropdown-option i {
    margin-right: 0;
    margin-left: 0.5rem;
}

.modern-dropdown-option {
    display: flex;
    align-items: center;
}

.modern-dropdown-selected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modern-dropdown-selected i {
    flex-shrink: 0;
}

/* RTL Support */
body.rtl .modern-dropdown-toggle {
    text-align: right;
    direction: rtl;
}

body.rtl .modern-dropdown-menu {
    left: auto;
    right: 0;
}

.suggestion-item i {
    margin-right: 0.5rem;
}

body.rtl .suggestion-item i {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Contractor Details Modal Styles */
.contractor-details-modal {
    padding: 0;
}

.contractor-details-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #333 100%);
    color: white;
    border-radius: 0.5rem 0.5rem 0 0;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    direction: ltr;
    text-align: left;
}

.contractor-details-icon {
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contractor-details-title h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.contractor-details-subtitle {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.25rem;
    font-weight: 400;
}

.contractor-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.contractor-details-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.contractor-details-item:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contractor-details-item-full {
    grid-column: 1 / -1;
}

.contractor-details-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contractor-details-label i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.contractor-details-value {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 500;
    word-break: break-word;
}

.contractor-employees-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: flex-start;
}

.contractor-employee-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.02) 100%);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

.contractor-employee-chip i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

.contractor-employee-chip .employee-id {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 400;
}

/* RTL Support for Contractor Details */
body.rtl .contractor-details-header {
    flex-direction: row-reverse;
    text-align: right;
    direction: rtl;
    justify-content: flex-start;
}

body.rtl .contractor-details-icon {
    order: 1;
}

body.rtl .contractor-details-title {
    order: 2;
    text-align: right;
    direction: rtl;
    flex: 1;
}

body.rtl .contractor-details-title h3 {
    text-align: right;
    direction: rtl;
}

body.rtl .contractor-details-subtitle {
    text-align: right;
    direction: rtl;
}

body.rtl .contractor-details-label {
    flex-direction: row-reverse;
    text-align: right;
    justify-content: flex-end;
}

body.rtl .contractor-details-item {
    text-align: right;
    direction: rtl;
}

body.rtl .contractor-details-value {
    text-align: right;
}

body.rtl .contractor-employee-chip {
    flex-direction: row-reverse;
}

body.rtl .contractor-employees-list {
    justify-content: flex-end !important;
    direction: rtl !important;
    text-align: right !important;
    align-items: flex-end;
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    .contractor-details-grid {
        grid-template-columns: 1fr;
    }
    
    .contractor-details-header {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }
    
    .contractor-details-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }
}

/* Session Timeout Modal Styles */
.session-timeout-modal-content {
    direction: ltr;
}

body.rtl .session-timeout-modal-content {
    direction: rtl;
}

.session-timeout-header {
    text-align: center;
}

body.rtl .session-timeout-header {
    text-align: center;
}

.session-timeout-title {
    text-align: center;
}

body.rtl .session-timeout-title {
    text-align: right;
    direction: rtl;
}

/* Employee Management Tabs */
.employee-tabs-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
}

.employee-tab-btn {
    padding: 0.75rem 1.25rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.employee-tab-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.employee-tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.employee-tab-content {
    display: none;
}

.employee-tab-content.active {
    display: block;
}

@media (max-width: 768px) {
    .employee-tabs-container {
        gap: 0.25rem;
        padding-bottom: 0.75rem;
    }
    
    .employee-tab-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .employee-tab-btn i {
        font-size: 0.875rem;
    }
}

body.rtl .employee-tabs-container {
    direction: rtl;
}

body.rtl .employee-tab-btn {
    flex-direction: row-reverse;
}

.session-timeout-body {
    text-align: center;
}

body.rtl .session-timeout-body {
    text-align: center;
}

.session-timeout-message {
    text-align: center;
}

body.rtl .session-timeout-message {
    text-align: center;
}

.session-timeout-countdown-box {
    text-align: center;
}

body.rtl .session-timeout-countdown-box {
    text-align: center;
}

.session-timeout-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

body.rtl .session-timeout-countdown {
    flex-direction: row-reverse;
}

.session-timeout-icon {
    margin-right: 0.75rem;
}

body.rtl .session-timeout-icon {
    margin-right: 0;
    margin-left: 0.75rem;
}

.session-timeout-seconds {
    margin-left: 0.5rem;
}

body.rtl .session-timeout-seconds {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* ============================================
   MODERN LOADING SPINNERS
   ============================================ */

/* Button Loading Spinner */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
    cursor: not-allowed;
    min-width: auto; /* Prevent size change */
}

.btn-loading .spinner {
    display: inline-block;
    vertical-align: middle;
    margin: 0; /* No margin to prevent size change */
}

/* Modern Spinner Animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

.spinner-sm {
    width: 0.75em;
    height: 0.75em;
    border-width: 1.5px;
}

.spinner-lg {
    width: 1.5em;
    height: 1.5em;
    border-width: 3px;
}

/* Page Loading Overlay */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.active {
    opacity: 1;
    visibility: visible;
}

.page-loader-content {
    text-align: center;
}

.page-loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

.page-loader-text {
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* RTL Support for Page Loader */
body.rtl .page-loader-content {
    direction: rtl;
}

/* Smooth fade-in animation for content */
.content-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Inline Loading Indicator */
.inline-loader {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.inline-loader .spinner {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

/* Table Loading Overlay */
.table-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 0.5rem;
}

.table-loading-overlay .spinner {
    width: 32px;
    height: 32px;
    border-width: 3px;
    color: var(--primary-color);
}

/* Modal Loading Overlay */
.modal-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 0.5rem;
}

.modal-loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
    color: var(--primary-color);
}

.session-timeout-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-direction: row;
}

body.rtl .session-timeout-actions {
    flex-direction: row-reverse;
}

.session-timeout-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

body.rtl .session-timeout-btn {
    flex-direction: row-reverse;
}

.session-timeout-btn i {
    margin-right: 0;
}

body.rtl .session-timeout-btn i {
    margin-left: 0;
}
