/* Login Section */
.login-section {
    min-height: 100vh;
    padding: 120px 0 2rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f8fafc 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(3,70,144,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

/* Container - عرض كامل للصفحة */
.login-section .container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px; /* العرض الطبيعي للصفحة */
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
}

/* Login Container - مخصص للنماذج فقط */
.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 500px; /* العرض المطلوب للنماذج */
    margin: 0 auto;
}

/* Forms Container */
.login-forms {
    position: relative;
    background: white;
    border-radius: 20px;
    width: 100%;
}

.form-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateX(30px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    min-height: 600px;
}

.form-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    position: static;
    min-height: auto;
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #034690, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
    box-shadow: 0 10px 30px rgba(3, 70, 144, 0.3);
}

.form-header h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: #6b7280;
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #034690;
    background: white;
    box-shadow: 0 0 0 3px rgba(3, 70, 144, 0.1);
}

.input-wrapper input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.input-icon {
    position: absolute;
    right: 1rem;
    color: #9ca3af;
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-wrapper input:focus + .input-icon {
    color: #034690;
}

.toggle-password {
    position: absolute;
    left: 1rem;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    pointer-events: all;
}

.toggle-password:hover {
    color: #034690;
}

.error-message {
    font-size: 0.85rem;
    color: #ef4444;
    margin-top: 0.5rem;
    display: block;
    min-height: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message.show {
    opacity: 1;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input {
    transform: scale(1.2);
    accent-color: #034690;
}

.remember-me label {
    font-size: 0.95rem;
    color: #6b7280;
    cursor: pointer;
    margin: 0;
}

.link-btn {
    background: none;
    border: none;
    color: #034690;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.link-btn:hover {
    color: #0056b3;
}

/* Password Strength */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    background: #ef4444;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    background: #ef4444;
    width: 25%;
}

.strength-fill.fair {
    background: #f59e0b;
    width: 50%;
}

.strength-fill.good {
    background: #10b981;
    width: 75%;
}

.strength-fill.strong {
    background: #059669;
    width: 100%;
}

.strength-text {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Checkbox Groups */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-group input {
    transform: scale(1.2);
    accent-color: #034690;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.checkbox-group label {
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.5;
    cursor: pointer;
    margin: 0;
}

.checkbox-group .link {
    color: #034690;
    text-decoration: underline;
    font-weight: 600;
}

.checkbox-group .link:hover {
    color: #0056b3;
}

/* Buttons */
.btn-full {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin: 1.5rem 0;
}

.btn-primary {
    background: linear-gradient(45deg, #034690, #0056b3);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(3, 70, 144, 0.3);
}

.btn-outline {
    background: transparent;
    color: #034690;
    border: 2px solid #034690;
}

.btn-outline:hover {
    background: #034690;
    color: white;
}

/* Form Divider */
.form-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.form-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.form-divider span {
    background: white;
    padding: 0 1rem;
    color: #6b7280;
    font-size: 0.95rem;
    position: relative;
}

/* Social Login */
.social-login {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-btn {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.google-btn {
    color: #ea4335;
    border-color: #ea4335;
}

.google-btn:hover {
    background: #ea4335;
    color: white;
    transform: translateY(-2px);
}

.facebook-btn {
    color: #4267b2;
    border-color: #4267b2;
}

.facebook-btn:hover {
    background: #4267b2;
    color: white;
    transform: translateY(-2px);
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.form-footer p {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 2rem;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: white;
    font-size: 2.5rem;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.success-message h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.success-message p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #034690;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #6b7280;
    font-weight: 500;
    margin: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    animation: fadeInUp 0.3s ease;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

/* Responsive Design */
@media (max-width: 768px) {
    .login-section {
        padding: 100px 0 1rem;
    }
    
    .login-section .container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .login-container {
        max-width: 100%;
        margin: 0;
    }
    
    .form-container {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .form-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .form-header h3 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        margin: 0 0.5rem;
        border-radius: 16px;
        max-width: calc(100% - 1rem);
    }
    
    .form-container {
        padding: 1.5rem 1rem;
    }
    
    .form-header h3 {
        font-size: 1.6rem;
    }
    
    .form-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .input-wrapper input {
        padding: 0.875rem 1rem 0.875rem 2.5rem;
    }
    
    .input-icon {
        right: 0.75rem;
    }
    
    .toggle-password {
        left: 0.75rem;
    }
}

/* Custom Scrollbar */
.form-container {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.form-container::-webkit-scrollbar {
    width: 6px;
}

.form-container::-webkit-scrollbar-track {
    background: transparent;
}

.form-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.form-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
