/* NexoProCRM v0.17.3 · Ajustes de navegación y dashboard
   Rediseño estructural. No modifica lógica fiscal, cálculos ni plantillas de factura. */
:root{
  --nxp-layout-sidebar:282px;
  --nxp-layout-gap:22px;
  --nxp-sidebar-bg:#171d24;
  --nxp-sidebar-bg-2:#10151b;
  --nxp-sidebar-border:rgba(255,255,255,.08);
  --nxp-sidebar-text:#d9e1ea;
  --nxp-sidebar-muted:#8f9aa8;
  --nxp-sidebar-active:#ffffff;
  --nxp-sidebar-hover:rgba(255,255,255,.075);
  --nxp-sidebar-active-bg:rgba(255,255,255,.12);
}
html body.nexopro-app-page{background:#f4f6f8!important;}
.ch301-shell{
  padding:0!important;
  background:#f4f6f8!important;
}
.ch301-app.ch301-app-layout-v2{
  max-width:none!important;
  min-height:100vh;
  padding:0!important;
}
.ch301-layout{
  display:grid!important;
  grid-template-columns:var(--nxp-layout-sidebar) minmax(0,1fr)!important;
  gap:0!important;
  min-height:100vh;
  align-items:stretch!important;
}
.ch301-main{
  min-width:0;
  padding:22px 24px 40px!important;
}
.ch301-header{
  margin:0 0 16px!important;
  position:sticky;
  top:0;
  z-index:25;
  backdrop-filter:blur(14px);
  background:rgba(255,255,255,.94)!important;
}
.ch301-breadcrumbs{
  margin:0 0 16px!important;
}

/* Sidebar Contasimple-like, adaptada a NexoProCRM */
.ch301-nav{
  position:sticky!important;
  top:0!important;
  align-self:start;
  height:100vh!important;
  min-height:100vh!important;
  display:flex!important;
  flex-direction:column!important;
  gap:0!important;
  margin:0!important;
  padding:16px 14px!important;
  border:0!important;
  border-right:1px solid var(--nxp-sidebar-border)!important;
  border-radius:0!important;
  background:linear-gradient(180deg,var(--nxp-sidebar-bg),var(--nxp-sidebar-bg-2))!important;
  box-shadow:none!important;
  overflow:hidden;
}
.ch301-nav:before,.ch301-nav:after{display:none!important;content:none!important;}
.ch301-nav-brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:52px;
  padding:4px 6px 16px;
  margin-bottom:8px;
  color:#fff;
  border-bottom:1px solid rgba(255,255,255,.07);
}
.ch301-nav-mark{
  width:38px;
  height:38px;
  flex:0 0 38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#fff;
  color:#171d24;
  font-size:13px;
  font-weight:950;
  letter-spacing:-.03em;
}
.ch301-nav-brand strong{
  display:block;
  color:#fff;
  font-size:15px;
  line-height:1.05;
  letter-spacing:-.02em;
}
.ch301-nav-brand span{
  display:block;
  margin-top:3px;
  color:var(--nxp-sidebar-muted);
  font-size:11px;
  font-weight:800;
}
.ch301-nav-scroll{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:4px 1px 10px 0;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.2) transparent;
}
.ch301-nav-scroll::-webkit-scrollbar{width:7px;}
.ch301-nav-scroll::-webkit-scrollbar-thumb{background:rgba(255,255,255,.2);border-radius:999px;}
.ch301-nav-create{
  margin:0 0 12px;
}
.ch301-nav-create summary{
  list-style:none;
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  border-radius:999px;
  background:#fff;
  color:#171d24;
  font-weight:950;
  cursor:pointer;
  box-shadow:0 12px 28px rgba(0,0,0,.18);
}
.ch301-nav-create summary::-webkit-details-marker,.ch301-nav-group summary::-webkit-details-marker{display:none;}
.ch301-nav-create-menu{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  margin-top:8px;
  padding:8px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  background:rgba(255,255,255,.045);
}
.ch301-nav-create-menu a{
  min-height:34px!important;
  padding:8px!important;
  justify-content:center!important;
  text-align:center!important;
  font-size:12px!important;
  border-radius:10px!important;
  color:#eef3f8!important;
  background:rgba(255,255,255,.06)!important;
}
.ch301-nav-create-menu a:hover{
  background:rgba(255,255,255,.12)!important;
  color:#fff!important;
}
.ch301-nav-group{
  margin:6px 0;
  border-top:1px solid rgba(255,255,255,.055);
  padding-top:6px;
}
.ch301-nav-group:first-of-type{border-top:0;padding-top:0;}
.ch301-nav-group summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:32px;
  padding:4px 8px;
  cursor:pointer;
  color:var(--nxp-sidebar-muted);
  font-size:11px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.ch301-nav-group summary .dashicons{
  width:16px;
  height:16px;
  font-size:16px;
  transition:transform .16s ease;
}
.ch301-nav-group[open] summary .dashicons{transform:rotate(180deg);}
.ch301-nav-group-items{
  display:grid;
  gap:3px;
}
.ch301-nav a.ch301-nav-item,
.ch301-nav .ch301-nav-item{
  width:100%!important;
  min-height:42px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:11px!important;
  padding:10px 11px!important;
  border:1px solid transparent!important;
  border-radius:12px!important;
  background:transparent!important;
  color:var(--nxp-sidebar-text)!important;
  box-shadow:none!important;
  text-align:left!important;
  font-size:14px!important;
  font-weight:850!important;
  line-height:1.15!important;
  transform:none!important;
}
.ch301-nav .ch301-nav-item .dashicons{
  width:21px;
  height:21px;
  flex:0 0 21px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--nxp-sidebar-muted);
  font-size:19px;
  transition:color .16s ease;
}
.ch301-nav .ch301-nav-item:hover{
  background:var(--nxp-sidebar-hover)!important;
  color:#fff!important;
}
.ch301-nav .ch301-nav-item:hover .dashicons{color:#fff;}
.ch301-nav .ch301-nav-item.is-active{
  background:var(--nxp-sidebar-active-bg)!important;
  color:var(--nxp-sidebar-active)!important;
  border-color:rgba(255,255,255,.12)!important;
}
.ch301-nav .ch301-nav-item.is-active:before{
  content:"";
  width:3px;
  align-self:stretch;
  border-radius:999px;
  background:#d71920;
  margin:-2px 0 -2px -3px;
}
.ch301-nav .ch301-nav-item.is-active .dashicons{color:#fff;}
.ch301-nav-logout{
  margin-top:12px!important;
  padding-top:12px!important;
  border-top:1px solid rgba(255,255,255,.07)!important;
  color:#f3f6f8!important;
}

/* Contenido más limpio y legible */
.ch301-panel,.ch301-card{
  border-radius:16px!important;
}
.ch301-actions{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
}
.ch301-actions .ch301-btn{
  min-height:42px!important;
  box-shadow:0 8px 18px rgba(17,24,39,.08)!important;
}
.ch301-actions .ch301-btn:not(.ch301-btn-red){
  background:#fff!important;
  color:#202832!important;
  border:1px solid #dfe5ec!important;
}
.ch301-actions .ch301-btn:not(.ch301-btn-red):hover{
  background:#f8fafc!important;
  border-color:#cbd5df!important;
}
.ch301-export-panel{
  border-top:0!important;
  border-left:4px solid #d71920!important;
}

@media(max-width:1180px){
  :root{--nxp-layout-sidebar:258px;}
  .ch301-main{padding:18px 18px 34px!important;}
  .ch301-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
}
@media(max-width:960px){
  .ch301-layout{display:block!important;min-height:100vh;}
  .ch301-main{padding:12px 12px 96px!important;}
  .ch301-header{position:relative;top:auto;border-radius:16px!important;margin:0 0 12px!important;}
  .ch301-nav{
    position:fixed!important;
    left:10px!important;
    right:10px!important;
    bottom:10px!important;
    top:auto!important;
    z-index:9999;
    height:auto!important;
    min-height:0!important;
    max-height:78px!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    gap:8px!important;
    padding:8px!important;
    border:1px solid rgba(17,24,39,.10)!important;
    border-radius:18px!important;
    background:rgba(255,255,255,.96)!important;
    box-shadow:0 18px 44px rgba(17,24,39,.20)!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    backdrop-filter:blur(14px);
  }
  .ch301-nav-brand,.ch301-nav-create,.ch301-nav-group summary,.ch301-nav-logout{display:none!important;}
  .ch301-nav-scroll{
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    overflow:visible!important;
    padding:0!important;
  }
  .ch301-nav-group{
    display:contents!important;
    border:0!important;
    padding:0!important;
    margin:0!important;
  }
  .ch301-nav-group-items{
    display:flex!important;
    gap:8px!important;
  }
  .ch301-nav .ch301-nav-item{
    min-width:76px!important;
    max-width:88px!important;
    min-height:58px!important;
    flex:0 0 auto!important;
    flex-direction:column!important;
    justify-content:center!important;
    gap:4px!important;
    padding:7px 8px!important;
    color:#667085!important;
    background:#fff!important;
    border-color:#edf1f4!important;
    text-align:center!important;
    font-size:10px!important;
    font-weight:900!important;
  }
  .ch301-nav .ch301-nav-item .dashicons{
    width:20px;
    height:20px;
    flex:0 0 20px;
    color:#667085;
    font-size:18px;
  }
  .ch301-nav .ch301-nav-item.is-active,
  .ch301-nav .ch301-nav-item:hover{
    background:#202832!important;
    color:#fff!important;
    border-color:#202832!important;
  }
  .ch301-nav .ch301-nav-item.is-active .dashicons,
  .ch301-nav .ch301-nav-item:hover .dashicons{color:#fff;}
  .ch301-nav .ch301-nav-item.is-active:before{display:none!important;}
  .ch301-actions{
    display:flex!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    gap:8px!important;
    margin:0 -12px 12px!important;
    padding:0 12px 6px!important;
  }
  .ch301-actions .ch301-btn{
    min-width:150px!important;
    flex:0 0 auto!important;
    width:auto!important;
  }
}
@media(max-width:720px){
  .ch301-title-block h1{font-size:22px!important;}
  .ch301-header{align-items:flex-start!important;gap:10px!important;}
  .ch301-header-right{width:100%;justify-content:space-between!important;margin-left:0!important;}
  .ch301-user-pill{max-width:190px;}
}


/* v0.17.3 · Iconografía propia del menú: sin dependencia visual de Dashicons en la navegación principal */
.ch301-nav-icon{
  width:21px;
  height:21px;
  flex:0 0 21px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--nxp-sidebar-muted);
  transition:color .16s ease, transform .16s ease, opacity .16s ease;
}
.ch301-nav-icon svg{
  width:20px;
  height:20px;
  display:block;
  overflow:visible;
}
.ch301-nav-create summary .ch301-nav-icon{
  color:#171d24;
}
.ch301-nav .ch301-nav-item:hover .ch301-nav-icon,
.ch301-nav .ch301-nav-item.is-active .ch301-nav-icon{
  color:#fff;
}
.ch301-nav .ch301-nav-item:hover .ch301-nav-icon{
  transform:translateX(1px);
}
.ch301-nav-caret{
  width:8px;
  height:8px;
  flex:0 0 8px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg);
  opacity:.7;
  transition:transform .16s ease, opacity .16s ease;
}
.ch301-nav-group[open] summary .ch301-nav-caret{
  transform:rotate(-135deg);
  opacity:.95;
}
.ch301-dashboard-activity h3 .ch301-section-hint{
  display:inline-block;
  margin-left:6px;
  color:#667085;
  font-size:12px;
  font-weight:800;
}
@media(max-width:960px){
  .ch301-nav .ch301-nav-item .ch301-nav-icon{
    width:20px;
    height:20px;
    flex:0 0 20px;
    color:#667085;
  }
  .ch301-nav .ch301-nav-item .ch301-nav-icon svg{
    width:18px;
    height:18px;
  }
  .ch301-nav .ch301-nav-item.is-active .ch301-nav-icon,
  .ch301-nav .ch301-nav-item:hover .ch301-nav-icon{color:#fff;}
}
