/*
 * Sign-in / sign-up screens for signed-out visitors.
 *
 * A hand-written port of the AskSpot design-system mock (Tailwind + React) with
 * every token resolved to its literal value, so these pages need neither the
 * design-system bundle nor a build step. Values below are lifted from the mock —
 * change them only when the mock changes.
 *
 * brand #2766F0 · brand-deep #1A4FCC · brand-pressed #163F9E · brand-tint #EAF0FE
 * ink #313A46 · slate #5E6A7A · line #E6EAF0 · line-input #D6DBE2
 * error #E5484D · error-strong #D64545 · radius 10 / 12 / 16
 */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/Inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/Inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonts/PlusJakartaSans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonts/PlusJakartaSans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

body.as-auth-body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    background: #FBFCFD;
    -webkit-font-smoothing: antialiased;
}

.as-auth-body a {
    color: #2766F0;
    text-decoration: none;
}

.as-auth-body a:hover {
    color: #1A4FCC;
    text-decoration: underline;
}

/*
 * The toggled bits below (reveal icons, loading dots, captcha states) are hidden
 * with the `hidden` attribute. The browser's own [hidden] rule comes from the UA
 * stylesheet and loses to any author `display`, so restate it here — otherwise
 * both eye icons, the spinner and the dots all show at once.
 */
.as-auth-body [hidden] {
    display: none;
}

/* ── Page frame ─────────────────────────────────────────────────────────── */

.as-auth {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

.as-auth__aside {
    width: 46%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 36px;
    padding: 44px 48px;
    background: linear-gradient(165deg, #EAF0FE 0%, #FBFCFD 52%, #EEF2F7 100%);
}

/* min-width: 0, because a flex item otherwise refuses to shrink below the width of
   its contents - and the card inside asks for a fixed 410px, which pushed the whole
   page wider than a phone screen. */
.as-auth__main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: #FFFFFF;
}

.as-auth__card {
    width: 100%;
    max-width: 410px;
}

/* ── Aside: brand, headline, features, stats ─────────────────────────────── */

.as-auth__brand {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

/* The lockup is one image now, mark and wordmark together, so it is sized by height
   and keeps its own proportions. */
.as-auth__brand-lockup {
    height: 40px;
    width: auto;
    display: block;
}

.as-auth__pitch {
    max-width: 430px;
}

.as-auth__headline {
    margin: 0 0 32px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: #313A46;
}

.as-auth__headline em {
    font-style: normal;
    color: #2766F0;
}

.as-auth__features {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.as-auth__feature {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.as-auth__feature-icon {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #FFFFFF;
    border: 1px solid #E6EAF0;
    box-shadow: 0 1px 2px rgba(49, 58, 70, 0.06);
    display: grid;
    place-items: center;
}

.as-auth__feature-title {
    margin: 0 0 3px;
    font-size: 14.5px;
    font-weight: 600;
    color: #313A46;
}

.as-auth__feature-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #5E6A7A;
}

.as-auth__stats {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    row-gap: 16px;
    overflow: hidden;
    max-width: 100%;
}

.as-auth__stat {
    flex: none;
    padding: 0 24px;
    border-left: 1px solid #D6DBE2;
}

.as-auth__stat:first-child {
    padding: 0 24px 0 0;
    border-left: 0;
}

.as-auth__stat-value {
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
    color: #313A46;
}

.as-auth__stat-value--brand {
    color: #2766F0;
}

.as-auth__stat-label {
    margin: 6px 0 0;
    font-size: 12.5px;
    white-space: nowrap;
    color: #5E6A7A;
}

.as-auth__stars {
    color: #F5A623;
    font-size: 11px;
    letter-spacing: 1px;
}

/* ── Tabs ───────────────────────────────────────────────────────────────── */

.as-auth__tabs {
    display: flex;
    gap: 4px;
    background: #EEF2F7;
    border-radius: 12px;
    padding: 4px;
}

.as-auth-body .as-auth__tab {
    flex: 1;
    border: none;
    cursor: pointer;
    border-radius: 9px;
    padding: 9px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    background: transparent;
    color: #5E6A7A;
    transition: background 0.15s, color 0.15s;
}

.as-auth-body .as-auth__tab:hover {
    color: #313A46;
    text-decoration: none;
}

.as-auth-body .as-auth__tab--active {
    background: #FFFFFF;
    color: #313A46;
    box-shadow: 0 1px 2px rgba(49, 58, 70, 0.10);
}

/* ── Panel heading ──────────────────────────────────────────────────────── */

.as-auth__title {
    margin: 28px 0 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #313A46;
}

.as-auth__subtitle {
    margin: 8px 0 0;
    font-size: 14.5px;
    color: #5E6A7A;
}

.as-auth__fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 26px;
}

.as-auth__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.as-auth__footnote {
    margin: 22px 0 0;
    text-align: center;
    font-size: 13.5px;
    color: #5E6A7A;
}

.as-auth__footnote a,
.as-auth__forgot a {
    font-weight: 600;
}

.as-auth__forgot {
    margin: 8px 0 0;
    text-align: right;
    font-size: 12.5px;
}

/* ── Text field ─────────────────────────────────────────────────────────── */

.as-field {
    position: relative;
}

.as-field__label {
    margin-bottom: 7px;
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #313A46;
}

.as-field__input {
    width: 100%;
    border-radius: 10px;
    background: #FFFFFF;
    padding: 12px 14px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: #313A46;
    outline: none;
    border: 1px solid #D6DBE2;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.as-field__input::placeholder {
    color: #919191;
}

.as-field__input:focus {
    border-width: 1.5px;
    border-color: #2766F0;
    box-shadow: 0 0 0 3px #EAF0FE;
}

.as-field__input--error,
.as-field__input--error:focus {
    border-width: 1.5px;
    border-color: #E5484D;
    box-shadow: none;
}

.as-field__error {
    margin: 6px 0 0;
    font-size: 12px;
    color: #E5484D;
}

/* Same slot as the error, muted: it states the rule rather than reporting a mistake. */
.as-field__hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: #8A94A6;
}

/* Symfony renders field errors as a list; flatten it to the mock's single line. */
.as-field__error ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.as-field__reveal {
    position: absolute;
    top: 31px;
    right: 6px;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: #5E6A7A;
    padding: 0;
}

.as-field__reveal:hover {
    color: #313A46;
}

/* ── Terms ──────────────────────────────────────────────────────────────── */

.as-terms__label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    color: #45505F;
}

.as-terms__label input[type='checkbox'] {
    margin: 2px 0 0;
    width: 15px;
    height: 15px;
    accent-color: #2766F0;
    cursor: pointer;
    flex: none;
}

.as-terms__label a {
    font-weight: 600;
}

.as-terms__error {
    margin: 6px 0 0 25px;
    font-size: 12px;
    color: #D64545;
}

.as-terms__error ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ── Button ─────────────────────────────────────────────────────────────── */

.as-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-size: 17px;
    padding: 16px 30px;
    border-radius: 13px;
    background: #2766F0;
    color: #FFFFFF;
    transition: background 180ms;
}

.as-button:hover {
    background: #1A4FCC;
}

.as-button:active {
    background: #163F9E;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.25);
}

.as-button:focus {
    outline: none;
}

.as-button:focus-visible {
    box-shadow: 0 0 0 4px rgba(39, 102, 240, 0.25);
}

/* The quieter half of a pair of choices - "do not allow" beside "allow". Same box as
   .as-button so the two line up, without the colour that says "this is what you came
   for": refusing is a normal answer here, not the recommended one. */
.as-button--secondary {
    background: #FFFFFF;
    color: #313A46;
    box-shadow: inset 0 0 0 1px #D5DAE1;
}

.as-button--secondary:hover {
    background: #F4F6F9;
}

.as-button--secondary:active {
    background: #EDEFF2;
    box-shadow: inset 0 0 0 1px #D5DAE1, inset 0 2px 5px rgba(0, 0, 0, 0.12);
}

.as-button:disabled {
    background: #EDEFF2;
    color: #A8B0BE;
    cursor: not-allowed;
    box-shadow: none;
}

.as-button__dots {
    display: inline-flex;
    gap: 4px;
}

.as-button__dots span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #FFFFFF;
    animation: as-type 1.4s infinite;
}

.as-button[disabled] .as-button__dots span {
    background: #A8B0BE;
}

.as-button__dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.as-button__dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* ── Form-level notices ─────────────────────────────────────────────────── */

.as-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
}

.as-notice--error {
    background: #FCEDE9;
    color: #C73B40;
}

.as-notice--success {
    background: #EAF0FE;
    color: #1A4FCC;
}

.as-notice svg {
    flex: none;
    margin-top: 1px;
}

/* ── Toast ──────────────────────────────────────────────────────────────── */

.as-toast-slot {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 50;
    animation: as-toast-in 0.35s ease both;
}

.as-toast {
    display: flex;
    width: fit-content;
    align-items: flex-start;
    gap: 12px;
    border-radius: 16px;
    border: 1px solid #E6EAF0;
    background: #FFFFFF;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(49, 58, 70, 0.06);
}

.as-toast__icon {
    display: flex;
    height: 38px;
    width: 38px;
    flex: none;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #EAF0FE;
    color: #2766F0;
}

.as-toast__title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 600;
    color: #313A46;
}

.as-toast__text {
    margin: 2px 0 0;
    font-size: 13px;
    color: #5E6A7A;
}

/* ── Animations ─────────────────────────────────────────────────────────── */

@keyframes as-toast-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes as-type {
    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* ── Two-step verification ──────────────────────────────────────────────── */

.as-notice--warning {
    background: #FDF4E3;
    color: #96631A;
}

.as-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    color: #5B6572;
}

.as-checkbox input {
    flex: none;
    width: 16px;
    height: 16px;
    accent-color: #1A4FCC;
    cursor: pointer;
}

/* The setup key, shown as text because no QR image is generated server-side. */
.as-2fa-secret {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
    border: 1px solid #D6DBE2;
    border-radius: 10px;
    padding: 14px;
    background: #F7F8FA;
}

.as-2fa-secret__label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5B6572;
}

.as-2fa-secret__value {
    /* Long keys must wrap rather than widen the card on narrow screens. */
    font-family: 'Courier New', monospace;
    font-size: 15px;
    letter-spacing: 0.08em;
    color: #313A46;
    word-break: break-all;
}

.as-2fa-secret__link {
    font-size: 13px;
}

.as-recovery-codes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.as-recovery-codes__item code {
    display: block;
    border: 1px solid #D6DBE2;
    border-radius: 8px;
    padding: 8px 10px;
    background: #F7F8FA;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    text-align: center;
    color: #313A46;
}

/* .as-button is styled for <button>; the recovery screen uses it on a link. */
a.as-button {
    margin-top: 24px;
    text-decoration: none;
}

/*
 * The mock is a desktop composition only. Below the panel breakpoint the
 * marketing column is dropped so the form keeps the full width instead of
 * collapsing into an unreadable two-column squeeze.
 */
@media (max-width: 991px) {
    .as-auth__aside {
        display: none;
    }

    .as-auth__main {
        padding: 32px 20px;
    }
}

@media (max-width: 575px) {
    .as-auth__headline {
        font-size: 34px;
    }

    .as-auth__title {
        font-size: 27px;
    }

    .as-auth__row {
        grid-template-columns: 1fr;
    }
}
