
/* ===== NS POS MOBILE v6 - interfaz smartphone independiente ===== */
.mobile-pos-shell{display:none;}
@media (max-width: 768px){
  html,body{height:auto!important;min-height:100vh!important;overflow:auto!important;background:#eef3f8!important;}
  body{padding:0!important;}
  .app{display:block!important;width:100%!important;max-width:100%!important;min-height:100vh!important;height:auto!important;padding:0!important;overflow:visible!important;background:#eef3f8!important;}
  .app > .topbar,.app > .stat-grid,.app > .tabs,.app > .tab-content{display:none!important;}
  .mobile-pos-shell{display:block!important;min-height:100vh;padding:12px 12px 86px;background:linear-gradient(180deg,#f8fbff,#eef3f8);color:#0f172a;font-family:Arial,Helvetica,sans-serif;}
  .mpos-header{position:sticky;top:0;z-index:50;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 8px 12px;margin:-12px -12px 10px;background:rgba(248,251,255,.96);backdrop-filter:blur(10px);border-bottom:1px solid #dbe4ee;}
  .mpos-brand{display:flex;align-items:center;gap:10px;min-width:0;}
  .mpos-brand img{width:44px;height:44px;border-radius:14px;object-fit:contain;background:#fff;border:1px solid #dbe4ee;padding:3px;}
  .mpos-brand strong{display:block;font-size:15px;line-height:1.1;max-width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .mpos-brand span{display:block;font-size:11px;color:#64748b;margin-top:2px;}
  .mpos-icon-btn{width:42px;height:42px;border-radius:14px;background:#0f172a;color:#fff;border:0;font-size:18px;}
  .mpos-total-card{background:linear-gradient(135deg,#0f172a,#123d73);color:#fff;border-radius:22px;padding:16px;margin:10px 0;box-shadow:0 12px 28px rgba(15,23,42,.22);}
  .mpos-total-card span{display:block;font-size:11px;text-transform:uppercase;font-weight:900;color:#bae6fd;letter-spacing:.05em;}
  .mpos-total-card strong{display:block;font-size:38px;line-height:1;margin-top:6px;}
  .mpos-total-card small{display:block;margin-top:8px;color:#dbeafe;font-weight:700;}
  .mpos-kpis{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0;}
  .mpos-kpis div{background:#fff;border:1px solid #dbe4ee;border-radius:16px;padding:10px;box-shadow:0 8px 18px rgba(15,23,42,.07);}
  .mpos-kpis span{display:block;font-size:10px;text-transform:uppercase;color:#64748b;font-weight:900;}
  .mpos-kpis strong{display:block;margin-top:4px;font-size:16px;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .mpos-main{display:block;}
  .mpos-panel{display:none;}
  .mpos-panel.active{display:block;}
  .mpos-card{background:#fff;border:1px solid #dbe4ee;border-radius:18px;padding:12px;margin:10px 0;box-shadow:0 8px 20px rgba(15,23,42,.07);}
  .mpos-card label{display:block;margin:0 0 6px;font-size:11px;text-transform:uppercase;color:#334155;font-weight:900;}
  .mpos-card input,.mpos-card select{width:100%;height:46px;border:1px solid #cbd5e1;border-radius:14px;padding:10px 12px;font-size:15px;background:#fff;color:#0f172a;}
  .mpos-search{font-weight:800;font-size:16px!important;}
  .mpos-actions-row{display:grid;grid-template-columns:1fr;gap:8px;margin-top:10px;}
  .mpos-actions-row.two{grid-template-columns:1fr 1fr;}
  .mpos-actions-row button,.mpos-card button{min-height:44px;border:0;border-radius:14px;background:#e2e8f0;color:#0f172a;font-weight:900;font-size:13px;padding:10px;}
  .mpos-list{display:grid;gap:8px;margin:10px 0;}
  .mpos-product,.mpos-cart-item,.mpos-inventory-item{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;background:#fff;border:1px solid #dbe4ee;border-radius:18px;padding:12px;box-shadow:0 8px 18px rgba(15,23,42,.06);}
  .mpos-product strong,.mpos-cart-item strong,.mpos-inventory-item strong{display:block;font-size:14px;color:#0f172a;line-height:1.2;}
  .mpos-product span,.mpos-cart-item span,.mpos-inventory-item span{display:block;font-size:12px;color:#64748b;margin-top:4px;line-height:1.25;}
  .mpos-product button{min-width:88px;height:42px;border:0;border-radius:14px;background:#16a34a;color:#fff;font-weight:900;}
  .mpos-section-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;}
  .mpos-section-title span{font-size:12px;color:#64748b;font-weight:800;}
  .mpos-cart{display:grid;gap:8px;}
  .mpos-cart-controls{display:flex;align-items:center;gap:6px;}
  .mpos-cart-controls button{width:36px;height:36px;min-height:36px;border-radius:12px;background:#e2e8f0;color:#0f172a;padding:0;}
  .mpos-cart-controls .danger{background:#fee2e2;color:#dc2626;}
  .mpos-pay-card{position:relative;}
  .mpos-change{margin:10px 0;padding:12px;border-radius:16px;background:#f8fafc;border:1px solid #dbe4ee;text-align:center;font-size:18px;font-weight:900;}
  .mpos-finish{width:100%;min-height:56px!important;background:linear-gradient(135deg,#22c55e,#16a34a)!important;color:#fff!important;font-size:16px!important;box-shadow:0 10px 22px rgba(22,163,74,.22);}
  .mpos-note{display:block;margin-top:10px;color:#64748b;line-height:1.35;}
  .mpos-empty{padding:16px;border:1px dashed #cbd5e1;background:#f8fafc;color:#64748b;border-radius:18px;text-align:center;font-size:13px;}
  .mpos-bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:80;display:grid;grid-template-columns:repeat(5,1fr);gap:4px;padding:8px 8px calc(8px + env(safe-area-inset-bottom));background:rgba(255,255,255,.97);border-top:1px solid #dbe4ee;box-shadow:0 -12px 24px rgba(15,23,42,.10);}
  .mpos-bottom-nav button{height:54px;border:0;border-radius:16px;background:transparent;color:#64748b;font-weight:900;font-size:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;}
  .mpos-bottom-nav button span{font-size:10px;}
  .mpos-bottom-nav button.active{background:#e0f2fe;color:#0369a1;}
}
/* Celular con el sistema completo (cajero, facturador, monitor, o «Sistema» desde la vista de movimientos) */
.ns-volver-movil{display:none}
@media (max-width: 768px){
  html.mpos-off .mobile-pos-shell{display:none!important;}
  html.mpos-off .app{padding:8px 8px 70px!important;}
  html.mpos-off .app > .topbar{display:flex!important;}
  html.mpos-off .app > .tab-content:not(.hidden){display:block!important;}
  .ns-volver-movil{display:block;position:fixed;right:12px;bottom:14px;z-index:9000;border:0;border-radius:999px;padding:12px 16px;background:#0f172a;color:#fff;font-weight:800;box-shadow:0 10px 24px rgba(15,23,42,.3)}
  .mpos-bottom-nav button#mposBtnSistema span{display:block}
}
@media (max-width: 768px){
  html.mpos-off .app > .topbar{padding:10px 12px 10px 62px!important;min-height:0!important}
  html.mpos-off .app > .topbar .brand p{display:none!important}
  html.mpos-off .app > .topbar .brand-logo{width:40px!important;height:40px!important}
}
@media (max-width: 768px){
  html.mpos-off body .ns-nav-mobile-toggle{display:grid!important;position:fixed;top:14px;left:12px;z-index:9500}
  html.mpos-off body .ns-desktop-nav.open,html.mpos-off body .ns-desktop-nav.mobile-open,html.mpos-off body.ns-nav-open .ns-desktop-nav{display:flex!important}
}
