/* General styles */
body {
    background-color: #f8f9fa;
    font-family: Arial, sans-serif;
}

.container {
    margin-bottom: 50px;
}

/* Card styles */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 30px;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* Form styles */
label {
    font-weight: bold;
}

.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

textarea {
    resize: vertical;
}

/* Table styles */
.table th {
    background-color: #f8f9fa;
}

/* Custom file input */
.custom-file-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Action buttons */
.btn-action {
    margin-right: 5px;
}

/* File section */
.arquivo-item {
    padding-bottom: 15px;
    border-bottom: 1px dashed #ccc;
    margin-bottom: 15px;
}

.arquivo-item:last-child {
    border-bottom: none;
}

/* View page */
.bg-light {
    min-height: 50px;
}

/* Search bar styles */
.search-form {
    margin-bottom: 20px;
}

.search-form .input-group {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.search-form .form-control {
    border: none;
    padding: 12px 15px;
    font-size: 16px;
}

.search-form .form-control:focus {
    box-shadow: none;
}

.search-form .btn {
    padding: 12px 20px;
    font-weight: 500;
}

.search-form .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.search-form .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.search-form .btn i {
    margin-right: 5px;
}

/* Search results alert */
.alert-info {
    background-color: #e8f4fd;
    border-color: #bee5eb;
    color: #0c5460;
    border-radius: 5px;
    padding: 15px;
}

.alert-info i {
    margin-right: 8px;
}

/* Pagination styles */
.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    color: #007bff;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    margin-left: -1px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    font-weight: 600;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.pagination .page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: none;
}

/* Pagination info styles */
.pagination-info {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pagination-info .text-muted {
    font-size: 0.875rem;
    color: #6c757d !important;
}

.pagination-info .filter-indicator {
    color: #007bff;
    font-weight: 500;
    background-color: rgba(0, 123, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
}

.pagination-info .filter-indicator i {
    margin-right: 0.25rem;
}

.pagination-info label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0;
}

.pagination-info select {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.pagination-info select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Enhanced pagination styles */
.pagination {
    margin-bottom: 0;
}

.pagination .page-item {
    margin: 0 2px;
}

.pagination .page-link {
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    color: #007bff;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
    transition: all 0.15s ease-in-out;
}

.pagination .page-link:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #0056b3;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination .page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }
    
    .pagination .page-item {
        margin: 0 1px;
    }
    
    .pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
        min-width: 35px;
    }
    
    .pagination-info {
        text-align: center;
        padding: 0.75rem 1rem;
    }
    
    .pagination-info .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .pagination-info .d-flex {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .pagination-info .text-md-right {
        text-align: center !important;
    }
}

/* Licitacao styles */
.licitacao-title {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.licitacao-info {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.description-section {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    border-left: 4px solid #007bff;
}

.description-section h5 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.description-section p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Filter styles */
.unified-form {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

.unified-form label {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.unified-form .form-control {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.unified-form .form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.unified-form .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.unified-form .btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}

.unified-form .btn-outline-primary:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.unified-form .btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

.unified-form .btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Date input styles */
.unified-form input[type="date"] {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.unified-form input[type="date"]:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Filter indicator styles */
.filter-indicator {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 10px;
}

.filter-indicator i {
    margin-right: 4px;
}

/* Responsive filters */
@media (max-width: 768px) {
    .unified-form {
        padding: 1rem;
    }
    
    .unified-form .row > div {
        margin-bottom: 1rem;
    }
    
    .unified-form .d-flex {
        justify-content: center;
    }
}

/* Estilos específicos para os novos filtros */
.unified-form .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Correção para selects - removendo setas duplas e melhorando a exibição de texto */
.unified-form select.form-control {
    /* Remove qualquer background-image padrão do Bootstrap */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    /* Garante que o texto não seja cortado */
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    /* Remove setas nativas do navegador */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Garante que não há setas duplas */
    background-color: #fff;
}

/* Estilos específicos para opções dos selects */
.unified-form select.form-control option {
    background-color: #fff;
    color: #495057;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hover state para selects */
.unified-form select.form-control:hover {
    border-color: #adb5bd;
}

/* Focus state para selects */
.unified-form select.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23007bff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* Correção para Firefox */
.unified-form select.form-control::-ms-expand {
    display: none;
}

/* Correção para IE */
.unified-form select.form-control::-ms-value {
    background: transparent;
    color: inherit;
}

/* Estilo para opção selecionada */
.unified-form select.form-control option:checked {
    background-color: #007bff;
    color: #fff;
}

/* Estilo para opção em hover */
.unified-form select.form-control option:hover {
    background-color: #e9ecef;
}

.unified-form .d-flex {
    gap: 10px;
}

.unified-form .d-flex .btn {
    flex: 1;
    min-width: 120px;
}

.unified-form .btn i {
    margin-right: 5px;
}



.unified-form .form-control:hover {
    border-color: #adb5bd;
}

.unified-form .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    box-shadow: none;
}

.unified-form .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: none;
    box-shadow: none;
}

.unified-form .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    box-shadow: none;
}

.unified-form .btn-secondary:hover {
    background-color: #545b62;
    border-color: #545b62;
    transform: none;
    box-shadow: none;
}

/* Indicador de filtros ativos */
.unified-form.filters-active {
    border-left: 4px solid #007bff;
    background-color: #f8f9fa;
}

.unified-form.filters-active::before {
    content: "Filtros Ativos";
    position: absolute;
    top: -10px;
    left: 20px;
    background: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}





/* Estilo para campos com filtros ativos */
.form-control.has-filter {
    border-color: #28a745;
    background-color: #f8fff9;
}

.unified-form .btn {
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 500;
}

/* Efeito hover nos botões */
.btn:hover {
    transition: all 0.2s ease;
}

/* Melhorias na paginação */
.pagination .page-link {
    border-radius: 6px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    color: #007bff;
    font-weight: 500;
}

.pagination .page-link:hover {
    background-color: #e9ecef;
    border-color: #007bff;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

/* Melhorias nos cards de licitação */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 25px;
}

/* Estilo para informações de licitação */
.licitacao-info {
    margin-bottom: 8px;
    color: #495057;
    font-size: 14px;
}

.licitacao-info strong {
    color: #212529;
    font-weight: 600;
}

.licitacao-status {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    text-transform: uppercase;
}

/* Status específicos */
.licitacao-status:contains("Aberta") {
    background-color: #d4edda;
    color: #155724;
}

.licitacao-status:contains("Fechada") {
    background-color: #f8d7da;
    color: #721c24;
}

.licitacao-status:contains("Suspensa") {
    background-color: #fff3cd;
    color: #856404;
}

/* Melhorias na tabela de arquivos */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.table td {
    vertical-align: middle;
}

/* Botões de download */
.btn-outline-primary {
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-outline-primary:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsividade melhorada */
@media (max-width: 576px) {
    .container {
        padding: 10px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .unified-form {
        padding: 15px;
    }
    
    .btn {
        font-size: 14px;
        padding: 8px 16px;
    }
}