/* RCNP UI Homogénea v1.2 */
:root{
  --rcnp-sidebar:#173f72;
  --rcnp-sidebar-width:205px;
  --rcnp-bg:#f3f6fa;
  --rcnp-text:#0b2d60;
  --rcnp-muted:#66768b;
  --rcnp-border:#dfe6ee;
}

body{
  background:var(--rcnp-bg)!important;
  color:var(--rcnp-text)!important;
}

/* Barras laterales principales */
.sidebar,
body > nav{
  width:var(--rcnp-sidebar-width)!important;
  background:var(--rcnp-sidebar)!important;
}

/* Logo */
.sidebar .brand{
  font-size:28px!important;
  font-weight:900!important;
  letter-spacing:.5px!important;
}

/* Navegación */
.sidebar .menu a,
body > nav a{
  font-size:13px!important;
  font-weight:700!important;
  border-radius:8px!important;
  padding:10px 11px!important;
}

.sidebar .menu a.active,
body > nav a.module-link.active{
  background:#fff!important;
  color:var(--rcnp-sidebar)!important;
}

/* Fondo contenido */
main{
  background:var(--rcnp-bg)!important;
}

/* Paneles comunes */
.panel,
.card{
  border-color:var(--rcnp-border)!important;
}

/* Footer */
footer,
.rcnp-copyright,
.footer{
  color:#748196!important;
  font-size:11px!important;
}

@media(max-width:900px){
  .sidebar,
  body > nav{
    width:100%!important;
  }
}


/* RCNP PAQUETERIA CUSTODIA v0.2 */
.package.large-package{
  display:inline-block!important;
  vertical-align:top!important;
  width:min(445px,100%)!important;
}
.custody-side{
  display:inline-block;
  vertical-align:top;
  width:min(650px,calc(100% - 480px));
  margin-left:20px;
  background:#fff;
  border:1px solid #dfe6ee;
  border-radius:14px;
  padding:16px 18px;
  box-shadow:0 2px 8px rgba(0,0,0,.035);
}
.custody-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:10px;
}
.custody-title-row h3{
  margin:0;
  font-size:20px;
  color:#0b2d60;
}
.custody-note{
  color:#66768b;
  font-size:11px;
  margin-top:3px;
}
.custody-total{
  min-width:110px;
  text-align:center;
  border-radius:10px;
  background:#f4f7fa;
  padding:8px 10px;
}
.custody-total span{
  display:block;
  color:#66768b;
  font-size:10px;
}
.custody-total strong{
  display:block;
  color:#0b2d60;
  font-size:28px;
  line-height:1.1;
  margin-top:2px;
}
.custody-table-wrap{
  overflow:auto;
}
.custody-table{
  width:100%;
  border-collapse:collapse;
}
.custody-table th,
.custody-table td{
  padding:9px 8px;
  border-bottom:1px solid #e6ebf1;
  text-align:left;
  font-size:12px;
  white-space:nowrap;
}
.custody-table th{
  background:#f8fafc;
  color:#5c6c80;
  font-weight:800;
}
.custody-table tr.charge td{
  background:#fff8ea;
}
@media(max-width:1100px){
  .package.large-package,
  .custody-side{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
  }
  .custody-side{
    margin-top:14px;
  }
}


/* RCNP PAQUETERIA CUSTODIA v0.3.1 */
.package.large-package{
  display:inline-block !important;
  vertical-align:top !important;
  margin-top:0 !important;
  margin-bottom:0 !important;
  box-sizing:border-box !important;
}
.custody-side{
  display:inline-block !important;
  vertical-align:top !important;
  margin-top:0 !important;
  margin-bottom:0 !important;
  box-sizing:border-box !important;
}
.package.large-package + .custody-side{
  margin-top:0 !important;
}
@media(min-width:1101px){
  .package.large-package,
  .custody-side{
    position:relative;
    top:0;
  }
}


/* RCNP PAQUETERIA CUSTODIA GRANDES v0.4 */
.custody-g-box{
  background:#fff;
  border:1px solid #dfe6ee;
  border-radius:14px;
  padding:18px;
  margin:18px 0 22px;
  box-shadow:0 2px 8px rgba(0,0,0,.035);
}
.custody-g-box-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}
.custody-g-box-head h2{
  margin:0;
  color:#0b2d60;
  font-size:22px;
}
.custody-g-box-total{
  min-width:150px;
  text-align:center;
  background:#f4f7fa;
  border-radius:10px;
  padding:9px 12px;
}
.custody-g-box-total span{
  display:block;
  color:#66768b;
  font-size:10px;
}
.custody-g-box-total strong{
  display:block;
  color:#0b2d60;
  font-size:30px;
  line-height:1.1;
}
.custody-g-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(360px,1fr));
  gap:14px;
}
.custody-g-recipient{
  border:1px solid #e1e7ee;
  border-radius:12px;
  padding:13px;
  background:#fff;
}
.custody-g-recipient-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:10px;
}
.custody-g-recipient-head > div:first-child strong{
  display:block;
  color:#0b2d60;
  font-size:15px;
}
.custody-g-recipient-head > div:first-child span{
  display:block;
  margin-top:2px;
  color:#66768b;
  font-size:11px;
}
.custody-g-recipient-total{
  min-width:68px;
  text-align:center;
  border-radius:9px;
  padding:6px 8px;
  background:#f6f8fb;
}
.custody-g-recipient-total span{
  display:block;
  font-size:9px;
  color:#66768b;
}
.custody-g-recipient-total strong{
  display:block;
  font-size:22px;
  color:#0b2d60;
}
@media(max-width:800px){
  .custody-g-box-head{
    flex-direction:column;
    align-items:flex-start;
  }
  .custody-g-box-total{
    width:100%;
    text-align:left;
  }
  .custody-g-grid{
    grid-template-columns:1fr;
  }
}


/* RCNP PAQUETERIA CUSTODIA GRANDES v0.5.4 */
.g-cust-summary{
  display:inline-flex;
  align-items:center;
  gap:5px;
  margin-left:8px;
  padding:3px 7px;
  border-radius:999px;
  background:#eef3f8;
  color:#0b2d60;
  font-size:10px;
  font-weight:800;
}
.g-custody{
  margin:9px 0 10px;
  padding-top:8px;
  border-top:1px solid #e2e8ef;
}
.g-cust-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:5px;
  color:#66768b;
  font-size:11px;
}
.g-cust-head strong{
  color:#0b2d60;
  font-size:13px;
}
.g-cust-detail{
  display:grid;
  gap:3px;
}
.g-cust-row{
  display:grid;
  grid-template-columns:62px 1fr 38px;
  gap:6px;
  align-items:center;
  padding:5px 7px;
  border-radius:6px;
  background:#f8fafc;
  color:#53647a;
  font-size:9px;
}
.g-cust-row strong{
  text-align:right;
  color:#0b2d60;
  font-size:10px;
}


/* =========================================================
   RCNP NAVEGACION RESPONSIVE UNIFICADA v2.0
   ========================================================= */

.rcnp-primary-row{
  display:none;
}

@media(max-width:1100px){

  .layout{
    display:block!important;
    width:100%!important;
    min-height:0!important;
  }

  .sidebar{
    position:sticky!important;
    top:0!important;
    left:auto!important;
    bottom:auto!important;

    display:block!important;

    width:100%!important;
    height:auto!important;
    min-height:0!important;

    padding:12px 10px 10px!important;

    z-index:1000!important;
  }

  .sidebar .brand{
    display:block!important;
    margin:0!important;
    padding:4px 10px 13px!important;

    border:0!important;

    font-size:24px!important;
    line-height:1.15!important;
  }

  .sidebar .menu,
  body > nav{
    display:block!important;

    width:100%!important;
    height:auto!important;
    min-height:0!important;

    padding:0!important;

    overflow:visible!important;
  }

  body > nav{
    position:sticky!important;
    top:0!important;
    left:auto!important;
    bottom:auto!important;

    padding:12px 10px 10px!important;

    z-index:1000!important;
  }

  body > nav::before{
    display:block!important;

    margin:0!important;
    padding:4px 10px 13px!important;

    border:0!important;

    font-size:24px!important;
    line-height:1.15!important;
  }

  .rcnp-primary-row{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    align-items:center!important;

    gap:6px!important;

    width:100%!important;

    overflow-x:auto!important;
    overflow-y:hidden!important;

    white-space:nowrap!important;

    scrollbar-width:thin;
    -webkit-overflow-scrolling:touch;
  }

  .rcnp-primary-row > a{
    display:inline-block!important;
    flex:0 0 auto!important;

    margin:0!important;
    padding:10px 12px!important;

    border-radius:8px!important;

    font-size:13px!important;
    font-weight:700!important;

    white-space:nowrap!important;
    text-decoration:none!important;
  }

  .rcnp-primary-row > a.active,
  .rcnp-primary-row > a.module-link.active{
    background:#fff!important;
    color:#173f72!important;
  }

  .rcnp-original-secondary,
  .rcnp-mobile-subnav,
  .sidebar .nav-divider,
  .sidebar .nav-spacer,
  body > nav .nav-divider,
  body > nav .nav-spacer,
  .sidebar a[href="/logout"],
  body > nav a[href="/logout"],
  .sidebar .session-link,
  body > nav .session-link{
    display:none!important;
  }

  main,
  .main{
    margin-left:0!important;

    width:100%!important;
    max-width:100%!important;
    min-width:0!important;

    padding:15px!important;
  }

  footer{
    margin-left:0!important;
  }
}
