*{box-sizing:border-box;font-family:Inter,system-ui}body{margin:0;background:#FFFFFF;display:block;overflow-x:hidden}
#app{width:100%;max-width:440px;margin:0 auto;min-height:calc(100vh - 56px);background:#FFFFFF;display:flex;flex-direction:column}
.top{width:100%;max-width:100%;height:56px;min-height:56px;max-height:56px;background:linear-gradient(90deg,#061a3a 0%,#0e3a8a 60%,#1e5bbf 100%);display:flex;justify-content:space-between;align-items:center;padding:0 12px 0 10px;color:#FFEB3B;box-sizing:border-box;flex-shrink:0;position:sticky;top:0;z-index:100}
.top-left{display:flex;align-items:center;gap:8px;text-decoration:none}
a.top-left{color:#FFEB3B;cursor:pointer}
a.top-left:hover{filter:brightness(1.1)}
.brand-logo{width:32px;height:32px;min-width:32px;border-radius:50%;background:#fff;padding:2px;box-shadow:0 1px 4px rgba(0,0,0,.3);object-fit:cover}
.top b{font-weight:900;white-space:nowrap}
.top-icons{display:flex;gap:8px;align-items:center;flex-shrink:0}
.icon-circle{width:36px;height:36px;min-width:36px;border-radius:50%;display:grid;place-items:center;cursor:pointer;text-decoration:none;font-size:17px;font-weight:900;box-shadow:0 2px 8px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.6);border:1.5px solid rgba(255,255,255,.35);transition:transform .15s, box-shadow .15s}
.icon-circle:active{transform:scale(.92)}
#userLogo{width:36px;height:36px;min-width:36px;background:#DBEAFE;border-radius:50%;display:grid;place-items:center;cursor:pointer;color:#0F2A5A;text-decoration:none;font-size:16px;border:1.5px solid rgba(255,255,255,.5);box-shadow:0 2px 8px rgba(0,0,0,.25)}
.icon-historial{background:linear-gradient(180deg,#FFF9C4 0%,#FFEB3B 40%,#FFC107 100%);color:#0F2A5A}
.icon-inventario{background:linear-gradient(180deg,#E8F5E9 0%,#81C784 40%,#2E7D32 100%);color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.3)}
.h{text-align:center;padding:10px 0 6px;font-weight:900;font-size:13px;color:#0F2A5A;width:100%}
.card{margin:0 10px 10px;background:#fff;border-radius:22px;padding:12px;box-shadow:none;border:none;flex:1;display:flex;flex-direction:column;gap:10px;box-sizing:border-box;width:auto}
.top2{display:flex;gap:10px}
.btn{flex:1;height:92px;background:linear-gradient(180deg,#E8F5E9 0%,#A5D6A7 15%,#4CAF50 55%,#2E7D32 100%);border:1.5px solid #2E7D32;border-radius:16px;display:grid;place-items:center;text-align:center;font-weight:800;font-size:11px;color:#FFFFFF;cursor:pointer;position:relative;overflow:hidden;box-shadow:0 4px 12px rgba(46,125,50,.35), inset 0 1px 0 rgba(255,255,255,.6);text-shadow:0 1px 2px rgba(0,0,0,.3)}
.btn::after{content:"DOBLE CLICK";position:absolute;bottom:6px;left:50%;transform:translateX(-50%);background:#0F2A5A;color:#FFEB3B;font-size:6.5px;font-weight:900;padding:2px 7px;border-radius:20px;box-shadow:0 1px 3px rgba(0,0,0,.3)}
.btn.has-img{background-size:cover;color:transparent;border-color:#2E7D32}.btn.has-img::after{content:"DOBLE CLICK"}
.row{display:flex;gap:8px}
#desc{flex:1;height:46px;border:1.5px solid #BFDBFE;border-radius:12px;padding:0 12px;font-weight:600;background:#fff;outline:none}
#pv{width:94px;height:46px;border:2px solid #0F2A5A;border-radius:12px;text-align:center;font-weight:900;background:#FFFBEB;color:#0F2A5A;font-size:16px}
.cant{display:flex;gap:10px;justify-content:center;align-items:center}
.cant button{width:46px;height:42px;border-radius:12px;border:1.5px solid #BFDBFE;font-weight:900;font-size:18px;cursor:pointer}
#mM{background:#FFF1F2;color:#BE123C} #mP{background:#EFF6FF;color:#1D4ED8}
#cd{width:54px;height:42px;background:#fff;border:1.5px solid #BFDBFE;border-radius:12px;display:grid;place-items:center;font-weight:900}
.confRow{display:flex;gap:8px;align-items:center}
#btnC{flex:1;height:52px;background:linear-gradient(180deg,#FFB74D 0%,#FF9800 15%,#FF6A00 55%,#E65100 100%);color:#FFFFFF;border:1.5px solid #E65100;border-radius:14px;font-weight:900;font-size:17px;cursor:pointer;box-shadow:0 4px 14px rgba(230,81,0,.45), inset 0 1px 0 rgba(255,255,255,.7);text-shadow:0 1px 2px rgba(0,0,0,.25);letter-spacing:.3px;transition:filter .15s, transform .15s}
#btnC:hover{filter:brightness(1.08)} #btnC:active{transform:scale(.98)}
#trash{width:52px;height:52px;min-width:52px;background:#fff;border:1.5px solid #BFDBFE;border-radius:14px;cursor:pointer;display:grid;place-items:center;font-size:32px;line-height:1;box-shadow:0 2px 6px rgba(0,0,0,.08)}
.box{padding:10px;background:#fff;border:1.5px solid #DBEAFE;border-radius:12px;font-size:11px;text-align:center;color:#334155}
#btnCli{border-color:#FECACA!important;color:#DC2626!important;font-weight:800;cursor:pointer;background:#FFFBFB!important}
#lista{max-height:160px;overflow:auto;text-align:left}
.item{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px dashed #DBEAFE;font-size:13px}
#total{margin-left:auto;width:160px;background:#061a3a;color:#FFEB3B;border-radius:10px;padding:8px;text-align:center;font-weight:900;font-size:13px}
#btnF{height:52px;background:linear-gradient(180deg,#FFB84D 0%,#FF8C1A 100%);border:1.5px solid #FF8C1A;border-radius:14px;font-weight:900;color:#0F2A5A;font-size:15px;cursor:pointer;transition:.2s}
#btnF:disabled{background:#E2E8F0!important;border-color:#CBD5E1!important;color:#94A3B8!important;cursor:not-allowed}
#qr{margin-top:8px;background:#fff;border:1.5px solid #BFDBFE;border-radius:12px;padding:12px;text-align:center;display:none}
#qrActions{display:flex;gap:8px;margin-top:12px}
#qrActions button{flex:1;height:48px;border-radius:12px;border:1.5px solid #BFDBFE;font-weight:800;font-size:11px;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.1}
#btnWA{background:#25D366;color:#fff;border-color:#25D366!important}
#btnPrint{background:#0F2A5A;color:#FFEB3B}
#btnNew{background:#fff;color:#0F2A5A}
#camModal{position:fixed;inset:0;z-index:9999;background:#000;display:none;flex-direction:column}
#camModal video{width:100%;height:100%;object-fit:cover}
#camModal .ctrl{position:absolute;bottom:24px;left:0;right:0;display:flex;justify-content:center;gap:16px}

/* LATIDO SOLO BOTON VOZ - INTACTO */
@keyframes latidoVoz{
  0%{transform:scale(1); filter:brightness(1); box-shadow:0 4px 12px rgba(46,125,50,.35), inset 0 1px 0 rgba(255,255,255,.6), 0 0 0 0 rgba(76,175,80,.6)}
  30%{transform:scale(1.06); filter:brightness(1.15); background:linear-gradient(180deg,#E8F5E9 0%,#81C784 20%,#43A047 60%,#1B5E20 100%); box-shadow:0 6px 18px rgba(46,125,50,.5), inset 0 1px 0 rgba(255,255,255,.7), 0 0 0 10px rgba(76,175,80,0)}
  60%{transform:scale(1.02); filter:brightness(0.95); background:linear-gradient(180deg,#C8E6C9 0%,#66BB6A 20%,#2E7D32 60%,#0D3B12 100%); box-shadow:0 4px 12px rgba(46,125,50,.35), inset 0 1px 0 rgba(255,255,255,.6), 0 0 0 18px rgba(76,175,80,0)}
  100%{transform:scale(1); filter:brightness(1); box-shadow:0 4px 12px rgba(46,125,50,.35), inset 0 1px 0 rgba(255,255,255,.6), 0 0 0 0 rgba(76,175,80,0)}
}
#bVoz.escuchando{
  animation: latidoVoz 1.1s infinite ease-in-out;
  border-color:#1B5E20!important;
}
#bVoz.escuchando::after{
  content:"ESCUCHANDO...";
  background:#0F2A5A;
  color:#4CAF50;
}

