/* Badge de perfil activo — login y registro (fondo sólido por perfil) */

:root {
    --auth-badge-apicultor-bg: #d97706;
    --auth-badge-apicultor-text: #ffffff;

    --auth-badge-admin-grupo-bg: #4f46e5;
    --auth-badge-admin-grupo-text: #ffffff;

    --auth-badge-bee-fractal-bg: #059669;
    --auth-badge-bee-fractal-text: #ffffff;
}

/* ── Cabecera: grid 3 columnas — nav | badge (centro) | balance ── */
.auth-profile-panel-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 0.625rem;
    margin-bottom: var(--spacing-lg, 1.5rem);
}

.auth-profile-panel-header__nav {
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-self: start;
    min-width: 0;
}

.auth-profile-panel-header__nav > .auth-back-link:not(.auth-back-link--pill) {
    padding-bottom: 0;
}

.auth-profile-panel-header .auth-back-link--pill {
    margin-bottom: 0;
}

.auth-profile-panel-header__badge {
    grid-column: 2;
    justify-self: center;
    min-width: 0;
}

.auth-profile-panel-header--register {
    margin-bottom: var(--spacing-md, 1rem);
}

/* ── Badge (pill sólida — color de perfil + texto blanco) ── */
.auth-profile-badge {
    --auth-badge-bg: #60a5fa;
    --auth-badge-text: #ffffff;

    display: inline-flex;
    align-items: center;
    padding: 0.3125rem 0.8125rem;
    border-radius: 999px;
    font-family: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(0.75rem, 2vw, 0.8125rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.25;
    color: var(--auth-badge-text);
    background-color: var(--auth-badge-bg);
    border: none;
    max-width: 100%;
}

.auth-profile-badge__label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modificadores por perfil */
.auth-profile-badge--apicultor {
    --auth-badge-bg: var(--auth-badge-apicultor-bg);
    --auth-badge-text: var(--auth-badge-apicultor-text);
}

.auth-profile-badge--admin-grupo {
    --auth-badge-bg: var(--auth-badge-admin-grupo-bg);
    --auth-badge-text: var(--auth-badge-admin-grupo-text);
}

.auth-profile-badge--bee-fractal {
    --auth-badge-bg: var(--auth-badge-bee-fractal-bg);
    --auth-badge-text: var(--auth-badge-bee-fractal-text);
}

/* Responsive — móvil: nav izquierda, badge derecha */
@media (max-width: 767px) {
    .auth-profile-panel-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        column-gap: 0.625rem;
    }

    .auth-profile-panel-header__nav {
        grid-column: unset;
        flex: 0 1 auto;
        min-width: 0;
    }

    .auth-profile-panel-header__badge {
        grid-column: unset;
        justify-self: unset;
        margin-left: auto;
        flex-shrink: 0;
    }
}

@media (max-width: 374px) {
    .auth-profile-panel-header {
        column-gap: 0.5rem;
    }

    .auth-profile-badge {
        padding: 0.25rem 0.6875rem;
        letter-spacing: 0.03em;
    }
}
