/* Modal download — Pesquisa Nacional */
body.relatorio-modal-open {
  overflow: hidden;
}

.relatorio-modal[hidden] {
  display: none !important;
}

.relatorio-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.relatorio-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
}

.relatorio-modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(94vh, 900px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.35);
}

.relatorio-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 3;
  border: none;
  background: rgba(255, 255, 255, 0.88);
  color: #334155;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}

.relatorio-modal-close:hover {
  color: #19224a;
  background: #fff;
}

.relatorio-modal-cover {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px 18px 0 0;
}

.relatorio-modal-form {
  padding: 18px 18px 20px;
}

.relatorio-modal-lead {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.relatorio-field {
  margin-bottom: 12px;
}

.relatorio-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: #19224a;
  font-weight: 600;
}

.relatorio-field input {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #dbe3ef;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 0.95rem;
  color: #19224a;
  background: #fff;
}

.relatorio-field input:focus {
  outline: none;
  border-color: #3b5bdb;
  box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.15);
}

.relatorio-field input.is-invalid {
  border-color: #ef4444;
}

.relatorio-error {
  min-height: 18px;
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: #dc2626;
  text-align: center;
}

.relatorio-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: none;
  border-radius: 10px;
  background: #22c55e;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}

.relatorio-submit:hover:not(:disabled) {
  background: #16a34a;
}

.relatorio-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.relatorio-safe {
  margin: 12px 0 0;
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: center;
}

@media (max-width: 480px) {
  .relatorio-modal {
    padding: 8px;
    align-items: flex-end;
  }

  .relatorio-modal-card {
    width: 100%;
    border-radius: 16px 16px 10px 10px;
  }

  .relatorio-modal-cover {
    border-radius: 16px 16px 0 0;
  }

  .relatorio-field input {
    font-size: 16px;
    min-height: 48px;
  }
}
