@font-face {
    font-family: "Archivo";
    src: url("/fonts/marketplace/Archivo-Variable.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Hellix";
    src: url("/fonts/marketplace/Hellix-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Hellix";
    src: url("/fonts/marketplace/Hellix-Medium.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "Hellix";
    src: url("/fonts/marketplace/Hellix-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}

:root {
    --auth-purple: #6b1e74;
    --auth-purple-dark: #4d1555;
    --auth-purple-soft: #f4eaf5;
    --auth-ink: #211b22;
    --auth-muted: #6f6870;
    --auth-line: #ded9de;
    --auth-surface: #fffdfb;
    --auth-background: #f6f2ee;
    --auth-danger: #b42318;
    --auth-success: #157a6e;
    --auth-focus: #9f49aa;
    --auth-radius: 24px;
    --auth-ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

html { color-scheme: light; }

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background: var(--auth-background);
    color: var(--auth-ink);
    font-family: "Hellix", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

a { color: inherit; }

.auth-page {
    min-height: 100vh;
    padding: 28px clamp(20px, 4vw, 64px) 20px;
    position: relative;
}

.auth-page::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 8% 12%, rgba(107, 30, 116, .10), transparent 28rem),
        radial-gradient(circle at 94% 88%, rgba(19, 150, 161, .08), transparent 25rem);
    content: "";
}

.auth-page__home {
    display: inline-flex;
    margin: 0 0 24px 2px;
}

.auth-page__home img { display: block; width: 126px; height: auto; }

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(430px, .92fr);
    width: min(1260px, 100%);
    min-height: min(760px, calc(100vh - 138px));
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(74, 46, 76, .12);
    border-radius: var(--auth-radius);
    background: var(--auth-surface);
    box-shadow: 0 24px 70px rgba(49, 31, 49, .10);
}

.auth-visual {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: #28122e;
    isolation: isolate;
}

.auth-visual__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 900ms var(--auth-ease);
}

.auth-shell:hover .auth-visual__image { transform: scale(1.018); }

.auth-page--vendor .auth-visual__image { object-position: 56% center; }

.auth-visual__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(30, 12, 32, .62) 0%, rgba(30, 12, 32, .26) 58%, rgba(30, 12, 32, .06) 100%),
        linear-gradient(180deg, rgba(30, 12, 32, .34) 0%, rgba(30, 12, 32, .08) 54%, rgba(30, 12, 32, .72) 100%);
}

.auth-visual__content {
    position: absolute;
    top: clamp(44px, 5.5vw, 76px);
    right: clamp(24px, 3vw, 40px);
    left: clamp(28px, 5vw, 68px);
    z-index: 2;
    max-width: 620px;
    color: #fff;
}

.auth-visual__support {
    position: absolute;
    right: clamp(24px, 3vw, 40px);
    bottom: clamp(36px, 4.5vw, 60px);
    left: clamp(28px, 5vw, 68px);
    z-index: 2;
    max-width: 620px;
    color: #fff;
}

.auth-visual h2,
.auth-panel h1,
.auth-verification h2,
.auth-invite-state h2 {
    margin: 0;
    font-family: "Archivo", "Hellix", sans-serif;
    font-weight: 650;
    letter-spacing: -.035em;
}

.auth-visual h2 {
    max-width: 20ch;
    font-size: clamp(40px, 3.9vw, 58px);
    line-height: 1.01;
}

.auth-visual__support > p {
    max-width: 49ch;
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: 17px;
    line-height: 1.6;
}

.auth-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin-top: 28px;
    color: rgba(255, 255, 255, .9);
    font-size: 13px;
    font-weight: 500;
}

.auth-trust span { display: inline-flex; align-items: center; gap: 7px; }
.auth-trust iconify-icon { font-size: 18px; }

.auth-panel {
    display: grid;
    place-items: center;
    padding: clamp(36px, 5vw, 76px);
    background: var(--auth-surface);
}

.auth-panel__inner { width: min(440px, 100%); }

.auth-panel__header { margin-bottom: 34px; }

.auth-panel h1 {
    font-size: clamp(34px, 3.5vw, 48px);
    line-height: 1.04;
}

.auth-panel__header > p:last-child {
    margin: 14px 0 0;
    color: var(--auth-muted);
    font-size: 15px;
    line-height: 1.6;
}

.auth-form { display: grid; gap: 20px; }
.auth-form > [data-register-details] { display: grid; gap: 18px; }
.auth-form > [data-register-details][hidden] { display: none; }
.auth-form > [data-register-details] > .auth-consent { margin-top: 12px; }

.auth-field { display: grid; gap: 8px; }

.auth-field label,
.auth-field__label-row {
    color: #302930;
    font-size: 13px;
    font-weight: 600;
}

.auth-field__label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-field__label-row a { color: var(--auth-purple); font-weight: 500; text-decoration: none; }
.auth-field__label-row a:hover { text-decoration: underline; }

.auth-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.auth-floating-field {
    position: relative;
    padding-top: 19px;
}

.auth-floating-field.is-initializing label { transition: none; }

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

.auth-floating-field .auth-input-wrap label {
    position: absolute;
    top: 50%;
    left: 15px;
    z-index: 1;
    max-width: calc(100% - 30px);
    overflow: hidden;
    color: #746c74;
    font-size: 15px;
    font-weight: 400;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    transform: translateY(-50%);
    transform-origin: left center;
    transition: color 160ms ease, transform 180ms var(--auth-ease), top 180ms var(--auth-ease), font-weight 160ms ease;
}

.auth-floating-field.is-raised .auth-input-wrap label,
.auth-floating-field:focus-within .auth-input-wrap label {
    top: -19px;
    color: #4d454e;
    font-size: 13px;
    font-weight: 600;
    transform: none;
}

.auth-floating-field:focus-within .auth-input-wrap label { color: var(--auth-purple); }

.auth-floating-field--utility .auth-input-wrap label { max-width: calc(100% - 136px); }

.auth-field__utility {
    position: absolute;
    top: 0;
    right: 2px;
    z-index: 2;
    color: var(--auth-purple);
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    text-decoration: none;
}

.auth-field__utility:hover { text-decoration: underline; }

.auth-input-wrap {
    display: flex;
    align-items: center;
    min-height: 52px;
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    background: #fff;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-input-wrap:focus-within {
    border-color: var(--auth-focus);
    box-shadow: 0 0 0 4px rgba(107, 30, 116, .11);
}

.auth-field.has-error .auth-input-wrap {
    border-color: var(--auth-danger);
    box-shadow: 0 0 0 3px rgba(180, 35, 24, .08);
}

.auth-input-wrap > iconify-icon {
    flex: 0 0 auto;
    margin-left: 16px;
    color: #817881;
    font-size: 20px;
}

.auth-input-wrap input {
    width: 100%;
    min-width: 0;
    height: 50px;
    padding: 0 15px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--auth-ink);
    font-size: 15px;
}

.auth-floating-field .auth-input-wrap input { padding-top: 2px; }

.auth-input-wrap input::placeholder { color: #aaa2aa; }

.auth-password-toggle {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin-right: 4px;
    place-items: center;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #716971;
    cursor: pointer;
}

.auth-password-toggle:hover { background: var(--auth-purple-soft); color: var(--auth-purple); }
.auth-password-toggle iconify-icon { font-size: 20px; }

.auth-field__hint,
.auth-field__error { min-height: 0; font-size: 12px; line-height: 1.4; }
.auth-field__hint { color: var(--auth-muted); }
.auth-field__error { color: var(--auth-danger); }

.auth-password-strength {
    display: grid;
    gap: 10px;
    margin-top: 2px;
}

.auth-password-strength__meter {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.auth-password-strength__meter > span {
    height: 4px;
    border-radius: 999px;
    background: #e7e1e6;
    transition: background-color 180ms ease, transform 180ms var(--auth-ease);
    transform-origin: left center;
}

.auth-password-strength[data-score="1"] .auth-password-strength__meter > span:nth-child(1) { background: var(--auth-danger); }
.auth-password-strength[data-score="2"] .auth-password-strength__meter > span:nth-child(-n+2) { background: #c47b20; }
.auth-password-strength[data-score="3"] .auth-password-strength__meter > span:nth-child(-n+3) { background: #287f70; }
.auth-password-strength[data-score="4"] .auth-password-strength__meter > span { background: var(--auth-success); }

.auth-password-strength__summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    color: var(--auth-muted);
    font-size: 12px;
}

.auth-password-strength__summary strong { color: var(--auth-ink); font-weight: 600; }
.auth-password-strength[data-score="1"] .auth-password-strength__summary strong { color: var(--auth-danger); }
.auth-password-strength[data-score="2"] .auth-password-strength__summary strong { color: #9a5d12; }
.auth-password-strength[data-score="3"] .auth-password-strength__summary strong,
.auth-password-strength[data-score="4"] .auth-password-strength__summary strong { color: var(--auth-success); }
.auth-password-strength__summary span { text-align: right; }

.auth-password-strength__rules {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-password-strength__rules li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: #716971;
    font-size: 11px;
    line-height: 1.35;
    transition: color 160ms ease;
}

.auth-password-strength__rules iconify-icon {
    flex: 0 0 auto;
    margin-top: 1px;
    padding: 2px;
    border-radius: 50%;
    background: #ece7eb;
    color: transparent;
    font-size: 12px;
    transition: color 160ms ease, background-color 160ms ease, transform 180ms var(--auth-ease);
}

.auth-password-strength__rules li.is-met { color: #3e6f66; }
.auth-password-strength__rules li.is-met iconify-icon {
    background: #dceee9;
    color: var(--auth-success);
    transform: scale(1.04);
}

.auth-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.5;
}

.auth-consent input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--auth-purple); }
.auth-consent a { color: var(--auth-purple); font-weight: 500; }

.auth-form__message {
    display: none;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
}

.auth-form__message:not(:empty),
.validation-summary-errors { display: block; }

.auth-form__message--error,
.auth-form__message[data-state="error"],
.validation-summary-errors {
    border: 1px solid #f0c6c1;
    background: #fff1ef;
    color: var(--auth-danger);
}

.auth-form__message[data-state="success"] {
    border: 1px solid #b8ded6;
    background: #ecf8f5;
    color: var(--auth-success);
}

.validation-summary-valid { display: none; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    background: var(--auth-purple);
    box-shadow: 0 10px 24px rgba(107, 30, 116, .2);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms var(--auth-ease), background 160ms ease, box-shadow 160ms ease;
}

.auth-submit:hover { transform: translateY(-1px); background: var(--auth-purple-dark); box-shadow: 0 14px 28px rgba(107, 30, 116, .24); }
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled { transform: none; opacity: .65; cursor: wait; }
.auth-submit iconify-icon { font-size: 19px; transition: transform 160ms var(--auth-ease); }
.auth-submit:hover iconify-icon { transform: translateX(3px); }

.auth-switch { margin: 24px 0 0; color: var(--auth-muted); font-size: 14px; text-align: center; }
.auth-switch a { color: var(--auth-purple); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

.auth-verification { display: grid; gap: 18px; text-align: center; }
.auth-verification[hidden] { display: none; }
.auth-verification h2 { font-size: 30px; }
.auth-verification p { margin: -8px 0 4px; color: var(--auth-muted); font-size: 14px; line-height: 1.55; }
.auth-verification__icon,
.auth-invite-state__icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto;
    place-items: center;
    border-radius: 18px;
    background: var(--auth-purple-soft);
    color: var(--auth-purple);
}
.auth-verification__icon iconify-icon,
.auth-invite-state__icon iconify-icon { font-size: 29px; }
.auth-input-wrap--code input { text-align: center; font-family: "Archivo"; font-size: 22px; font-weight: 600; letter-spacing: .18em; }

.auth-back,
.auth-resend {
    justify-self: center;
    border: 0;
    background: transparent;
    color: var(--auth-purple);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.auth-back { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 0; }
.auth-resend:hover, .auth-back:hover { text-decoration: underline; }

.auth-admin-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 22px;
    padding: 14px;
    border: 1px solid #e4d4e6;
    border-radius: 14px;
    background: #f8f1f9;
    color: #5e5360;
    font-size: 13px;
    line-height: 1.5;
}
.auth-admin-note iconify-icon { flex: 0 0 auto; color: var(--auth-purple); font-size: 19px; }
.auth-admin-note a { color: var(--auth-purple); font-weight: 600; }

.auth-invite-email {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 14px;
    border: 1px solid #e4d4e6;
    border-radius: 13px;
    background: #f8f1f9;
    color: #554b56;
    font-size: 13px;
    font-weight: 500;
}
.auth-invite-email iconify-icon { color: var(--auth-purple); font-size: 19px; }

.auth-invite-state { display: grid; gap: 18px; text-align: center; }
.auth-invite-state h2 { font-size: 32px; }
.auth-invite-state p { margin: -6px auto 6px; color: var(--auth-muted); line-height: 1.65; }

.auth-topology {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px),
        radial-gradient(circle at 50% 42%, #5d2368 0, #2e1534 38%, #1c0f20 100%);
    background-size: 46px 46px, 46px 46px, auto;
}

.auth-topology__halo {
    position: absolute;
    top: 18%; left: 17%;
    width: 66%; aspect-ratio: 1;
    border: 1px solid rgba(226, 178, 234, .17);
    border-radius: 50%;
    box-shadow: 0 0 90px rgba(158, 73, 170, .14) inset;
}

.auth-topology__line {
    position: absolute;
    top: 44%; left: 50%;
    width: 31%; height: 1px;
    background: linear-gradient(90deg, rgba(221, 177, 229, .74), transparent);
    transform-origin: left;
}
.auth-topology__line--one { transform: rotate(-31deg); }
.auth-topology__line--two { transform: rotate(34deg); }
.auth-topology__line--three { transform: rotate(156deg); }

.auth-topology__node {
    position: absolute;
    z-index: 1;
    display: grid;
    width: 58px; height: 58px;
    place-items: center;
    border: 1px solid rgba(235, 210, 239, .38);
    border-radius: 18px;
    background: rgba(83, 35, 92, .8);
    box-shadow: 0 14px 35px rgba(0, 0, 0, .28);
    color: #f1d9f4;
    backdrop-filter: blur(10px);
}
.auth-topology__node iconify-icon { font-size: 27px; }
.auth-topology__node--shield { top: 36%; left: calc(50% - 29px); width: 72px; height: 72px; border-radius: 22px; color: #fff; }
.auth-topology__node--store { top: 22%; right: 16%; }
.auth-topology__node--customer { top: 56%; right: 17%; }
.auth-topology__node--box { top: 45%; left: 14%; }

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 54px;
    color: var(--auth-muted);
    font-size: 12px;
}
.auth-footer a { text-decoration: none; }
.auth-footer a:hover { color: var(--auth-purple); }

@media (max-width: 940px) {
    .auth-page { padding: 20px 20px 12px; }
    .auth-page__home { margin-bottom: 18px; }
    .auth-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .auth-visual { min-height: 330px; }
    .auth-visual h2 { max-width: 20ch; font-size: clamp(38px, 6vw, 54px); }
    .auth-visual__content { top: clamp(32px, 5vw, 48px); right: 32px; left: 32px; }
    .auth-visual__support { right: 32px; bottom: 32px; left: 32px; }
    .auth-panel { padding: 46px clamp(24px, 8vw, 72px) 52px; }
    .auth-topology__halo { top: -20%; }
}

@media (max-width: 600px) {
    .auth-page { padding: 16px 12px 8px; }
    .auth-page__home { margin-left: 8px; }
    .auth-page__home img { width: 108px; }
    .auth-shell { border-radius: 20px; }
    .auth-visual { min-height: 242px; }
    .auth-visual__content { top: 26px; right: 22px; left: 22px; }
    .auth-visual__support { right: 22px; bottom: 22px; left: 22px; }
    .auth-visual h2 { max-width: 100%; font-size: 32px; }
    .auth-visual__support > p { display: none; }
    .auth-trust { margin-top: 0; font-size: 12px; }
    .auth-panel { padding: 34px 22px 40px; }
    .auth-panel__header { margin-bottom: 28px; }
    .auth-panel h1 { font-size: 35px; }
    .auth-field-grid { grid-template-columns: 1fr; }
    .auth-password-strength__rules { grid-template-columns: 1fr; }
    .auth-footer { min-height: 48px; }
    .auth-page--admin .auth-visual { min-height: 205px; }
    .auth-page--admin .auth-topology__node { transform: scale(.8); }
}

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