:root {
    --auth-ink: #07111f;
    --auth-paper: #ffffff;
    --auth-soft: #f3f6fa;
    --auth-line: #d8e0ea;
    --auth-blue: #075fc9;
    --auth-blue-strong: #064c9d;
    --auth-orange: #ff8a1f;
    --auth-danger: #b42318;
    --auth-success: #087a55;
}

body.page-auth-modern {
    overflow-x: hidden;
    background: #07111f;
}

body.page-auth-modern .desktop-cockpit-header,
body.page-auth-modern .home-header-launcher,
body.page-auth-modern .header-top,
body.page-auth-modern .header-link-chip,
body.page-auth-modern .theme-mode-toggle,
body.page-auth-modern #pwa-install-button {
    display: none !important;
}

body.page-auth-modern .site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #07111f;
    box-shadow: none;
}

body.page-auth-modern .site-header > .container {
    width: min(100% - 24px, 1360px);
    max-width: none;
    padding: 10px 0;
}

body.page-auth-modern .header-shell {
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 14px;
    background: rgba(8, 22, 38, .9);
    box-shadow: 0 16px 36px rgba(0,0,0,.16);
    backdrop-filter: blur(18px);
}

body.page-auth-modern .header-main-inner {
    min-height: 58px;
    padding: 0 12px;
    gap: 12px;
}

body.page-auth-modern .logo-image {
    width: 42px;
    height: 42px;
}

body.page-auth-modern .logo-title {
    color: #fff;
    font-size: .92rem;
}

body.page-auth-modern .logo-subtitle {
    color: rgba(255,255,255,.68);
    font-size: .72rem;
}

body.page-auth-modern .main-nav ul {
    gap: 6px;
}

body.page-auth-modern .main-nav a,
body.page-auth-modern .btn-auth,
body.page-auth-modern .cart-icon-link,
body.page-auth-modern .nav-toggle,
body.page-auth-modern .btn-back-page {
    min-height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,.12);
}

body.page-auth-modern .btn-auth {
    padding: 0 14px;
    background: #075fc9;
}

.sm-auth-page {
    position: relative;
    min-height: calc(100svh - 82px);
    overflow: hidden;
    background: #08111e url('/media/hero/slides/HIRO_1.jpg') center/cover no-repeat;
    color: #fff;
    isolation: isolate;
}

.sm-auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(3, 9, 17, .68), rgba(3, 11, 22, .32) 48%, rgba(3, 10, 20, .88));
}

.sm-auth-page__ambient {
    position: absolute;
    inset: auto 8% -1px 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(86, 158, 255, .8), transparent);
}

.sm-auth-page__layout {
    width: min(100% - 24px, 1360px);
    max-width: none;
    min-height: calc(100svh - 82px);
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(360px, 500px);
    gap: clamp(2rem, 4vw, 4.5rem);
    align-items: center;
    padding: clamp(2.4rem, 6vh, 5rem) 0 clamp(3rem, 7vh, 5rem);
}

.sm-auth-page__copy { max-width: 590px; }
.sm-auth-page__brand { display: inline-flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; font-weight: 800; margin-bottom: 2rem; }
.sm-auth-page__brand img { width: 52px; height: 52px; object-fit: contain; padding: 5px; border-radius: 8px; background: #fff; }
.sm-auth-page__eyebrow, .sm-quick-auth__eyebrow { color: #9fc8ff; font-size: .82rem; font-weight: 800; }
.sm-auth-page h1 { max-width: 620px; margin: .7rem 0 1rem; font-size: clamp(2.1rem, 3.2vw, 3.45rem); line-height: 1.2; letter-spacing: 0; }
.sm-auth-page__copy > p { max-width: 620px; color: #d3dce7; font-size: 1.05rem; line-height: 2; }
.sm-auth-page__benefits { display: none; }
.sm-auth-page__benefits li { display: flex; gap: .75rem; align-items: flex-start; padding: 1rem; border-top: 1px solid rgba(255,255,255,.22); }
.sm-auth-page__benefits li > span { color: #79b3ff; font: 700 .75rem/1 sans-serif; }
.sm-auth-page__benefits strong, .sm-auth-page__benefits small { display: block; }
.sm-auth-page__benefits small { color: #aab8c9; margin-top: .35rem; line-height: 1.65; }

.sm-auth-card {
    width: 100%;
    padding: clamp(1.5rem, 3vw, 2.4rem);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 8px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 28px 80px rgba(0,0,0,.34);
    color: var(--auth-ink);
    backdrop-filter: blur(18px);
}

.sm-auth-card__head { margin-bottom: 1.35rem; }
.sm-auth-card__step { color: var(--auth-blue); font-size: .78rem; font-weight: 800; }
.sm-auth-card h2, .sm-quick-auth h2 { margin: .45rem 0 .4rem; color: var(--auth-ink); font-size: 1.65rem; }
.sm-auth-card__head p, .sm-quick-auth__surface > p { margin: 0; color: #617084; line-height: 1.8; }

.sm-otp-stage { display: grid; gap: .7rem; }
.sm-otp-stage[hidden] { display: none !important; }
.sm-otp-stage label { color: #26354a; font-size: .86rem; font-weight: 800; }
.sm-otp-stage small { color: #6d7988; }
.sm-otp-control { position: relative; }
.sm-otp-control input, .sm-otp-code {
    width: 100%;
    min-height: 54px;
    border: 1px solid var(--auth-line);
    border-radius: 7px;
    background: var(--auth-soft);
    color: var(--auth-ink);
    font: inherit;
    font-size: 1.05rem;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.sm-otp-control input { direction: ltr; text-align: left; padding: 0 1rem 0 4.8rem; }
.sm-otp-control span { position: absolute; left: 1rem; top: 50%; translate: 0 -50%; color: #7a8797; border-right: 1px solid var(--auth-line); padding-right: .8rem; }
.sm-otp-code {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.sm-otp-control input:focus, .sm-otp-code:focus { border-color: var(--auth-blue); background: #fff; box-shadow: 0 0 0 4px rgba(7,95,201,.12); }
.sm-otp-primary { min-height: 52px; margin-top: .45rem; border: 0; border-radius: 7px; background: var(--auth-blue); color: #fff; font: inherit; font-weight: 850; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.sm-otp-primary:hover { background: var(--auth-blue-strong); transform: translateY(-1px); }
.sm-otp-primary:disabled { opacity: .62; cursor: wait; transform: none; }
.sm-otp-verify-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.sm-otp-back, .sm-otp-resend { justify-self: start; border: 0; background: none; color: var(--auth-blue); font: inherit; font-size: .84rem; cursor: pointer; padding: .2rem 0; }
.sm-otp-resend:disabled { color: #8995a5; cursor: default; }
.sm-otp-sent-to { margin: 0; color: #647286; font-size: .84rem; }
.sm-otp-message { display: none; margin-top: .85rem; padding: .75rem .9rem; border-radius: 7px; font-size: .86rem; line-height: 1.7; }
.sm-otp-message.is-visible { display: block; }
.sm-otp-message.is-error { color: var(--auth-danger); background: #fff1f0; border: 1px solid #ffc9c5; }
.sm-otp-message.is-success { color: var(--auth-success); background: #edfdf7; border: 1px solid #b9edd9; }
.sm-otp-boxes {
    --otp-size: clamp(48px, 8vw, 62px);
    --otp-gap: clamp(7px, 1.8vw, 12px);
    display: flex;
    justify-content: center;
    gap: var(--otp-gap);
    direction: ltr;
    perspective: 1200px;
    transform-style: preserve-3d;
    position: relative;
    min-height: clamp(58px, 9vw, 72px);
}

.sm-otp-box {
    width: var(--otp-size);
    height: clamp(58px, 9vw, 72px);
    border: 1px solid #d8e0ea;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(236,241,247,.92)),
        #f3f6fa;
    color: #07111f;
    text-align: center;
    font: 900 clamp(1.45rem, 3vw, 2.05rem)/1 var(--site-font, inherit);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.88),
        0 14px 28px rgba(7,17,31,.11);
    outline: none;
    transform-origin: 50% 100%;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}

.sm-otp-box:focus {
    border-color: var(--auth-blue);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.92),
        0 0 0 5px rgba(7,95,201,.12),
        0 18px 34px rgba(7,17,31,.16);
    transform: translateY(-5px) rotateX(7deg);
}

.sm-otp-box.filled {
    border-color: rgba(255,138,31,.92);
    background: linear-gradient(180deg, #1182ff, #075fc9 58%, #064c9d);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        0 0 0 4px rgba(255,138,31,.12),
        0 18px 34px rgba(7,95,201,.2);
}

.sm-otp-box.is-rolling {
    animation: smOtpRollUp .48s cubic-bezier(.2,.9,.2,1.25);
}

.sm-otp-box.is-shaking {
    animation: smOtpShake .42s ease;
}

.sm-otp-boxes.is-complete .sm-otp-box {
    animation: smOtpComplete .72s cubic-bezier(.2,.9,.2,1.18);
}

.sm-otp-boxes.is-verifying .sm-otp-box {
    animation: smOtpPulseGlow 1s ease-in-out infinite;
}

.sm-otp-boxes.is-verified .sm-otp-box {
    color: transparent;
    border-color: rgba(255,138,31,.9);
    background: linear-gradient(180deg, #1182ff, #075fc9 60%, #064c9d);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        0 0 0 5px rgba(255,138,31,.14),
        0 22px 44px rgba(7,95,201,.24);
    animation: smOtpMergeToCenter .48s cubic-bezier(.4,0,.2,1) forwards;
}

.sm-otp-boxes.is-verified .sm-otp-box:nth-child(1) { --merge-x: calc((var(--otp-size) + var(--otp-gap)) * 2); --merge-r: 10deg; }
.sm-otp-boxes.is-verified .sm-otp-box:nth-child(2) { --merge-x: calc(var(--otp-size) + var(--otp-gap)); --merge-r: 10deg; }
.sm-otp-boxes.is-verified .sm-otp-box:nth-child(3) { --merge-x: 0px; --merge-r: 0deg; }
.sm-otp-boxes.is-verified .sm-otp-box:nth-child(4) { --merge-x: calc((var(--otp-size) + var(--otp-gap)) * -1); --merge-r: -10deg; }
.sm-otp-boxes.is-verified .sm-otp-box:nth-child(5) { --merge-x: calc((var(--otp-size) + var(--otp-gap)) * -2); --merge-r: -10deg; }

.sm-otp-boxes.is-verified::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: calc(var(--otp-size) * .44);
    height: calc(var(--otp-size) * .24);
    border-left: 4px solid #fff;
    border-bottom: 4px solid #fff;
    border-radius: 2px;
    filter: drop-shadow(0 0 6px rgba(255,255,255,.65));
    transform: translate(-50%, -68%) rotate(-45deg) scale(.55);
    transform-origin: center;
    opacity: 0;
    animation: smOtpCheckDraw .42s ease .48s forwards;
    z-index: 5;
}

.sm-otp-boxes.is-verified + .sm-otp-celebration {
    color: var(--auth-blue);
}

.sm-otp-boxes.is-verified ~ .sm-otp-sent-to,
.sm-otp-boxes.is-verified ~ .sm-otp-resend,
.sm-otp-boxes.is-verified ~ .sm-otp-back {
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition: opacity .28s ease, transform .28s ease;
}

.sm-otp-boxes.is-complete .sm-otp-box:nth-child(2) { animation-delay: .04s; }
.sm-otp-boxes.is-complete .sm-otp-box:nth-child(3) { animation-delay: .08s; }
.sm-otp-boxes.is-complete .sm-otp-box:nth-child(4) { animation-delay: .12s; }
.sm-otp-boxes.is-complete .sm-otp-box:nth-child(5) { animation-delay: .16s; }

.sm-otp-celebration {
    min-height: 28px;
    color: var(--auth-blue);
    font-weight: 900;
    text-align: center;
    opacity: 0;
    transform: translateY(8px) scale(.98);
    transition: opacity .24s ease, transform .24s ease;
}

.sm-otp-celebration.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@keyframes smOtpRollUp {
    0% { transform: translateY(18px) rotateX(-82deg) scale(.9); opacity: .35; }
    52% { transform: translateY(-10px) rotateX(16deg) scale(1.06); opacity: 1; }
    100% { transform: translateY(0) rotateX(0) scale(1); opacity: 1; }
}

@keyframes smOtpComplete {
    0% { transform: translateY(0) rotateX(0) scale(1); }
    42% { transform: translateY(-16px) rotateX(22deg) scale(1.06); }
    100% { transform: translateY(0) rotateX(0) scale(1); }
}

@keyframes smOtpShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-7px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

@keyframes smOtpPulseGlow {
    0%, 100% {
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,.24),
            0 0 0 4px rgba(255,138,31,.1),
            0 18px 34px rgba(7,95,201,.18);
    }
    50% {
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,.28),
            0 0 0 8px rgba(255,138,31,.2),
            0 24px 44px rgba(7,95,201,.26);
    }
}

@keyframes smOtpMergeToCenter {
    0% {
        transform: translateX(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    62% {
        transform: translateX(var(--merge-x)) rotate(var(--merge-r)) scale(1.03);
        opacity: 1;
    }
    100% {
        transform: translateX(var(--merge-x)) rotate(0deg) scale(.96);
        opacity: 1;
    }
}

@keyframes smOtpCheckDraw {
    0% {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
        transform: translate(-50%, -68%) rotate(-45deg) scale(.55);
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
        transform: translate(-50%, -68%) rotate(-45deg) scale(1);
    }
}
.sm-auth-divider { display: flex; align-items: center; gap: .8rem; color: #8a96a5; margin: 1.3rem 0; font-size: .78rem; }
.sm-auth-divider::before, .sm-auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--auth-line); }
.sm-auth-google { display: flex; min-height: 48px; align-items: center; justify-content: center; gap: .65rem; border: 1px solid var(--auth-line); border-radius: 7px; color: #1d2b3d; text-decoration: none; font-weight: 800; }
.sm-auth-google span { color: #4285f4; font: 900 1.1rem/1 Arial, sans-serif; }
.sm-auth-card__terms { margin: 1.25rem 0 0; color: #7a8797; text-align: center; font-size: .75rem; line-height: 1.7; }

.sm-quick-auth { width: min(94vw, 460px); padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--auth-ink); }
.sm-quick-auth::backdrop { background: rgba(2,8,17,.74); backdrop-filter: blur(5px); }
.sm-quick-auth__surface { position: relative; padding: 2rem; border: 1px solid #e0e6ee; border-radius: 8px; background: #fff; box-shadow: 0 24px 90px rgba(0,0,0,.38); }
.sm-quick-auth__close { position: absolute; left: .8rem; top: .7rem; width: 38px; height: 38px; border: 0; border-radius: 6px; background: #eff3f8; color: #2d3b4d; font-size: 1.4rem; cursor: pointer; }
.sm-quick-auth__mark img { width: 48px; height: 48px; object-fit: contain; border: 1px solid #e3e8ef; border-radius: 7px; padding: 5px; margin-bottom: .9rem; }
.sm-quick-auth__eyebrow { color: var(--auth-blue); }
.sm-quick-auth .sm-otp-flow { margin-top: 1.3rem; }
body.sm-auth-open { overflow: hidden; }

@media (max-width: 900px) {
    body.page-auth-modern .site-header > .container {
        width: min(100% - 16px, 720px);
        padding: 8px 0;
    }

    body.page-auth-modern .header-main-inner {
        min-height: 54px;
    }

    body.page-auth-modern .main-nav {
        position: fixed;
        inset: 0 0 0 auto;
        width: min(86vw, 340px);
        height: 100svh;
        padding: 18px;
        overflow-y: auto;
        transform: translateX(110%);
        transition: transform .22s ease;
        background: #07111f;
        border-left: 1px solid rgba(255,255,255,.12);
        box-shadow: -24px 0 70px rgba(0,0,0,.35);
    }

    body.page-auth-modern .main-nav.is-open {
        transform: translateX(0);
    }

    body.page-auth-modern .main-nav ul {
        display: grid;
        gap: 8px;
        margin-top: 16px;
    }

    body.page-auth-modern .main-nav a {
        justify-content: flex-start;
        min-height: 46px;
        padding: 0 14px;
    }

    body.page-auth-modern .header-actions {
        gap: 7px;
    }

    body.page-auth-modern .btn-auth {
        display: inline-flex;
        min-width: 106px;
        justify-content: center;
        font-size: .78rem;
    }

    body.page-auth-modern .cart-icon-link {
        display: none;
    }

    .sm-auth-page__layout { grid-template-columns: 1fr; gap: 1.35rem; padding: 1.25rem 0 2rem; }
    .sm-auth-page__copy { text-align: center; margin-inline: auto; }
    .sm-auth-page__brand { margin-bottom: 1.2rem; }
    .sm-auth-page h1 { font-size: 2.15rem; }
    .sm-auth-page__benefits { grid-template-columns: 1fr; text-align: right; }
    .sm-auth-page__benefits li { padding: .75rem 0; }
}

@media (max-width: 560px) {
    body.page-auth-modern .site-header > .container {
        width: calc(100% - 14px);
    }

    body.page-auth-modern .header-shell {
        border-radius: 12px;
    }

    body.page-auth-modern .header-main-inner {
        padding: 0 8px;
    }

    body.page-auth-modern .logo-image {
        width: 36px;
        height: 36px;
    }

    body.page-auth-modern .logo-title {
        font-size: .78rem;
    }

    body.page-auth-modern .logo-subtitle,
    body.page-auth-modern .btn-back-page {
        display: none !important;
    }

    body.page-auth-modern .btn-auth {
        min-width: 98px;
        min-height: 36px;
        padding: 0 10px;
    }

    body.page-auth-modern .nav-toggle {
        width: 40px;
        height: 40px;
        min-height: 40px;
    }

    .sm-auth-page { min-height: calc(100svh - 72px); }
    .sm-auth-page__layout {
        width: calc(100% - 24px);
        min-height: auto;
        padding: 1rem 0 1.6rem;
    }
    .sm-auth-page__copy > p, .sm-auth-page__benefits { display: none; }
    .sm-auth-page__brand { justify-content: center; }
    .sm-auth-page__brand img {
        width: 44px;
        height: 44px;
    }
    .sm-auth-page h1 { font-size: 1.55rem; margin-bottom: .25rem; line-height: 1.35; }
    .sm-auth-card, .sm-quick-auth__surface { padding: 1.05rem; border-radius: 12px; }
    .sm-auth-card__head {
        margin-bottom: 1rem;
    }
    .sm-auth-card h2,
    .sm-quick-auth h2 {
        font-size: 1.28rem;
    }
    .sm-otp-control input,
    .sm-otp-primary {
        min-height: 50px;
        border-radius: 10px;
    }
    .sm-otp-box {
        width: var(--otp-size);
        height: 58px;
        border-radius: 14px;
    }
    .sm-otp-boxes {
        --otp-size: clamp(48px, 15.2vw, 58px);
        --otp-gap: 7px;
    }
    .sm-otp-control input {
        padding-left: 4.4rem;
    }
    .sm-quick-auth { width: calc(100vw - 1rem); margin: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .sm-otp-primary,
    .sm-otp-box,
    .sm-otp-box.is-rolling,
    .sm-otp-box.is-shaking,
    .sm-otp-boxes.is-complete .sm-otp-box,
    .sm-otp-celebration {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}
