/* ===== صفحة تسجيل الدخول - تصميم احترافي ===== */

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3b82f6 100%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in;
}

.auth-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    animation: slideUp 0.5s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 12px 35px rgba(30, 64, 175, 0.35);
}

.auth-title {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 0.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 1rem;
}

.auth-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #1e40af 0%, #3b82f6 100%);
    margin: 1.5rem auto 0;
    border-radius: 2px;
}

.auth-form {
    margin-top: 2rem;
}

.auth-form-group {
    margin-bottom: 1.5rem;
}

.auth-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-label i {
    color: #3b82f6;
}

.auth-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    background: #f8fafc;
}

.auth-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background: white;
}

.auth-input.error {
    border-color: #ef4444;
    animation: shake 0.5s;
}

.auth-password-wrapper {
    position: relative;
}

.auth-password-toggle {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.auth-password-toggle:hover {
    color: #3b82f6;
}

.auth-error {
    background: #fee2e2;
    color: #dc2626;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
    animation: slideDown 0.3s ease-out;
}

.auth-error.show {
    display: flex;
}

.auth-error i {
    font-size: 1.2rem;
}

.auth-warning {
    background: #fef3c7;
    color: #92400e;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.auth-warning i {
    font-size: 1rem;
}

.auth-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.35);
}

.auth-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.5);
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}

.auth-submit:active:not(:disabled) {
    transform: translateY(0);
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-submit i {
    margin-left: 0.5rem;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 0.5rem;
}

/* الحماية من إظهار المحتوى قبل التحقق */
.protected-content {
    display: none !important;
}

.protected-content.authenticated {
    display: block !important;
}

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

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

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        padding: 2rem;
        margin: 1rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-subtitle {
        font-size: 0.9rem;
    }
}
