/* ===== Badges de status de aula ===== */
.badge-aula {
    font-weight: 500;
    font-size: 0.75em;
    padding: 0.35em 0.65em;
    border-radius: 0.375rem;
    line-height: 1;
    white-space: nowrap;
}

.badge-aula-presenca,
.aula-status-table .badge.bg-success {
    background-color: #28a745;
    color: #fff;
}

.badge-aula-confirmado,
.badge-aula-reposicao,
.aula-status-table .badge.bg-primary {
    background-color: #007bff;
    color: #fff;
}

.badge-aula-falta,
.aula-status-table .badge.bg-danger {
    background-color: #dc3545;
    color: #fff;
}

.badge-aula-pendente,
.aula-status-table .badge.bg-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-aula-agendada,
.aula-status-table .badge.bg-info {
    background-color: #17a2b8;
    color: #fff;
}

.badge-aula-on-holiday,
.aula-status-table .badge.bg-holiday {
    background-color: #6f42c1;
    color: #fff;
}

.badge-aula-falta-sem-reposicao,
.aula-status-table .badge.bg-dark {
    background-color: #343a40;
    color: #fff;
}

.badge-aula-cancelada,
.badge-aula-outro,
.aula-status-table .badge.bg-secondary {
    background-color: #6c757d;
    color: #fff;
}

/* ===== Badges de histórico de aluno ===== */
.badge-historico,
[data-tipo="historico"] {
    font-weight: 500 !important;
    font-size: 0.75em !important;
    padding: 0.375rem 0.75rem !important;
    border-radius: 0.375rem !important;
    border: 1px solid transparent !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    display: inline-block !important;
    /* Fallback legível se o tipo não tiver cor específica */
    background-color: #6c757d !important;
    color: #ffffff !important;
}

.badge-historico-inclusao,
[data-tipo="historico"][data-status="inclusao"] {
    background-color: #198754 !important;
    color: #ffffff !important;
    border-color: #157347 !important;
}

.badge-historico-saida,
[data-tipo="historico"][data-status="saida"] {
    background-color: #dc3545 !important;
    color: #ffffff !important;
    border-color: #b02a37 !important;
}

.badge-historico-update,
[data-tipo="historico"][data-status="update"] {
    background-color: #0d6efd !important;
    color: #ffffff !important;
    border-color: #0a58ca !important;
}

.badge-historico-arquivamento,
[data-tipo="historico"][data-status="arquivamento"] {
    background-color: #fd7e14 !important;
    color: #ffffff !important;
    border-color: #d6630a !important;
}

.badge-historico-restauracao,
[data-tipo="historico"][data-status="restauracao"] {
    background-color: #0aa2c0 !important;
    color: #ffffff !important;
    border-color: #098da8 !important;
}

.badge-historico-alteracao_professor,
[data-tipo="historico"][data-status="alteracao_professor"] {
    background-color: #6c757d !important;
    color: #ffffff !important;
    border-color: #5a6268 !important;
}

.badge-historico-alteracao_aula,
[data-tipo="historico"][data-status="alteracao_aula"] {
    background-color: #495057 !important;
    color: #ffffff !important;
    border-color: #3d4043 !important;
}

.badge-historico-alteracao_plataforma,
.badge-historico-plataforma_removida,
[data-tipo="historico"][data-status="alteracao_plataforma"],
[data-tipo="historico"][data-status="plataforma_removida"] {
    background-color: #6c757d !important;
    color: #ffffff !important;
    border-color: #5a6268 !important;
}

.badge-historico-remocao_com_pendencia,
[data-tipo="historico"][data-status="remocao_com_pendencia"] {
    background-color: #dc3545 !important;
    color: #ffffff !important;
    border-color: #b02a37 !important;
}

.badge-historico-pendencia_marcada,
[data-tipo="historico"][data-status="pendencia_marcada"] {
    background-color: #ffc107 !important;
    color: #212529 !important;
    border-color: #d39e00 !important;
}

.badge-historico-pendencia_resolvida,
[data-tipo="historico"][data-status="pendencia_resolvida"] {
    background-color: #198754 !important;
    color: #ffffff !important;
    border-color: #157347 !important;
}

.badge-historico-outro,
[data-tipo="historico"][data-status="outro"] {
    background-color: #6c757d !important;
    color: #ffffff !important;
    border-color: #5a6268 !important;
}

/* ===== Badges de benefícios (payroll / config usuário) ===== */
#benefits_list .badge,
.benefit-item .badge {
    font-weight: 500;
}

#benefits_list .badge-benefit-fixo,
.benefit-item .badge-benefit-fixo {
    background-color: #28a745;
    color: #fff;
}

#benefits_list .badge-benefit-variavel,
.benefit-item .badge-benefit-variavel {
    background-color: #ffc107;
    color: #212529;
}

#benefits_list .badge-benefit-por-hora,
.benefit-item .badge-benefit-por-hora {
    background-color: #17a2b8;
    color: #fff;
}

#benefits_list .badge-benefit-porcentagem,
.benefit-item .badge-benefit-porcentagem {
    background-color: #007bff;
    color: #fff;
}

#benefits_list .badge-benefit-ativo,
.benefit-item .badge-benefit-ativo {
    background-color: #28a745;
    color: #fff;
}

#benefits_list .badge-benefit-inativo,
.benefit-item .badge-benefit-inativo {
    background-color: #6c757d;
    color: #fff;
}

#benefits_list .badge-benefit-suspenso,
.benefit-item .badge-benefit-suspenso {
    background-color: #ffc107;
    color: #212529;
}

/* Badges genéricas não devem herdar cores de aula */
.badge:not(.badge-aula):not(.badge-historico):not([data-tipo="historico"]):not([data-protected]) {
    /* Bootstrap .bg-* funciona normalmente fora de contextos de aula */
}
