* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    min-height: 100vh;
    color: #1f2937;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.filtros-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    margin-bottom: 30px;
    border-top: 4px solid #dc2626;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    background-color: white;
    transition: all 0.3s ease;
    color: #374151;
}

select:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
    color: #374151;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #dc2626;
    background-color: #dc2626;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

.periodo-group {
    transition: all 0.3s ease;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

#btnPesquisar {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#btnPesquisar:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 38, 38, 0.4);
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

#btnPesquisar:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.mensagens {
    margin-bottom: 20px;
}

.mensagem {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-weight: 500;
}

.mensagem.erro {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.mensagem.sucesso {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.mensagem.aviso {
    background-color: #fffbeb;
    color: #d97706;
    border: 1px solid #fed7aa;
}

.resultados {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    border-top: 4px solid #1e40af;
}

.tabela-container {
    margin-bottom: 30px;
}

.tabela-titulo {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    padding: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tabela-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
    position: sticky;
    top: 0;
    z-index: 10;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

tr:hover {
    background-color: #f3f4f6;
}

tr:nth-child(even) {
    background-color: #fafafa;
}

tr:nth-child(even):hover {
    background-color: #f3f4f6;
}

td:last-child {
    text-align: right;
    font-weight: 600;
    color: #1e40af;
}

.numero {
    font-family: 'Courier New', monospace;
    text-align: right;
    color: #1e40af;
}

.periodo-sem-dados {
    background-color: #fef2f2;
    border-left: 4px solid #dc2626;
    padding: 15px;
    margin: 10px 0;
    border-radius: 0 6px 6px 0;
}

.periodo-sem-dados h4 {
    color: #dc2626;
    margin-bottom: 5px;
    font-weight: 600;
}

.periodo-sem-dados p {
    color: #6b7280;
    font-size: 14px;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    .filtros-form {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .radio-group {
        flex-direction: column;
        gap: 15px;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 8px 10px;
    }

    .tabela-titulo {
        font-size: 1rem;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    .filtros-form {
        padding: 15px;
    }

    #btnPesquisar {
        padding: 12px 30px;
        font-size: 14px;
    }

    table {
        font-size: 11px;
    }

    th, td {
        padding: 6px 8px;
    }
}

/* Animações */
.resultados {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tabela-container {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Elementos adicionais inspirados no TCE-PR */
.filtros-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc2626 0%, #1e40af 100%);
    border-radius: 12px 12px 0 0;
}

.filtros-form {
    position: relative;
}

/* Estilo para links e elementos interativos */
a {
    color: #dc2626;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #b91c1c;
    text-decoration: underline;
}

/* Melhorias na tipografia */
h2, h3, h4 {
    color: #1e40af;
    font-weight: 600;
}

/* Indicadores visuais */
.destaque {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    padding: 12px;
    border-radius: 0 6px 6px 0;
    margin: 10px 0;
}

/* Estilos para botões de exportação */
.export-buttons {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    padding: 30px;
    margin-top: 30px;
    border-top: 4px solid #16a34a;
    animation: fadeIn 0.5s ease-in;
}

.export-buttons h3 {
    color: #16a34a;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.export-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.export-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: linear-gradient(