/* ---- GERAL E RESET ---- */
:root {
    --cor-primaria: #005a9c;
    --cor-secundaria: #007bff;
    --cor-sucesso: #28a745;
    --cor-perigo: #dc3545;
    --cor-aviso: #ffc107;
    --cor-analise: #17a2b8;
    --cor-fundo: #f4f7f6;
    --cor-texto: #333;
    --cor-borda: #dee2e6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container { width: 95%; max-width: 1200px; margin: 0 auto; }
main { flex: 1; padding: 2rem 0; }
h1, h2, h3 { color: var(--cor-primaria); margin-bottom: 1rem; }

/* ---- HEADER E NAVEGAÇÃO ---- */
header {
    background-color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-bottom: 3px solid var(--cor-primaria);
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
header h1 { font-size: 1.5rem; margin-bottom: 0; }
nav ul { list-style: none; display: flex; gap: 1rem; }
nav a { color: var(--cor-primaria); text-decoration: none; font-weight: bold; padding: 0.5rem; transition: all 0.3s; }
nav a:hover, nav a.active { color: var(--cor-secundaria); background-color: #f0f0f0; border-radius: 5px; }

/* ---- FORMULÁRIOS ---- */
.form-container { background: #fff; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.form-section { border-bottom: 1px solid var(--cor-borda); padding-bottom: 1.5rem; margin-bottom: 1.5rem; }
.form-section:last-child { border-bottom: none; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: bold; margin-bottom: 0.5rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--cor-borda);
    border-radius: 5px;
    font-size: 1rem;
}
textarea { min-height: 120px; }

/* ---- BOTÕES ---- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    color: #fff;
    background-color: var(--cor-secundaria);
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s;
}
.btn:hover { background-color: #0056b3; }
.btn-sucesso { background-color: var(--cor-sucesso); }
.btn-sucesso:hover { background-color: #218838; }
.btn-perigo { background-color: var(--cor-perigo); }
.btn-perigo:hover { background-color: #c82333; }

/* ---- TABELAS ---- */
.table-responsive { width: 100%; overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.data-table th, .data-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--cor-borda); }
.data-table th { background-color: #f8f9fa; }
.data-table tr:hover { background-color: #f1f1f1; }

/* ---- STATUS TAGS ---- */
.status-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    color: #fff;
    font-weight: bold;
    font-size: 0.8rem;
    text-align: center;
}
.status-pendente { background-color: var(--cor-aviso); color: #333; }
.status-analise { background-color: var(--cor-analise); }
.status-aprovado { background-color: var(--cor-sucesso); }
.status-reprovado { background-color: var(--cor-perigo); }
.status-espera, .status-cancelado, .status-desistencia { background-color: #6c757d; }

/* ---- LOGIN PAGE ---- */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--cor-primaria);
}
.login-box {
    background: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* ---- DASHBOARD ---- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.dashboard-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--cor-texto);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}
.dashboard-card:hover { transform: translateY(-5px); box-shadow: 0 6px 15px rgba(0,0,0,0.15); }

/* ---- PROTOCOLO VISUALIZAÇÃO ---- */
.protocolo-view { background: #fff; padding: 2rem; border-radius: 8px; }
.protocolo-header { text-align: center; border-bottom: 2px solid var(--cor-borda); margin-bottom: 1.5rem; padding-bottom: 1.5rem; }
.protocolo-section h3 { border-bottom: 1px solid var(--cor-borda); padding-bottom: 0.5rem; }
.protocolo-section p { margin-bottom: 0.5rem; }
.protocolo-section p strong { display: inline-block; width: 150px; }

/* ---- MENSAGENS E ALERTAS ---- */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    color: #fff;
}
.alert-success { background-color: var(--cor-sucesso); }
.alert-danger { background-color: var(--cor-perigo); }

/* ---- RESPONSIVIDADE / MOBILE ---- */
@media (max-width: 768px) {
    header .container { flex-direction: column; gap: 1rem; }
    nav ul { justify-content: center; flex-wrap: wrap; }
    .dashboard-grid { grid-template-columns: 1fr; }
}

/* ---- NOVO: Estilo para o ícone de perfil ---- */
.profile-icon {
    font-size: 2rem; /* Tamanho maior para o ícone */
    display: flex;
    align-items: center;
    padding: 0 0.5rem; /* Ajuste no padding para não afetar a altura da barra */
}
.profile-icon:hover {
    background-color: transparent !important; /* Remove o fundo no hover para o ícone */
    color: #0056b3;
}
/* ---- NOVO: Estilos para a página de impressão do comprovante ---- */
.comprovante-wrapper {
    max-width: 800px;
    margin: 2rem auto;
    background: #fff;
    padding: 2.5rem;
    border: 1px solid #ccc;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}
.comprovante-header {
    text-align: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}
.protocolo-gigante {
    font-size: 3rem;
    font-weight: bold;
    color: var(--cor-primaria);
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    border: 2px dashed var(--cor-borda);
    background-color: #f8f9fa;
}
.comprovante-instrucoes {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

/* Estilos para controle da impressão */
@media print {
    body {
        background-color: #fff;
    }
    .no-print, header, footer, nav {
        display: none !important;
    }
    .comprovante-wrapper {
        box-shadow: none;
        border: none;
        margin: 0;
        max-width: 100%;
    }
}
/* ---- Estilo para o ícone de perfil (MODIFICADO) ---- */
/* Aumentamos o font-size de 2rem para 2.4rem para deixar o ícone maior */
.profile-icon {
    font-size: 2.4rem; /* ALTERADO */
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
}
.profile-icon:hover {
    background-color: transparent !important;
    color: #0056b3;
}

/* ---- Estilo para ícones de ação na tabela ---- */
.table-action-icon {
    /* ADICIONADO !important para forçar a aplicação do estilo */
    font-size: 2.0rem !important; 
    color: #333;
    margin-right: 10px;
    vertical-align: middle;
    display: inline-block;
    transition: color 0.3s;
}
.table-action-icon:hover {
    color: var(--cor-primaria);
}
/* ---- NOVO: Estilo para a página de consulta de protocolo ---- */
.consulta-box {
    max-width: 600px;
    margin: 2rem auto;
    background: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
}
.resultado-box {
    margin: 2rem auto;
    background: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.resultado-box h2 {
    border-bottom: 2px solid var(--cor-borda);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
.resultado-item {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.resultado-item strong {
    flex-basis: 200px; /* Largura fixa para o rótulo */
    flex-shrink: 0;
    color: var(--cor-primaria);
}
/* ---- NOVO: Classe para botões menores, ideal para tabelas ---- */
.btn.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 500;
}
/* ---- NOVO: Estilos para o Painel de Estatísticas do Dashboard ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-card-icon {
    font-size: 2.5rem;
    padding: 0.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.stat-card-icon.total { background-color: var(--cor-primaria); }
.stat-card-icon.pendente { background-color: var(--cor-aviso); }
.stat-card-icon.aprovado { background-color: var(--cor-sucesso); }
.stat-card-icon.reprovado { background-color: var(--cor-perigo); }

.stat-card-info h3 {
    font-size: 2.2rem;
    margin: 0;
}
.stat-card-info p {
    margin: 0;
    color: #6c757d;
    font-weight: 500;
}