/* auth.css - چاپار | استایل صفحات ورود و ثبت‌نام */

/* ===== پس‌زمینه گرادیانی ===== */
.auth-page {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #2f4bd0 0%, #4361ee 40%, #6a7ff5 75%, #9aa3f8 100%);
    padding: 24px;
    min-height: 100vh;
}

:root[data-theme="dark"] .auth-page {
    background: linear-gradient(135deg, #0a0e1a 0%, #131722 45%, #1c2233 75%, #232c45 100%);
}

/* حباب‌های تزئینی پس‌زمینه */
.auth-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.auth-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
}

.blob-1 { width: 420px; height: 420px; top: -140px; right: -120px; background: rgba(255,255,255,.22); }
.blob-2 { width: 340px; height: 340px; bottom: -120px; left: -100px; background: rgba(247,37,133,.3); }
.blob-3 { width: 220px; height: 220px; top: 38%; left: 8%; background: rgba(76,201,240,.32); }

:root[data-theme="dark"] .auth-blob { opacity: .3; }
:root[data-theme="dark"] .blob-2 { background: rgba(245,74,151,.22); }

/* ===== چیدمان دو ستونه ===== */
.auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.5rem;
    min-height: calc(100vh - 48px);
}

/* ===== برندینگ ===== */
.auth-brand {
    color: #fff;
    max-width: 400px;
    text-align: center;
    padding: 1rem;
    flex-shrink: 0;
}

.auth-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.4rem;
    border-radius: 28px;
    background: rgba(255,255,255,.16);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.25);
    box-shadow: 0 24px 48px rgba(0,0,0,.22);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-logo img {
    width: 76px;
    height: 76px;
    border-radius: 22px;
}

.auth-brand h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: .5rem;
    text-shadow: 0 4px 18px rgba(0,0,0,.2);
}

.auth-brand-subtitle {
    font-size: 1.02rem;
    opacity: .92;
    line-height: 1.9;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-top: 1.8rem;
    text-align: right;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-size: .95rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 14px;
    padding: .65rem .9rem;
    backdrop-filter: blur(6px);
}

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

/* ===== کارت فرم ===== */
.auth-container {
    width: 100%;
    max-width: 440px;
    margin: 0;
    background: var(--surface);
    border-radius: 26px;
    box-shadow: 0 34px 70px rgba(0,0,0,.28);
    padding: 2.4rem 2.1rem;
    border: 1px solid var(--border);
}

.auth-header {
    text-align: center;
    margin-bottom: 1.9rem;
}

.auth-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: .4rem;
}

.auth-header p {
    color: var(--gray);
    font-size: .93rem;
}

.auth-icon { display: none; }
.auth-title { display: none; }

/* ===== فیلدها ===== */
.input-group {
    position: relative;
    margin-bottom: 1.15rem;
}

.input-group .input-icon {
    position: absolute;
    right: 1.05rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: .95rem;
    pointer-events: none;
    z-index: 2;
    transition: color .25s;
}

.input-group .input-icon.focused {
    color: var(--primary);
}

.input-group .form-control {
    padding-right: 2.8rem;
    border-radius: 12px;
    border-width: 1.5px;
    background-color: var(--surface-muted);
    transition: border-color .25s, box-shadow .25s, background-color .25s;
}

.input-group .form-control:focus {
    background-color: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(67,97,238,.14);
}

.password-container .form-control {
    padding-left: 2.9rem;
}

.toggle-password {
    left: 1.1rem;
    color: var(--gray);
}

.toggle-password:hover {
    color: var(--primary);
}

.invalid-feedback {
    margin-top: .55rem;
}

/* ===== مرا به خاطر بسپار ===== */
.remember-row {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: .1rem 0 .2rem;
    font-size: .9rem;
    color: var(--gray);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.remember-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

.remember-row:hover {
    color: var(--primary);
}

/* ===== دکمه ورود/ثبت‌نام ===== */
.btn-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    width: 100%;
    margin-top: 1.2rem;
    padding: .95rem 1.4rem;
    border: none;
    border-radius: 12px;
    font-size: 1.02rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 12px 26px rgba(67,97,238,.32);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, opacity .2s;
    min-height: 48px;
    user-select: none;
    touch-action: manipulation;
}

.btn-auth:hover:enabled {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(67,97,238,.42);
}

.btn-auth:active:enabled {
    transform: scale(.985);
}

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

/* ===== هشدار ===== */
.auth-alert {
    border-radius: 12px;
    padding: .8rem 1rem;
    font-size: .9rem;
    margin-bottom: 1.3rem;
}

.auth-alert i {
    flex-shrink: 0;
}

/* ===== پایین کارت ===== */
.auth-footer {
    margin-top: 1.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: .9rem;
    color: var(--gray);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 700;
}

.auth-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===== چک‌باکس شرایط ===== */
.terms-label {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-size: .84rem;
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: .3rem;
}

.terms-label input {
    margin-top: .3rem;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.terms-label a {
    color: var(--primary);
    font-weight: 600;
}

/* ===== دکمه تغییر تم ===== */
.auth-theme-toggle {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(255,255,255,.16);
    color: #fff;
    backdrop-filter: blur(8px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: background .2s, color .2s, transform .2s;
}

.auth-theme-toggle:hover {
    transform: rotate(15deg) scale(1.06);
}

:root[data-theme="dark"] .auth-theme-toggle {
    background: var(--surface-muted);
    color: var(--gray);
    border-color: var(--border);
}

/* ===== رسپانسیو ===== */
@media (max-width: 820px) {
    .auth-brand { display: none; }
    .auth-shell { min-height: calc(100vh - 48px); }
}

@media (max-width: 480px) {
    .auth-page { padding: 16px; }
    .auth-shell { min-height: calc(100vh - 32px); }
    .auth-container { padding: 1.8rem 1.3rem; border-radius: 20px; }
    .auth-header h2 { font-size: 1.35rem; }
    .auth-theme-toggle { top: 12px; left: 12px; width: 40px; height: 40px; }
}
