/* ── Sign-in pop-up ─────────────────────────────────────────
   Figma: desktop 2996:52540, mobile 2996:52546. The grey card in a
   faint glass frame, over the page gone deep green and blurred.
   ─────────────────────────────────────────────────────────── */

.sign-in {
    width: min(680px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto; /* centred: the reset takes a dialog's own margin away */
    padding: 8px;
    border: 1px solid rgb(255 255 255 / 0.1);
    border-radius: 16px;
    background: rgb(255 255 255 / 0.05);
    color: var(--color-text);
    overflow: auto;
}

.sign-in::backdrop {
    background: rgb(2 31 14 / 0.9);
    backdrop-filter: blur(10px);
}

.sign-in__card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 32px 32px 28px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-grey-light);
    box-shadow: 0 0 12px rgb(0 0 0 / 0.12);
}

.sign-in__close {
    position: absolute;
    top: 19px;
    right: 26px;
    display: flex;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-text);
    cursor: pointer;
}

.sign-in__head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 32px; /* clear of the close button */
}

.sign-in__title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 600;
    line-height: 36px;
    color: var(--color-secondary);
}

.sign-in__text,
.sign-in__field label {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 20px;
    color: var(--color-text-muted);
}

.sign-in__errors {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 14px;
    border: 1px solid var(--color-error);
    border-radius: 6px;
    background: rgb(248 0 0 / 0.08);
    color: var(--color-error);
    font-size: 14px;
    line-height: 20.8px;
}

.sign-in__errors[hidden] {
    display: none;
}

.sign-in__errors a {
    color: inherit;
}

.sign-in__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* The form's gap spaces Google's reCAPTCHA line */
.sign-in__form .recaptcha-note {
    margin-top: 0;
}

.sign-in__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sign-in__field input {
    width: 100%;
    height: 46px;
    padding: 11px 14px;
    border: 1px solid var(--color-grey);
    border-radius: 6px;
    background: var(--color-white);
    box-shadow: 0 0 12px rgb(0 0 0 / 0.12);
    color: var(--color-text);
    font: inherit;
    line-height: 20.8px;
    outline: none;
    transition: box-shadow var(--transition), border-color var(--transition);
}

.sign-in__field input:focus {
    border-color: var(--color-primary);
    box-shadow: inset 0 0 0 2px var(--color-primary);
}

/* The password, with the show / hide eye centred at its right end */
.sign-in__password {
    position: relative;
    display: flex;
    align-items: center;
}

.sign-in__field .sign-in__password input {
    padding-right: 48px;
}

.sign-in__reveal {
    position: absolute;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: none;
    color: var(--color-text-muted);
    cursor: pointer;
}

.sign-in__reveal:hover,
.sign-in__reveal:focus-visible {
    color: var(--color-text);
}

.sign-in__reveal-hide,
.sign-in__reveal[aria-pressed="true"] .sign-in__reveal-show {
    display: none;
}

.sign-in__reveal[aria-pressed="true"] .sign-in__reveal-hide {
    display: block;
}

.sign-in__lost {
    align-self: flex-end;
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 18px;
}

.sign-in__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.sign-in__signup {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 20.8px;
    color: var(--color-text-muted);
}

.sign-in__signup a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--color-secondary);
    font-weight: 700;
    text-decoration: none;
}

.sign-in__signup a:hover span {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .sign-in__card {
        padding: 24px 20px;
    }

    .sign-in__close {
        top: 23px;
        right: 20px;
    }

    .sign-in__title {
        font-size: 36px;
        font-weight: 700;
        line-height: 34px;
    }
}
