html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* ===========================================
   Logo de Login - Visibilidade em todos os temas
   =========================================== */
/* O logo logoSegepes.svg usa fill branco (#fff), precisamos garantir 
   que seja visível tanto no tema dark quanto no tema light */
.logo-login {
    /* Adiciona uma sombra drop-shadow para dar contraste em qualquer fundo */
    filter: drop-shadow(0px 0px 8px rgba(0, 0, 0, 0.6)) 
            drop-shadow(0px 0px 3px rgba(0, 0, 0, 0.8));
}

/* Quando estiver em tema claro, inverter cores do logo para azul escuro */
[data-pc-theme="light"] .logo-login {
    filter: brightness(0) saturate(100%) invert(25%) sepia(90%) saturate(1500%) 
            hue-rotate(200deg) brightness(95%) contrast(95%);
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}


.title-page {
    border-left: 5px solid rgba(var(--bs-link-color-rgb)) !important;
    padding-left: 12px !important;
    text-transform: uppercase !important;
    color: rgba(var(--bs-body-color)) !important;
    margin-bottom: 20px !important;
}

.form-group {
    margin-bottom: 15px !important;
}

.menu-card {
    text-align: center !important;
}

    .menu-card .menu-card-icone {
        font-size: 75px !important;
    }

    .menu-card p {
        text-transform: uppercase !important;
        font-weight: bold !important;
        margin-bottom: 0 !important;
    }

    .menu-card .card {
        padding-top: 25px;
        padding-bottom: 25px;
    }

        .menu-card .card:hover:not(.not-hover) {
            background-color: #0e8ded !important;
            color: white !important;
        }

.titulo-card-periodo {
    font-size: 50px !important;
}

.bg-pink {
    background-color: #e83e8c !important;
}

.bg-purple {
    background-color: #6610f2 !important;
}

.div-cor.bg-white i {
    color: #2d2f32 !important
}

.div-cor.bg-white {
    border: 1px solid #2d2f32 !important;
}

.f-25 {
    font-size: 25px !important;
}

.div-cor.active, .div-cor:hover {
    box-shadow: 0 0 0 1px white, 0 0 0 3px #0e8ded !important;
    padding: 10px !important;
}

.div-icon.active, .div-icon:hover {
    background-color: #0e8ded !important;
    box-shadow: 0 0 0 1px white, 0 0 0 3px #0e8ded !important;
    color: white;
}

.div-periodo .accordion-button {
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    font-weight: bold !important;
}

.btn-form {
    padding-left: 70px !important;
    padding-right: 70px !important;
    text-transform: uppercase !important;
}

.bg-primary-calendar {
    background-color: #dbeefc !important;
    color: #0e8ded !important;
}

.bg-danger-calendar {
    background-color: #fde3e1 !important;
    color: #f44236 !important;
}

.bg-secondary-calendar {
    background-color: #e1e3e7 !important;
    color: #39465f !important;
}

.bg-info-calendar {
    background-color: #e2f5fc !important;
    color: #3ebfea !important;
}

.bg-warning-calendar {
    background-color: #fdf6df !important;
    color: #f4c22b !important;
}

.bg-pink-calendar {
    background-color: #fce2ee !important;
    color: #e83e8c !important;
}

.bg-purple-calendar {
    background-color: #e8dbfd !important;
    color: #6610f2 !important;
}

.f-15 {
    font-size: 15px !important;
}

@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto !important;
    }
}

@media (min-width: 769px) {
    .table-responsive {
        overflow: visible !important;
    }

        .table-responsive .dropdown-menu {
            position: absolute !important;
            z-index: 1050;
        }
}

.modal {
    --bs-modal-header-padding: 1rem !important;
}

.modal-header h4 {
    margin-bottom: 0 !important;
}

.swal2-popup {
    background: #fff !important;
    zoom: 80% !important;
}

button.swal2-confirm {
    background-color: #0e8ded !important;
    color: white !important;
}

.swal2-backdrop-show {
    z-index: 9999 !important;
}

.p-r-3 {
    padding-right: 3px;
}

#select-menu-instituicoes {
    width: 280px !important;
}


.accordion-default .accordion-button:not(.collapsed) {
    background-color: #ebebeb !important;
    color: #4a4a4a !important;
}

.float-right {
    float: right !important;
}

.float-left {
    float: left !important;
}

.icone-btn {
    padding-right: 3px !important;
    font-size: 14px !important;
}

.border-default {
    border-color: #d1d1d1 !important;
}

.accordion-modulos .accordion-item {
    border-left: 4px solid #156999 !important;
    border-radius: 0 !important;
}

.accordion-modulos .accordion-button, .accordion-modulos .accordion-button:not(.collapsed) {
    color: #156999 !important;
    background-color: #cdeefd45 !important;
    font-weight: bold !important;
    padding: 10px !important;
    border-radius: 0 !important;
}


.swal-confirm-popup .swal2-title {
    font-size: 24px !important;
}

#modal-anotacao .ql-toolbar {
    border-radius: 10px 10px 0 0 !important;
}

#modal-anotacao .ql-container {
    height: 200px !important;
    border-radius: 0 0 10px 10px !important;
}


.card-anotacao-bg-pink {
    background-color: #fce2ee !important;
}

.card-anotacao-bg-primary {
    background-color: #dbeefc !important;
}

.card-anotacao-bg-danger {
    background-color: #fde3e1 !important;
}

.card-anotacao-bg-secondary {
    background-color: #e1e3e7 !important;
}

.card-anotacao-bg-info {
    background-color: #e2f5fc !important;
}

.card-anotacao-bg-warning {
    background-color: #fdf6df !important;
}

.card-anotacao-bg-purple {
    background-color: #e8dbfd !important;
}


.select2-container--default .select2-selection--single {
    border-color: #dbe0e5 !important;
    border-radius: 4px;
}

.select2-container .select2-selection--single {
    height: 48px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #5b6b79 !important;
    padding: 9px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 12px !important;
    right: 8px !important;
}


.label-required::after {
    content: "*";
    color: red;
    margin-left: 3px;
}

.dt-container > .dt-layout-row:last-of-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

    .dt-container > .dt-layout-row:last-of-type .dt-layout-cell.dt-start {
        text-align: left;
    }

    .dt-container > .dt-layout-row:last-of-type .dt-layout-cell.dt-end {
        text-align: right;
    }

.dt-layout-row.dt-layout-table {
    padding-bottom: 10px;
}

.title-form-1 {
    color: rgb(57, 70, 95);
    margin-top: 10px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
}
.color-1 {
    color: #116678 !important;
}

.color-2 {
    color: #6e5e8d !important;
}

.color-3 {
    color: #065f95 !important;
}

.card-periodos {
    margin-bottom: 0px !important;
    height: 100% !important;
}

.p-titulo-modulo {
    color: #156999 !important;
    font-weight: bold !important;
    padding: 7px;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #15699938 !important;
    font-size: 16px;
}

.m-b-18 {
    margin-bottom: 18px !important;
}

.alert-dark {
    border: none !important;
}

.card-1:hover {
    border-left: 7px solid #4aaf51 !important;
}

.card-2:hover {
    border-left: 7px solid #a389d4 !important;
}

.card-3:hover {
    border-left: 7px solid #0398f2 !important;
}

/* ========================================
   Animações para UI/UX melhorada
   ======================================== */

/* Animação para números dos contadores */
@keyframes animacaoNumero {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.animacao-numero {
    animation: animacaoNumero 0.3s ease;
    display: inline-block;
}

/* Efeito hover suave para cards */
.card-hover-effect {
    transition: all 0.3s ease;
}

.card-hover-effect:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Transição suave para badges */
.badge {
    transition: all 0.3s ease;
}

/* Animação fade-in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Efeito ripple para botões */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* Toast customizado para sucesso */
.toast-success {
    background-color: #28a745 !important;
    color: white !important;
}

/* Skeleton loader para carregamentos */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Melhorias de acessibilidade - focus visible */
*:focus-visible {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

/* ========================================
   Estilos do Calendário - FullCalendar
   ======================================== */

/* Estilos dos botões do calendário */
.fc .fc-button-primary {
    text-transform: capitalize !important;
    font-weight: 500 !important;
}

.fc .fc-toolbar-title {
    text-transform: capitalize !important;
}

/* Ajuste do texto dos dias da semana */
.fc .fc-col-header-cell-cushion {
    text-transform: capitalize !important;
    font-weight: 600 !important;
}

/* Dark mode - Calendário */
[data-pc-theme="dark"] .fc-theme-bootstrap a:not([href]) {
    color: var(--bs-body-color) !important;
}

[data-pc-theme="dark"] .fc .fc-toolbar-title {
    color: #e0e0e0 !important;
}

[data-pc-theme="dark"] .fc .fc-col-header-cell-cushion {
    color: #c0c0c0 !important;
}

[data-pc-theme="dark"] .fc .fc-daygrid-day-number {
    color: #b0b0b0 !important;
}

[data-pc-theme="dark"] .fc .fc-daygrid-day-number:hover {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

[data-pc-theme="dark"] .fc-event {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-pc-theme="dark"] .bg-primary-calendar {
    background-color: rgba(14, 141, 237, 0.2) !important;
    color: #5ab8f5 !important;
}

[data-pc-theme="dark"] .bg-danger-calendar {
    background-color: rgba(244, 66, 54, 0.2) !important;
    color: #f77c73 !important;
}

[data-pc-theme="dark"] .bg-secondary-calendar {
    background-color: rgba(57, 70, 95, 0.3) !important;
    color: #a0aab5 !important;
}

[data-pc-theme="dark"] .bg-info-calendar {
    background-color: rgba(62, 191, 234, 0.2) !important;
    color: #6dd0f0 !important;
}

[data-pc-theme="dark"] .bg-warning-calendar {
    background-color: rgba(244, 194, 43, 0.2) !important;
    color: #f7d46b !important;
}

[data-pc-theme="dark"] .bg-pink-calendar {
    background-color: rgba(232, 62, 140, 0.2) !important;
    color: #ee6fa8 !important;
}

[data-pc-theme="dark"] .bg-purple-calendar {
    background-color: rgba(102, 16, 242, 0.2) !important;
    color: #9b6ff5 !important;
}

/* SweetAlert2 - Dark mode */
[data-pc-theme="dark"] .swal2-popup {
    background: #1e1e2d !important;
    color: #e0e0e0 !important;
}

[data-pc-theme="dark"] .swal2-title {
    color: #e0e0e0 !important;
}

[data-pc-theme="dark"] .swal2-html-container {
    color: #b0b0b0 !important;
}

[data-pc-theme="dark"] .swal2-confirm {
    background-color: #0e8ded !important;
}

[data-pc-theme="dark"] .swal2-cancel {
    background-color: #6c757d !important;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* 🌙 DARK MODE - Correções de Contraste                                        */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Fundos claros no dark mode precisam de fundo escuro */
[data-pc-theme="dark"] .bg-light {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-pc-theme="dark"] .bg-light-primary {
    background-color: rgba(14, 141, 237, 0.15) !important;
    color: #60a5fa !important;
}

[data-pc-theme="dark"] .bg-light-secondary {
    background-color: rgba(108, 117, 125, 0.2) !important;
    color: #a0aec0 !important;
}

[data-pc-theme="dark"] .bg-light-success {
    background-color: rgba(40, 167, 69, 0.15) !important;
    color: #68d391 !important;
}

[data-pc-theme="dark"] .bg-light-danger {
    background-color: rgba(220, 53, 69, 0.15) !important;
    color: #fc8181 !important;
}

[data-pc-theme="dark"] .bg-light-warning {
    background-color: rgba(255, 193, 7, 0.15) !important;
    color: #fbd38d !important;
}

[data-pc-theme="dark"] .bg-light-info {
    background-color: rgba(23, 162, 184, 0.15) !important;
    color: #63b3ed !important;
}

/* Table headers e footers */
[data-pc-theme="dark"] .table-light,
[data-pc-theme="dark"] thead.table-light th,
[data-pc-theme="dark"] .card-footer.bg-light,
[data-pc-theme="dark"] .card-header.bg-light {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
    border-color: #4a5568 !important;
}

/* Textos claros precisam ficar mais claros no dark */
[data-pc-theme="dark"] .text-muted {
    color: #a0aec0 !important;
}

[data-pc-theme="dark"] .text-gray-800 {
    color: #e2e8f0 !important;
}

[data-pc-theme="dark"] .text-dark {
    color: #e2e8f0 !important;
}

/* Code e elementos inline */
[data-pc-theme="dark"] code {
    background-color: #2d3748 !important;
    color: #63b3ed !important;
}

[data-pc-theme="dark"] code.bg-light {
    background-color: #4a5568 !important;
}

/* Alerts no dark mode */
[data-pc-theme="dark"] .alert-info {
    background-color: rgba(23, 162, 184, 0.15) !important;
    border-color: #4a5568 !important;
    color: #63b3ed !important;
}

[data-pc-theme="dark"] .alert-warning {
    background-color: rgba(255, 193, 7, 0.15) !important;
    border-color: #4a5568 !important;
    color: #fbd38d !important;
}

[data-pc-theme="dark"] .alert-success {
    background-color: rgba(40, 167, 69, 0.15) !important;
    border-color: #4a5568 !important;
    color: #68d391 !important;
}

[data-pc-theme="dark"] .alert-danger {
    background-color: rgba(220, 53, 69, 0.15) !important;
    border-color: #4a5568 !important;
    color: #fc8181 !important;
}

/* Cards e borders */
[data-pc-theme="dark"] .card {
    border-color: #4a5568 !important;
}

[data-pc-theme="dark"] .border {
    border-color: #4a5568 !important;
}

[data-pc-theme="dark"] .table-bordered {
    border-color: #4a5568 !important;
}

[data-pc-theme="dark"] .table-bordered th,
[data-pc-theme="dark"] .table-bordered td {
    border-color: #4a5568 !important;
}

/* Form controls */
[data-pc-theme="dark"] .form-control,
[data-pc-theme="dark"] .form-select {
    background-color: #1a202c !important;
    border-color: #4a5568 !important;
    color: #e2e8f0 !important;
}

[data-pc-theme="dark"] .form-control::placeholder {
    color: #718096 !important;
}

[data-pc-theme="dark"] .form-control:focus,
[data-pc-theme="dark"] .form-select:focus {
    border-color: #0e8ded !important;
    box-shadow: 0 0 0 0.2rem rgba(14, 141, 237, 0.25) !important;
}

/* List groups */
[data-pc-theme="dark"] .list-group-item {
    background-color: #1e1e2d !important;
    border-color: #4a5568 !important;
    color: #e2e8f0 !important;
}

[data-pc-theme="dark"] .list-group-item-action:hover {
    background-color: #2d3748 !important;
}

/* Badges */
[data-pc-theme="dark"] .badge.bg-secondary {
    background-color: #4a5568 !important;
    color: #e2e8f0 !important;
}

[data-pc-theme="dark"] .badge.bg-light {
    background-color: #4a5568 !important;
    color: #e2e8f0 !important;
}

/* Breadcrumb */
[data-pc-theme="dark"] .breadcrumb {
    background-color: transparent !important;
}

[data-pc-theme="dark"] .breadcrumb-item a {
    color: #60a5fa !important;
}

[data-pc-theme="dark"] .breadcrumb-item.active {
    color: #a0aec0 !important;
}

/* Dropdowns */
[data-pc-theme="dark"] .dropdown-menu {
    background-color: #1e1e2d !important;
    border-color: #4a5568 !important;
}

[data-pc-theme="dark"] .dropdown-item {
    color: #e2e8f0 !important;
}

[data-pc-theme="dark"] .dropdown-item:hover {
    background-color: #2d3748 !important;
}

/* Modals */
[data-pc-theme="dark"] .modal-content {
    background-color: #1e1e2d !important;
    border-color: #4a5568 !important;
}

[data-pc-theme="dark"] .modal-header {
    border-bottom-color: #4a5568 !important;
}

[data-pc-theme="dark"] .modal-footer {
    border-top-color: #4a5568 !important;
}

[data-pc-theme="dark"] .btn-close {
    filter: invert(1) !important;
}

/* Nav tabs */
[data-pc-theme="dark"] .nav-tabs {
    border-bottom-color: #4a5568 !important;
}

[data-pc-theme="dark"] .nav-tabs .nav-link {
    color: #a0aec0 !important;
}

[data-pc-theme="dark"] .nav-tabs .nav-link.active {
    background-color: #1e1e2d !important;
    border-color: #4a5568 #4a5568 #1e1e2d !important;
    color: #e2e8f0 !important;
}

[data-pc-theme="dark"] .nav-tabs .nav-link:hover {
    border-color: #4a5568 !important;
}

/* Pagination */
[data-pc-theme="dark"] .page-link {
    background-color: #1e1e2d !important;
    border-color: #4a5568 !important;
    color: #e2e8f0 !important;
}

[data-pc-theme="dark"] .page-item.active .page-link {
    background-color: #0e8ded !important;
    border-color: #0e8ded !important;
}

/* Accordion */
[data-pc-theme="dark"] .accordion-button {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-pc-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: #2d3748 !important;
    color: #60a5fa !important;
}

[data-pc-theme="dark"] .accordion-body {
    background-color: #1e1e2d !important;
}

/* Progress bars */
[data-pc-theme="dark"] .progress {
    background-color: #2d3748 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* ☀️ LIGHT MODE - Correções de Contraste                                       */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Garantir que bg-dark tenha texto claro no light mode */
[data-pc-theme="light"] .bg-dark {
    background-color: #212529 !important;
    color: #fff !important;
}

[data-pc-theme="light"] .bg-dark * {
    color: #fff !important;
}

/* Text utilities - garantir contraste */
[data-pc-theme="light"] .text-gray-800 {
    color: #343a40 !important;
}

/* Table headers escuros precisam de texto claro */
[data-pc-theme="light"] .table-dark th,
[data-pc-theme="light"] .table-dark td {
    color: #fff !important;
}

/* Card headers escuros */
[data-pc-theme="light"] .card-header.bg-dark,
[data-pc-theme="light"] .card-header.bg-primary,
[data-pc-theme="light"] .card-header.bg-success,
[data-pc-theme="light"] .card-header.bg-danger,
[data-pc-theme="light"] .card-header.bg-info {
    color: #fff !important;
}

[data-pc-theme="light"] .card-header.bg-dark *,
[data-pc-theme="light"] .card-header.bg-primary *,
[data-pc-theme="light"] .card-header.bg-success *,
[data-pc-theme="light"] .card-header.bg-danger *,
[data-pc-theme="light"] .card-header.bg-info * {
    color: #fff !important;
}

/* Bg-light no light mode deve ter texto escuro */
[data-pc-theme="light"] .bg-light {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

[data-pc-theme="light"] .bg-light .text-muted {
    color: #6c757d !important;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* 🏷️ BADGE THEME-AWARE - Badges que funcionam em qualquer contexto           */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Badge neutro que sempre tem bom contraste */
.badge-contrast {
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: #1e3a5f !important;
    font-weight: 500;
}

[data-pc-theme="dark"] .badge-contrast {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #1e3a5f !important;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* 🔧 FIX LIGHT MODE: bg-light dentro de headers com gradiente/cor escura     */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Light Mode - Force override para badges em headers escuros */
[data-pc-theme="light"] .card-header[style*="background"] .badge.bg-light,
[data-pc-theme="light"] .card-header[style*="gradient"] .badge.bg-light,
[data-pc-theme="light"] .card-header.bg-primary .badge.bg-light,
[data-pc-theme="light"] .card-header.bg-dark .badge.bg-light,
[data-pc-theme="light"] .card-header.bg-secondary .badge.bg-light,
[data-pc-theme="light"] .card-header.bg-success .badge.bg-light,
[data-pc-theme="light"] .card-header.bg-danger .badge.bg-light,
[data-pc-theme="light"] .card-header.bg-info .badge.bg-light {
    background-color: #ffffff !important;
    color: #1e3a5f !important;
    border: none !important;
}

[data-pc-theme="light"] .card-header[style*="background"] .badge.bg-light.text-dark,
[data-pc-theme="light"] .card-header[style*="gradient"] .badge.bg-light.text-dark {
    color: #1e3a5f !important;
}

/* Fallback sem seletor de tema (para casos onde data-pc-theme não está definido) */
.card-header[style*="linear-gradient"] .badge.bg-light,
.card-header[style*="background:"] .badge.bg-light {
    background-color: #ffffff !important;
    color: #1e3a5f !important;
}

.card-header[style*="linear-gradient"] .badge.bg-light.text-dark,
.card-header[style*="background:"] .badge.bg-light.text-dark {
    color: #1e3a5f !important;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* 🔧 FIX DARK MODE: bg-light dentro de headers com gradiente/cor escura      */
/* ═══════════════════════════════════════════════════════════════════════════ */

[data-pc-theme="dark"] .card-header[style*="background"] .badge.bg-light,
[data-pc-theme="dark"] .card-header[style*="gradient"] .badge.bg-light,
[data-pc-theme="dark"] .card-header.bg-primary .badge.bg-light,
[data-pc-theme="dark"] .card-header.bg-dark .badge.bg-light,
[data-pc-theme="dark"] .card-header.bg-secondary .badge.bg-light,
[data-pc-theme="dark"] .card-header.bg-success .badge.bg-light,
[data-pc-theme="dark"] .card-header.bg-danger .badge.bg-light,
[data-pc-theme="dark"] .card-header.bg-info .badge.bg-light {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #1e3a5f !important;
}

/* Garantir que text-dark em contextos escuros funcione */
.card-header[style*="background"] .text-dark,
.card-header[style*="gradient"] .text-dark,
.card-header.bg-primary .text-dark,
.card-header.bg-dark .text-dark,
.card-header.bg-secondary .text-dark {
    color: #212529 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* 🔧 FIX: Texto dentro de headers com fundo escuro deve ser branco           */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Headers com gradiente ou background escuro - texto branco */
.card-header[style*="linear-gradient"] h1,
.card-header[style*="linear-gradient"] h2,
.card-header[style*="linear-gradient"] h3,
.card-header[style*="linear-gradient"] h4,
.card-header[style*="linear-gradient"] h5,
.card-header[style*="linear-gradient"] h6,
.card-header[style*="linear-gradient"] span,
.card-header[style*="linear-gradient"] p,
.card-header[style*="linear-gradient"] i,
.card-header[style*="linear-gradient"] .text-white {
    color: #ffffff !important;
}

.card-header[style*="background:"] h1,
.card-header[style*="background:"] h2,
.card-header[style*="background:"] h3,
.card-header[style*="background:"] h4,
.card-header[style*="background:"] h5,
.card-header[style*="background:"] h6,
.card-header[style*="background:"] span:not(.badge),
.card-header[style*="background:"] p,
.card-header[style*="background:"] i {
    color: #ffffff !important;
}

/* Headers com classes de cor de fundo */
.card-header.bg-primary h1, .card-header.bg-primary h2, .card-header.bg-primary h3,
.card-header.bg-primary h4, .card-header.bg-primary h5, .card-header.bg-primary h6,
.card-header.bg-primary span:not(.badge), .card-header.bg-primary p, .card-header.bg-primary i,
.card-header.bg-dark h1, .card-header.bg-dark h2, .card-header.bg-dark h3,
.card-header.bg-dark h4, .card-header.bg-dark h5, .card-header.bg-dark h6,
.card-header.bg-dark span:not(.badge), .card-header.bg-dark p, .card-header.bg-dark i,
.card-header.bg-secondary h1, .card-header.bg-secondary h2, .card-header.bg-secondary h3,
.card-header.bg-secondary h4, .card-header.bg-secondary h5, .card-header.bg-secondary h6,
.card-header.bg-secondary span:not(.badge), .card-header.bg-secondary p, .card-header.bg-secondary i,
.card-header.bg-success h1, .card-header.bg-success h2, .card-header.bg-success h3,
.card-header.bg-success h4, .card-header.bg-success h5, .card-header.bg-success h6,
.card-header.bg-success span:not(.badge), .card-header.bg-success p, .card-header.bg-success i,
.card-header.bg-danger h1, .card-header.bg-danger h2, .card-header.bg-danger h3,
.card-header.bg-danger h4, .card-header.bg-danger h5, .card-header.bg-danger h6,
.card-header.bg-danger span:not(.badge), .card-header.bg-danger p, .card-header.bg-danger i,
.card-header.bg-info h1, .card-header.bg-info h2, .card-header.bg-info h3,
.card-header.bg-info h4, .card-header.bg-info h5, .card-header.bg-info h6,
.card-header.bg-info span:not(.badge), .card-header.bg-info p, .card-header.bg-info i {
    color: #ffffff !important;
}

/* Especificamente para light mode */
[data-pc-theme="light"] .card-header[style*="linear-gradient"] h6,
[data-pc-theme="light"] .card-header[style*="linear-gradient"] i,
[data-pc-theme="light"] .card-header[style*="linear-gradient"] .mb-0,
[data-pc-theme="light"] .card-header[style*="gradient"] h6,
[data-pc-theme="light"] .card-header[style*="gradient"] i {
    color: #ffffff !important;
}