/* Login and registration shell. The Continue / Log in control uses the blog
   post CTA border (join-cta.css), not a separate gradient. */

@property --sd-cta-angle {
    syntax: "<angle>";
    initial-value: 90deg;
    inherits: false;
}

.auth-shell {
    --bg: #f8f6fc;
    --surface: #ffffff;
    --input: #faf9fd;
    --border: #e3deeb;
    --text: #20172d;
    --muted: #696175;
    --quiet: #80768e;
    --accent: #b178ff;
    --sd-cta-pink: #a96fed;
    --sd-cta-blue: #6545e7;
    --lai-font: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color-scheme: light;
    min-width: 320px;
    overflow-x: clip;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    background:
        radial-gradient(ellipse 660px 520px at 0% 80%, rgba(177, 120, 255, 0.07), transparent 75%),
        radial-gradient(ellipse 600px 530px at 94% 12%, rgba(137, 190, 255, 0.11), transparent 76%),
        var(--bg);
    color: var(--text);
    font-family: var(--lai-font);
    -webkit-font-smoothing: antialiased;
}

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

.auth-shell button,
.auth-shell input,
.auth-shell select {
    font: inherit;
}

.auth-shell button,
.auth-shell a {
    -webkit-tap-highlight-color: transparent;
}

.auth-shell button {
    cursor: pointer;
}

.auth-shell a {
    color: #6340a0;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-shell a:hover {
    color: #8e4fe7;
}

.auth-shell :focus-visible {
    outline: 2px solid #9858ec;
    outline-offset: 3px;
}

.auth-shell [hidden] {
    display: none !important;
}

.auth-shell .layout {
    width: min(1100px, calc(100% - 72px));
    min-height: 100vh;
    min-height: 100svh;
    margin: auto;
    padding: 50px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(430px, 495px);
    align-items: center;
    gap: clamp(55px, 7vw, 115px);
}

.auth-shell .intro {
    align-self: center;
    min-width: 0;
}

.auth-shell .logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.auth-shell .logo-image {
    display: block;
    width: clamp(180px, 20vw, 240px);
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.auth-shell .headline {
    max-width: 535px;
    margin: 37px 0 25px;
    font-size: clamp(34px, 3.75vw, 49px);
    font-weight: 760;
    letter-spacing: normal;
    line-height: 1.13;
}

.auth-shell .headline span {
    color: #b178ff;
}

.auth-shell .features {
    display: grid;
    grid-template-columns: max-content max-content;
    column-gap: 27px;
    row-gap: 19px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-shell .features li {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #675e73;
    font-size: 13px;
    font-weight: 530;
    white-space: nowrap;
}

.auth-shell .feature-icon {
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: rgba(177, 120, 255, 0.12);
    color: #8754ce;
    flex: 0 0 auto;
}

.auth-shell .feature-icon svg {
    width: 12px;
    height: 12px;
}

.auth-shell .auth-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    position: relative;
    padding: clamp(29px, 3.3vw, 42px);
    border-radius: 22px;
    border: 1px solid #ede9f3;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(51, 30, 83, 0.085), 0 3px 14px rgba(51, 30, 83, 0.035);
}

.auth-shell .auth-top {
    margin: 0 0 37px;
    color: #777083;
    font-size: 13px;
    text-align: center;
}

.auth-shell .auth-top a {
    margin-left: 2px;
    font-weight: 750;
}

.auth-shell .auth-title {
    margin: 0 0 25px;
    color: #21192f;
    text-align: center;
    font-size: clamp(26px, 2.6vw, 31px);
    line-height: 1.14;
    letter-spacing: -0.043em;
    font-weight: 750;
}

.auth-shell .auth-question {
    margin: 0 0 14px;
    color: #3e354b;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 680;
}

.auth-shell .account-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0 0 26px;
    padding: 0;
    border: 0;
}

.auth-shell .account-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border-radius: 11px;
    border: 1px solid #e6e0ef;
    background: #f8f7fb;
    color: #463952;
    font-weight: 740;
    font-size: 14px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.auth-shell .account-option input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.auth-shell .account-option:hover {
    background: #f0eafa;
    border-color: rgba(177, 120, 255, 0.6);
}

.auth-shell .account-option:has(input:checked) {
    border-color: #a465f1;
    background: #f2e8ff;
    color: #61359c;
    box-shadow: inset 0 0 0 1px rgba(177, 120, 255, 0.2);
}

.auth-shell .account-option:has(input:checked):hover {
    background: #ead9ff;
}

.auth-shell .account-option:active {
    transform: scale(0.985);
}

.auth-shell .field {
    margin-bottom: 17px;
    min-width: 0;
}

.auth-shell .field label,
.auth-shell .field .form-label {
    display: block;
    margin: 0 0 8px;
    color: #3b3346;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 680;
}

.auth-shell .field input,
.auth-shell .field select {
    display: block;
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    background: var(--input);
    color: #211a30;
    font-size: 13px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.auth-shell .field input::placeholder {
    color: #9a91a6;
    opacity: 1;
}

.auth-shell .field input:hover,
.auth-shell .field select:hover {
    border-color: #c9b6e7;
}

.auth-shell .field input:focus,
.auth-shell .field select:focus {
    border-color: #b178ff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(177, 120, 255, 0.12);
}

.auth-shell .field select {
    appearance: none;
    padding-right: 35px;
    cursor: pointer;
    color: #40374b;
}

.auth-shell .select-wrap {
    position: relative;
}

.auth-shell .select-wrap::after {
    content: "";
    position: absolute;
    top: 19px;
    right: 17px;
    width: 8px;
    height: 8px;
    transform: rotate(45deg);
    border-bottom: 1.5px solid #776985;
    border-right: 1.5px solid #776985;
    pointer-events: none;
}

.auth-shell .name-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.auth-shell .password-wrap {
    position: relative;
}

.auth-shell .password-wrap input {
    padding-right: 74px;
}

.auth-shell .password-toggle {
    position: absolute;
    right: 6px;
    top: 5px;
    height: 38px;
    min-width: 58px;
    padding: 0 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #68439d;
    font-size: 12px;
    font-weight: 710;
}

.auth-shell .password-toggle:hover {
    background: #f0e9f9;
    color: #58278d;
}

.auth-shell .business-section.is-opening {
    animation: auth-shell-appear 0.23s ease-out both;
}

@keyframes auth-shell-appear {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Blog post CTA border. Same colors, frame, and rotation as join-cta.css. */
.auth-shell .sd-intro-cta__button {
    display: block;
    width: 100%;
    margin: 7px 0 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.18s ease;
}

.auth-shell .sd-intro-cta__button-frame {
    position: relative;
    isolation: isolate;
    display: flex;
    width: 100%;
    padding: 2px;
    border-radius: 999px;
}

.auth-shell .sd-intro-cta__button-frame::before,
.auth-shell .sd-intro-cta__button-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: conic-gradient(
        from var(--sd-cta-angle),
        #211936,
        var(--sd-cta-blue),
        var(--sd-cta-pink),
        #ffffff,
        var(--sd-cta-pink),
        var(--sd-cta-blue),
        #211936
    );
    animation: sd-cta-rotate 3s linear infinite;
}

.auth-shell .sd-intro-cta__button-frame::after {
    filter: blur(10px);
    opacity: 0.45;
}

.auth-shell .sd-intro-cta__button-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 14px 28px;
    border-radius: inherit;
    background: #1c1730;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    font-family: var(--lai-font);
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    transition: background 0.18s ease;
}

.auth-shell .sd-intro-cta__button:hover {
    transform: translateY(-1px);
}

.auth-shell .sd-intro-cta__button:hover .sd-intro-cta__button-label {
    background: #2a2045;
}

.auth-shell .sd-intro-cta__button:focus-visible {
    outline: 2px solid var(--sd-cta-pink);
    outline-offset: 3px;
}

.auth-shell .sd-intro-cta__button:disabled {
    cursor: wait;
    opacity: 0.75;
}

@keyframes sd-cta-rotate {
    0% {
        --sd-cta-angle: 0deg;
    }
    100% {
        --sd-cta-angle: 360deg;
    }
}

.auth-shell .terms {
    max-width: 380px;
    margin: 22px auto 0;
    color: #5c5470;
    font-size: 12px;
    line-height: 1.7;
    text-align: center;
}

.auth-shell .terms a {
    font-weight: 640;
}

.auth-shell .login-heading {
    margin-bottom: 33px;
}

.auth-shell .forgot-row {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 22px;
}

.auth-shell .forgot-row a {
    font-size: 12px;
    font-weight: 680;
}

.auth-shell .reset-description {
    max-width: 330px;
    margin: -12px auto 29px;
    text-align: center;
    font-size: 13px;
    color: #777083;
    line-height: 1.6;
}

.auth-shell .back-row {
    margin: 25px 0 0;
    text-align: center;
    font-size: 13px;
}

.auth-shell .alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.45;
}

.auth-shell .alert-error {
    background: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

.auth-shell .alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.auth-shell .field .alert {
    margin-top: 8px;
}

@media (max-width: 1050px) {
    .auth-shell .layout {
        width: calc(100% - 54px);
        gap: 40px;
        grid-template-columns: minmax(0, 1fr) minmax(390px, 470px);
    }

    .auth-shell .headline {
        font-size: clamp(33px, 3.65vw, 44px);
        margin-top: 34px;
    }

    .auth-shell .features {
        grid-template-columns: 1fr;
        row-gap: 13px;
    }

    .auth-shell .auth-card {
        padding: 32px;
    }
}

@media (max-width: 780px) {
    .auth-shell .layout {
        grid-template-columns: minmax(0, 1fr);
        width: min(510px, calc(100% - 36px));
        gap: 23px;
        padding: 30px 0 40px;
        align-content: start;
    }

    .auth-shell .intro {
        text-align: center;
    }

    .auth-shell .logo-image {
        width: 155px;
        margin: auto;
    }

    .auth-shell .headline,
    .auth-shell .features {
        display: none;
    }

    .auth-shell .auth-card {
        padding: 32px;
    }
}

@media (max-width: 440px) {
    .auth-shell .layout {
        width: calc(100% - 30px);
        gap: 21px;
        padding-top: 24px;
    }

    .auth-shell .logo-image {
        width: 145px;
    }

    .auth-shell .auth-card {
        padding: 27px 20px 28px;
        border-radius: 19px;
    }

    .auth-shell .auth-top {
        margin-bottom: 30px;
        font-size: 12px;
    }

    .auth-shell .auth-title {
        font-size: 26px;
        margin-bottom: 23px;
    }

    .auth-shell .account-option {
        min-height: 52px;
    }

    .auth-shell .name-row {
        gap: 10px;
    }

    .auth-shell .field input,
    .auth-shell .field select {
        padding-left: 11px;
        padding-right: 11px;
    }

    .auth-shell .password-wrap input {
        padding-right: 69px;
    }
}

.auth-shell .auth-trial {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

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

/* Provider continue buttons (aligned with free-signup / marketing modal). */
.auth-oauth-providers {
    display: grid;
    gap: 0.65rem;
    width: 100%;
    margin: 0 0 1rem;
}

.auth-shell .auth-oauth-provider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    border-radius: 0.7rem;
    background: #fff;
    color: #1f1f1f;
    border: 1px solid var(--border, #e3deeb);
    font-weight: 600;
    text-decoration: none;
}

.auth-shell .auth-oauth-provider:hover,
.auth-shell .auth-oauth-provider:focus-visible {
    background: #f8f6fc;
    color: #1f1f1f;
    text-decoration: none;
    outline: none;
}

.auth-oauth-provider__logo {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
}

.auth-oauth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1rem;
    color: var(--muted, #696175);
    font-size: 0.9rem;
}

.auth-oauth-divider::before,
.auth-oauth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border, #e3deeb);
}

@media (max-width: 390px) {
    .auth-oauth-provider {
        min-height: 2.9rem;
    }
}


.auth-method-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 0 1rem;
  padding: 4px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.05);
}
.auth-method-tab {
  border: 0;
  border-radius: 9px;
  min-height: 38px;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.auth-method-tab.is-active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
#login-code-panel .lai-otp-digit {
  background: #fff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.16);
}
#login-code-panel .lai-otp-link {
  color: #6344e3;
}
