 :root {
            --primary-color: #1e3a8a;
            --secondary-color: #d97706;
            --accent-color: #0ea5e9;
            --text-dark: #1f2937;
            --bg-light: #f8fafc;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            color: var(--text-dark);
            background-color: var(--bg-light);
        }

        .header-top {
            background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
            color: white;
            padding: 1rem 0;
        }

        .header-main {
            background: white;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            padding: 1.5rem 0;
        }

        .logo-section {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .logo-circle {
            width: 60px;
            height: 60px;
            background: var(--primary-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.5rem;
            font-weight: bold;
        }

        .site-title {
            margin: 0;
            color: var(--primary-color);
            font-size: 1.75rem;
            font-weight: 700;
        }

        .site-subtitle {
            margin: 0;
            color: #64748b;
            font-size: 0.9rem;
        }

        .search-section {
            background: white;
            padding: 2rem 0;
            border-bottom: 3px solid var(--secondary-color);
        }

        .search-box {
            max-width: 800px;
            margin: 0 auto;
        }

        .nav-tabs {
            border-bottom: 3px solid #e2e8f0;
            margin-bottom: 2rem;
        }

        .nav-tabs .nav-link {
            color: var(--text-dark);
            font-weight: 600;
            padding: 1rem 2rem;
            border: none;
            border-bottom: 3px solid transparent;
            transition: all 0.3s;
        }

        .nav-tabs .nav-link:hover {
            border-color: var(--accent-color);
            color: var(--accent-color);
        }

        .nav-tabs .nav-link.active {
            color: var(--primary-color);
            background: transparent;
            border-color: var(--primary-color);
        }

        .publication-card {
            background: white;
            border-radius: 8px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 2px 4px rgba(0,0,0,0.08);
            transition: all 0.3s;
            border-left: 4px solid var(--accent-color);
        }

        .publication-card:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            transform: translateY(-2px);
        }

        .publication-header {
            display: flex;
            justify-content: space-between;
            align-items: start;
            margin-bottom: 1rem;
        }

        .publication-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 0.5rem;
        }

        .publication-meta {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
            font-size: 0.875rem;
            color: #64748b;
            margin-bottom: 1rem;
        }

        .publication-meta i {
            margin-right: 0.25rem;
        }

        .badge-type {
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
        }

        .badge-decreto { background: #dbeafe; color: #1e40af; }
        .badge-portaria { background: #fef3c7; color: #92400e; }
        .badge-lei { background: #dcfce7; color: #166534; }
        .badge-edital { background: #fce7f3; color: #9f1239; }
        .badge-resolucao { background: #e0e7ff; color: #3730a6; }

        .publication-content {
            color: #475569;
            line-height: 1.6;
            margin-bottom: 1rem;
        }

        .btn-view {
            background: var(--primary-color);
            color: white;
            border: none;
            padding: 0.5rem 1.5rem;
            border-radius: 6px;
            font-weight: 500;
            transition: all 0.3s;
        }

        .btn-view:hover {
            background: #1e40af;
            color: white;
            transform: translateX(4px);
        }

        .filters-section {
            background: white;
            padding: 1.5rem;
            border-radius: 8px;
            margin-bottom: 2rem;
            box-shadow: 0 2px 4px rgba(0,0,0,0.08);
        }

        .footer {
            background: var(--primary-color);
            color: white;
            padding: 3rem 0 1rem;
            margin-top: 4rem;
        }

        .footer h5 {
            color: var(--secondary-color);
            margin-bottom: 1rem;
        }

        .footer a {
            color: #cbd5e1;
            text-decoration: none;
            transition: color 0.3s;
        }

        .footer a:hover {
            color: white;
        }

        .stats-bar {
            background: white;
            padding: 1rem;
            border-radius: 8px;
            margin-bottom: 2rem;
            box-shadow: 0 2px 4px rgba(0,0,0,0.08);
        }

        .stat-item {
            text-align: center;
        }

        .stat-number {
            font-size: 2rem;
            font-weight: 700;
            color: var(--primary-color);
        }

        .stat-label {
            font-size: 0.875rem;
            color: #64748b;
        }
        .publication-actions {
            display: flex;
            justify-content: space-between; /* Isso coloca um em cada extremidade */
            align-items: center;
            margin-top: 15px;
            width: 100%;
        }

        /* Opcional: se quiser que os botões mantenham seu tamanho natural */
        .publication-actions .btn {
            white-space: nowrap; /* Impede quebra de texto */
        }
        .publication-content {
        /* Limita a 4 linhas e adiciona reticências */
        display: -webkit-box;
        line-clamp: 4; /* Standard property for compatibility */
        -webkit-line-clamp: 4; /* Número de linhas */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        
        /* Garante que o texto quebre corretamente */
        line-height: 1.4; /* Ajuste conforme necessário */
        max-height: calc(1.4em * 4); /* line-height x número de linhas */
        
        /* Opcional: estilo adicional */
        margin: 10px 0;
        color: #555;
        }

        .publications-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .pagination-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 0;
            border-top: 1px solid #dee2e6;
            flex-wrap: wrap;
            gap: 15px;
        }

        .pagination-controls {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .pagination-btn, .page-number {
            padding: 8px 12px;
            border: 1px solid #dee2e6;
            background: white;
            color: #007bff;
            cursor: pointer;
            border-radius: 4px;
            text-decoration: none;
            transition: all 0.3s ease;
            display: inline-block;
        }

        .page-number {
            color: #333;
            min-width: 40px;
            text-align: center;
        }

        .pagination-btn:hover:not(.disabled),
        .page-number:hover:not(.active) {
            background: #e9ecef;
            text-decoration: none;
            color: #0056b3;
        }

        .pagination-btn.disabled {
            color: #6c757d;
            cursor: not-allowed;
            background: #f8f9fa;
            pointer-events: none;
        }

        .page-number.active {
            background: #007bff;
            color: white;
            border-color: #007bff;
        }

        .page-numbers {
            display: flex;
            gap: 5px;
            margin: 0 10px;
        }

        .page-ellipsis {
            padding: 8px 5px;
            color: #6c757d;
        }

        .pagination-info {
            color: #6c757d;
            font-size: 14px;
        }

        .pagination-size {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .form-select {
            padding: 6px 10px;
            border: 1px solid #dee2e6;
            border-radius: 4px;
            background: white;
        }

        /* Responsividade */
        @media (max-width: 768px) {
            .pagination-container {
                flex-direction: column;
                text-align: center;
            }
            
            .publications-grid {
                grid-template-columns: 1fr;
            }
            
            .page-numbers {
                margin: 10px 0;
            }
        }
        
        .modal-dialog-scrollable .modal-content { 
            max-height: 90vh; 
        }
        .modal-body { 
            overflow-y: auto; padding: 20px; 
        }
        #publicacaoConteudo { 
            font-size: 1rem; text-align: justify; 
        }