:root {
    --auth-bg: #f7f6f2;
    --auth-surface: #fffefb;
    --auth-ink: #181724;
    --auth-muted: #6f6c78;
    --auth-line: #deddd6;
    --auth-violet: #6d5dfc;
    --auth-violet-dark: #5848e8;
    --auth-lavender: #eeebff;
    --auth-aqua: #d9edf2;
    --auth-green: #5d9f78;
    --auth-ease: cubic-bezier(.22, 1, .36, 1);
}

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

html { min-width: 320px; background: var(--auth-bg); }

body.auth-page {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    color: var(--auth-ink);
    background:
        radial-gradient(760px 430px at 100% 0%, rgba(217, 237, 242, .72), transparent 72%),
        radial-gradient(640px 420px at 48% 100%, rgba(238, 235, 255, .76), transparent 74%),
        var(--auth-bg);
    font-family: "Manrope", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.auth-page h1,
body.auth-page h2,
body.auth-page .auth-brand,
body.auth-page button { font-family: "Plus Jakarta Sans", sans-serif; }

body.auth-page button,
body.auth-page input,
body.auth-page a { font: inherit; }

body.auth-page button,
body.auth-page a,
body.auth-page input {
    transition: color .2s ease, background-color .2s ease, border-color .2s ease,
        box-shadow .2s ease, transform .25s var(--auth-ease);
}

body.auth-page a { color: inherit; text-decoration: none; }
body.auth-page button { border: 0; cursor: pointer; }

body.auth-page a:focus-visible,
body.auth-page button:focus-visible,
body.auth-page input:focus-visible {
    outline: 3px solid rgba(109, 93, 252, .28);
    outline-offset: 3px;
}

.hidden { display: none !important; }

.auth-skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: 10px;
    color: #fff !important;
    background: var(--auth-ink);
    transform: translateY(-150%);
}
.auth-skip-link:focus { transform: translateY(0); }

.auth-shell {
    display: grid;
    grid-template-columns: minmax(410px, .92fr) minmax(520px, 1.08fr);
    min-height: 100vh;
    min-height: 100svh;
    padding: 14px;
    gap: 14px;
}

.auth-story {
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: calc(100svh - 28px);
    flex-direction: column;
    overflow: hidden;
    padding: clamp(30px, 4vw, 64px);
    color: #fff;
    background: var(--auth-ink);
    border-radius: 30px;
    box-shadow: 0 34px 84px -52px rgba(24, 23, 36, .72);
}

.auth-story::before,
.auth-story::after {
    position: absolute;
    z-index: -1;
    width: 370px;
    height: 370px;
    border-radius: 50%;
    content: "";
}
.auth-story::before {
    top: -180px;
    right: -120px;
    background: radial-gradient(circle, rgba(109, 93, 252, .78), rgba(109, 93, 252, 0));
}
.auth-story::after {
    bottom: -240px;
    left: -80px;
    background: radial-gradient(circle, rgba(97, 178, 197, .46), rgba(97, 178, 197, 0));
}

.auth-story-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .11;
    background-image:
        linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, black, transparent 86%);
}

.auth-brand {
    position: relative;
    z-index: 2;
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 11px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.035em;
}
.auth-brand-mark {
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 12px;
    background: rgba(255, 255, 255, .98);
}
.auth-brand-mark img { display: block; width: 28px; height: 28px; object-fit: contain; }
.auth-brand em { color: #aaa2ff; font-style: normal; }

.auth-story-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    padding-block: clamp(42px, 7vh, 86px) 22px;
}

.story-eyebrow,
.auth-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    color: #bdb7ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.story-eyebrow::before,
.auth-kicker::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 5px rgba(189, 183, 255, .12);
    content: "";
}

.auth-story h1 {
    max-width: 690px;
    margin: 0;
    font-size: clamp(38px, 4.6vw, 68px);
    font-weight: 700;
    letter-spacing: -.065em;
    line-height: 1.02;
}
.auth-story-copy {
    max-width: 630px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, .66);
    font-size: clamp(14px, 1.2vw, 17px);
    line-height: 1.7;
}

.story-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 650px;
    margin: 30px 0 0;
    padding: 0;
    gap: 10px;
    list-style: none;
}
.story-benefits li {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, .76);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}
.benefit-icon {
    display: grid;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    place-items: center;
    color: var(--auth-ink);
    border-radius: 9px;
    background: #bdb7ff;
}
.benefit-icon svg { width: 14px; height: 14px; }

.creative-board {
    position: relative;
    max-width: 650px;
    margin-top: clamp(32px, 5vh, 54px);
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 22px;
    background: rgba(255, 255, 255, .075);
    box-shadow: 0 34px 74px -42px rgba(0, 0, 0, .9);
    backdrop-filter: blur(12px);
    transform: rotate(-1.15deg);
}
.board-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1px 3px 12px;
    gap: 14px;
}
.board-file {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, .87);
    font-size: 12px;
    font-weight: 700;
}
.board-file span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #8be0b0;
    box-shadow: 0 0 0 5px rgba(139, 224, 176, .12);
}
.board-status {
    flex: 0 0 auto;
    padding: 6px 9px;
    color: #d5d1ff;
    border: 1px solid rgba(189, 183, 255, .18);
    border-radius: 999px;
    background: rgba(109, 93, 252, .15);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.board-workspace {
    display: grid;
    grid-template-columns: minmax(126px, .74fr) minmax(180px, 1.26fr);
    padding: 11px;
    gap: 12px;
    border-radius: 15px;
    background: rgba(6, 6, 13, .68);
}
.board-preview {
    position: relative;
    display: grid;
    min-height: 116px;
    place-items: center;
    overflow: hidden;
    border-radius: 11px;
    background:
        radial-gradient(circle at 67% 28%, rgba(217, 237, 242, .9) 0 6%, transparent 7%),
        linear-gradient(150deg, #d9edf2 0 34%, #8e83ff 35% 62%, #29263d 63% 100%);
}
.board-preview::before,
.board-preview::after {
    position: absolute;
    bottom: -28px;
    width: 130px;
    height: 85px;
    border-radius: 50% 50% 0 0;
    background: rgba(24, 23, 36, .55);
    content: "";
    transform: rotate(18deg);
}
.board-preview::before { left: -24px; }
.board-preview::after { right: -34px; bottom: -42px; background: rgba(255, 255, 255, .22); transform: rotate(-18deg); }
.board-play {
    position: relative;
    z-index: 1;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--auth-ink);
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
}
.board-play svg { width: 15px; height: 15px; margin-left: 2px; }
.board-timeline { position: relative; display: flex; min-width: 0; flex-direction: column; justify-content: center; gap: 10px; }
.timeline-ruler { display: grid; grid-template-columns: repeat(7, 1fr); color: rgba(255, 255, 255, .3); font-size: 7px; }
.timeline-row { position: relative; height: 16px; overflow: hidden; border-radius: 5px; background: rgba(255, 255, 255, .07); }
.timeline-clip { position: absolute; inset-block: 0; border-radius: 4px; background: #6d5dfc; }
.clip-one { left: 2%; width: 54%; }
.clip-two { right: 3%; width: 38%; background: #78bdcc; }
.clip-three { left: 18%; width: 68%; background: #9b91ff; }
.timeline-playhead { position: absolute; top: 20px; bottom: 5px; left: 61%; z-index: 2; width: 1px; background: #fff; }

.auth-proof {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 650px;
    margin-top: 23px;
    padding-top: 20px;
    gap: 18px;
    border-top: 1px solid rgba(255, 255, 255, .11);
}
.proof-avatars { display: flex; align-items: center; }
.proof-avatar {
    display: grid;
    width: 31px;
    height: 31px;
    margin-left: -7px;
    place-items: center;
    color: var(--auth-ink);
    border: 2px solid var(--auth-ink);
    border-radius: 50%;
    background: #bdb7ff;
    font-size: 9px;
    font-weight: 800;
}
.proof-avatar:first-child { margin-left: 0; background: #d9edf2; }
.proof-avatar:last-child { background: #f0cfab; }
.proof-copy { flex: 1; color: rgba(255, 255, 255, .52); font-size: 11px; line-height: 1.4; }
.proof-copy strong { display: block; color: rgba(255, 255, 255, .9); font-size: 12px; }
.proof-stars { flex: 0 0 auto; color: #f3c875; font-size: 11px; letter-spacing: 1px; }

.auth-main {
    display: flex;
    min-height: calc(100svh - 28px);
    flex-direction: column;
    padding: clamp(26px, 4vw, 58px) clamp(28px, 6vw, 88px);
}
.auth-switch {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    color: var(--auth-muted);
    font-size: 13px;
}
.auth-switch a {
    padding: 10px 14px;
    color: var(--auth-ink);
    border: 1px solid var(--auth-line);
    border-radius: 999px;
    background: rgba(255, 254, 251, .72);
    font-weight: 800;
}
.auth-switch a:hover { border-color: rgba(109, 93, 252, .4); background: var(--auth-lavender); transform: translateY(-1px); }

.auth-form-wrap { width: min(100%, 486px); margin: auto; padding-block: 42px; }
.auth-page--signup .auth-form-wrap { width: min(100%, 550px); padding-block: 28px; }
.auth-kicker { margin-bottom: 12px; color: var(--auth-violet); }
.auth-heading {
    margin: 0;
    font-size: clamp(34px, 4vw, 48px);
    font-weight: 750;
    letter-spacing: -.055em;
    line-height: 1.06;
}
.auth-subheading { margin: 14px 0 0; color: var(--auth-muted); font-size: 15px; line-height: 1.65; }
.auth-form { display: grid; margin-top: 32px; gap: 19px; }
.field, .fieldset { min-width: 0; }
.field-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; gap: 12px; }
.field-label, .fieldset legend { padding: 0; color: #29263d; font-size: 13px; font-weight: 800; }
.fieldset { margin: 0; padding: 0; border: 0; }
.field-link { color: var(--auth-violet) !important; font-size: 12px; font-weight: 800; }
.field-link:hover { color: var(--auth-violet-dark) !important; text-decoration: underline; text-underline-offset: 3px; }

.input-control {
    position: relative;
    display: flex;
    height: 54px;
    align-items: center;
    border: 1px solid var(--auth-line);
    border-radius: 15px;
    background: rgba(255, 254, 251, .88);
    box-shadow: 0 12px 30px -28px rgba(24, 23, 36, .5);
}
.input-control:focus-within {
    border-color: rgba(109, 93, 252, .72);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(109, 93, 252, .1), 0 20px 40px -32px rgba(24, 23, 36, .5);
}
.input-icon { display: grid; width: 48px; height: 100%; flex: 0 0 48px; place-items: center; color: #918e99; }
.input-icon svg, .password-toggle svg { width: 18px; height: 18px; }
.input-control input {
    min-width: 0;
    height: 100%;
    flex: 1;
    padding: 0 16px 0 0;
    color: var(--auth-ink);
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
}
.input-control input::placeholder { color: #aaa7b0; font-weight: 500; }
.password-toggle {
    display: grid;
    width: 48px;
    height: 100%;
    flex: 0 0 48px;
    place-items: center;
    padding: 0;
    color: #898691;
    border-radius: 0 15px 15px 0;
    background: transparent;
}
.password-toggle:hover { color: var(--auth-violet); background: var(--auth-lavender); }
.phone-prefix {
    display: flex;
    height: 32px;
    align-items: center;
    margin-right: 13px;
    padding: 0 13px 0 15px;
    color: var(--auth-muted);
    border-right: 1px solid var(--auth-line);
    font-size: 13px;
    font-weight: 800;
}
.phone-control input { padding-right: 16px; }

.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; gap: 11px; }
.role-card {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    padding: 14px;
    gap: 12px;
    border: 1px solid var(--auth-line);
    border-radius: 16px;
    background: rgba(255, 254, 251, .82);
    cursor: pointer;
}
.role-card:hover { border-color: rgba(109, 93, 252, .38); transform: translateY(-1px); }
.role-card:has(input:checked) { border-color: rgba(109, 93, 252, .68); background: var(--auth-lavender); box-shadow: inset 0 0 0 1px rgba(109, 93, 252, .12); }
.role-card input { position: absolute; opacity: 0; pointer-events: none; }
.role-icon {
    display: grid;
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    place-items: center;
    border-radius: 12px;
    background: var(--auth-aqua);
}
.role-card:nth-child(2) .role-icon { background: #f1dfc9; }
.role-icon svg { width: 18px; height: 18px; }
.role-copy { min-width: 0; }
.role-copy strong, .role-copy small { display: block; }
.role-copy strong { font-size: 13px; line-height: 1.25; }
.role-copy small { overflow: hidden; margin-top: 3px; color: var(--auth-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.password-help {
    display: flex;
    align-items: flex-start;
    margin: 8px 2px 0;
    gap: 7px;
    color: var(--auth-muted);
    font-size: 11px;
    line-height: 1.5;
}
.password-help svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 1px; color: var(--auth-violet); }
.auth-message { display: none; margin: -3px 0 0; padding: 11px 13px; border-radius: 12px; font-size: 12px; font-weight: 700; line-height: 1.45; }
.auth-message.is-visible { display: block; }
.auth-message.is-error { color: #84343c; border: 1px solid rgba(184, 75, 86, .2); background: #fff0f1; }
.auth-message.is-success { color: #376b4d; border: 1px solid rgba(93, 159, 120, .23); background: #edf8f1; }

.auth-primary-button {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    gap: 10px;
    color: #fff;
    border-radius: 15px;
    background: var(--auth-ink);
    box-shadow: 0 20px 38px -24px rgba(24, 23, 36, .72);
    font-size: 13px;
    font-weight: 800;
}
.auth-primary-button:hover { background: var(--auth-violet); box-shadow: 0 23px 42px -25px rgba(88, 72, 232, .76); transform: translateY(-2px); }
.auth-primary-button:disabled { cursor: wait; opacity: .68; transform: none; }
.auth-primary-button svg { width: 17px; height: 17px; }
.auth-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin: 24px 0;
    gap: 13px;
    color: #9a97a0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after { height: 1px; background: var(--auth-line); content: ""; }
.google-button {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    gap: 11px;
    color: var(--auth-ink);
    border: 1px solid var(--auth-line) !important;
    border-radius: 15px;
    background: rgba(255, 254, 251, .9);
    font-size: 13px;
    font-weight: 800;
}
.google-button:hover { border-color: rgba(109, 93, 252, .35) !important; background: #fff; transform: translateY(-1px); }
.google-button svg { width: 19px; height: 19px; }
.auth-security, .auth-terms {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 19px 0 0;
    gap: 7px;
    color: #8b8892;
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}
.auth-security svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--auth-green); }
.auth-bottom-link { display: none; margin: 26px 0 0; color: var(--auth-muted); font-size: 13px; text-align: center; }
.auth-bottom-link a { color: var(--auth-violet); font-weight: 800; }

@media (max-width: 1120px) {
    .auth-shell { grid-template-columns: minmax(360px, .86fr) minmax(480px, 1.14fr); }
    .auth-story { padding: 36px; }
    .auth-story h1 { font-size: clamp(38px, 5vw, 56px); }
    .story-benefits { grid-template-columns: 1fr; gap: 8px; }
    .auth-main { padding-inline: 44px; }
}

@media (max-width: 880px) {
    .auth-shell { display: block; padding: 0; }
    .auth-story { min-height: 0; padding: 24px clamp(20px, 6vw, 48px) 34px; border-radius: 0 0 28px 28px; }
    .auth-story-content { padding: 48px 0 0; }
    .auth-story h1 { max-width: 620px; font-size: clamp(35px, 8vw, 54px); }
    .auth-story-copy { max-width: 610px; margin-top: 15px; }
    .story-benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 620px; margin-top: 22px; }
    .creative-board, .auth-proof { display: none; }
    .auth-main { min-height: auto; padding: 30px clamp(20px, 6vw, 48px) 42px; }
    .auth-switch { display: none; }
    .auth-form-wrap, .auth-page--signup .auth-form-wrap { width: min(100%, 590px); margin-inline: auto; padding-block: 18px 0; }
    .auth-bottom-link { display: block; }
}

@media (max-width: 600px) {
    .auth-story { padding: 18px 20px 24px; border-radius: 0 0 22px 22px; }
    .auth-brand { font-size: 16px; }
    .auth-brand-mark { width: 35px; height: 35px; border-radius: 11px; }
    .auth-brand-mark img { width: 25px; height: 25px; }
    .auth-story-content { padding-top: 31px; }
    .story-eyebrow { margin-bottom: 11px; font-size: 10px; }
    .auth-story h1 { font-size: clamp(30px, 9.2vw, 39px); letter-spacing: -.055em; }
    .auth-story-copy { margin-top: 11px; font-size: 13px; line-height: 1.55; }
    .story-benefits { display: none; }
    .auth-main { padding: 27px 18px 34px; }
    .auth-form-wrap, .auth-page--signup .auth-form-wrap { padding-top: 8px; }
    .auth-kicker { margin-bottom: 9px; font-size: 10px; }
    .auth-heading { font-size: 32px; }
    .auth-subheading { margin-top: 10px; font-size: 13px; }
    .auth-form { margin-top: 25px; gap: 17px; }
    .role-grid { gap: 8px; }
    .role-card { padding: 11px; gap: 9px; }
    .role-icon { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; }
    .role-copy small { display: none; }
    .input-control, .auth-primary-button { height: 52px; min-height: 52px; border-radius: 14px; }
}

@media (max-width: 370px) { .role-card { align-items: flex-start; flex-direction: column; } }

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