/* Livay v446 · Historial de embalaje: misma familia visual que Envíos & Despachos */
#eh-area{position:fixed;inset:0;z-index:55;display:none;background:#F2F4F3;overflow-y:auto;-webkit-overflow-scrolling:touch;font-family:Inter,-apple-system,"Segoe UI",sans-serif;color:#16262D}
html.eh-open #eh-area{display:block}
html.eh-open body{overflow:hidden}
html.eh-open .bottom-nav,html.eh-open .lv-sb,html.eh-open #ia-fab{display:none!important}
.eh-top{position:sticky;top:0;z-index:3;background:#182A31;color:#fff;display:flex;align-items:center;gap:12px;padding:calc(env(safe-area-inset-top,0px) + 12px) 16px 12px;border-bottom:3px solid #E0335A}
.eh-logo{width:44px;height:44px;border-radius:13px;border:0;padding:0;background:#0F1C21;overflow:hidden;cursor:pointer;flex:none}
.eh-logo img{width:100%;height:100%;object-fit:cover;display:block}
.eh-top b{display:block;font:700 19px Poppins,Inter,sans-serif}.eh-top small{color:#AFC0C6;font-size:12.5px}
.eh-wrap{max-width:1100px;margin:0 auto;padding:14px 14px calc(env(safe-area-inset-bottom,0px) + 110px)}
.eh-hero{background:#182A31;color:#fff;border-radius:22px;padding:16px;margin-bottom:12px}
.eh-hero>small{font:800 10.5px Inter,sans-serif;letter-spacing:.12em;color:#FF7A95}
.eh-hero>b{display:block;font:800 22px Poppins,Inter,sans-serif;margin:4px 0 2px}
.eh-hero>p{margin:0;color:#AFC0C6;font-size:12.5px}
.eh-hero .kp{display:flex;gap:8px;margin-top:12px}
.eh-hero .kp div{flex:1;background:rgba(255,255,255,.08);border-radius:14px;padding:9px 10px}
.eh-hero .kp b{display:block;font:800 18px Inter,sans-serif}.eh-hero .kp small{color:#AFC0C6;font-size:11px}
.eh-fcard{background:#fff;border-radius:18px;padding:10px;margin-bottom:10px;box-shadow:0 1px 2px rgba(11,18,21,.05),0 4px 14px rgba(11,18,21,.06)}
.eh-srch{display:flex;align-items:center;gap:8px;background:#F4F6F5;border-radius:14px;padding:11px 12px}
.eh-srch svg{width:18px;height:18px;fill:none;stroke:#8A979C;stroke-width:2;stroke-linecap:round;flex:none}
.eh-srch input{border:0;outline:0;background:transparent;flex:1;font:600 14px Inter,sans-serif;color:#16262D;min-width:0}
.eh-ch{display:flex;gap:6px;margin-top:8px;overflow-x:auto;scrollbar-width:none}
.eh-ch button{flex:none;border:0;border-radius:999px;padding:7px 12px;background:#F4F6F5;font:700 12.5px Inter,sans-serif;color:#6B7A80;cursor:pointer}
.eh-ch button.on{background:#16262D;color:#fff}
.eh-ch em{font-style:normal;margin-left:6px;opacity:.75}
.eh-day{font:800 11px Inter,sans-serif;letter-spacing:.08em;color:#8A979C;margin:14px 4px 8px;text-transform:uppercase}
.eh-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:10px}
.eh-c{background:#fff;border-radius:18px;padding:12px;box-shadow:0 1px 2px rgba(11,18,21,.05),0 4px 14px rgba(11,18,21,.06);cursor:pointer;display:flex;flex-direction:column;gap:10px;min-width:0;animation:ehIn .4s cubic-bezier(.34,1.4,.64,1) both}
@keyframes ehIn{from{opacity:0;transform:scale(.95)}to{opacity:1;transform:none}}
.eh-ca{display:flex;gap:12px;min-width:0}
.eh-ph{width:86px;height:104px;border-radius:14px;flex:none;position:relative;overflow:hidden;background:#1d2a30}
.eh-ph img{width:100%;height:100%;object-fit:cover;display:block}
.eh-ph em{position:absolute;right:5px;bottom:5px;background:rgba(0,0,0,.55);color:#fff;border-radius:999px;font:800 10px/1 Inter,sans-serif;font-style:normal;padding:4px 7px}
.eh-inf{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.eh-r1{display:flex;align-items:center;justify-content:space-between;gap:6px}
.eh-est{display:inline-flex;align-items:center;border-radius:999px;padding:4px 9px;font:800 11px Inter,sans-serif;white-space:nowrap}
.eh-est.ok{background:#E8F6EC;color:#16A34A}.eh-est.pe{background:#FFF4E5;color:#B45309}
.eh-ag{display:inline-flex;align-items:center;justify-content:center;height:24px;min-width:62px;padding:0 6px;border-radius:7px;background:#16262D;flex:none}
.eh-ag.sh{background:#ED1C24}.eh-ag.mv{background:#fff;border:1px solid #E6E8E7}
.eh-ag img{max-height:15px;max-width:100%;width:auto;height:auto;display:block}
.eh-ag b{color:#fff;font:900 10px Inter,sans-serif}
.eh-cn{font:800 16px/1.25 Inter,sans-serif;overflow-wrap:anywhere}
.eh-sub{font-size:12px;color:#6B7A80}
.eh-by{font-size:12.5px;color:#6B7A80}.eh-by b{color:#16262D}
.eh-chs{display:flex;flex-wrap:wrap;gap:6px}
.eh-chs span{border:1px solid #E6E8E7;background:#fff;border-radius:99px;padding:2px 9px;font:700 11.5px/1.5 Inter,sans-serif}
.eh-chs.eh-chtop{margin:2px 0 10px}.eh-chs.eh-chtop .eh-est{border:0;padding:4px 10px}
.eh-pc{cursor:pointer}
.eh-per{display:flex;align-items:center;gap:12px}.eh-per b{display:block;font:800 16px Inter,sans-serif}.eh-per small{color:#6B7A80;font-size:12px}
.eh-per .n{margin-left:auto;text-align:right}.eh-per .n b{font-size:22px}
.eh-bar{height:6px;border-radius:3px;background:#EEF1F2;overflow:hidden}.eh-bar u{display:block;height:100%;border-radius:3px;background:#E0335A}
.eh-back{border:0;background:#fff;border-radius:999px;padding:8px 13px;font:700 12.5px Inter,sans-serif;margin-bottom:10px;cursor:pointer;box-shadow:0 1px 2px rgba(11,18,21,.06)}
.eh-empty{text-align:center;background:#fff;border-radius:18px;padding:30px 16px;color:#6B7A80}
.eh-empty b{display:block;color:#16262D;font:800 15px Inter,sans-serif;margin-bottom:4px}.eh-empty p{margin:0;font-size:13px}
/* barra de secciones con píldora */
.eh-nav{position:fixed;left:12px;right:12px;bottom:calc(env(safe-area-inset-bottom,0px) + 10px);max-width:560px;margin:0 auto;height:64px;background:#182A31;border-radius:22px;display:flex;align-items:center;padding:0 6px;z-index:4;box-shadow:0 10px 28px rgba(11,18,21,.25)}
.eh-nav button{flex:1;height:52px;margin:0 3px;border:0;border-radius:16px;background:transparent;color:#9FB0B6;font:700 11px Inter,sans-serif;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;cursor:pointer;position:relative;z-index:1}
.eh-nav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.eh-nav button.on{color:#fff}
.eh-pill{position:absolute;top:6px;height:52px;border-radius:16px;background:#E0335A;transition:left .38s cubic-bezier(.34,1.4,.64,1),width .38s;z-index:0;box-shadow:0 6px 16px rgba(224,51,90,.35)}
/* detalle (como Envíos & Despachos) */
.eh-sheet{position:fixed;inset:0;z-index:60;background:rgba(22,38,45,.30);-webkit-backdrop-filter:blur(7px) saturate(1.2);backdrop-filter:blur(7px) saturate(1.2);display:flex;align-items:flex-end;justify-content:center;animation:ehVeil .3s ease both}
.eh-sheet[hidden]{display:none}
@keyframes ehVeil{from{opacity:0}to{opacity:1}}
.eh-sheet .bx{width:100%;max-width:640px;max-height:90vh;overflow-y:auto;background:#F2F4F3;border-radius:26px 26px 0 0;padding:16px 16px calc(env(safe-area-inset-bottom,0px) + 20px);animation:ehUp .5s cubic-bezier(.32,.72,0,1) both}
@keyframes ehUp{0%{transform:translateY(100%)}70%{transform:translateY(-1.5%)}100%{transform:none}}
@media (min-width:760px){.eh-sheet{align-items:center}.eh-sheet .bx{border-radius:26px}}
.eh-dh,.ops-modal-box .eh-dh{display:flex;align-items:flex-start;gap:10px;margin-bottom:8px}
.eh-dh .t{flex:1;min-width:0}.eh-dh .t b{display:block;font:800 20px/1.25 Inter,sans-serif}.eh-dh .t small{color:#6B7A80;font-size:13px}
.eh-slg{height:30px;width:auto;flex:none;margin-top:4px}
.eh-dh .x{width:42px;height:42px;border-radius:50%;border:0;background:#fff;font-size:18px;cursor:pointer;flex:none;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.eh-ims{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(46%,1fr);gap:10px;overflow-x:auto;scrollbar-width:none;margin-bottom:10px}
.eh-th{position:relative;border:0;padding:0;border-radius:16px;overflow:hidden;background:#fff;aspect-ratio:4/3;cursor:pointer;box-shadow:0 1px 2px rgba(11,18,21,.05),0 4px 14px rgba(11,18,21,.06)}
.eh-th img{width:100%;height:100%;object-fit:cover;object-position:top;display:block}
.eh-th .zm{position:absolute;right:8px;top:8px;width:30px;height:30px;border-radius:9px;background:rgba(22,38,45,.7);display:grid;place-items:center}
.eh-th .zm svg{width:16px;height:16px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round}
.eh-th small{position:absolute;left:8px;bottom:8px;background:rgba(22,38,45,.85);color:#fff;border-radius:999px;padding:4px 10px;font:700 12px Inter,sans-serif}
.eh-th0{display:grid;place-items:center;background:#EEF1F2;cursor:default;color:#8A979C;font:600 12px Inter,sans-serif;text-align:center;padding:10px}
.eh-agd{display:grid;grid-template-columns:40% 1fr;gap:10px;margin-bottom:10px}
.eh-ag.big{height:auto;min-height:62px;border-radius:16px;padding:10px 12px}.eh-ag.big img{max-height:30px}.eh-ag.big b{font-size:14px}
.eh-agi{background:#fff;border-radius:16px;padding:10px 14px;display:flex;flex-direction:column;justify-content:center;box-shadow:0 1px 2px rgba(11,18,21,.05)}
.eh-agi small,.eh-dta small{font:800 11px Inter,sans-serif;letter-spacing:.06em;color:#8A979C;text-transform:uppercase}
.eh-agi b{font:800 16px Inter,sans-serif}
.eh-dta{display:flex;flex-direction:column;gap:10px}
.eh-dta .tl{background:#fff;border-radius:16px;padding:10px 14px;box-shadow:0 1px 2px rgba(11,18,21,.05);display:flex;flex-direction:column;gap:2px}
.eh-dta .tl b{font:800 16px Inter,sans-serif;overflow-wrap:anywhere}.eh-dta .tl span{color:#6B7A80;font-size:12.5px}
.eh-dta .two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (prefers-reduced-motion:reduce){.eh-c,.eh-sheet,.eh-sheet .bx{animation:none}.eh-pill{transition:none}}

/* v447 · compacto y «Embalado por» destacado */
.eh-byb{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#182A31;color:#fff;border-radius:14px;padding:9px 12px}
.eh-byb span{display:flex;flex-direction:column;min-width:0}
.eh-byb small{font:800 10px Inter,sans-serif;letter-spacing:.1em;color:#FF7A95}
.eh-byb b{font:800 17px/1.2 Inter,sans-serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.eh-byb em{font-style:normal;font:700 12px Inter,sans-serif;color:#AFC0C6;white-space:nowrap}
.eh-dh+.eh-byb{margin-bottom:8px}
.eh-ims{grid-auto-columns:minmax(40%,1fr);gap:8px;margin-bottom:8px}
.eh-th{aspect-ratio:16/11}
.eh-agd{display:flex;align-items:center;gap:10px;background:#fff;border-radius:14px;padding:8px 10px;margin-bottom:8px;box-shadow:0 1px 2px rgba(11,18,21,.05)}
.eh-agd .eh-ag{height:34px;min-width:96px;border-radius:9px;padding:0 10px}
.eh-agd .eh-ag img{max-height:20px}
.eh-agi{background:transparent;box-shadow:none;padding:0;min-width:0}
.eh-agi small{font-size:10px}.eh-agi b{font-size:14.5px;line-height:1.2}
.eh-dta{display:grid;grid-template-columns:1fr 1fr;gap:0;background:#fff;border-radius:14px;padding:4px 12px;box-shadow:0 1px 2px rgba(11,18,21,.05)}
.eh-dta .kv{padding:7px 0;border-bottom:1px solid #EEF1F2;min-width:0}
.eh-dta .kv.w{grid-column:1/-1}
.eh-dta .kv:last-child,.eh-dta .kv:nth-last-child(2):not(.w){border-bottom:0}
.eh-dta .kv small{display:block;font:800 10px Inter,sans-serif;letter-spacing:.06em;color:#8A979C;text-transform:uppercase}
.eh-dta .kv b{font:700 14px/1.3 Inter,sans-serif;overflow-wrap:anywhere}
.eh-dta .kv b span{color:#6B7A80;font-weight:600;font-size:12.5px}
/* Almacén: totales en una línea */
.ehp-pay{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 8px}
.ehp-pay span{background:#fff;border-radius:999px;padding:6px 11px;font:600 12.5px Inter,sans-serif;color:#6B7A80;box-shadow:0 1px 2px rgba(11,18,21,.06)}
.ehp-pay b{color:#16262D;font-weight:800}
.ehp-pay .ok{background:#E8F6EC;color:#16A34A;font-weight:800}.ehp-pay .due{background:#FDECEF;color:#C2264B;font-weight:800}
.ops-modal-box .ehp-hint{text-align:center;margin:4px 0 8px}
/* v452 · buscador sin «caja dentro de la caja» */
.eh-srch input,.ed-srch input{border:0!important;background:transparent!important;box-shadow:none!important;outline:none!important;padding:0!important;min-height:0!important;height:auto!important;border-radius:0!important}
/* v452 · tarjeta proporcional: foto | datos | logo de la agencia en cuadrado; sin espacios vacíos */
.eh-c{gap:8px;padding:10px}
.eh-ca{display:grid;grid-template-columns:88px minmax(0,1fr) 62px;gap:10px;align-items:stretch}
.eh-ph{width:88px;height:auto;min-height:96px;align-self:stretch}
.eh-inf{gap:3px;justify-content:center}
.eh-inf .eh-est{align-self:flex-start}
.eh-cn{font-size:16px}
.eh-mini{display:flex;gap:6px;margin-top:3px}
.eh-mini span{background:#F4F6F5;border-radius:999px;padding:2px 9px;font:800 12px Inter,sans-serif;color:#16262D}
.eh-agsq{width:62px;height:62px;border-radius:16px;display:grid;place-items:center;padding:8px;align-self:start;background:#16262D;box-shadow:0 2px 8px rgba(11,18,21,.08)}
.eh-agsq.sh{background:#ED1C24}.eh-agsq.mv{background:#fff;border:1px solid #E6E8E7}
.eh-agsq img{max-width:100%;max-height:100%;width:auto;height:auto;display:block}
.eh-agsq b{color:#fff;font:900 11px Inter,sans-serif;text-align:center}
.eh-byb{padding:8px 12px}/* v452b · más fuerte que el estilo general de los campos */
html body #eh-area .eh-srch input,html body #eh-area .eh-srch input[type=text],html body #ed-area .ed-srch input,html body #ed-area .ed-srch input[type=text]{border:0!important;background:transparent!important;box-shadow:none!important;outline:none!important;padding:0!important;min-height:0!important;height:auto!important;border-radius:0!important}
.eh-grid{align-items:start}
.eh-ph{height:96px!important;min-height:96px!important;align-self:start!important}
.eh-ca{align-items:start}
.eh-agsq{width:64px;height:64px;padding:6px;overflow:hidden}
.eh-agsq img{width:100%;max-height:none;transform:scale(1.3)}
/* v462 · Shalom ocupa todo su recuadro */
.eh-ag.sh,.eh-agsq.sh{background:#E32421!important;padding:0!important}.eh-ag.sh img,.eh-agsq.sh img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important}

/* v495 · pedido embalado sin foto */
.eh-ph.eh-ph0{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:#E8EAE9;color:#5f6869}
.eh-ph.eh-ph0 b{font-size:26px;line-height:1}.eh-ph.eh-ph0 small{font-size:11px;font-weight:600}

/* v545 · franja de la agencia (Almacén › detalle del pedido y Embalaje): igual que en Envíos & Despachos.
   Antes el logo de Shalom no tenía ancho fijo y tomaba el ancho real de la imagen: la franja roja se salía por la derecha
   y tapaba el nombre de la agencia. Ahora: recuadro del logo a la izquierda (1/3) y la agencia a la derecha (2/3). */
html body .eh-agd{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:8px;align-items:stretch;background:transparent!important;box-shadow:none!important;padding:0!important;margin:0 0 8px!important;overflow:hidden}
html body .eh-agd .eh-ag{width:100%!important;min-width:0!important;height:auto!important;min-height:56px;border-radius:12px!important;padding:8px 10px!important;display:grid!important;place-items:center;overflow:hidden;box-sizing:border-box}
html body .eh-agd .eh-ag.sh{padding:0!important}
html body .eh-agd .eh-ag img{width:auto!important;height:auto!important;max-width:100%!important;max-height:30px!important;object-fit:contain!important;display:block}
html body .eh-agd .eh-ag.sh img{width:88%!important;max-width:88%!important;max-height:40px!important}
html body .eh-agd .eh-ag b{font:800 13px/1.2 Inter,sans-serif;text-align:center}
html body .eh-agd .eh-agi{background:#F5F6F5!important;border-radius:12px;padding:8px 12px!important;display:flex;flex-direction:column;justify-content:center;min-width:0}
html body .eh-agd .eh-agi small{display:block;font:700 11px/1.2 Inter,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:#6B7479;margin:0 0 2px}
html body .eh-agd .eh-agi b{display:block;font:800 15px/1.3 Inter,sans-serif;overflow-wrap:anywhere}
