/* تحسينات إضافية لنظام تسجيل الدخول */

/* تأثيرات الرسوم المتحركة للحقول */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
}

/* تأثيرات التحميل */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #64ffda;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

/* تحسينات الـ dropdown في الـ navbar */
.dropdown-menu {
    animation: slideDown 0.3s ease-out;
    transform-origin: top;
}

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

.dropdown-item:hover {
    background: rgba(100, 255, 218, 0.1) !important;
    color: #64ffda !important;
    transform: translateX(5px);
    transition: all 0.3s ease;
}

/* تحسينات الأزرار العامة */
.btn-fx {
    background: linear-gradient(45deg, #64ffda, #4fcdb9);
    border: none;
    color: #0a192f;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-fx:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(100, 255, 218, 0.4);
    color: #0a192f;
}

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

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

/* تحسينات النماذج */
.form-floating .form-control {
    background: rgba(10, 25, 47, 0.8);
    border: 1px solid rgba(100, 255, 218, 0.3);
    color: #e6f1ff;
    transition: all 0.3s ease;
}

.form-floating .form-control:focus {
    background: rgba(10, 25, 47, 0.9);
    border-color: #64ffda;
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.3);
    color: #e6f1ff;
    transform: translateY(-2px);
}

.form-floating label {
    color: #8892b0;
    transition: all 0.3s ease;
}

.form-floating .form-control:focus ~ label,
.form-floating .form-control:not(:placeholder-shown) ~ label {
    color: #64ffda;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* تحسينات البطاقات */
.glass-card {
    background: rgba(16, 36, 70, 0.9);
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 15px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(100, 255, 218, 0.5);
    box-shadow: 0 15px 35px rgba(100, 255, 218, 0.2);
}

/* تحسينات النصوص */
.text-fx-primary {
    color: #64ffda;
}

.text-fx-secondary {
    color: #ccd6f6;
}

.text-fx-muted {
    color: #8892b0;
}

/* تحسينات الروابط */
.link-fx {
    color: #64ffda;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.link-fx:hover {
    color: #4fcdb9;
}

.link-fx:before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #64ffda;
    transition: width 0.3s ease;
}

.link-fx:hover:before {
    width: 100%;
}

/* تحسينات الإشعارات */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(16, 36, 70, 0.95);
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 10px;
    padding: 15px 20px;
    color: #e6f1ff;
    backdrop-filter: blur(15px);
    z-index: 10000;
    animation: slideInRight 0.5s ease-out;
    max-width: 300px;
}

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

.notification-toast.success {
    border-color: rgba(74, 222, 128, 0.5);
}

.notification-toast.error {
    border-color: rgba(239, 68, 68, 0.5);
}

.notification-toast.warning {
    border-color: rgba(245, 158, 11, 0.5);
}

/* تحسينات الجداول */
.table-fx {
    background: transparent;
    color: #e6f1ff;
}

.table-fx th {
    background: rgba(100, 255, 218, 0.1);
    color: #64ffda;
    border-color: rgba(100, 255, 218, 0.3);
    font-weight: 600;
}

.table-fx td {
    border-color: rgba(100, 255, 218, 0.1);
    color: #ccd6f6;
}

.table-fx tbody tr:hover {
    background: rgba(100, 255, 218, 0.05);
}

/* تحسينات القوائم */
.list-fx {
    list-style: none;
    padding: 0;
}

.list-fx li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(100, 255, 218, 0.1);
    color: #ccd6f6;
    transition: all 0.3s ease;
}

.list-fx li:hover {
    color: #64ffda;
    padding-right: 10px;
}

.list-fx li:before {
    content: '▶';
    color: #64ffda;
    margin-left: 10px;
    font-size: 0.8rem;
}

/* تحسينات شريط التقدم */
.progress-fx {
    background: rgba(10, 25, 47, 0.8);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress-fx .progress-bar {
    background: linear-gradient(45deg, #64ffda, #4fcdb9);
    transition: width 0.6s ease;
    position: relative;
}

.progress-fx .progress-bar:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .glass-card {
        margin: 10px;
        padding: 20px;
    }
    
    .btn-fx {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .notification-toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* تحسينات إمكانية الوصول */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* تحسينات التركيز */
*:focus {
    outline: 2px solid #64ffda;
    outline-offset: 2px;
}

button:focus,
.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(100, 255, 218, 0.5);
}

/* تحسينات الطباعة */
@media print {
    .navbar,
    .btn,
    .notification-toast {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .glass-card {
        background: white !important;
        border: 1px solid #ccc !important;
    }
}