/* HDI_V5_3_FULL_CONSOLIDACION_CSS_START
   Capa FINAL HDI. Debe cargarse al final de los estilos internos.
   No altera contratos, IDs, names, payloads ni base de datos.
*/
:root{
  --hdi-v53-green:#006a34;
  --hdi-v53-red:#ec1c24;
  --hdi-v53-mid:#54a264;
  --hdi-v53-light:#e2f3e3;
  --hdi-v53-ink:#173047;
  --hdi-v53-muted:#617487;
  --hdi-v53-border:#cfe3d3;
}

/* ===== SHELL: evita que el contenido quede angosto a la izquierda ===== */
#wrapper{
  display:flex!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
}
#content-wrapper{
  width:0!important;
  max-width:none!important;
  min-width:0!important;
  flex:1 1 0!important;
}
#content,
#content-wrapper>#content{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
}
.container-fluid.gnp-container,
.gnp-container,
.gnp-users-container,
.pt-report-shell{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  box-sizing:border-box!important;
}

/* ===== TOPBAR REAL DE HDI ===== */
.demo-topbar{
  min-height:92px!important;
  height:auto!important;
  padding:10px 36px 10px 18px!important;
  background:#fff!important;
  border-bottom:1px solid #dce9df!important;
  box-shadow:0 2px 12px rgba(0,106,52,.06)!important;
  overflow:visible!important;
}
.demo-topbar-left,.demo-topbar-context{min-width:0!important}
.demo-topbar-context{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
}
.demo-topbar-context-icon{
  position:static!important;
  width:94px!important;
  height:62px!important;
  flex:0 0 94px!important;
  padding:0!important;
  margin:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.demo-topbar-context-icon img{
  position:static!important;
  inset:auto!important;
  transform:none!important;
  width:auto!important;
  height:auto!important;
  max-width:94px!important;
  max-height:62px!important;
  margin:0!important;
  padding:0!important;
  object-fit:contain!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.demo-topbar-context strong{color:var(--hdi-v53-ink)!important;font-weight:950!important;letter-spacing:.025em!important}
.demo-topbar-context small{color:var(--hdi-v53-muted)!important;font-weight:800!important}
.demo-user-avatar{color:var(--hdi-v53-green)!important;background:var(--hdi-v53-light)!important}
.demo-user-chevron{color:var(--hdi-v53-green)!important}

/* ===== SIDEBAR / ICONOS ROJOS ===== */
#accordionSidebar,.demo-sidebar{
  background:linear-gradient(180deg,#006a34 0%,#08723d 58%,#54a264 100%)!important;
}
#accordionSidebar .sidebar-brand,.demo-sidebar .sidebar-brand{min-height:92px!important;padding:10px 8px!important}
#accordionSidebar .sidebar-brand img,.demo-sidebar .sidebar-brand img{
  position:static!important;
  width:auto!important;
  height:auto!important;
  max-width:82px!important;
  max-height:68px!important;
  object-fit:contain!important;
}
#accordionSidebar .nav-icon,.demo-sidebar .nav-icon,
#accordionSidebar .nav-icon-box,.demo-sidebar .nav-icon-box{
  background:rgba(236,28,36,.16)!important;
  border:1px solid rgba(236,28,36,.34)!important;
  color:#ec1c24!important;
}
#accordionSidebar .nav-icon i,.demo-sidebar .nav-icon i,
#accordionSidebar .nav-icon-box i,.demo-sidebar .nav-icon-box i{color:#ec1c24!important}
#accordionSidebar .nav-link:hover .nav-icon,.demo-sidebar .nav-link:hover .nav-icon,
#accordionSidebar .nav-item.active .nav-icon,.demo-sidebar .nav-item.active .nav-icon,
#accordionSidebar .nav-link:hover .nav-icon-box,.demo-sidebar .nav-link:hover .nav-icon-box,
#accordionSidebar .nav-item.active .nav-icon-box,.demo-sidebar .nav-item.active .nav-icon-box{
  background:#ec1c24!important;border-color:#ec1c24!important;color:#fff!important;
}
#accordionSidebar .nav-link:hover .nav-icon i,.demo-sidebar .nav-link:hover .nav-icon i,
#accordionSidebar .nav-item.active .nav-icon i,.demo-sidebar .nav-item.active .nav-icon i{color:#fff!important}

/* ===== HERO / PALETA EXACTA PDF ===== */
body.gnp-page .gnp-hero,
body.gnp-page .pt-page-hero,
body.gnp-page .pt-case-header,
body.gnp-page .gnp-page-header,
body.gnp-page .gnp-header,
.pt-page-hero,.pt-case-header{
  background:
    radial-gradient(circle at 92% 18%,rgba(226,243,227,.18),transparent 29%),
    linear-gradient(118deg,#006a34 0%,#31854a 58%,#54a264 100%)!important;
  border-bottom:3px solid #ec1c24!important;
}
.gnp-hero *,.pt-page-hero *,.pt-case-header *,.gnp-page-header *,.gnp-header *{color:#fff!important}
.gnp-hero p,.pt-page-hero p,.pt-page-hero .text-muted,.pt-case-header .text-muted{color:rgba(255,255,255,.94)!important}
.gnp-hero__icon,.pt-page-hero__icon,.pt-case-header__icon,
.pt-case-banner__icon,.gnp-page .hero-icon,.gnp-page .gnp-header-icon{
  background:#ec1c24!important;
  border-color:#ec1c24!important;
  color:#fff!important;
  box-shadow:0 8px 20px rgba(236,28,36,.22)!important;
}
.gnp-hero__icon i,.pt-page-hero__icon i,.pt-case-header__icon i,.pt-case-banner__icon i{color:#fff!important}
.gnp-eyebrow,.pt-page-hero__eyebrow{color:#fff!important}

/* ===== CABECERA GESTION HDI + DATOS DEL CASO ===== */
.pt-case-banner{width:100%!important;max-width:none!important;min-width:0!important;border-color:var(--hdi-v53-border)!important}
.pt-case-banner__head,.pt-case-banner-header{
  background:#006a34!important;
  border-bottom:3px solid #ec1c24!important;
}
.pt-case-banner__head *,.pt-case-banner-header *{color:#fff!important}
.pt-case-banner.pt-v625-case-banner{
  width:100%!important;
  grid-template-columns:54px repeat(7,minmax(0,1fr))!important;
}
.pt-case-banner__body,.pt-case-banner__summary,.pt-case-banner__facts,.pt-case-banner__grid{
  width:100%!important;max-width:none!important;min-width:0!important;
}
.pt-case-banner__field{
  min-width:0!important;
  padding:12px 10px!important;
  text-align:center!important;
  overflow:hidden!important;
}
.pt-case-banner__field small,.pt-case-banner__field .label,.pt-case-banner__label{
  display:block!important;
  color:#53697b!important;
  font-size:.70rem!important;
  font-weight:900!important;
  line-height:1.15!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.pt-case-banner__field strong,.pt-case-banner #gnp_top_serie{
  display:block!important;
  color:#183047!important;
  font-family:inherit!important;
  font-size:.86rem!important;
  font-weight:950!important;
  line-height:1.2!important;
  letter-spacing:normal!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.pt-case-banner__field.hdi-v53-date-field strong{white-space:nowrap!important}

/* ===== MODULOS DE CEDULA: ICONOS VERDES ===== */
.pt-module-grid{gap:18px!important;width:100%!important}
.pt-module-card{
  border:1px solid var(--hdi-v53-border)!important;
  border-top:4px solid #54a264!important;
  background:#fff!important;
  box-shadow:0 7px 22px rgba(0,106,52,.06)!important;
}
.pt-module-card:hover{border-color:#54a264!important;box-shadow:0 10px 26px rgba(0,106,52,.11)!important}
.pt-module-card__icon,.pt-module-card[data-pt-module-open]>.pt-module-card__icon,
.pt-module-card[data-pt-module-open]>span:first-child,.pt-module-card>span:first-child{
  background:#006a34!important;
  border-color:#006a34!important;
  color:#fff!important;
  box-shadow:0 8px 18px rgba(0,106,52,.18)!important;
}
.pt-module-card__icon i,.pt-module-card[data-pt-module-open]>span:first-child i{color:#fff!important}

/* ===== CONSULTA REFERENCIAS: ANCHO REAL COMPLETO ===== */
.gnp-table-card,.gnp-table-responsive,
#tablaGnpDatos_wrapper,
#tablaGnpDatos_wrapper>.row,
#tablaGnpDatos_wrapper .dataTables_scroll,
#tablaGnpDatos_wrapper .dataTables_scrollHead,
#tablaGnpDatos_wrapper .dataTables_scrollBody{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
.gnp-table-card{display:block!important;float:none!important;clear:both!important}
.gnp-table-responsive{display:block!important;overflow-x:auto!important;overflow-y:visible!important}
#tablaGnpDatos_wrapper{display:block!important;float:none!important;clear:both!important}
#tablaGnpDatos_wrapper>.row{margin-left:0!important;margin-right:0!important}
#tablaGnpDatos_wrapper>.row>[class*="col-"]{width:100%!important;max-width:100%!important;flex:0 0 100%!important}
#tablaGnpDatos_wrapper .dataTables_scroll{display:block!important;overflow:hidden!important}
#tablaGnpDatos_wrapper .dataTables_scrollHead{overflow:hidden!important}
#tablaGnpDatos_wrapper .dataTables_scrollBody{
  overflow-x:auto!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
}
#tablaGnpDatos_wrapper .dataTables_scrollHeadInner{
  width:100%!important;
  min-width:1680px!important;
}
#tablaGnpDatos_wrapper table.dataTable,
#tablaGnpDatos_wrapper #tablaGnpDatos{
  width:100%!important;
  min-width:1680px!important;
  margin:0!important;
}
#tablaGnpDatos_wrapper table.dataTable thead th{background:#006a34!important;color:#fff!important;border-color:#0b7740!important}
#tablaGnpDatos_wrapper table.dataTable thead tr.filters-row th,
#tablaGnpDatos_wrapper table.dataTable thead th:has(input){background:#e2f3e3!important;color:#183047!important}
#tablaGnpDatos_wrapper table.dataTable thead input{
  min-height:34px!important;border:1px solid #b7d4bd!important;border-radius:8px!important;background:#fff!important;color:#183047!important;
}
#tablaGnpDatos_wrapper>.pt-v633-dt-toolbar,
#tablaGnpDatos_wrapper>.hdi-v52-table-toolbar{
  width:100%!important;
  max-width:none!important;
  box-sizing:border-box!important;
}
#tablaGnpDatos_wrapper .dataTables_paginate{float:none!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;flex-wrap:wrap!important;gap:4px!important}
#tablaGnpDatos_wrapper .dataTables_info{white-space:normal!important}

/* ===== DOCUMENTOS / CONTRASTE ===== */
.gnp-file-actions,.pt-v625-doc-actions{gap:7px!important;flex-wrap:wrap!important}
.gnp-file-action,.pt-v625-view-doc,.gnp-file-preview,.gnp-file-download,.gnp-file-validate,.gnp-file-delete{
  min-width:38px!important;min-height:38px!important;border-radius:9px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;box-shadow:none!important;
}
.gnp-file-preview,.pt-v625-view-doc{background:#006a34!important;border:1px solid #006a34!important;color:#fff!important}
.gnp-file-download,.gnp-file-action[title*="Descargar"],.gnp-file-actions a.gnp-file-action{background:#54a264!important;border:1px solid #54a264!important;color:#fff!important}
.gnp-file-validate{background:#e2f3e3!important;border:1px solid #54a264!important;color:#006a34!important}
.gnp-file-validate.is-valid,.gnp-file-validate[data-validado="1"]{background:#006a34!important;border-color:#006a34!important;color:#fff!important}
.gnp-file-delete{background:#ec1c24!important;border:1px solid #ec1c24!important;color:#fff!important}
.pt-doc-check{color:#006a34!important}
.pt-doc-status.is-received{background:#e2f3e3!important;color:#006a34!important}
.pt-doc-status.is-valid{background:#006a34!important;color:#fff!important}

/* ===== DASHBOARD: TONOS MAS CLAROS ===== */
body.pt-report-page,.pt-report-shell,.pt-dashboard,.pt-dashboard-shell,.pt-report-dashboard,.pt-report-panel{background:#f7fbf8!important}
.pt-filter-card,.pt-kpi-card,.pt-dashboard-card,.pt-chart-card,.pt-panel,.pt-excel-chart,.pt-modern-chart,.pt-table-card,.pt-stage-lines{
  background:#fff!important;
  border-color:#cfe3d3!important;
  box-shadow:0 4px 14px rgba(0,106,52,.04)!important;
}
.pt-filter-card select,.pt-filter-card input,.pt-table-search input{border-color:#b7d4bd!important;background:#fff!important}
.pt-month-bar,.pt-hbar-fill{background:rgba(84,162,100,.24)!important;border-color:#54a264!important}
.pt-hbar-track{background:#e2f3e3!important}
.pt-report-tabs button.is-active,.pt-report-tabs button:hover{color:#006a34!important;border-color:#54a264!important}

/* ===== PORTAL ASEGURADO ===== */
.pdd-portal-hero,.pt-v627-mobile-summary{
  background:
    radial-gradient(circle at 88% 18%,rgba(226,243,227,.16),transparent 28%),
    linear-gradient(130deg,#006a34 0%,#2c8248 58%,#54a264 100%)!important;
  border-bottom:3px solid #ec1c24!important;
}
.pdd-portal-hero *,.pt-v627-mobile-summary *{color:#fff!important}
.pdd-portal-hero p,.pdd-portal-hero small,.pdd-portal-hero .text-muted,
.pt-v627-mobile-summary p,.pt-v627-mobile-summary small,.pt-v627-mobile-summary .text-muted{color:#fff!important;opacity:.96!important}
.pt-v627-mobile-progress i,.pt-v627-mobile-progress .is-active i,.pt-v627-mobile-progress .is-current i{color:#ec1c24!important}
.pdd-process-card__icon,.pt-v627-mobile-action-icon{background:#006a34!important;color:#fff!important}

/* ===== MODALES / SWEETALERT: SIN ENCIMARSE ===== */
.swal2-container{z-index:20050!important}
.modal{z-index:10550!important}
.modal-backdrop{z-index:10540!important}
.pt-module-window{z-index:10600!important}

@media (max-width:1199.98px){
  .pt-case-banner.pt-v625-case-banner{grid-template-columns:54px repeat(4,minmax(0,1fr))!important}
}

@media (max-width:767.98px){
  html,body{max-width:100%!important;overflow-x:hidden!important}
  #wrapper{width:100%!important;max-width:100%!important}
  #content-wrapper{width:100%!important;flex:1 1 100%!important;max-width:100%!important}
  .demo-topbar{min-height:72px!important;padding:8px 12px!important}
  .demo-topbar-context{gap:8px!important}
  .demo-topbar-context-icon{width:70px!important;height:46px!important;flex-basis:70px!important}
  .demo-topbar-context-icon img{max-width:70px!important;max-height:46px!important}
  .demo-topbar-context strong{font-size:.82rem!important}
  .demo-topbar-context small{font-size:.67rem!important}
  .demo-user-text{display:none!important}
  .gnp-container,.gnp-users-container,.pt-report-shell{padding-left:10px!important;padding-right:10px!important}

  .pt-case-banner.pt-v625-case-banner{grid-template-columns:46px 1fr!important}
  .pt-case-banner__field{min-width:0!important;text-align:left!important}

  #tablaGnpDatos_wrapper>.pt-v633-dt-toolbar,
  #tablaGnpDatos_wrapper>.hdi-v52-table-toolbar{grid-template-columns:1fr!important;gap:9px!important;padding:10px!important}
  #tablaGnpDatos_wrapper .dataTables_scrollHeadInner,
  #tablaGnpDatos_wrapper table.dataTable,
  #tablaGnpDatos_wrapper #tablaGnpDatos{min-width:1500px!important}
  #tablaGnpDatos_wrapper .dataTables_paginate{justify-content:center!important}

  #documentos .pdd-portal-modal-card,
  #documentos .pdd-documents-layout,
  #documentos .pdd-panel-grid,
  #documentos .pdd-required-docs,
  #documentos .hdi-formatos-grid,
  #documentos .pdd-document-list{
    width:100%!important;max-width:100%!important;min-width:0!important;grid-template-columns:minmax(0,1fr)!important;
  }
  #documentos .pdd-required-doc,#documentos .hdi-formato-card,#documentos .pdd-document-card{width:100%!important;max-width:100%!important;min-width:0!important}

  .modal.show .modal-dialog,
  .modal-dialog{
    width:calc(100vw - 16px)!important;
    max-width:calc(100vw - 16px)!important;
    margin:8px auto!important;
  }
  .modal-content{max-height:calc(100dvh - 16px)!important;overflow:auto!important}
  .pt-module-window__dialog{width:calc(100vw - 12px)!important;max-width:calc(100vw - 12px)!important;max-height:calc(100dvh - 12px)!important;margin:6px auto!important}
  .pt-module-window__footer,.modal-footer,.swal2-actions{
    display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%!important;
  }
  .pt-module-window__footer>*,.modal-footer>.btn,.modal-footer>button,.swal2-actions>button{
    width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;
  }
}
/* HDI_V5_3_FULL_CONSOLIDACION_CSS_END */
