/* --- Estilos para a Tela de Carregamento (Loading Overlay) --- */
#sp-loading-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999 !important;
    flex-direction: column;
}
#sp-loading-overlay.active {
    display: flex;
}
#sp-loading-overlay p {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 20px;
    color: #333;
}
.sp-spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: sp-spin 1s linear infinite;
}
@keyframes sp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Estilos Gerais --- */
.busca-solicitacao { margin-bottom: 20px; }
#protocolo_busca { padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 16px; width: 250px; }
.busca-solicitacao input[type="submit"] { padding: 10px 15px; border: none; background-color: #337ab7; color: white; font-size: 16px; border-radius: 4px; cursor: pointer; margin-left: 5px; }
.busca-solicitacao input[type="submit"]:hover { background-color: #286090; }

/* --- Estilos para a Lista de Solicita������es [lista_solicitacoes] --- */
/* --- ESTILOS PARA A PÁGINA DE CONSULTA [lista_solicitacoes] --- */

.solicitacao-box {
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.solicitacao-box h3 {
    margin-top: 0;
}

.solicitacao-box .status-tag {
    background-color: #eee;
    padding: 10px;
    border-radius: 4px;
}

/* --- Estilos para o Painel de Obras --- */
.painel-obras-container { width: 100%; font-family: sans-serif; }
.bairro-group { margin-bottom: 30px; padding: 15px; background-color: #f9f9f9; border-radius: 5px; }
.bairro-title { margin-top: 0; border-bottom: 2px solid #eee; padding-bottom: 10px; }
.solicitacoes-wrapper { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
.solicitacao-card { background-color: #fff; border: 1px solid #ddd; border-radius: 5px; padding: 15px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.solicitacao-card h4 { margin-top: 0; margin-bottom: 10px; font-size: 1.1em; color: #333; }
.solicitacao-card p { margin: 5px 0; font-size: 0.9em; }
.solicitacao-card.status-em_execucao { border-left: 5px solid #dc3545; }
.solicitacao-card.status-agendado { border-left: 5px solid #ffc107; }
.status-tag { display: inline-block; padding: 5px 10px; border-radius: 15px; background-color: #eee; font-weight: bold; font-size: 0.8em !important; }

/* --- Estilos para os Bot���es de A������o --- */
.card-actions { margin-top: 15px; padding-top: 15px; border-top: 1px solid #eee; display: flex; flex-wrap: wrap; gap: 10px; }
.action-button { padding: 6px 12px; font-size: 13px; font-weight: bold; text-decoration: none; color: #333; background-color: #f0f0f0; border: 1px solid #ccc; border-radius: 4px; cursor: pointer; text-align: center; }
.action-button:hover { background-color: #e0e0e0; border-color: #bbb; }
.action-button.whatsapp { background-color: #25D366; border-color: #1DAE51; color: white; }
.action-button.whatsapp:hover { background-color: #1DAE51; }
.action-button.send-to-server { background-color: #007bff; border-color: #0069d9; color: white; }
.action-button.send-to-server:hover { background-color: #0069d9; }

/* --- Estilos para o Modo de Edi������o --- */
.card-edit-mode { background-color: #fdfdfd; }
.form-edit-solicitacao p { margin-bottom: 10px; }
.form-edit-solicitacao label { font-weight: bold; font-size: 13px; display: block; margin-bottom: 4px; }
.form-edit-solicitacao select, .form-edit-solicitacao input { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; }
.action-button.save-edit { background-color: #28a745; border-color: #1e7e34; color: white; }
.action-button.save-edit:hover { background-color: #1e7e34; }

/* --- Estilos para o Modal de Detalhes --- */
#sp-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); display: none; align-items: center; justify-content: center; z-index: 99998; }
#sp-modal.active { display: flex; }
.sp-modal-content { background: #fff; padding: 20px 30px; border-radius: 5px; max-width: 600px; width: 90%; max-height: 80vh; overflow-y: auto; position: relative; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.sp-modal-close { position: absolute; top: 10px; right: 15px; font-size: 28px; font-weight: bold; color: #aaa; background: none; border: none; cursor: pointer; line-height: 1; }
.sp-modal-close:hover { color: #333; }
.sp-modal-title { margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.sp-modal-body img { max-width: 100%; height: auto; border-radius: 4px; cursor: pointer; }

/* --- Estilos para o Lightbox da Imagem --- */
#sp-image-lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); display: none; align-items: center; justify-content: center; z-index: 99999; }
#sp-image-lightbox.active { display: flex; }
.sp-lightbox-image { max-width: 90%; max-height: 90%; object-fit: contain; }
.sp-lightbox-close { position: absolute; top: 20px; right: 30px; font-size: 40px; color: #fff; text-decoration: none; line-height: 1; cursor: pointer; }

/* ... (todo o CSS anterior) ... */

/* --- Estilos para o Modal de Confirmação de Cascata --- */
#sp-cascade-modal .sp-modal-content {
    max-width: 500px;
}
#sp-cascade-modal textarea {
    width: 100%;
    min-height: 80px;
    margin-top: 10px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}
.cascade-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}