/* Estilos Gerais */
body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f8f9fa;
}

/* Barra de Navegação (Navbar) */
.navbar {
    background-color: #061842;
    padding: 15px 30px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.navbar .nav-links a {
    color: #FFF8E7;
	font-weight: bold;
    text-decoration: none;
    margin: 0 15px;
    font-size: 1.1em;
}
.navbar .user-info {
    font-weight: bold;
	color: #FFF8E7;
}
.navbar .user-info span {
    margin-right: 15px;
}
.navbar .logout-btn {
    background-color: #dc3545;
    padding: 8px 12px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
}

/* Conteúdo Principal */
.content {
    padding: 2em;
}

/* Tabelas */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
}
th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
th {
    background-color: #f2f2f2;
}

/* Botões e Links Padrão */
a.button {
    text-decoration: none;
    background-color: #061842;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    margin-right: 10px;
}

/* ================================================= */
/* --- Estilos dos Botões de Ação nas Tabelas --- */
/* ================================================= */

.action-links {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px; /* Espaçamento entre os botões */
    min-width: 160px;
}

.action-links a, 
.action-links button { 
    padding: 6px 12px; 
    border-radius: 4px; 
    color: white; 
    text-align: center; 
    text-decoration: none;
    white-space: nowrap;
    font-family: sans-serif;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

/* Botão padrão (se houver algum solto) */
.action-links button {
    background-color: #061842; /* Azul padrão */
}

/* Link de Edição (Amarelo) */
.action-links .edit-link { 
    background-color: #ffc107; 
    color: black; 
}

/* Formulário e Botão de Exclusão (Vermelho) */
.action-links .delete-form { 
    display: inline; 
    margin: 0; 
}

.action-links .delete-form button { 
    background-color: #dc3545; /* Vermelho */
}

/* Botões de Status (Amarelo e Verde) */
.action-links .btn-alta { 
    background-color: #ffc107; 
    color: white; 
}

.action-links .btn-reativar,
.action-links .btn-success { 
    background-color: #28a745; /* Verde */
}

/* Texto de Status Pago */
.paid-text { 
    color: #28a745; 
    font-weight: bold; 
}

/* Formulários Genéricos */
.form-container {
    max-width: 500px;
    margin: 0;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.form-container label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}
.form-container input, .form-container select, .form-container textarea {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    box-sizing: border-box;
}
.form-container button {
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    background-color: #061842;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
}
.form-container button.save-btn {
    background-color: #28a745;
}

/* Estilos da Página de Login */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f4f4f4;
    font-family: sans-serif;
}
.login-container {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    width: 400px;
    text-align: center;
}
.login-container form {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.logo {
    max-width: 200px;
    margin-bottom: 20px;
}
.login-container form label {
    margin-top: 10px;
    font-weight: normal;
}
.login-container form input {
    padding: 10px;
    margin-top: 5px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.login-container form button {
    margin-top: 20px;
    padding: 12px;
    background-color: #061842;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
}

/* Mensagens Flash e Alertas */
.flash-message {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
}
.error {
    background-color: #f8d7da;
    color: #721c24;
}
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    color: #fff;
}
.alert-info { background-color: #17a2b8; }
.alert-danger { background-color: #dc3545; }
.alert-success { background-color: #28a745; }
.info {
    background-color: #e9ecef;
    padding: 1px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Estilos para os Cards da Página Financeira */
.summary-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}
.card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    flex-grow: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.card h3 {
    margin-top: 0;
    color: #333;
}
.card p {
    font-size: 1.5em;
    font-weight: bold;
    color: #28a745;
    margin: 0;
}

/* --- Estilos do Menu Dropdown --- */
.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #3D4861;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 4px;
}
.dropdown-content a {
    color: #f1f1f1;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95em;
    margin: 0 !important;
}
.dropdown-content a:hover {
    background-color: #061842;
    color: #FFF8E7;
    font-weight: bold;
}
.dropdown:hover .dropdown-content {
    display: block;
}
/* ================================================= */
/* --- Estilos da Página de Prontuário e Edição --- */
/* ================================================= */

.prontuario-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

.prontuario-bloco {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.prontuario-bloco h2, 
.prontuario-bloco h3 {
    margin-top: 0;
}

.prontuario-bloco label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}

.prontuario-bloco textarea, 
.prontuario-bloco input[type="date"],
.prontuario-bloco input[type="datetime-local"],
.prontuario-bloco input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Garante que o padding não quebre o layout */
}

.prontuario-bloco button[type="submit"]:not(.delete-form button) {
    width: auto;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background-color: #061842;
    color: white;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.form-row label {
    margin-top: 0;
    flex-shrink: 0;
}

.history-item {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

.history-item:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.history-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.history-notes {
    white-space: pre-wrap;
    text-align: justify;
}

.info {
    background-color: #e9ecef;
    padding: 1px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}