.hergo-public {
  background: #f3f5f7;
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.hergo-public-top {
  background: linear-gradient(90deg, #0b1f30, #102a3d 55%, #16384f);
  color: #faf7f1;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(8, 21, 31, 0.18);
}
.hergo-public-top-inner,
.hergo-public-foot-inner,
.hergo-public-shell,
.hergo-public-autosave,
.hergo-public-copy {
  width: min(1120px, calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}
.hergo-public-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding: 0.55rem 0;
}
.hergo-public-heading {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font-family: var(--sans);
}
.hergo-public-heading p {
  margin: 0 0 0.12rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ead9ad;
}
.hergo-public-heading strong {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
  color: #faf7f1;
  line-height: 1.2;
}
.hergo-public-heading span {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.78rem;
  color: #c5d0d8;
  line-height: 1.3;
}
.hergo-public-folio {
  display: block;
  margin-top: 0.2rem;
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ead9ad;
}
.hergo-public-brand,
.hergo-public-foot-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--sans);
}
.hergo-public-top .hergo-logo,
.hergo-public-foot .hergo-logo { width: 72px; }
.hergo-public-brand strong,
.hergo-public-foot-brand strong {
  display: block;
  letter-spacing: 0.18em;
  font-size: 0.82rem;
}
.hergo-public-brand span,
.hergo-public-foot-brand span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ead9ad;
}
.hergo-public-meta {
  display: grid;
  gap: 0.4rem;
  justify-items: stretch;
  flex: 0 0 auto;
  max-width: 280px;
}
.hergo-public-help {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.38rem 0.7rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(234, 217, 173, 0.28);
  color: #ead9ad;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.25;
}
.hergo-public-help-ico {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25d366;
  color: #fff;
  flex: 0 0 auto;
}
.hergo-public-help span { min-width: 0; }
.hergo-public-help strong {
  display: block;
  color: #faf7f1;
  font-size: 0.78rem;
}

.hergo-public-shell {
  flex: 1;
  padding: 1.6rem 0 1.4rem;
}

.hergo-pf-status {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 1.4fr) minmax(140px, 0.55fr);
  gap: 1.1rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.15rem;
  box-shadow: var(--shadow-sm);
}
.hergo-pf-who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hergo-pf-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef3f7;
  color: var(--navy);
  flex: 0 0 auto;
}
.hergo-pf-who .hergo-kicker { margin: 0; }
.hergo-pf-who strong {
  display: block;
  font-family: var(--sans);
  font-size: 1.02rem;
  color: var(--title);
}
.hergo-pf-who span {
  display: block;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
}
.hergo-pf-meter .hergo-kicker { margin: 0 0 0.35rem; }
.hergo-pf-meter .hergo-progress { height: 8px; }
.hergo-pf-meter .hergo-progress span {
  background: linear-gradient(90deg, #c4a35a, #d4b56c);
}
.hergo-pf-meter .hergo-progress-row { margin: 0; }
.hergo-pf-meter .hergo-progress-label {
  font-size: 1rem;
  min-width: 3rem;
  color: var(--navy);
}
.hergo-pf-state { text-align: right; }
.hergo-pf-state .hergo-kicker { margin: 0 0 0.4rem; }
.hergo-pf-state .hergo-badge {
  background: #f4ead4;
  color: #7a5c1e;
  border: 1px solid rgba(196, 163, 90, 0.35);
  font-weight: 700;
}
.hergo-pf-state .hergo-badge.is-done {
  background: #e4efe8;
  color: var(--ok);
  border-color: transparent;
}

.hergo-pf-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
}
.hergo-pf-aside { display: grid; gap: 0.85rem; }
.hergo-steps {
  display: grid;
  gap: 0.28rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem;
  box-shadow: var(--shadow-sm);
}
.hergo-steps a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 650;
  color: #5c6a75;
  padding: 0.62rem 0.7rem;
  border-radius: 10px;
}
.hergo-steps a:hover { background: #f6f8fa; color: var(--navy); }
.hergo-steps a.is-current {
  background: #f4ead4;
  color: var(--navy);
}
.hergo-steps a.is-done { color: #1b6a45; }
.hergo-step-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #eef2f5;
  color: #7a8792;
}
.hergo-steps a.is-current .hergo-step-mark {
  background: var(--navy);
  color: #faf7f1;
}
.hergo-steps a.is-done .hergo-step-mark {
  background: #1f8a55;
  color: #fff;
}
.hergo-pf-shield {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  box-shadow: var(--shadow-sm);
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
}
.hergo-pf-shield .hergo-ico { color: var(--gold-deep); flex: 0 0 auto; margin-top: 0.1rem; }
.hergo-pf-shield strong {
  display: block;
  color: var(--title);
  margin-bottom: 0.15rem;
}

.hergo-section-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.35rem 1.35rem 1.2rem;
  margin-bottom: 0.95rem;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.hergo-section-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.hergo-section-head-ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f4ead4;
  color: var(--navy);
  flex: 0 0 auto;
}
.hergo-section-head h2 { margin: 0 0 0.15rem; font-size: 1.28rem; }
.hergo-section-head p { margin: 0; font-family: var(--sans); color: var(--muted); }
.hergo-section-card h3 {
  margin: 1.2rem 0 0.5rem;
  font-size: 1rem;
}
.hergo-pf-note,
.hergo-pf-tip,
.hergo-lock-banner {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  font-family: var(--sans);
  margin-bottom: 1.05rem;
}
.hergo-pf-note,
.hergo-pf-tip {
  background: #eef6fb;
  border: 1px solid #d5e7f3;
  color: #24506b;
}
.hergo-pf-note p,
.hergo-pf-tip p,
.hergo-lock-banner p { margin: 0.15rem 0 0; }
.hergo-pf-note .hergo-ico,
.hergo-pf-tip .hergo-ico { flex: 0 0 auto; margin-top: 0.12rem; }
.hergo-pf-tip { margin: 1.15rem 0 0; }
.hergo-pf-tip strong { color: var(--navy); }
.hergo-lock-banner {
  background: #ececec;
  border: 1px solid #ddd;
  color: #3d4a54;
}
.hergo-pf-notice {
  margin-bottom: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-family: var(--sans);
  color: var(--muted);
}

.hergo-public .hergo-field { margin: 0 0 0.95rem; }
.hergo-public .hergo-field label { text-transform: none; letter-spacing: 0; font-size: 0.86rem; color: #3d4d5a; }
.hergo-public input,
.hergo-public select,
.hergo-public textarea {
  border-color: #d7dde3;
  background: #fbfcfd;
}
.hergo-public input:focus,
.hergo-public select:focus,
.hergo-public textarea:focus {
  border-color: #1a4560;
  background: #fff;
}
.hergo-input-search { position: relative; }
.hergo-input-search input { padding-right: 2.4rem; }
.hergo-input-search .hergo-ico {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #7a8792;
  pointer-events: none;
}

.hergo-pf-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 0.35rem;
}
.hergo-pf-actions .hergo-btn { min-width: 148px; }
.hergo-pf-cierre {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
}
.hergo-pf-cierre .hergo-btn { min-width: 180px; }
.hergo-finish { margin: 0.2rem 0 0; }
.hergo-finish .hergo-btn { width: 100%; }

.hergo-firma-pad {
  width: 100%;
  max-width: 100%;
  height: 180px;
  border: 1px dashed #c9c1b3;
  background: #fff;
  touch-action: none;
  border-radius: 10px;
}
.hergo-firma-preview {
  margin: 0 0 1rem;
  padding: 0.85rem 0.95rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.hergo-firma-preview img {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  background: #fff;
  border-radius: 8px;
}
.hergo-firma-preview figcaption {
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  color: var(--muted, #5c6b75);
}
.hergo-terminos {
  margin: 1rem 0 1.15rem;
}
.hergo-pf-note-warn {
  background: #fff6e8;
  border-color: #ead2a8;
  color: #6a4a12;
}
.hergo-finish-hint {
  margin: 0;
  text-align: right;
}
.hergo-check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}
.hergo-check label { font-weight: 400; line-height: 1.35; text-transform: none; letter-spacing: 0; }
.hergo-check input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.15rem;
  flex: 0 0 auto;
}
.hergo-lista-anexos {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.hergo-lista-anexos li {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 0.6rem 0;
}
.hergo-lista-anexos li:first-child { border-top: 0; }
.hergo-lista-anexos form { margin: 0; }
.hergo-lista-anexos .hergo-btn { width: auto; }
.hergo-docs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin: 0.2rem 0 1rem;
}
.hergo-doc {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 0.95rem 0.85rem;
  background: #fff;
}
.hergo-doc p { margin: 0 0 0.35rem; }
.hergo-doc form { margin: 0.45rem 0; display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.hergo-doc .hergo-btn { width: auto; }
.hergo-docs .hergo-doc-drop {
  grid-template-columns: 1fr;
}
.hergo-doc-drop {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0.45rem 0;
  padding: 0.85rem 0.95rem;
  border: 1.5px dashed #c9c1b3;
  border-radius: 12px;
  background: #faf8f4;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.hergo-doc-drop input[type="file"] { min-width: 0; }
.hergo-doc-drop-hint {
  color: var(--muted);
  font-size: 0.86rem;
  font-family: var(--sans);
}
.hergo-doc-drop.is-over {
  border-color: var(--gold-deep, #b8922a);
  background: #fff8e8;
  box-shadow: inset 0 0 0 1px var(--gold-deep, #b8922a);
}
.hergo-doc-drop.is-busy,
#form-documentos.is-busy {
  opacity: 0.72;
  pointer-events: none;
}
.hergo-doc-del { display: none; }

.hergo-public-autosave {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #eef6fb;
  border: 1px solid #d5e7f3;
  border-radius: 10px;
  padding: 0.75rem 0.95rem;
  margin-bottom: 1.2rem;
  font-family: var(--sans);
  color: #24506b;
  font-size: 0.9rem;
}
.hergo-public-autosave p { margin: 0; }
.hergo-public-autosave .hergo-ico { flex: 0 0 auto; color: #1a4560; }

.hergo-public-foot {
  background: #0b1f30;
  color: #e8eef3;
  padding: 1.4rem 0 1.1rem;
  margin-top: auto;
}
.hergo-public-foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.hergo-public-foot-help {
  text-align: right;
  font-family: var(--sans);
  font-size: 0.86rem;
}
.hergo-public-foot-help span { color: #ead9ad; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.hergo-public-foot-help p {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  margin: 0.25rem 0 0;
}
.hergo-public-copy {
  margin: 1rem auto 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: #93a4b3;
}

.hergo-pf-simple { max-width: 560px; margin: 1.4rem auto 0; }
.hergo-pf-simple .hergo-section-card { text-align: left; }
.hergo-pf-simple .hergo-btn { margin-top: 0.6rem; }

@media (max-width: 860px) {
  .hergo-pf-status,
  .hergo-pf-layout,
  .hergo-public-foot-inner { grid-template-columns: 1fr; display: grid; }
  .hergo-pf-state { text-align: left; }
  .hergo-steps {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding: 0.55rem;
    -webkit-overflow-scrolling: touch;
  }
  .hergo-steps a { flex: 0 0 auto; white-space: nowrap; }
  .hergo-public-top-inner { flex-wrap: wrap; }
  .hergo-public-heading { flex: 1 1 180px; }
  .hergo-public-brand > div { display: none; }
  .hergo-public-meta { max-width: none; flex: 1 1 100%; }
  .hergo-pf-shield { display: none; }
  .hergo-public-foot-help { text-align: left; }
  .hergo-public-foot-help p { justify-content: flex-start; }
}
.hergo-consulta { max-width: 920px; margin: 0 auto; }
.hergo-consulta-lista { margin: 0 0 1rem 1.1rem; padding: 0; }
.hergo-consulta-lista li { margin: 0.25rem 0; }
.hergo-consulta-firma {
  max-width: 240px;
  max-height: 90px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.35rem;
}

@media (max-width: 640px) {
  .hergo-public-top-inner,
  .hergo-public-foot-inner,
  .hergo-public-shell,
  .hergo-public-autosave,
  .hergo-public-copy { width: min(1120px, calc(100% - 1.3rem)); }
  .hergo-section-card { padding: 1.05rem 0.95rem 1rem; }
  .hergo-pf-actions { flex-direction: column-reverse; }
  .hergo-pf-actions .hergo-btn,
  .hergo-pf-cierre .hergo-btn { width: 100%; }
  .hergo-pf-cierre { justify-content: stretch; }
  .hergo-docs { grid-template-columns: 1fr; }
  .hergo-doc-drop { grid-template-columns: 1fr; }
  .hergo-grid-2 { grid-template-columns: 1fr; }
}
