/* Container */
.opv-wrapper {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: #222;
}

/* Busca */
.opv-search {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.opv-search-form {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 560px;
}

.opv-search-input {
  flex: 1 1 auto;
  padding: 12px 14px;
  border: 1px solid #d8dde3;
  border-radius: 10px;
  outline: none;
  font-size: 16px;
}

.opv-search-input:focus {
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0,115,170,.15);
}

/* Botões */
.opv-btn {
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  transition: transform .04s ease, opacity .2s ease, box-shadow .2s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

.opv-btn:hover { opacity: .95; }
.opv-btn:active { transform: translateY(1px); }

.opv-btn-print {
  background: #1b7d2f;
}

/* Seções/containers */
.opv-section {
  background: #fff;
  border: 1px solid #eef2f6;
  border-radius: 14px;
  padding: 18px;
  margin: 18px 0;
  box-shadow: 0 4px 22px rgba(0,0,0,.06);
}

.opv-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.opv-section-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0e3c57;
}

.opv-date {
  font-size: 13px;
  color: #5a6b7a;
}

/* ====== NOVO LAYOUT EM 3 CARDS ====== */
.opv-section-header--stack .opv-header-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.opv-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.opv-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8f3ff;
  color: #0b4580;
  border: 1px solid #cfeaff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.opv-badge--muted {
  background: #f2f6f9;
  color: #485a68;
  border-color: #e2e9ef;
}

/* Card container */
.opv-card {
  background: #f9fbfd;
  border: 1px solid #e7edf3;
  border-radius: 14px;
  padding: 14px;
}

/* Linhas em bloco (usado para Manifestação e Resposta) */
.opv-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.opv-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  padding: 12px;
}

.opv-row--long .opv-item-value {
  white-space: pre-wrap;
}

/* Grade 2 colunas (usado para Dados Pessoais) */
.opv-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.opv-cell {
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Tipografia */
.opv-item-label {
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #5b6b7a;
}

.opv-item-value {
  font-size: 16px;
  color: #132433;
  line-height: 1.45;
  word-wrap: break-word;
}

/* Alerts */
.opv-alert {
  background: #fff5d6;
  border: 1px solid #ffe39a;
  color: #7a5d00;
  padding: 12px 14px;
  border-radius: 12px;
  margin-top: 12px;
}

.opv-alert-warn {
  background: #f6fbff;
  border-color: #cfeaff;
  color: #0b4580;
}

.opv-alert-error {
  background: #ffefef;
  border-color: #ffd2d2;
  color: #7f1d1d;
}

/* Ações */
.opv-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

/* Responsivo */
@media (max-width: 780px) {
  .opv-row {
    grid-template-columns: 1fr;
  }
  .opv-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ===== Impressão ===== */
@media print {
  body * { visibility: hidden; }
  #opv-print-area, #opv-print-area * { visibility: visible; }
  #opv-print-area { position: absolute; left: 0; top: 0; width: 100%; }
  .opv-section { break-inside: avoid; page-break-inside: avoid; }
  .opv-actions, .opv-search { display: none !important; }
}
