/* Consulta de Protocolos — style.css v3.0 */
:root {
  --cp-font: "Lato", "Segoe UI", Arial, sans-serif;
  --cp-primary: #1a3a5c;
  --cp-accent: #c8922a;
  --cp-border: #dde3ec;
  --cp-card: #ffffff;
  --cp-text: #1c2a3a;
  --cp-muted: #6b7a8d;
  --cp-radius: 10px;
  --cp-shadow: 0 2px 18px rgba(26, 58, 92, 0.1);
}

.cp-wrap {
  font-family: var(--cp-font);
  max-width: 700px;
  margin: 0 auto;
  color: var(--cp-text);
}

.cp-card {
  background: var(--cp-card);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  box-shadow: var(--cp-shadow);
  padding: 28px 30px;
  margin-bottom: 20px;
}

/* Cabeçalho */
.cp-titulo {
  margin: 0 0 4px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cp-primary);
  padding-bottom: 14px;
  border-bottom: 2px solid var(--cp-primary);
  letter-spacing: -0.3px;
}
.cp-subtitulo {
  margin: 10px 0 22px;
  font-size: 0.88rem;
  color: var(--cp-muted);
}

/* Campos */
.cp-field {
  margin-bottom: 20px;
}
.cp-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cp-primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

/* Seletor Registro/Certidão */
.cp-tipo-row {
  display: flex;
  gap: 12px;
}
.cp-tipo-opt {
  flex: 1;
  cursor: pointer;
}
.cp-tipo-opt input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cp-tipo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  border: 2px solid var(--cp-border);
  border-radius: 8px;
  background: #f8fafc;
  transition:
    border-color 0.18s,
    background 0.18s,
    box-shadow 0.18s;
  text-align: center;
  user-select: none;
}
.cp-tipo-box strong {
  font-size: 0.95rem;
  color: var(--cp-primary);
}
.cp-tipo-box small {
  font-size: 0.75rem;
  color: var(--cp-muted);
}
.cp-tipo-ico {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 2px;
}

.cp-tipo-opt.is-active .cp-tipo-box,
.cp-tipo-opt:hover .cp-tipo-box {
  border-color: var(--cp-primary);
  background: #eef4fc;
  box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.08);
}
.cp-tipo-opt.is-active:has(input[value="C"]) .cp-tipo-box {
  border-color: var(--cp-accent);
  background: #fdf5e8;
  box-shadow: 0 0 0 3px rgba(200, 146, 42, 0.1);
}

/* Input número */
.cp-input-row {
  display: flex;
  gap: 10px;
}
.cp-input {
  flex: 1;
  border: 1.5px solid var(--cp-border);
  border-radius: 7px;
  padding: 11px 15px;
  font-size: 1rem;
  font-family: "Courier New", monospace;
  letter-spacing: 0.8px;
  color: var(--cp-text);
  background: #f8fafc;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.cp-input:focus {
  border-color: var(--cp-primary);
  box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
  background: #fff;
}

.cp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cp-primary);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 11px 22px;
  font-size: 0.93rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.18s,
    transform 0.1s;
  white-space: nowrap;
}
.cp-btn:hover {
  background: #24527a;
}
.cp-btn:active {
  transform: scale(0.97);
}

.cp-hint {
  display: block;
  margin-top: 7px;
  font-size: 0.77rem;
  color: var(--cp-muted);
}

/* Alertas */
.cp-alerta {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-left: 4px solid transparent;
}
.cp-alerta-ico {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.cp-alerta p {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--cp-muted);
}
.cp-alerta code {
  background: #f0f3f7;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.8rem;
}
.cp-alerta--warn {
  border-left-color: #e6a817;
  background: #fffbf0;
}
.cp-alerta--info {
  border-left-color: #3d7fc1;
  background: #f0f6ff;
}

/* Resultado */
.cp-result-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--cp-border);
}

/* Tags tipo */
.cp-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 5px;
}
.cp-tag--r {
  background: #e0eaf8;
  color: #1a3a7c;
}
.cp-tag--c {
  background: #fdefd0;
  color: #7a4f00;
}

.cp-result-num {
  display: block;
  font-family: "Courier New", monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cp-primary);
  letter-spacing: 1px;
}

/* Badges status */
.cp-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1.5px solid transparent;
}
.status-analise {
  background: #e8f0fb;
  color: #1a4a9c;
  border-color: #a8c0ee;
}
.status-aguardando {
  background: #fff4e0;
  color: #9a6000;
  border-color: #f5c96a;
}
.status-diligencia {
  background: #fdeaea;
  color: #a32020;
  border-color: #f0a0a0;
}
.status-registrado {
  background: #e3f7ec;
  color: #1a6e3c;
  border-color: #7fd3a4;
}
.status-encerrado {
  background: #f0f0f0;
  color: #555;
  border-color: #c5c5c5;
}
.status-devolvido {
  background: #fef3e2;
  color: #8a4f00;
  border-color: #f0c080;
}
.status-retirado {
  background: #eaf4ff;
  color: #1a5c8a;
  border-color: #90c8ee;
}
.status-pronto {
  background: #d6f5e6;
  color: #0e6b36;
  border-color: #5acc90;
}
.status-outro {
  background: #f4f4f4;
  color: #666;
  border-color: #ccc;
}

/* Grid dados */
.cp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin-bottom: 18px;
}
.cp-gi {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cp-gi--full {
  grid-column: 1 / -1;
}
.cp-gi-l {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cp-muted);
  font-weight: 700;
}
.cp-gi-v {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--cp-text);
}

/* Exigências */
.cp-exigs {
  background: #fff8ec;
  border: 1.5px solid #f0c878;
  border-radius: 8px;
  padding: 14px 18px;
}
.cp-exigs-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: #7a4f00;
  margin-bottom: 10px;
}
.cp-exigs-list {
  margin: 0;
  padding-left: 18px;
}
.cp-exigs-list li {
  font-size: 0.9rem;
  color: #5a3a00;
  margin-bottom: 6px;
  line-height: 1.6;
}

.cp-sem-exig {
  background: #eaf7f0;
  border: 1px solid #8ed4b0;
  border-radius: 7px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #1a6e3c;
}

/* Rodapé */
.cp-rodape {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  font-size: 0.76rem;
  color: var(--cp-muted);
  margin-top: 0;
}
.cp-rodape svg {
  opacity: 0.7;
  flex-shrink: 0;
}

/* Responsivo */
@media (max-width: 540px) {
  .cp-card {
    padding: 18px 15px;
  }
  .cp-tipo-row {
    flex-direction: column;
  }
  .cp-input-row {
    flex-direction: column;
  }
  .cp-btn {
    justify-content: center;
  }
  .cp-grid {
    grid-template-columns: 1fr;
  }
  .cp-result-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .cp-result-num {
    font-size: 1.2rem;
  }
}
