.hv517-open{margin-left:8px;white-space:nowrap}
.hv517-modal{border:0;border-radius:18px;padding:0;max-width:min(860px,96vw);width:860px;max-height:92dvh;color:#233347;background:#fff;box-shadow:0 22px 80px #0005}
.hv517-modal::backdrop{background:rgba(11,24,40,.65)}
.hv517-wrap{padding:24px;overflow:auto;max-height:92dvh;font:15px/1.5 system-ui,sans-serif}
.hv517-header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:20px}
.hv517-header span{font-size:11px;font-weight:800;letter-spacing:.1em;color:#628b16}
.hv517-header h3{font-size:23px;margin:5px 0;color:#102f4b}.hv517-header p{color:#657489;margin:0}
.hv517-close{background:#f1f4f7;border:0;border-radius:10px;font-size:23px;padding:3px 12px}
.hv517-fields{display:grid;gap:16px}.hv517-fields label{display:grid;gap:6px;font-weight:650}
.hv517-fields select{font:inherit;border:1px solid #cad4de;border-radius:9px;padding:10px;background:white;min-width:0}
.hv517-fields fieldset{border:1px solid #d8e0e7;border-radius:12px;display:grid;gap:10px;padding:14px}
.hv517-fields legend{font-weight:800}.hv517-fields fieldset label,.hv517-check,.hv517-person{display:flex!important;align-items:center;gap:10px;font-weight:500!important}
.hv517-fields input[type=checkbox],.hv517-fields input[type=radio]{accent-color:#567d13}
#hv517-manual{border:1px solid #dbe3e8;padding:12px;border-radius:12px}
#hv517-manual-members{max-height:180px;overflow:auto;display:grid;gap:8px;padding:8px 0}
.hv517-results{margin-top:17px;border-top:1px solid #e1e5e9;padding-top:12px}
.hv517-results h4{margin:0 0 12px;font-size:17px}
#hv517-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.hv517-metric{border:1px solid #e0e7ec;border-radius:10px;padding:10px;background:#f9fafb;display:grid}
.hv517-metric b{font-size:22px;color:#123650}.hv517-metric small{color:#607284;font-size:12px}
#hv517-sample{margin-top:14px}#hv517-sample p{margin:3px 0;font-size:13px}
.hv517-note{font-size:12px;color:#637381}
#hv517-status{min-height:24px;font-size:13px;color:#27613f}.hv517-error{color:#b02a37!important}
.hv517-footer{display:flex;gap:8px;flex-wrap:wrap;position:sticky;bottom:-24px;background:white;padding:14px 0}
.hv517-footer button{border:1px solid #87a442;background:#eef3e2;color:#1d3e20;border-radius:9px;padding:9px 13px;font:inherit;font-weight:700}
.hv517-footer button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:600px){.hv517-wrap{padding:15px}.hv517-header h3{font-size:19px}#hv517-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.hv517-footer button{flex:1 1 100%}}

/* HV520: restablecer alineación de opciones sin afectar otras interfaces. */
.hv517-modal .hv517-fields fieldset{display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;gap:4px!important}
.hv517-modal .hv517-fields fieldset>label{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;text-align:left!important;width:100%!important;max-width:100%!important;gap:12px!important;margin:0!important;padding:7px 6px!important;white-space:normal!important;font-weight:500!important;}
.hv517-modal .hv517-fields fieldset>label input[type="radio"]{position:static!important;flex:0 0 auto!important;align-self:center!important;margin:0!important;order:0!important;}

/* HV521 · Reconstrucción del layout, aislada al diálogo de audiencias. */
.hv517-modal,.hv517-modal *{box-sizing:border-box!important}
.hv517-modal{
  width:min(880px,calc(100vw - 36px))!important;
  max-width:calc(100vw - 24px)!important;
  max-height:min(92dvh,900px)!important;
  margin:auto!important;
  padding:0!important;
  border:0!important;
  overflow:hidden!important;
  border-radius:18px!important;
}
.hv517-modal .hv517-wrap{
  width:100%!important;
  max-width:100%!important;
  max-height:min(92dvh,900px)!important;
  min-width:0!important;
  padding:22px 24px 14px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.hv517-modal .hv517-header{display:flex!important;align-items:flex-start!important;gap:14px!important;min-width:0!important}
.hv517-modal .hv517-header>div{min-width:0!important;flex:1 1 auto!important}
.hv517-modal .hv517-header h3{line-height:1.2!important;overflow-wrap:anywhere!important}
.hv517-modal .hv517-close{flex:0 0 42px!important;min-width:42px!important;width:42px!important;height:42px!important;padding:0!important}
.hv517-modal .hv517-fields{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:16px!important;min-width:0!important;max-width:100%!important}
.hv517-modal .hv517-fields>label:not(.hv517-check){
 display:grid!important;grid-template-columns:minmax(0,1fr)!important;
 gap:6px!important;min-width:0!important;width:100%!important;max-width:100%!important;
}
.hv517-modal .hv517-fields select{width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important}
.hv517-modal .hv517-fields fieldset{
 display:grid!important;grid-template-columns:minmax(0,1fr)!important;
 gap:6px!important;width:100%!important;min-width:0!important;
 max-width:100%!important; margin:0!important;padding:12px!important;
 overflow:visible!important;
}
.hv517-modal .hv517-fields fieldset>legend{padding:0 6px!important}
.hv517-modal .hv517-fields fieldset>.hv517-choice,
.hv517-modal .hv517-check{
 display:grid!important;
 grid-template-columns:20px minmax(0,1fr)!important;
 align-items:center!important;
 justify-content:stretch!important;
 gap:12px!important;
 min-width:0!important;max-width:100%!important;width:100%!important;
 height:auto!important;min-height:42px!important;
 margin:0!important;padding:9px 11px!important;
 text-align:left!important;
 white-space:normal!important;
 border-radius:9px!important;
}
.hv517-modal .hv517-choice:hover{background:#f3f7eb}
.hv517-modal .hv517-choice:has(input:checked){background:#eef4e3}
.hv517-modal .hv517-choice>span,.hv517-modal .hv517-check>span{
 display:block!important;min-width:0!important;max-width:100%!important;
 width:auto!important;white-space:normal!important;overflow-wrap:break-word!important;
 font-size:15px!important;line-height:1.45!important;text-align:left!important;
}
.hv517-modal .hv517-fields input[type=radio],
.hv517-modal .hv517-fields input[type=checkbox]{
 appearance:auto!important;display:block!important;position:static!important;
 width:18px!important;max-width:18px!important;min-width:18px!important;
 height:18px!important;max-height:18px!important;min-height:18px!important;
 margin:0!important;padding:0!important;flex:0 0 18px!important;
 grid-column:1!important;justify-self:center!important;align-self:center!important;
 border-radius:initial!important;
}
.hv517-modal .hv517-check{border:1px solid #dce5ce!important}
.hv517-modal #hv517-manual{min-width:0!important;max-width:100%!important}
.hv517-modal .hv517-results{min-width:0!important}
.hv517-modal #hv517-metrics{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.hv517-modal .hv517-metric{min-width:0!important}
.hv517-modal .hv517-footer{
 display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:9px!important;
 position:relative!important;bottom:auto!important;
 z-index:2!important;padding:14px 0!important;
 background:#fff!important;border-top:1px solid #dde7d0!important;
 width:100%!important;min-width:0!important;
}
.hv517-modal .hv517-footer>button{
 display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;
 min-height:44px!important;overflow-wrap:anywhere!important;
 white-space:normal!important;margin:0!important;
 text-align:center!important;line-height:1.35!important;
}
.hv517-modal .hv517-footer>button:disabled{
 grid-column:1/-1!important;border-style:dashed!important;
 font-size:13px!important;background:#f6f7f4!important;
}
@media(max-width:650px){
 .hv517-modal{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:94dvh!important}
 .hv517-modal .hv517-wrap{max-height:94dvh!important;padding:16px 14px 10px!important}
 .hv517-modal .hv517-footer{grid-template-columns:1fr!important;bottom:auto!important}
 .hv517-modal #hv517-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* HV619 · owner-only promotion form and compact scrolling audience */
.hv517-modal #hv618-offer{border-top:1px solid #e0e7ec;margin-top:20px;padding-top:16px;gap:12px!important}
.hv517-modal #hv618-offer h4{margin:0;font-size:18px}
.hv517-modal .hv619-price{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:16px;border-radius:14px;background:#f1f5e8;border:1px solid #dae5c7;color:#213451}
.hv517-modal .hv619-price>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.hv517-modal .hv619-price>div+div{border-left:1px solid #d4dfc3;padding-left:14px}
.hv517-modal .hv619-price strong{font-size:26px;font-variant-numeric:tabular-nums;line-height:1.25}
.hv517-modal .hv619-price small,.hv517-modal .hv619-price span,#hv619-floor{font-size:12px;color:#526747;font-weight:600}
.hv517-modal #hv618-value{width:100%;min-width:0;border:1px solid #bdc9d4;border-radius:10px;background:#fff;color:#213451;padding:12px;font:inherit;font-size:18px;font-weight:700}
.hv517-modal #hv517-sample h4{margin:12px 0 8px;font-size:15px}
.hv517-modal .hv619-table-scroll{max-height:235px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;border:1px solid #dce4e9;border-radius:12px}
.hv517-modal .hv619-table{width:100%;min-width:390px;border-collapse:separate;border-spacing:0;font-size:13px;color:#233347;text-align:left}
.hv517-modal .hv619-table th{position:sticky;top:0;z-index:1;background:#edf2e6;color:#354d28;font-weight:700;white-space:nowrap}
.hv517-modal .hv619-table th,.hv517-modal .hv619-table td{padding:9px 10px;border-bottom:1px solid #e7ebef;vertical-align:middle}
.hv517-modal .hv619-table tr:nth-child(even) td{background:#f8fafb}
.hv517-modal .hv619-table th:nth-child(3),.hv517-modal .hv619-table td:nth-child(3){text-align:center;font-variant-numeric:tabular-nums}
.hv517-modal .hv619-table td:nth-child(2){white-space:nowrap;font-variant-numeric:tabular-nums}
.hv517-modal .hv619-person-state{display:inline-block;border-radius:6px;padding:3px 7px;background:#edf0f3;color:#5a6675;font-size:11px;font-weight:650;white-space:nowrap}
.hv517-modal .hv619-person-state.is-eligible{background:#e7f0d8;color:#345b16}
.hv517-modal .hv619-review,.hv517-modal #hv618-send{border:1px solid #809b42;border-radius:10px;padding:12px 16px;min-height:46px;font:inherit;font-weight:750;cursor:pointer}
.hv517-modal .hv619-review{background:#eaf1df;color:#314b19}
.hv517-modal #hv618-send{background:#4e721a;color:#fff}
.hv517-modal .hv619-review:disabled,.hv517-modal #hv618-send:disabled{opacity:.6;cursor:not-allowed;background:#edf0ed;border-color:#cfd8cd;color:#58665b}
.hv517-modal #hv619-send-help{margin:0;font-size:13px;color:#536475}
.hv517-modal #hv618-preview:not(:empty){background:#f6f8f4;border:1px solid #dae4d1;padding:14px;border-radius:12px}
.hv517-modal #hv618-preview pre{background:#fff;border:1px solid #dce4d7;border-radius:10px;padding:14px;font:inherit;line-height:1.55;color:#233347}
.hv517-modal #hv618-preview p{margin:7px 0}
@media(max-width:480px){.hv517-modal .hv619-price strong{font-size:21px}.hv517-modal .hv619-table th,.hv517-modal .hv619-table td{padding:8px}.hv517-modal .hv619-price{padding:12px;gap:8px}}

/* HV620 · live approved template catalogue; isolated to the owner dialog */
.hv517-modal .hv620-catalog{border:1px solid #dce4e7;background:#fff;border-radius:13px;padding:14px;display:grid;gap:10px;min-width:0}
.hv517-modal .hv620-catalog-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.hv517-modal .hv620-catalog-head small{color:#668143;font-weight:750;letter-spacing:.08em;font-size:10px}
.hv517-modal .hv620-catalog-head h4{margin:4px 0 0!important}
.hv517-modal #hv620-refresh{border:1px solid #d2ded0;color:#415d2d;background:#f3f6ee;border-radius:8px;padding:7px 12px;font:inherit;font-weight:650;cursor:pointer}
.hv517-modal #hv620-refresh:disabled{opacity:.5;cursor:wait}
.hv517-modal #hv620-catalog-status{margin:0;font-size:12px;color:#556476;line-height:1.5}
.hv517-modal #hv620-template-detail{min-width:0;overflow-wrap:anywhere}
.hv517-modal #hv620-template-detail:empty{display:none}
.hv517-modal #hv620-template-detail p{margin:6px 0;font-size:13px}
.hv517-modal .hv620-available{color:#426921;font-size:13px}
.hv517-modal .hv620-unavailable{color:#865c28;font-size:13px}
.hv517-modal #hv620-template-detail details{margin:10px 0 5px;border-top:1px solid #e4e8e7;padding-top:8px}
.hv517-modal #hv620-template-detail summary{color:#303563;font-size:13px;cursor:pointer;font-weight:650}
.hv517-modal #hv620-template-detail pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:13px;line-height:1.6;background:#f7f8f5;border-radius:8px;padding:12px;max-height:230px;overflow:auto}
.hv517-modal #hv620-wording[hidden]{display:none!important}
.hv517-modal #hv620-wording-note{margin:0}
