:root {
    --azul-escuro: #003366;
    --azul-medio: #1a4d8c;
    --azul-claro: #e6f0ff;
    --cinza-claro: #f4f4f4;
    --cinza-borda: #ccc;
    --vermelho: #dc3545;
    --verde: #28a745;
    --amarelo: #ffc107;
    --laranja: #fd7e14;
    --roxo: #6f42c1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--cinza-claro);
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== CABEÇALHO ===== */
.cabecalho-principal {
    background: linear-gradient(135deg, var(--azul-escuro), var(--azul-medio));
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.cabecalho-principal .brasao {
    width: 80px;
    margin-bottom: 10px;
}

/* ===== CARDS DOS MÓDULOS ===== */
.modulos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.modulo-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.modulo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,51,102,0.2);
}

.modulo-icone {
    font-size: 48px;
    margin-bottom: 15px;
}

.modulo-card h3 {
    color: var(--azul-escuro);
    margin-bottom: 10px;
}

.modulo-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    background: var(--azul-escuro);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    background: var(--azul-medio);
    transform: translateY(-2px);
}

.btn-success { background: var(--verde); }
.btn-success:hover { background: #218838; }
.btn-danger { background: var(--vermelho); }
.btn-danger:hover { background: #c82333; }
.btn-warning { background: var(--amarelo); color: #212529; }
.btn-warning:hover { background: #e0a800; }
.btn-secondary { background: #6c757d; }
.btn-secondary:hover { background: #5a6268; }

/* ===== FORMULÁRIOS ===== */
form {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-width: 900px;
    margin: 20px auto;
}

.campo {
    margin-bottom: 20px;
}

label {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
    color: #333;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--cinza-borda);
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--azul-escuro);
    box-shadow: 0 0 0 2px rgba(0,51,102,0.2);
}

/* ===== TABELAS ===== */
.table-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--azul-escuro);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid #ddd;
}

tr:hover td {
    background: #f9f9f9;
}

/* ===== BOTÕES DE AÇÃO EM TABELAS ===== */
.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    font-size: 12px;
    transition: opacity 0.3s;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.action-btn:hover { opacity: 0.8; }

.btn-view { background: var(--azul-medio); }
.btn-edit { background: var(--amarelo); color: #212529; }
.btn-pdf { background: var(--vermelho); }
.btn-delete { background: #6c757d; }
.btn-view-pdf { background: var(--verde); }
.btn-delete-pdf { background: var(--laranja); }

/* ===== MENSAGENS ===== */
.msg {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 500;
}
.msg.sucesso { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.msg.erro   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .modulos-grid { grid-template-columns: 1fr; }
    .action-buttons { flex-direction: column; }
    .action-btn { width: 100%; justify-content: center; }
}