/* Reset básico e design mobile-first */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 20px auto;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1, h2 {
    color: #0056b3;
    margin-bottom: 20px;
    text-align: center;
}

/* Formulário */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
}

input[type="date"],
input[type="number"],
input[type="text"],
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

/* Botão de Envio */
.btn-submit {
    background-color: #28a745;
    color: white;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #218838;
}

/* Mensagens de feedback */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}
.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Seção de Histórico */
.history-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.car-list a {
    display: block;
    background-color: #007bff;
    color: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    font-size: 18px;
    transition: background-color 0.3s;
}
.car-list a:hover {
    background-color: #0056b3;
}

/* Tabela de Histórico */
.table-wrapper {
    overflow-x: auto; /* Garante que a tabela não quebre o layout em telas pequenas */
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th, td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}
th {
    background-color: #007bff;
    color: white;
}
tr:nth-child(even) {
    background-color: #f2f2f2;
}
.link-voltar {
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
}




/* Estilos para o formulário de filtro de ano */
.filter-form {
    display: flex;
    flex-wrap: wrap; /* Permite que os itens quebrem para a linha de baixo em telas pequenas */
    gap: 10px;
    align-items: center;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.filter-form label {
    font-weight: bold;
    margin-bottom: 0; /* Remove a margem padrão da label */
}

.filter-form select {
    flex-grow: 1; /* Faz o select ocupar o espaço disponível */
    min-width: 120px; /* Largura mínima */
}

.filter-form button {
    background-color: #007bff;
    color: white;
    /* ANTES: padding: 15px 25px; -> Aumenta drasticamente a altura e largura */
    padding: 20px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    /* ANTES: font-size: 18px; -> Deixa o texto bem maior */
    font-size: 22px;
    font-weight: bold;
    flex-grow: 1;
    max-width: 300px; /* Aumentei um pouco o limite em telas grandes */
    text-align: center;
    /* Adiciona uma transição suave para o efeito hover */
    transition: background-color 0.3s ease;
}

.filter-form button:hover {
    background-color: #0056b3;
}

/* Estilo para o rodapé da tabela com os totais */
tfoot tr {
    background-color: #e9ecef;
    font-weight: bold;
}

tfoot td {
    color: #0056b3;
}

/* Estilo para a seção de resumo das médias gerais */
.summary-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
}

.summary-section h2 {
    color: #0d47a1;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: left;
    border-bottom: 2px solid #bbdefb;
    padding-bottom: 10px;
}

.summary-section p {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.summary-section span {
    font-weight: bold;
    color: #1976d2;
}



