/* ══════════════════════════════════════════════════════════════
   Auth login — split story + form
   Scoped under .auth-split
   ══════════════════════════════════════════════════════════════ */

.auth-split {
    --auth-ink: #0b1f33;
    --auth-ink-soft: #1a3348;
    --auth-mist: #8aa0b4;
    --auth-line: rgba(255, 255, 255, 0.14);
    --auth-accent: #2bb8a6;
    --auth-accent-soft: rgba(43, 184, 166, 0.22);
    --auth-panel: #f5f7fa;
    --auth-card: #ffffff;
    --auth-ease: cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    grid-template-areas: "story panel";
    direction: ltr;
}

.pg-auth,
.pg-auth .nk-app-root {
    min-height: 100vh;
    min-height: 100dvh;
    background: #ffffff;
    overflow: visible;
}

.auth-split *,
.auth-split *::before,
.auth-split *::after {
    box-sizing: border-box;
}

.auth-split__story {
    grid-area: story;
    position: relative;
    z-index: 1;
    overflow: hidden;
    color: #f4f8fb;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 4vw, 3.5rem) clamp(1.75rem, 4vw, 3.75rem);
}

.auth-split::before,
.auth-split::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.auth-split::after {
    background:
        radial-gradient(ellipse 55% 60% at 12% 85%, rgba(17, 223, 140, 0.16), transparent 55%),
        linear-gradient(90deg, #071624 0%, var(--auth-ink) 36%, #c5d4e0 68%, #ffffff 100%);
}

.auth-split::before {
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(90deg, #000 0%, #000 42%, transparent 72%);
    animation: auth-grid-drift 28s linear infinite;
}

.auth-split__story-inner {
    position: relative;
    z-index: 1;
    max-width: 560px;
    width: 100%;
    margin-inline: auto;
}

.auth-split__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    text-decoration: none;
    color: inherit;
}

.auth-split__brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.auth-split__brand-mark img {
    max-width: 34px;
    max-height: 34px;
    object-fit: contain;
}

.auth-split__brand-name {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
}

.auth-split__headline {
    font-size: clamp(1.65rem, 2.6vw, 2.35rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 0.85rem;
    color: #fff;
}

.auth-split__lede {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--auth-mist);
    margin: 0 0 2.25rem;
    max-width: 36ch;
}

/* ── Payment flow diagram ────────────────────────────────────── */
.auth-flow {
    position: relative;
    padding: 1.5rem 0 0.5rem;
}

.auth-flow__track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
    align-items: start;
    position: relative;
}

.auth-flow__rail {
    position: absolute;
    top: 28px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: var(--auth-line);
    overflow: hidden;
    border-radius: 999px;
    pointer-events: none;
}

.auth-flow__pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 28%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, var(--auth-accent), transparent);
    animation: auth-pulse-travel 3.2s var(--auth-ease) infinite;
}

.auth-flow__node {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.7rem;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(10px);
    animation: auth-node-in 0.7s var(--auth-ease) forwards;
}

.auth-flow__node:nth-child(3) { animation-delay: 0.05s; }
.auth-flow__node:nth-child(4) { animation-delay: 0.18s; }
.auth-flow__node:nth-child(5) { animation-delay: 0.31s; }
.auth-flow__node:nth-child(6) { animation-delay: 0.44s; }

.auth-flow__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #d7e6ef;
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-flow__icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-flow__node--hub .auth-flow__icon {
    background: var(--auth-accent-soft);
    border-color: rgba(43, 184, 166, 0.55);
    color: #7fe8d8;
    box-shadow: 0 0 0 6px rgba(43, 184, 166, 0.08);
    animation: auth-hub-glow 3.2s var(--auth-ease) infinite;
}

.auth-flow__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #e8f0f6;
    letter-spacing: 0.01em;
    line-height: 1.3;
}

.auth-flow__hint {
    font-size: 0.7rem;
    color: var(--auth-mist);
    line-height: 1.35;
    max-width: 9.5rem;
}

.auth-flow__caption {
    margin-top: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--auth-mist);
    font-size: 0.85rem;
    line-height: 1.5;
}

.auth-flow__caption-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--auth-accent);
    box-shadow: 0 0 0 0 rgba(43, 184, 166, 0.55);
    animation: auth-live-ping 2s ease-out infinite;
    flex-shrink: 0;
}

/* Floating packet along the rail */
.auth-flow__packet {
    position: absolute;
    top: 20px;
    left: 12.5%;
    width: 18px;
    height: 18px;
    margin-left: -9px;
    border-radius: 6px;
    background: linear-gradient(145deg, #5eead4, #2bb8a6);
    box-shadow: 0 0 18px rgba(43, 184, 166, 0.55);
    animation: auth-packet-travel 3.2s var(--auth-ease) infinite;
    pointer-events: none;
    z-index: 2;
}

.auth-flow__packet::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.35);
}

/* ── Form panel ──────────────────────────────────────────────── */
.auth-split__panel {
    grid-area: panel;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    background: transparent;
    position: relative;
    z-index: 1;
}

.auth-split__panel-inner {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    width: 100%;
    max-width: 440px;
    margin-inline: auto;
}

.auth-split__panel .brand-logo {
    margin-bottom: 1.5rem;
}

.auth-split__panel .brand-logo .logo-img-lg {
    max-height: 52px;
}

.auth-split__panel .card {
    border: 0;
    box-shadow: 0 18px 40px rgba(11, 31, 51, 0.08);
    border-radius: 16px;
    background: var(--auth-card);
}

.auth-split__panel .card-inner-lg {
    padding: 1.75rem 1.5rem;
}

.auth-split__footer {
    position: relative;
    z-index: 1;
    padding: 1rem 1.5rem 1.5rem;
    max-width: 440px;
    width: 100%;
    margin-inline: auto;
}

.auth-split__footer .nav {
    flex-wrap: wrap;
    gap: 0.15rem;
}

.auth-split__footer .text-soft {
    color: #8094a7 !important;
    font-size: 0.8rem;
    margin: 0.75rem 0 0;
}

/* Hide default centered auth body constraints inside split */
.auth-split .nk-auth-body {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
}

.auth-split .nk-auth-footer-full {
    display: none;
}

/* ── RTL ─────────────────────────────────────────────────────── */
html[dir="rtl"] .auth-split {
    grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
    grid-template-areas: "panel story";
}

html[dir="rtl"] .auth-split__story,
html[dir="rtl"] .auth-split__panel {
    direction: rtl;
}

html[dir="rtl"] .auth-split::after {
    transform: scaleX(-1);
}

html[dir="rtl"] .auth-split::before {
    transform: scaleX(-1);
    animation-name: auth-grid-drift-rtl;
}

[dir="rtl"] .auth-flow__pulse {
    animation-name: auth-pulse-travel-rtl;
}

[dir="rtl"] .auth-flow__packet {
    left: auto;
    right: 12.5%;
    margin-left: 0;
    margin-right: -9px;
    animation-name: auth-packet-travel-rtl;
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes auth-grid-drift {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(48px, 24px, 0); }
}

@keyframes auth-grid-drift-rtl {
    from { transform: scaleX(-1) translate3d(0, 0, 0); }
    to { transform: scaleX(-1) translate3d(-48px, 24px, 0); }
}

@keyframes auth-node-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes auth-pulse-travel {
    0% { transform: translateX(-20%); opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { transform: translateX(320%); opacity: 0; }
}

@keyframes auth-pulse-travel-rtl {
    0% { transform: translateX(20%); opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { transform: translateX(-320%); opacity: 0; }
}

@keyframes auth-packet-travel {
    0% { left: 12.5%; opacity: 0; transform: scale(0.7); }
    8% { opacity: 1; transform: scale(1); }
    92% { opacity: 1; transform: scale(1); }
    100% { left: 87.5%; opacity: 0; transform: scale(0.7); }
}

@keyframes auth-packet-travel-rtl {
    0% { right: 12.5%; opacity: 0; transform: scale(0.7); }
    8% { opacity: 1; transform: scale(1); }
    92% { opacity: 1; transform: scale(1); }
    100% { right: 87.5%; opacity: 0; transform: scale(0.7); }
}

@keyframes auth-hub-glow {
    0%, 100% { box-shadow: 0 0 0 6px rgba(43, 184, 166, 0.08); }
    50% { box-shadow: 0 0 0 10px rgba(43, 184, 166, 0.16); }
}

@keyframes auth-live-ping {
    0% { box-shadow: 0 0 0 0 rgba(43, 184, 166, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(43, 184, 166, 0); }
    100% { box-shadow: 0 0 0 0 rgba(43, 184, 166, 0); }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .auth-flow__hint {
        display: none;
    }

    .auth-flow__label {
        font-size: 0.72rem;
    }
}

@media (max-width: 991px) {
    .auth-split {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        grid-template-areas:
            "story"
            "panel";
    }

    .auth-split::after {
        background:
            radial-gradient(ellipse 70% 40% at 20% 8%, rgba(17, 223, 140, 0.16), transparent 50%),
            linear-gradient(180deg, #071624 0%, var(--auth-ink) 32%, #c5d4e0 62%, #ffffff 100%);
        transform: none;
    }

    .auth-split::before {
        mask-image: linear-gradient(180deg, #000 0%, #000 36%, transparent 62%);
        transform: none;
        animation-name: auth-grid-drift;
    }

    html[dir="rtl"] .auth-split::after {
        transform: none;
        background:
            radial-gradient(ellipse 70% 40% at 80% 8%, rgba(17, 223, 140, 0.16), transparent 50%),
            linear-gradient(180deg, #071624 0%, var(--auth-ink) 32%, #c5d4e0 62%, #ffffff 100%);
    }

    html[dir="rtl"] .auth-split::before {
        transform: none;
        animation-name: auth-grid-drift;
        mask-image: linear-gradient(180deg, #000 0%, #000 36%, transparent 62%);
    }

    .auth-split__story {
        padding: 1.5rem 1.25rem 1.75rem;
        min-height: auto;
    }

    .auth-split__brand {
        margin-bottom: 1.1rem;
    }

    .auth-split__headline {
        font-size: 1.35rem;
        margin-bottom: 0.5rem;
    }

    .auth-split__lede {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
        max-width: none;
    }

    .auth-flow {
        padding-top: 0.75rem;
    }

    .auth-flow__icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .auth-flow__icon svg {
        width: 20px;
        height: 20px;
    }

    .auth-flow__rail {
        top: 22px;
    }

    .auth-flow__packet {
        top: 14px;
        width: 14px;
        height: 14px;
        margin-left: -7px;
    }

    [dir="rtl"] .auth-flow__packet {
        margin-right: -7px;
    }

    .auth-flow__caption {
        margin-top: 1.15rem;
        font-size: 0.8rem;
    }

    .auth-split__panel {
        min-height: auto;
    }

    .auth-split__panel-inner {
        padding-top: 1.75rem;
        padding-bottom: 1rem;
        justify-content: flex-start;
    }

    html[dir="rtl"] .auth-split {
        grid-template-columns: 1fr;
        grid-template-areas:
            "story"
            "panel";
    }
}

@media (max-width: 480px) {
    .auth-flow__track {
        gap: 0.15rem;
    }

    .auth-flow__label {
        font-size: 0.65rem;
    }

    .auth-flow__icon {
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-split::before,
    .auth-flow__pulse,
    .auth-flow__packet,
    .auth-flow__node,
    .auth-flow__node--hub .auth-flow__icon,
    .auth-flow__caption-dot {
        animation: none !important;
    }

    .auth-flow__node {
        opacity: 1;
        transform: none;
    }

    .auth-flow__packet {
        display: none;
    }
}

/* ══════════════════════════════════════════════════════════════
   Auth pages — primary #11DF8C (login, reset, 2FA, etc.)
   ══════════════════════════════════════════════════════════════ */

.auth-login-page {
    --auth-login-primary: #11DF8C;
    --auth-login-primary-hover: #0ec578;
    --auth-login-primary-ink: #07331f;
}

.auth-login-page .btn-primary {
    --bs-btn-color: var(--auth-login-primary-ink);
    --bs-btn-bg: var(--auth-login-primary);
    --bs-btn-border-color: var(--auth-login-primary);
    --bs-btn-hover-color: var(--auth-login-primary-ink);
    --bs-btn-hover-bg: var(--auth-login-primary-hover);
    --bs-btn-hover-border-color: var(--auth-login-primary-hover);
    --bs-btn-focus-shadow-rgb: 17, 223, 140;
    --bs-btn-active-color: var(--auth-login-primary-ink);
    --bs-btn-active-bg: var(--auth-login-primary-hover);
    --bs-btn-active-border-color: var(--auth-login-primary-hover);
    --bs-btn-disabled-color: var(--auth-login-primary-ink);
    --bs-btn-disabled-bg: var(--auth-login-primary);
    --bs-btn-disabled-border-color: var(--auth-login-primary);
    background-color: var(--auth-login-primary);
    border-color: var(--auth-login-primary);
    color: var(--auth-login-primary-ink);
}

.auth-login-page .btn-primary:hover,
.auth-login-page .btn-primary:focus,
.auth-login-page .btn-primary:not(:disabled):not(.disabled):active,
.auth-login-page .btn-primary:not(:disabled):not(.disabled).active {
    background-color: var(--auth-login-primary-hover);
    border-color: var(--auth-login-primary-hover);
    color: var(--auth-login-primary-ink);
}

.auth-login-page .text-primary,
.auth-login-page .link-primary,
.auth-login-page a.link,
.auth-login-page .form-note-s2 a,
.auth-login-page .auth-split__footer .link {
    color: var(--auth-login-primary) !important;
}

.auth-login-page .link-primary:hover,
.auth-login-page .link-primary:focus,
.auth-login-page a.link:hover,
.auth-login-page a.link:focus,
.auth-login-page .form-note-s2 a:hover,
.auth-login-page .form-note-s2 a:focus,
.auth-login-page .auth-split__footer .link:hover {
    color: var(--auth-login-primary-hover) !important;
}

.auth-login-page .form-control:focus {
    border-color: var(--auth-login-primary);
    box-shadow: 0 0 0 0.2rem rgba(17, 223, 140, 0.2);
}

.auth-login-page .numeral-mask-wrapper .otp-digit:focus {
    border-color: var(--auth-login-primary);
    box-shadow: 0 0 0 0.2rem rgba(17, 223, 140, 0.2);
}

.auth-lang {
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.auth-lang .ni {
    font-size: 1rem;
    line-height: 1;
}

.auth-lang__name {
    font-size: 0.8125rem;
    font-weight: 600;
}

