/* --- ESTILOS GERAIS DE FORMULÁRIO (Cadastro e Edição) --- */

/* Botões */
.btn-primary { 
    background-color: var(--primary-blue); 
    color: white; 
    border: 1px solid var(--primary-blue); 
}
.btn-primary:hover { 
    background-color: #007bb8; 
    border-color: #007bb8; 
}

/* Grids e Layout */
.form-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    margin-bottom: 20px; 
}
.full-width { 
    grid-column: span 2; 
}
.form-group { 
    margin-bottom: 15px; 
}

/* Labels e Inputs */
label { 
    font-weight: 600; 
    color: var(--text-main); 
    font-size: 0.9em; 
    display: block; 
    margin-bottom: 8px; 
}

.input-std {
    width: 100%; 
    padding: 10px 12px; 
    border: 1px solid #CBD5E1; 
    border-radius: 8px;
    font-size: 0.95rem; 
    color: var(--text-main); 
    background-color: #fff; 
    outline: none; 
    transition: 0.2s;
    font-family: 'Inter', sans-serif; 
    box-sizing: border-box;
}
.input-std:focus { 
    border-color: var(--primary-blue); 
    box-shadow: 0 0 0 3px rgba(0, 145, 230, 0.1); 
}

/* Cards e Seções */
.card-section {
    background: #fff; 
    padding: 25px; 
    border-radius: 12px; 
    border: 1px solid #EFF2F7;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02); 
    margin-bottom: 15px;
}

.card-status {
    background: #FFFBEB; 
    border: 1px solid #FDE68A; 
    border-left: 5px solid #F59E0B;
    padding: 20px; 
    border-radius: 8px; 
    margin-bottom: 20px; 
    color: #92400E;
}

.section-label {
    color: var(--primary-dark); 
    font-weight: 700; 
    display: block; 
    border-bottom: 1px solid #F1F5F9; 
    padding-bottom: 15px; 
    margin-bottom: 20px;
    font-size: 1rem; 
    display: flex; 
    align-items: center; 
    gap: 8px;
}

/* Grids Internos */
.inner-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
}
.inner-full { 
    grid-column: span 2; 
}

/* Checkboxes de Ministérios */
.grid-checkboxes { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 
    gap: 10px; 
}

.label-check-box { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-weight: 500; 
    cursor: pointer; 
    background: #F8FAFC; 
    padding: 10px; 
    border-radius: 8px; 
    border: 1px solid #E2E8F0; 
    transition: 0.2s; 
    font-size: 0.9em; 
    color: #64748B;
}
.label-check-box:hover { 
    border-color: var(--primary-blue); 
    color: var(--primary-blue); 
    background: #EFF6FF; 
}
.label-check-box input { 
    accent-color: var(--primary-blue); 
    width: 16px; 
    height: 16px; 
}

.label-disabled { 
    opacity: 0.6; 
    cursor: not-allowed; 
    background: #f3f4f6; 
    border-color: #e5e7eb; 
}
.label-disabled:hover { 
    border-color: #e5e7eb; 
    color: #64748B; 
    background: #f3f4f6; 
}

/* Barra de Ações */
.action-bar {
    margin-top: 30px; 
    padding-top: 20px; 
    border-top: 1px solid #E2E8F0;
    display: flex; 
    justify-content: flex-end; 
    gap: 15px;
}

/* Upload de Foto */
.photo-upload-container { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    margin-bottom: 20px; 
}
.photo-preview { 
    width: 80px; 
    height: 80px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 3px solid #E2E8F0; 
    background: #F1F5F9; 
}
.btn-upload { 
    display: inline-block; 
    padding: 8px 15px; 
    background: #E2E8F0; 
    border-radius: 6px; 
    cursor: pointer; 
    font-size: 0.9rem; 
    color: #475569; 
    font-weight: 500; 
    transition: 0.2s; 
}
.btn-upload:hover {
    background: #CBD5E1;
}

/* Alertas e Modais (Compartilhado com Cadastro) */
.found-alert { 
    background-color: #EFF6FF; 
    color: #1E40AF; 
    border: 1px solid #BFDBFE; 
    padding: 15px; 
    border-radius: 8px; 
    margin-bottom: 25px; 
    display: none; 
    text-align: center; 
    font-size: 0.95rem; 
}

/* Modal de Sugestões (usado no cadastro para duplicidade) */
.modal-overlay {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(15, 23, 42, 0.6); 
    backdrop-filter: blur(4px); 
    z-index: 2000;
    justify-content: center; 
    align-items: center;
}
.modal-content {
    background: white; 
    padding: 0; 
    border-radius: 16px; 
    width: 90%; 
    max-width: 550px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); 
    border: 1px solid #EFF2F7; 
    overflow: hidden;
}
.suggestion-list { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    max-height: 300px; 
    overflow-y: auto; 
}
.suggestion-item { 
    padding: 15px; 
    border-bottom: 1px solid #F1F5F9; 
    cursor: pointer; 
    transition: background 0.2s;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background-color: #F8FAFC; }
.suggestion-name { font-weight: 600; color: var(--text-main); font-size: 1rem; display: block; }
.suggestion-meta { font-size: 0.85rem; color: var(--text-muted); }
.btn-select { 
    padding: 6px 12px; 
    background: #E0F2FE; 
    color: var(--primary-blue); 
    border: 1px solid #BFDBFE; 
    border-radius: 6px; 
    font-size: 0.8rem; 
    font-weight: 600;
}
.suggestion-item:hover .btn-select { 
    background: var(--primary-blue); 
    color: white; 
    border-color: var(--primary-blue); 
}

/* Responsividade */
@media (max-width: 768px) { 
    body { padding: 10px; }
    .form-grid, .inner-grid { grid-template-columns: 1fr; } 
    .full-width, .inner-full { grid-column: span 1; } 
    .action-bar { flex-direction: column; }
    .action-bar .btn { width: 100%; justify-content: center; padding: 12px; }
    .grid-checkboxes { grid-template-columns: 1fr; }
}