/* Estilos Gerais */
body { font-family: Arial, sans-serif; margin: 0; background-color: #f4f7f6; color: #333; }
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Cabeçalho */
.main-header { background-color: #0d47a1; color: white; padding: 15px 0; }
.main-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { color: white; text-decoration: none; font-size: 1.5em; font-weight: bold; }
.main-header nav a { color: white; text-decoration: none; margin-left: 20px; }

/* Rodapé */
.main-footer { background-color: #333; color: white; text-align: center; padding: 10px 0; margin-top: 40px; }

/* Formulário de Login */
.login-container { max-width: 400px; margin: 100px auto; padding: 30px; background-color: white; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); text-align: center; }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 5px; }
.form-group input { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
button { width: 100%; padding: 12px; background-color: #1565c0; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 1em; }
button:hover { background-color: #0d47a1; }
.erro { color: #d32f2f; background-color: #ffcdd2; border: 1px solid #d32f2f; padding: 10px; border-radius: 4px; margin-bottom: 20px; }

/* Dashboard */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 20px; }
.dashboard-card { background-color: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); text-decoration: none; color: #333; transition: transform 0.2s, box-shadow 0.2s; }
.dashboard-card:hover { transform: translateY(-5px); box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
.dashboard-card h2 { margin-top: 0; color: #0d47a1; }
/* Estilos para Tabelas */
table { width: 100%; border-collapse: collapse; margin-top: 20px; background-color: white; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
th, td { padding: 12px 15px; border: 1px solid #ddd; text-align: left; }
th { background-color: #e9ecef; }
tbody tr:nth-child(even) { background-color: #f8f9fa; }
.actions a { margin-right: 10px; text-decoration: none; }

/* Botões */
.btn { background-color: #1565c0; color: white; padding: 10px 15px; text-decoration: none; border-radius: 4px; display: inline-block; border: none; cursor: pointer; }
.btn:hover { background-color: #0d47a1; }
.btn-edit { background-color: #ffc107; color: #333; }
.btn-edit:hover { background-color: #e0a800; }
.btn-delete { background-color: #d32f2f; }
.btn-delete:hover { background-color: #c62828; }

/* Cabeçalho da Página (Título + Botão) */
.header-container { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.header-container h1 { margin: 0; }

/* Estilos para Formulários */
form { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
textarea { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-family: Arial, sans-serif; }
select { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; background-color: white; }
.form-group-row { display: flex; gap: 20px; }
.form-group-row .form-group { flex: 1; }
fieldset { border: 1px solid #ddd; padding: 20px; margin-bottom: 20px; border-radius: 8px; }
legend { font-weight: bold; color: #0d47a1; padding: 0 10px; }
.cargo-row { align-items: flex-end; }
.btn-secondary { background-color: #6c757d; }
.btn-secondary:hover { background-color: #5a6268; }
/* Estilos para a Seção de Insights */
.insights-container { margin-top: 40px; }
.insights-container h2 { display: flex; align-items: center; gap: 10px; }
.insight-icon { font-size: 1.5em; }

/* Status de Vencimento de Mandato */
.status-vencendo { background-color: #ffcdd2 !important; color: #c62828; font-weight: bold; }
.status-atencao { background-color: #fff9c4 !important; color: #f57f17; }
/* --- Container de Filtros --- */
.filters-container {
    background-color: #f9f9f9;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 30px;
}

.form-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 15px;
}

.form-filters .form-group {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.form-filters .form-group-search {
    flex-basis: 300px; /* Dá mais espaço para o campo de busca */
}

.form-filters label {
    margin-bottom: 5px;
    font-size: 0.9em;
    font-weight: 600;
    color: #555;
}

.form-filters .form-actions {
    padding-bottom: 5px; /* Alinha os botões com os inputs */
}


/* --- Melhorias na Tabela --- */
table {
    border-collapse: collapse; /* Remove espaços entre as células */
    width: 100%;
    margin-top: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

th, td {
    padding: 12px 15px; /* Mais espaçamento interno */
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

thead tr {
    background-color: #f2f2f2;
    color: #333;
    font-weight: bold;
}

tbody tr:hover {
    background-color: #f5f5f5; /* Efeito hover sutil */
}

.text-center {
    text-align: center;
}

/* --- Estilo para Tags de Documento --- */
.document-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.doc-tag {
    display: inline-block;
    padding: 5px 10px;
    background-color: #e7f1ff;
    color: #0056b3;
    border-radius: 5px;
    font-size: 0.85em;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.doc-tag:hover {
    background-color: #0056b3;
    color: #fff;
}

/* Status de Vencimento (para Mandatos e RGs) */
.status-vencendo {
    background-color: #ffcdd2 !important;
    color: #c62828;
    font-weight: bold;
}

/* Estilo para a tag do checklist, para diferenciá-la */
.doc-tag-checklist {
    background-color: #e8f5e9; /* Verde claro */
    color: #2e7d32; /* Verde escuro */
    border: 1px solid #a5d6a7;
}
.doc-tag-checklist:hover {
    background-color: #c8e6c9;
}