
/* v147 - corrección solicitada: quitar accesos rápidos, eliminar bancos, duplicado notas, mostrar edición */
body.route-dashboard-home .pdv360-shortcuts,
body.route-dashboard-home .dashboard-page > .pdv360-shortcuts{
  display:none!important;
}
body.route-dashboard-home .dashboard-page > .head{
  display:none!important;
}
body.route-dashboard-home .dashboard-page .kpis{
  grid-template-columns:repeat(5,minmax(230px,1fr))!important;
  gap:14px!important;
}
body.route-dashboard-home .dashboard-page .kpis .kpi:nth-child(6){
  display:none!important;
}
body.route-dashboard-home .dashboard-page .kpi{
  min-height:106px!important;
  grid-template-columns:46px minmax(0,1fr)!important;
  align-items:center!important;
}
body.route-dashboard-home .dashboard-page .kpi small{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  max-width:none!important;
  line-height:1.14!important;
}

/* En notas de venta se usa solo el módulo de Ventas renombrado por v131; el acceso directo /notas-venta se oculta */
body.route-notas-like .pdv-subnav a[href*="/empresa/pdv/notas-venta"],
body.route-notas-like .pdv-subnav .subnav-item[href*="/empresa/pdv/notas-venta"],
body.route-notas-like .fact-subnav a[href*="/empresa/pdv/notas-venta"],
body.route-notas-like .fact-subnav .subnav-item[href*="/empresa/pdv/notas-venta"],
body.route-notas-like [data-pdv-hide-duplicate-nota="1"]{
  display:none!important;
}

/* Asegura visibilidad del botón editar */
.pdv-edit-note-btn,
button.pdv-edit-note-btn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  border-radius:11px!important;
  border:1px solid #bfdbfe!important;
  background:#eff6ff!important;
  color:#1d4ed8!important;
  font-size:15px!important;
  cursor:pointer!important;
}
.pdv-edit-note-btn:hover{background:#dbeafe!important;}

/* Corrige ancho de acciones en tabla de notas */
body.route-notas-like td:last-child{
  white-space:nowrap!important;
}

/* Modal edición v147 */
.pdv-note-modal-overlay{
  position:fixed; inset:0; z-index:5000; background:rgba(15,23,42,.50);
  display:flex; align-items:center; justify-content:center; padding:20px;
}
.pdv-note-modal{
  width:min(1060px, calc(100vw - 28px)); max-height:92vh; overflow:hidden;
  border-radius:22px; background:#fff; border:1px solid #dbe3f1;
  box-shadow:0 30px 80px rgba(15,23,42,.24); display:flex; flex-direction:column;
}
.pdv-note-modal-header,.pdv-note-modal-footer{
  padding:14px 18px; background:#fff; display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.pdv-note-modal-header{border-bottom:1px solid #e8edf6}
.pdv-note-modal-footer{border-top:1px solid #e8edf6}
.pdv-note-modal-header h3{margin:0; font-size:20px; line-height:1.1; color:#0f172a}
.pdv-note-modal-body{padding:16px 18px 18px; overflow:auto; background:#fbfcff}
.pdv-note-grid{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:14px}
.pdv-note-field{display:flex; flex-direction:column; gap:6px}
.pdv-note-field label{font-size:12px; font-weight:800; color:#475569}
.pdv-note-field input,.pdv-note-field select,.pdv-note-field textarea{
  min-height:42px; border-radius:12px; border:1px solid #d5dfed; background:#fff; padding:10px 12px;
}
.pdv-note-field textarea{min-height:74px; resize:vertical}
.pdv-note-field.full{grid-column:1 / -1}
.pdv-note-items-card{background:#fff; border:1px solid #e1e8f3; border-radius:18px; overflow:hidden}
.pdv-note-items-toolbar{padding:12px 14px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid #e8edf6}
.pdv-note-items-table{width:100%; border-collapse:collapse}
.pdv-note-items-table th,.pdv-note-items-table td{padding:10px; border-bottom:1px solid #eef2f7; text-align:left; vertical-align:top}
.pdv-note-items-table th{font-size:11px; letter-spacing:.05em; text-transform:uppercase; color:#64748b; background:#f8fafc}
.pdv-note-items-table td input{width:100%; min-height:38px; border-radius:10px; border:1px solid #d5dfed; padding:8px 10px}
.pdv-note-items-table td .mini-btn{min-height:34px; border-radius:10px; border:1px solid #fecaca; background:#fff1f2; color:#b91c1c; padding:0 10px; font-weight:700}
.pdv-note-modal .btn{min-height:40px; border-radius:12px; padding:0 14px}
.pdv-note-total{font-size:13px; font-weight:800; color:#334155}
.pdv-note-modal-close{border:1px solid #dbe3f1; background:#fff; color:#475569; width:36px; height:36px; border-radius:11px; font-size:18px}

@media(max-width:1380px){
  body.route-dashboard-home .dashboard-page .kpis{grid-template-columns:repeat(3,minmax(220px,1fr))!important}
}
@media(max-width:900px){
  .pdv-note-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:640px){
  body.route-dashboard-home .dashboard-page .kpis{grid-template-columns:1fr!important}
  .pdv-note-grid{grid-template-columns:1fr}
  .pdv-note-items-table{min-width:760px}
}
