/* ========== CSS المكونات ========== */

/* Cards */
.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
    backdrop-filter: blur(20px);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    background-clip: padding-box;
    animation: cardSlideIn 0.8s ease-out;
    animation-fill-mode: both;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes cardSlideIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.stat-card::before {
    display: none;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05), rgba(76, 175, 80, 0.05));
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.4);
    border-color: rgba(33, 150, 243, 0.3);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2196f3, #4caf50, #ff9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    animation: numberGlow 2s infinite alternate;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

@keyframes numberGlow {
    0% { filter: drop-shadow(0 0 5px rgba(102, 126, 234, 0.3)); }
    100% { filter: drop-shadow(0 0 15px rgba(102, 126, 234, 0.6)); }
}

.stat-label {
    color: #2c3e50;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(20px);
    position: absolute !important;
    left: 0;
    top: 0;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    padding: 30px;
    border-radius: 0;
    overflow-y: auto;
    box-shadow: none;
    animation: modalSlideInFromRight 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-clip: padding-box;
    box-sizing: border-box;
}

.modal-content::before {
    display: none;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

@keyframes modalSlideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.close:hover {
    color: #e74c3c;
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Forms */
.form-group {
    margin-bottom: 18px;
    position: relative;
    overflow: visible !important;
}

.form-group label {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.form-group label i {
    margin-left: 6px;
    font-size: 12px;
    color: #667eea;
    animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.7; }
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid rgba(33, 150, 243, 0.15);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    backdrop-filter: blur(15px);
    color: #2c3e50;
    font-weight: 500;
    box-shadow: 0 3px 12px rgba(33, 150, 243, 0.08);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2196f3;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.15);
    transform: translateY(-1px);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #4caf50;
    transform: translateY(-0.5px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, #2196f3, #21cbf3);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 8px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn i {
    font-size: 16px;
    animation: iconBounce 2s infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

#contractForm .btn-success {
    margin: 20px auto !important;
    display: block !important;
    width: fit-content !important;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(33, 150, 243, 0.4);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(-1px) scale(1.02);
}

.btn-success {
    background: linear-gradient(135deg, #4caf50, #8bc34a);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.btn-success:hover {
    box-shadow: 0 15px 35px rgba(76, 175, 80, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e17055, #d63031);
    box-shadow: 0 8px 25px rgba(225, 112, 85, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 15px 35px rgba(225, 112, 85, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ff9800, #ffc107);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.3);
}

.btn-warning:hover {
    box-shadow: 0 15px 35px rgba(255, 152, 0, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid #2196f3;
    color: #2196f3;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-outline:hover {
    background: #2196f3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.btn-outline i {
    font-size: 0.9rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    backdrop-filter: blur(15px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border: 2px solid rgba(59, 130, 246, 0.1);
}

.table th,
.table td {
    padding: 8px 10px;
    text-align: center;
    border: none;
    font-size: 11px;
    vertical-align: middle;
    position: relative;
}

.table td {
    border-right: 1px solid rgba(226, 232, 240, 0.5);
    transition: all 0.2s ease;
}

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

.table td:hover {
    background: rgba(79, 70, 229, 0.05);
}

.table .btn {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 8px;
    margin: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: none;
}

.table .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.table .btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.table .btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.table .btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.table .btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.table th {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-size: 0.75rem;
    padding: 10px 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: none;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
}

.table tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.table tr:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(124, 58, 237, 0.08));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.15);
}

.table tr:nth-child(even) {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8), rgba(241, 245, 249, 0.6));
}

.table tr:nth-child(odd) {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.7));
}

/* Notifications */
.notification {
    position: fixed;
    top: 30px;
    right: 30px;
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    padding: 20px 25px;
    border-radius: 15px;
    box-shadow: 
        0 15px 35px rgba(0, 184, 148, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    z-index: 1001;
    display: none;
    backdrop-filter: blur(10px);
    animation: notificationSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    max-width: 350px;
}

@keyframes notificationSlideIn {
    0% {
        transform: translateX(100%) scale(0.8);
        opacity: 0;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.notification.error {
    background: linear-gradient(135deg, #e17055, #d63031);
    box-shadow: 
        0 15px 35px rgba(225, 112, 85, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.notification.warning {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
    box-shadow: 
        0 15px 35px rgba(253, 203, 110, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Search Box */
.search-box {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    font-size: 16px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    color: #2c3e50;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.search-box:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.95);
}

.search-box::before {
    content: '\f002';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 16px;
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 5px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.tab {
    padding: 15px 30px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    color: #5a6c7d;
    position: relative;
    flex: 1;
    text-align: center;
}

.tab.active {
    background: linear-gradient(135deg, #2196f3, #4caf50);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
}

.tab:hover:not(.active) {
    background: rgba(33, 150, 243, 0.1);
    color: #2196f3;
    transform: translateY(-1px);
}

.tab-content {
    display: none;
}

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

/* Login Page - تصميم Split شيك وجذاب */
.login-page {
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.login-brand-panel {
    flex: 0 0 44%;
    min-height: 100vh;
    background: linear-gradient(165deg, #1a1a2e 0%, #16213e 30%, #0f3460 60%, #533483 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.login-brand-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 90% 70% at 20% 30%, rgba(102, 126, 234, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(118, 75, 162, 0.18) 0%, transparent 50%);
    pointer-events: none;
}

.login-brand-bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.login-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

.login-shape-1 { width: 320px; height: 320px; top: -80px; right: -80px; }
.login-shape-2 { width: 200px; height: 200px; bottom: 20%; left: -60px; }
.login-shape-3 { width: 120px; height: 120px; bottom: 15%; right: 15%; }

.login-brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    direction: ltr;
}

.login-brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: nowrap;
    margin-bottom: 20px;
}

.login-brand-logo {
    width: 277px;
    height: 277px;
    object-fit: contain;
    flex-shrink: 0;
}

.login-app-name {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.92) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-tagline-1 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 6px 0;
}

.login-tagline-2 {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.08em;
}

.login-form-panel {
    flex: 1;
    min-height: 100vh;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
}

.login-form-panel .login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 24px;
    padding: 48px 44px;
    box-shadow: 0 24px 56px rgba(26, 26, 46, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.login-form-panel .login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 24px 24px 0 0;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

[dir="rtl"] .login-wrapper { flex-direction: row-reverse; }

.login-form h2 {
    color: #1a1a2e;
    text-align: center;
    margin-bottom: 28px;
    font-size: 1.4rem;
    font-weight: 700;
}

.login-form .form-group input[type="text"],
.login-form .form-group input[type="password"],
.login-form .form-group input[type="email"] {
    border: 2px solid #e8ecf0;
    border-radius: 14px;
    padding: 14px 18px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form .form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.login-form .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 14px;
    padding: 14px 24px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.45);
}

.login-links {
    text-align: center;
    margin-top: 22px;
}

.login-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin: 0 10px;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.login-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Header Components */
.header-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    width: 100%;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 92px;
    height: 92px;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transform: scale(1.5);
    transform-origin: center center;
    overflow: visible;
}

.logo-icon i {
    font-size: 2.25rem;
    color: #fff;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.logo-text h1 {
    font-size: 1.6rem;
    margin: 0;
    color: #fff;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
    font-weight: 800;
}

.logo-text p {
    font-size: 0.95rem;
    margin: 4px 0 0 0;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

.header-images {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.image-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.image-card i {
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 8px;
}

.image-card span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-right: auto;
}

.user-details {
    text-align: right;
    min-width: 120px;
}

.user-details span {
    display: block;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
}

.user-details span:first-child {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.user-details span:last-child {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.user-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.language-toggle {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    transition: all 0.3s ease;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.language-toggle:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.language-toggle i {
    font-size: 0.9rem;
}

/* أزرار الأيقونات فقط (بدون نص) */
.btn-icon-only {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
}

.btn-icon-only:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.btn-icon-only:active {
    transform: translateY(0) scale(0.98);
}

.btn-icon-only i {
    margin: 0;
    font-size: 16px;
}

/* تنسيق خاص لأزرار التصدير/الاستيراد */
.export-import-buttons,
.contracts-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.export-import-buttons .btn-icon-only,
.contracts-actions .btn-icon-only {
    min-width: 40px;
}

/* تنسيق checkboxes الاختيار */
.pricing-offer-checkbox,
.contract-checkbox {
    width: 11px;
    height: 11px;
    cursor: pointer;
    accent-color: #667eea;
    transform: scale(1);
    transition: all 0.2s ease;
}

.pricing-offer-checkbox:hover,
.contract-checkbox:hover {
    transform: scale(1.1);
    accent-color: #764ba2;
}

.pricing-offer-checkbox:checked,
.contract-checkbox:checked {
    accent-color: #10b981;
}

/* تنسيق checkbox تحديد الكل */
#selectAllPricingOffers,
#selectAllContracts {
    width: 11px;
    height: 11px;
    cursor: pointer;
    accent-color: #667eea;
    transform: scale(1);
    transition: all 0.2s ease;
}

#selectAllPricingOffers:hover,
#selectAllContracts:hover {
    transform: scale(1.1);
    accent-color: #764ba2;
}

#selectAllPricingOffers:checked,
#selectAllContracts:checked {
    accent-color: #10b981;
}

/* ========== تنسيق dropdown الجنسيات مع checkboxes ========== */
.nationality-dropdown-wrapper {
    width: 100%;
    margin-top: 5px;
    position: relative !important;
    z-index: 1;
    overflow: visible !important;
}

/* التأكد من أن form-group لا يخفي القائمة */
.form-group:has(.nationality-dropdown-wrapper) {
    overflow: visible !important;
    z-index: 1;
}

.nationality-dropdown-toggle {
    width: 100%;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-align: right;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #495057;
    min-height: 42px;
}

.nationality-dropdown-toggle:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.nationality-dropdown-toggle.active {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.nationality-dropdown-toggle.has-selection {
    color: #212529;
    font-weight: 500;
}

.nationality-dropdown-toggle.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.nationality-selected-text {
    flex: 1;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nationality-dropdown-icon {
    margin-left: 10px;
    transition: transform 0.3s ease;
    color: #6c757d;
    font-size: 12px;
}

.nationality-dropdown-toggle.active .nationality-dropdown-icon {
    transform: rotate(180deg);
}

.nationality-dropdown-menu {
    display: none;
    position: absolute !important;
    top: calc(100% + 5px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    background: #fff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 99999 !important;
    margin-top: 0 !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    direction: rtl !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.nationality-dropdown-menu.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.nationality-checkboxes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    padding: 15px;
    max-height: 250px;
    overflow-y: auto;
    direction: rtl;
}

.nationality-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    user-select: none;
}

.nationality-checkbox-label:hover {
    background: #e9ecef;
}

.nationality-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
    flex-shrink: 0;
}

.nationality-checkbox-label input[type="checkbox"]:checked {
    accent-color: #10b981;
}

.nationality-checkbox-label span {
    font-size: 14px;
    color: #495057;
    flex: 1;
}

.nationality-checkbox-label:hover span {
    color: #212529;
}

.nationality-hint {
    display: block;
    margin-top: 8px;
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
}

.nationality-error-state .nationality-dropdown-toggle {
    border-color: #dc3545 !important;
    background: #fff5f5 !important;
}

.nationality-error {
    color: #dc3545 !important;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* تنسيق قسم البحث في الجنسيات */
.nationality-search-container {
    position: relative;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.nationality-search-input {
    width: 100%;
    padding: 8px 12px;
    padding-right: 35px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    direction: rtl;
    transition: all 0.3s ease;
}

.nationality-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.nationality-search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    font-size: 14px;
}

/* تنسيق قسم إضافة جنسية مخصصة */
.nationality-add-custom {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.nationality-add-custom > div {
    display: flex;
    gap: 5px;
    align-items: center;
}

.nationality-custom-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.3s;
}

.nationality-custom-input:focus {
    outline: none;
    border-color: #007bff;
}

.nationality-add-btn {
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
    transition: background-color 0.3s;
}

.nationality-add-btn:hover {
    background: #0056b3;
}

.nationality-add-btn:active {
    background: #004085;
}

.nationality-add-success {
    color: #28a745 !important;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.profession-add-success {
    color: #28a745 !important;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* ========== تنسيق dropdown المهن (مثل الجنسيات) ========== */
.profession-dropdown-wrapper {
    width: 100%;
    margin-top: 5px;
    position: relative !important;
    z-index: 1;
    overflow: visible !important;
}

.form-group:has(.profession-dropdown-wrapper) {
    overflow: visible !important;
    z-index: 1;
}

.profession-dropdown-toggle {
    width: 100%;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-align: right;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #495057;
    min-height: 42px;
}

.profession-dropdown-toggle:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.profession-dropdown-toggle.active {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.profession-dropdown-toggle.has-selection {
    color: #212529;
    font-weight: 500;
}

.profession-selected-text {
    flex: 1;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profession-dropdown-icon {
    margin-left: 10px;
    transition: transform 0.3s ease;
    color: #6c757d;
    font-size: 12px;
}

.profession-dropdown-toggle.active .profession-dropdown-icon {
    transform: rotate(180deg);
}

.profession-dropdown-menu {
    display: none;
    position: absolute !important;
    top: calc(100% + 5px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    background: #fff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 99999 !important;
    margin-top: 0 !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    direction: rtl !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.profession-dropdown-menu.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.profession-options-list {
    padding: 10px;
    max-height: 250px;
    overflow-y: auto;
    direction: rtl;
}

.profession-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    user-select: none;
    margin-bottom: 2px;
}

.profession-option:hover {
    background: #e9ecef;
}

.profession-option.selected {
    background: #e7f3ff;
    color: #0066cc;
    font-weight: 500;
}

.profession-option span {
    font-size: 14px;
    color: #495057;
    flex: 1;
}

.profession-option.selected span {
    color: #0066cc;
}

.profession-check-icon {
    color: #10b981;
    font-size: 14px;
    margin-left: 8px;
}

/* تنسيق قسم البحث في المهن */
.profession-search-container {
    position: relative;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.profession-search-input {
    width: 100%;
    padding: 8px 12px;
    padding-right: 35px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    direction: rtl;
    transition: all 0.3s ease;
}

.profession-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.profession-search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    font-size: 14px;
}

.profession-add-custom {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.profession-add-custom > div {
    display: flex;
    gap: 5px;
    align-items: center;
}

.profession-custom-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.3s;
}

.profession-custom-input:focus {
    outline: none;
    border-color: #007bff;
}

.profession-add-btn {
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
    transition: background-color 0.3s;
}

.profession-add-btn:hover {
    background: #0056b3;
}

.profession-add-btn:active {
    background: #004085;
}

/* إغلاق dropdown عند النقر خارجه */
body.nationality-dropdown-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
}

/* تنسيق responsive للشاشات الصغيرة */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-brand-panel {
        min-height: auto;
        padding: 36px 24px;
        flex: none;
    }

    .login-brand-row {
        gap: 14px;
        margin-bottom: 14px;
    }

    .login-brand-logo {
        width: 175px;
        height: 175px;
    }

    .login-app-name {
        font-size: 1.65rem;
    }

    .login-tagline-1 {
        font-size: 0.95rem;
    }

    .login-tagline-2 {
        font-size: 0.8rem;
    }

    .login-form-panel {
        padding: 24px 20px;
    }

    .login-form-panel .login-card {
        padding: 32px 24px;
    }

    [dir="rtl"] .login-wrapper {
        flex-direction: column;
    }

    .nationality-checkboxes-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
        padding: 10px;
        max-height: 200px;
    }
    
    .nationality-dropdown-menu {
        max-height: 250px;
    }
    
    .nationality-checkbox-label {
        padding: 5px 6px;
        gap: 6px;
    }
    
    .nationality-checkbox-label span {
        font-size: 13px;
    }
    
    .nationality-dropdown-toggle {
        padding: 8px 12px;
        font-size: 13px;
        min-height: 38px;
    }
}

/* تنسيق للطباعة */
@media print {
    .nationality-dropdown-wrapper {
        page-break-inside: avoid;
    }
    
    .nationality-dropdown-toggle {
        border: 1px solid #000;
        background: #fff;
    }
    
    .nationality-dropdown-menu {
        display: block !important;
        position: static;
        box-shadow: none;
        border: 1px solid #000;
        max-height: none;
    }
    
    .nationality-checkboxes-grid {
        border: none;
        background: #fff;
        max-height: none;
        overflow: visible;
    }
}
