/* auth-redesign.css */

.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;

    position: relative;
    overflow: hidden;
    /* لازم برای جلوگیری از بیرون زدن ::before */
}

/* فقط ::before عکس را دارد */
.auth-main::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: url('/assets/img/hero-bg.webp') center/cover no-repeat;

    filter: blur(12px);
    transform: scale(1.2);

    z-index: 0;
}

.auth-main>* {
    position: relative;
    z-index: 1;
}

/* کانتینر اصلی دو ستونی */
.auth-wrapper {
    display: flex;
    max-width: 950px;
    /* اندازه کلی مشابه نمونه */
    width: 100%;
    min-height: 600px;
    background-color: var(--secondary-bg);
    /* رنگ پس زمینه کانتینر */
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.651);
    overflow: hidden;
}

/* ستون بصری (چپ) */
.visual-side {
    flex: 0 0 40%;
    position: relative;
    padding: 30px;
    color: rgba(0, 0, 0, 0.178);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    /* لازم برای بلر */
}

/* عکس + افکت بلر */
.visual-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    background: url('/assets/img/auth.webp') center/cover no-repeat;

    filter: blur(12px);
    transform: scale(1.15);
    /* جلوگیری از لبه‌ها */

    z-index: 0;
}

/* اوورلی برای تاریک‌تر کردن */
.visual-side::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    background: rgba(0, 0, 0, 0.487);

    z-index: 0;
}

.visual-side>* {
    position: relative;
    z-index: 2;
    /* محتوا روی بلر + اوورلی */
}

.back-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
}

.back-link i {
    margin-right: 8px;
    /* چون rtl است */
}

.visual-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    /* این مورد را با لوگوی "کمپی باش" جایگزین کنید */
    color: rgb(255, 255, 255);
}

.visual-content p {
    font-size: 0.8rem;
    opacity: 0.8;
    color: rgba(255, 255, 255, 0.76);
}

/* ستون فرم (راست) */
.form-side {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;

    background: rgba(0, 0, 0, 0.247);
    /* پس‌زمینه نیمه‌شفاف */
    backdrop-filter: blur(15px);
    /* بلر */
    -webkit-backdrop-filter: blur(15px);
    /* برای Safari */
    border-radius: 10px;
    /* اختیاری */
}
/* ساختار داخلی فرم */
#auth-form-content {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
}

.auth-header {
    text-align: right;
    margin-bottom: 30px;
}

.auth-header h2 {
    color: var(--text-color);
    font-size: 2rem;
    margin-bottom: 5px;
}

.auth-header p {
    color: var(--text-color-secondary);
    font-size: 0.95rem;
}

.link-accent {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-form {
    margin-top: 20px;
}

/* گروه فرم */
.form-group {
    margin-bottom: 15px;
}

.form-group-inline {
    display: flex;
    gap: 15px;
}

.form-group-inline .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input:not([type="checkbox"]) {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--primary-bg);
    /* برای تضاد بیشتر با secondary-bg */
    color: var(--text-color);
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: var(--accent-color);
    outline: none;
}

/* رمز عبور با آیکون چشم */
.password-input-group {
    position: relative;
}

.password-input-group input {
    padding-left: 40px;
    /* فضای خالی برای آیکون */
}

.password-input-group .toggle-password {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    cursor: pointer;
}

/* چک باکس شرایط */
.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
    margin-left: 10px;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--primary-bg);
    cursor: pointer;
    position: relative;
    top: 1px;
}

.checkbox-group input[type="checkbox"]:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '\f00c';
    /* آیکون چک مارک Font Awesome */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--primary-bg);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
}

.link-plain {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-options {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}


/* دکمه اصلی */
.auth-button.primary {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-color);
    color: var(--text-color-secondary);
    /* یا var(--primary-bg) */
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    transition: background-color 0.3s, opacity 0.3s;
}

.auth-button.primary:hover {
    opacity: 0.9;
}

.auth-button:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
}

/* جداکننده */
.separator {
    text-align: center;
    margin: 30px 0;
    font-size: 1rem;
    color: var(--text-color-secondary);
    position: relative;
}

.separator::before,
.separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: var(--border-color);
}

.separator::before {
    right: 0;
}

.separator::after {
    left: 0;
}

/* دکمه های اجتماعی */
.social-login-group {
    display: flex;
    gap: 10px;
}

.social-button {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: 2px solid var(--accent-color);
    background-color: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s;
}

.social-button:hover {
    background-color: var(--accent-color);
}

.social-button i {
    margin-left: 8px;
}

.social-button google {
    margin-left: 4px;
    color: var(--accent-color);
}


/* لینک سوئیچینگ بین رمز و پیامک */
.switch-mode-group {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.switch-mode-link {
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-color-secondary);
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}

.switch-mode-link.active {
    color: var(--accent-color);
    font-weight: 600;
}

.switch-mode-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
}

/* پیام های هشدار/موفقیت */
.alert-message {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--primary-bg);
}

.alert-message.success {
    background-color: var(--color-success, #36b93a);
}

.alert-message.danger {
    background-color: var(--color-danger, #f73022);
}

.mt-3 {
    margin-top: 20px;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
        min-height: auto;
        border-radius: 10px;
    }

    .visual-side {
        flex: none;
        height: 200px;
    }

    .visual-side .back-link {
        display: none;
    }

    .form-side {
        padding: 30px 20px;
    }

    .social-login-group {
        flex-direction: column;
    }
        .auth-main {
            min-height: 90vh;

        }
}