﻿/* --- تنظیمات کلی بدنه و کارت --- */
.register-wrapper {
    max-width: 900px;
    margin: 40px auto;
    direction: rtl;
}

.auth-card {
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 98, 155, 0.08);
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #f1f5f9;
}

/* --- بخش راهنما (سمت راست) --- */
.auth-info-side {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 40px;
    flex: 1;
    min-width: 300px;
}

.auth-info-side .modern-header {
    border-right: 4px solid #00629b;
    padding-right: 15px;
    margin-bottom: 30px;
}

.auth-info-side .modern-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: #00629b;
    margin: 0;
}

.info-item {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #475569;
    line-height: 1.8;
}

.info-item i {
    color: #0092e6;
    font-size: 16px;
    margin-top: 4px;
}

.auth-info-side .img-register {
    width: 200px;
    margin: 40px auto;
    display: block;
}

/* --- بخش فرم اصلی (سمت چپ) --- */
.auth-form-side {
    padding: 40px;
    flex: 1.5;
    min-width: 320px;
}

.auth-form-side .modern-header {
    border-right: 4px solid #0092e6;
    padding-right: 15px;
    margin-bottom: 30px;
}

.auth-form-side .modern-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: #00629b;
    margin: 0;
}

/* --- سیستم ورودی‌های سه‌بعدی با بردر فیکس (بدون تغییر ارتفاع در ارور) --- */
.field-wrapper {
    position: relative;
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
}

/* کارت ورودی */
.input-card {
    background: #fdfdfd;
    border: 1px solid #00629b33;
    border-radius: 18px; /* گردی لبه‌ها متناسب با ارتفاع بیشتر شد */
    padding: 10px 22px;
    height: 64px; /* ارتفاع جدید و بلندتر */
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* لایه بردر متحرک - ارتفاع فیکس شده تا با ارور کش نیاید */
.animated-border {
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 66px; /* ۶۴ پیکسل کارت + ۲ پیکسل اضافه */
    border-radius: 19px;
    background: linear-gradient(90deg, #00629b, #0092e6, #00629b);
    background-size: 200% auto;
    z-index: 1;
    opacity: 0;
    transition: 0.3s;
    pointer-events: none;
}

/* فوکوس و انیمیشن */
.field-wrapper:focus-within .animated-border {
    opacity: 1;
    animation: border-flow 1.5s linear infinite;
}

.field-wrapper:focus-within .input-card {
    background: #fff;
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 98, 155, 0.12);
    border-color: transparent;
}

/* استایل محتویات داخل فیلد */
.input-stack {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.input-stack label {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    margin-bottom: 2px;
    transition: 0.3s;
}

.input-stack input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    width: 100%;
    height: 22px;
    padding: 0;
    direction:rtl;
}

.input-icon {
    font-size: 20px;
    color: #94a3b8;
    width: 30px;
    text-align: center;
    transition: 0.3s;
}

.field-wrapper:focus-within .input-icon,
.field-wrapper:focus-within .input-stack label {
    color: #0092e6 !important;
}

/* دکمه نمایش رمز */
.show-password-btn {
    cursor: pointer;
    color: #94a3b8;
    padding: 5px;
    z-index: 3;
    transition: 0.3s;
}
.show-password-btn:hover { color: #0092e6; }

/* --- دکمه ثبت‌نام و لینک‌ها --- */
.btn-register-luxe {
    background: linear-gradient(135deg, #0092e6 0%, #00629b 100%);
    color: #fff !important;
    border: none;
    padding: 14px;
    border-radius: 15px;
    font-weight: 800;
    width: 100%;
    box-shadow: 0 10px 20px rgba(0, 98, 155, 0.2);
    margin-top: 10px;
    transition: 0.3s;
    cursor: pointer;
}

.btn-register-luxe:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 98, 155, 0.3);
    filter: brightness(1.1);
}

.login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: #64748b;
}

.login-link a {
    color: #0092e6;
    font-weight: bold;
    text-decoration: none;
}

/* --- پیام‌های خطا (خارج از کادر اصلی) --- */
.val-error {
    display: block;
    color: #ef4444;
    font-size: 11px;
    font-weight: 700;
    margin-top: 6px;
    padding-right: 12px;
}

/* انیمیشن چرخش رنگ */
@keyframes border-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ریسپانسیو موبایل */
@media (max-width: 768px) {
    .auth-card { margin: 10px; border-radius: 20px; }
    .auth-info-side { display: none; } /* مخفی سازی راهنما در موبایل برای سادگی */
    .auth-form-side { padding: 30px 20px; }
}
/* --- اضافه شده برای نمایش راهنما در موبایل بدون خراب کردن بقیه استایل‌ها --- */
/* --- اصلاح نهایی ریسپانسیو موبایل --- */
@media (max-width: 768px) {
    .auth-card {
        margin: 10px;
        border-radius: 20px;
        flex-direction: column; /* چیدمان عمودی */
    }

    .auth-info-side {
        display: block !important; /* اجبار به نمایش (جایگزین display:none قبلی) */
        min-width: 100%;
        padding: 30px 20px 0px 20px;
        order: 1; /* راهنما اول باشد */
        border-bottom: 1px solid #f1f5f9;
    }

    .auth-form-side {
        min-width: 100%;
        padding: 30px 20px;
        order: 2; /* فرم دوم باشد */
    }

    .auth-info-side .img-register {
        display: block !important; /* اجبار به نمایش عکس */
        margin-top: 20px;
    }
    .auth-info-side .modern-header {
        margin-bottom: 20px;
    }
}