/* ── Auth ─────────────────────────────────────────────────── */
.auth-page {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-self: center;
}

.auth-page--wide {
    max-width: 720px;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}

.auth-card__logo {
    position: absolute;
    top: -30px;
    left: 2rem;
}

.auth-card__logo svg {
    width: 60px;
    height: auto;
}

.auth-card__brand {
    font-size: 2.4rem;
    color: var(--brand);
    font-family: 'Pixelify Sans', monospace;
    letter-spacing: .03em;
}

.auth-card__title {
    margin: 0;
    color: var(--text);
    font-family: inherit;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
}

.auth-card__brand:hover { opacity: .75; }
.auth-card__logo:hover { opacity: .75; }

.auth-card__intro,
.auth-card__footnote,
.auth-card__links {
    color: var(--text-muted);
    font-size: .9rem;
    line-height: 1.5;
}

.auth-card__intro a,
.auth-card__footnote a,
.auth-card__links a {
    color: var(--accent);
    font-weight: 700;
}

.auth-card__intro a:hover,
.auth-card__footnote a:hover,
.auth-card__links a:hover {
    opacity: .75;
}

.auth-card__links {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.auth-form .btn {
    background: linear-gradient(to bottom, #CAADEA, #9B6DC8);
    color: #1a0a2e;
    letter-spacing: 0.05rem;
}

.auth-form .btn--ghost {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
}

.auth-form .btn[type=submit] {
    margin-top: 0.75rem;
}

.btn--discord {
    align-self: stretch;
    background: #5865f2;
    color: #fff;
    text-align: center;
}

.btn--discord:hover {
    background: #4752c4;
}

.btn--google {
    align-self: stretch;
    background: #fff;
    border: 1px solid #dadce0;
    color: #3c4043;
    text-align: center;
}

.btn--google:hover {
    background: #f8f9fa;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--text-muted);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

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

.auth-divider + .btn--full {
    margin-top: 0;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    align-self: flex-end;
    gap: .35rem;
    color: var(--text-muted);
    font-size: .9rem;
    font-weight: 600;
    transition: color .15s;
}

.auth-back:hover {
    color: var(--text);
}

.backoffice-section .auth-form .btn {
    background: var(--accent);
    color: #000;
    letter-spacing: normal;
    margin-top: 0;
    margin-bottom: 0;
}

.auth-error {
    color: var(--red);
    font-size: .875rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-onboarding-section {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.auth-field--honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.auth-field label,
.auth-field > span {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Password input with a reveal button sharing one bordered box. */
.password-field {
    position: relative;
    display: flex;
}

.password-field input {
    flex: 1;
    padding-right: 2.9rem;
}

.password-field__toggle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 0 .85rem;
    background: none;
    border: 0;
    color: var(--text-muted);
    cursor: pointer;
}

.password-field__toggle:hover,
.password-field__toggle:focus-visible {
    color: var(--text);
}

.auth-checkbox-field {
    display: grid;
    grid-template-columns: 1rem 1fr;
    gap: .65rem;
    align-items: start;
    color: var(--text-muted);
    font-size: .85rem;
    line-height: 1.45;
}

.auth-checkbox-field input {
    width: 1rem;
    height: 1rem;
    margin: .2rem 0 0;
    accent-color: var(--brand);
}

.auth-field input,
.auth-field select {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .65rem .85rem;
    color: var(--text);
    outline: none;
    transition: border-color .15s;
    appearance: none;
}

.auth-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 24 24' stroke='%238888a8' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .85rem center;
    padding-right: 2.25rem;
    cursor: pointer;
}

.auth-field input:focus,
.auth-field select:focus {
    border-color: var(--brand);
}

.btn--full {
    width: 100%;
    justify-content: center;
    margin-top: .25rem;
}


@media (max-width: 600px) {
    .auth-page {
        max-width: 100%;
    }

    body:has(.auth-page) {
        min-height: 100dvh;
    }

    body:has(.auth-page) main {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .auth-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin: 0 -1rem;
    }
}
