@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

.auth-shell, .auth-shell * {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    background: var(--lms-page-bg, #f5f6fa);
}

/* ---------- پنل برند (سمت راست) ---------- */

.auth-brand {
    flex: 1 1 46%;
    background-image:
        radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px),
        linear-gradient(135deg, var(--lms-brand, #2f5bea) 0%, var(--lms-brand-light, #4f7dfb) 100%);
    background-size: 22px 22px, auto;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.auth-brand::before,
.auth-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.auth-brand::before {
    width: 320px;
    height: 320px;
    top: -120px;
    inset-inline-start: -100px;
}

.auth-brand::after {
    width: 220px;
    height: 220px;
    bottom: -80px;
    inset-inline-end: -60px;
}

.auth-brand-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
}

.auth-brand-logo svg {
    width: 32px;
    height: 32px;
}

.auth-brand h2 {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 12px;
    position: relative;
    z-index: 1;
}

.auth-brand p {
    font-size: 14px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.85);
    max-width: 320px;
    margin: 0;
    position: relative;
    z-index: 1;
}

.auth-brand-features {
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.auth-brand-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 10px;
    padding: 10px 14px;
}

.auth-brand-feature svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ---------- سمت فرم ---------- */

.auth-form-side {
    flex: 1 1 54%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--lms-surface, #fff);
    border: 1px solid var(--lms-border, #e5e7eb);
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 24px 48px -18px var(--lms-shadow-drawer, rgba(15, 23, 42, .18)), 0 2px 10px rgba(15, 23, 42, .04);
    animation: authCardIn .45s ease both;
}

@keyframes authCardIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-card {
        animation: none;
    }
}

.auth-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 4px;
}

.auth-card-header {
    margin-bottom: 28px;
}

.auth-card-header h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--lms-text-primary, #111827);
}

.auth-card-header p {
    font-size: 13.5px;
    color: var(--lms-text-muted, #6b7280);
    margin: 0;
    line-height: 1.7;
}

.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--lms-text-secondary, #374151);
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    top: 50%;
    inset-inline-end: 14px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--lms-text-faint, #9ca3af);
    pointer-events: none;
}

.auth-input {
    width: 100%;
    padding: 12px 44px 12px 16px;
    border: 1.5px solid var(--lms-border, #e5e7eb);
    border-radius: 10px;
    font-size: 14.5px;
    font-family: inherit;
    background: var(--lms-input-bg, #fafafa);
    color: var(--lms-text-primary, #111827);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
    text-align: right;
}

.auth-input::placeholder {
    color: var(--lms-text-faint, #b3b8c2);
}

.auth-input:focus {
    outline: none;
    border-color: var(--lms-brand, #2f5bea);
    background: var(--lms-surface, #fff);
    box-shadow: 0 0 0 4px var(--lms-shadow-brand-focus, rgba(47, 91, 234, 0.12));
}

.auth-submit {
    width: 100%;
    padding: 13px 16px;
    background: linear-gradient(135deg, var(--lms-brand, #2f5bea), var(--lms-brand-light, #4f7dfb));
    color: var(--lms-surface, #fff);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    margin-top: 6px;
    box-shadow: 0 10px 24px -8px var(--lms-shadow-brand-active, rgba(47, 91, 234, .35));
    transition: opacity .15s ease, transform .05s ease, box-shadow .15s ease;
}

.auth-submit:hover {
    opacity: .92;
}

.auth-submit:active {
    transform: translateY(1px);
    box-shadow: 0 4px 12px -6px var(--lms-shadow-brand-active, rgba(47, 91, 234, .35));
}

.auth-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--lms-shadow-brand-focus, rgba(47, 91, 234, 0.12));
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 20px;
    background: var(--lms-error-bg, #fef2f2);
    color: var(--lms-error-text, #b91c1c);
    border: 1px solid var(--lms-error-border, #fecdd3);
}

.auth-alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.auth-footnote {
    margin-top: 24px;
    font-size: 12px;
    color: var(--lms-text-faint, #9ca3af);
    text-align: center;
}

/* ---------- صفحه تک‌ستونه (بدون پنل برند) - مثل تغییر رمز عبور ---------- */

.auth-shell-solo {
    justify-content: center;
}

.auth-shell-solo .auth-form-side {
    flex: none;
    width: 100%;
    max-width: 420px;
}

.auth-alert-success {
    background: var(--lms-success-bg, #f0fdf4);
    color: var(--lms-success-text, #15803d);
    border-color: var(--lms-success-border, #bbf7d0);
}

.auth-hint {
    font-size: 12.5px;
    color: var(--lms-text-faint, #9ca3af);
    margin: -10px 0 18px;
    line-height: 1.7;
}

.auth-btn-secondary {
    width: 100%;
    padding: 12px 16px;
    background: var(--lms-surface, #fff);
    color: var(--lms-text-tertiary, #4b5563);
    border: 1.5px solid var(--lms-border, #e5e7eb);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    margin-top: 10px;
    transition: background .15s ease, border-color .15s ease;
}

.auth-btn-secondary:hover {
    background: var(--lms-hover-bg, #f9fafb);
    border-color: var(--lms-file-border, #d1d5db);
}

@media (max-width: 860px) {
    .auth-shell {
        flex-direction: column;
    }

    .auth-brand {
        flex: none;
        padding: 40px 24px;
    }

    .auth-brand-features {
        display: none;
    }

    .auth-form-side {
        flex: none;
        padding: 40px 24px 56px;
    }
}
