:root {
    --sorl-navy: #071a36;
    --sorl-navy-2: #0b274f;
    --sorl-ink: #102033;
    --sorl-muted: #667387;
    --sorl-line: #d9e2ee;
    --sorl-soft: #f3f7fb;
    --sorl-white: #ffffff;
    --sorl-red: #e11118;
    --sorl-red-dark: #bd0f15;
    --sorl-brand: #071a36;
    --sorl-shadow: 0 24px 56px rgba(7, 26, 54, 0.14);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    min-width: 320px;
    margin: 0;
    overflow: hidden;
}

body {
    color: var(--sorl-ink);
    background: linear-gradient(180deg, #f8fbff 0%, var(--sorl-soft) 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    letter-spacing: 0;
}

body.auth-body {
    max-width: none !important;
    overflow: hidden !important;
    padding: 0 !important;
}

body .motion-reveal {
    opacity: 1 !important;
    transform: none !important;
}

a,
button,
input,
textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

.auth-login-shell {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 598px) minmax(350px, 470px);
    align-items: center;
    justify-content: center;
    gap: 42px;
    padding: 28px clamp(24px, 5vw, 82px);
    overflow: hidden;
}

.auth-login-close {
    position: fixed;
    top: max(18px, env(safe-area-inset-top));
    right: max(18px, env(safe-area-inset-right));
    z-index: 20;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--sorl-white);
    border-radius: 7px;
    background: var(--sorl-red);
    box-shadow: 0 18px 36px rgba(225, 17, 24, 0.22);
    font-size: 25px;
    font-weight: 900;
    line-height: 1;
}

.auth-login-close:focus-visible,
.auth-register-button:focus-visible,
.login-form button:focus-visible,
.password-toggle:focus-visible,
.input-wrap:focus-within {
    outline: 3px solid rgba(225, 17, 24, 0.22);
    outline-offset: 2px;
}

.auth-showcase {
    position: relative;
    width: 100%;
    height: min(748px, calc(100dvh - 56px));
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, auto) minmax(150px, 280px);
    align-content: stretch;
    gap: 22px;
    padding: 42px 52px;
    overflow: hidden;
    color: var(--sorl-white);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(7, 26, 54, 0.98), rgba(11, 39, 79, 0.96)),
        var(--sorl-navy);
    box-shadow: 0 26px 70px rgba(7, 26, 54, 0.18);
}

.auth-showcase::before {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 38%;
    background: linear-gradient(180deg, rgba(7, 26, 54, 0), rgba(255, 255, 255, 0.06));
    pointer-events: none;
}

.brand,
.auth-showcase-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark,
.site-logo-mark {
    width: 58px;
    height: 42px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 6px;
    background: var(--sorl-white);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span,
.site-logo-mark::before,
.site-logo-mark::after,
.site-logo-mark span {
    display: none;
}

.site-logo-mark img,
.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.auth-showcase-brand > div,
.brand > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.auth-showcase-brand strong,
.brand strong {
    min-width: 0;
    overflow: hidden;
    color: var(--sorl-white);
    font-size: 19px;
    font-weight: 950;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-showcase-brand small {
    min-width: 0;
    overflow: hidden;
    color: #c5d5e8;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-showcase-copy {
    position: relative;
    z-index: 1;
    align-self: end;
    display: grid;
    gap: 16px;
    max-width: 520px;
}

.auth-showcase-copy h1 {
    margin: 0;
    color: var(--sorl-white);
    font-size: 52px;
    font-weight: 950;
    line-height: 1.08;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.auth-showcase-copy p {
    max-width: 485px;
    margin: 0;
    color: #d7e1ee;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.55;
}

.auth-showcase-scene {
    position: relative;
    z-index: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(132px, 0.85fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.auth-shop-mini {
    position: absolute;
    left: 16px;
    top: 16px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: var(--sorl-white);
    border-radius: 6px;
    background: rgba(7, 26, 54, 0.88);
    font-size: 12px;
    font-weight: 950;
}

.auth-shop-mini i {
    padding: 5px 9px;
    color: var(--sorl-white);
    border-radius: 999px;
    background: #a8844a;
    font-style: normal;
}

.auth-product,
.auth-metric-card {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 7px;
    background: var(--sorl-white);
}

.auth-product-main {
    grid-row: 1 / span 2;
}

.auth-product img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-product-side img {
    object-fit: contain;
    padding: 12px;
}

.auth-metric-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    color: var(--sorl-navy);
}

.auth-metric-card > div {
    display: grid;
    gap: 8px;
}

.auth-metric-card span {
    color: #53627a;
    font-size: 12px;
    font-weight: 950;
    line-height: 1.2;
}

.auth-metric-card small {
    width: fit-content;
    padding: 7px 10px;
    color: #53627a;
    border: 1px solid #dfe7f1;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
}

.auth-metric-card dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.auth-metric-card dl div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 8px;
    align-items: center;
}

.auth-metric-card dt {
    grid-column: 1 / -1;
    color: #667387;
    font-size: 11px;
    font-weight: 950;
}

.auth-metric-card dd {
    min-width: 0;
    margin: 0;
    color: var(--sorl-navy);
    font-size: 17px;
    font-weight: 950;
}

.auth-metric-card em {
    justify-self: end;
    padding: 5px 7px;
    color: #071a36;
    border-radius: 6px;
    background: #f3f7fb;
    font-size: 11px;
    font-style: normal;
    font-weight: 950;
}

.auth-login-card,
.auth-register-card,
.auth-page .login-panel {
    width: 100%;
    max-height: calc(100dvh - 56px);
    min-height: 0;
    overflow: auto;
    color: var(--sorl-ink);
    border: 1px solid var(--sorl-line);
    border-radius: 8px;
    background: var(--sorl-white);
    box-shadow: var(--sorl-shadow);
    scrollbar-width: thin;
    scrollbar-color: #bdcadb transparent;
}

.auth-login-card,
.auth-page .login-panel {
    padding: 36px;
}

.auth-register-card {
    padding: 30px;
}

.auth-mobile-badge {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 8px 11px;
    color: var(--sorl-navy);
    border-radius: 999px;
    background: #eef3f8;
    font-size: 12px;
    font-weight: 950;
}

.auth-mobile-badge span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sorl-brand);
}

.auth-login-card h1,
.auth-register-card h1,
.auth-page .login-panel h1 {
    margin: 0;
    color: var(--sorl-navy);
    font-size: 39px;
    font-weight: 950;
    line-height: 1.08;
    letter-spacing: 0;
}

.auth-register-card h1 {
    font-size: 34px;
}

.auth-login-card > p,
.auth-register-card > p,
.auth-page .login-panel > p {
    margin: 12px 0 22px;
    color: var(--sorl-muted);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.55;
}

.login-form {
    display: grid;
    gap: 13px;
}

.auth-register-card .login-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.login-form label {
    min-width: 0;
    display: grid;
    gap: 7px;
    color: var(--sorl-navy);
    font-size: 13px;
    font-weight: 950;
}

.register-address-field,
.auth-register-card .login-form > button[type="submit"] {
    grid-column: 1 / -1;
}

.input-wrap.is-plain {
    min-width: 0;
    min-height: 48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid var(--sorl-line);
    border-radius: 6px;
    background: #f8fafc;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.input-wrap.is-plain:focus-within {
    border-color: var(--sorl-navy);
    background: var(--sorl-white);
    box-shadow: 0 0 0 3px rgba(7, 26, 54, 0.1);
}

.input-wrap input,
.input-wrap textarea {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--sorl-ink);
    background: transparent;
    font-size: 14px;
    font-weight: 800;
}

.input-wrap input {
    height: 46px;
    padding: 0;
}

.input-wrap textarea {
    min-height: 68px;
    max-height: 68px;
    padding: 11px 0;
    resize: none;
    line-height: 1.35;
}

.input-wrap input::placeholder,
.input-wrap textarea::placeholder {
    color: #92a0b3;
}

.password-toggle {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    margin: 0;
    color: var(--sorl-navy);
    border: 0;
    border-radius: 6px;
    background: #eef3f8;
}

.login-options {
    min-height: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.login-options label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--sorl-muted);
    font-size: 13px;
    font-weight: 900;
}

.login-options input {
    width: 16px;
    height: 16px;
    accent-color: var(--sorl-navy);
}

.login-form > button[type="submit"] {
    min-height: 48px;
    margin-top: 2px;
    color: var(--sorl-white);
    border: 0;
    border-radius: 6px;
    background: var(--sorl-red);
    box-shadow: 0 14px 28px rgba(225, 17, 24, 0.22);
    font-size: 15px;
    font-weight: 950;
}

.login-form > button[type="submit"]:hover {
    background: var(--sorl-red-dark);
}

.auth-register-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    padding: 0 16px;
    color: var(--sorl-navy);
    border: 1px solid var(--sorl-line);
    border-radius: 6px;
    background: var(--sorl-white);
    font-size: 13px;
    font-weight: 900;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.auth-register-button:hover {
    color: var(--sorl-red);
    border-color: #b9c8da;
    background: var(--sorl-soft);
}

.auth-register-mobile,
.auth-social-mobile,
.auth-divider,
.demo-box {
    display: none;
}

.alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 6px;
    font-weight: 850;
    line-height: 1.45;
}

.alert-error {
    color: #b42318;
    border: 1px solid #ffd5d2;
    background: #fff1f0;
}

.alert-info {
    color: #0b3f7a;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
}

.auth-page {
    width: 100%;
    height: 100dvh;
    display: grid;
    place-items: center;
    padding: 20px;
    overflow: hidden;
}

.auth-page .login-panel {
    max-width: 460px;
}

.auth-page .brand {
    margin-bottom: 26px;
}

.auth-page .brand strong {
    color: var(--sorl-navy);
}

@media (max-width: 1180px) {
    .auth-login-shell {
        grid-template-columns: minmax(0, 540px) minmax(340px, 440px);
        gap: 28px;
        padding-inline: 30px;
    }

    .auth-showcase {
        padding: 36px;
    }

    .auth-showcase-copy h1 {
        font-size: 44px;
    }
}

@media (max-height: 760px) and (min-width: 781px) {
    .auth-login-shell {
        gap: 26px;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .auth-showcase {
        height: calc(100dvh - 36px);
        grid-template-rows: auto minmax(0, auto) minmax(128px, 210px);
        gap: 16px;
        padding: 28px;
    }

    .auth-showcase-copy {
        gap: 10px;
    }

    .auth-showcase-copy h1 {
        font-size: 38px;
    }

    .auth-showcase-copy p {
        font-size: 14px;
        line-height: 1.45;
    }

    .auth-showcase-scene {
        gap: 10px;
    }

    .auth-metric-card {
        gap: 8px;
        padding: 12px;
    }

    .auth-metric-card small,
    .auth-metric-card dt,
    .auth-metric-card em {
        font-size: 10px;
    }

    .auth-metric-card dd {
        font-size: 14px;
    }

    .auth-login-card,
    .auth-page .login-panel {
        padding: 26px;
    }

    .auth-register-card {
        padding: 22px;
    }

    .auth-mobile-badge {
        margin-bottom: 12px;
    }

    .auth-login-card h1,
    .auth-page .login-panel h1 {
        font-size: 31px;
    }

    .auth-register-card h1 {
        font-size: 28px;
    }

    .auth-login-card > p,
    .auth-register-card > p,
    .auth-page .login-panel > p {
        margin: 8px 0 14px;
        font-size: 13px;
        line-height: 1.4;
    }

    .login-form,
    .auth-register-card .login-form {
        gap: 9px;
    }

    .login-form label {
        gap: 5px;
        font-size: 12px;
    }

    .input-wrap.is-plain {
        min-height: 42px;
    }

    .input-wrap input {
        height: 40px;
        font-size: 13px;
    }

    .input-wrap textarea {
        min-height: 52px;
        max-height: 52px;
        padding: 8px 0;
        font-size: 13px;
    }

    .password-toggle {
        width: 30px;
        height: 30px;
    }

    .login-form > button[type="submit"],
    .auth-register-button {
        min-height: 40px;
    }
}

@media (max-width: 780px) {
    body.auth-body {
        max-width: none !important;
        overflow: hidden !important;
        padding: 0 !important;
        background: var(--sorl-soft) !important;
    }

    .auth-login-shell {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        align-items: stretch;
        justify-content: stretch;
        gap: 10px;
        padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
        background: var(--sorl-soft);
    }

    .auth-login-close {
        top: max(12px, env(safe-area-inset-top));
        right: max(12px, env(safe-area-inset-right));
        width: 38px;
        height: 38px;
        font-size: 23px;
    }

    .auth-showcase {
        height: auto;
        max-height: none;
        grid-template-rows: auto auto;
        gap: 12px;
        padding: 14px 54px 14px 14px;
        border-radius: 8px;
    }

    .auth-showcase::before,
    .auth-showcase-scene {
        display: none;
    }

    .auth-showcase-brand {
        gap: 10px;
    }

    .brand-mark,
    .site-logo-mark {
        width: 46px;
        height: 34px;
        flex-basis: 46px;
    }

    .auth-showcase-brand strong {
        font-size: 14px;
    }

    .auth-showcase-brand small {
        font-size: 10px;
    }

    .auth-showcase-copy {
        display: none;
    }

    .auth-login-card,
    .auth-register-card,
    .auth-page .login-panel {
        height: auto;
        max-height: none;
        align-self: start;
        overflow: visible;
        padding: 18px;
        border-radius: 8px;
        box-shadow: 0 16px 36px rgba(7, 26, 54, 0.12);
    }

    .auth-login-card h1,
    .auth-page .login-panel h1 {
        font-size: 30px;
    }

    .auth-register-card h1 {
        font-size: 26px;
    }

    .auth-login-card > p,
    .auth-register-card > p,
    .auth-page .login-panel > p {
        margin: 9px 0 16px;
        font-size: 13px;
        line-height: 1.45;
    }

    .auth-register-card > p {
        display: none;
    }

    .auth-register-card .login-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 10px;
    }

    .login-form {
        gap: 11px;
    }

    .login-form label {
        gap: 6px;
    }

    .auth-register-card .login-form > label {
        grid-column: 1 / -1;
    }

    .auth-register-card .login-form > label:nth-of-type(5),
    .auth-register-card .login-form > label:nth-of-type(6) {
        grid-column: auto;
    }

    .register-address-field,
    .auth-register-card .login-form > button[type="submit"] {
        grid-column: 1 / -1;
    }

    .input-wrap.is-plain {
        min-height: 44px;
        padding: 0 12px;
    }

    .input-wrap input {
        height: 42px;
    }

    .input-wrap textarea {
        min-height: 50px;
        max-height: 50px;
    }

    .auth-register-card .input-wrap input,
    .auth-register-card .input-wrap textarea {
        font-size: 13px;
    }

    .login-form > button[type="submit"] {
        min-height: 46px;
    }

    .auth-register-button {
        width: 100%;
        min-height: 43px;
        margin-top: 12px;
    }

    .auth-register-inline {
        display: inline-flex;
    }
}

@media (max-width: 780px) and (max-height: 720px) {
    .auth-login-shell {
        gap: 8px;
        padding: 8px;
    }

    .auth-login-close {
        top: 8px;
        right: 8px;
        width: 34px;
        height: 34px;
        font-size: 21px;
    }

    .auth-showcase {
        gap: 8px;
        padding: 10px 48px 10px 10px;
    }

    .brand-mark,
    .site-logo-mark {
        width: 40px;
        height: 30px;
        flex-basis: 40px;
    }

    .auth-showcase-brand strong {
        font-size: 13px;
    }

    .auth-showcase-brand small,
    .auth-showcase-copy p,
    .auth-login-card > p,
    .auth-register-card > p {
        display: none;
    }

    .auth-showcase-copy h1 {
        font-size: 20px;
    }

    .auth-login-card,
    .auth-register-card {
        padding: 14px;
    }

    .auth-mobile-badge {
        margin-bottom: 10px;
        padding: 6px 9px;
    }

    .auth-login-card h1,
    .auth-register-card h1 {
        font-size: 24px;
    }

    .login-form,
    .auth-register-card .login-form {
        gap: 8px;
    }

    .login-form label {
        gap: 4px;
        font-size: 12px;
    }

    .input-wrap.is-plain {
        min-height: 40px;
    }

    .input-wrap input {
        height: 38px;
        font-size: 13px;
    }

    .input-wrap textarea {
        min-height: 50px;
        max-height: 50px;
        padding: 7px 0;
        font-size: 13px;
    }

    .password-toggle {
        width: 30px;
        height: 30px;
    }

    .login-options {
        min-height: 18px;
    }

    .login-form > button[type="submit"],
    .auth-register-button {
        min-height: 40px;
    }
}

@media (max-width: 380px) {
    .auth-showcase-copy h1 {
        font-size: 21px;
    }

    .auth-login-card,
    .auth-register-card {
        padding: 14px;
    }

    .auth-login-card h1,
    .auth-register-card h1 {
        font-size: 25px;
    }
}

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