/* ===== Auth — بر پایه طرح login.css خودت ===== */

.login-box {
    width: 90%;
    max-width: 380px;
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .12);
    text-align: center;
    margin: 40px auto;
}

.login-box h1 {
    font-size: 26px;
    color: #4f46e5;
    margin-bottom: 10px;
    font-weight: 800;
}

.login-box p {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 2;
}

.login-box input {
    width: 100%;
    height: 50px;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 16px;
    outline: none;
    transition: .3s;
    text-align: center;
    font-family: inherit;
    margin-bottom: 8px;
}

.login-box input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}

.auth-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 12px;
    background: #4f46e5;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: .3s;
    margin-top: 10px;
    font-family: inherit;
}

.auth-btn:hover {
    background: #4338ca;
    transform: translateY(-2px);
}

.auth-btn.ghost {
    background: #eef2ff;
    color: #4f46e5;
}

.auth-btn.ghost:hover {
    background: #e0e7ff;
}

.auth-link {
    display: inline-block;
    margin-top: 18px;
    color: #4f46e5;
    font-size: 14px;
    text-decoration: none;
}

.auth-error {
    background: #fdeaea;
    color: #dc2626;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
}

.pw-wrap {
    position: relative;
}

.pw-toggle {
    position: absolute;
    top: 14px;
    left: 12px;
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

.login-box hr {
    border: none;
    height: 1px;
    background: #eee;
    margin: 24px 0;
}

/* ---- بنر مهمان ---- */

.guest-banner {
    max-width: 600px;
    margin: 12px auto 0;
    padding: 10px 16px;
    background: #fef9c3;
    color: #713f12;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    line-height: 1.8;
}

.guest-banner a {
    color: #4f46e5;
    font-weight: bold;
    text-decoration: none;
}

#guest-banner-close {
    background: transparent;
    border: none;
    font-size: 15px;
    cursor: pointer;
    color: #713f12;
    flex: none;
}

@media(max-width: 450px) {
    .login-box {
        padding: 28px 18px;
        border-radius: 18px;
    }

    .guest-banner {
        margin: 10px 12px 0;
        width: auto;
    }
}

/* ---- هدر گرادیانی کارت ورود ---- */

.auth-hero {
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    margin: -40px -30px 22px;
    padding: 30px 20px 24px;
    border-radius: 24px 24px 0 0;
    text-align: center;
}

.auth-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.auth-hero h1 {
    color: #fff;
    font-size: 22px;
    margin-bottom: 4px;
}

.auth-sub {
    color: rgba(255, 255, 255, .85);
    font-size: 13px;
    margin-bottom: 0;
}

.auth-question {
    color: #333;
    font-weight: bold;
    margin-bottom: 12px;
}

/* ---- رنگ‌های صریح هدر گرادیانی ---- */

body .auth-hero h1 {
    color: #ffffff;
}

body .auth-hero .auth-sub {
    color: rgba(255, 255, 255, .9);
}

body .auth-logo img,
img.auth-logo {
    width: 84px;
    height: 84px;
    object-fit: contain;
    display: block;
    margin: 0 auto 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .9);
    padding: 6px;
}

body .auth-question {
    color: #1f2430;
}

/* ---- لوگو: گرد، هم‌اندازه، با قاب ---- */

img.auth-logo {
    width: 88px !important;
    height: 88px !important;
    object-fit: contain !important;
    border-radius: 22px !important;
    background: #ffffff !important;
    padding: 8px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    margin: 0 auto 12px !important;
    display: block !important;
}

/* ===== لاگین v2 — هر دو تم ===== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background:
        radial-gradient(700px 420px at 88% -10%, rgba(79, 70, 229, .12), transparent 70%),
        radial-gradient(560px 380px at 8% 112%, rgba(6, 182, 212, .1), transparent 70%),
        #f6f7fb;
}

html[data-theme="dark"] .login-page {
    background:
        radial-gradient(700px 420px at 88% -10%, rgba(99, 102, 241, .2), transparent 70%),
        radial-gradient(560px 380px at 8% 112%, rgba(6, 182, 212, .12), transparent 70%),
        #0f1222;
}

.login-box {
    width: 100%;
    max-width: 380px;
    background: #ffffff;
    border: 1px solid #e7e9f0;
    border-radius: 28px;
    padding: 34px 26px 26px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(20, 25, 43, .1);
}

html[data-theme="dark"] .login-box {
    background: #171a2e;
    border-color: #262b47;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}

.auth-logo {
    width: 88px !important;
    height: 88px !important;
    object-fit: contain !important;
    border-radius: 22px !important;
    background: #ffffff !important;
    padding: 8px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .14);
    margin: 0 auto 12px !important;
    display: block !important;
}

html[data-theme="dark"] .auth-logo {
    background: #1e2340 !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}

.auth-logo-light {
    display: block !important;
}

.auth-logo-dark {
    display: none !important;
}

html[data-theme="dark"] .auth-logo-light {
    display: none !important;
}

html[data-theme="dark"] .auth-logo-dark {
    display: block !important;
}

.auth-hero h1 {
    font-size: 20px;
    font-weight: 900;
    color: #14192b;
    margin: 6px 0 2px;
}

html[data-theme="dark"] .auth-hero h1 {
    color: #ffffff;
}

.auth-sub {
    font-size: 12.5px;
    color: #9aa0ae;
    margin-bottom: 22px;
}

.auth-question {
    font-size: 14px;
    font-weight: 800;
    color: #14192b;
    margin-bottom: 12px;
    text-align: right;
}

html[data-theme="dark"] .auth-question {
    color: #e9ecf6;
}

#id_phone {
    width: 100%;
    height: 50px;
    border: 1.5px solid #e2e5ec;
    border-radius: 14px;
    padding: 0 16px;
    font-size: 16px;
    font-family: inherit;
    background: #f7f8fa;
    outline: none;
    transition: .2s;
    direction: ltr;
    text-align: left;
    margin-bottom: 12px;
}

#id_phone:focus {
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .1);
}

html[data-theme="dark"] #id_phone {
    background: #14172a;
    border-color: #2c3160;
    color: #ffffff;
}

.auth-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f46e5, #6d5cf0);
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    font-family: inherit;
    cursor: pointer;
    transition: .2s;
}

.auth-btn:hover {
    filter: brightness(1.07);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(79, 70, 229, .35);
}

.auth-error {
    color: #dc2626;
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: right;
}

.auth-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    transition: .2s;
}

.auth-link:hover {
    color: #4f46e5;
}

html[data-theme="dark"] .auth-link {
    color: #a3abc4;
}

html[data-theme="dark"] .auth-link:hover {
    color: #8b93ff;
}

/* فوتر لاگین: دسکتاپ دو طرف، موبایل زیر هم وسط */

.login-foot {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eef0f5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.lf-sep {
    width: 1px;
    height: 14px;
    background: #d9dce8;
}

.lf-terms,
.lf-help {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 12px;
    color: #9aa0ae;
    cursor: pointer;
    transition: .2s;
}

.lf-terms:hover,
.lf-help:hover {
    color: #4f46e5;
}

.lf-help {
    text-decoration: underline;
    text-underline-offset: 3px;
}

html[data-theme="dark"] .lf-terms,
html[data-theme="dark"] .lf-help {
    color: #a3abc4;
}

html[data-theme="dark"] .lf-terms:hover,
html[data-theme="dark"] .lf-help:hover {
    color: #8b93ff;
}

html[data-theme="dark"] .login-foot {
    border-top-color: #262b47;
}

html[data-theme="dark"] .lf-sep {
    background: #2c3160;
}

@media (max-width: 420px) {
    .login-foot {
        flex-direction: column;
        gap: 8px;
    }

    .lf-sep {
        display: none;
    }
}

/* مودال راهنما */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 12, 24, .55);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-box {
    background: #ffffff;
    border-radius: 22px;
    padding: 24px 22px;
    max-width: 340px;
    width: 100%;
    text-align: center;
}

.modal-box h3 {
    font-size: 16px;
    font-weight: 900;
    color: #14192b;
    margin-bottom: 10px;
}

.modal-box p {
    font-size: 13.5px;
    color: #6b7280;
    line-height: 2;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.mb-cancel {
    flex: 1;
    background: #f3f4f9;
    border: none;
    border-radius: 12px;
    padding: 11px;
    font-family: inherit;
    font-weight: 800;
    font-size: 13.5px;
    color: #14192b;
    cursor: pointer;
}

.mb-bale {
    flex: 1.4;
    background: #4f46e5;
    color: #ffffff;
    border-radius: 12px;
    padding: 11px;
    font-weight: 800;
    font-size: 13.5px;
}

html[data-theme="dark"] .modal-box {
    background: #171a2e;
    border: 1px solid #262b47;
}

html[data-theme="dark"] .modal-box h3 {
    color: #ffffff;
}

html[data-theme="dark"] .mb-cancel {
    background: #1e2340;
    color: #e9ecf6;
}

/* ---- لاگین v3: تک‌لوگو + فوتر اصلاح‌شده ---- */

.auth-logo-dark {
    display: none !important;
}

.auth-logo-light {
    display: block !important;
}

.login-page {
    flex-direction: column;
    justify-content: center;
}

.login-foot {
    display: flex;
    justify-content: flex-end;
}

.login-terms-outer {
    display: inline-block;
    margin-top: 26px;
    font-size: 12px;
    color: #9aa0ae;
    transition: .2s;
}

.login-terms-outer:hover {
    color: #4f46e5;
}

html[data-theme="dark"] .login-terms-outer {
    color: #a3abc4;
}

html[data-theme="dark"] .login-terms-outer:hover {
    color: #8b93ff;
}