body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to right, #0056b3, #007bff); /* Azul Institucional */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Container de Login --- */
.login-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 100%;
    max-width: 450px;
}

.logo {
    max-width: 180px;
    margin-bottom: 25px;
    filter: drop-shadow(2px 2px 5px rgba(0,0,0,0.1));
}

.login-container h1 {
    color: #0056b3;
    margin-bottom: 10px;
    font-size: 2em;
    font-weight: bold;
}

.login-container p {
    color: #555;
    margin-bottom: 30px;
    font-size: 1em;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.input-group input[type="text"],
.input-group input[type="password"],
.input-group input[type="number"],
.input-group input[type="date"],
.input-group input[type="time"],
.input-group textarea,
.input-group select {
    width: calc(100% - 22px);
    padding: 11px;
    border: 1px solid #c0c0c0;
    border-radius: 6px;
    font-size: 1.05em;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

button {
    background-color: #007bff; /* Azul padrão */
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    font-weight: bold;
    margin-top: 10px;
}

button:hover {
    background-color: #0056b3; /* Azul mais escuro ao passar o mouse */
    transform: translateY(-2px);
}

.error-message {
    color: #e74c3c; /* Vermelho para mensagens de erro */
    margin-top: 20px;
    font-weight: bold;
    font-size: 0.95em;
}

/* --- Dashboard e Telas Internas (Layout Base) --- */
.dashboard-container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 1000px;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Para empurrar o footer para baixo */
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.header h1 {
    color: #0056b3;
    font-size: 2.2em;
    margin: 0;
}

.user-info {
    font-size: 1em;
    color: #555;
    font-weight: bold;
}

.main-content {
    flex-grow: 1; /* Ocupa o espaço restante */
    display: flex;
    flex-wrap: wrap; /* Para os botões ficarem lado a lado */
    gap: 25px; /* Espaçamento entre os botões */
    justify-content: center; /* Centraliza os botões */
    align-content: flex-start; /* Alinha ao topo */
    padding: 20px 0;
}

.main-content .action-button {
    background-color: #007bff;
    color: white;
    padding: 30px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    min-width: 220px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
    flex: 1 1 calc(33% - 50px); /* 3 colunas com espaçamento */
    max-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none; /* Remover sublinhado do link */
}

.main-content .action-button:hover {
    background-color: #0056b3;
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 123, 255, 0.4);
}

.footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 25px;
    text-align: center;
    color: #777;
    font-size: 0.85em;
}

.footer button {
    width: auto;
    margin: 0 10px;
    padding: 8px 15px;
    font-size: 0.9em;
    background-color: #6c757d; /* Cinza para botões de sair */
}

.footer button:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

/* --- Telas de Formulário / Listagem (Padrão) --- */
.form-container, .list-container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 900px;
    margin: 30px auto; /* Centraliza */
}

.form-container h2, .list-container h2 {
    color: #0056b3;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row .input-group {
    flex: 1 1 calc(50% - 10px); /* Duas colunas */
    min-width: 280px; /* Garante que não fique muito apertado */
    margin-bottom: 0;
}

.form-buttons {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.form-buttons button {
    width: auto;
    padding: 10px 25px;
    font-size: 1em;
}

.form-buttons .btn-cancel {
    background-color: #6c757d;
}
.form-buttons .btn-cancel:hover {
    background-color: #5a6268;
}
.form-buttons .btn-delete {
    background-color: #dc3545; /* Vermelho para excluir */
}
.form-buttons .btn-delete:hover {
    background-color: #c82333;
}
.form-buttons .btn-finish {
    background-color: #28a745; /* Verde para finalizar */
}
.form-buttons .btn-finish:hover {
    background-color: #218838;
}
.form-buttons .btn-print {
    background-color: #17a2b8; /* Azul claro para imprimir */
}
.form-buttons .btn-print:hover {
    background-color: #138496;
}

/* --- Tabela de Listagem --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th, .data-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.data-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #333;
}

.data-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.data-table tr:hover {
    background-color: #e9e9e9;
    cursor: pointer;
}

/* --- Mensagens de Alerta/Sucesso --- */
.success-message {
    color: #28a745;
    font-weight: bold;
    margin-top: 15px;
    text-align: center;
}

/* --- Estilo para campos desabilitados --- */
.input-group input[disabled],
.input-group textarea[disabled],
.input-group select[disabled] {
    background-color: #e9ecef;
    cursor: not-allowed;
    color: #6c757d;
}

/* Media Queries para responsividade */
@media (max-width: 768px) {
    .form-row .input-group {
        flex: 1 1 100%; /* Uma coluna em telas menores */
    }
    .main-content .action-button {
        flex: 1 1 calc(50% - 25px); /* Duas colunas */
    }
    .dashboard-container, .form-container, .list-container {
        padding: 20px;
        width: 95%;
    }
    .header h1 {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    .main-content .action-button {
        flex: 1 1 100%; /* Uma coluna */
    }
    .login-container {
        padding: 30px;
    }
    .login-container h1 {
        font-size: 1.5em;
    }
}