/* ═══════════════════════════════════════════════════════════════════════════
   Kubo Flox — sistema visual
   Limpio y profesional: superficies blancas sobre gris azulado muy claro,
   azul de marca Flox como color principal, tarjetas con radio amplio y sombra
   suave, estados en pastillas de color, íconos en "tiles" tintados.
   Mobile-first: se usa de pie, con una mano, en el depósito.
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --brand: #1f4fd1;        /* azul Flox (acción principal) */
  --brand-600: #1a43b4;
  --brand-700: #14348f;
  --navy: #0f1f5c;         /* azul profundo del logo */
  --brand-50: #eef3ff;
  --brand-100: #dbe5ff;
  --star: #e3262f;

  --bg: #f3f5fa;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --border: #e6e9f2;
  --border-2: #d7dce8;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;

  --ok: #16a34a;   --ok-bg: #e9f8ef;   --ok-tx: #15803d;
  --warn: #f59e0b; --warn-bg: #fff6e6; --warn-tx: #b45309;
  --err: #e5484d;  --err-bg: #fdeeee;  --err-tx: #c62828;
  --info-bg: var(--brand-50); --info-tx: var(--brand-700);

  --r-lg: 20px; --r: 16px; --r-sm: 12px;
  --sh-1: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.04);
  --sh-2: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.07);
  --sh-brand: 0 8px 20px rgba(31,79,209,.28);
  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --f: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-family: var(--f);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-size: 15px; line-height: 1.45; min-height: 100vh; overscroll-behavior-y: none; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
.hidden { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); font-size: .92em; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.txt-ok { color: var(--ok-tx) !important; } .txt-warn { color: var(--warn-tx) !important; } .txt-err { color: var(--err-tx) !important; }
.pad { padding: 16px; }
.ic { width: 20px; height: 20px; flex: none; }
.ic-lg { width: 28px; height: 28px; } .ic-xl { width: 40px; height: 40px; } .ic-ok { color: var(--ok); }

/* ─── Tiles de ícono y pastillas ──────────────────────────────────────── */
.tile { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: var(--brand-50); color: var(--brand); }
.tile .ic { width: 20px; height: 20px; }
.tile-ok { background: var(--ok-bg); color: var(--ok); }
.tile-warn { background: var(--warn-bg); color: var(--warn-tx); }
.tile-err { background: var(--err-bg); color: var(--err); }
.tile-gray { background: #eef1f6; color: var(--muted); }
.tile-lg { width: 52px; height: 52px; border-radius: 16px; } .tile-lg .ic { width: 26px; height: 26px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  white-space: nowrap; background: var(--brand-50); color: var(--brand-700); line-height: 1.3; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-pendiente { background: #eef1f6; color: #475569; }
.pill-armando { background: var(--warn-bg); color: var(--warn-tx); }
.pill-armado { background: var(--ok-bg); color: var(--ok-tx); }
.pill-incompleto { background: var(--err-bg); color: var(--err-tx); }
.pill-anulado { background: #eef1f6; color: var(--muted-2); text-decoration: line-through; }
.pill-plain::before { display: none; }

.okdot { width: 28px; height: 28px; border-radius: 50%; background: var(--ok); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.okdot .ic { width: 16px; height: 16px; stroke-width: 3; }
.okdot.draw { animation: pop .35s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* ─── Barra superior / pestañas ───────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 4px;
  padding: calc(10px + var(--safe-t)) 8px 10px 16px; min-height: 60px;
  background: rgba(243,245,250,.88); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.top-mark { display: none; }
.topbar h1 { flex: 1; font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#top-back:not(.hidden) ~ h1 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
#top-actions { display: flex; gap: 4px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; flex: none; color: var(--text-2); }
.icon-btn:active { background: rgba(15,23,42,.06); }
.topbar .icon-btn { background: var(--surface); box-shadow: var(--sh-1); }
#top-back { margin-left: -6px; margin-right: 6px; }
.icon-btn-sm { width: 34px; height: 34px; } .icon-btn-sm .ic { width: 18px; height: 18px; }
.icon-btn-dark { background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(8px); }
.icon-btn-dark.on { background: #fff; color: var(--navy); }

#main { padding: 4px 16px calc(var(--tab-h) + 40px + var(--safe-b)); max-width: 720px; margin: 0 auto; }
body[data-view="pedido"] #main, body[data-view="pedidoNuevo"] #main, body[data-view="articulo"] #main { padding-bottom: calc(112px + var(--safe-b)); }

/* Barra de pestañas: dock flotante. Cápsula azul profundo separada de los
   bordes; los inactivos muestran sólo el ícono y el activo se abre en una
   pastilla blanca con ícono + nombre. */
.tabbar {
  position: fixed; z-index: 20; left: 14px; right: 14px; bottom: calc(12px + var(--safe-b));
  display: flex; align-items: center; gap: 4px; height: var(--tab-h); padding: 7px;
  max-width: 520px; margin: 0 auto; border-radius: 24px;
  background: linear-gradient(180deg, #16296e, var(--navy));
  box-shadow: 0 14px 34px rgba(15,31,92,.35), 0 2px 6px rgba(15,31,92,.2), inset 0 1px 0 rgba(255,255,255,.08);
}
.tab-ind { display: none; }
.tabbar a { position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 18px; color: rgba(255,255,255,.55); font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden;
  transition: flex-grow .38s cubic-bezier(.3,1.1,.4,1), background-color .25s, color .25s; }
.tabbar a:active { transform: scale(.96); }
.tabbar .ic { width: 22px; height: 22px; flex: none; transition: transform .3s; }
.tabbar a span { max-width: 0; opacity: 0; transition: max-width .38s cubic-bezier(.3,1.1,.4,1), opacity .2s; }
.tabbar a.on { flex-grow: 2.1; background: #fff; color: var(--navy); box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.tabbar a.on .ic { color: var(--brand); stroke-width: 2.3; }
.tabbar a.on span { max-width: 110px; opacity: 1; transition-delay: 0s, .08s; }
.offline-bar { display: none; background: var(--err); color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: 6px; }
body.offline .offline-bar { display: block; }

/* ─── Tarjetas ────────────────────────────────────────────────────────── */
.card, .lbl { background: var(--surface); border-radius: var(--r); box-shadow: var(--sh-2); border: 1px solid rgba(230,233,242,.7); }
.card { overflow: hidden; }
.sec-h, .group-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 22px 2px 10px;
  font-size: 16px; font-weight: 800; letter-spacing: -.01em; color: var(--text); }
.sec-h small { font-size: 13px; font-weight: 600; color: var(--brand); }
.sub-h { font-size: 13px; font-weight: 700; color: var(--muted); margin: 18px 0 8px; }
.sec { margin: 4px 0 0; }
.sec-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; color: var(--muted); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.empty { text-align: center; color: var(--muted); padding: 40px 24px; font-weight: 500; }
.empty .tile { margin-bottom: 12px; }
.empty-box { display: none; }
.loading { display: flex; justify-content: center; padding: 70px; }
.spin { width: 22px; height: 22px; border: 2.5px solid var(--brand-100); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.rise > * { animation: rise .35s cubic-bezier(.2,.8,.25,1) both; }
.rise > *:nth-child(2) { animation-delay: .03s; } .rise > *:nth-child(3) { animation-delay: .06s; }
.rise > *:nth-child(4) { animation-delay: .09s; } .rise > *:nth-child(n+5) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ─── Botones ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px;
  border-radius: 14px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  font-weight: 700; font-size: 15px; transition: transform .08s, background .15s; user-select: none;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: var(--sh-brand); }
.btn-primary:active { background: var(--brand-600); }
.btn-danger { background: var(--err); color: #fff; border-color: var(--err); }
.btn-ghost { background: var(--surface); color: var(--brand); border-color: var(--border-2); }
.btn-soft { background: var(--brand-50); color: var(--brand); border-color: transparent; }
.btn-light { background: #fff; color: var(--err-tx); border-color: #fff; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 11px; }
.btn-lg { min-height: 54px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-grow { flex: 1; }
.btn-step { width: 52px; min-width: 52px; padding: 0; background: var(--surface-2); color: var(--text-2); }
.btn-scan { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: var(--sh-brand); }
.fab {
  position: fixed; right: 18px; bottom: calc(var(--tab-h) + 26px + var(--safe-b)); z-index: 15; width: 58px; height: 58px; border-radius: 18px;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-brand);
}
.fab:active { transform: scale(.95); }
.fab .ic { width: 26px; height: 26px; stroke-width: 2.4; }
.link-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; color: var(--brand); font-weight: 700; font-size: 14px; }

/* ─── Formularios ─────────────────────────────────────────────────────── */
.inp {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--border-2); border-radius: 14px; background: var(--surface);
  font: inherit; font-size: 15px; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
.inp::placeholder { color: var(--muted-2); }
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31,79,209,.12); }
textarea.inp { min-height: 90px; resize: vertical; }
.inp:disabled, .inp-ro { background: var(--surface-2); color: var(--muted); display: flex; align-items: center; }
.inp-num { text-align: center; font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.inp-num::-webkit-outer-spin-button, .inp-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.inp-date { width: auto; min-height: 38px; padding: 6px 12px; font-size: 13.5px; border-radius: 11px; font-weight: 600; color: var(--text-2); }
.inp-group { display: flex; gap: 8px; } .inp-group .btn { flex: none; padding: 0 14px; }
.inp-ic { position: relative; display: block; }
.inp-ic > .ic { position: absolute; left: 15px; top: 15px; color: var(--muted-2); }
.inp-ic .inp { padding-left: 46px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 12.5px; font-weight: 500; min-height: 1em; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 4px 0 12px; min-height: 40px; color: var(--text-2); }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form { padding: 18px 16px 6px; }
.stepper { display: flex; gap: 10px; align-items: stretch; margin-bottom: 12px; }
.stepper .inp-num { flex: 1; min-height: 58px; font-size: 28px; }
.stepper .btn-step { min-height: 58px; }
.stepper-sm { margin: 0; width: 176px; flex: none; gap: 6px; }
.stepper-sm .inp-num, .stepper-sm .btn-step { min-height: 46px; font-size: 20px; }
.stepper-sm .btn-step { width: 46px; min-width: 46px; border-radius: 12px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.search { position: relative; display: block; margin-bottom: 12px; }
.search .ic { position: absolute; left: 15px; top: 15px; color: var(--muted-2); }
.search .inp { padding-left: 46px; border-color: transparent; box-shadow: var(--sh-1); }
.search .inp:focus { border-color: var(--brand); }

/* ─── Chips / tags / segmentado ───────────────────────────────────────── */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 18px 14px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 15px; border-radius: 999px; background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 13.5px;
  min-height: 38px; border: 1px solid var(--border); box-shadow: var(--sh-1); }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.quick .chip { max-width: 100%; white-space: normal; text-align: left; line-height: 1.3; box-shadow: none; background: var(--brand-50); color: var(--brand-700); border-color: transparent; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; font-size: 12px; font-weight: 700; background: var(--brand-50); color: var(--brand-700); }
.tag .ic { width: 13px; height: 13px; }
.tag-ok { background: var(--ok-bg); color: var(--ok-tx); } .tag-warn { background: var(--warn-bg); color: var(--warn-tx); } .tag-err { background: var(--err-bg); color: var(--err-tx); }
.seg { display: flex; padding: 4px; gap: 4px; margin-bottom: 16px; border-radius: 14px; background: #e8ebf3; }
.seg button { flex: 1; min-height: 40px; border-radius: 11px; font-weight: 700; font-size: 13.5px; color: var(--muted); white-space: nowrap;
  display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }
.seg .ic { width: 17px; height: 17px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; font-weight: 500; margin-bottom: 12px; line-height: 1.45; }
.alert .ic { width: 18px; height: 18px; margin-top: 1px; }
.alert-info { background: var(--info-bg); color: var(--info-tx); } .alert-warn { background: var(--warn-bg); color: var(--warn-tx); } .alert-err { background: var(--err-bg); color: var(--err-tx); }

/* ─── Filas ───────────────────────────────────────────────────────────── */
.list { overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-align: left; min-height: 64px; position: relative; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; height: 1px; background: var(--border); }
.row:has(> .tile) + .row:has(> .tile)::before { left: 68px; }
button.row:active, a.row:active { background: var(--surface-2); }
.row > .ic { color: var(--muted-2); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main b { font-size: 15px; font-weight: 700; color: var(--text); }
.row-main small { color: var(--muted); font-size: 12.5px; }
.row-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.row-num { text-align: right; display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.row-num b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.row-num small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.row-off { opacity: .45; }
.row-rech { background: #fffafa; }

/* ─── Hero (tarjeta azul de resumen) ──────────────────────────────────── */
.hero { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 18px; color: #fff; margin-bottom: 16px;
  background: radial-gradient(120% 140% at 100% 0%, #2f63ea 0%, var(--brand) 38%, var(--navy) 100%); box-shadow: 0 12px 28px rgba(15,31,92,.28); }
.hero::after { content: ""; position: absolute; right: -40px; top: -50px; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%); pointer-events: none; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hero small { display: block; font-size: 13px; font-weight: 600; opacity: .8; }
.hero .hero-big { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hero .hero-big span { font-size: 16px; font-weight: 600; opacity: .75; margin-left: 4px; letter-spacing: 0; }
.hero-ic { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; flex: none; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 16px; }
.hero-stats > div { background: rgba(255,255,255,.12); border-radius: 14px; padding: 10px 12px; }
.hero-stats b { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hero-stats small { font-size: 11.5px; opacity: .8; }
.hero-stats .alert-n b { color: #ffd0d2; }
.hero .bar { background: rgba(255,255,255,.2); margin-top: 12px; }
.hero .bar i { background: #fff; }
.hero .bar.full i { background: #6ee7a0; }
.hero .pill { background: rgba(255,255,255,.18); color: #fff; }
.hero .pill-armado { background: #dcfce7; color: #166534; }
.hero .pill-incompleto { background: #fee2e2; color: #b91c1c; }
.hero .pill-armando { background: #fef3c7; color: #92400e; }

/* ─── Barra de progreso ───────────────────────────────────────────────── */
.bar { position: relative; height: 8px; border-radius: 99px; background: #e8ecf5; overflow: hidden; margin-top: 10px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--brand); transition: width .35s cubic-bezier(.2,.8,.25,1); }
.bar.full i { background: var(--ok); }
.bar-sm { height: 6px; margin-top: 8px; }
.bar-lg { height: 10px; }

/* ─── Stock ───────────────────────────────────────────────────────────── */
.grp { margin-bottom: 14px; }
.grp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 4px; font-size: 12px; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; }
.grp-head small { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 12.5px; }
.disp { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.no-cod { color: var(--warn-tx); font-weight: 600; }

/* ─── Producción ──────────────────────────────────────────────────────── */
.action-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; text-align: left; margin-bottom: 10px;
  background: var(--surface); border-radius: var(--r); box-shadow: var(--sh-2); border: 1px solid rgba(230,233,242,.7); }
.action-card:active { transform: scale(.99); }
.action-card b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.action-card small { color: var(--muted); font-size: 13px; }
.action-card > span:nth-child(2) { flex: 1; min-width: 0; }
.action-card > .ic { color: var(--muted-2); }
.action-primary { background: radial-gradient(120% 140% at 100% 0%, #2f63ea 0%, var(--brand) 40%, var(--navy) 100%); color: #fff; border: 0; box-shadow: 0 12px 28px rgba(15,31,92,.28); }
.action-primary small { color: rgba(255,255,255,.8); }
.action-primary .tile { background: rgba(255,255,255,.16); color: #fff; }
.action-primary > .ic { color: rgba(255,255,255,.7); }
.total-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--surface-2); border-top: 1px solid var(--border); font-weight: 700; }
.total-row b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.art-card { display: flex; align-items: center; gap: 14px; background: var(--brand-50); border-radius: var(--r); padding: 14px; margin-bottom: 16px; }
.art-card > div { display: flex; flex-direction: column; min-width: 0; }
.art-card b { font-size: 16px; font-weight: 800; } .art-card span { font-weight: 600; color: var(--text-2); } .art-card small { color: var(--muted); margin-top: 2px; }
.u-calc { color: var(--muted); font-weight: 600; margin: -4px 0 14px; text-align: center; font-variant-numeric: tabular-nums; }

/* ─── Pedidos ─────────────────────────────────────────────────────────── */
.cards { display: flex; flex-direction: column; gap: 12px; }
.pcard { display: block; padding: 16px; }
.pcard:active { transform: scale(.99); }
.pc-top { display: flex; align-items: center; gap: 12px; }
.pc-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pc-id b { font-size: 16px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-id small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-prog { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.pc-prog .row-between small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.pc-prog .row-between b { color: var(--text); font-size: 14px; }

.phead-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; padding: 16px; }
.phead-meta span { display: flex; flex-direction: column; font-size: 14px; font-weight: 700; min-width: 0; color: var(--text); }
.phead-meta small { font-size: 12px; color: var(--muted); font-weight: 500; }
.obs { background: var(--surface-2); padding: 10px 12px; border-radius: 12px; margin: 0 16px 16px; font-size: 13.5px; color: var(--text-2); }
.hero-cli { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 10px 0 2px; }
.hero-sub { font-size: 13px; opacity: .8; }
.hero-prog { margin-top: 16px; display: flex; align-items: flex-end; justify-content: space-between; }
.hero-prog b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-prog b span { font-size: 15px; opacity: .75; font-weight: 600; letter-spacing: 0; }
.hero-prog .pct { font-size: 13px; font-weight: 700; opacity: .9; }

.items .item { min-height: 76px; }
.item .row-main b { font-size: 15px; }
.item .row-main .pres { font-size: 13px; color: var(--text-2); font-weight: 600; }
.item-num b { font-size: 20px; }
.item-num b span { font-size: 14px; color: var(--muted); font-weight: 600; }
.item-full .item-num b { color: var(--ok-tx); }

.lin { padding: 14px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
.lin-err { box-shadow: 0 0 0 1.5px var(--err), var(--sh-2); }
.lin-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.lin-orig { font-size: 12px; color: var(--muted); line-height: 1.45; padding-top: 7px; }
.lin-orig b { color: var(--text-2); font-weight: 600; }
.lin-q { display: flex; align-items: center; gap: 14px; }
.lin-u { color: var(--muted); font-size: 12.5px; font-weight: 500; line-height: 1.35; }
.lin-u b { color: var(--text); font-weight: 700; }
.lin .alert { margin: 0; }
.art-pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); text-align: left; min-height: 60px; border: 1px solid var(--border); }
.art-pick .ap-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.art-pick .ap-main b { font-size: 14.5px; font-weight: 700; }
.art-pick .ap-main span { font-size: 13px; color: var(--muted); font-weight: 500; }
.art-pick.vacio { background: var(--err-bg); border-color: transparent; color: var(--err-tx); font-weight: 700; }
.art-pick > .ic:last-child { color: var(--muted-2); }
.como { align-self: flex-start; }

.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 18; display: flex; gap: 10px; align-items: center;
  padding: 12px 16px calc(12px + var(--safe-b)); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); border-top: 1px solid var(--border);
}
.bottom-bar .btn { white-space: nowrap; flex-shrink: 0; }
.bottom-bar .btn-grow { flex-shrink: 1; }
.bb-info { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.bb-info b { color: var(--text); font-size: 18px; font-weight: 800; }
.fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; }
.foto { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.foto-add { border: 1.5px dashed var(--border-2); color: var(--brand); flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; cursor: pointer; }
.foto-full { width: 100%; border-radius: 14px; }
.lect .row-num b { font-size: 16px; }

/* ─── Más ─────────────────────────────────────────────────────────────── */
.profile { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 16px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--navy)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; flex: none; }
.profile > div { display: flex; flex-direction: column; min-width: 0; } .profile b { font-size: 17px; font-weight: 800; }
.profile small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ver { text-align: center; color: var(--muted-2); font-size: 12px; margin-top: 22px; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r); text-align: left; cursor: pointer; background: var(--surface); }
.opt:active { background: var(--surface-2); }
.opt > div { display: flex; flex-direction: column; flex: 1; } .opt b { font-weight: 700; } .opt small { color: var(--muted); }

/* selector de artículo */
.pick-list { margin: 0 -4px; }
.pick-grp { margin-bottom: 14px; }
.pick-grp h4 { position: sticky; top: -8px; z-index: 1; padding: 8px 6px; background: var(--surface); font-size: 12px; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; }
.pick-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 10px; border-radius: 12px; text-align: left; min-height: 56px; }
.pick-row:active, .pick-row.on { background: var(--brand-50); }
.pick-main { flex: 1; display: flex; flex-direction: column; }
.pick-main b { font-weight: 700; font-size: 15px; } .pick-main small { color: var(--muted); font-size: 12.5px; }
.pick-cod { font-size: 12px; color: var(--muted); }
.pick-sin { color: var(--warn-tx); font-weight: 600; }

/* ─── Hoja inferior ───────────────────────────────────────────────────── */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.42); opacity: 0; transition: opacity .2s; backdrop-filter: blur(2px); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 90vh; background: var(--surface); border-radius: 24px 24px 0 0;
  display: flex; flex-direction: column; transform: translateY(100%); transition: transform .26s cubic-bezier(.2,.85,.3,1);
  max-width: 640px; margin: 0 auto; padding-bottom: var(--safe-b); box-shadow: 0 -8px 30px rgba(15,23,42,.12); }
.sheet-tall { height: 90vh; }
.sheet-wrap.in .sheet-backdrop { opacity: 1; } .sheet-wrap.in .sheet { transform: none; }
.sheet-grip { width: 38px; height: 5px; border-radius: 9px; background: var(--border-2); margin: 10px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 6px 20px; }
.sheet-head h2 { flex: 1; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.sheet-body { padding: 8px 20px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-text { margin: 0 0 14px; line-height: 1.55; color: var(--text-2); }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions .btn { flex: 1; }
.done-big { text-align: center; padding: 8px 0 4px; }
.done-big .okdot { width: 64px; height: 64px; } .done-big .okdot .ic { width: 32px; height: 32px; }
.done-big .okdot.warn { background: var(--warn); }
.done-big h3 { font-size: 20px; font-weight: 800; margin-top: 14px; }
.done-big p { color: var(--muted); margin: 6px 0 0; }

/* ─── Toasts ──────────────────────────────────────────────────────────── */
#toasts { position: fixed; left: 16px; right: 16px; top: calc(12px + var(--safe-t)); z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { max-width: 520px; padding: 12px 16px; border-radius: 14px; background: var(--navy); color: #fff; font-weight: 600; font-size: 14px;
  box-shadow: 0 12px 30px rgba(15,23,42,.25); opacity: 0; transform: translateY(-8px); transition: all .22s; }
.toast.in { opacity: 1; transform: none; }
.toast-ok { background: #0f5132; } .toast-err { background: #b42318; } .toast-warn { background: #92400e; }

/* ─── Login ───────────────────────────────────────────────────────────── */
body.is-login { background: var(--surface); }
#login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 22px; }
.login-card { width: 100%; max-width: 380px; animation: rise .4s cubic-bezier(.2,.8,.25,1) both; }
.login-logo { width: 84px; height: 84px; border-radius: 24px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 140% at 100% 0%, #2f63ea 0%, var(--brand) 40%, var(--navy) 100%); box-shadow: 0 14px 30px rgba(15,31,92,.3);
  color: #fff; font-weight: 800; font-style: italic; font-size: 26px; letter-spacing: -.03em; }
.login-logo .o { position: relative; }
.login-logo .star { position: absolute; right: -.1em; top: -.15em; color: #ff5a60; font-style: normal; font-size: .45em; }
.login-card h1 { text-align: center; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.login-sub { text-align: center; color: var(--muted); margin: 6px 0 28px; }
.login-foot { text-align: center; color: var(--muted-2); font-size: 12.5px; margin-top: 26px; }
.login-foot b { color: var(--muted); }

/* ─── Escáner ─────────────────────────────────────────────────────────── */
.scan-wrap { position: fixed; inset: 0; z-index: 200; background: #050a1c; color: #fff; display: flex; flex-direction: column; animation: fadein .15s; }
.scan-wrap.out { opacity: 0; transition: opacity .15s; }
@keyframes fadein { from { opacity: 0; } }
.scan-view { position: absolute; inset: 0; overflow: hidden; }
.scan-view video { width: 100% !important; height: 100% !important; object-fit: cover; }
.scan-view #qr-shaded-region { border-width: 0 !important; }
.scan-guide { position: absolute; left: 7%; right: 7%; top: 19%; height: clamp(92px, 15vh, 136px); pointer-events: none; box-shadow: 0 0 0 9999px rgba(5,10,28,.55); border-radius: 18px; }
.scan-guide span { position: absolute; inset: 0; border-radius: 18px;
  background:
    linear-gradient(#fff,#fff) top left / 30px 3px, linear-gradient(#fff,#fff) top left / 3px 30px,
    linear-gradient(#fff,#fff) top right / 30px 3px, linear-gradient(#fff,#fff) top right / 3px 30px,
    linear-gradient(#fff,#fff) bottom left / 30px 3px, linear-gradient(#fff,#fff) bottom left / 3px 30px,
    linear-gradient(#fff,#fff) bottom right / 30px 3px, linear-gradient(#fff,#fff) bottom right / 3px 30px;
  background-repeat: no-repeat; }
.scan-guide::after { content: ""; position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: #5b8cff; box-shadow: 0 0 14px 2px rgba(91,140,255,.8); animation: laser 1.6s ease-in-out infinite; }
@keyframes laser { 50% { opacity: .3; } }
.scan-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.scan-flash.ok { background: rgba(22,163,74,.45); } .scan-flash.err { background: rgba(229,72,77,.6); } .scan-flash.warn { background: rgba(245,158,11,.4); }
.scan-flash.go { animation: flash .5s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
.scan-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; padding: calc(12px + var(--safe-t)) 14px 12px; }
.scan-title { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.scan-title b { font-size: 17px; font-weight: 800; }
.scan-title small { opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scan-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 16px 16px calc(14px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); color: var(--text); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.25); }
.scan-modes { margin: 0; }
.scan-info { font-size: 13px; }
.si-prog { display: flex; align-items: center; gap: 12px; }
.si-prog b { font-size: 18px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.si-prog b span { font-size: 13px; color: var(--muted); font-weight: 600; }
.si-prog .bar { flex: 1; margin: 0; }
.si-falt { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; color: var(--muted); font-size: 12.5px; }
.si-falt b { color: var(--text-2); }
.scan-result { min-height: 64px; }
.sr-idle { color: var(--muted); text-align: center; padding: 14px 10px; font-size: 13px; background: var(--surface-2); border-radius: 14px; }
.sr { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); animation: srIn .25s cubic-bezier(.2,1.2,.4,1); }
@keyframes srIn { from { transform: translateY(6px); opacity: .3; } }
.sr > .ic { width: 26px; height: 26px; }
.sr-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sr-txt b { font-weight: 700; font-size: 15px; line-height: 1.3; } .sr-txt small { color: inherit; opacity: .8; }
.sr-big { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.sr-ok { background: var(--ok-bg); color: var(--ok-tx); }
.sr-err { background: var(--err-bg); color: var(--err-tx); }
.sr-warn { background: var(--warn-bg); color: var(--warn-tx); }
.scan-stamp { position: absolute; left: 50%; top: 30%; z-index: 3; pointer-events: none; width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%;
  background: rgba(22,163,74,.92); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0; opacity: 0;
  box-shadow: 0 0 0 12px rgba(22,163,74,.25); }
.scan-stamp::after { content: ""; width: 44px; height: 24px; border-left: 7px solid #fff; border-bottom: 7px solid #fff; transform: rotate(-45deg) translate(3px,-4px); border-radius: 2px; }
.scan-stamp.go { animation: okPop .9s cubic-bezier(.2,1.3,.4,1) forwards; }
@keyframes okPop { 0% { opacity: 0; transform: scale(.5); } 20% { opacity: 1; transform: scale(1.05); } 30% { transform: scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: scale(1); } }
.scan-manual { display: flex; gap: 8px; align-items: center; }
.scan-manual .ic-wrap { color: var(--muted-2); display: flex; }
.scan-manual .inp { min-height: 44px; font-size: 14px; border-radius: 12px; background: var(--surface-2); border-color: transparent; }
.scan-manual .btn { min-height: 44px; border-radius: 12px; }
.scan-block, .scan-prompt { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 24px; }
.scan-block { background: #d92d20; animation: fadein .12s; }
.scan-prompt { background: rgba(5,10,28,.55); align-items: flex-end; padding: 0; }
.block-card { text-align: center; max-width: 400px; color: #fff; }
.block-card .err-ic { width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
  animation: pop .35s cubic-bezier(.2,1.4,.4,1) both; }
.block-card .err-ic .ic { width: 38px; height: 38px; stroke-width: 2.4; }
.block-card .pill { background: rgba(255,255,255,.2); color: #fff; margin-bottom: 12px; letter-spacing: .06em; }
.block-card h3 { font-size: 24px; font-weight: 800; margin: 0 0 8px; line-height: 1.2; letter-spacing: -.01em; }
.block-card p { font-size: 15.5px; opacity: .9; margin: 0 0 28px; }
.block-card .btn { min-width: 220px; }
.prompt-card { background: var(--surface); color: var(--text); width: 100%; max-width: 640px; border-radius: 24px 24px 0 0;
  padding: 22px 20px calc(18px + var(--safe-b)); animation: rise .25s cubic-bezier(.2,.8,.25,1); }
.prompt-card h3 { font-size: 18px; font-weight: 800; }
.prompt-card p { color: var(--muted); margin: 4px 0 16px; }
.scan-cam-err { position: absolute; left: 28px; right: 28px; top: 24%; z-index: 3; text-align: center; color: rgba(255,255,255,.8); font-size: 14px; }
.scan-cam-err .ic { width: 40px; height: 40px; margin-bottom: 10px; opacity: .8; }

@media (min-width: 700px) { .fotos { grid-template-columns: repeat(5, 1fr); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* ─── Mi cuenta (menú) ────────────────────────────────────────────────── */
.me-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 6px 2px 16px; }
.me-id h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.me-rol { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.me-rol .ic { width: 15px; height: 15px; color: var(--brand); }
.me-av { width: 64px; height: 64px; border-radius: 22px; flex: none; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 140% at 100% 0%, #2f63ea 0%, var(--brand) 40%, var(--navy) 100%); color: #fff; font-weight: 800; font-size: 22px;
  box-shadow: 0 10px 22px rgba(15,31,92,.28); transform: rotate(-3deg); }
.me-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--surface); border-radius: var(--r); box-shadow: var(--sh-2); padding: 14px 4px; }
.me-stats > div { text-align: center; padding: 0 6px; }
.me-stats > div + div { border-left: 1px solid var(--border); }
.me-stats b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.me-stats small { display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.sd { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.sd-blue { background: var(--brand); } .sd-green { background: var(--ok); } .sd-amber { background: var(--warn); }
.me-hoy { font-size: 12px; color: var(--muted-2); text-align: center; margin: 8px 0 16px; }
.toggles { margin-bottom: 18px; }
.tg-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; position: relative; cursor: pointer; }
.tg-row + .tg-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; height: 1px; background: var(--border); }
.menu-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.menu-txt b { font-size: 15px; font-weight: 700; } .menu-txt small { font-size: 12.5px; color: var(--muted); }
.switch { -webkit-appearance: none; appearance: none; width: 50px; height: 30px; border-radius: 99px; background: #d9deea; position: relative; cursor: pointer; flex: none;
  transition: background .2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(15,23,42,.2); transition: transform .25s cubic-bezier(.3,1.3,.5,1); }
.switch:checked { background: var(--brand); }
.switch:checked::after { transform: translateX(20px); }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 6px; border-radius: 14px; text-align: left; }
.menu-row:active { background: rgba(15,23,42,.04); }
.menu-row > .ic { color: var(--muted-2); }
.dot { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.dot .ic { width: 20px; height: 20px; }
.dot-blue { background: linear-gradient(135deg, #4f7cff, var(--brand)); box-shadow: 0 6px 14px rgba(31,79,209,.3); }
.dot-violet { background: linear-gradient(135deg, #9b7bff, #6d4ef2); box-shadow: 0 6px 14px rgba(109,78,242,.3); }
.dot-green { background: linear-gradient(135deg, #34d07a, #16a34a); box-shadow: 0 6px 14px rgba(22,163,74,.28); }
.dot-red { background: linear-gradient(135deg, #ff7a7e, #e5484d); box-shadow: 0 6px 14px rgba(229,72,77,.3); }
.dot-amber { background: linear-gradient(135deg, #ffc14d, #f59e0b); }

.scan-guide em { position: absolute; left: 0; right: 0; top: calc(100% + 12px); text-align: center; font-style: normal; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.85); text-shadow: 0 1px 6px rgba(0,0,0,.5); }

/* elegir cámara */
.scan-af { position: absolute; z-index: 3; left: 50%; top: calc(64px + var(--safe-t)); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; background: rgba(245,158,11,.95); color: #1f1300; font-size: 13px; font-weight: 600; white-space: nowrap; }
.scan-af .ic { width: 16px; height: 16px; }
.cam-card { max-height: 80vh; overflow-y: auto; }
.cam-list { display: flex; flex-direction: column; gap: 6px; }
.cam-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 14px; border: 1px solid var(--border); text-align: left; background: var(--surface); }
.cam-row.on { border-color: var(--brand); background: var(--brand-50); }
.cam-row:disabled { opacity: .5; }
.cam-row .tag { flex: none; }

/* "+" de la pantalla: una línea sobre el dock que viene desde los costados,
   se eleva en el centro y se apoya en un círculo azul con el + blanco.
   Reemplaza al botón flotante de la esquina. */
.fab { display: none !important; }
.dock-plus { position: absolute; left: 0; right: 0; bottom: calc(100% + 2px); height: 60px; pointer-events: none; }
/* fundido del fondo detrás de la línea: el contenido que pasa por debajo no se mezcla */
.dock-plus::before { content: ""; position: absolute; left: -14px; right: -14px; top: -10px; bottom: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(243,245,250,0), rgba(243,245,250,.94) 45%, var(--bg)); }
.dock-plus svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform-origin: 50% 40%; }
.dock-plus .dp-line { fill: none; stroke: var(--brand); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.dock-plus .dp-circ { filter: drop-shadow(0 5px 8px rgba(31,79,209,.4)); transform-box: fill-box; transform-origin: center; }
.dock-plus .dp-cruz { fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; transform-box: fill-box; transform-origin: center; }
.dock-plus .dp-txt { fill: var(--brand); font-size: 8.6px; font-weight: 800; letter-spacing: 1.6px; font-family: var(--f); }
.dock-plus.anim .dp-txt { opacity: 0; animation: dpTxt .35s .85s ease-out forwards; }
@keyframes dpTxt { to { opacity: 1; } }
.dock-plus button { position: absolute; left: 50%; top: -2px; width: 64px; height: 52px; margin-left: -32px; pointer-events: auto; border-radius: 50%; }
.dock-plus.anim .dp-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: dpDraw .5s cubic-bezier(.5,0,.2,1) forwards; }
.dock-plus.anim .dp-circ { transform: scale(0); animation: dpPop .38s .42s cubic-bezier(.3,1.6,.5,1) forwards; }
.dock-plus.anim .dp-cruz { transform: scale(0) rotate(-90deg); animation: dpCruz .32s .62s cubic-bezier(.3,1.5,.5,1) forwards; }
.dock-plus.tap svg { animation: dpTap .32s ease-out; }
@keyframes dpDraw { to { stroke-dashoffset: 0; } }
@keyframes dpPop { to { transform: scale(1); } }
@keyframes dpCruz { to { transform: scale(1) rotate(0); } }
@keyframes dpTap { 40% { transform: translateY(2px) scale(.96); } }
body.has-add #main { padding-bottom: calc(var(--tab-h) + 86px + var(--safe-b)); }

/* Debajo del dock flotante: fundido para que la lista no asome entre la barra y el borde. */
body:not(.is-login)::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; z-index: 19; pointer-events: none;
  height: calc(var(--tab-h) / 2 + 12px + var(--safe-b)); background: linear-gradient(to bottom, rgba(243,245,250,0), var(--bg) 60%); }
body[data-view="pedido"]::after, body[data-view="pedidoNuevo"]::after, body[data-view="articulo"]::after { display: none; }

/* opción todavía no habilitada */
.opt-off { opacity: .55; cursor: default; background: var(--surface-2); }
.opt-off:active { background: var(--surface-2); transform: none; }
.opt-prox { flex: none; background: #eef1f6; color: var(--muted); }
