 /* ============================================
    COMPATIBILIDADE BOOTSTRAP → TAILWIND/PORTAL
    
    Este arquivo mapeia classes Bootstrap para usar
    o mesmo sistema de design do projeto Tailwind.
    
    Inclua após o Bootstrap e antes do portal.css:
    <link href="bootstrap.min.css" rel="stylesheet">
    <link href="css/bootstrap-compat.css" rel="stylesheet">
    <link href="css/portal.css" rel="stylesheet">
 ============================================ */
 
 /* ============================================
    CORES DE BOTÕES
 ============================================ */
 
 /* Primary */
 .btn-primary {
     background-color: hsl(var(--primary)) !important;
     border-color: hsl(var(--primary)) !important;
     color: hsl(var(--primary-foreground)) !important;
 }
 .btn-primary:hover, .btn-primary:focus {
     background-color: hsl(var(--primary) / 0.9) !important;
     border-color: hsl(var(--primary) / 0.9) !important;
 }
 .btn-outline-primary {
     color: hsl(var(--primary)) !important;
     border-color: hsl(var(--primary)) !important;
 }
 .btn-outline-primary:hover {
     background-color: hsl(var(--primary)) !important;
     color: hsl(var(--primary-foreground)) !important;
 }
 
 /* Secondary */
 .btn-secondary {
     background-color: hsl(var(--secondary)) !important;
     border-color: hsl(var(--secondary)) !important;
     color: hsl(var(--secondary-foreground)) !important;
 }
 .btn-secondary:hover, .btn-secondary:focus {
     background-color: hsl(var(--secondary) / 0.8) !important;
     border-color: hsl(var(--secondary) / 0.8) !important;
 }
 .btn-outline-secondary {
     color: hsl(var(--secondary)) !important;
     border-color: hsl(var(--secondary)) !important;
 }
 .btn-outline-secondary:hover {
     background-color: hsl(var(--secondary)) !important;
     color: hsl(var(--secondary-foreground)) !important;
 }
 
 /* Success → Gov Green */
 .btn-success {
     background-color: hsl(var(--gov-green)) !important;
     border-color: hsl(var(--gov-green)) !important;
     color: white !important;
 }
 .btn-success:hover, .btn-success:focus {
     background-color: hsl(var(--gov-green-light)) !important;
     border-color: hsl(var(--gov-green-light)) !important;
 }
 .btn-outline-success {
     color: hsl(var(--gov-green)) !important;
     border-color: hsl(var(--gov-green)) !important;
 }
 .btn-outline-success:hover {
     background-color: hsl(var(--gov-green)) !important;
     color: white !important;
 }
 
 /* Warning → Accent/Gold */
 .btn-warning {
     background-color: hsl(var(--accent)) !important;
     border-color: hsl(var(--accent)) !important;
     color: hsl(var(--accent-foreground)) !important;
 }
 .btn-warning:hover, .btn-warning:focus {
     background-color: hsl(var(--gov-gold-dark)) !important;
     border-color: hsl(var(--gov-gold-dark)) !important;
 }
 .btn-outline-warning {
     color: hsl(var(--accent)) !important;
     border-color: hsl(var(--accent)) !important;
 }
 .btn-outline-warning:hover {
     background-color: hsl(var(--accent)) !important;
     color: hsl(var(--accent-foreground)) !important;
 }
 
 /* Danger → Destructive */
 .btn-danger {
     background-color: hsl(var(--destructive)) !important;
     border-color: hsl(var(--destructive)) !important;
     color: hsl(var(--destructive-foreground)) !important;
 }
 .btn-danger:hover, .btn-danger:focus {
     background-color: hsl(var(--destructive) / 0.9) !important;
     border-color: hsl(var(--destructive) / 0.9) !important;
 }
 .btn-outline-danger {
     color: hsl(var(--destructive)) !important;
     border-color: hsl(var(--destructive)) !important;
 }
 .btn-outline-danger:hover {
     background-color: hsl(var(--destructive)) !important;
     color: hsl(var(--destructive-foreground)) !important;
 }
 
 /* Info → Gov Blue Light */
 .btn-info {
     background-color: hsl(var(--gov-blue-light)) !important;
     border-color: hsl(var(--gov-blue-light)) !important;
     color: white !important;
 }
 .btn-info:hover, .btn-info:focus {
     background-color: hsl(var(--gov-blue)) !important;
     border-color: hsl(var(--gov-blue)) !important;
 }
 .btn-outline-info {
     color: hsl(var(--gov-blue-light)) !important;
     border-color: hsl(var(--gov-blue-light)) !important;
 }
 .btn-outline-info:hover {
     background-color: hsl(var(--gov-blue-light)) !important;
     color: white !important;
 }
 
 /* Light → Muted */
 .btn-light {
     background-color: hsl(var(--muted)) !important;
     border-color: hsl(var(--border)) !important;
     color: hsl(var(--foreground)) !important;
 }
 .btn-light:hover, .btn-light:focus {
     background-color: hsl(var(--muted) / 0.8) !important;
 }
 
 /* Dark → Secondary */
 .btn-dark {
     background-color: hsl(var(--secondary)) !important;
     border-color: hsl(var(--secondary)) !important;
     color: hsl(var(--secondary-foreground)) !important;
 }
 .btn-dark:hover, .btn-dark:focus {
     background-color: hsl(var(--gov-blue-dark)) !important;
     border-color: hsl(var(--gov-blue-dark)) !important;
 }
 
 /* Link */
 .btn-link {
     color: hsl(var(--primary)) !important;
 }
 .btn-link:hover {
     color: hsl(var(--primary) / 0.8) !important;
 }
 
 /* ============================================
    CORES DE TEXTO
 ============================================ */
 
 .text-primary { color: hsl(var(--primary)) !important; }
 .text-secondary { color: hsl(var(--secondary)) !important; }
 .text-success { color: hsl(var(--gov-green)) !important; }
 .text-warning { color: hsl(var(--accent)) !important; }
 .text-danger { color: hsl(var(--destructive)) !important; }
 .text-info { color: hsl(var(--gov-blue-light)) !important; }
 .text-muted { color: hsl(var(--muted-foreground)) !important; }
 .text-light { color: hsl(var(--muted)) !important; }
 .text-dark { color: hsl(var(--foreground)) !important; }
 .text-body { color: hsl(var(--foreground)) !important; }
 .text-white { color: white !important; }
 .text-black { color: black !important; }
 
 /* ============================================
    CORES DE BACKGROUND
 ============================================ */
 
 .bg-primary { background-color: hsl(var(--primary)) !important; }
 .bg-secondary { background-color: hsl(var(--secondary)) !important; }
 .bg-success { background-color: hsl(var(--gov-green)) !important; }
 .bg-warning { background-color: hsl(var(--accent)) !important; }
 .bg-danger { background-color: hsl(var(--destructive)) !important; }
 .bg-info { background-color: hsl(var(--gov-blue-light)) !important; }
 .bg-light { background-color: hsl(var(--muted)) !important; }
 .bg-dark { background-color: hsl(var(--secondary)) !important; }
 .bg-body { background-color: hsl(var(--background)) !important; }
 .bg-white { background-color: white !important; }
 .bg-transparent { background-color: transparent !important; }
 
 /* ============================================
    BORDAS
 ============================================ */
 
 .border { border-color: hsl(var(--border)) !important; }
 .border-primary { border-color: hsl(var(--primary)) !important; }
 .border-secondary { border-color: hsl(var(--secondary)) !important; }
 .border-success { border-color: hsl(var(--gov-green)) !important; }
 .border-warning { border-color: hsl(var(--accent)) !important; }
 .border-danger { border-color: hsl(var(--destructive)) !important; }
 .border-info { border-color: hsl(var(--gov-blue-light)) !important; }
 .border-light { border-color: hsl(var(--muted)) !important; }
 .border-dark { border-color: hsl(var(--secondary)) !important; }
 
 /* ============================================
    CARDS
 ============================================ */
 
 .card {
     background-color: hsl(var(--card)) !important;
     color: hsl(var(--card-foreground)) !important;
     border-color: hsl(var(--border)) !important;
     border-radius: var(--radius) !important;
 }
 
 .card-header {
     background-color: hsl(var(--muted)) !important;
     border-bottom-color: hsl(var(--border)) !important;
 }
 
 .card-footer {
     background-color: hsl(var(--muted)) !important;
     border-top-color: hsl(var(--border)) !important;
 }
 
 /* ============================================
    NAVBAR
 ============================================ */
 
 .navbar-dark, .navbar.bg-dark {
     background: linear-gradient(135deg, hsl(var(--secondary)) 0%, hsl(var(--primary)) 100%) !important;
 }
 
 .navbar-dark .navbar-brand,
 .navbar-dark .nav-link {
     color: hsl(var(--primary-foreground)) !important;
 }
 
 .navbar-dark .nav-link:hover,
 .navbar-dark .nav-link:focus {
     color: hsl(var(--accent)) !important;
 }
 
 .navbar-light {
     background-color: hsl(var(--card)) !important;
 }
 
 .navbar-light .navbar-brand,
 .navbar-light .nav-link {
     color: hsl(var(--foreground)) !important;
 }
 
 .navbar-light .nav-link:hover,
 .navbar-light .nav-link:focus {
     color: hsl(var(--primary)) !important;
 }
 
 /* ============================================
    FORMULÁRIOS
 ============================================ */
 
 .form-control {
     background-color: hsl(var(--background)) !important;
     border-color: hsl(var(--input)) !important;
     color: hsl(var(--foreground)) !important;
     border-radius: var(--radius) !important;
 }
 
 .form-control:focus {
     border-color: hsl(var(--ring)) !important;
     box-shadow: 0 0 0 0.2rem hsl(var(--ring) / 0.25) !important;
 }
 
 .form-control::placeholder {
     color: hsl(var(--muted-foreground)) !important;
 }
 
 .form-select {
     background-color: hsl(var(--background)) !important;
     border-color: hsl(var(--input)) !important;
     color: hsl(var(--foreground)) !important;
     border-radius: var(--radius) !important;
 }
 
 .form-select:focus {
     border-color: hsl(var(--ring)) !important;
     box-shadow: 0 0 0 0.2rem hsl(var(--ring) / 0.25) !important;
 }
 
 .form-check-input:checked {
     background-color: hsl(var(--primary)) !important;
     border-color: hsl(var(--primary)) !important;
 }
 
 .form-label {
     color: hsl(var(--foreground)) !important;
 }
 
 .input-group-text {
     background-color: hsl(var(--muted)) !important;
     border-color: hsl(var(--input)) !important;
     color: hsl(var(--foreground)) !important;
 }
 
 /* ============================================
    ALERTS
 ============================================ */
 
 .alert-primary {
     background-color: hsl(var(--primary) / 0.15) !important;
     border-color: hsl(var(--primary) / 0.3) !important;
     color: hsl(var(--primary)) !important;
 }
 
 .alert-secondary {
     background-color: hsl(var(--secondary) / 0.15) !important;
     border-color: hsl(var(--secondary) / 0.3) !important;
     color: hsl(var(--secondary)) !important;
 }
 
 .alert-success {
     background-color: hsl(var(--gov-green) / 0.15) !important;
     border-color: hsl(var(--gov-green) / 0.3) !important;
     color: hsl(var(--gov-green)) !important;
 }
 
 .alert-warning {
     background-color: hsl(var(--accent) / 0.15) !important;
     border-color: hsl(var(--accent) / 0.3) !important;
     color: hsl(var(--gov-gold-dark)) !important;
 }
 
 .alert-danger {
     background-color: hsl(var(--destructive) / 0.15) !important;
     border-color: hsl(var(--destructive) / 0.3) !important;
     color: hsl(var(--destructive)) !important;
 }
 
 .alert-info {
     background-color: hsl(var(--gov-blue-light) / 0.15) !important;
     border-color: hsl(var(--gov-blue-light) / 0.3) !important;
     color: hsl(var(--gov-blue)) !important;
 }
 
 /* ============================================
    BADGES
 ============================================ */
 
 .badge.bg-primary { background-color: hsl(var(--primary)) !important; color: hsl(var(--primary-foreground)) !important; }
 .badge.bg-secondary { background-color: hsl(var(--secondary)) !important; color: hsl(var(--secondary-foreground)) !important; }
 .badge.bg-success { background-color: hsl(var(--gov-green)) !important; color: white !important; }
 .badge.bg-warning { background-color: hsl(var(--accent)) !important; color: hsl(var(--accent-foreground)) !important; }
 .badge.bg-danger { background-color: hsl(var(--destructive)) !important; color: hsl(var(--destructive-foreground)) !important; }
 .badge.bg-info { background-color: hsl(var(--gov-blue-light)) !important; color: white !important; }
 .badge.bg-light { background-color: hsl(var(--muted)) !important; color: hsl(var(--foreground)) !important; }
 .badge.bg-dark { background-color: hsl(var(--secondary)) !important; color: hsl(var(--secondary-foreground)) !important; }
 
 /* ============================================
    TABELAS
 ============================================ */
 
 .table {
     color: hsl(var(--foreground)) !important;
 }
 
 .table > :not(caption) > * > * {
     border-bottom-color: hsl(var(--border)) !important;
 }
 
 .table-striped > tbody > tr:nth-of-type(odd) > * {
     background-color: hsl(var(--muted) / 0.5) !important;
 }
 
 .table-hover > tbody > tr:hover > * {
     background-color: hsl(var(--muted)) !important;
 }
 
 .table-primary { background-color: hsl(var(--primary) / 0.15) !important; }
 .table-secondary { background-color: hsl(var(--secondary) / 0.15) !important; }
 .table-success { background-color: hsl(var(--gov-green) / 0.15) !important; }
 .table-warning { background-color: hsl(var(--accent) / 0.15) !important; }
 .table-danger { background-color: hsl(var(--destructive) / 0.15) !important; }
 .table-info { background-color: hsl(var(--gov-blue-light) / 0.15) !important; }
 
 thead.table-dark, .table-dark {
     background-color: hsl(var(--secondary)) !important;
     color: hsl(var(--secondary-foreground)) !important;
 }
 
 /* ============================================
    MODAL
 ============================================ */
 
 .modal-content {
     background-color: hsl(var(--card)) !important;
     border-color: hsl(var(--border)) !important;
     border-radius: var(--radius) !important;
 }
 
 .modal-header {
     border-bottom-color: hsl(var(--border)) !important;
 }
 
 .modal-footer {
     border-top-color: hsl(var(--border)) !important;
 }
 
 .modal-title {
     color: hsl(var(--foreground)) !important;
 }
 
 .btn-close {
     filter: var(--btn-close-filter, none);
 }
 
 /* ============================================
    DROPDOWN
 ============================================ */
 
 .dropdown-menu {
     background-color: hsl(var(--popover)) !important;
     border-color: hsl(var(--border)) !important;
     border-radius: var(--radius) !important;
 }
 
 .dropdown-item {
     color: hsl(var(--popover-foreground)) !important;
 }
 
 .dropdown-item:hover, .dropdown-item:focus {
     background-color: hsl(var(--muted)) !important;
     color: hsl(var(--foreground)) !important;
 }
 
 .dropdown-item.active, .dropdown-item:active {
     background-color: hsl(var(--primary)) !important;
     color: hsl(var(--primary-foreground)) !important;
 }
 
 .dropdown-divider {
     border-color: hsl(var(--border)) !important;
 }
 
 /* ============================================
    PAGINATION
 ============================================ */
 
 .page-link {
     color: hsl(var(--primary)) !important;
     background-color: hsl(var(--background)) !important;
     border-color: hsl(var(--border)) !important;
 }
 
 .page-link:hover {
     background-color: hsl(var(--muted)) !important;
     color: hsl(var(--primary)) !important;
 }
 
 .page-item.active .page-link {
     background-color: hsl(var(--primary)) !important;
     border-color: hsl(var(--primary)) !important;
     color: hsl(var(--primary-foreground)) !important;
 }
 
 .page-item.disabled .page-link {
     background-color: hsl(var(--muted)) !important;
     color: hsl(var(--muted-foreground)) !important;
 }
 
 /* ============================================
    BREADCRUMB
 ============================================ */
 
 .breadcrumb {
     background-color: transparent !important;
 }
 
 .breadcrumb-item a {
     color: hsl(var(--primary)) !important;
 }
 
 .breadcrumb-item.active {
     color: hsl(var(--muted-foreground)) !important;
 }
 
 .breadcrumb-item + .breadcrumb-item::before {
     color: hsl(var(--muted-foreground)) !important;
 }
 
 /* ============================================
    LIST GROUP
 ============================================ */
 
 .list-group-item {
     background-color: hsl(var(--card)) !important;
     border-color: hsl(var(--border)) !important;
     color: hsl(var(--card-foreground)) !important;
 }
 
 .list-group-item.active {
     background-color: hsl(var(--primary)) !important;
     border-color: hsl(var(--primary)) !important;
     color: hsl(var(--primary-foreground)) !important;
 }
 
 .list-group-item-action:hover, .list-group-item-action:focus {
     background-color: hsl(var(--muted)) !important;
 }
 
 /* ============================================
    PROGRESS
 ============================================ */
 
 .progress {
     background-color: hsl(var(--muted)) !important;
     border-radius: var(--radius) !important;
 }
 
 .progress-bar {
     background-color: hsl(var(--primary)) !important;
 }
 
 .progress-bar.bg-success { background-color: hsl(var(--gov-green)) !important; }
 .progress-bar.bg-warning { background-color: hsl(var(--accent)) !important; }
 .progress-bar.bg-danger { background-color: hsl(var(--destructive)) !important; }
 .progress-bar.bg-info { background-color: hsl(var(--gov-blue-light)) !important; }
 
 /* ============================================
    ACCORDION
 ============================================ */
 
 .accordion-item {
     background-color: hsl(var(--card)) !important;
     border-color: hsl(var(--border)) !important;
 }
 
 .accordion-button {
     background-color: hsl(var(--card)) !important;
     color: hsl(var(--foreground)) !important;
 }
 
 .accordion-button:not(.collapsed) {
     background-color: hsl(var(--muted)) !important;
     color: hsl(var(--primary)) !important;
 }
 
 .accordion-button:focus {
     box-shadow: 0 0 0 0.2rem hsl(var(--ring) / 0.25) !important;
 }
 
 /* ============================================
    TOAST
 ============================================ */
 
 .toast {
     background-color: hsl(var(--card)) !important;
     border-color: hsl(var(--border)) !important;
 }
 
 .toast-header {
     background-color: hsl(var(--muted)) !important;
     border-bottom-color: hsl(var(--border)) !important;
 }
 
 /* ============================================
    SPINNER
 ============================================ */
 
 .spinner-border.text-primary,
 .spinner-grow.text-primary {
     color: hsl(var(--primary)) !important;
 }
 
 /* ============================================
    FOOTER / SIDEBAR STYLES
 ============================================ */
 
 .sidebar, .offcanvas.bg-dark {
     background-color: hsl(var(--sidebar-background)) !important;
     color: hsl(var(--sidebar-foreground)) !important;
 }
 
 footer.bg-dark, .footer-dark {
     background-color: hsl(var(--secondary)) !important;
     color: hsl(var(--secondary-foreground)) !important;
 }
 
 /* ============================================
    TIPOGRAFIA (equivalência com Tailwind)
 ============================================ */
 
 body {
     font-family: 'Open Sans', system-ui, sans-serif !important;
 }
 
 h1, h2, h3, h4, h5, h6,
 .h1, .h2, .h3, .h4, .h5, .h6,
 .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
     font-family: 'Montserrat', system-ui, sans-serif !important;
     font-weight: 700 !important;
 }
 
 /* ============================================
    LINKS
 ============================================ */
 
 a {
     color: hsl(var(--primary));
 }
 
 a:hover {
     color: hsl(var(--primary) / 0.8);
 }
 
 /* ============================================
    UTILIDADES EXTRAS
 ============================================ */
 
 /* Sombras do sistema */
 .shadow-portal { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04) !important; }
 .shadow-portal-hover { box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.06) !important; }
 
 /* Gradientes */
 .bg-gradient-portal {
     background: linear-gradient(135deg, hsl(var(--secondary)) 0%, hsl(var(--primary)) 100%) !important;
 }
 
 .bg-gradient-accent {
     background: linear-gradient(135deg, hsl(var(--accent)) 0%, hsl(var(--gov-gold-dark)) 100%) !important;
 }
 
 /* Border radius do sistema */
 .rounded-portal { border-radius: var(--radius) !important; }