/* Consulta Pública — Página independente (sem login)
   Tema luminoso com identidade Indigo/Roxo */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap");

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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 30%, #e0e7ff 60%, #f5f3ff 100%);
    min-height: 100vh;
    color: #1e1b4b;
}

.cp-container { max-width: 700px; margin: 0 auto; padding: 40px 20px; min-height: 100vh; display: flex; flex-direction: column; }
.cp-logo-link { text-decoration: none; display: inline-block; }

.cp-header { text-align: center; margin-bottom: 30px; }
.cp-logo { width: 56px; height: 56px; margin-bottom: 12px; filter: drop-shadow(0 4px 12px rgba(67, 56, 202, 0.15)); }
.cp-title { font-family: 'Poppins', sans-serif; font-size: 28px; font-weight: 700; color: #1e1b4b; letter-spacing: -0.5px; }
.cp-subtitle { font-size: 14px; color: #64748b; margin-top: 4px; }

.cp-main { flex: 1; }

.cp-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(67, 56, 202, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}
.cp-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cp-card-header i { font-size: 24px; color: #6366f1; }
.cp-card-header h2 { font-family: 'Poppins', sans-serif; font-size: 20px; font-weight: 600; color: #1e1b4b; }
.cp-desc { font-size: 14px; color: #64748b; line-height: 1.6; margin-bottom: 24px; }

.cp-form { display: flex; flex-direction: column; gap: 16px; }
.cp-input-group label { display: block; font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 6px; }
.cp-input-wrapper {
    display: flex; align-items: center;
    background: rgba(245, 243, 255, 0.7);
    border: 1.5px solid rgba(99, 102, 241, 0.18);
    border-radius: 10px; padding: 0 14px; transition: all 0.25s;
}
.cp-input-wrapper:focus-within {
    border-color: #6366f1;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12), 0 2px 8px rgba(99, 102, 241, 0.06);
}
.cp-input-wrapper i { color: #a78bfa; font-size: 16px; margin-right: 10px; }
.cp-input-wrapper input {
    flex: 1; background: none; border: none; color: #1e1b4b;
    font-size: 16px; padding: 14px 0; outline: none;
    font-family: 'Courier New', monospace; letter-spacing: 1px;
}
.cp-input-wrapper input::placeholder { color: rgba(100, 116, 139, 0.5); font-family: inherit; letter-spacing: normal; }

.cp-btn {
    background: linear-gradient(135deg, #6366f1, #4338ca);
    color: white; border: none; border-radius: 10px; padding: 14px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    transition: all 0.25s; display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 14px rgba(67, 56, 202, 0.25);
}
.cp-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35); }
.cp-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.cp-erro {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px; padding: 14px 18px; margin-top: 20px;
    color: #dc2626; font-size: 14px;
}

.cp-resultado { margin-top: 24px; }
.cp-res-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}
.cp-res-code { font-size: 20px; font-weight: 700; color: #4338ca; font-family: monospace; letter-spacing: 1px; }
.cp-res-status { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; color: white; display: inline-flex; align-items: center; gap: 6px; }
.cp-res-tipo, .cp-res-assunto, .cp-res-data, .cp-res-prazo { font-size: 14px; color: #64748b; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.cp-res-tipo i, .cp-res-assunto i, .cp-res-data i, .cp-res-prazo i { width: 16px; text-align: center; color: #a78bfa; }

.cp-res-progresso { margin: 16px 0; }
.cp-res-progresso-label { font-size: 13px; color: #64748b; margin-bottom: 6px; }
.cp-res-progresso-bar { height: 8px; background: rgba(99, 102, 241, 0.1); border-radius: 4px; overflow: hidden; }
.cp-res-progresso-fill { height: 100%; background: linear-gradient(90deg, #6366f1, #a78bfa); border-radius: 4px; transition: width 0.5s ease; }

.cp-res-timeline { margin-top: 20px; }
.cp-res-timeline h3 { font-family: 'Poppins', sans-serif; font-size: 15px; color: #312e81; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.cp-tl-node { display: flex; gap: 14px; padding-left: 12px; margin-bottom: 2px; position: relative; }
.cp-tl-node::before { content: ""; position: absolute; left: 17px; top: 24px; bottom: -2px; width: 2px; background: rgba(99, 102, 241, 0.12); }
.cp-tl-node:last-child::before { display: none; }
.cp-tl-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.cp-tl-done .cp-tl-dot { background: #10b981; }
.cp-tl-active .cp-tl-dot { background: #6366f1; box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); animation: pulse-dot 2s infinite; }
.cp-tl-pending .cp-tl-dot { background: #cbd5e1; }
@keyframes pulse-dot { 0%,100% { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); } 50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.06); } }

.cp-tl-content { padding-bottom: 16px; }
.cp-tl-dept { font-size: 14px; font-weight: 600; color: #1e1b4b; }
.cp-tl-accao { font-size: 12px; color: #64748b; }
.cp-tl-data { font-size: 11px; color: #94a3b8; margin-top: 2px; }

.cp-res-despacho { margin-top: 16px; padding: 14px; border-radius: 10px; border: 2px solid; background: rgba(245, 243, 255, 0.5); font-size: 14px; }

.cp-footer { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(99, 102, 241, 0.1); }
.cp-footer p { font-size: 12px; color: #94a3b8; }
.cp-footer-link { margin-top: 4px; }
.cp-footer-link a { color: #6366f1; text-decoration: none; font-weight: 500; }
.cp-footer-link a:hover { color: #4338ca; }

/* Services grid */
.cp-services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 20px; }
.cp-service-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 14px; padding: 24px 20px; cursor: pointer;
    transition: all 0.25s; text-align: center;
    box-shadow: 0 2px 8px rgba(67, 56, 202, 0.04);
}
.cp-service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 12px 32px rgba(67, 56, 202, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
}
.cp-service-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin: 0 auto 14px; }
.cp-service-card h3 { font-family: 'Poppins', sans-serif; font-size: 15px; font-weight: 600; color: #1e1b4b; margin-bottom: 6px; }
.cp-service-card p { font-size: 12px; color: #64748b; line-height: 1.5; }

.cp-section { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.cp-back-btn {
    background: rgba(99, 102, 241, 0.08); border: none; color: #6366f1; width: 32px; height: 32px;
    border-radius: 8px; cursor: pointer; font-size: 14px; transition: all 0.2s; margin-left: auto;
}
.cp-back-btn:hover { background: rgba(99, 102, 241, 0.15); color: #4338ca; }

/* Tipos de serviço */
.cp-tipos-list { display: flex; flex-direction: column; gap: 10px; }
.cp-tipo-item {
    display: flex; align-items: flex-start; gap: 14px; padding: 14px;
    border-radius: 10px; background: rgba(245, 243, 255, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.08);
}
.cp-tipo-icon {
    width: 36px; height: 36px; border-radius: 8px;
    background: rgba(99, 102, 241, 0.1); color: #6366f1;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}
.cp-tipo-item h4 { font-size: 14px; color: #1e1b4b; margin-bottom: 2px; }
.cp-tipo-item p { font-size: 12px; color: #64748b; }

/* Requisitos */
.cp-requisitos { display: flex; flex-direction: column; gap: 16px; }
.cp-req-group {
    padding: 14px; border-radius: 10px;
    background: rgba(245, 243, 255, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.08);
}
.cp-req-group h4 { font-size: 14px; color: #1e1b4b; margin-bottom: 8px; }
.cp-req-group h4 i { margin-right: 6px; color: #6366f1; }
.cp-req-group ul { list-style: none; padding: 0; }
.cp-req-group li { font-size: 12px; color: #64748b; padding: 3px 0 3px 18px; position: relative; }
.cp-req-group li::before { content: "\2713"; position: absolute; left: 0; color: #10b981; font-weight: bold; }

/* Contactos */
.cp-contactos { display: flex; flex-direction: column; gap: 14px; }
.cp-contacto-item {
    display: flex; gap: 14px; padding: 14px;
    border-radius: 10px; background: rgba(245, 243, 255, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.08);
}
.cp-contacto-item > i { font-size: 20px; color: #6366f1; width: 24px; text-align: center; margin-top: 2px; }
.cp-contacto-item h4 { font-size: 14px; color: #1e1b4b; margin-bottom: 2px; }
.cp-contacto-item p { font-size: 12px; color: #64748b; line-height: 1.5; }

.cp-res-info { font-size: 14px; color: #64748b; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.cp-res-info i { width: 16px; text-align: center; color: #a78bfa; }

/* ─── Layout 2 colunas ─── */
.cp-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .cp-row-2 { grid-template-columns: 1fr; } }

/* ─── Searchable Select (público) ─── */
.cp-searchable-wrap { position: relative; }
.cp-searchable-input { background: transparent; border: none; outline: none; width: 100%; color: #1e1b4b; font-size: 14px; padding: 0; }
.cp-searchable-arrow { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 0.7rem; pointer-events: none; }
.cp-searchable-dropdown { position: absolute; top: 100%; left: 0; right: 0; max-height: 220px; overflow-y: auto; background: #fff; border: 1px solid rgba(99,102,241,0.15); border-radius: 0 0 10px 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.1); z-index: 50; }
.cp-ss-item { padding: 10px 14px; font-size: 13px; cursor: pointer; transition: background 0.1s; }
.cp-ss-item:hover { background: rgba(99,102,241,0.08); color: #4338ca; }
.cp-ss-empty { padding: 12px; text-align: center; color: #94a3b8; font-size: 13px; }

/* ─── Upload de Anexos (público) ─── */
.cp-upload-area { border: 2px dashed rgba(99,102,241,0.2); border-radius: 10px; padding: 18px; text-align: center; cursor: pointer; transition: all 0.2s; }
.cp-upload-area:hover { border-color: #818cf8; background: rgba(99,102,241,0.03); }
.cp-upload-area i { font-size: 1.5rem; color: #818cf8; display: block; margin-bottom: 6px; }
.cp-upload-area p { font-size: 13px; color: #475569; margin-bottom: 2px; }
.cp-upload-area span { font-size: 11px; color: #94a3b8; }
.cp-anexos-lista { margin-top: 8px; }
.cp-anexo-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: rgba(99,102,241,0.04); border-radius: 8px; margin-bottom: 4px; font-size: 13px; }
.cp-anexo-item i { color: #6366f1; }
.cp-anexo-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-anexo-size { color: #94a3b8; font-size: 11px; flex-shrink: 0; }
.cp-anexo-rm { background: none; border: none; color: #ef4444; cursor: pointer; padding: 2px 6px; border-radius: 4px; font-size: 12px; }
.cp-anexo-rm:hover { background: rgba(239,68,68,0.1); }
.cp-anexo-add { text-align: center; padding: 6px; color: #6366f1; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px dashed rgba(99,102,241,0.2); border-radius: 6px; margin-top: 4px; }
.cp-anexo-add:hover { background: rgba(99,102,241,0.04); }

/* ─── Submeter Processo ─── */
.cp-btn-green { background: linear-gradient(135deg, #10b981, #059669); }
.cp-btn-green:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(16,185,129,0.3); }
.cp-textarea { width: 100%; padding: 10px 14px; border: 1px solid rgba(99,102,241,0.15); border-radius: 10px; background: rgba(255,255,255,0.6); color: #1e1b4b; font-size: 14px; font-family: inherit; resize: vertical; outline: none; }
.cp-textarea:focus { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.cp-file-input { width: 100%; padding: 8px; border: 2px dashed rgba(99,102,241,0.2); border-radius: 10px; font-size: 13px; color: #64748b; cursor: pointer; }
.cp-file-input:hover { border-color: #818cf8; }

/* ─── Meus Processos ─── */
.cp-meu-card { background: rgba(255,255,255,0.7); border: 1px solid rgba(99,102,241,0.1); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.cp-meu-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.cp-meu-codigo { font-family: 'Courier New', monospace; font-weight: 700; font-size: 0.85rem; color: #4338ca; display: flex; align-items: center; gap: 6px; }
.cp-meu-assunto { font-size: 0.85rem; color: #334155; margin-bottom: 4px; }
.cp-meu-info { font-size: 0.78rem; color: #64748b; margin-bottom: 4px; }
.cp-meu-info i { width: 14px; text-align: center; margin-right: 4px; }
.cp-meu-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(99,102,241,0.08); }

@media (max-width: 640px) {
    .cp-container { padding: 20px 12px; }
    .cp-card { padding: 20px; }
    .cp-services { grid-template-columns: 1fr; }
    .cp-res-header { flex-direction: column; align-items: flex-start; }
}
