/* HDI V5.13 - usuarios, encuestas y portal */

/* ============================================================
   1. ACTUALIZAR REGISTROS - tamaño real y responsive
   ============================================================ */
#modalGnpUsuario .modal-gnp-users-custom{
  width:min(980px,calc(100vw - 28px))!important;
  max-width:980px!important;
  margin:14px auto!important;
}
#modalGnpUsuario .modal-content{
  width:100%!important;
  max-height:calc(100dvh - 28px)!important;
  overflow:hidden!important;
  border-radius:18px!important;
}
#modalGnpUsuario .gnp-users-modal-body{
  max-height:calc(100dvh - 102px)!important;
  overflow:auto!important;
  padding:18px!important;
}
#modalGnpUsuario .gnp-users-panel{
  padding:18px!important;
}
#modalGnpUsuario .gnp-users-control{
  min-height:46px!important;
  font-size:.88rem!important;
}
#modalGnpUsuario .gnp-users-multi{
  min-height:132px!important;
  padding:8px 10px!important;
}
#modalGnpUsuario .gnp-users-btn-submit{
  min-height:48px!important;
  border-radius:12px!important;
  font-weight:900!important;
}
#modalGnpUsuario .gnp-users-modal-header{
  padding:16px 20px!important;
}

@media(max-width:767px){
  #modalGnpUsuario .modal-gnp-users-custom{
    width:calc(100vw - 10px)!important;
    max-width:calc(100vw - 10px)!important;
    margin:5px auto!important;
  }
  #modalGnpUsuario .modal-content{
    max-height:calc(100dvh - 10px)!important;
    border-radius:14px!important;
  }
  #modalGnpUsuario .gnp-users-modal-body{
    max-height:calc(100dvh - 82px)!important;
    padding:10px!important;
  }
  #modalGnpUsuario .gnp-users-panel{
    padding:14px!important;
  }
  #modalGnpUsuario .gnp-users-panel-header{
    margin:-14px -14px 14px!important;
  }
}

/* ============================================================
   2. ENCUESTAS - Descargar respuestas activo
   ============================================================ */
.pt-survey-head-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:9px!important;
  flex-wrap:wrap!important;
}
#btnDownloadSurveyResponses{
  min-height:40px!important;
  padding:0 15px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  border:1px solid #006a34!important;
  border-radius:10px!important;
  background:#006a34!important;
  color:#fff!important;
  text-decoration:none!important;
  font-size:.76rem!important;
  font-weight:900!important;
  box-shadow:0 8px 18px rgba(0,106,52,.14)!important;
}
#btnDownloadSurveyResponses i,
#btnDownloadSurveyResponses span{
  color:#fff!important;
}
#btnDownloadSurveyResponses:hover,
#btnDownloadSurveyResponses:focus{
  background:#54a264!important;
  border-color:#54a264!important;
  color:#fff!important;
  text-decoration:none!important;
}
@media(max-width:700px){
  .pt-surveys-card>.d-flex.justify-content-between{
    align-items:stretch!important;
    flex-direction:column!important;
    gap:10px!important;
  }
  .pt-survey-head-actions{
    width:100%!important;
    justify-content:stretch!important;
  }
  .pt-survey-head-actions>*{
    flex:1 1 150px!important;
  }
}

/* ============================================================
   3. PORTAL - icono blanco sobre fondo verde
   ============================================================ */
body.pdd-portal-ui .pdd-process-icon,
body.pdd-portal-ui .pdd-process-card__icon,
body.pdd-portal-ui .pt-v627-mobile-action-icon{
  background:#006a34!important;
  background-color:#006a34!important;
  color:#fff!important;
  border-color:#006a34!important;
  box-shadow:0 9px 20px rgba(0,106,52,.18)!important;
}
body.pdd-portal-ui .pdd-process-icon i,
body.pdd-portal-ui .pdd-process-card__icon i,
body.pdd-portal-ui .pt-v627-mobile-action-icon i{
  color:#fff!important;
  fill:currentColor!important;
  opacity:1!important;
}

/* ============================================================
   4. FORMATOS HDI: un botón dentro de Carga tus documentos.
   No cinco ventanas ocupando la pantalla.
   ============================================================ */
.hdi-v513-format-toolbar{
  margin:14px 0 18px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
}
.hdi-v513-format-button{
  min-height:46px!important;
  padding:0 17px!important;
  border:0!important;
  border-radius:12px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  background:#006a34!important;
  color:#fff!important;
  font-size:.78rem!important;
  font-weight:900!important;
  cursor:pointer!important;
  box-shadow:0 9px 20px rgba(0,106,52,.17)!important;
}
.hdi-v513-format-button i,
.hdi-v513-format-button span{
  color:#fff!important;
}
.hdi-v513-format-button:hover,
.hdi-v513-format-button:focus{
  background:#54a264!important;
  color:#fff!important;
}

.hdi-v513-formats-modal[hidden]{
  display:none!important;
}
.hdi-v513-formats-modal{
  position:fixed!important;
  inset:0!important;
  z-index:3300!important;
  padding:18px!important;
  display:none!important;
  align-items:center!important;
  justify-content:center!important;
  background:rgba(5,42,28,.55)!important;
  backdrop-filter:blur(3px)!important;
}
.hdi-v513-formats-modal.is-open{
  display:flex!important;
}
.hdi-v513-format-lock{
  overflow:hidden!important;
}
.hdi-v513-formats-dialog{
  width:min(780px,calc(100vw - 36px))!important;
  max-height:calc(100dvh - 36px)!important;
  overflow:auto!important;
  border:1px solid #b8d8bf!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 30px 80px rgba(0,46,28,.32)!important;
}
.hdi-v513-formats-head{
  position:sticky!important;
  top:0!important;
  z-index:2!important;
  padding:16px 18px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  background:linear-gradient(110deg,#006a34,#54a264)!important;
  color:#fff!important;
}
.hdi-v513-formats-head h3{
  margin:0!important;
  color:#fff!important;
  font-size:1rem!important;
  font-weight:950!important;
}
.hdi-v513-formats-head p{
  margin:3px 0 0!important;
  color:rgba(255,255,255,.82)!important;
  font-size:.72rem!important;
}
.hdi-v513-formats-close{
  width:38px!important;
  height:38px!important;
  flex:0 0 38px!important;
  border:1px solid rgba(255,255,255,.28)!important;
  border-radius:10px!important;
  display:grid!important;
  place-items:center!important;
  background:rgba(255,255,255,.14)!important;
  color:#fff!important;
  cursor:pointer!important;
}
.hdi-v513-formats-close i{color:#fff!important}
.hdi-v513-formats-list{
  padding:14px!important;
  display:grid!important;
  gap:9px!important;
}
.hdi-v513-format-row{
  padding:12px!important;
  border:1px solid #d8e8dc!important;
  border-radius:12px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:12px!important;
  background:#fbfefc!important;
}
.hdi-v513-format-row-copy strong{
  display:block!important;
  color:#183b2b!important;
  font-size:.81rem!important;
  font-weight:900!important;
}
.hdi-v513-format-row-copy small{
  display:block!important;
  margin-top:3px!important;
  color:#6b7d73!important;
  font-size:.69rem!important;
  line-height:1.35!important;
}
.hdi-v513-format-row-actions{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
}
.hdi-v513-format-action{
  min-height:36px!important;
  padding:0 10px!important;
  border-radius:9px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  text-decoration:none!important;
  font-size:.69rem!important;
  font-weight:900!important;
}
.hdi-v513-format-action.is-view{
  border:1px solid #006a34!important;
  background:#006a34!important;
  color:#fff!important;
}
.hdi-v513-format-action.is-download{
  border:1px solid #54a264!important;
  background:#fff!important;
  color:#006a34!important;
}
.hdi-v513-format-action.is-view i{color:#fff!important}
.hdi-v513-format-action.is-download i{color:#006a34!important}

@media(max-width:700px){
  .hdi-v513-format-toolbar{
    margin:12px 0 16px!important;
  }
  .hdi-v513-format-button{
    width:100%!important;
    min-height:50px!important;
  }
  .hdi-v513-formats-modal{
    padding:0!important;
    align-items:flex-end!important;
  }
  .hdi-v513-formats-dialog{
    width:100vw!important;
    max-width:100vw!important;
    max-height:84dvh!important;
    border-radius:18px 18px 0 0!important;
    border-bottom:0!important;
  }
  .hdi-v513-formats-head{
    padding:14px 15px!important;
  }
  .hdi-v513-formats-list{
    padding:10px!important;
  }
  .hdi-v513-format-row{
    grid-template-columns:1fr!important;
    gap:9px!important;
  }
  .hdi-v513-format-row-actions{
    width:100%!important;
  }
  .hdi-v513-format-action{
    flex:1 1 0!important;
    min-height:40px!important;
  }
}
