:root {
  --acento: #f2b01e;
  --acento-osc: #d99a0b;
  --acento-suave: #fdf3dc;
  --tinta: #15171c;
  --tinta-2: #1f222a;
  --tinta-3: #2b2f39;
  --fondo: #f4f5f7;
  --tarjeta: #ffffff;
  --texto: #15171c;
  --texto-2: #5b616e;
  --texto-3: #8a909c;
  --borde: #e6e8ec;
  --ok: #16a34a;
  --ok-suave: #e8f6ee;
  --mal: #dc2626;
  --mal-suave: #fdecec;
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --sombra-1: 0 1px 2px rgba(21, 23, 28, .05), 0 1px 1px rgba(21, 23, 28, .03);
  --sombra-2: 0 8px 24px rgba(21, 23, 28, .08), 0 2px 6px rgba(21, 23, 28, .04);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texto);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--fondo); min-height: 100dvh; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3, p { margin: 0; }

.ico {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 18px; border-radius: var(--r-sm);
  font-weight: 600; font-size: 15px; transition: background .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-primario { background: var(--acento); color: var(--tinta); }
.btn-primario:active { background: var(--acento-osc); }
.btn-sec { background: var(--tarjeta); border: 1px solid var(--borde); color: var(--texto); height: 44px; font-size: 14px; }
.btn-peligro { background: var(--mal); color: #fff; }
.btn-icono {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; color: var(--texto);
}
.btn-icono:active { background: var(--borde); }

/* =================== LOGIN =================== */
.login {
  position: relative; overflow: hidden;
  min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--tinta); color: #fff;
  padding: calc(24px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));
}
.login-fondo {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 380px at 85% -10%, rgba(242, 176, 30, .22), transparent 60%),
    radial-gradient(500px 300px at -10% 110%, rgba(242, 176, 30, .10), transparent 60%);
}
.login-fondo::after {
  content: ""; position: absolute; inset: 0; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='64' viewBox='0 0 56 64'%3E%3Cpath d='M28 2 54 17v30L28 62 2 47V17Z' fill='none' stroke='%23f2b01e' stroke-width='1.5'/%3E%3C/svg%3E");
  background-size: 56px 64px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 55%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 55%);
}
.login-cuerpo {
  position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center;
  width: 100%; max-width: 400px; margin: 0 auto;
}
.login-marca { text-align: center; margin-bottom: 32px; }
.login-marca img { border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.login-marca h1 { margin-top: 16px; font-size: 32px; font-weight: 700; letter-spacing: -.5px; }
.login-marca p { margin-top: 4px; color: #9aa0ab; font-size: 14px; }

.login-form {
  display: flex; flex-direction: column; gap: 16px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--r-lg); padding: 24px 20px;
  backdrop-filter: blur(8px);
}
.login-form h2 { font-size: 18px; font-weight: 600; }

.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > span { font-size: 13px; font-weight: 500; color: #9aa0ab; }
.campo-caja {
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 14px; border-radius: var(--r-sm);
  background: var(--tinta-2); border: 1px solid var(--tinta-3);
  transition: border-color .15s, box-shadow .15s;
}
.campo-caja .ico { color: #6b7280; width: 20px; height: 20px; }
.campo-caja:focus-within { border-color: var(--acento); box-shadow: 0 0 0 3px rgba(242, 176, 30, .18); }
.campo-caja:focus-within > .ico { color: var(--acento); }
.campo-caja input {
  flex: 1; min-width: 0; height: 100%;
  background: none; border: 0; outline: none;
  color: #fff; font: inherit; font-size: 17px;
}
#pin { letter-spacing: 6px; }
.ver-pin { color: #6b7280; display: grid; place-items: center; width: 32px; height: 32px; }

.error {
  font-size: 14px; color: #fca5a5;
  background: rgba(220, 38, 38, .12); border: 1px solid rgba(220, 38, 38, .25);
  padding: 10px 12px; border-radius: var(--r-sm);
}
.login-form .btn-primario { height: 52px; font-size: 16px; margin-top: 4px; }
.login-pie { position: relative; text-align: center; color: #5b616e; font-size: 12px; margin-top: 24px; }

/* =================== APP =================== */
.app { max-width: 560px; margin: 0 auto; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }

.barra {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  margin: 0 -16px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
  background: rgba(244, 245, 247, .92); backdrop-filter: blur(12px);
}
.barra .btn-icono {
  width: 42px; height: 42px; background: var(--tarjeta); border: 1px solid var(--borde);
  box-shadow: var(--sombra-1); outline: none;
}
.barra .btn-icono .ico { width: 21px; height: 21px; stroke-width: 2.2; }
.btn-icono:focus { outline: none; }
.btn-icono:focus-visible { box-shadow: 0 0 0 3px rgba(242, 176, 30, .35); }
.barra-centro { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.barra-logo { display: none; width: 26px; height: 26px; }
.app.en-inicio .barra-logo { display: block; }
.barra-titulo { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app.en-inicio .barra-titulo { font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
/* estado de conexión: píldora con punto que late */
.estado-red {
  height: 30px; padding: 0 10px 0 9px; border-radius: 99px; flex: none;
  display: flex; align-items: center; gap: 6px;
  background: var(--ok-suave); color: var(--ok); font-size: 12px; font-weight: 700;
}
.red-punto { position: relative; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.red-punto::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: currentColor;
  animation: red-late 2s ease-out infinite;
}
@keyframes red-late { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(2.6); opacity: 0; } }
.estado-red.off { background: var(--mal-suave); color: var(--mal); }
.estado-red.off .red-punto::after { animation: none; }

.pantalla { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }

/* saludo: momento del día con icono, nombre grande, fecha en píldora y avatar */
.hola { display: flex; align-items: center; gap: 14px; padding: 6px 2px 2px; }
.hola-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.hola-momento {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--acento-osc); text-transform: uppercase; letter-spacing: .6px;
}
.hola-momento .ico { width: 18px; height: 18px; stroke-width: 2; }
.hola-momento.noche { color: #6366f1; }
.hola-nombre {
  margin: 2px 0 8px; font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -.8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.fecha {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px 0 9px; border-radius: 99px;
  background: var(--tarjeta); border: 1px solid var(--borde); box-shadow: var(--sombra-1);
  font-size: 12.5px; font-weight: 600; color: var(--texto-2);
}
.fecha .ico { width: 15px; height: 15px; color: var(--acento-osc); stroke-width: 2; }
.hola-avatar {
  position: relative; flex: none; width: 60px; height: 60px; border-radius: 20px; padding: 0;
  display: grid; place-items: center; font-size: 21px; font-weight: 800; color: var(--tinta); letter-spacing: -.5px;
  background: linear-gradient(145deg, #ffcb4d, var(--acento) 55%, var(--acento-osc));
  box-shadow: 0 8px 20px rgba(242, 176, 30, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
  transform: rotate(-4deg); transition: transform .2s;
}
.hola-avatar::after {
  content: ""; position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ok); border: 3px solid var(--fondo);
}
.app:has(.estado-red.off) .hola-avatar::after { background: var(--texto-3); }
.hola-avatar:active { transform: rotate(0) scale(.95); }

/* acceso principal: tarjeta oscura con panal de fondo y brillo ámbar */
.crear-pedido {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 16px; text-align: left;
  width: 100%; padding: 20px 18px; border-radius: var(--r-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(242, 176, 30, .28), transparent 55%),
    linear-gradient(135deg, #1f2229, var(--tinta) 60%);
  color: #fff; box-shadow: 0 12px 28px rgba(21, 23, 28, .28), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: transform .12s, box-shadow .2s;
}
/* panal tenue a la derecha */
.crear-pedido::before {
  content: ""; position: absolute; z-index: -1; right: -10px; top: -14px; width: 150px; height: 130px; opacity: .1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='48' viewBox='0 0 28 48'%3E%3Cpath d='M14 0l14 8v16l-14 8L0 24V8zM14 32v16' fill='none' stroke='%23f2b01e' stroke-width='1.5'/%3E%3C/svg%3E");
  -webkit-mask: linear-gradient(to left, #000 30%, transparent); mask: linear-gradient(to left, #000 30%, transparent);
}
.crear-pedido:active { transform: scale(.985); box-shadow: 0 6px 16px rgba(21, 23, 28, .25); }
.crear-ico {
  width: 58px; height: 58px; border-radius: 17px; flex: none; display: grid; place-items: center;
  background: linear-gradient(145deg, #ffcb4d, var(--acento) 55%, var(--acento-osc));
  box-shadow: 0 6px 16px rgba(242, 176, 30, .35), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.crear-ico svg { width: 40px; height: 40px; }
.ci-hoja { fill: #fff; stroke: var(--tinta); stroke-width: 2.4; }
.ci-clip { fill: var(--tinta); }
.ci-lineas { fill: none; stroke: var(--acento-osc); stroke-width: 2.6; stroke-linecap: round; }
.ci-mas-fondo { fill: var(--tinta); stroke: #ffcb4d; stroke-width: 2; }
.ci-mas { fill: none; stroke: var(--acento); stroke-width: 2.8; stroke-linecap: round; }
.crear-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.crear-txt strong { font-size: 19px; letter-spacing: -.01em; }
.crear-txt span { font-size: 13px; color: #a3a9b4; }
.crear-flecha {
  width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: rgba(242, 176, 30, .14); color: var(--acento); transition: transform .2s;
}
.crear-flecha .ico { width: 20px; height: 20px; stroke-width: 2.4; }
.crear-pedido:hover .crear-flecha, .crear-pedido:active .crear-flecha { transform: translateX(3px); }

/* venta del día */
/* venta del día: monto grande, barras de 7 días y avance mandado / por mandar */
.venta {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--r-lg);
  padding: 16px 18px 14px; box-shadow: var(--sombra-2);
}
.venta::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: radial-gradient(90% 120% at 100% 0%, rgba(22, 163, 74, .10), transparent 60%);
}
.venta-cab { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--texto-2); }
.venta-ico {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(145deg, #4ade80, var(--ok)); color: #fff;
  box-shadow: 0 4px 10px rgba(22, 163, 74, .3);
}
.venta-ico .ico { width: 20px; height: 20px; stroke-width: 2.2; }
.venta-var {
  margin-left: auto; font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 99px; background: var(--ok-suave); color: var(--ok);
}
.venta-var.baja { background: var(--mal-suave); color: var(--mal); }
.venta-medio { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 12px; }
.venta-monto { display: block; font-size: 36px; line-height: 1; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.venta-monto small { font-size: 18px; font-weight: 700; color: var(--texto-3); letter-spacing: 0; margin-left: 1px; }
.venta-pie { font-size: 13px; color: var(--texto-2); margin-top: 6px; }
.venta-barras { display: flex; align-items: flex-end; gap: 5px; height: 48px; flex: none; }
.venta-barras span {
  position: relative; width: 9px; min-height: 4px; border-radius: 4px 4px 2px 2px; background: var(--borde);
  transform-origin: bottom; animation: barra-crece .6s cubic-bezier(.2, .8, .2, 1) backwards;
}
.venta-barras span.hoy { background: linear-gradient(180deg, #4ade80, var(--ok)); }
.venta-barras span.hoy::after {
  content: attr(data-dia); position: absolute; left: 50%; bottom: -15px; transform: translateX(-50%);
  font-size: 9px; font-weight: 700; color: var(--ok);
}
@keyframes barra-crece { from { transform: scaleY(0); } }
.venta-avance { display: flex; height: 8px; margin-top: 16px; border-radius: 99px; background: var(--acento-suave); overflow: hidden; }
.venta-avance span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #4ade80, var(--ok)); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.venta-split { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; font-size: 12px; color: var(--texto-2); }
.venta-split div { display: flex; align-items: center; gap: 6px; min-width: 0; }
.venta-split b { color: var(--texto); font-variant-numeric: tabular-nums; }
.punto { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.punto.ok { background: var(--ok); }
.punto.pend { background: var(--acento); }
@media (prefers-reduced-motion: reduce) { .venta-barras span { animation: none; } }

/* colores por categoría */
[data-cat="clientes"] { --cat: #2563eb; --cat-suave: #e8effd; --cat-claro: #7aa5f8; }
[data-cat="pedidos"]  { --cat: #7c3aed; --cat-suave: #f1ebfd; --cat-claro: #b394f6; }
[data-cat="cobranza"] { --cat: #059669; --cat-suave: #e3f5ee; --cat-claro: #5fd0a6; }
[data-cat="catalogo"] { --cat: #ea580c; --cat-suave: #fdeee4; --cat-claro: #f8a26f; }
[data-cat="reportes"] { --cat: #4f46e5; --cat-suave: #eef2ff; --cat-claro: #a5b4fc; }
[data-cat="pedido"]   { --cat-claro: var(--acento); }

/* accesos rápidos */
.accesos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* accesos: la tarjeta toma el color de su categoría */
.acceso {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: 14px; border-radius: var(--r-lg); min-height: 112px;
  background: linear-gradient(145deg, var(--cat-claro), var(--cat) 70%);
  color: #fff; box-shadow: 0 8px 18px -6px var(--cat);
  font-size: 16px; font-weight: 700; text-align: left;
  transition: transform .12s, box-shadow .2s;
}
.acceso-ico {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .22); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.acceso-ico .ico { width: 26px; height: 26px; stroke-width: 2; }
.acceso-txt { margin-top: auto; text-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.acceso-fondo {
  position: absolute; z-index: -1; right: -14px; bottom: -16px; width: 86px; height: 86px;
  fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  opacity: .16; transform: rotate(-12deg);
}
.acceso-fondo [fill="currentColor"] { fill: #fff; }
.acceso:active { transform: scale(.97); box-shadow: 0 4px 10px -4px var(--cat); }

/* pantalla en construcción */
.vacia { align-items: center; text-align: center; padding-top: 72px; gap: 10px; }
.vacia-ico {
  width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center;
  background: var(--tinta); color: var(--acento); margin-bottom: 6px;
}
.vacia-ico .ico { width: 32px; height: 32px; }
.vacia h2 { font-size: 20px; }
.vacia p { color: var(--texto-2); font-size: 14px; }
.vacia .btn { margin-top: 12px; }

/* =================== MENÚ LATERAL =================== */
.menu-fondo {
  position: fixed; inset: 0; z-index: 20; background: rgba(21, 23, 28, .45);
  animation: aparecer .2s ease;
}
.menu {
  position: fixed; z-index: 21; top: 0; bottom: 0; left: 0;
  width: min(304px, 86vw);
  display: flex; flex-direction: column;
  background: var(--tinta); color: #fff;
  padding: 0 12px calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-102%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  border-radius: 0 24px 24px 0; overflow: hidden;
}
.menu.abierto { transform: translateX(0); box-shadow: 10px 0 40px rgba(0, 0, 0, .3); }

.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--acento); color: var(--tinta);
  font-weight: 700; font-size: 15px;
}
/* encabezado: marca y tarjeta del usuario sobre brillo ámbar */
.menu-perfil {
  margin: 0 -12px 6px; padding: calc(18px + env(safe-area-inset-top)) 18px 18px;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(242, 176, 30, .32), transparent 60%),
    linear-gradient(180deg, #20232b, var(--tinta));
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.menu-marca { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; letter-spacing: -.2px; margin-bottom: 18px; }
.menu-yo { display: flex; align-items: center; gap: 12px; }
.menu-yo > div { min-width: 0; }
.menu-yo .avatar {
  position: relative; width: 52px; height: 52px; border-radius: 17px; font-size: 18px; font-weight: 800;
  background: linear-gradient(145deg, #ffcb4d, var(--acento) 55%, var(--acento-osc));
  box-shadow: 0 6px 16px rgba(242, 176, 30, .35), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.menu-yo .avatar::after {
  content: ""; position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--ok); border: 3px solid var(--tinta);
}
.menu-yo strong { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-rol {
  display: inline-block; margin-top: 4px; padding: 2px 9px; border-radius: 99px;
  background: rgba(242, 176, 30, .16); color: var(--acento);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
}

.menu-items { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; padding-bottom: 8px; }
.menu-seccion { margin: 12px 12px 4px; font-size: 11px; font-weight: 700; color: #5f6571; text-transform: uppercase; letter-spacing: .8px; }
.menu-item {
  position: relative; width: 100%; display: flex; align-items: center; gap: 12px;
  min-height: 50px; padding: 6px 10px; border-radius: 14px;
  font-size: 15px; font-weight: 600; text-align: left; color: #d4d7dd;
  transition: background .15s;
}
.mi-ico {
  width: 36px; height: 36px; border-radius: 11px; flex: none; display: grid; place-items: center;
  background: color-mix(in srgb, var(--cat) 20%, transparent); color: var(--cat-claro);
}
.mi-ico .ico { width: 20px; height: 20px; }
.mi-txt { flex: 1; min-width: 0; }
.mi-sub { position: absolute; left: 58px; bottom: 5px; font-size: 11px; font-weight: 500; color: #6b717d; }
[data-accion="sync"] .mi-txt { margin-top: -12px; }
.mi-badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center;
  background: var(--acento); color: var(--tinta); font-size: 12px; font-weight: 800;
}
.menu-item:active { background: var(--tinta-2); }
.menu-item.activo { background: linear-gradient(90deg, rgba(242, 176, 30, .16), rgba(242, 176, 30, .04)); color: #fff; }
.menu-item.activo::before {
  content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--acento);
}
.menu-item.activo .mi-ico { background: var(--acento); color: var(--tinta); }
[data-cat="inicio"] { --cat: #f2b01e; --cat-claro: #f6c453; }
[data-cat="pedido"] { --cat: #f2b01e; }
[data-cat="sync"]   { --cat: #64748b; --cat-claro: #a3adbd; }

.menu-pie { padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .07); }
.menu-salir {
  width: 100%; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .25); color: #f87171;
  font-size: 15px; font-weight: 700;
}
.menu-salir .ico { width: 19px; height: 19px; }
.menu-salir:active { background: rgba(248, 113, 113, .2); }
.menu-version { font-size: 11.5px; color: #5b616e; text-align: center; padding-top: 10px; }

/* =================== DIÁLOGO =================== */
.dialogo-fondo {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px;
  background: rgba(21, 23, 28, .55); animation: aparecer .15s ease;
}
.dialogo {
  width: 100%; max-width: 340px; text-align: center;
  background: var(--tarjeta); border-radius: 20px; padding: 24px 20px 20px;
  box-shadow: var(--sombra-2); animation: subir .2s cubic-bezier(.2, .8, .2, 1);
}
.dialogo-ico {
  width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 14px;
  display: grid; place-items: center; background: var(--mal-suave); color: var(--mal);
}
.dialogo h3 { font-size: 18px; }
.dialogo p { font-size: 14px; color: var(--texto-2); margin-top: 6px; line-height: 1.45; }
.dialogo-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.dialogo-btns .btn { height: 46px; }

/* =================== TOAST =================== */
.toast {
  position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
  bottom: calc(24px + env(safe-area-inset-bottom));
  background: var(--tinta); color: #fff; padding: 12px 16px; border-radius: 12px;
  font-size: 14px; font-weight: 500; max-width: calc(100% - 32px);
  box-shadow: var(--sombra-2);
}

@keyframes aparecer { from { opacity: 0; } }
@keyframes subir { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 340px) {
  .accesos { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =================== PEDIDO =================== */
.btn.ancho { width: 100%; }
.btn.grande { height: 54px; font-size: 16px; }
.btn-icono.suave { background: var(--fondo); border: 1px solid var(--borde); color: var(--texto-2); }

.paso { display: flex; flex-direction: column; gap: 12px; }

/* buscador */
.buscador {
  display: flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 14px; border-radius: var(--r-md);
  background: var(--tarjeta); border: 1px solid var(--borde); box-shadow: var(--sombra-1);
}
.buscador:focus-within { border-color: var(--acento); box-shadow: 0 0 0 3px rgba(242, 176, 30, .18); }
.buscador .ico { color: var(--texto-3); width: 20px; height: 20px; }
.buscador input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; font-size: 16px; color: var(--texto); }
.buscador-fijo {
  position: sticky; top: calc(60px + env(safe-area-inset-top)); z-index: 4;
  display: flex; flex-direction: column; gap: 8px;
  margin: 0 -16px; padding: 8px 16px; background: rgba(244, 245, 247, .94); backdrop-filter: blur(12px);
}
.filtros { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.filtros::-webkit-scrollbar { display: none; }
.filtro {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border-radius: 99px; background: var(--tarjeta); border: 1px solid var(--borde);
  font-size: 13px; font-weight: 600; color: var(--texto-2);
}
.filtro .ico { width: 16px; height: 16px; }
.filtro.activo { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.filtro.activo .ico { color: var(--acento); }
.ayuda { font-size: 12px; color: var(--texto-3); padding: 0 4px; }

/* lista de clientes */
.lista-sel {
  list-style: none; margin: 0; padding: 0;
  background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--r-md);
  box-shadow: var(--sombra-1); overflow: hidden;
}
.lista-sel:empty { display: none; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px; }
.item + .item, li + li > .item { border-top: 1px solid var(--borde); }
button.item { width: 100%; text-align: left; }
button.item:active { background: var(--fondo); }
.item-info { flex: 1; min-width: 0; }
.item-titulo { font-weight: 600; font-size: 14px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.item-sub { font-size: 12px; color: var(--texto-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-precio { font-weight: 700; font-size: 14px; margin-top: 4px; }
.item-der { flex: none; text-align: right; }
.avatar-cli {
  width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: #e8effd; color: #2563eb; font-weight: 700; font-size: 14px;
}
.avatar-cli.grande { width: 54px; height: 54px; border-radius: 16px; font-size: 18px; }

/* encabezado del pedido */
.cab-pedido {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px;
  background: var(--tinta); color: #fff; border-radius: var(--r-lg); box-shadow: var(--sombra-2);
}
.cab-pedido .avatar-cli { background: rgba(255, 255, 255, .1); color: var(--acento); }
.cab-pedido-txt { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cab-pedido-txt strong { font-size: 16px; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-lista {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border-radius: 99px; background: rgba(242, 176, 30, .16); color: var(--acento);
  font-size: 12px; font-weight: 700;
}
.chip-lista .ico { width: 15px; height: 15px; }
.cab-pedido .btn-icono.suave { background: rgba(255, 255, 255, .08); border-color: transparent; color: #fff; }
/* Bote rojo: descartar el pedido a medias (pide confirmación) */
.cab-pedido .btn-icono.cab-descartar { color: #f87171; margin-right: -4px; }
.cab-pedido .btn-icono.cab-descartar:active { background: rgba(248, 113, 113, .18); }

/* lista de artículos: renglones delgados */
.lista-art {
  list-style: none; margin: 0; padding: 0;
  background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--r-md);
  box-shadow: var(--sombra-1); overflow: hidden;
}
.lista-art:empty { display: none; }
.art {
  position: relative;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
  padding: 9px 10px 9px 14px; min-height: 62px;
}
.art + .art { border-top: 1px solid var(--borde); }
.art.en-carrito { background: #fffaeb; }
.art.en-carrito::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--acento); }
.art-info { min-width: 0; }
.art-nombre {
  font-weight: 600; font-size: 13.5px; line-height: 1.25;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.art-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11.5px; color: var(--texto-3); min-width: 0; }
.art-meta .sep { opacity: .5; }
.art-clave { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.inv {
  flex: none; display: inline-flex; align-items: center; gap: 3px;
  font-weight: 700; color: var(--ok); white-space: nowrap;
}
.inv .ico { width: 13px; height: 13px; }
.inv small { font-weight: 600; font-size: 10.5px; opacity: .8; }
.inv.poca { color: #b7791f; }
.inv.nada { color: var(--mal); }
.frec { flex: none; display: inline-flex; color: #b7791f; }
.frec .ico { width: 13px; height: 13px; }

.art-der { display: flex; align-items: center; gap: 10px; }
.art-precio { text-align: right; line-height: 1.15; }
.art-precio strong { display: block; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.art-precio span { font-size: 10.5px; color: var(--texto-3); }
/* El precio se toca para elegir la lista de ese artículo: subrayado punteado discreto */
.art-precio-btn { all: unset; cursor: pointer; display: block; text-align: right; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; -webkit-tap-highlight-color: transparent; }
.art-precio-btn strong { text-decoration: underline dotted var(--texto-3); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.art-precio-btn:active { background: var(--borde); }
.art-precio-btn:focus-visible { outline: 2px solid var(--tinta); }
.art-lista { display: block; font-style: normal; font-size: 10px; font-weight: 700; color: var(--tinta); }
.opcion-precio { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.opcion:disabled { opacity: .45; }
.opcion:disabled .opcion-precio { font-weight: 600; font-size: 13px; }
.art-sinprecio { font-size: 11px; color: var(--texto-3); max-width: 70px; text-align: right; }

/* agregar: botón redondo ámbar; con cantidad: control compacto */
.agregar {
  width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--acento); color: var(--tinta); box-shadow: 0 2px 6px rgba(242, 176, 30, .35);
  transition: transform .1s;
}
.agregar .ico { width: 20px; height: 20px; stroke-width: 2.4; }
.agregar:active { transform: scale(.92); }
.cantidad {
  display: flex; align-items: center; flex: none; height: 36px;
  background: var(--tarjeta); border: 1px solid #d9dce2; border-radius: 10px; overflow: hidden;
}
.cantidad button { width: 32px; height: 100%; display: grid; place-items: center; color: var(--texto-2); }
.cantidad button:active { background: var(--fondo); }
.cantidad button .ico { width: 15px; height: 15px; stroke-width: 2.2; }
.cantidad button[data-mas] { color: var(--acento-osc); }
.cantidad input {
  width: 34px; height: 100%; text-align: center; outline: none; background: none;
  border: 0; border-left: 1px solid #eceef1; border-right: 1px solid #eceef1;
  font: inherit; font-weight: 700; font-size: 15px; color: var(--texto); -moz-appearance: textfield;
}
.cantidad input:focus { background: var(--acento-suave); }
.cantidad input::-webkit-inner-spin-button, .cantidad input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.mas-articulos { text-align: center; color: var(--texto-3); font-size: 13px; padding: 12px; }

/* confirmar */
.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--r-md); padding: 14px; box-shadow: var(--sombra-1); }
.cli-resumen { display: flex; align-items: center; gap: 12px; }
.cli-resumen strong { display: block; font-size: 15px; }
.tarjeta-sub { font-size: 13px; color: var(--texto-2); margin-top: 2px; }
.totales { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--texto-2); }
.totales > div { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.totales .total { color: var(--texto); font-size: 18px; font-weight: 700; padding-top: 10px; border-top: 1px solid var(--borde); }
.campo-nota { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--texto-2); }
.campo-nota textarea {
  font: inherit; font-size: 15px; padding: 12px; border-radius: var(--r-md); resize: vertical;
  border: 1px solid var(--borde); background: var(--tarjeta); color: var(--texto); outline: none;
}
.campo-nota textarea:focus { border-color: var(--acento); }

/* barra del pedido: fija abajo — Ver pedido · Total · Cerrar pedido */
.carrito {
  position: fixed; z-index: 8; left: 0; right: 0; bottom: 0;
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(12px);
  border-top: 1px solid var(--borde); box-shadow: 0 -8px 24px rgba(21, 23, 28, .07);
}
.carrito-ver {
  display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 14px 0 7px; flex: none;
  border-radius: 16px; text-align: left;
  background: linear-gradient(180deg, #fff8e6 0%, #fdefc8 100%);
  border: 1px solid #f3d27c; box-shadow: 0 2px 6px rgba(217, 154, 11, .15);
  transition: transform .1s;
}
.carrito-ver:active { transform: scale(.97); }
.carrito-ico {
  position: relative; width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: var(--tinta); color: var(--acento);
  box-shadow: 0 3px 8px rgba(21, 23, 28, .25);
}
.carrito-ico .ico { width: 22px; height: 22px; }
.carrito-badge {
  position: absolute; top: -7px; right: -7px; min-width: 21px; height: 21px; padding: 0 5px;
  border-radius: 99px; background: var(--mal); color: #fff;
  font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff8e6;
}
.carrito-ver-txt { display: flex; flex-direction: column; line-height: 1.2; }
.carrito-ver-txt b { font-size: 13.5px; color: #6b4e00; }
.carrito-ver-txt span { font-size: 11px; color: #9a7b2f; white-space: nowrap; }
.carrito-total { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.carrito-total span { font-size: 10.5px; font-weight: 700; color: var(--texto-3); text-transform: uppercase; letter-spacing: .6px; }
.carrito-total strong { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.3px; }
.carrito-cerrar {
  flex: none; height: 54px; padding: 0 14px 0 10px; border-radius: 16px;
  display: flex; align-items: center; gap: 8px;
  background: var(--acento); color: var(--tinta);
  box-shadow: 0 4px 12px rgba(242, 176, 30, .4); transition: transform .1s;
}
.carrito-cerrar:active { transform: scale(.97); background: var(--acento-osc); }
.carrito-cerrar .ico {
  width: 26px; height: 26px; padding: 4px; border-radius: 50%; stroke-width: 2.6;
  background: var(--tinta); color: var(--acento);
}
.carrito-cerrar span { font-size: 13px; font-weight: 800; line-height: 1.1; text-align: left; }
.app.con-barra { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
/* =================== HOJAS (ventanas que suben) =================== */
.hoja-fondo { position: fixed; inset: 0; z-index: 24; background: rgba(21, 23, 28, .5); animation: aparecer .2s ease; }
.hoja {
  position: fixed; z-index: 25; left: 0; right: 0; bottom: 0;
  max-width: 560px; margin: 0 auto; max-height: 90dvh;
  display: flex; flex-direction: column;
  background: var(--fondo); border-radius: 24px 24px 0 0;
  transform: translateY(105%); visibility: hidden;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s .3s;
  box-shadow: 0 -10px 40px rgba(21, 23, 28, .25);
}
.hoja.abierta { transform: translateY(0); visibility: visible; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.hoja-tirador { width: 40px; height: 4px; border-radius: 99px; background: #cfd3da; margin: 8px auto 4px; flex: none; }
.ficha-cab { display: flex; align-items: center; gap: 12px; padding: 8px 12px 12px 16px; flex: none; }
.ficha-cab-txt { flex: 1; min-width: 0; }
.ficha-cab-txt strong { display: block; font-size: 17px; line-height: 1.25; }
.ficha-cab-txt span { font-size: 13px; color: var(--texto-2); }
.hoja-ico {
  width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--tinta); color: var(--acento);
}
.hoja-cuerpo > * { flex-shrink: 0; }
.hoja-cuerpo { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.hoja-pie {
  flex: none; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--tarjeta); border-top: 1px solid var(--borde); display: flex; flex-direction: column; gap: 10px;
}
.hc-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--texto-2); }
.hc-total strong { font-size: 22px; color: var(--texto); font-variant-numeric: tabular-nums; }
/* ficha del cliente */
.etiquetas { display: flex; gap: 6px; flex-wrap: wrap; }
.etiqueta { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--tarjeta); border: 1px solid var(--borde); color: var(--texto-2); }
.etiqueta.ok { background: var(--ok-suave); border-color: transparent; color: var(--ok); }
.etiqueta.mal { background: var(--mal-suave); border-color: transparent; color: var(--mal); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--r-md); padding: 12px; min-width: 0; }
.stat span { display: block; font-size: 11px; font-weight: 600; color: var(--texto-3); text-transform: uppercase; letter-spacing: .4px; }
.stat strong { display: block; font-size: 17px; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat small { font-size: 12px; color: var(--texto-2); }
.stat.destacado { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.stat.destacado span { color: #9aa0ab; }
.stat.destacado strong { color: var(--acento); }
.stat.destacado small { color: #9aa0ab; }
.datos { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--r-md); overflow: hidden; }
.dato { display: flex; align-items: center; gap: 12px; padding: 12px 14px; font-size: 14px; color: inherit; text-decoration: none; }
.dato + .dato { border-top: 1px solid var(--borde); }
.dato .ico { color: #2563eb; width: 20px; height: 20px; }
.dato span { flex: 1; min-width: 0; }
.seccion-t { font-size: 12px; font-weight: 700; color: var(--texto-2); text-transform: uppercase; letter-spacing: .5px; margin: 6px 2px 0; }
.frecuentes { display: flex; flex-direction: column; gap: 6px; }
.frecuente { display: flex; align-items: center; gap: 10px; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.frecuente .ico { color: #b7791f; width: 18px; height: 18px; }
.frecuente span { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frecuente small { color: var(--texto-3); white-space: nowrap; }
.historial { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--r-md); overflow: hidden; }
.doc { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.doc + .doc { border-top: 1px solid var(--borde); }
.doc-tipo { font-size: 11px; font-weight: 700; padding: 3px 0; border-radius: 6px; width: 78px; text-align: center; flex: none; }
.doc-tipo.t-F { background: #e3f5ee; color: #059669; }
.doc-tipo.t-R { background: #e8effd; color: #2563eb; }
.doc-tipo.t-P { background: #f1ebfd; color: #7c3aed; }
.doc-tipo.t-C { background: var(--acento-suave); color: #7a5a00; }
.doc-tipo.t-D { background: var(--mal-suave); color: var(--mal); }
.doc-info { flex: 1; min-width: 0; font-size: 12px; color: var(--texto-3); }
.doc-info b { display: block; font-size: 13px; color: var(--texto); }
.doc-total { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.cargando { display: flex; flex-direction: column; gap: 8px; }
.cargando div { height: 64px; border-radius: var(--r-md); background: linear-gradient(90deg, #eceef1 0%, #f7f8fa 50%, #eceef1 100%); background-size: 200% 100%; animation: brillo 1.2s infinite linear; }
@keyframes brillo { to { background-position: -200% 0; } }
.aviso-suave { font-size: 13px; color: var(--texto-2); background: var(--tarjeta); border: 1px dashed var(--borde); border-radius: var(--r-md); padding: 12px; text-align: center; }

/* opciones de lista */
.opciones { display: flex; flex-direction: column; gap: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
.opcion {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px; border-radius: var(--r-md); background: var(--tarjeta); border: 1px solid var(--borde);
}
.opcion-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--borde); flex: none; display: grid; place-items: center; }
.opcion.activa { border-color: var(--tinta); box-shadow: 0 0 0 1px var(--tinta) inset; }
.opcion.activa .opcion-radio { border-color: var(--tinta); }
.opcion.activa .opcion-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--tinta); }
.opcion-txt { flex: 1; }
.opcion-txt strong { display: block; font-size: 15px; }
.opcion-txt span { font-size: 12px; color: var(--texto-3); }

/* mis pedidos */
.pestanas { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--borde); border-radius: 12px; }
.pestana { height: 40px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--texto-2); }
.pestana span { font-size: 12px; background: rgba(21, 23, 28, .08); padding: 1px 7px; border-radius: 99px; margin-left: 4px; }
.pestana.activo { background: var(--tarjeta); color: var(--texto); box-shadow: var(--sombra-1); }
.sel-todos { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--texto-2); padding: 0 4px; }
.sel-todos input, .item input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--tinta); flex: none; }
.estado-ped { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; margin-top: 4px; }
.estado-ped.pendiente { background: var(--acento-suave); color: #7a5a00; }
.estado-ped.enviado { background: var(--ok-suave); color: var(--ok); }
.vacio-txt { text-align: center; color: var(--texto-3); font-size: 14px; padding: 32px 0; }
.item-error { font-size: 12px; color: var(--mal); margin-top: 4px; }
.hc-buscador { position: sticky; top: 0; z-index: 2; flex: none; height: 46px; box-shadow: 0 6px 12px -6px rgba(21, 23, 28, .12); }

/* confirmar pedido */
.conf-total {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 20px 16px; border-radius: var(--r-lg); background: var(--tinta); color: #fff; box-shadow: var(--sombra-2);
}
.conf-total::before {
  content: ""; position: absolute; right: -60px; top: -80px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(242, 176, 30, .25), transparent 65%);
}
.conf-total span { position: relative; font-size: 12px; font-weight: 700; color: #9aa0ab; text-transform: uppercase; letter-spacing: .6px; }
.conf-total strong { position: relative; font-size: 36px; font-weight: 800; color: var(--acento); letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.conf-total small { position: relative; font-size: 12px; color: #9aa0ab; }
.resumen { display: flex; flex-direction: column; gap: 10px; }
.res-fila { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--texto-2); }
.res-fila .ico { width: 20px; height: 20px; color: var(--acento-osc); }
.res-fila span { flex: 1; }
.res-fila b { color: var(--texto); font-variant-numeric: tabular-nums; }
.res-fila.suave { font-size: 13px; }
.res-fila.suave b { font-weight: 600; color: var(--texto-2); }
.res-sep { height: 1px; background: var(--borde); margin: 2px 0; }
.res-ver {
  display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 12px; border-radius: 12px;
  background: var(--fondo); font-size: 14px; font-weight: 600; color: var(--texto);
}
.res-ver .ico { width: 20px; height: 20px; color: var(--texto-2); }
.res-ver .flecha { margin-left: auto; width: 18px; height: 18px; color: var(--texto-3); }
.ayuda.centro { text-align: center; }
.cli-resumen-txt { flex: 1; min-width: 0; }
.btn-info {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 52px; height: 52px; border-radius: 14px;
  background: #e8effd; color: #2563eb; font-size: 11px; font-weight: 700;
}
.btn-info .ico { width: 20px; height: 20px; }
.btn-info:active { transform: scale(.96); }
/* Bote rojo junto a "Info": descartar el pedido (pide confirmación) */
.btn-info.btn-basura { background: #fdecec; color: var(--mal); margin-right: -4px; }
.btn-info.btn-basura .ico { width: 22px; height: 22px; }
/* notas del pedido: recuadro con marco ámbar */
.campo-nota > span { font-size: 13px; font-weight: 700; color: var(--texto); }
.campo-nota textarea { border: 2px solid var(--acento); background: #fffdf6; }
.campo-nota textarea:focus { border-color: var(--acento-osc); box-shadow: 0 0 0 3px rgba(242, 176, 30, .2); }

/* confirmar guardado */
.dialogo-ico.ok { background: var(--acento-suave); color: var(--acento-osc); }
.dialogo-ico.ok .ico { stroke-width: 2.6; }
#dg-detalle b { color: var(--texto); }

/* aviso animado al guardar: suave, corto y sin bloquear clics */
.exito {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: rgba(244, 245, 247, .55); backdrop-filter: blur(3px);
  pointer-events: none; animation: exito-fondo 1.6s ease forwards;
}
.exito-caja {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 26px 34px; border-radius: 24px; background: var(--tarjeta);
  box-shadow: 0 20px 50px rgba(21, 23, 28, .18);
  animation: exito-caja 1.6s cubic-bezier(.2, .8, .2, 1) forwards;
}
.exito-caja strong { font-size: 17px; }
.exito-caja span { font-size: 13px; color: var(--texto-2); font-variant-numeric: tabular-nums; }
.exito-check { width: 64px; height: 64px; margin-bottom: 4px; }
.exito-check circle { fill: var(--acento-suave); stroke: var(--acento); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: trazo .5s ease-out .1s forwards; }
.exito-check path { fill: none; stroke: var(--tinta); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 36; stroke-dashoffset: 36; animation: trazo .35s ease-out .5s forwards; }
@keyframes trazo { to { stroke-dashoffset: 0; } }
@keyframes exito-fondo { 0% { opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes exito-caja { 0% { opacity: 0; transform: translateY(10px) scale(.94); } 15% { opacity: 1; transform: none; } 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-6px) scale(.98); } }

/* entrada suave de cada pantalla */
.pantalla:not([hidden]) { animation: entrar .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes entrar { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  .exito-check circle, .exito-check path { stroke-dashoffset: 0; }
}

/* =================== MIS PEDIDOS =================== */
.mp-resumen {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-radius: var(--r-lg); background: var(--tinta); color: #fff; box-shadow: var(--sombra-2);
}
.mp-resumen::before {
  content: ""; position: absolute; right: -50px; top: -70px; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(242, 176, 30, .25), transparent 65%);
}
.mp-resumen > * { position: relative; }
.mp-resumen div span { display: block; font-size: 12px; font-weight: 600; color: #9aa0ab; }
.mp-resumen strong { display: block; font-size: 26px; font-weight: 800; color: var(--acento); letter-spacing: -.5px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.mp-res-cuenta { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: rgba(255, 255, 255, .1); white-space: nowrap; }

.mp-herr { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px; }
.mp-herr > span { font-size: 12px; color: var(--texto-3); }

.mis-pedidos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ped {
  background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--r-md);
  box-shadow: var(--sombra-1); padding: 12px 12px 10px 14px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.ped.sel { border-color: var(--acento); box-shadow: 0 0 0 1px var(--acento) inset, var(--sombra-1); background: #fffcf3; }
.ped-cab { display: flex; align-items: center; gap: 10px; }
.ped-check {
  width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center;
  border: 2px solid #cfd3da; background: var(--tarjeta); color: transparent; transition: background .15s, border-color .15s;
}
.ped-check .ico { width: 16px; height: 16px; stroke-width: 3; }
.ped.sel .ped-check { background: var(--tinta); border-color: var(--tinta); color: var(--acento); }
.ped-info { flex: 1; min-width: 0; }
.ped-info strong { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ped-info span { font-size: 12px; color: var(--texto-3); }
.ped-datos { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: var(--fondo); }
.ped-dato { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--texto-2); }
.ped-dato .ico { width: 15px; height: 15px; color: var(--acento-osc); }
.ped-total { margin-left: auto; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ped-nota { font-size: 12.5px; color: var(--texto-2); padding: 0 2px; font-style: italic; }
.ped-error { font-size: 12.5px; color: var(--mal); background: var(--mal-suave); padding: 6px 10px; border-radius: 8px; }
.ped-pie { display: flex; align-items: center; gap: 8px; }
.ped-pie .estado-ped { margin: 0 auto 0 0; }
.ped-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px;
  background: var(--tarjeta); border: 1px solid #d9dce2; font-size: 13px; font-weight: 600; color: var(--texto);
}
.ped-btn .ico { width: 16px; height: 16px; color: var(--acento-osc); }
.ped-btn:active { background: var(--fondo); }
.ped-btn.peligro { width: 34px; padding: 0; justify-content: center; }
.ped-btn.peligro .ico { color: var(--mal); }
.ped-enviado { font-size: 11.5px; color: var(--texto-3); }
.ped.enviado .ped-total { color: var(--ok); }

.mp-vacio { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 0; color: var(--texto-3); font-size: 14px; }
.mp-vacio .vacia-ico { width: 56px; height: 56px; border-radius: 16px; }
.mp-vacio .vacia-ico .ico { width: 26px; height: 26px; }

.barra-envio {
  position: fixed; z-index: 8; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(12px);
  border-top: 1px solid var(--borde); box-shadow: 0 -8px 24px rgba(21, 23, 28, .07);
}
.barra-envio-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.barra-envio-txt span { font-size: 11.5px; color: var(--texto-3); }
.barra-envio-txt strong { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.barra-envio .btn { height: 52px; border-radius: 14px; padding: 0 16px; box-shadow: 0 4px 12px rgba(242, 176, 30, .4); }
.link { font-size: 13px; font-weight: 700; color: var(--acento-osc); padding: 6px 2px; }

/* tarjeta de pedido delgada */
.mis-pedidos { gap: 8px; }
.ped { flex-direction: row; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; }
.ped-info { display: flex; flex-direction: column; gap: 2px; }
.ped-info strong { font-size: 14px; }
.ped-info > span { font-size: 11.5px; color: var(--texto-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ped-info .ped-error { color: var(--mal); white-space: normal; }
.ped-cotiz { align-self: flex-start; font-size: 11px !important; font-weight: 700; color: var(--ok) !important; background: var(--ok-suave); padding: 1px 7px; border-radius: 99px; margin-top: 2px; }
.ped-der { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ped-total { margin: 0; font-size: 15px; }
.ped-acciones { display: flex; gap: 6px; }
.ped-btn { width: 32px; height: 30px; padding: 0; justify-content: center; border-radius: 9px; }
.ped-btn .ico { width: 16px; height: 16px; }

/* mandar pedidos: anillo de avance, avión, y lista con el estado de cada pedido */
.mandando {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px;
  background: rgba(21, 23, 28, .55); backdrop-filter: blur(5px); animation: aparecer .2s ease-out;
}
.md-caja {
  width: min(360px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; align-items: center;
  padding: 28px 20px 20px; border-radius: 26px; background: var(--tarjeta);
  box-shadow: 0 24px 60px rgba(21, 23, 28, .3); animation: md-entra .35s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes md-entra { from { opacity: 0; transform: translateY(16px) scale(.94); } }
.md-caja > strong { font-size: 19px; margin-top: 14px; text-align: center; }
.md-sub { font-size: 13px; color: var(--texto-2); margin-top: 3px; text-align: center; font-variant-numeric: tabular-nums; }

.md-anillo { position: relative; flex: none; width: 112px; height: 112px; display: grid; place-items: center; }
.md-anillo > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.md-pista { fill: var(--acento-suave); stroke: var(--borde); stroke-width: 6; transition: fill .3s; }
.md-avance {
  fill: none; stroke: var(--acento); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset .5s ease, stroke .3s;
}
.md-onda {
  position: absolute; inset: 10px; border-radius: 50%; border: 2px solid var(--acento);
  opacity: 0; animation: md-onda 1.8s ease-out infinite;
}
.md-onda + .md-onda { animation-delay: .9s; }
@keyframes md-onda { 0% { opacity: .5; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.25); } }
.md-avion {
  position: relative; width: 46px; height: 46px; fill: var(--acento); stroke: var(--tinta);
  stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; animation: md-flota 1.4s ease-in-out infinite;
}
@keyframes md-flota { 0%, 100% { transform: translate(-2px, 3px) rotate(4deg); } 50% { transform: translate(3px, -4px) rotate(-6deg); } }
.md-listo, .md-mal { position: absolute; width: 58px; height: 58px; opacity: 0; }
.md-listo path, .md-mal path { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
.md-listo path { stroke: var(--ok); }
.md-mal path { stroke: var(--mal); }

/* terminado: el avión sale volando y aparece la palomita (o el tache) */
.mandando.fin .md-onda { animation: none; }
.mandando.fin .md-avion { animation: md-despega .5s ease-in forwards; }
@keyframes md-despega { to { opacity: 0; transform: translate(40px, -40px) rotate(-20deg) scale(.5); } }
.mandando.ok .md-avance { stroke: var(--ok); }
.mandando.ok .md-pista { fill: var(--ok-suave); }
.mandando.ok .md-listo { opacity: 1; }
.mandando.ok .md-listo path { animation: trazo .4s ease-out .35s forwards; }
.mandando.mal .md-avance { stroke: var(--mal); }
.mandando.mal .md-pista { fill: var(--mal-suave); }
.mandando.mal .md-mal { opacity: 1; }
.mandando.mal .md-mal path { animation: trazo .4s ease-out .35s forwards; }
.mandando.fin .md-anillo { animation: md-latido .45s ease .3s; }
@keyframes md-latido { 50% { transform: scale(1.06); } }

.md-lista {
  list-style: none; margin: 16px 0 0; padding: 0; width: 100%; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
}
.md-lista li {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px;
  background: var(--fondo); font-size: 13px; animation: subir .25s ease-out backwards;
  transition: background .3s;
}
.md-lista li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.md-lista li b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-lista li small { color: var(--texto-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.md-est { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--borde); }
.md-est svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
li.md-ya .md-est { border-color: var(--acento); border-right-color: transparent; animation: girar .7s linear infinite; }
li.md-ok { background: var(--ok-suave); }
li.md-ok .md-est { background: var(--ok); border-color: var(--ok); animation: md-pop .3s ease; }
li.md-ok small { color: var(--ok); font-weight: 700; }
li.md-err { background: var(--mal-suave); }
li.md-err .md-est { background: var(--mal); border-color: var(--mal); animation: md-pop .3s ease; }
li.md-err small { color: var(--mal); }
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes md-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } }
.mandando.sale { animation: md-sale .22s ease-in forwards; }
@keyframes md-sale { to { opacity: 0; } }
.md-boton { width: 100%; margin-top: 16px; justify-content: center; animation: subir .25s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .md-onda, .md-avion { animation: none; }
}

/* forma de pago: Crédito / Contado — la opción elegida se pinta de color con palomita */
.pago-sel { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--fondo); border: 1px solid var(--borde); }
.pago-sel button {
  flex: 1; height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 15px; font-weight: 700; color: var(--texto-3); transition: background .15s, color .15s, box-shadow .15s;
}
.pago-sel button.activo { color: #fff; }
.pago-sel button.activo[data-pago="credito"] { background: #2563eb; box-shadow: 0 4px 12px rgba(37, 99, 235, .35); }
.pago-sel button.activo[data-pago="contado"] { background: var(--ok); box-shadow: 0 4px 12px rgba(22, 163, 74, .35); }
.pago-sel button.activo::before { content: "✓"; font-size: 15px; }
.pago-sel .pago-fijo {
  flex: 1; height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff; background: var(--ok);
}
.pago-sel.chico { margin-left: auto; padding: 3px; border-radius: 11px; }
.pago-sel.chico button, .pago-sel.chico .pago-fijo { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; flex: none; }
.pago-titulo { font-size: 12px; font-weight: 700; color: var(--texto-2); text-transform: uppercase; letter-spacing: .4px; margin-bottom: -4px; }
.res-pago { align-items: center; }
.pago-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; margin-left: 4px; vertical-align: 1px; font-style: normal; }
.pago-tag.credito { background: #e8effd; color: #2563eb; }
.pago-tag.contado { background: var(--ok-suave); color: var(--ok); }
.pago-tag.grande { margin-left: 0; height: 28px; line-height: 28px; padding: 0 11px; font-size: 12px; vertical-align: 0; }
.cab-pedido .pago-tag.credito { background: #2563eb; color: #fff; }
.cab-pedido .pago-tag.contado { background: var(--ok); color: #fff; }

/* módulo Clientes */
.cli-resumen-mod {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 22px; padding: 18px; color: #fff;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(147, 197, 253, .5), transparent 55%),
    radial-gradient(70% 90% at 0% 100%, rgba(30, 58, 138, .8), transparent 70%),
    linear-gradient(135deg, #1e40af, #2563eb 60%, #3b82f6);
  box-shadow: 0 14px 30px -10px rgba(37, 99, 235, .6), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.cr-fondo {
  position: absolute; z-index: -1; right: -26px; bottom: -34px; width: 150px; height: 150px;
  fill: none; stroke: #fff; stroke-width: 1.2; opacity: .08; transform: rotate(-10deg);
}
.cr-fondo [fill="currentColor"] { fill: #fff; }
.cr-arriba { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cr-total { display: flex; align-items: center; gap: 12px; }
.cr-ico {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: rgba(255, 255, 255, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
.cr-ico .ico { width: 26px; height: 26px; color: #fff; stroke-width: 2; }
.cr-total > div > span { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: rgba(255, 255, 255, .75); }
.cr-total strong { display: block; font-size: 36px; font-weight: 800; letter-spacing: -1px; line-height: 1; margin-top: 2px; font-variant-numeric: tabular-nums; }
.cr-dona { position: relative; width: 70px; height: 70px; flex: none; }
.cr-dona svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cr-dona circle { fill: none; stroke-width: 6; }
.cr-dona-pista { stroke: #4ade80; }
.cr-dona-cred { stroke: #fff; stroke-dasharray: 0 100; stroke-linecap: round; transition: stroke-dasharray .8s cubic-bezier(.2, .8, .2, 1); }
.cr-dona span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.cr-datos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.cr-datos button {
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 7px; text-align: left;
  padding: 9px 10px; border-radius: 14px; color: #fff;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px); transition: background .15s, transform .1s;
}
.cr-datos button:active { transform: scale(.97); background: rgba(255, 255, 255, .2); }
.cr-datos b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cr-datos span { grid-column: 1 / -1; font-size: 11.5px; color: rgba(255, 255, 255, .8); margin-top: 1px; }
.cr-punto { width: 9px; height: 9px; border-radius: 50%; }
.cr-punto.cred { background: #fff; }
.cr-punto.cont { background: #4ade80; }
.cr-punto.hoy { background: var(--acento); }
.cr-avance { margin-top: 14px; }
.cr-avance-txt { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255, 255, 255, .8); margin-bottom: 6px; }
.cr-avance-txt b { color: #fff; font-variant-numeric: tabular-nums; }
.cr-barra { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.cr-barra span { display: block; height: 100%; width: 0; min-width: 0; border-radius: 99px; background: linear-gradient(90deg, #fde68a, var(--acento)); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.cm-lista .item { width: 100%; text-align: left; }
.cm-lista .avatar-cli { position: relative; }
.cm-lista .avatar-cli.credito { background: #e8effd; color: #2563eb; }
.cm-lista .avatar-cli.contado { background: var(--ok-suave); color: var(--ok); }
.cm-hoy {
  position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ok); border: 2px solid var(--tarjeta);
}
.cm-hoy svg { width: 11px; height: 11px; fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.cm-der { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cm-der .pago-tag { margin: 0; }
.cm-der small { font-size: 11px; color: var(--ok); font-weight: 700; }

/* módulo Catálogo (reusa el diseño de la tarjeta de Clientes, en naranja) */
.cat-resumen {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 22px; padding: 18px; color: #fff;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(253, 186, 116, .55), transparent 55%),
    radial-gradient(70% 90% at 0% 100%, rgba(154, 52, 18, .7), transparent 70%),
    linear-gradient(135deg, #c2410c, #ea580c 60%, #f97316);
  box-shadow: 0 14px 30px -10px rgba(234, 88, 12, .6), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.cat-resumen .cr-datos { margin-top: 16px; }
.cr-punto.sin { background: #fecaca; }
.ct-opciones { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chip-lista.claro { background: var(--tarjeta); border: 1px solid var(--borde); color: var(--texto); height: 36px; padding: 0 12px; font-size: 13px; box-shadow: var(--sombra-1); }
.chip-lista.claro .ico { color: var(--acento-osc); }
.ct-lista .art { cursor: pointer; }
.ct-lista .art-der { align-items: flex-end; }
.ct-av { background: #fdeee4; color: #ea580c; }
.ct-av .ico { width: 26px; height: 26px; }
.da-precios { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--r-md); overflow: hidden; }
.da-precios div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; font-size: 14px; }
.da-precios div + div { border-top: 1px solid var(--borde); }
.da-precios span { color: var(--texto-2); }
.da-precios b { font-variant-numeric: tabular-nums; }
.da-precios small { display: block; text-align: right; font-size: 11px; color: var(--texto-3); font-variant-numeric: tabular-nums; }
.da-precios div.actual { background: var(--acento-suave); }
.da-precios div.actual span { color: var(--texto); font-weight: 700; }
.da-alm { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* cantidad en grande (zoom) con teclado propio */
.cantidad input { cursor: pointer; }
.zc-fondo {
  position: fixed; inset: 0; z-index: 45; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(21, 23, 28, .5); backdrop-filter: blur(3px); animation: aparecer .15s ease;
}
.zc-caja {
  width: 100%; max-width: 480px; background: var(--tarjeta); border-radius: 26px 26px 0 0;
  padding: 16px 16px calc(14px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(21, 23, 28, .25);
  animation: zc-zoom .26s cubic-bezier(.2, .9, .3, 1.15); transform-origin: var(--zc-origen, 50% 100%);
}
@keyframes zc-zoom { from { opacity: 0; transform: scale(.4); } }
.zc-cab { display: flex; align-items: flex-start; gap: 10px; }
.zc-cab > div { flex: 1; min-width: 0; }
.zc-cab strong { display: block; font-size: 15px; line-height: 1.3; }
.zc-cab span { font-size: 13px; color: var(--texto-2); }
.zc-pantalla { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.zc-paso {
  width: 64px; height: 64px; border-radius: 20px; flex: none; display: grid; place-items: center;
  background: var(--fondo); border: 1px solid var(--borde); color: var(--texto-2);
}
.zc-paso.mas { background: var(--acento); border-color: var(--acento); color: var(--tinta); }
.zc-paso .ico { width: 26px; height: 26px; stroke-width: 2.4; }
.zc-paso:active { transform: scale(.94); }
.zc-valor {
  flex: 1; min-width: 0; height: 76px; border-radius: 20px; display: flex; align-items: baseline; justify-content: center; gap: 6px;
  padding-top: 8px; background: var(--acento-suave); border: 2px solid var(--acento);
}
.zc-valor span { font-size: 48px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.zc-valor small { font-size: 13px; font-weight: 600; color: var(--texto-2); }
.zc-valor.pop span { animation: zc-pop .18s ease; }
@keyframes zc-pop { 50% { transform: scale(1.12); } }
.zc-importe { text-align: center; margin-top: 8px; font-size: 14px; color: var(--texto-2); min-height: 20px; }
.zc-importe b { color: var(--texto); }
.zc-teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.zc-teclado button {
  height: 54px; border-radius: 14px; font-size: 24px; font-weight: 700; display: grid; place-items: center;
  background: var(--fondo); border: 1px solid var(--borde); color: var(--texto);
}
.zc-teclado button:active { transform: scale(.95); background: var(--borde); }
.zc-teclado .ico { width: 24px; height: 24px; }
.zc-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 12px; }
.zc-btns .btn { height: 52px; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .zc-caja { animation: none; } }

/* acceso ancho (Reportes) */
.acceso.ancho { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 84px; }
.acceso.ancho .acceso-txt { margin-top: 0; display: flex; flex-direction: column; }
.acceso.ancho .acceso-txt small { font-size: 12px; font-weight: 500; opacity: .85; margin-top: 2px; }

/* módulo Reportes */
.rp-fechas { display: flex; align-items: flex-end; gap: 8px; }
.rp-fechas label { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--texto-2); }
.rp-fechas input { height: 42px; border-radius: 12px; border: 1px solid var(--borde); background: var(--tarjeta); padding: 0 10px; font: inherit; color: var(--texto); min-width: 0; }
.rp-fechas .btn { height: 42px; padding: 0 16px; }
.rp-tabs { display: flex; gap: 4px; padding: 4px; background: var(--borde); border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.rp-tabs::-webkit-scrollbar { display: none; }
.rp-tab {
  flex: 1 0 auto; height: 40px; padding: 0 12px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--texto-2); white-space: nowrap;
}
.rp-tab .ico { width: 16px; height: 16px; }
.rp-tab.activo { background: var(--tarjeta); color: #4f46e5; box-shadow: var(--sombra-1); }
.rp-cuerpo { display: flex; flex-direction: column; gap: 12px; }
.rp-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rp-kpi {
  background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--sombra-1); min-width: 0;
}
.rp-kpi span { display: block; font-size: 11px; font-weight: 700; color: var(--texto-3); text-transform: uppercase; letter-spacing: .4px; }
.rp-kpi strong { display: block; font-size: 20px; font-weight: 800; margin-top: 4px; letter-spacing: -.4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-kpi small { font-size: 12px; color: var(--texto-2); }
.rp-kpi.grande {
  grid-column: 1 / -1; color: #fff; border: none;
  background: radial-gradient(90% 120% at 100% 0%, rgba(165, 180, 252, .5), transparent 55%), linear-gradient(135deg, #3730a3, #4f46e5 60%, #6366f1);
  box-shadow: 0 12px 26px -10px rgba(79, 70, 229, .6);
}
.rp-kpi.grande span, .rp-kpi.grande small { color: rgba(255, 255, 255, .8); }
.rp-kpi.grande strong { font-size: 30px; }
.rp-kpi.verde.grande { background: radial-gradient(90% 120% at 100% 0%, rgba(134, 239, 172, .45), transparent 55%), linear-gradient(135deg, #065f46, #059669 60%, #10b981); box-shadow: 0 12px 26px -10px rgba(5, 150, 105, .6); }
.rp-kpi.rojo.grande { background: radial-gradient(90% 120% at 100% 0%, rgba(252, 165, 165, .45), transparent 55%), linear-gradient(135deg, #7f1d1d, #b91c1c 60%, #ef4444); box-shadow: 0 12px 26px -10px rgba(185, 28, 28, .6); }
.rp-tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--r-md); padding: 14px; box-shadow: var(--sombra-1); }
.rp-tarjeta h3 { font-size: 14px; margin: 0 0 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rp-tarjeta h3 small { font-size: 12px; font-weight: 500; color: var(--texto-3); }
/* gráfica de barras por día */
.rp-grafica { display: flex; align-items: flex-end; gap: 4px; height: 130px; padding-top: 18px; overflow-x: auto; scrollbar-width: none; }
.rp-col { flex: 1 1 0; min-width: 8px; max-width: 46px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.rp-col i {
  position: relative; width: 100%; min-height: 3px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #818cf8, #4f46e5);
  transform-origin: bottom; animation: barra-crece .5s cubic-bezier(.2, .8, .2, 1) backwards;
}
.rp-col i.b2 { background: linear-gradient(180deg, #4ade80, #059669); }
.rp-col i.vacio { background: var(--borde); }
.rp-col b { font-size: 9.5px; font-weight: 700; color: var(--texto-3); white-space: nowrap; }
.rp-col em { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 9.5px; font-style: normal; font-weight: 700; color: var(--texto-2); white-space: nowrap; }
.rp-leyenda { display: flex; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--texto-2); }
.rp-leyenda span { display: flex; align-items: center; gap: 6px; }
.rp-leyenda i { width: 10px; height: 10px; border-radius: 3px; }
/* renglones */
.rp-lista { display: flex; flex-direction: column; }
.rp-fila { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 13px; }
.rp-fila + .rp-fila { border-top: 1px solid var(--borde); }
.rp-fila > div { flex: 1; min-width: 0; }
.rp-fila b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-fila small { display: block; font-size: 12px; color: var(--texto-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-fila strong { flex: none; font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
.rp-fila strong small { color: var(--texto-3); font-weight: 500; }
.rp-pos { width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: #eef2ff; color: #4f46e5; }
.rp-pos.oro { background: #fef3c7; color: #b45309; }
.rp-barrita { height: 6px; margin-top: 5px; border-radius: 99px; background: var(--fondo); overflow: hidden; }
.rp-barrita i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #a5b4fc, #4f46e5); }
.rp-barrita.rojo i { background: linear-gradient(90deg, #fca5a5, #dc2626); }
/* cartera por antigüedad */
.rp-apilada { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--fondo); }
.rp-apilada i { display: block; height: 100%; }
.rp-rangos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 12px; }
.rp-rangos div { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--texto-2); min-width: 0; }
.rp-rangos i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.rp-rangos b { margin-left: auto; color: var(--texto); font-variant-numeric: tabular-nums; }
.rp-dias { flex: none; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--mal-suave); color: var(--mal); }
.rp-dias.ok { background: var(--ok-suave); color: var(--ok); }
.rp-vacio { text-align: center; padding: 26px 10px; color: var(--texto-3); font-size: 13.5px; }
.rp-vacio .ico { width: 34px; height: 34px; display: block; margin: 0 auto 8px; color: var(--borde); }
.rp-nota { font-size: 12px; color: var(--texto-3); text-align: center; }
.rp-dur { flex: none; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: #eef2ff; color: #4f46e5; font-variant-numeric: tabular-nums; }
.rp-dur.largo { background: #fef3c7; color: #b45309; }

/* Mis pedidos: liga al historial */
.mp-historial {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: var(--r-md);
  background: #eef2ff; border: 1px solid #c7d2fe; color: #3730a3;
}
.mp-historial .mi-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: #4f46e5; color: #fff; }
.mp-historial .mi-ico .ico { width: 20px; height: 20px; }
.mp-historial > span:nth-child(2) { flex: 1; min-width: 0; }
.mp-historial b { display: block; font-size: 14px; }
.mp-historial small { display: block; font-size: 12px; color: #6366f1; }
.mp-historial .flecha { width: 18px; height: 18px; flex: none; }
/* Reportes: pedidos */
.rp-dia { font-size: 12px; font-weight: 800; color: var(--texto-3); text-transform: uppercase; letter-spacing: .5px; padding: 12px 0 2px; }
.rp-dia:first-child { padding-top: 0; }
button.rp-fila { width: 100%; text-align: left; }
.rp-folio { font-weight: 800; color: #4f46e5; }
.rpd-partidas .rp-fila b { white-space: normal; }
.ped-viejo { align-self: flex-start; font-size: 11px !important; font-weight: 700; color: #b45309 !important; background: #fef3c7; padding: 1px 7px; border-radius: 99px; margin-top: 2px; }
.ped-viejo.suave { color: var(--texto-2) !important; background: var(--fondo); }

/* módulo Cobranza */
.cob-resumen {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 22px; padding: 18px; color: #fff;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(110, 231, 183, .5), transparent 55%),
    radial-gradient(70% 90% at 0% 100%, rgba(6, 78, 59, .8), transparent 70%),
    linear-gradient(135deg, #047857, #059669 60%, #10b981);
  box-shadow: 0 14px 30px -10px rgba(5, 150, 105, .6), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.cob-resumen .cr-datos { margin-top: 16px; }
.cb-dato {
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 7px; min-width: 0;
  padding: 9px 10px; border-radius: 14px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .14);
}
.cb-dato b { font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cb-dato span { grid-column: 1 / -1; font-size: 11.5px; color: rgba(255, 255, 255, .8); margin-top: 1px; }
#cb-pend-sync { background: var(--acento); color: var(--tinta); }
.cb-av { background: var(--ok-suave); color: var(--ok); }
.hoja.alta { height: 92dvh; max-height: 92dvh; }
.cb-saldo { flex: none; text-align: right; }
.cb-saldo strong { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.cb-saldo small { font-size: 11px; color: var(--mal); font-weight: 700; }
/* facturas a cobrar */
.cb-herr { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--texto-2); }
.cb-facturas { display: flex; flex-direction: column; gap: 8px; }
.cb-fact {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; border-radius: 16px;
  background: var(--tarjeta); border: 1.5px solid var(--borde); box-shadow: var(--sombra-1); transition: border-color .15s, background .15s;
}
.cb-fact.sel { border-color: var(--ok); background: #f0fdf4; }
.cb-check { width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center; border: 2px solid var(--borde); background: var(--tarjeta); }
.cb-check .ico { width: 16px; height: 16px; color: #fff; stroke-width: 3; opacity: 0; }
.cb-fact.sel .cb-check { background: var(--ok); border-color: var(--ok); }
.cb-fact.sel .cb-check .ico { opacity: 1; }
.cb-fact > div { flex: 1; min-width: 0; }
.cb-fact b { display: block; font-size: 14px; }
.cb-fact small { display: block; font-size: 12px; color: var(--texto-3); }
.cb-venc { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 99px; background: var(--mal-suave); color: var(--mal); }
.cb-venc.ok { background: var(--ok-suave); color: var(--ok); }
.cb-reg { display: block; margin-top: 4px; font-size: 11px; font-weight: 700; color: #b45309; }
.cb-fact strong { flex: none; font-size: 15px; font-variant-numeric: tabular-nums; }
.cb-pie { display: flex; align-items: center; gap: 12px; }
.cb-pie > div { flex: 1; min-width: 0; line-height: 1.2; }
.cb-pie span { font-size: 12px; color: var(--texto-2); }
.cb-pie strong { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cb-pie .btn { height: 50px; padding: 0 20px; background: var(--ok); color: #fff; box-shadow: 0 6px 14px rgba(22, 163, 74, .35); }
.cb-pie .btn:disabled { background: var(--borde); color: var(--texto-3); box-shadow: none; }
/* datos del pago */
.cb-form { display: flex; flex-direction: column; gap: 12px; }
.cb-campo { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--texto-2); text-transform: uppercase; letter-spacing: .4px; }
.cb-campo input, .cb-campo textarea {
  height: 48px; border-radius: 14px; border: 1.5px solid var(--borde); background: var(--tarjeta); padding: 0 14px;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--texto); text-transform: none; letter-spacing: 0;
}
.cb-campo textarea { height: 72px; padding: 10px 14px; resize: none; font-weight: 500; }
.cb-campo input:focus, .cb-campo textarea:focus { outline: none; border-color: var(--ok); box-shadow: 0 0 0 3px rgba(22, 163, 74, .15); }
.cb-campo.importe input { height: 64px; font-size: 30px; font-weight: 800; text-align: center; border-color: var(--ok); background: #f0fdf4; }
.cb-ayuda { font-size: 12px; color: var(--texto-2); text-transform: none; letter-spacing: 0; font-weight: 500; }
.cb-formas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cb-formas button {
  height: 64px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--tarjeta); border: 1.5px solid var(--borde); font-size: 13px; font-weight: 700; color: var(--texto-2);
}
.cb-formas button .ico { width: 22px; height: 22px; }
.cb-formas button.activo { border-color: var(--ok); background: var(--ok); color: #fff; box-shadow: 0 4px 12px rgba(22, 163, 74, .3); }
.cb-aplica { text-transform: none; letter-spacing: 0; font-weight: 400; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; padding: 4px 12px; }
.cb-aplica .rp-fila { padding: 8px 0; }
/* mis cobros */
.cb-corte { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cb-corte div { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; padding: 10px; min-width: 0; }
.cb-corte span { display: block; font-size: 11px; font-weight: 700; color: var(--texto-3); text-transform: uppercase; }
.cb-corte b { display: block; font-size: 15px; margin-top: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-corte small { font-size: 11px; color: var(--texto-2); }
.forma-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; font-style: normal; }
.forma-tag.efectivo { background: var(--ok-suave); color: var(--ok); }
.forma-tag.cheque { background: #e8effd; color: #2563eb; }
.forma-tag.transferencia { background: #f1ebfd; color: #7c3aed; }
.cb-sync { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: #fef3c7; color: #b45309; font-style: normal; }

/* cobros por mandar (igual que Mis pedidos) */
.cb-pestanas { grid-template-columns: 1fr 1.25fr 1fr; }
.cb-pestanas .pestana { font-size: 13px; }
#cb-pend-sync:empty, #cb-pend-sync[data-cero] { display: none; }

/* =================== PRECIO ESPECIAL =================== */
.pe-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px 0 7px; margin-left: 2px;
  border: 0; border-radius: 7px; background: var(--tinta); color: #fff; box-shadow: var(--sombra-1);
  font-size: 11.5px; font-weight: 700; letter-spacing: .2px; cursor: pointer; position: relative;
}
.pe-btn::before { content: ''; position: absolute; inset: -8px -4px; }   /* área de toque más grande sin verse grande */
.pe-btn .ico { width: 13px; height: 13px; stroke-width: 2.2; }
.pe-btn .ico { color: var(--acento); }
.pe-btn.pend { background: #2563eb; font-variant-numeric: tabular-nums; }
.pe-btn.pend .ico, .pe-btn.ok .ico { color: #fff; }
.pe-btn.ok { background: var(--ok); }
.art.especial .art-precio strong { color: var(--ok); }
.pe-caja { max-width: 360px; text-align: center; padding: 22px 18px 18px; }
.pe-caja.temblar { animation: temblar .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes temblar { 15%, 85% { transform: translateX(-3px); } 30%, 70% { transform: translateX(6px); } 45%, 55% { transform: translateX(-8px); } }
.pe-eti {
  display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .3px; text-transform: uppercase; background: var(--acento-suave); color: var(--acento-osc);
}
.pe-eti.ok { background: var(--acento-osc); color: #fff; }
.pe-token {
  display: flex; justify-content: center; align-items: center; gap: 10px; margin: 10px 0 14px;
  font-size: 42px; font-weight: 800; letter-spacing: 3px; line-height: 1; color: var(--texto);
  font-variant-numeric: tabular-nums;
}
.pe-token i { width: 6px; height: 6px; border-radius: 50%; background: var(--acento); }
.pe-token.precio { letter-spacing: 0; color: var(--acento-osc); }
.pe-art { background: var(--fondo); border-radius: 14px; padding: 12px 14px; text-align: left; }
.pe-art strong { display: block; font-size: 14px; line-height: 1.3; color: var(--texto); }
.pe-art-fila { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--texto-2); }
.pe-art-fila b { color: var(--texto); font-variant-numeric: tabular-nums; }
.pe-art-fila b.tachado { text-decoration: line-through; color: var(--texto-3); font-weight: 600; }
.pe-campos { display: grid; grid-template-columns: 1.15fr 1fr; gap: 10px; margin-top: 14px; text-align: left; }
.pe-campo > span { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 600; color: var(--texto-2); }
.pe-input {
  display: flex; align-items: center; height: 50px; padding: 0 12px; border-radius: 12px;
  border: 1.5px solid var(--borde); background: var(--tarjeta); transition: border-color .15s, box-shadow .15s;
}
.pe-input:focus-within { border-color: var(--acento); box-shadow: 0 0 0 3px var(--acento-suave); }
.pe-input em { font-style: normal; font-size: 20px; font-weight: 700; color: var(--texto-3); margin-right: 4px; }
.pe-input input {
  width: 100%; min-width: 0; border: 0; outline: 0; background: none; padding: 0;
  font-size: 20px; font-weight: 700; color: var(--texto); font-variant-numeric: tabular-nums;
}
#pe-codigo { letter-spacing: 3px; }
.pe-campos.mal .pe-input { border-color: var(--mal); }
.pe-error { margin-top: 10px !important; color: var(--mal) !important; font-size: 13px !important; font-weight: 600; }
.pe-caja .dialogo-btns { margin-top: 18px; }
.pe-cancelar { border-width: 2px !important; font-weight: 600; }

/* código incorrecto: campos parpadean en rojo y aparece un tache */
.pe-caja { position: relative; }
.pe-campos.mal .pe-input { animation: parpadeo-rojo .9s ease; background: var(--mal-suave); }
@keyframes parpadeo-rojo { 0%, 40%, 80% { box-shadow: 0 0 0 4px var(--mal-suave); border-color: var(--mal); } 20%, 60%, 100% { box-shadow: none; } }
.pe-x {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  background: rgba(255, 255, 255, .55); border-radius: inherit; animation: pe-x-fondo 1.1s ease forwards;
}
.pe-x svg { width: 72px; height: 72px; animation: pe-x-pop 1.1s cubic-bezier(.2, .8, .2, 1) forwards; }
.pe-x circle { fill: var(--mal-suave); stroke: var(--mal); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: trazo .35s ease-out forwards; }
.pe-x path { fill: none; stroke: var(--mal); stroke-width: 4.5; stroke-linecap: round; stroke-dasharray: 46; stroke-dashoffset: 46; animation: trazo .3s ease-out .25s forwards; }
@keyframes pe-x-fondo { 0% { opacity: 0; } 12%, 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes pe-x-pop { 0% { transform: scale(.6); } 25% { transform: scale(1.08); } 40%, 100% { transform: scale(1); } }
.pe-error {
  display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--mal-suave);
}

/* al abrir el token: la ventana entra y los dígitos caen uno por uno */
.pe-caja.entrar { animation: pe-entrar .38s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pe-entrar { from { opacity: 0; transform: translateY(18px) scale(.92); } }
.pe-token.animar span { display: inline-block; animation: pe-digito .45s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: calc(.12s + var(--k) * .07s); }
@keyframes pe-digito { from { opacity: 0; transform: translateY(-14px) scale(.7); } }
.pe-token.animar i { animation: pe-punto .3s ease .5s both; }
@keyframes pe-punto { from { transform: scale(0); } }
@media (prefers-reduced-motion: reduce) { .pe-caja.entrar, .pe-token.animar span, .pe-token.animar i { animation: none; } }

/* botón de precio especial dentro de la ventana de cantidad */
.zc-token {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; margin: 4px 0 10px;
  border: 0; border-radius: 12px; background: var(--tinta); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
}
.zc-token .ico { width: 18px; height: 18px; color: var(--acento); }
.zc-token[hidden] { display: none; }
.carrito.compacto .carrito-ver-txt { display: none; }
.carrito.compacto .carrito-ver { flex: 0 0 auto; padding-right: 8px; }
.carrito-total strong { white-space: nowrap; }
.carrito-total { flex-shrink: 0; }

/* =================== OFERTAS (Microsip: PRECIO_OFERTA) =================== */
.oferta {
  display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px 0 5px; border-radius: 6px;
  background: var(--mal); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
}
.oferta .ico { width: 12px; height: 12px; stroke-width: 2.4; }
.oferta { border: 0; font-variant-numeric: tabular-nums; }
button.oferta { cursor: pointer; position: relative; background: var(--mal-suave); color: var(--mal); box-shadow: inset 0 0 0 1.5px var(--mal); }
button.oferta::before { content: ''; position: absolute; inset: -8px -4px; }
button.oferta.activa { background: var(--mal); color: #fff; box-shadow: none; }
.art.con-oferta .art-precio strong { color: var(--mal); }
.pe-eti.oferta-eti { background: var(--mal-suave); color: var(--mal); }
.pe-eti.oferta-eti.ok { background: var(--mal); color: #fff; }
.pe-token.oferta-precio { color: var(--mal); }
.pe-art-fila + .pe-art-fila { margin-top: 4px; }

.rp-periodos { margin-bottom: 10px; }
.rp-aviso { grid-column: 1 / -1; text-align: left; cursor: pointer; font: inherit; background: var(--acento-suave); border-color: var(--acento); }
.rp-aviso strong { color: var(--acento-osc); font-size: 17px; }

/* cliente bloqueado en Microsip (crédito o venta suspendida) */
.tag-bloqueado {
  font-style: normal; flex-shrink: 0; padding: 3px 8px; border-radius: 6px; background: var(--mal); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase;
}
.item.bloqueado .item-titulo { color: var(--mal); }
.item.bloqueado .avatar-cli { background: var(--mal-suave); color: var(--mal); }
.btn-bloqueado, .btn-bloqueado:disabled { background: var(--mal-suave) !important; color: var(--mal) !important; opacity: 1; font-size: 13px; }

/* =================== SINCRONIZAR =================== */
.sincro {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px;
  background: rgba(21, 23, 28, .55); backdrop-filter: blur(4px); animation: aparecer .2s ease;
}
.sx-caja {
  width: 100%; max-width: 300px; background: var(--tarjeta); border-radius: 24px; padding: 28px 22px 22px;
  text-align: center; box-shadow: var(--sombra-2); animation: pe-entrar .38s cubic-bezier(.2, .9, .3, 1.2);
}
.sx-orbita { position: relative; width: 96px; height: 96px; margin: 0 auto 16px; }
.sx-anillo {
  position: absolute; inset: 0; border-radius: 50%; border: 4px solid transparent;
  border-top-color: var(--acento); border-right-color: var(--acento); animation: sx-giro 1s linear infinite;
}
.sx-anillo.b { inset: 12px; border-top-color: #2563eb; border-right-color: transparent; border-left-color: #2563eb; animation-duration: 1.4s; animation-direction: reverse; }
.sx-centro {
  position: absolute; inset: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--tinta); color: var(--acento); animation: sx-latido 1.2s ease-in-out infinite;
}
.sx-nube { width: 36px; height: 36px; }
.sx-flecha { animation: sx-flecha 1.2s ease-in-out infinite; }
.sx-flecha.abajo { animation-name: sx-flecha-abajo; }
@keyframes sx-flecha { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(-1.5px); opacity: .55; } }
@keyframes sx-flecha-abajo { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(1.5px); opacity: .55; } }
.sx-ok { position: absolute; inset: 0; width: 96px; height: 96px; opacity: 0; }
.sx-ok circle { fill: var(--ok-suave); stroke: var(--ok); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; }
.sx-ok path { fill: none; stroke: var(--ok); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 36; stroke-dashoffset: 36; }
.sincro.listo .sx-anillo, .sincro.listo .sx-centro { animation: none; opacity: 0; transition: opacity .2s; }
.sincro.listo .sx-ok { opacity: 1; animation: pe-x-pop .6s cubic-bezier(.2, .8, .2, 1); }
.sincro.listo .sx-ok circle { animation: trazo .45s ease-out forwards; }
.sincro.listo .sx-ok path { animation: trazo .3s ease-out .35s forwards; }
.sincro.fallo .sx-anillo { animation: none; border-color: var(--mal); }
.sincro.fallo .sx-centro { animation: none; background: var(--mal); color: #fff; }
.sx-caja strong { display: block; font-size: 18px; }
.sx-pasos { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.sx-pasos li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--texto-3); transition: color .2s; }
.sx-pasos i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--borde); flex-shrink: 0; position: relative; transition: all .25s; }
.sx-pasos li.activo { color: var(--texto); }
.sx-pasos li.activo i { border-color: var(--acento); border-top-color: transparent; animation: sx-giro .7s linear infinite; }
.sx-pasos li.listo { color: var(--texto); }
.sx-pasos li.listo i { border-color: var(--ok); background: var(--ok); animation: pe-x-pop .35s ease; }
.sx-pasos li.listo i::after { content: ''; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.sx-pasos li.error { color: var(--mal); }
.sx-pasos li.error i { border-color: var(--mal); background: var(--mal-suave); }
@keyframes sx-giro { to { transform: rotate(360deg); } }
@keyframes sx-latido { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .sx-anillo, .sx-centro, .sx-flecha, .sx-pasos li.activo i { animation: none; } }

/* =================== COBRO =================== */
.cb-herr { margin-bottom: 2px; }
.cb-hist-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px;
  border: 1.5px solid var(--borde); background: var(--tarjeta); color: var(--texto); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.cb-hist-btn .ico { width: 16px; height: 16px; color: var(--ok); }
.cb-volver { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--texto-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
.cb-volver .ico { width: 16px; height: 16px; }
.cb-tit { font-size: 17px; margin: 6px 0 12px; }
.cb-hist { display: flex; flex-direction: column; gap: 8px; }
.cb-hist-fila { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--tarjeta); border: 1px solid var(--borde); }
.cb-hist-fila > div { flex: 1; min-width: 0; }
.cb-hist-fila b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.cb-hist-fila small { display: block; font-size: 12px; color: var(--texto-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-hist-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--ok-suave); color: var(--ok); }
.cb-hist-ico.cheque { background: #e8effd; color: #2563eb; }
.cb-hist-ico.transferencia { background: #f3e8ff; color: #7c3aed; }
.cb-hist-ico .ico { width: 18px; height: 18px; }
.cb-hist-edo { flex: none; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: var(--fondo); color: var(--texto-2); }
.cb-hist-edo.pend { background: #fef3c7; color: #b45309; }
.cb-hist-edo.aplicado { background: var(--ok-suave); color: var(--ok); }

.cb-monto {
  padding: 18px 16px 14px; border-radius: 20px; text-align: center; color: #fff;
  background: radial-gradient(90% 120% at 100% 0%, rgba(134, 239, 172, .35), transparent 55%), linear-gradient(135deg, #065f46, #059669 60%, #10b981);
  box-shadow: 0 12px 26px -12px rgba(5, 150, 105, .7); transition: background .25s;
}
.cb-monto.abono { background: radial-gradient(90% 120% at 100% 0%, rgba(253, 230, 138, .35), transparent 55%), linear-gradient(135deg, #92400e, #d97706 60%, #f59e0b); box-shadow: 0 12px 26px -12px rgba(217, 119, 6, .7); }
.cb-monto.mal { background: linear-gradient(135deg, #7f1d1d, #b91c1c 60%, #ef4444); }
.cb-monto-tit { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; opacity: .85; }
.cb-monto-input { display: flex; justify-content: center; align-items: baseline; gap: 4px; margin: 4px 0 6px; }
.cb-monto-input em { font-style: normal; font-size: 30px; font-weight: 700; opacity: .8; }
.cb-monto-input input {
  width: 100%; max-width: 240px; border: 0; outline: 0; background: none; color: #fff; text-align: left;
  font: inherit; font-size: 40px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; padding: 0;
  border-bottom: 2px dashed rgba(255, 255, 255, .45);
}
.cb-estado { display: inline-block; padding: 4px 12px; border-radius: 99px; background: rgba(255, 255, 255, .2); font-size: 13px; font-weight: 700; }
.cb-monto small { display: block; margin-top: 8px; font-size: 11.5px; opacity: .8; }
.cb-bloque { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--sombra-1); }
.cb-bloque-tit { font-size: 12px; font-weight: 800; color: var(--texto-2); text-transform: uppercase; letter-spacing: .5px; }
.cb-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--fondo); }
.cb-seg button {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px; border: 0; border-radius: 10px;
  background: none; color: var(--texto-2); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all .15s;
}
.cb-seg button .ico { width: 20px; height: 20px; }
.cb-seg button.activo { background: var(--tarjeta); color: var(--ok); box-shadow: var(--sombra-1); }
.cb-campo2 { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cb-campo2 > span { font-size: 12px; font-weight: 600; color: var(--texto-2); }
.cb-campo2 input, .cb-select select {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--borde); background: var(--tarjeta);
  font: inherit; font-size: 16px; font-weight: 600; color: var(--texto); min-width: 0;
}
.cb-campo2 input:focus, .cb-select select:focus { outline: none; border-color: var(--ok); box-shadow: 0 0 0 3px rgba(22, 163, 74, .15); }
.cb-select { position: relative; }
.cb-select select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.cb-select .ico { position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--texto-3); pointer-events: none; }
.cb-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cb-ap { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--borde); }
.cb-bloque-tit + .cb-ap { padding-top: 0; border-top: 0; }
.cb-ap b { display: block; font-size: 14px; color: var(--texto); }
.cb-ap small { font-size: 12px; color: var(--texto-3); }
.cb-ap-der { text-align: right; }
.cb-ap-der strong { display: block; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--texto); }
.cb-queda, .cb-liq { display: inline-block; margin-top: 2px; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 99px; }
.cb-queda { background: #fef3c7; color: #b45309; }
.cb-liq { background: var(--ok-suave); color: var(--ok); }
.cb-pie .btn.cb-atras { flex: none; width: 50px; padding: 0; background: var(--tarjeta); color: var(--texto); box-shadow: none; border: 1.5px solid var(--borde); }
.cb-pie .btn.cb-atras .ico { width: 20px; height: 20px; }

.cb-deuda { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.cb-deuda div { background: rgba(255, 255, 255, .95); border-radius: 12px; padding: 8px 10px; color: var(--texto); text-align: left; }
.cb-deuda span { display: block; font-size: 11px; font-weight: 700; color: var(--texto-2); text-transform: uppercase; letter-spacing: .4px; }
.cb-deuda b { display: block; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.cb-deuda div + div b { color: #b45309; }
.cb-monto:not(.abono) .cb-deuda div + div b { color: var(--ok); }
.cb-abono-tag { display: inline-block; margin-top: 3px; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 99px; background: #fef3c7; color: #b45309; }
/* importe centrado: la caja crece con el número y el $ queda pegado */
.cb-monto-input input { width: auto; max-width: 100%; min-width: 3ch; field-sizing: content; text-align: center; }
/* Quita el "jalar para recargar" del celular: la app no debe recargarse al deslizar hacia abajo */
html, body { overscroll-behavior-y: none; }
.pe-cli { display: block; font-size: 12px; font-weight: 700; color: var(--acento-osc); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 4px; }
.pe-cli { display: block; font-size: 12px; font-weight: 700; color: var(--acento-osc); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 4px; }

/* =================== MI OBJETIVO DEL MES =================== */
.objetivo { margin-top: 12px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--tarjeta); border: 1px solid var(--borde); box-shadow: var(--sombra-1); animation: entrar .4s ease-out; --oc: #d97706; }
.objetivo.ok { --oc: var(--ok); } .objetivo.tiempo { --oc: #2563eb; } .objetivo.atras { --oc: #dc2626; }
.obj-cab { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--texto-2); }
.obj-cab b { color: var(--texto); text-transform: capitalize; }
.obj-cab strong { margin-left: auto; font-size: 20px; font-weight: 800; color: var(--oc); font-variant-numeric: tabular-nums; }
.obj-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--oc) 14%, transparent); color: var(--oc); }
.obj-ico svg { width: 18px; height: 18px; }
.obj-barra { position: relative; height: 10px; margin: 12px 0; border-radius: 99px; background: var(--fondo); }
.obj-barra i { display: block; height: 100%; border-radius: 99px; background: var(--oc); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.obj-barra u { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 2px; background: var(--tinta); opacity: .5; }
.obj-datos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.obj-datos div { padding: 8px 10px; border-radius: 12px; background: var(--fondo); min-width: 0; }
.obj-datos span { display: block; font-size: 11px; font-weight: 700; color: var(--texto-3); text-transform: uppercase; letter-spacing: .4px; }
.obj-datos b { display: block; font-size: 14.5px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.obj-datos div:last-child b { color: var(--oc); }
.obj-datos b { font-size: clamp(12px, 3.5vw, 14.5px); text-overflow: clip; } .obj-datos div { padding: 8px; }

/* =================== PROMOCIONES DE REGALO =================== */
[data-cat="promos"] { --cat: #db2777; --cat-claro: #f472b6; }
.promo-avisos { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.promo-avisos:empty { display: none; }
.promo-aviso { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 18px; animation: entrar .35s ease-out; background: var(--tarjeta); border: 1px solid var(--borde); box-shadow: var(--sombra-1); }
.promo-aviso > div { flex: 1; min-width: 0; }
.promo-aviso > div > b { display: block; font-size: 14px; color: var(--texto); }
.promo-aviso small { display: block; font-size: 12.5px; color: var(--texto-2); line-height: 1.35; margin-top: 1px; }
.promo-aviso small b { color: var(--texto); }
.pa-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, #f472b6, #db2777); color: #fff; box-shadow: 0 8px 16px -8px #db2777; }
.pa-ico .ico, .pa-ico svg { width: 22px; height: 22px; }
.promo-aviso button { flex: none; height: 38px; padding: 0 16px; border-radius: 12px; border: 0; font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer; }
.promo-aviso.listo { background: linear-gradient(135deg, #fff5fa, #ffe4f1); border-color: #f9b8d6; box-shadow: 0 10px 22px -14px #db2777; }
.promo-aviso.listo .pa-ico { animation: pe-x-pop .6s ease; }
.promo-aviso.listo button { background: linear-gradient(135deg, #ec4899, #be185d); color: #fff; box-shadow: 0 6px 14px -6px #db2777; }
.promo-aviso.ok { background: linear-gradient(135deg, #f0fdf5, #dcf7e7); border-color: #9be0b7; }
.promo-aviso.ok .pa-ico { background: linear-gradient(135deg, #34d399, #059669); box-shadow: 0 8px 16px -8px #059669; }
.promo-aviso.ok button { background: #fff; color: var(--mal); border: 1.5px solid #f4c5c5; }
.promo-aviso.casi .pa-ico { background: color-mix(in srgb, #db2777 14%, transparent); color: #db2777; box-shadow: none; }
.pa-barra { height: 6px; margin-top: 7px; border-radius: 99px; background: var(--fondo); overflow: hidden; }
.pa-barra i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #f472b6, #db2777); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.regalo-fila { background: linear-gradient(90deg, #fff1f8, transparent); }
.regalo-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; padding: 2px 8px 2px 6px; border-radius: 99px; background: #fde4f0; color: #be185d; }
.regalo-tag .ico { width: 13px; height: 13px; }

/* hoja de promociones del vendedor */
.vp-card { border-radius: 18px; border: 1px solid var(--borde); background: var(--tarjeta); padding: 14px; margin-bottom: 12px; box-shadow: var(--sombra-1); animation: entrar .35s ease-out; --vp: #db2777; --vp2: #f472b6; }
.vp-card.descuento { --vp: #ea580c; --vp2: #fb923c; }
.vp-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.vp-card header b { display: block; font-size: 15px; }
.vp-card header small { color: var(--texto-3); font-size: 12px; font-weight: 600; }
.vp-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, var(--vp2), var(--vp)); box-shadow: 0 8px 16px -8px var(--vp); }
.vp-ico .ico, .vp-ico svg { width: 22px; height: 22px; }
.vp-et { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 800; color: var(--texto-3); text-transform: uppercase; letter-spacing: .5px; margin: 4px 0; }
.vp-et.regalo { color: #be185d; margin-top: 10px; }
.vp-et .ico { width: 14px; height: 14px; }
.vp-y { display: block; font-size: 10.5px; font-weight: 800; color: var(--vp); text-transform: uppercase; margin: 6px 0 4px 42px; }
.vp-fila { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 12px; background: var(--fondo); }
.vp-fila.regalo { background: linear-gradient(135deg, #fff1f8, #ffe4f1); }
.vp-n { min-width: 32px; height: 28px; padding: 0 7px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--tinta); color: #fff; font-weight: 800; font-size: 13.5px; }
.vp-fila.regalo .vp-n { background: linear-gradient(135deg, #ec4899, #be185d); }
.vp-pct { font-size: 28px; font-weight: 800; color: var(--vp); line-height: 1; padding: 0 4px; }
.vp-arts { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.vp-arts span { max-width: 100%; padding: 3px 8px; border-radius: 8px; background: var(--tarjeta); border: 1px solid var(--borde); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-arts .mas { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.vp-ofertas { display: flex; flex-direction: column; gap: 6px; }
.vp-ofertas div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--tarjeta); border: 1px solid var(--borde); font-size: 13px; }
.vp-ofertas b { color: var(--mal); white-space: nowrap; }
.hoja-ico.promo { background: linear-gradient(135deg, #f472b6, #db2777); color: #fff; }

/* cápsula "Regalos": promos ya agregadas */
.filtro.filtro-regalo { background: #fde7f1; border-color: #f9b8d6; color: #be185d; }
.filtro.filtro-regalo .ico { color: #db2777; }
.filtro.filtro-regalo.activo { background: #db2777; border-color: #db2777; color: #fff; }
.filtro.filtro-regalo.activo .ico { color: #fff; }
#filtro-regalos-n:not(:empty) { margin-left: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #db2777; color: #fff; font-size: 11px; font-weight: 800; display: inline-grid; place-items: center; }
.filtro-regalo.activo #filtro-regalos-n { background: #fff; color: #db2777; }
.filtro[hidden] { display: none; }

.promo-avisos.rev { margin-top: 12px; }
.vp-nueva { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #db2777; color: #fff; font-size: 11px; font-weight: 800; vertical-align: middle; animation: pe-x-pop .6s ease; }

/* aviso "¿seguro que te quieres regresar?": carrito con alerta en ámbar */
.dialogo-ico.aviso { background: linear-gradient(135deg, #fff4d6, #ffe7a3); color: #b45309; box-shadow: 0 10px 22px -12px #d97706; animation: pe-x-pop .5s ease; }
.dialogo-ico.aviso .ico { stroke-width: 2.2; }

/* elegir empresa */
.ee-lista { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; text-align: left; }
.ee-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--borde); border-radius: 14px; background: var(--tarjeta); font: inherit; cursor: pointer; }
.ee-item b { flex: 1; font-size: 15px; color: var(--texto); }
.ee-item small { font-size: 12px; font-weight: 700; color: var(--acento-osc); }
.ee-item.actual { border-color: var(--acento); background: var(--acento-suave); }
.chip-lista[hidden] { display: none; }

/* ---------- login del celular: mismo acabado que el del admin ---------- */
.login { background: linear-gradient(200deg, #1a1c22 0%, #111216 60%, #0c0d10 100%); }
.login-fondo { background: radial-gradient(70% 45% at 50% 18%, rgba(242, 176, 30, .20), transparent 70%), radial-gradient(500px 300px at 110% 110%, rgba(242, 176, 30, .08), transparent 60%); }
.login-fondo::after { opacity: .08; mask-image: radial-gradient(70% 45% at 50% 22%, #000 10%, transparent 75%); -webkit-mask-image: radial-gradient(70% 45% at 50% 22%, #000 10%, transparent 75%); }
.login-luz { position: absolute; left: 50%; top: 9%; width: 300px; height: 300px; border-radius: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(242, 176, 30, .30), transparent 65%); filter: blur(8px); animation: login-respira 6s ease-in-out infinite; }
@keyframes login-respira { 50% { transform: translateX(-50%) scale(1.1); opacity: .75; } }
.login-marca { margin-bottom: 28px; animation: entrar .6s ease-out both; }
.login-marca img { border-radius: 22px; box-shadow: none; filter: drop-shadow(0 14px 30px rgba(242, 176, 30, .45)); }
.login-marca h1 { margin-top: 14px; font-size: 46px; font-weight: 800; letter-spacing: -1.4px; line-height: 1; }
.login-lema { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; color: #f7c654; font-size: 12.5px; font-weight: 600; letter-spacing: 4px; }
.login-lema i { width: 34px; height: 1px; background: rgba(247, 198, 84, .55); }

.login-form { background: none; border: 0; padding: 0; backdrop-filter: none; gap: 14px; animation: entrar .6s .1s ease-out both; }
.login-form h2 { font-size: 28px; font-weight: 800; letter-spacing: -.6px; margin-bottom: 6px; }
.campo-caja { height: 56px; padding: 0 18px; gap: 12px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.campo-caja .ico { color: #f7c654; }
.campo-caja:focus-within { background: rgba(242, 176, 30, .08); box-shadow: 0 0 0 4px rgba(242, 176, 30, .18); }
.campo-caja input::placeholder { color: rgba(255, 255, 255, .45); letter-spacing: normal; }
.ver-pin { color: rgba(255, 255, 255, .55); }
.login-ayuda { text-align: center; color: rgba(255, 255, 255, .55); font-size: 13.5px; margin: 2px 0; }
.login-ayuda b { color: #fff; }
.login-form .btn-primario { height: 56px; border-radius: 999px; font-size: 17px; font-weight: 800; margin-top: 4px; color: #15171c;
  background: linear-gradient(90deg, #f2b01e, #f7c654 55%, #ffd977); box-shadow: 0 14px 30px -12px rgba(242, 176, 30, .75); }
.login-form .btn-primario:active { transform: translateY(1px); }
.login-pie { color: rgba(255, 255, 255, .3); }

/* =================== ANIMACIONES SUAVES =================== */
/* Cortas (≤ .4 s), sin rebotes exagerados; el bloque prefers-reduced-motion de arriba las apaga todas. */
:root { --suave: cubic-bezier(.2, .8, .2, 1); }

/* Pasos de Crear pedido (cliente → artículos → confirmar) */
.paso:not([hidden]) { animation: entrar .28s var(--suave); }

/* Inicio: las tarjetas llegan en cascada */
.pantalla[data-pantalla="inicio"]:not([hidden]) > *,
.pantalla[data-pantalla="inicio"]:not([hidden]) .acceso { animation: subir .42s var(--suave) backwards; }
.pantalla[data-pantalla="inicio"]:not([hidden]) > :nth-child(2) { animation-delay: .04s; }
.pantalla[data-pantalla="inicio"]:not([hidden]) > :nth-child(3) { animation-delay: .08s; }
.pantalla[data-pantalla="inicio"]:not([hidden]) > :nth-child(4) { animation-delay: .12s; }
.pantalla[data-pantalla="inicio"]:not([hidden]) > :nth-child(5) { animation-delay: .16s; }
.pantalla[data-pantalla="inicio"]:not([hidden]) .acceso:nth-child(1) { animation-delay: .18s; }
.pantalla[data-pantalla="inicio"]:not([hidden]) .acceso:nth-child(2) { animation-delay: .22s; }
.pantalla[data-pantalla="inicio"]:not([hidden]) .acceso:nth-child(3) { animation-delay: .26s; }
.pantalla[data-pantalla="inicio"]:not([hidden]) .acceso:nth-child(4) { animation-delay: .30s; }
.pantalla[data-pantalla="inicio"]:not([hidden]) .acceso:nth-child(n+5) { animation-delay: .34s; }

/* Avisos (toast): suben y aparecen */
.toast:not([hidden]) { animation: toast-entra .3s var(--suave); }
@keyframes toast-entra { from { opacity: 0; transform: translate(-50%, 12px) scale(.96); } }

/* Barra del carrito: sube al agregar el primer artículo */
.carrito:not([hidden]) { animation: subir .3s var(--suave); }
/* Contador y total: pequeño "latido" cuando cambian */
.carrito-badge.bump { animation: bump .32s var(--suave); }
@keyframes bump { 40% { transform: scale(1.3); } }
.carrito-total .bump, #carrito-total.bump { animation: tick .3s var(--suave); }
@keyframes tick { from { opacity: .35; transform: translateY(3px); } }

/* Respuesta al tocar: se hunden un poco */
.item, .opcion, .filtro, .chip-lista, .pestana, .res-ver, .btn-icono, .btn-info, .art-precio-btn, .hola-avatar, .menu-item {
  transition: transform .14s ease, background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.item:active, .opcion:active, .res-ver:active, .menu-item:active { transform: scale(.985); }
.filtro:active, .chip-lista:active, .pestana:active, .btn-icono:active, .hola-avatar:active { transform: scale(.94); }

/* Opción elegida en las listas: el punto aparece con suavidad */
.opcion.activa .opcion-radio::after { animation: bump-in .22s var(--suave); }
@keyframes bump-in { from { transform: scale(0); } }

/* Listas que se cargan (clientes, pedidos): aparecen sin parpadeo */
.lista-sel:not(:empty) { animation: aparecer .22s ease-out; }

/* ===== ENTRADA DEL LOGIN Y AL INICIAR SESIÓN ===== */
@keyframes z-sube { from { opacity: 0; transform: translateY(16px); } }
@keyframes z-luz { from { opacity: 0; transform: translateX(-50%) scale(.5); } }
@keyframes z-abre { from { opacity: 0; letter-spacing: 1px; } }
.login-entra .login-marca, .login-entra .login-form { animation: none; }
.login-entra .login-luz { animation: z-luz 1s .2s cubic-bezier(.2,.8,.2,1) backwards, login-respira 6s 1.2s ease-in-out infinite; }
.login-entra .login-fondo::after { animation: aparecer 1.2s .3s ease-out backwards; }
.login-entra .login-marca h1 { animation: z-sube .55s .45s cubic-bezier(.2,.8,.2,1) backwards; }
.login-entra .login-lema { animation: z-abre .7s .55s ease-out backwards; }
.login-entra .login-form > * { animation: z-sube .5s cubic-bezier(.2,.8,.2,1) backwards; }
.login-entra .login-form > :nth-child(1) { animation-delay: .62s; }
.login-entra .login-form > :nth-child(2) { animation-delay: .70s; }
.login-entra .login-form > :nth-child(3) { animation-delay: .78s; }
.login-entra .login-form > :nth-child(4) { animation-delay: .86s; }
.login-entra .login-form > :nth-child(n+5) { animation-delay: .94s; }
.login-entra .login-pie { animation: aparecer .6s 1.1s backwards; }

/* Botón Entrar al confirmar: late una vez con brillo */
#btn-entrar.entrando-ok { animation: z-ok .5s cubic-bezier(.34,1.56,.64,1); box-shadow: 0 0 0 6px rgba(242,176,30,.18), 0 12px 34px rgba(242,176,30,.45); }
@keyframes z-ok { 40% { transform: scale(1.04); } }

/* Círculo que crece desde el botón y se vuelve la app */
.cortina-entrada { position: fixed; inset: 0; z-index: 9998; pointer-events: none; clip-path: circle(0px at 50% 50%);
  background: radial-gradient(120% 80% at 50% 0%, #fff 0%, var(--fondo) 60%); }
