/* IKURA · Stock simple y alertas (tema del panel, pensado para celular). */
.stk{display:flex;flex-direction:column;gap:14px;max-width:980px}
.stk-cargando,.stk-vacio{padding:28px 16px;text-align:center;color:var(--texto-2)}
.stk-top{display:flex;flex-direction:column;gap:10px}
.stk-buscar{display:flex;align-items:center;gap:8px;background:var(--card);border:1px solid var(--borde);border-radius:14px;padding:0 12px;min-height:50px}
.stk-buscar input{flex:1;border:0;background:transparent;color:var(--texto);font-size:1rem;min-height:48px;outline:none;padding:0}
.stk-chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}
.stk-chips::-webkit-scrollbar{display:none}
.stk-chip{flex:0 0 auto;min-height:40px;border-radius:999px;border:1px solid var(--borde);background:var(--card);color:var(--texto-2);font-weight:700;padding:0 14px;cursor:pointer;font-size:.86rem}
.stk-chip b{color:var(--texto);margin-left:4px}
.stk-chip.activo{background:var(--oro);border-color:var(--oro);color:#121212}
.stk-chip.activo b{color:#121212}
#stkCat{min-height:44px;border-radius:12px}
.stk-rapidas{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.stk-rapidas .btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:62px;font-weight:800;text-align:center;line-height:1.2}
.stk-rapidas .btn small{font-weight:500;font-size:.72rem;color:var(--texto-3)}
.stk-reponer{background:var(--card);border:1px solid rgba(229,115,92,.35);border-radius:16px;padding:12px}
.stk-reponer h3{margin:0 0 6px;display:flex;align-items:center;gap:8px;font-size:1rem}
.stk-reponer h3 span{background:var(--rojo);color:#fff;border-radius:999px;padding:1px 9px;font-size:.8rem}
.stk-fila{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--borde)}
.stk-fila:last-child{border-bottom:0}
.stk-fila-nom{flex:1;min-width:0;font-weight:700}
.stk-fila-nom small{display:block;font-weight:500;color:var(--texto-3);font-size:.78rem}
.stk-fila .btn{min-height:42px;padding:0 14px}
.stk-dot{width:10px;height:10px;border-radius:50%;flex:0 0 auto;background:var(--verde)}
.stk-dot.bajo{background:#E8C468}.stk-dot.agotado{background:var(--rojo)}
.stk-lista{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:10px}
.stk-item{display:grid;grid-template-columns:54px 1fr auto;grid-template-areas:"foto info cant" "btns btns btns" "min min min";gap:8px 12px;align-items:center;background:var(--card);border:1px solid var(--borde);border-left:4px solid var(--verde);border-radius:16px;padding:12px}
.stk-item.nivel-bajo{border-left-color:#E8C468}
.stk-item.nivel-agotado{border-left-color:var(--rojo)}
.stk-foto{grid-area:foto;width:54px;height:54px;border-radius:12px;background:var(--panel-2);display:flex;align-items:center;justify-content:center;font-size:1.6rem;overflow:hidden}
.stk-foto img{width:100%;height:100%;object-fit:cover}
.stk-info{grid-area:info;min-width:0;display:flex;flex-direction:column;gap:3px}
.stk-nombre{font-size:1rem;line-height:1.25;overflow-wrap:anywhere}
.stk-info small{color:var(--texto-3);font-size:.76rem}
.stk-info .stk-res{color:var(--texto-2)}
.stk-pill{align-self:flex-start;font-size:.74rem;font-weight:800;border-radius:999px;padding:2px 9px;background:var(--verde-suave);color:var(--verde)}
.stk-pill.bajo{background:var(--dorado-suave);color:#E8C468}
.stk-pill.agotado{background:var(--rojo-suave);color:var(--rojo)}
.stk-cant{grid-area:cant;text-align:right;line-height:1.05}
.stk-cant b{display:block;font-size:1.7rem;font-weight:900}
.stk-cant small{color:var(--texto-3);font-size:.78rem}
.nivel-agotado .stk-cant b{color:var(--rojo)}.nivel-bajo .stk-cant b{color:#E8C468}
.stk-btns{grid-area:btns;display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.stk-btns .btn{min-height:48px;padding:0 6px;font-weight:800;font-size:.86rem}
.stk-min{grid-area:min;background:none;border:0;color:var(--texto-3);font-size:.8rem;text-align:left;padding:2px 0;cursor:pointer;min-height:32px}
.stk-min:hover{color:var(--texto)}
.stk-sin{background:var(--card);border:1px solid var(--borde);border-radius:16px;padding:12px}
.stk-sin summary{font-weight:800;cursor:pointer;min-height:32px}
.stk-sin p{color:var(--texto-3);font-size:.82rem}
.stk-ayuda{color:var(--texto-3);font-size:.78rem;margin:0}
/* Modales */
.stk-m{display:flex;flex-direction:column;gap:10px}
.stk-m-prod{font-weight:900;font-size:1.1rem}
.stk-m-actual{background:var(--panel-2);border-radius:12px;padding:10px 12px;color:var(--texto-2)}
.stk-m-actual b{color:var(--texto);font-size:1.1rem}
.stk-m-actual small{display:block;color:var(--texto-3);margin-top:2px}
.stk-m-lab{font-weight:800;font-size:.9rem;margin-top:4px}
.stk-m-txt{color:var(--texto-2);font-size:.86rem;margin:0;line-height:1.45}
.stk-num{display:grid;grid-template-columns:64px 1fr 64px;gap:8px}
.stk-num .btn{min-height:60px;font-size:1.6rem;font-weight:900;padding:0}
.stk-num input{min-height:60px;font-size:1.8rem;font-weight:900;text-align:center;border-radius:14px}
.stk-m-uni{text-align:center;color:var(--texto-3);font-size:.82rem;margin-top:-4px}
.stk-m-rapidos,.stk-m-motivos{display:flex;flex-wrap:wrap;gap:8px}
.stk-m-rapidos .btn,.stk-m-motivos .btn{flex:1 1 auto;min-height:46px;font-weight:800}
.stk-m-motivos .btn.activo{background:var(--oro);border-color:var(--oro);color:#121212}
.stk-otro{min-height:46px}
.stk-m-queda{text-align:center;font-size:1.05rem;padding:8px;border-radius:12px;background:var(--panel-2);min-height:44px;display:flex;flex-direction:column;justify-content:center}
.stk-m-queda small{display:block;color:#E8C468;font-weight:700;font-size:.82rem}
.stk-m-queda .err{color:var(--rojo);font-weight:800}
.stk-guardar{min-height:56px;font-size:1.05rem;font-weight:900}
.stk-2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.stk-hist{display:flex;flex-direction:column;max-height:50vh;overflow:auto}
.stk-h-fila{display:grid;grid-template-columns:30px 1fr auto;gap:8px;padding:9px 0;border-bottom:1px solid var(--borde);align-items:center}
.stk-h-ic{font-size:1.1rem;text-align:center}
.stk-h-txt{min-width:0}.stk-h-txt b{display:block;font-size:.9rem}
.stk-h-txt small{display:block;color:var(--texto-3);font-size:.76rem;overflow-wrap:anywhere}
.stk-h-num{text-align:right}.stk-h-num b{display:block}
.stk-h-num small{color:var(--texto-3);font-size:.74rem}
.stk-h-fila.pos .stk-h-num b{color:var(--verde)}.stk-h-fila.neg .stk-h-num b{color:var(--rojo)}
.stk-h-fila.neutro .stk-h-num b{color:var(--texto-3);font-weight:600;font-size:.8rem}
.stk-h-acc{display:flex;flex-wrap:wrap;gap:8px}
.stk-h-acc .btn{flex:1 1 auto;min-height:46px}
.stk-lote{display:flex;flex-direction:column;max-height:48vh;overflow:auto;border:1px solid var(--borde);border-radius:12px}
.stk-lote-fila{display:grid;grid-template-columns:1fr 96px;grid-template-areas:"nom inp" "queda queda";gap:4px 10px;align-items:center;padding:9px 10px;border-bottom:1px solid var(--borde)}
.stk-lote-fila[hidden]{display:none}
.stk-lote-nom{grid-area:nom;font-weight:700;min-width:0;overflow-wrap:anywhere}
.stk-lote-nom small{display:block;color:var(--texto-3);font-weight:500;font-size:.76rem}
.stk-lote-fila input{grid-area:inp;min-height:48px;font-size:1.15rem;font-weight:800;text-align:center}
.stk-lote-fila input.error{border-color:var(--rojo)}
.stk-lote-queda{grid-area:queda;font-size:.82rem;color:var(--texto-2);text-align:right}
.stk-lote-queda:empty{display:none}
.stk-lote-queda .err{color:var(--rojo)}
.stk-switch{display:flex;align-items:center;gap:12px;min-height:52px;font-size:1rem;cursor:pointer}
.stk-switch input{width:26px;height:26px;accent-color:var(--oro)}
.stk-cfg input[type=range]{width:100%;accent-color:var(--oro);min-height:36px}
/* Avisos flotantes (en cualquier sección) */
.stk-avisos{position:fixed;right:16px;bottom:16px;z-index:9000;display:flex;flex-direction:column;gap:10px;width:min(420px,calc(100vw - 32px));pointer-events:none}
.stk-aviso,.stk-activar{pointer-events:auto}
.stk-aviso{display:grid;grid-template-columns:auto 1fr;gap:6px 10px;align-items:center;background:var(--panel);border:1px solid rgba(232,196,104,.6);border-left:5px solid #E8C468;border-radius:14px;padding:12px;box-shadow:0 12px 30px rgba(0,0,0,.5);animation:stkEntra .25s ease-out}
.stk-aviso.agotado{border-color:rgba(229,115,92,.7);border-left-color:var(--rojo)}
.stk-aviso-ic{font-size:1.5rem}
.stk-aviso-txt{font-weight:800;line-height:1.3;color:var(--texto)}
.stk-aviso-txt small{display:block;font-weight:500;color:var(--texto-3);font-size:.76rem}
.stk-aviso-btns{grid-column:1/-1;display:flex;gap:8px}
.stk-aviso-btns .btn.primario{flex:1;min-height:44px;font-weight:900}
.stk-aviso-btns .btn.fantasma{min-height:44px;min-width:48px}
.stk-activar{min-height:48px;font-weight:900;border-radius:14px;background:var(--oro);color:#121212;border:0;box-shadow:0 10px 24px rgba(0,0,0,.4)}
.stk-badge{background:var(--rojo)!important}
@keyframes stkEntra{from{transform:translateY(12px);opacity:0}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.stk-aviso{animation:none}}
@media (max-width:760px){
  .stk-rapidas{grid-template-columns:1fr 1fr}
  .stk-lista{grid-template-columns:1fr}
  .stk-btns{grid-template-columns:1fr 1fr}
  .stk-avisos{left:12px;right:12px;bottom:calc(76px + env(safe-area-inset-bottom));width:auto}
}

/* Ajustes tras revisión */
#modales:not(:empty) ~ .stk-avisos{display:none}
.stk-lote-fila.cambio{background:rgba(232,196,104,.12)}
