.auth-page .page-main {
    padding-top: 1.25rem;
    display: flex;
    align-items: center;
}

.auth-page .page-title {
    display: none;
}

.auth-login-layout {
    width: 100%;
    min-height: calc(100vh - 10rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
}

.auth-card {
    width: min(44rem, 100%);
    border: none;
    border-radius: 2.75rem;
    background: transparent;
    padding: 1.8rem 1.6rem 1.5rem;
    text-align: center;
}

.auth-brand {
    margin-top: -0.3rem;
    margin-bottom: 1.35rem;
    font-size: clamp(2rem, 2.6vw, 2.3rem);
    font-weight: 700;
}

.auth-form {
    display: grid;
    justify-items: center;
}

.auth-form p {
    width: min(28rem, 100%);
    margin-bottom: 0.9rem;
}

.auth-form input:not([type="checkbox"]) {
    width: 100%;
    max-width: none;
    border: none;
    border-radius: 999px;
    text-align: center;
    font-weight: 700;
}

.auth-form button {
    min-width: 9.25rem;
    border: none;
    margin-top: 2rem;
    margin-right: 0;
}

.auth-remember-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.1rem;
    font-size: 0.95rem;
}

.auth-remember-row input[type="checkbox"] {
    margin: 0;
}

.auth-meta {
    margin: 1.25rem 0 0.2rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.auth-meta-link a {
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: underline;
}

.auth-errors {
    width: min(28rem, 100%);
    margin: 0 auto 1rem;
    color: var(--color-danger);
    font-weight: 600;
}

.auth-errors ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.auth-errors li {
    margin: 0;
}

.profile-layout {
    display: grid;
    justify-items: center;
    gap: 1rem;
    padding: 0.75rem 0 1.5rem;
}

.profile-avatar-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 0.25rem;
}

.profile-avatar {
    width: 14rem;
    height: 14rem;
    border-radius: 999px;
    object-fit: cover;
}

.profile-form {
    width: min(28rem, 100%);
    display: grid;
    justify-items: center;
    margin-top: 0.8rem;
    row-gap: 0.9rem;
}

.profile-row {
    width: min(28rem, 100%);
    margin-bottom: 0;
}

.profile-form input[type="text"] {
    width: 100%;
    max-width: none;
    border: none;
    border-radius: 999px;
    text-align: center;
    font-weight: 700;
    margin-bottom: 0;
}

.profile-password-link {
    width: min(28rem, 100%);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    padding: 10px 15px;
    color: var(--header-text);
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(3px);
    text-decoration: none;
    margin-bottom: 0;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.profile-password-link:hover {
    color: var(--header-text);
    text-decoration: none;
    transform: scale(1.08);
}

.profile-avatar-input-row {
    position: relative;
    display: flex;
    justify-content: center;
    width: min(28rem, 100%);
}

.profile-avatar-input-row input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    border: 0;
    overflow: hidden;
    white-space: nowrap;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    opacity: 0;
}

.profile-avatar-upload-label {
    width: min(28rem, 100%);
    border-radius: 999px;
    text-align: center;
    font-weight: 700;
    padding: 10px 15px;
    color: var(--header-text);
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(3px);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.profile-avatar-upload-label:hover {
    color: var(--header-text);
    text-decoration: none;
    transform: scale(1.08);
}

.profile-errors {
    width: min(28rem, 100%);
    color: var(--color-danger);
    font-weight: 600;
    text-align: center;
}

.profile-actions {
    margin-top: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    flex-wrap: nowrap;
}

.profile-actions .profile-save-button,
.profile-actions .profile-logout-button {
    position: static;
    z-index: auto;
    width: 9.5rem;
    min-width: 9.5rem;
    height: auto;
    padding: 10px 15px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.profile-logout-form {
    margin: 0;
    width: auto;
}

@media (max-width: 640px) {
    .auth-page .page-main {
        padding-top: 0.75rem;
        align-items: flex-start;
    }

    .auth-login-layout {
        min-height: auto;
        padding: 0.5rem 0;
    }

    .auth-card {
        width: 100%;
        border-radius: 1.75rem;
        padding: 1.2rem 0.9rem 1rem;
    }

    .auth-brand {
        margin-top: 0;
        margin-bottom: 1rem;
        font-size: 1.8rem;
    }

    .auth-form p {
        width: 100%;
        margin-bottom: 0.7rem;
    }

    .auth-form button {
        min-width: 8.5rem;
        margin-top: 1.25rem;
    }

    .auth-remember-row {
        margin-bottom: 0.9rem;
        font-size: 0.9rem;
    }

    .auth-meta {
        margin-top: 0.95rem;
        font-size: 0.9rem;
    }

    .auth-meta-link a {
        font-size: 0.9rem;
    }

    .auth-errors {
        width: 100%;
        margin-bottom: 0.8rem;
    }

    .profile-avatar {
        width: 11rem;
        height: 11rem;
    }

    .profile-actions {
        margin-top: 1.3rem;
        gap: 0.7rem;
    }

    .profile-actions .profile-save-button,
    .profile-actions .profile-logout-button {
        width: 8.5rem;
        min-width: 8.5rem;
    }
}