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

body {
    font-family: 'Segoe UI', 'Cairo', 'Tajawal', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #151515 100%);
    background-attachment: fixed;
    color: rgba(255, 255, 255, 0.95);
    direction: rtl;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(33, 150, 243, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(33, 150, 243, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(156, 39, 176, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.01) 2px, rgba(255, 255, 255, 0.01) 4px);
    pointer-events: none;
    z-index: -1;
}

/* صفحة تسجيل الدخول */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(30, 30, 30, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, transparent 50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-box:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 20px rgba(33, 150, 243, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.login-box:hover::before {
    opacity: 1;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-logo img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    max-width: 100%;
}

.login-header h1 {
    text-align: center;
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    padding: 0 10px;
    word-break: keep-all;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(20, 20, 20, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    transition: all 0.25s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.form-group input:focus {
    outline: none;
    border-color: rgba(33, 150, 243, 0.5);
    background: rgba(25, 25, 25, 0.7);
    box-shadow: 
        0 0 0 3px rgba(33, 150, 243, 0.15),
        inset 0 1px 2px rgba(0, 0, 0, 0.2),
        0 0 8px rgba(33, 150, 243, 0.08);
}

/* أيقونة التقويم في حقول التاريخ */
.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.form-group input[type="date"]::-webkit-inner-spin-button,
.form-group input[type="date"]::-webkit-clear-button {
    filter: invert(1);
}

.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.form-group select:focus {
    outline: none;
    border-color: rgba(33, 150, 243, 0.6);
    background: rgba(17, 17, 17, 0.8);
    box-shadow: 
        0 0 0 3px rgba(33, 150, 243, 0.2),
        inset 0 1px 2px rgba(0, 0, 0, 0.3),
        0 0 10px rgba(33, 150, 243, 0.1);
}

/* تنسيق checkbox تذكرني */
.form-group.remember-me {
    margin-bottom: 18px;
}

.form-group.remember-me .checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
    user-select: none;
    gap: 0;
    transition: all 0.2s ease;
    padding: 4px 0;
}

.form-group.remember-me .checkbox-label:hover {
    color: #fff;
}

.form-group.remember-me .checkbox-label:hover .checkbox-text {
    color: rgba(255, 255, 255, 0.95);
}

/* إخفاء checkbox الأصلي */
.form-group.remember-me .checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* تصميم checkbox المخصص */
.form-group.remember-me .checkbox-label .checkbox-custom {
    position: relative;
    width: 20px;
    height: 20px;
    margin-left: 12px;
    flex-shrink: 0;
    background: rgba(20, 20, 20, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.form-group.remember-me .checkbox-label:hover .checkbox-custom {
    border-color: rgba(33, 150, 243, 0.5);
    background: rgba(25, 25, 25, 0.7);
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.2),
        0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* حالة checked */
.form-group.remember-me .checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-color: #2196F3;
    box-shadow: 
        0 0 0 3px rgba(33, 150, 243, 0.15),
        inset 0 1px 2px rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(33, 150, 243, 0.2);
}

/* أيقونة الصح */
.form-group.remember-me .checkbox-label .checkbox-custom::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transition: all 0.2s ease;
}

.form-group.remember-me .checkbox-label input[type="checkbox"]:checked ~ .checkbox-custom::after {
    display: block;
    animation: checkmark 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes checkmark {
    0% {
        transform: rotate(45deg) scale(0);
        opacity: 0;
    }
    50% {
        transform: rotate(45deg) scale(1.2);
    }
    100% {
        transform: rotate(45deg) scale(1);
        opacity: 1;
    }
}

/* النص */
.form-group.remember-me .checkbox-label .checkbox-text {
    flex: 1;
    transition: color 0.2s ease;
    letter-spacing: 0.2px;
}

.form-group.remember-me .checkbox-label input[type="checkbox"]:checked ~ .checkbox-text {
    color: rgba(255, 255, 255, 0.95);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: rgba(255, 255, 255, 0.98);
    width: 100%;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.25);
    font-weight: 500;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1976D2 0%, #2196F3 100%);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.35);
    transform: translateY(-1px);
}

.btn-green {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.25);
    font-weight: 500;
}

.btn-green:hover {
    background: linear-gradient(135deg, #45a049 0%, #4CAF50 100%);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.35);
    transform: translateY(-1px);
}

.btn-red {
    background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
    color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.25);
    font-weight: 500;
}

.btn-red:hover {
    background: linear-gradient(135deg, #da190b 0%, #f44336 100%);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.35);
    transform: translateY(-1px);
}

.btn-yellow {
    background: linear-gradient(135deg, #ff9800 0%, #e68900 100%);
    color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.25);
    font-weight: 500;
}

.btn-yellow:hover {
    background: linear-gradient(135deg, #e68900 0%, #ff9800 100%);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.35);
    transform: translateY(-1px);
}

.error-message {
    color: #f44336;
    margin-top: 15px;
    text-align: center;
    display: none;
}

.error-message.show {
    display: block;
}

/* التخطيط الرئيسي */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: rgba(35, 35, 35, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 0;
    z-index: 1000;
    box-shadow: 
        -4px 0 20px rgba(0, 0, 0, 0.4),
        inset 1px 0 0 rgba(255, 255, 255, 0.04);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(33, 150, 243, 0.3) 50%, transparent 100%);
    opacity: 0.5;
}

.sidebar-header {
    padding: 0 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    position: relative;
    isolation: isolate;
}

.sidebar-header h2 {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.sidebar-header .header-logo {
    width: 55px;
    height: 55px;
    object-fit: contain;
    filter: brightness(1.1);
    flex-shrink: 0;
    transition: transform 0.3s ease;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: auto;
    image-rendering: high-quality;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    isolation: isolate;
    position: relative;
    z-index: 10;
}

.sidebar-header .header-logo:hover {
    transform: scale(1.05) translateZ(0);
}

.sidebar-header .header-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    margin: 4px 10px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    font-size: 14px;
}

.nav-item::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: #2196F3;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.95);
    transform: translateX(-3px);
}

.nav-item.active {
    background: rgba(33, 150, 243, 0.12);
    color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-icon {
    margin-left: 12px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

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

.nav-icon svg {
    stroke: currentColor;
    fill: none;
}

.main-content {
    margin-right: 250px;
    padding: 30px;
    min-height: 100vh;
    position: relative;
    z-index: 10;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
}

.content-header {
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, rgba(33, 150, 243, 0.4) 0%, transparent 100%);
}

.content-header h1 {
    color: rgba(255, 255, 255, 0.95);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin: 0;
    flex: 1;
}

/* عداد السجلات في العنوان */
.table-count-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.2) 0%, rgba(33, 150, 243, 0.15) 100%);
    color: rgba(33, 150, 243, 1);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    margin-right: 10px;
    border: 1px solid rgba(33, 150, 243, 0.3);
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.15);
    transition: all 0.3s ease;
    vertical-align: middle;
}

.table-count-badge:hover {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.3) 0%, rgba(33, 150, 243, 0.25) 100%);
    box-shadow: 0 4px 10px rgba(33, 150, 243, 0.25);
    transform: translateY(-1px);
}

/* حاوية المستخدمين المتصلين */
.online-users-container {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    min-height: 40px;
}

/* دائرة المستخدم المتصل */
.online-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.online-user-avatar:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 1);
    z-index: 10;
}

.online-user-avatar.current-user {
    border-color: rgba(33, 150, 243, 0.8);
    cursor: default;
}

.online-user-avatar.current-user:hover {
    transform: scale(1.05);
    border-color: rgba(33, 150, 243, 1);
}

.online-user-avatar::before {
    content: attr(title);
    position: absolute;
    top: 100%;
    left: 30%;
    transform: translateX(0) translateY(8px);
    background: rgba(30, 30, 30, 0.95);
    color: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    max-width: 250px;
    word-wrap: break-word;
    white-space: normal;
    text-align: center;
    min-width: 120px;
    margin-top: 5px;
}

.online-user-avatar:hover::before {
    opacity: 1;
    transform: translateX(0) translateY(5px);
}

/* الجداول */
.table-container {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow-x: auto;
    margin-bottom: 20px;
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(33, 150, 243, 0.5) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.table-container:hover::before {
    opacity: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

thead {
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(10px);
    position: relative;
}

thead::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(33, 150, 243, 0.3) 50%, transparent 100%);
}

/* أسهم الترتيب */
.sort-arrow {
    display: inline-block;
    margin-right: 5px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    transition: color 0.2s ease, transform 0.2s ease;
    user-select: none;
    vertical-align: middle;
}

.sort-arrow:hover {
    color: rgba(33, 150, 243, 0.8);
    transform: scale(1.2);
}

.sort-arrow.sort-asc {
    color: rgba(33, 150, 243, 1);
}

.sort-arrow.sort-desc {
    color: rgba(33, 150, 243, 1);
}

th {
    padding: 16px 15px;
    text-align: right;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    letter-spacing: 0.3px;
    background: rgba(20, 20, 20, 0.4);
}

td {
    padding: 14px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.88);
    transition: all 0.2s ease;
    vertical-align: middle;
    white-space: nowrap;
    height: auto;
    font-size: 14px;
}

/* السماح بعرض النص الكامل في خلايا "من قام بالتوظيف" و "من قام بآخر ترقية" */
td[data-field="hiredBy"],
td[data-field="promotedBy"],
tbody tr td:nth-child(10),
tbody tr td:nth-child(11) {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow: visible !important;
    text-overflow: clip !important;
    min-width: 120px;
    max-width: 250px;
}

tbody tr {
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    height: auto;
    position: relative;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

tbody tr:hover::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: rgba(33, 150, 243, 0.4);
    pointer-events: none;
}

tbody tr.selected {
    background: rgba(33, 150, 243, 0.12);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

tbody tr.selected::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: #2196F3;
    pointer-events: none;
}

.promotion-due-name {
    color: #FF8C00 !important;
    font-weight: 700;
}

td.editable {
    cursor: text;
    position: relative;
}

td.editable:hover {
    background: rgba(33, 150, 243, 0.1);
}

td.editable:focus {
    outline: 2px solid #2196F3;
    outline-offset: -2px;
    background: rgba(33, 150, 243, 0.15);
    border-radius: 8px;
}

td.editable input {
    min-width: 150px;
    padding: 8px 12px;
    background: #0a0a0a;
    color: #fff;
    border: 1px solid rgba(33, 150, 243, 0.5);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

td.editable input:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
    background: #111;
}

td .name-text {
    display: inline;
    vertical-align: baseline;
}

td .vacation-badge {
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
    margin-right: 0;
}

/* الأزرار */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 12px 24px;
    font-size: 14px;
    border-radius: 12px;
    position: relative;
    z-index: 1;
}

/* النوافذ المنبثقة */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.25s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal.show {
    display: flex;
}

.modal-content {
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 28px;
    border-radius: 16px;
    max-width: 480px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: modalSlideIn 0.25s ease;
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(33, 150, 243, 0.6) 50%, transparent 100%);
    border-radius: 20px 20px 0 0;
}

.confirm-modal {
    max-width: 400px;
    padding: 20px;
}

/* تحسين form-group في النوافذ المنبثقة */
.modal-body .form-group {
    margin-bottom: 18px;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-body .form-group label {
    font-size: 13px;
    margin-bottom: 6px;
}

.modal-body .form-group input,
.modal-body .form-group select {
    font-size: 14px;
    padding: 10px 14px;
}

.confirm-modal .modal-body {
    text-align: center;
    padding: 20px 0;
}

.confirm-modal .modal-body p {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    color: rgba(255, 255, 255, 0.95);
    font-size: 20px;
    font-weight: 600;
}

.close-btn {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(244, 67, 54, 0.2);
    border-color: #f44336;
    color: #f44336;
    transform: rotate(90deg);
}

.modal-body {
    margin-bottom: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    max-height: calc(85vh - 150px);
    padding-right: 5px;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transition: background 0.2s ease;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* للنوافذ المنبثقة الكبيرة (مثل إضافة حساب) */
.modal-content.large-modal {
    max-width: 520px;
}

/* للنوافذ المنبثقة الصغيرة (مثل التأكيد) */
.modal-content.small-modal {
    max-width: 400px;
    padding: 20px;
}

/* للنوافذ المنبثقة المتوسطة (مثل عرض القيم) */
.modal-content.medium-modal {
    max-width: 600px;
}

.modal-content.medium-modal .modal-body {
    max-height: calc(85vh - 140px);
}

/* تحسين عرض القيم الكبيرة */
.modal-body .value-display {
    max-height: 50vh;
    overflow-y: auto;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    white-space: pre-wrap;
    word-wrap: break-word;
    direction: rtl;
    text-align: right;
    font-size: 13px;
    line-height: 1.6;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-body .value-display::-webkit-scrollbar {
    width: 8px;
}

.modal-body .value-display::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.modal-body .value-display::-webkit-scrollbar-thumb {
    background: rgba(33, 150, 243, 0.4);
    border-radius: 10px;
}

.modal-body .value-display::-webkit-scrollbar-thumb:hover {
    background: rgba(33, 150, 243, 0.6);
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* علامة الإجازة */
.vacation-badge {
    display: inline-block;
    vertical-align: middle;
    background: #ff9800;
    color: #fff;
    padding: 4px 6px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(255, 152, 0, 0.3);
    margin-left: 10px;
}

.vacation-badge svg {
    display: inline-block;
    vertical-align: middle;
    width: 16px;
    height: 16px;
    stroke: #fff;
    fill: none;
    stroke-width: 2.5;
}

/* زر النقل */
.transfer-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
}

/* تحسينات إضافية */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* استجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-right: 200px;
        padding: 20px;
    }
    
    .table-container {
        overflow-x: scroll;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .content-header h1 {
        font-size: 24px;
    }
}

@media (max-width: 600px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .nav-item {
        white-space: nowrap;
    }
}

/* حقل البحث */
.search-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    background: rgba(20, 20, 20, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    transition: all 0.25s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.search-input:focus {
    outline: none;
    border-color: rgba(33, 150, 243, 0.5);
    background: rgba(25, 25, 25, 0.7);
    box-shadow: 
        0 0 0 3px rgba(33, 150, 243, 0.15),
        inset 0 1px 2px rgba(0, 0, 0, 0.2),
        0 0 8px rgba(33, 150, 243, 0.08);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

/* أيقونة الثلاث نقاط */
.actions-menu-btn {
    background: rgba(33, 150, 243, 0.25);
    border: 1px solid rgba(33, 150, 243, 0.3);
    color: #2196F3;
    cursor: pointer;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    font-size: 18px;
    line-height: 1;
    min-width: 36px;
    height: 36px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
}

.actions-menu-btn:hover {
    background: rgba(33, 150, 243, 0.35);
    border-color: rgba(33, 150, 243, 0.5);
    color: #42A5F5;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.25);
    transform: translateY(-1px);
}

.actions-menu-btn:active {
    transform: translateY(0) scale(0.98);
}

.actions-menu-btn .dots {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.actions-menu-btn .dot {
    width: 5px;
    height: 5px;
    background: currentColor;
    border-radius: 50%;
    display: block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Popout Menu */
.actions-popout {
    position: absolute;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(33, 150, 243, 0.2);
    border-radius: 12px;
    padding: 6px;
    min-width: 160px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(33, 150, 243, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 1000;
    display: none;
    animation: popoutFadeIn 0.2s ease;
    overflow: hidden;
}

/* عندما يكون الـ popout في آخر صف - يستخدم fixed positioning */
.actions-popout.popout-fixed {
    position: fixed;
    z-index: 10000;
}

/* المواضع المختلفة للـ popout */
.actions-popout.popout-bottom {
    top: 100%;
    bottom: auto;
    left: 0;
    right: auto;
    margin-top: 8px;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
}

.actions-popout.popout-top {
    bottom: 100%;
    top: auto;
    left: 0;
    right: auto;
    margin-bottom: 8px;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
}

.actions-popout.popout-right {
    left: 100%;
    right: auto;
    top: -8px;
    bottom: auto;
    margin-left: 8px;
    margin-right: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.actions-popout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(33, 150, 243, 0.5) 50%, transparent 100%);
}

.actions-popout.show {
    display: block;
}

@keyframes popoutFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.actions-popout-item {
    padding: 12px 16px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
    text-align: right;
    border: none;
    background: transparent;
    border-radius: 8px;
    margin: 2px 0;
    position: relative;
}

.actions-popout-item .action-icon {
    color: #fff;
    stroke: #fff;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    transition: all 0.2s ease;
}

.actions-popout-item:hover .action-icon {
    color: #fff;
    stroke: #fff;
    transform: scale(1.1);
}

.actions-popout-item span {
    flex: 1;
    text-align: right;
}

.actions-popout-item::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: #2196F3;
    border-radius: 0 8px 8px 0;
    transition: height 0.2s ease;
}

.actions-popout-item:hover {
    background: rgba(33, 150, 243, 0.2);
    color: #fff;
    transform: translateX(-2px);
}

.actions-popout-item:hover::before {
    height: 60%;
}

.actions-popout-item:active {
    transform: translateX(-1px) scale(0.98);
    background: rgba(33, 150, 243, 0.25);
}

.actions-menu-container {
    position: relative;
    display: inline-block;
}

/* أزرار تسريع/تأخير */
.btn.adjust-btn {
    padding: 4px 2px;
    font-size: 16px;
    min-width: 24px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: none;
    box-shadow: none;
}

.btn.adjust-btn:hover {
    background: transparent;
    color: rgba(255, 255, 255, 1);
}

.btn.adjust-btn:active {
    background: transparent;
    transform: scale(0.95);
}

/* نظام الإشعارات */
.notifications-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    width: calc(100% - 40px);
    pointer-events: none;
}

.notification {
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    animation: slideInLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.25s ease;
    min-width: 300px;
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, rgba(33, 150, 243, 0.8) 0%, rgba(33, 150, 243, 0.3) 100%);
}

.notification.success::before {
    background: linear-gradient(180deg, rgba(76, 175, 80, 0.8) 0%, rgba(76, 175, 80, 0.3) 100%);
}

.notification.warning::before {
    background: linear-gradient(180deg, rgba(255, 152, 0, 0.8) 0%, rgba(255, 152, 0, 0.3) 100%);
}

.notification.error::before {
    background: linear-gradient(180deg, rgba(244, 67, 54, 0.8) 0%, rgba(244, 67, 54, 0.3) 100%);
}

.notification.info::before {
    background: linear-gradient(180deg, rgba(33, 150, 243, 0.8) 0%, rgba(33, 150, 243, 0.3) 100%);
}

.notification:hover {
    transform: translateX(5px);
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 30px rgba(33, 150, 243, 0.2);
}

.notification-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(33, 150, 243, 0.2);
    padding: 6px;
}

.notification.success .notification-icon {
    background: rgba(76, 175, 80, 0.2);
}

.notification.warning .notification-icon {
    background: rgba(255, 152, 0, 0.2);
}

.notification.error .notification-icon {
    background: rgba(244, 67, 54, 0.2);
}

.notification.info .notification-icon {
    background: rgba(33, 150, 243, 0.2);
}

.notification-icon svg {
    width: 18px;
    height: 18px;
    stroke: #2196F3;
    fill: none;
    stroke-width: 2.5;
}

.notification.success .notification-icon svg {
    stroke: #4CAF50;
}

.notification.warning .notification-icon svg {
    stroke: #ff9800;
}

.notification.error .notification-icon svg {
    stroke: #f44336;
}

.notification.info .notification-icon svg {
    stroke: #2196F3;
}

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

.notification-message {
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    word-wrap: break-word;
}

.notification-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.notification-close svg {
    width: 16px;
    height: 16px;
}

.notification-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3px;
    background: rgba(33, 150, 243, 0.5);
    border-radius: 0 0 16px 16px;
    animation: progressBar 5s linear forwards;
}

.notification.success .notification-progress {
    background: rgba(76, 175, 80, 0.5);
}

.notification.warning .notification-progress {
    background: rgba(255, 152, 0, 0.5);
}

.notification.error .notification-progress {
    background: rgba(244, 67, 54, 0.5);
}

.notification.info .notification-progress {
    background: rgba(33, 150, 243, 0.5);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.notification.hiding {
    animation: slideOutLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

