/* --- ESTILOS CORPORATIVOS FIEB --- */
:root {
    --fieb-blue: #005C90;
    --fieb-cyan: #00adef;
    --fieb-gray: #566a7f;
    
    /* Override Global Bootstrap Variables */
    --bs-primary: #005C90 !important;
    --bs-primary-rgb: 0, 92, 144 !important;
    --bs-link-color: #005C90 !important;
    --bs-link-hover-color: #004a73 !important;
}

/* HARD OVERRIDE FOR TEXT PRIMARY AND COMPONENTS */
html body .text-primary { color: #005C90 !important; }
html body .bg-primary { background-color: #005C90 !important; }
html body .bg-label-primary { background-color: #e0f2ff !important; color: #005C90 !important; }

/* Badge Overrides for Legibility */
html body .bg-label-success { background-color: #e8fadf !important; color: #71dd37 !important; }
html body .bg-label-danger { background-color: #ffe0db !important; color: #ff3e1d !important; }
html body .bg-label-warning { background-color: #fff2e0 !important; color: #ff9f43 !important; }
html body .bg-label-info { background-color: #d7f5fc !important; color: #03c3ec !important; }
html body .bg-label-secondary { background-color: #ebeef0 !important; color: #8592a3 !important; }

html body .btn-primary { background-color: #005C90 !important; border-color: #005C90 !important; }
html body .btn-primary:hover { background-color: #004a73 !important; border-color: #004a73 !important; }
html body .btn-outline-primary { color: #005C90 !important; border-color: #005C90 !important; }
html body .btn-outline-primary:hover { background-color: #005C90 !important; color: #fff !important; }
html body .page-item.active .page-link { background-color: #005C90 !important; border-color: #005C90 !important; }
html body .form-control:focus, html body .form-select:focus { border-color: #005C90 !important; box-shadow: 0 0 0 0.25rem rgba(0, 92, 144, 0.25) !important; }

/* Button Label Primary Override (Filtro, Pagination, etc.) */
html body .btn-label-primary {
    background-color: #e0f2ff !important;
    color: #005C90 !important;
    border-color: transparent !important;
}
html body .btn.btn-label-primary i { color: inherit !important; }
html body .btn-label-primary.disabled,
html body .btn-label-primary:disabled {
    background-color: #e0f2ff !important;
    color: #005C90 !important;
    border-color: transparent !important;
    opacity: .55;
}
html body .btn-label-primary:hover,
html body .btn-label-primary:focus,
html body .btn-label-primary:active,
html body .btn-label-primary.active,
html body .show > .btn-label-primary.dropdown-toggle {
    background-color: #005C90 !important;
    color: #fff !important;
    border-color: #005C90 !important;
}

/* Map Facebook button variants to FIEB palette (Pagination in Cotacoes, etc.) */
html body .btn-facebook {
    background-color: #005C90 !important;
    border-color: #005C90 !important;
    color: #fff !important;
    box-shadow: none !important;
}
html body .btn-facebook:hover,
html body .btn-facebook:focus,
html body .btn-facebook:active,
html body .btn-facebook.active,
html body .btn-facebook.show.dropdown-toggle,
html body .show > .btn-facebook.dropdown-toggle {
    background-color: #004a73 !important;
    border-color: #004a73 !important;
    color: #fff !important;
    box-shadow: none !important;
    transform: none !important;
}
html body .btn-facebook.disabled,
html body .btn-facebook:disabled {
    background-color: #005C90 !important;
    border-color: #005C90 !important;
    color: #fff !important;
    opacity: .55;
    box-shadow: none !important;
}

html body .btn-label-facebook {
    background-color: #e0f2ff !important;
    border-color: transparent !important;
    color: #005C90 !important;
    box-shadow: none !important;
}
html body .btn.btn-label-facebook i { color: inherit !important; }
html body .btn-label-facebook:hover,
html body .btn-label-facebook:focus,
html body .btn-label-facebook:active,
html body .btn-label-facebook.active,
html body .btn-label-facebook.show.dropdown-toggle,
html body .show > .btn-label-facebook.dropdown-toggle {
    background-color: #005C90 !important;
    border-color: #005C90 !important;
    color: #fff !important;
    box-shadow: none !important;
    transform: none !important;
}
html body .btn-label-facebook.disabled,
html body .btn-label-facebook:disabled {
    background-color: #e0f2ff !important;
    border-color: transparent !important;
    color: #005C90 !important;
    opacity: .55;
    box-shadow: none !important;
}

/* Sidebar Toggle Button Override */
.layout-menu-toggle {
    background-color: #005C90 !important;
    border-color: #005C90 !important;
}
.layout-menu-toggle i {
    color: #fff !important;
}
/* Specifically for the circle background often used in Sneat themes */
.app-brand .layout-menu-toggle {
    background-color: #005C90 !important;
}

/* Links */
a { color: #005C90; }
a:hover { color: #004a73; }

/* Table Styles */
.card-table { border: none; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); overflow: hidden; background: #fff; }

.table-custom { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-custom thead th {
    background-color: #fff;
    color: #005C90 !important;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.75rem;
    border-bottom: 2px solid #00adef; /* Ciano FIEB */
    padding: 1rem;
    white-space: nowrap;
}
.table-custom thead th a {
    color: #005C90 !important;
    text-decoration: none;
    font-weight: 800;
    transition: color 0.2s;
}
.table-custom thead th a:hover {
    color: #004a73 !important;
    text-decoration: underline;
}
.table-custom thead th a i {
    color: #005C90 !important;
}
.table-custom tbody tr { transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s; border-bottom: 1px solid #f2f2f2; }
.table-custom tbody tr:hover { background-color: #f8f9fa; transform: translateY(-1px); box-shadow: 0 2px 5px rgba(0,0,0,0.05); position: relative; z-index: 1; }
.table-custom tbody tr:has(.gti-acoes-td:hover),
.table-custom tbody tr:has(.gti-acoes-td:focus-within),
.table-custom tbody tr:has(.gti-acoes-td .dropdown-menu.show) {
    transform: none;
    box-shadow: none;
    position: static;
    z-index: auto;
}
.table-custom td { padding: 1rem; vertical-align: middle; color: #566a7f; border-bottom: 1px solid #f2f2f2; font-size: 0.9rem; }
.table-custom thead th.sticky-col { position: sticky; right: 0; background-color: var(--bs-card-bg, #fff); z-index: 10; }
.table-custom tbody td.sticky-col { position: sticky; right: 0; background-color: var(--bs-card-bg, #fff); z-index: 5; transition: background-color 0.2s; }
.table-custom tbody tr:hover td.sticky-col { background-color: #f8f9fa !important; }
.table-custom tbody tr:has(.gti-acoes-td:hover) td.gti-acoes-td,
.table-custom tbody tr:has(.gti-acoes-td:focus-within) td.gti-acoes-td,
.table-custom tbody td.gti-acoes-td:has(.dropdown-menu.show) {
    z-index: 12;
}
.table-custom tbody td.gti-acoes-td:has(.dropdown-menu.show) .dropdown-menu { z-index: 13; }

.search-input { border-radius: 20px; padding-left: 2.5rem; border-color: #d9dee3; }
.search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #697a8d; }
.gti-context-menu { position: fixed; z-index: 999999; min-width: 180px; }

/* --- VERTICAL MENU OVERRIDES (FIEB) --- */
.menu-vertical .menu-inner > .menu-item.active > .menu-link {
    background-color: rgba(0, 92, 144, 0.15) !important;
    color: #005C90 !important;
}

.menu-vertical .menu-inner > .menu-item.active:before {
    background: #005C90 !important;
}

.menu-vertical .menu-sub > .menu-item.active > .menu-link:not(.menu-toggle) {
    background-color: #005C90 !important;
    box-shadow: 0 2px 6px 0 rgba(0, 92, 144, 0.3) !important;
    color: #fff !important;
}

.menu-vertical .menu-item .menu-link:hover,
.menu-vertical .menu-item .menu-link:focus {
    background-color: rgba(0, 92, 144, 0.05);
}

.menu-vertical .menu-header-text {
    color: #566a7f !important;
    font-weight: 700 !important;
}

.menu-vertical .menu-item.active > .menu-link i,
.menu-vertical .menu-item.active > .menu-link svg {
    color: #005C90 !important;
}

.menu-vertical .menu-sub > .menu-item.active > .menu-link:not(.menu-toggle) i {
    color: #fff !important;
}

/* --- PAGE TITLES & HEADINGS --- */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: #005C90 !important;
}

.card-title {
    color: #005C90 !important;
    font-weight: 600;
}

/* --- MODALIDADE BADGES --- */
.badge-modalidade-com-disputa {
    background-color: #005C90 !important; /* FIEB Blue */
    color: #fff !important;
}

.badge-modalidade-sem-disputa {
    background-color: #00adef !important; /* FIEB Cyan */
    color: #003e61 !important; /* Dark Blue for contrast on Cyan bg */
}

/* Checkboxes e switches na cor FIEB */
.form-check-input:checked {
    background-color: #005C90 !important;
    border-color: #005C90 !important;
}
.form-check-input[type=checkbox] {
    --bs-form-check-bg: #fff;
    --bs-form-check-bg-image: none;
    background-color: #fff !important;
    background-image: none !important;
    border-color: #005C90 !important;
}
.form-check-input[type=checkbox]:not(:checked) {
    --bs-form-check-bg: #fff;
    --bs-form-check-bg-image: none;
    background-color: #fff !important;
    background-image: none !important;
}
.form-check-input[type=checkbox]:checked {
    --bs-form-check-bg: #005C90;
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
    background-color: #005C90 !important;
    background-image: var(--bs-form-check-bg-image) !important;
    border-color: #005C90 !important;
}
.form-check-input[type=radio] {
    --bs-form-check-bg: #fff;
    --bs-form-check-bg-image: none;
    background-color: #fff !important;
    background-image: none !important;
    border-color: #005C90 !important;
}
.form-check-input[type=radio]:not(:checked) {
    --bs-form-check-bg: #fff;
    --bs-form-check-bg-image: none;
    background-color: #fff !important;
    background-image: none !important;
}
.form-check-input[type=radio]:checked {
    --bs-form-check-bg: #005C90;
    --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='1.5' fill='%23fff'/%3e%3c/svg%3e");
    background-color: #005C90 !important;
    background-image: var(--bs-form-check-bg-image) !important;
    border-color: #005C90 !important;
}
.form-check-input:focus {
    border-color: #005C90 !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 92, 144, 0.25) !important;
}
.form-switch .form-check-input:checked {
    background-color: #005C90 !important;
    border-color: #005C90 !important;
}

/* Indicador do submenu vertical na cor FIEB */
.menu-vertical .menu-sub .menu-link::before,
.menu-vertical .menu-item .menu-link::before,
.menu-vertical .menu-sub > .menu-item.active > .menu-link::before {
    background-color: #005C90 !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 92, 144, 0.15) !important;
}
/* Força o bullet do item ativo no tema claro */
.menu-light .menu-inner > .menu-item.open .menu-item.active > .menu-link::before {
    background-color: #005C90 !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 92, 144, 0.15) !important;
}

/* Checkbox "indeterminado" (selecionar todos parcialmente) */
.form-check-input:indeterminate {
    background-color: #005C90 !important;
    border-color: #005C90 !important;
}
