/* ==========================================================================
   LOGIN
   Standalone auth page. Uses /assets/css tokens/base/components first.
   ========================================================================== */

:root {
    color-scheme: dark;
}

/*
 * Keep the document viewport as the only vertical scroll container.
 * Do not put overflow on html, body, or .login-body.
 */
html {
    min-height: 100%;
}

body.login-body {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        radial-gradient(circle at 18% 16%, rgba(255, 85, 85, 0.14), transparent 30rem),
        radial-gradient(circle at 82% 82%, rgba(168, 50, 50, 0.12), transparent 28rem),
        linear-gradient(135deg, var(--bg-base, #121212), #080808 56%, #000);
    background-size:
        58px 58px,
        58px 58px,
        auto,
        auto,
        auto;
}


.login-card.ui-card:hover {
    background:
            radial-gradient(circle at 0 0, rgba(229, 57, 53, 0.16), transparent 20rem),
            linear-gradient(180deg, rgba(22, 22, 23, 0.9), rgba(8, 8, 9, 0.96));
    border-color: rgba(255, 255, 255, 0.095);
    box-shadow:
            0 34px 90px rgba(0, 0, 0, 0.48),
            inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: none;
}

.login-body::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.48) 88%),
        linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.34));
}

.login-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.34;
    pointer-events: none;
}

.login-shell {
    position: relative;
    z-index: 3;
    width: min(1160px, calc(100% - 40px));
    max-width: calc(100vw - 40px);
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.78fr);
    align-items: center;
    gap: clamp(28px, 6vw, 72px);
    padding: clamp(32px, 6vw, 72px) 0;
}

.login-brand-panel,
.login-card {
    animation: loginSlideIn 640ms var(--ease-spring, cubic-bezier(0.16, 1, 0.3, 1)) both;
}

.login-brand-panel {
    animation-delay: 40ms;
}

.login-card {
    animation-delay: 180ms;
}

.login-brand,
.login-eyebrow,
.login-hero-copy h1,
.login-hero-copy > p:not(.login-eyebrow),
.login-card__icon,
.login-card__header .login-eyebrow,
.login-card__header h2,
.login-card__header p:last-child,
.login-alert,
.login-field,
.login-submit,
.login-card__footer {
    opacity: 0;
    animation: loginTextIn 560ms var(--ease-spring, cubic-bezier(0.16, 1, 0.3, 1)) both;
}

.login-brand { animation-delay: 120ms; }
.login-hero-copy .login-eyebrow { animation-delay: 210ms; }
.login-hero-copy h1 { animation-delay: 300ms; }
.login-hero-copy > p:not(.login-eyebrow) { animation-delay: 390ms; }

.login-card__icon { animation-delay: 360ms; }
.login-card__header .login-eyebrow { animation-delay: 430ms; }
.login-card__header h2 { animation-delay: 500ms; }
.login-card__header p:last-child { animation-delay: 570ms; }
.login-alert { animation-delay: 610ms; }
.login-field:nth-of-type(1) { animation-delay: 650ms; }
.login-field:nth-of-type(2) { animation-delay: 720ms; }
.login-submit { animation-delay: 790ms; }
.login-card__footer { animation-delay: 860ms; }

.login-brand {
    display: inline-flex;
    align-items: center;
}

.login-brand__logo {
    width: min(260px, 62vw);
    height: auto;
    filter: drop-shadow(0 16px 34px rgba(0, 0, 0, 0.5));
}

.login-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--color-accent, #ff5555);
    font-size: 0.72rem;
    font-weight: var(--weight-black, 900);
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.login-hero-copy h1 {
    max-width: 760px;
    margin: 0;
    color: var(--text-primary, #fff);
    font-size: clamp(3rem, 7.4vw, 5.8rem);
    font-weight: var(--weight-black, 900);
    line-height: 0.9;
    letter-spacing: -0.08em;
}

.login-hero-copy > p:not(.login-eyebrow) {
    max-width: 640px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: clamp(1rem, 1.6vw, 1.12rem);
    line-height: 1.6;
}

.login-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: clamp(28px, 5vw, 54px);
}

.login-feature-card {
    min-height: 150px;
    padding: 18px;
    border-radius: 18px;
    background:
        radial-gradient(circle at var(--mx, 50%) var(--my, 0), rgba(255, 255, 255, 0.06), transparent 12rem),
        rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-md, 0 10px 20px -10px rgba(0, 0, 0, 0.4)), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    opacity: 0;
    transform: translateY(18px) translateX(-10px);
    animation: loginFeatureIn 520ms var(--ease-spring, cubic-bezier(0.16, 1, 0.3, 1)) both;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.login-feature-card:nth-child(1) { animation-delay: 520ms; }
.login-feature-card:nth-child(2) { animation-delay: 640ms; }
.login-feature-card:nth-child(3) { animation-delay: 760ms; }

.login-feature-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 85, 85, 0.24);
    background:
        radial-gradient(circle at var(--mx, 50%) var(--my, 0), rgba(255, 85, 85, 0.09), transparent 12rem),
        rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.login-feature-card i {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-bottom: 14px;
    border-radius: 12px;
    color: var(--color-accent, #ff5555);
    background: rgba(229, 57, 53, 0.13);
    border: 1px solid rgba(229, 57, 53, 0.26);
}

.login-feature-card strong {
    display: block;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
}

.login-feature-card span {
    display: block;
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.54);
    font-size: 0.82rem;
    line-height: 1.42;
}

.login-card {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    padding: 30px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 0 0, rgba(229, 57, 53, 0.16), transparent 20rem),
        linear-gradient(180deg, rgba(22, 22, 23, 0.9), rgba(8, 8, 9, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.095);
    box-shadow:
        0 34px 90px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.login-card__glow {
    position: absolute;
    inset: -35% -20% auto auto;
    width: 290px;
    height: 290px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 85, 85, 0.18), transparent 68%);
    pointer-events: none;
}

.login-card__header {
    position: relative;
    min-width: 0;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.login-card__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 16px;
    color: var(--color-accent, #ff5555);
    background: rgba(229, 57, 53, 0.13);
    border: 1px solid rgba(229, 57, 53, 0.32);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.login-card__header h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.05em;
}

.login-card__header p:last-child {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.9rem;
    line-height: 1.5;
}

.login-alert {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 13px 14px;
    border-radius: 14px;
    color: rgba(255, 216, 216, 0.98);
    background: rgba(229, 57, 53, 0.13);
    border: 1px solid rgba(255, 85, 85, 0.32);
    font-size: 0.88rem;
    line-height: 1.42;
}

.login-alert i {
    margin-top: 2px;
    color: var(--color-accent, #ff5555);
}

.login-form {
    position: relative;
    min-width: 0;
    z-index: 1;
    display: grid;
    gap: 16px;
}

.login-field label,
.login-label-row label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.025em;
}

.login-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.login-label-row a {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.78rem;
    font-weight: 800;
}

.login-label-row a:hover {
    color: #fff;
}

.login-input-wrap {
    position: relative;
    min-width: 0;
    max-width: 100%;
    display: flex;
    align-items: center;
    min-height: 52px;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.38);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-input-wrap:focus-within {
    border-color: rgba(255, 85, 85, 0.48);
    background: rgba(0, 0, 0, 0.56);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.48),
        0 0 0 3px rgba(255, 85, 85, 0.105);
}

.login-input-wrap > i {
    width: 52px;
    flex: 0 0 52px;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
}

.login-input-wrap input {
    min-width: 0;
    width: 100%;
    height: 52px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font-size: 0.96rem;
    font-weight: 700;
    padding-left: 4px;
    padding-right: 12px;
}

.login-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.28);
    font-weight: 600;
}

.login-input-wrap input:-webkit-autofill,
.login-input-wrap input:-webkit-autofill:hover,
.login-input-wrap input:-webkit-autofill:focus,
.login-input-wrap input:-webkit-autofill:active {
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
    border: 0;
    box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.42) inset !important;
    transition: background-color 9999s ease-in-out 0s;
}

.login-input-wrap:focus-within input:-webkit-autofill,
.login-input-wrap:focus-within input:-webkit-autofill:hover,
.login-input-wrap:focus-within input:-webkit-autofill:focus {
    box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.56) inset !important;
}

.login-input-wrap input:-moz-autofill {
    color: #fff !important;
    background: transparent !important;
}

.login-password-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-right: 5px;
    border: 0;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.48);
    background: transparent;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease;
}

.login-password-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.login-field-error {
    min-height: 18px;
    margin: 6px 0 0;
    color: var(--color-accent, #ff5555);
    font-size: 0.76rem;
    font-weight: 700;
}

.login-submit {
    width: 100%;
    min-height: 52px;
    margin-top: 2px;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.login-submit:disabled {
    opacity: 0.56;
    filter: grayscale(0.35);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-card__footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.075);
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.88rem;
    font-weight: 700;
}

.login-card__footer a {
    color: #fff;
    font-weight: 900;
}

.login-card__footer a:hover {
    color: var(--color-accent, #ff5555);
}

@keyframes loginSlideIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes loginTextIn {
    from {
        opacity: 0;
        transform: translateX(-18px);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

@keyframes loginFeatureIn {
    from {
        opacity: 0;
        transform: translateY(18px) translateX(-10px);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(0);
        filter: blur(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-brand-panel,
    .login-card,
    .login-brand,
    .login-eyebrow,
    .login-hero-copy h1,
    .login-hero-copy > p:not(.login-eyebrow),
    .login-card__icon,
    .login-card__header .login-eyebrow,
    .login-card__header h2,
    .login-card__header p:last-child,
    .login-alert,
    .login-field,
    .login-submit,
    .login-card__footer,
    .login-feature-card {
        opacity: 1;
        transform: none;
        filter: none;
        animation: none;
    }
}

@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
        align-items: start;
        width: min(680px, calc(100% - 34px));
    }

    .login-brand-panel {
        text-align: center;
    }

    .login-brand {
        justify-content: center;
        margin-bottom: 34px;
    }

    .login-hero-copy h1,
    .login-hero-copy > p:not(.login-eyebrow) {
        margin-left: auto;
        margin-right: auto;
    }

    .login-feature-grid {
        grid-template-columns: 1fr;
        text-align: left;
        margin-top: 26px;
    }

    .login-feature-card {
        min-height: 0;
    }
}

@media (max-width: 560px) {
    .login-shell {
        width: min(100%, calc(100vw - 28px));
        max-width: calc(100vw - 28px);
        gap: 12px;
        padding: 18px 0 32px;
    }

    .login-brand-panel {
        line-height: 0;
    }

    .login-brand {
        display: flex;
        justify-content: center;
        margin: 0;
        line-height: 0;
    }

    .login-brand__logo {
        display: block;
        width: min(190px, 62vw);
        height: auto;
        margin: 0;
    }

    .login-hero-copy h1 {
        display: none;
    }

    .login-hero-copy p {
        display: none;
    }

    .login-feature-grid {
        display: none;
    }

    .login-card {
        padding: 22px;
        max-width: 100%;
        border-radius: 20px;
        margin: 0;
    }

    .login-card__header {
        display: block;
        text-align: center;
    }

    .login-card__icon {
        display: none;
    }
}


.login-input-wrap:has(.login-password-toggle) input {
    padding-right: 6px;
}

.login-feature-card {
    will-change: transform, opacity;
}

.login-card__header p:last-child {
    max-width: 360px;
}

/* ==========================================================================
   SIGNUP ADDITIONS
   Builds on the final login layout, with a slightly taller form card.
   ========================================================================== */

.signup-shell {
    grid-template-columns: minmax(0, 0.98fr) minmax(430px, 0.86fr);
}

.signup-card {
    padding: 28px;
}

.signup-name-grid {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.signup-form {
    gap: 14px;
}

.signup-strength {
    height: 6px;
    margin-top: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.09);
}

.signup-strength span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: rgba(255, 85, 85, 0.82);
    transition: width 180ms ease, background 180ms ease;
}

.signup-strength[data-score="2"] span {
    background: rgba(255, 193, 7, 0.92);
}

.signup-strength[data-score="3"] span,
.signup-strength[data-score="4"] span,
.signup-strength[data-score="5"] span {
    background: rgba(76, 175, 80, 0.9);
}

.signup-password-hint.is-good {
    color: rgba(135, 235, 170, 0.92);
}

.signup-body .login-card__footer {
    margin-top: 18px;
}

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

@media (max-width: 560px) {
    .signup-name-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .signup-card {
        padding: 22px;
    }
}


.login-google-btn {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    margin-bottom: 16px;
    border-radius: 16px;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.login-google-btn:hover {
    color: #fff;
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.105);
    border-color: rgba(255, 255, 255, 0.22);
}

.login-google-btn i {
    font-size: 1rem;
}

.login-divider {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 16px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: rgba(255, 255, 255, 0.09);
}


.signup-legal-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-top: 0.15rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
    line-height: 1.45;
    cursor: pointer;
}
.signup-legal-consent input { margin-top: 0.2rem; flex: 0 0 auto; accent-color: #7c5cff; }
.signup-legal-consent a, .signup-legal-error a { color: rgba(255,255,255,.9); text-decoration: underline; text-underline-offset: 2px; }
.signup-legal-error { margin-top: -0.35rem; }

.signup-action-legal {
    margin: 0.65rem 0 0;
    color: var(--text-muted, #9b9b9b);
    font-size: 0.72rem;
    line-height: 1.45;
    text-align: center;
}

.signup-action-legal a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.signup-action-legal a:hover,
.signup-action-legal a:focus-visible {
    color: var(--text-primary, #fff);
}
