:root {
    --auth-primary: #243f5b;
    --auth-primary-dark: #1b3149;
    --auth-primary-darker: #14263a;
    --auth-primary-light: #e7edf3;

    --auth-background: #ffffff;
    --auth-border: #ddd7e2;
    --auth-text: #51465c;
    --auth-muted: #817886;

    --auth-error: #b24c5b;
    --auth-error-bg: #fff0f1;

    --auth-info-bg: #e8f1f7;
    --auth-info-text: #426579;
}


/* =========================
   Auth Page
========================= */

.auth-page {
    min-height: calc(100vh - 70px);
    display: flex;
    justify-content: center;
    align-items: flex-start;

    padding: 35px 20px 50px;

    background: var(--auth-background);
}

.auth-card {
    width: min(100%, 475px);

    padding: 30px 34px;

    color: var(--auth-text);
    background: #ffffff;

    border: 1px solid #f0edf3;
    border-radius: 12px;

    box-shadow: 0 8px 28px rgba(36, 63, 91, 0.08);
}

.register-card {
    width: min(100%, 700px);
}


/* =========================
   Title
========================= */

.auth-title {
    margin: 0 0 24px;

    color: var(--auth-text);

    font-size: 22px;
    font-weight: 700;
    text-align: center;
}


/* =========================
   Tabs
========================= */

.auth-tabs {
    display: flex;
    justify-content: center;
    gap: 28px;

    margin-bottom: 28px;

    border-bottom: 1px solid #eeeaf1;
}

.auth-tab {
    position: relative;

    min-width: 68px;
    padding: 0 8px 12px;

    color: var(--auth-muted);

    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.auth-tab:hover {
    color: var(--auth-primary);
}

.auth-tab.active {
    color: var(--auth-primary);
    font-weight: 700;
}

.auth-tab.active::after {
    content: "";

    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;

    height: 2px;

    background: var(--auth-primary);
    border-radius: 5px;
}


/* =========================
   Information Message
========================= */

.auth-info {
    margin-bottom: 22px;
    padding: 12px 15px;

    color: var(--auth-info-text);
    background: var(--auth-info-bg);

    border-radius: 10px;

    font-size: 12px;
    line-height: 2;
    text-align: center;
}


/* =========================
   Form
========================= */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;

    width: 100%;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth-field label {
    display: block;

    color: var(--auth-text);

    font-size: 13px;
    font-weight: 600;
}


/* =========================
   Inputs
========================= */

.auth-field input,
.auth-field select,
.input-wrapper input {
    width: 100%;
    min-height: 42px;

    padding: 9px 12px;

    color: var(--auth-text);
    background: #ffffff;

    border: 1px solid var(--auth-border);
    border-radius: 8px;

    outline: none;

    font-family: inherit;
    font-size: 13px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.auth-field input:focus,
.auth-field select:focus,
.input-wrapper input:focus {
    border-color: var(--auth-primary);

    box-shadow: 0 0 0 3px rgba(36, 63, 91, 0.13);
}

.input-wrapper {
    position: relative;

    display: flex;
    align-items: center;
}

.input-wrapper input {
    padding-right: 42px;
}

.input-icon {
    position: absolute;
    right: 14px;
    z-index: 2;

    color: var(--auth-primary);

    font-size: 17px;
    pointer-events: none;
}


/* =========================
   Password
========================= */

.password-wrapper input {
    padding-left: 48px;
}

.password-toggle {
    position: absolute;
    left: 7px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 32px;

    color: var(--auth-muted);
    background: transparent;

    border: 0;
    border-radius: 6px;

    cursor: pointer;

    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.password-toggle:hover {
    color: var(--auth-primary);
    background: #f0f4f7;
}


/* =========================
   Login Options
========================= */

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-top: -2px;

    font-size: 12px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 6px;

    color: #665c6d;

    cursor: pointer;
}

.remember-label input {
    width: 15px;
    height: 15px;

    accent-color: var(--auth-primary);
    cursor: pointer;
}

.forgot-link {
    color: var(--auth-primary);
    text-decoration: none;
}

.forgot-link:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}


/* =========================
   Main Submit Button
========================= */

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 43px;

    margin-top: 5px;
    padding: 10px 16px;

    color: #ffffff;
    background: var(--auth-primary);

    border: 1px solid var(--auth-primary);
    border-radius: 9px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.auth-submit:hover {
    color: #ffffff;
    background: var(--auth-primary-dark);
    border-color: var(--auth-primary-dark);
}

.auth-submit:focus {
    color: #ffffff;
    background: var(--auth-primary);
    border-color: var(--auth-primary);

    outline: none;
    box-shadow: 0 0 0 3px rgba(36, 63, 91, 0.2);
}

.auth-submit:active {
    background: var(--auth-primary-darker);
    border-color: var(--auth-primary-darker);
    transform: translateY(1px);
}


/* =========================
   Links
========================= */

.register-link {
    margin: 24px 0 0;

    color: var(--auth-muted);

    font-size: 13px;
    text-align: center;
}

.register-link a {
    color: var(--auth-primary);

    font-weight: 700;
    text-decoration: none;
}

.register-link a:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}


/* =========================
   Messages and Errors
========================= */

.auth-message {
    margin-bottom: 15px;
    padding: 10px 13px;

    border-radius: 8px;

    font-size: 12px;
}

.auth-message:not(.error) {
    color: #426579;
    background: var(--auth-info-bg);
}

.auth-message.error {
    color: var(--auth-error);
    background: var(--auth-error-bg);
}

.field-error {
    display: block;

    margin-top: 2px;

    color: var(--auth-error);

    font-size: 11px;
    line-height: 1.8;
}


/* =========================
   Responsive
========================= */

@media (max-width: 600px) {
    .auth-page {
        align-items: flex-start;
        padding: 20px 12px 35px;
    }

    .auth-card,
    .register-card {
        width: 100%;
        padding: 24px 18px;
    }

    .two-columns {
        grid-template-columns: 1fr;
    }

    .auth-tabs {
        gap: 18px;
        margin-bottom: 24px;
    }

    .auth-options {
        align-items: flex-start;
        flex-direction: column;
    }
}






.form-errors-list {
    margin: 8px 0 0;
    padding-right: 20px;
}

.form-errors-list li {
    margin-bottom: 4px;
}

.field-error {
    display: block;
    margin-top: 5px;
    color: #b42318;
    font-size: 12px;
}






/* =========================
   Additions — Unified Registration
   (register_phone.html)
========================= */

/* ظرف پیام‌های Django (چند پیام روی هم) */
.auth-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;

    margin-bottom: 15px;
}

.auth-messages .auth-message {
    margin-bottom: 0;
}

/* واریانت‌های پیام بر اساس تگ‌های Django */
.auth-message.success {
    color: #2e7d4f;
    background: #eef8f1;
}

.auth-message.warning {
    color: #9a6700;
    background: #fff8e6;
}

/* تب‌های انتخاب روش (موبایل / ایمیل) */
.register-method-tabs {
    gap: 16px;
    margin-bottom: 20px;
}

/* آیکون داخل تب‌ها */
.auth-tab i {
    font-size: 15px;
    margin-left: 5px;
    vertical-align: middle;
}

/* آیکون داخل دکمه ارسال */
.auth-submit i {
    font-size: 15px;
    margin-left: 7px;
}

/* شماره/ایمیل نمایش‌داده‌شده در باکس راهنما */
.auth-info strong {
    color: var(--auth-primary);
    font-weight: 700;

    direction: ltr;
    unicode-bidi: embed;
}

/* اینپوت‌های LTR (موبایل، ایمیل، کد) */
.input-wrapper input[dir="ltr"] {
    text-align: left;
}

/* اینپوت کد OTP — اختیاری: وسط‌چین و فاصله‌دار */
.input-wrapper input[autocomplete="one-time-code"] {
    text-align: center;
    letter-spacing: 4px;
    font-weight: 600;
}




css
/* تنظیم جایگاه آیکون داخل اینپوت‌های ثبت‌نام */
.input-wrapper input {
    padding-right: 42px !important;
}