/* smplfix authentication system — complete 2026 rebuild */
:root {
    --auth-black: #09090a;
    --auth-graphite: #18181a;
    --auth-white: #ffffff;
    --auth-canvas: #f4f4f3;
    --auth-surface: #fafafa;
    --auth-line: #dededc;
    --auth-line-dark: #c8c8c5;
    --auth-muted: #6b6b70;
    --auth-danger: #b42318;
    --auth-danger-bg: #fff4f2;
    --auth-success: #176b4a;
    --auth-success-bg: #edf8f2;
    --auth-warning: #775600;
    --auth-warning-bg: #fff9e8;
    --auth-ui: "Space Grotesk", Arial, sans-serif;
    --auth-mono: "Space Mono", Consolas, monospace;
}

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

html {
    min-width: 320px;
    min-height: 100%;
    background: var(--auth-canvas);
}

body.auth-page {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    color: var(--auth-black);
    background: var(--auth-canvas);
    font-family: var(--auth-ui);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
select {
    font: inherit;
}

a {
    color: inherit;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(360px, 46%) minmax(480px, 54%);
    min-height: 100vh;
    min-height: 100svh;
}

/* Brand stage */
.brand-stage {
    position: sticky;
    top: 0;
    isolation: isolate;
    display: flex;
    height: 100vh;
    height: 100svh;
    min-height: 620px;
    padding: clamp(26px, 3.8vh, 42px) clamp(34px, 4.5vw, 70px);
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    color: var(--auth-white);
    background: var(--auth-black);
}

.brand-stage::before {
    content: "";
    position: absolute;
    z-index: -3;
    inset: 0;
    opacity: 0.18;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='noise'%3E%3CfeTurbulence baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.13'/%3E%3C/svg%3E");
    pointer-events: none;
}

.brand-stage__art {
    position: absolute;
    z-index: -2;
    inset: 0;
    overflow: hidden;
    background:
        radial-gradient(85% 54% at 18% -8%, rgba(255, 255, 255, 0.12), transparent 60%),
        linear-gradient(148deg, #1d1d20 0%, #09090a 43%, #111113 100%);
    pointer-events: none;
}

.brand-arc {
    position: absolute;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    box-shadow: inset 0 0 100px rgba(255, 255, 255, 0.025);
}

.brand-arc--one {
    top: -28%;
    left: -48%;
    width: 148%;
    aspect-ratio: 1.75;
    transform: rotate(-9deg);
}

.brand-arc--two {
    right: -78%;
    bottom: 2%;
    width: 144%;
    aspect-ratio: 1.25;
    border-color: rgba(255, 255, 255, 0.15);
    transform: rotate(-35deg);
}

.brand-arc--three {
    right: -52%;
    bottom: -30%;
    width: 110%;
    aspect-ratio: 1.2;
    transform: rotate(-28deg);
}

.brand-stage__header,
.brand-stage__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

img.brand-logo {
    display: block;
    width: clamp(126px, 11vw, 164px);
    max-width: 164px;
    height: auto;
    max-height: 98px;
    object-fit: contain;
    filter: none;
}

.brand-context,
.brand-kicker,
.workspace-header,
.auth-badge {
    font-family: var(--auth-mono);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.11em;
}

.brand-context {
    color: rgba(255, 255, 255, 0.5);
    font-size: 9px;
    white-space: nowrap;
}

.brand-story {
    width: min(100%, 610px);
    margin-block: auto;
    padding-block: clamp(22px, 3.5vh, 42px);
}

.brand-kicker {
    margin: 0 0 14px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 10px;
}

.brand-story h2 {
    margin: 0;
    color: var(--auth-white);
    font-size: clamp(30px, 2.75vw, 44px);
    font-weight: 500;
    line-height: 1.13;
    letter-spacing: -0.05em;
}

.brand-copy {
    max-width: 530px;
    margin: 17px 0 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: clamp(13px, 1vw, 16px);
    line-height: 1.7;
}

.brand-proof {
    display: grid;
    margin-top: clamp(24px, 3.6vh, 38px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(8px);
}

.brand-proof article {
    display: flex;
    min-width: 0;
    min-height: 108px;
    padding: 16px 14px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
}

.brand-proof article + article {
    border-left: 1px solid rgba(255, 255, 255, 0.11);
}

.brand-proof i {
    align-self: flex-start;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 17px;
    text-align: left;
}

.brand-proof strong {
    color: var(--auth-white);
    font-size: 12px;
    font-weight: 600;
}

.brand-proof span {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 10px;
    line-height: 1.4;
}

.signup-steps {
    display: grid;
    margin: clamp(24px, 3.6vh, 36px) 0 0;
    padding: 0;
    gap: 0;
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.signup-steps li {
    display: grid;
    padding: 13px 0;
    grid-template-columns: 42px 1fr;
    align-items: start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.signup-steps > li > span {
    color: rgba(255, 255, 255, 0.4);
    font: 700 9px/1.5 var(--auth-mono);
}

.signup-steps div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.signup-steps strong {
    color: var(--auth-white);
    font-size: 13px;
    font-weight: 600;
}

.signup-steps small {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    line-height: 1.45;
}

.brand-stage__footer {
    color: rgba(255, 255, 255, 0.48);
    font-size: 10px;
}

.brand-stage__footer span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Form workspace */
.auth-workspace {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 100vh;
    min-height: 100svh;
    padding: 20px clamp(28px, 4.2vw, 66px) 18px;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    background:
        radial-gradient(circle at 55% 12%, rgba(255, 255, 255, 0.96), transparent 32%),
        linear-gradient(135deg, #f8f8f7, var(--auth-canvas));
}

.auth-workspace::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.34;
    background-image:
        linear-gradient(rgba(9, 9, 10, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(9, 9, 10, 0.022) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, black, transparent 48%);
    pointer-events: none;
}

.workspace-header {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 36px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: #7a7a7e;
    font-size: 9px;
}

.workspace-header a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--auth-black);
    text-decoration: none;
}

.workspace-header a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.auth-card {
    position: relative;
    z-index: 1;
    align-self: center;
    justify-self: center;
    width: min(100%, 500px);
    margin-block: 18px;
    padding: clamp(30px, 3.2vw, 40px);
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 30px 90px rgba(9, 9, 10, 0.09), 0 2px 7px rgba(9, 9, 10, 0.035);
}

.auth-card--signup {
    width: min(100%, 720px);
    padding-block: 28px;
}

.auth-card__header {
    margin-bottom: 23px;
}

.auth-badge {
    display: inline-flex;
    min-height: 32px;
    padding: 7px 12px;
    align-items: center;
    gap: 8px;
    color: #66666b;
    border: 1px solid var(--auth-line);
    border-radius: 999px;
    background: var(--auth-surface);
    font-size: 9px;
}

.auth-card h1 {
    margin: 17px 0 7px;
    color: var(--auth-black);
    font-size: clamp(30px, 2.7vw, 38px);
    font-weight: 650;
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.auth-card__header > p {
    max-width: 470px;
    margin: 0;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.55;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.field-group {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.field-group label,
.field-heading label {
    margin: 0;
    color: var(--auth-black);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.field-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.field-heading a,
.check-control a,
.auth-card__footer a {
    color: var(--auth-black);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.field-heading a:hover,
.check-control a:hover,
.auth-card__footer a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.field-control {
    position: relative;
    display: flex;
    align-items: center;
}

.field-control > i {
    position: absolute;
    left: 15px;
    z-index: 1;
    color: #86868b;
    font-size: 12px;
    pointer-events: none;
}

.field-control input,
.field-control select {
    width: 100%;
    min-height: 48px;
    padding: 0 44px;
    color: var(--auth-black);
    border: 1px solid var(--auth-line-dark);
    border-radius: 8px;
    outline: none;
    background-color: var(--auth-white);
    box-shadow: none;
    font-size: 13px;
    font-weight: 500;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field-control input::placeholder {
    color: #96969a;
}

.field-control input:hover,
.field-control select:hover {
    border-color: #8f8f92;
}

.field-control input:focus,
.field-control select:focus {
    border-color: var(--auth-black);
    box-shadow: 0 0 0 3px rgba(9, 9, 10, 0.08);
}

.field-control:focus-within > i {
    color: var(--auth-black);
}

.field-control--password input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    color: var(--auth-muted);
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--auth-black);
    outline: none;
    background: #f1f1f0;
}

.field-control select {
    padding-right: 42px;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20'%3E%3Cpath fill='%236b6b70' d='m5.5 7.5 4.5 4.5 4.5-4.5 1.4 1.4-5.9 5.9-5.9-5.9z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.field-group small {
    color: var(--auth-muted);
    font-size: 10px;
    line-height: 1.45;
}

.check-control {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 9px;
    color: var(--auth-muted);
    font-size: 11px;
    line-height: 1.45;
    cursor: pointer;
    user-select: none;
}

.check-control input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.check-control__box {
    display: grid;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    place-items: center;
    color: transparent;
    border: 1px solid var(--auth-line-dark);
    border-radius: 4px;
    background: var(--auth-white);
    font-size: 8px;
}

.check-control input:checked + .check-control__box {
    color: var(--auth-white);
    border-color: var(--auth-black);
    background: var(--auth-black);
}

.check-control input:focus-visible + .check-control__box {
    outline: 2px solid var(--auth-black);
    outline-offset: 2px;
}

.alert {
    display: flex;
    padding: 11px 12px;
    align-items: flex-start;
    gap: 9px;
    border-radius: 7px;
    font-size: 11px;
    line-height: 1.5;
}

.alert i {
    margin-top: 2px;
}

.alert--error {
    color: var(--auth-danger);
    border: 1px solid #f0c8c2;
    background: var(--auth-danger-bg);
}

.submit-btn {
    display: inline-flex;
    width: 100%;
    min-height: 49px;
    padding: 0 22px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--auth-white);
    border: 1px solid var(--auth-black);
    border-radius: 8px;
    background: var(--auth-black);
    box-shadow: none;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 140ms ease, transform 140ms ease;
}

.submit-btn > .submit-btn__arrow,
.submit-btn > .submit-btn__success-icon,
.submit-btn > .submit-btn__spinner,
.submit-btn > i {
    position: static;
    display: inline-grid;
    width: 14px;
    height: 14px;
    margin: 0;
    padding: 0;
    flex: 0 0 14px;
    place-items: center;
    color: currentColor;
    font-size: 11px;
    line-height: 1;
    transform: none;
}

.submit-btn > :where(.submit-btn__arrow, .submit-btn__success-icon) {
    font-family: var(--auth-font);
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
}

.submit-btn:hover:not(:disabled) {
    background: #252527;
    transform: translateY(-1px);
}

.submit-btn:focus-visible {
    outline: 2px solid var(--auth-black);
    outline-offset: 3px;
}

.submit-btn:disabled {
    opacity: 0.66;
    cursor: wait;
}

.submit-btn__spinner {
    display: none !important;
}

.submit-btn.is-loading .submit-btn__text,
.submit-btn.is-loading .submit-btn__arrow {
    display: none !important;
}

.submit-btn.is-loading .submit-btn__spinner {
    display: inline-block !important;
}

.submit-btn.is-success {
    color: var(--auth-success);
    border-color: #b8dccb;
    background: var(--auth-success-bg);
}

.auth-card__footer {
    display: flex;
    margin-top: 18px;
    padding-top: 17px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--auth-muted);
    border-top: 1px solid #ececea;
    font-size: 11px;
}

.workspace-note {
    position: relative;
    z-index: 1;
    display: flex;
    margin: 0;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #85858a;
    font-size: 9px;
}

/* Signup confirmation inserted by signup-script.js */
.signup-success {
    text-align: center;
}

.signup-success__icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 20px;
    place-items: center;
    color: var(--auth-success);
    border: 1px solid #b8dccb;
    border-radius: 50%;
    background: var(--auth-success-bg);
}

.signup-success .card-title {
    margin: 0 0 9px;
    font-size: 34px;
    letter-spacing: -0.045em;
}

.signup-success .card-subtitle {
    margin: 0;
    color: var(--auth-muted);
    font-size: 13px;
}

.signup-success__panel,
.signup-success__notice {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    text-align: left;
}

.signup-success__panel {
    color: var(--auth-muted);
    border: 1px solid var(--auth-line);
    background: var(--auth-surface);
}

.signup-success__panel h2 {
    margin: 0 0 10px;
    color: var(--auth-black);
    font-size: 13px;
}

.signup-success__panel p {
    margin: 7px 0 0;
    font-size: 11px;
    line-height: 1.5;
}

.signup-success__panel strong {
    color: var(--auth-black);
}

.signup-success__notice {
    color: var(--auth-warning);
    border: 1px solid #e7d49a;
    background: var(--auth-warning-bg);
    font-size: 11px;
    line-height: 1.5;
}

.signup-success .submit-btn {
    margin-top: 20px;
}

@media (max-width: 1080px) {
    .auth-shell {
        grid-template-columns: minmax(340px, 42%) minmax(460px, 58%);
    }

    .brand-stage {
        padding-right: 38px;
        padding-left: 38px;
    }

    .brand-story h2 {
        font-size: 34px;
    }

    .brand-proof {
        grid-template-columns: 1fr;
    }

    .brand-proof article {
        min-height: 82px;
        padding: 14px 16px;
        display: grid;
        grid-template-columns: 28px 1fr;
        align-content: center;
    }

    .brand-proof article + article {
        border-top: 1px solid rgba(255, 255, 255, 0.11);
        border-left: 0;
    }

    .brand-proof i {
        grid-row: 1 / span 2;
        margin: 2px 0 0;
    }
}

@media (max-width: 920px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .brand-stage {
        position: relative;
        height: auto;
        min-height: 108px;
        padding: 24px 28px;
    }

    img.brand-logo {
        width: 112px;
        max-width: 112px;
        max-height: 66px;
    }

    .brand-story,
    .brand-stage__footer {
        display: none;
    }

    .auth-workspace {
        min-height: calc(100svh - 108px);
        padding: 22px 20px 28px;
    }

    .auth-card {
        margin-block: 22px;
    }
}

@media (max-width: 620px) {
    .brand-stage {
        min-height: 90px;
        padding: 18px 20px;
    }

    img.brand-logo {
        width: 100px;
        max-width: 100px;
        max-height: 60px;
    }

    .brand-context,
    .workspace-header > span {
        display: none;
    }

    .auth-workspace {
        min-height: calc(100svh - 90px);
        padding: 16px 12px 24px;
    }

    .workspace-header {
        padding-inline: 6px;
        justify-content: flex-end;
    }

    .signup-page .workspace-header {
        justify-content: flex-start;
    }

    .auth-card,
    .auth-card--signup {
        width: 100%;
        margin-block: 14px 20px;
        padding: 28px 20px;
        border-radius: 11px;
    }

    .auth-card__header {
        margin-bottom: 24px;
    }

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

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field-heading {
        align-items: flex-start;
    }
}

@media (max-height: 760px) and (min-width: 921px) {
    .brand-stage {
        min-height: 760px;
    }

    .auth-workspace {
        min-height: 760px;
    }

    .auth-card {
        margin-block: 22px;
    }

    .brand-story {
        padding-block: 28px;
    }

    .brand-proof {
        margin-top: 30px;
    }
}

@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;
    }
}
