/* صفحات المصادقة العصرية - CSS */

/* الصفحة الرئيسية للمصادقة */
.auth-main {
    min-height: 100vh;
    background: var(--gradient-secondary);
    padding: 120px 0 40px;
    position: relative;
    overflow: hidden;
}

.auth-main::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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%2360A9A9" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.auth-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.auth-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 80vh;
}

/* قسم النموذج */
.auth-form-section {
    background: var(--white);
    border-radius: 25px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px var(--shadow);
    position: relative;
    overflow: hidden;
}

.auth-form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-primary);
}

.auth-form-container {
    max-width: 400px;
    margin: 0 auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--white);
    font-size: 2rem;
    box-shadow: 0 8px 25px var(--shadow);
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 15px;
    line-height: 1.2;
}

.auth-subtitle {
    color: var(--border-text);
    opacity: 0.8;
    line-height: 1.6;
    font-size: 1rem;
}

/* النموذج */
.auth-form {
    margin-bottom: 30px;
}

.form-row {
    margin-bottom: 25px;
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--heading);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-label i {
    color: var(--interactive);
    width: 16px;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(152, 216, 216, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    color: var(--border-text);
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--interactive);
    box-shadow: 0 0 0 3px rgba(152, 216, 216, 0.2);
}

.form-input::placeholder {
    color: var(--border-text);
    opacity: 0.6;
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.form-input:focus + .input-border {
    transform: scaleX(1);
}

/* حاوي كلمة المرور */
.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--border-text);
    opacity: 0.6;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    opacity: 1;
    color: var(--interactive);
}

/* قوة كلمة المرور */
.password-strength {
    margin-top: 8px;
    font-size: 0.85rem;
}

.password-strength.weak {
    color: #e74c3c;
}

.password-strength.medium {
    color: #f39c12;
}

.password-strength.strong {
    color: #27ae60;
}

.password-match {
    margin-top: 8px;
    font-size: 0.85rem;
}

.password-match.match {
    color: #27ae60;
}

.password-match.no-match {
    color: #e74c3c;
}

/* خيارات النموذج */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--border-text);
    line-height: 1.4;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(152, 216, 216, 0.5);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: var(--interactive);
    border-color: var(--interactive);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 12px;
    font-weight: bold;
}

.forgot-link {
    color: var(--interactive);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.forgot-link:hover {
    color: var(--heading);
    text-decoration: underline;
}

.terms-link {
    color: var(--interactive);
    text-decoration: none;
    transition: all 0.3s ease;
}

.terms-link:hover {
    color: var(--heading);
    text-decoration: underline;
}

/* زر المصادقة */
.auth-btn {
    width: 100%;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    margin-bottom: 25px;
}

.auth-btn.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 8px 25px var(--shadow);
}

.auth-btn.btn-primary:hover {
    background: var(--heading);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px var(--shadow-hover);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* فاصل */
.auth-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(152, 216, 216, 0.3);
}

.auth-divider span {
    background: var(--white);
    padding: 0 20px;
    color: var(--border-text);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* تسجيل الدخول الاجتماعي */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.social-btn {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid rgba(152, 216, 216, 0.3);
    border-radius: 12px;
    background: var(--white);
    color: var(--border-text);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: inherit;
}

.social-btn:hover {
    border-color: var(--interactive);
    background: var(--gradient-secondary);
    transform: translateY(-2px);
}

.google-btn:hover {
    border-color: #db4437;
    color: #db4437;
}

.facebook-btn:hover {
    border-color: #4267B2;
    color: #4267B2;
}

/* فوتر المصادقة */
.auth-footer {
    text-align: center;
    color: var(--border-text);
    opacity: 0.8;
}

.auth-link {
    color: var(--interactive);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: var(--heading);
    text-decoration: underline;
}

/* قسم المعلومات */
.auth-info-section {
    padding: 40px;
    color: var(--white);
    background: var(--gradient-primary);
    border-radius: 25px;
    position: relative;
    overflow: hidden;
}

.auth-info-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="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
}

.auth-info-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.info-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 3rem;
}

.auth-info-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.auth-info-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 40px;
}

.info-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1rem;
    opacity: 0.9;
}

.feature-item i {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* شهادة */
.testimonial {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 15px;
    font-size: 1rem;
}

.testimonial-author strong {
    display: block;
    margin-bottom: 5px;
}

.testimonial-author span {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* تحريكات خفيفة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* تأثيرات التمرير */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* التجاوب */
@media (max-width: 1024px) {
    .auth-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .auth-info-section {
        order: -1;
    }

    .auth-form-section {
        padding: 40px 30px;
    }

    .auth-info-content h2 {
        font-size: 1.8rem;
    }

    .info-features {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 30px;
    }

    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .auth-main {
        padding: 100px 0 20px;
    }

    .auth-container {
        padding: 0 15px;
    }

    .auth-form-section {
        padding: 30px 20px;
        border-radius: 20px;
    }

    .auth-form-container {
        max-width: none;
    }

    .auth-title {
        font-size: 1.6rem;
    }

    .auth-subtitle {
        font-size: 0.95rem;
    }

    .form-input {
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    .auth-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .social-btn {
        padding: 10px 15px;
        font-size: 0.95rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .auth-info-section {
        padding: 30px 20px;
        border-radius: 20px;
    }

    .auth-info-content h2 {
        font-size: 1.5rem;
    }

    .auth-info-content p {
        font-size: 1rem;
    }

    .info-features {
        flex-direction: column;
        gap: 15px;
    }

    .feature-item {
        flex-direction: row;
        text-align: right;
        gap: 15px;
    }

    .testimonial {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .auth-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .auth-title {
        font-size: 1.4rem;
    }

    .form-input {
        padding: 10px 12px;
    }

    .password-toggle {
        left: 10px;
    }

    .auth-btn {
        padding: 10px 20px;
    }

    .social-login {
        gap: 10px;
    }

    .social-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .info-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }

    .checkbox-container {
        font-size: 0.9rem;
    }

    .checkmark {
        width: 18px;
        height: 18px;
    }
}

/* حالات خاصة للنماذج الطويلة */
.auth-form-section.tall {
    max-height: 90vh;
    overflow-y: auto;
}

.auth-form-section.tall::-webkit-scrollbar {
    width: 6px;
}

.auth-form-section.tall::-webkit-scrollbar-track {
    background: rgba(152, 216, 216, 0.1);
    border-radius: 3px;
}

.auth-form-section.tall::-webkit-scrollbar-thumb {
    background: var(--interactive);
    border-radius: 3px;
}

.auth-form-section.tall::-webkit-scrollbar-thumb:hover {
    background: var(--heading);
}

/* تأثيرات إضافية للتفاعل */
.form-input:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}

.form-input:valid:not(:placeholder-shown) {
    border-color: #27ae60;
}

.form-group.error .form-input {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.form-group.success .form-input {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.success-message {
    color: #27ae60;
    font-size: 0.85rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}
