body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    width: 100%;
    margin-top: 30px;
}

h1 {
    color: #0056b3;
    text-align: center;
    margin-bottom: 25px;
    font-size: 2.2em;
}

p {
    text-align: center;
    margin-bottom: 20px;
    color: #555;
}

form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 8px;
    font-weight: bold;
    color: #444;
}

input[type="text"],
input[type="date"],
select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box; /* Include padding in width */
}

input[type="text"]:focus,
input[type="date"]:focus,
select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
}

button {
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

button:hover {
    background-color: #0056b3;
}

button#clearFilters {
    background-color: #6c757d;
    margin-left: 10px;
}

button#clearFilters:hover {
    background-color: #5a6268;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#loading {
    text-align: center;
    font-size: 1.1em;
    color: #007bff;
    margin-top: 20px;
}

#results {
    margin-top: 30px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

#results h2 {
    color: #0056b3;
    margin-top: 0;
    text-align: center;
}

#resultSummary {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-bottom: 20px;
}

#cnpjList {
    list-style: none;
    padding: 0;
    max-height: 500px; /* Limita a altura para scrollar */
    overflow-y: auto; /* Adiciona scroll se exceder a altura */
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 10px;
}

#cnpjList li {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#cnpjList li strong {
    color: #0056b3;
}

hr {
    border: 0;
    height: 1px;
    background: #eee;
    margin: 10px 0;
}

#pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 15px;
}

#pagination button {
    padding: 8px 15px;
    font-size: 0.95em;
    border-radius: 5px;
    margin-top: 0; /* Override default button margin-top */
}

#currentPageInfo {
    font-weight: bold;
    color: #007bff;
    font-size: 1.1em;
}

.hidden {
    display: none !important;
}

/* Responsividade */
@media (max-width: 768px) {
    form {
        grid-template-columns: 1fr; /* Uma coluna em telas menores */
    }

    .container {
        padding: 20px;
        margin-top: 15px;
    }

    button {
        width: 100%;
        margin-top: 10px;
    }
    button#clearFilters {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8em;
    }
    input[type="text"],
    input[type="date"],
    select,
    button {
        padding: 10px;
    }
}