/* JamPors authentication surfaces — UI only. Operational IDs and form contracts stay unchanged. */
:root {
    --auth-primary: #5147d9;
    --auth-primary-deep: #302693;
    --auth-accent: #16b8aa;
    --auth-bg: #f2f3f8;
    --auth-surface: rgba(255, 255, 255, 0.94);
    --auth-text: #171a2c;
    --auth-muted: #73798d;
    --auth-line: #e5e7f0;
}

html[data-theme="dark"] {
    --auth-bg: #10111b;
    --auth-surface: rgba(25, 27, 43, 0.94);
    --auth-text: #f5f6ff;
    --auth-muted: #a8aec2;
    --auth-line: #34374d;
}

body.auth-v2 {
    min-height: 100svh;
    padding: clamp(68px, 8vh, 92px) 24px 78px;
    color: var(--auth-text);
    background:
        radial-gradient(
            circle at 83% 8%,
            color-mix(in srgb, var(--auth-primary) 18%, transparent),
            transparent 31rem
        ),
        radial-gradient(
            circle at 8% 92%,
            color-mix(in srgb, var(--auth-accent) 13%, transparent),
            transparent 27rem
        ),
        var(--auth-bg);
    font-family: Vazirmatn, Vazir, Tahoma, sans-serif;
}

body.auth-v2::before {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(
            color-mix(in srgb, var(--auth-primary) 6%, transparent) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            color-mix(in srgb, var(--auth-primary) 6%, transparent) 1px,
            transparent 1px
        );
    background-size: 38px 38px;
    mask-image: linear-gradient(#000, transparent 82%);
    content: "";
}

.auth-v2 .top-controls {
    top: 22px;
    left: 22px;
}

.auth-v2 .auth-theme-toggle {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--auth-line);
    border-radius: 15px;
    background: var(--auth-surface);
    color: var(--auth-primary);
    box-shadow: 0 12px 32px rgba(35, 38, 67, 0.1);
}

.auth-theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.auth-v2 .login-wrapper {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    max-width: 1120px;
    min-height: min(690px, calc(100svh - 150px));
    display: grid;
    grid-template-columns: minmax(380px, 0.78fr) minmax(0, 1.22fr);
    gap: 22px;
    align-items: stretch;
    padding: 0;
}

.auth-v2 .login-wrapper:not(:has(.slider-col.show)) {
    grid-template-columns: minmax(0, 480px);
    justify-content: center;
}

.auth-v2 .login-col {
    width: 100%;
    max-width: none;
    justify-content: center;
}

.auth-v2 .auth-login-card,
.auth-v2 .login-box {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(28px, 4vw, 44px);
    border: 1px solid color-mix(in srgb, var(--auth-line) 88%, transparent);
    border-radius: 28px;
    background: var(--auth-surface);
    box-shadow: 0 28px 80px rgba(34, 38, 75, 0.13);
    backdrop-filter: blur(18px);
}

.auth-brand-lockup {
   display: flex;
       align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    flex-direction: column;
}

.auth-v2 .login-box .logo {
    flex: 0 0 auto;
    margin: 0;
}

.auth-v2 .login-box .logo img {
    width: 120px;
    /* height: 54px; */
    display: block;
    padding: 6px;
    object-fit: contain;
    /* border: 1px solid */
        color-mix(in srgb, var(--auth-primary) 15%, var(--auth-line));
    border-radius: 17px;
    /* background: color-mix(in srgb, var(--auth-primary) 6%, var(--auth-surface)); */
}
.auth-brand-copy{
        display: flex;
    flex-direction: column;
    align-items: center;
}
}
.auth-brand-copy span,
.auth-brand-copy strong {
    display: block;
}

.auth-brand-copy span {
    margin-bottom: 3px;
    color: var(--auth-muted);
    font-size: 10px;
}

.auth-brand-copy strong {
    color: var(--auth-text);
    font-size: 15px;
}

.auth-welcome-copy {
    margin-bottom: 24px;
}

.auth-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
    color: var(--auth-primary);
    font-size: 10.5px;
    font-weight: 800;
}

.auth-eyebrow::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--auth-accent);
    box-shadow: 0 0 0 5px
        color-mix(in srgb, var(--auth-accent) 12%, transparent);
    content: "";
}

.auth-v2 .auth-welcome-copy h1,
.auth-v2 .auth-password-card h1 {
    margin: 0;
    color: var(--auth-text);
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.5;
    letter-spacing: -0.7px;
}

.auth-v2 .login-subtitle,
.auth-v2 .cp-subtitle {
    max-width: none;
    margin: 6px 0 0;
    color: var(--auth-muted);
    font-size: 12px;
    line-height: 1.9;
    text-align: right;
}

.auth-v2 .login-tabs {
    min-height: 52px;
    margin-bottom: 24px;
    padding: 5px;
    border: 1px solid var(--auth-line);
    border-radius: 15px;
    background: color-mix(in srgb, var(--auth-bg) 72%, var(--auth-surface));
}

.auth-v2 .login-tab-btn {
    gap: 7px;
    min-height: 40px;
    border-radius: 11px;
    color: var(--auth-muted);
    font-size: 12px;
    font-weight: 700;
}

.auth-v2 .login-tab-btn.active {
    background: var(--auth-surface);
    color: var(--auth-primary);
    box-shadow: 0 5px 17px rgba(39, 41, 76, 0.09);
}

.auth-tab-icon {
    font-size: 15px;
}

.auth-v2 .txt_login {
    margin: 0 0 9px;
    color: var(--auth-muted);
    font-size: 11.5px;
}

.auth-v2 .input-box {
    margin-bottom: 14px;
}

.auth-v2 .input-box label > span {
    margin-bottom: 7px;
    color: var(--auth-text);
    font-size: 11px !important;
    font-weight: 700;
}

.auth-v2 .input-box input {
    width: 100%;
    min-height: 52px;
    margin: 0 !important;
    padding: 0 15px;
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--auth-bg) 48%, var(--auth-surface));
    color: var(--auth-text);
    font: inherit;
    font-size: 13px;
    outline: 0;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.auth-v2 .input-box input:focus {
    border-color: var(--auth-primary);
    background: var(--auth-surface);
    box-shadow: 0 0 0 4px
        color-mix(in srgb, var(--auth-primary) 12%, transparent);
}

.auth-v2 .login-btn,
.auth-v2 .btn-style {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 17px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(
        120deg,
        var(--auth-primary-deep),
        var(--auth-primary)
    );
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 13px 30px
        color-mix(in srgb, var(--auth-primary) 25%, transparent);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        opacity 0.18s ease;
}

.auth-v2 .login-btn:hover,
.auth-v2 .btn-style:hover {
    transform: translateY(-2px);
    box-shadow: 0 17px 34px
        color-mix(in srgb, var(--auth-primary) 30%, transparent);
}

.auth-v2 button:disabled {
    cursor: wait;
    opacity: 0.62;
    transform: none;
}

.auth-v2 .spinner.hide {
    display: none !important;
}

.auth-v2 .spinner:not(.hide) {
    position: fixed;
    z-index: 1400;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    border: 0 !important;
    border-radius: 0;
    background: rgba(21, 23, 42, 0.26);
    backdrop-filter: blur(3px);
    animation: none !important;
    transform: none !important;
}

.auth-v2 .spinner:not(.hide)::after {
    display: block;
    width: 38px;
    height: 38px;
    box-sizing: border-box;
    border: 4px solid rgba(255, 255, 255, 0.42);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin 0.75s linear infinite;
    content: "";
}

@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-v2 .slider-col.show {
    display: block;
}

.auth-v2 .slider,
.auth-v2 .auth-story-panel {
    height: 100%;
    min-height: 100%;
}

.auth-v2 .slider {
    border: 1px solid color-mix(in srgb, #fff 18%, transparent);
    border-radius: 30px;
    background: linear-gradient(
        145deg,
        var(--auth-primary-deep),
        var(--auth-primary)
    );
    box-shadow: 0 30px 90px
        color-mix(in srgb, var(--auth-primary) 24%, transparent);
}

.auth-v2 .slide-content {
    right: 24px;
    bottom: 24px;
    left: 24px;
    padding: 21px 23px;
    border: 1px solid rgba(255, 255, 255, 0.19);
    border-radius: 20px;
    background: rgba(20, 20, 45, 0.38);
    box-shadow: 0 18px 50px rgba(10, 10, 35, 0.18);
    backdrop-filter: blur(17px);
}

.auth-v2 .slide-title {
    font-size: 20px;
}
.auth-v2 .slide-text {
    font-size: 12px;
    line-height: 2;
}

.auth-v2 .slide-btn {
    padding: 10px 17px;
    border-radius: 12px;
    background: #fff;
    color: var(--auth-primary-deep);
    font-weight: 800;
}

.auth-v2 .slider-arrow {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(22, 22, 48, 0.35);
    backdrop-filter: blur(10px);
}

.auth-v2 .modal-overlay {
    padding: 18px;
    background: rgba(17, 19, 37, 0.58);
    backdrop-filter: blur(7px);
}

.auth-v2 .modal-card {
    width: min(420px, 100%);
    max-width: 420px;
    padding: 34px;
    border: 1px solid var(--auth-line);
    border-radius: 24px;
    background: var(--auth-surface);
    color: var(--auth-text);
    box-shadow: 0 34px 90px rgba(16, 18, 39, 0.25);
}

.auth-v2 .login-captcha {
    margin: 2px 0 16px;
    padding: 12px;
    border: 1px solid var(--auth-line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--auth-bg) 52%, var(--auth-surface));
}

.auth-v2 .login-captcha__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.auth-v2 .login-captcha__heading label {
    color: var(--auth-text);
    font-size: 11px;
    font-weight: 800;
}

.auth-v2 .login-captcha__heading span {
    color: var(--auth-muted);
    font-size: 9px;
}

.auth-v2 .login-captcha__challenge {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
    margin-bottom: 9px;
}

.auth-v2 .login-captcha__challenge img {
    width: 100%;
    height: 58px;
    display: block;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    object-fit: cover;
    background: #f3f6ff;
}

.auth-v2 .login-captcha__refresh {
    display: grid;
    place-items: center;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    background: var(--auth-surface);
    color: var(--auth-primary);
    font:
        800 23px/1 Tahoma,
        sans-serif;
    cursor: pointer;
}

.auth-v2 .login-captcha > input[data-captcha-answer] {
    width: 100%;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    background: var(--auth-surface);
    color: var(--auth-text);
    font: inherit;
    font-size: 12px;
    outline: none;
}

.auth-v2 .login-captcha > input[data-captcha-answer]:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px
        color-mix(in srgb, var(--auth-primary) 12%, transparent);
}

.auth-v2 .login-captcha > input[aria-invalid="true"] {
    border-color: #dc2626;
}

.auth-v2 .modal-card.auth-modal-shell {
    display: flex;
    flex-direction: column;
    max-height: min(90dvh, 680px);
    padding: 0;
    overflow: hidden;
}

.auth-v2 .auth-modal-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 66px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--auth-line);
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--auth-primary) 8%, var(--auth-surface)),
        var(--auth-surface)
    );
}

.auth-v2 .auth-modal-header h3 {
    margin: 0;
    text-align: right;
}

.auth-v2 .auth-modal-header .close_modal {
    position: static;
    flex: 0 0 auto;
    margin-inline-start: auto;
}

.auth-v2 .auth-modal-body {
    min-height: 0;
    padding: 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.auth-v2 .otp-delivery-message {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid
        color-mix(in srgb, var(--auth-primary) 18%, var(--auth-line));
    border-radius: 14px;
    background: color-mix(in srgb, var(--auth-primary) 7%, var(--auth-surface));
    color: var(--auth-text);
    font-size: 11.5px;
    line-height: 1.9;
    text-align: right;
}

.auth-v2 .otp-delivery-phone {
    display: inline-block;
    direction: ltr;
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
}

.auth-v2 .otp-code-label {
    display: block;
    margin-bottom: 8px;
}

.auth-v2 #otp_code {
    margin: 0 !important;
}

.auth-v2 .otp-validity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 2px 0 16px;
    padding: 11px 13px;
    border: 1px solid var(--auth-line);
    border-radius: 13px;
    background: color-mix(in srgb, var(--auth-bg) 58%, var(--auth-surface));
    color: var(--auth-muted);
    font-size: 11px;
}

.auth-v2 .otp-validity strong {
    min-width: 58px;
    color: var(--auth-primary);
    font-size: 16px;
    letter-spacing: 1px;
    text-align: left;
}

.auth-v2 .otp-resend-button {
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    border: 1px solid
        color-mix(in srgb, var(--auth-primary) 30%, var(--auth-line));
    border-radius: 13px;
    background: transparent;
    color: var(--auth-primary);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        opacity 0.18s ease;
}

.auth-v2 .otp-resend-button:not(:disabled):hover {
    border-color: var(--auth-primary);
    background: color-mix(in srgb, var(--auth-primary) 8%, transparent);
}

.auth-v2 .otp-resend-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.auth-v2 .modal-card h3 {
    margin: 0 0 12px;
    color: var(--auth-text);
    font-size: 20px;
}

.auth-v2 .close_modal {
    top: 14px;
    left: 14px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 11px;
    background: color-mix(in srgb, var(--auth-bg) 75%, var(--auth-surface));
    color: var(--auth-muted);
    font: inherit;
    font-size: 20px;
}

.auth-v2 #otp_code {
    text-align: center;
    direction: ltr;
    letter-spacing: 8px;
    font-size: 21px;
}

.auth-v2 .auth-footer {
    position: fixed;
    z-index: 2;
    /* right: 0;
  bottom: 20px;
  left: 0; */
    color: var(--auth-muted);
    text-align: center;
}

.auth-v2 .footer-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 3px;
    font-size: 10px;
}

/* .auth-v2 .footer-status::before {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 5px;
    border-radius: 50%;
    background: var(--auth-accent);
    content: "";
} */
.auth-v2 .footer-status {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.auth-v2 .footer-credit {
    margin: 0;
    font-size: 10px;
}

.auth-v2 .btn_link_aparat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: fit-content;
    max-width: 100%;
    margin: 15px auto 0;
    padding: 8px 13px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--auth-muted);
    font-size: 10.5px;
    text-decoration: none;
    box-shadow: none !important;
    animation: none !important;
    transition:
        color 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease;
}

.auth-v2 .btn_link_aparat:hover {
    color: var(--auth-primary);
    border-color: color-mix(in srgb, var(--auth-primary) 16%, transparent);
    background: color-mix(in srgb, var(--auth-primary) 6%, transparent);
    box-shadow: none !important;
}

.auth-v2 .btn_link_aparat:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--auth-primary) 55%, transparent);
    outline-offset: 2px;
    box-shadow: none !important;
}

.auth-v2--change-password .cp-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
}

.auth-v2--change-password .cp-col {
    max-width: 510px;
}
.auth-v2 .auth-password-card {
    padding: clamp(30px, 5vw, 48px);
}
.auth-v2 .auth-password-card h1 {
    margin-bottom: 5px;
    font-size: 27px;
}

.auth-v2 .cp-note {
    margin: 20px 0;
    padding: 14px 16px;
    border: 1px solid
        color-mix(in srgb, var(--auth-primary) 17%, var(--auth-line));
    border-radius: 14px;
    background: color-mix(in srgb, var(--auth-primary) 6%, var(--auth-surface));
    color: var(--auth-muted);
}

@media (max-width: 860px) {
    body.auth-v2 {
        padding: 72px 18px 90px;
        place-items: start center;
    }
    .auth-v2 .login-wrapper {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .auth-v2 .login-col {
        max-width: 560px;
        margin-inline: auto;
    }
    .auth-v2 .slider-col {
        width: 100%;
        max-width: 560px;
        margin-inline: auto;
        order: 2;
    }
    .auth-v2 .slider {
        min-height: 320px;
        height: 320px;
    }
}

@media (max-width: 520px) {
    body.auth-v2 {
        padding-inline: 12px;
    }
    .auth-v2 .auth-login-card,
    .auth-v2 .login-box {
        padding: 24px 18px;
        border-radius: 22px;
    }
    .auth-brand-lockup {
        margin-bottom: 24px;
    }
    .auth-v2 .login-box .logo img {
        width: 48px;
        height: 48px;
    }
    .auth-v2 .login-tab-btn {
        font-size: 11px;
    }
    .auth-v2 .slider {
        min-height: 260px;
        height: 260px;
        border-radius: 22px;
    }
    .auth-v2 .slide-content {
        right: 14px;
        bottom: 14px;
        left: 14px;
        padding: 16px;
    }
    .auth-v2 .modal-card {
        padding: 29px 20px 22px;
    }
    .auth-v2 .modal-card.auth-modal-shell {
        padding: 0;
    }
    .auth-v2 .auth-modal-header {
        min-height: 60px;
        padding: 12px 16px;
    }
    .auth-v2 .auth-modal-body {
        padding: 21px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-v2 *,
    .auth-v2 *::before,
    .auth-v2 *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
