.auth-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
}

.auth-shell {
    width: min(440px, 100%);
}

.auth-card {
    overflow: hidden;
}

.auth-heading {
    padding: 26px 26px 22px;
    border-bottom: 1px solid var(--border);
    background: rgba(17, 43, 73, 0.65);
}

.auth-brand h1 {
    margin: 0;
    font-size: 28px;
}

.auth-brand p {
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.auth-error {
    margin: 20px 26px 0;
    padding: 11px 13px;
    border: 1px solid rgba(248, 113, 113, 0.5);
    border-radius: 9px;
    background: rgba(127, 29, 29, 0.25);
    color: #fecaca;
    font-size: 14px;
    line-height: 1.45;
}

.auth-form {
    display: grid;
    gap: 17px;
    padding: 24px 26px 20px;
}

.auth-field {
    display: grid;
    gap: 7px;
}

.auth-field span {
    color: #dce6f2;
    font-size: 13px;
    font-weight: bold;
}

.auth-field input {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: 0;
    background: var(--panel-light);
    color: var(--text);
}

.auth-field input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(244, 185, 66, 0.12);
}

.auth-submit {
    width: 100%;
    margin-top: 3px;
}

.auth-persistence-note {
    margin: 0;
    padding: 0 26px 24px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.game-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.current-user {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.logout-form {
    margin: 0;
}

.button-logout {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: var(--panel-light);
    color: var(--text);
    font-size: 13px;
}

.button-logout:hover {
    border-color: rgba(244, 185, 66, 0.55);
    background: #173553;
}

@media (max-width: 620px) {
    .auth-heading,
    .auth-form {
        padding-inline: 20px;
    }

    .auth-error {
        margin-inline: 20px;
    }

    .auth-persistence-note {
        padding-inline: 20px;
    }

    .game-header-actions {
        flex-wrap: wrap;
        gap: 7px;
    }

    .current-user {
        width: 100%;
        font-size: 11px;
        text-align: right;
    }

    .button-logout {
        min-height: 34px;
        padding: 6px 9px;
        font-size: 11px;
    }
}
