/* ============================================================
   SOLEA · Inventario — estilo Apple, claro y sutil
   (vidrio solo en navegación y ventanas; el resto, blanco limpio)
   ============================================================ */
:root {
  --naranja: #FF681F;
  --naranja-osc: #E0560F;
  --naranja-tinte: rgba(255, 104, 31, .1);
  --btn1: #FF681F;
  --btn2: #FF681F;
  --tinta: #1D1D1F;
  --gris: #6E6E73;
  --gris-claro: #AEAEB2;
  --panel: #F5F5F7;
  --verde: #1C8A4F;
  --rojo: #D93636;
  --ambar: #B26A00;
  --linea: rgba(0, 0, 0, .08);
  --vidrio: rgba(255, 255, 255, .66);
  --blur: saturate(180%) blur(28px);
  --sombra: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 28px -14px rgba(0, 0, 0, .14);
  --radio: 20px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Poppins', sans-serif; color: var(--tinta); font-size: 15px; line-height: 1.45; font-weight: 400;
  min-height: 100vh; min-height: 100dvh; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(40% 36% at 4% 0%, rgba(255, 104, 31, .09), transparent 70%),
    radial-gradient(38% 34% at 98% 4%, rgba(255, 247, 180, .5), transparent 70%),
    radial-gradient(40% 30% at 70% 100%, rgba(255, 104, 31, .05), transparent 70%),
    #fff;
  background-attachment: fixed;
}
body.noscroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; touch-action: manipulation; }
[hidden] { display: none !important; }
.ic { flex: none; display: block; }
h1, h2, h3 { line-height: 1.2; font-weight: 600; }
a { color: inherit; }

/* ---------- Vidrio (solo navegación, ventanas y botón flotante) ---------- */
.glass, .side, .top, .tabbar, .md, .auth-card, .vpanel {
  background: var(--vidrio); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .06), inset 0 1px 0 rgba(255, 255, 255, .9), 0 10px 30px -12px rgba(0, 0, 0, .18);
}

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 20px; border-radius: 999px; font-weight: 500; font-size: .92rem; color: #fff;
  background: var(--naranja); transition: transform .15s, background .15s, opacity .15s; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--naranja-osc); }
.btn:active { transform: scale(.97); }
.btn.sec { background: var(--panel); color: var(--tinta); }
.btn.sec:hover { background: #E8E8ED; }
.btn.ghost { background: transparent; color: var(--gris); }
.btn.ghost:hover { background: var(--panel); }
.btn.danger { background: #FDECEC; color: var(--rojo); }
.btn.wa { background: #1FA855; }
.btn.wa:hover { background: #178a45; }
.btn.sm { min-height: 34px; padding: 0 14px; font-size: .84rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.iconbtn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--gris); transition: background .15s; }
.iconbtn:hover { background: var(--panel); color: var(--tinta); }

/* ---------- Formularios ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .76rem; font-weight: 500; color: var(--gris); margin-bottom: 6px; padding-left: 2px; }
.inp, select.inp, textarea.inp { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid transparent; border-radius: 12px; outline: none; font-size: 16px; background: var(--panel); transition: box-shadow .15s, background .15s; }
textarea.inp { min-height: 84px; resize: vertical; }
.inp:focus { background: #fff; box-shadow: 0 0 0 3.5px rgba(255, 104, 31, .25); border-color: rgba(255, 104, 31, .5); }
.inp::placeholder { color: var(--gris-claro); }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
.check { display: flex; align-items: center; gap: 10px; font-size: .92rem; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--naranja); }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #E3E3E8; transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch input:checked + i { background: var(--naranja); }
.switch input:checked + i::after { transform: translateX(18px); }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 20px; }
.auth-card { width: 100%; max-width: 400px; border-radius: 28px; padding: 32px 28px; }
.auth-logo { display: block; width: 150px; margin: 0 auto 4px; }
.auth-sub { text-align: center; font-size: .68rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--gris); margin: 8px 0 24px; padding-left: .3em; }
.auth .tabs2 { display: flex; background: var(--panel); border-radius: 999px; padding: 3px; margin-bottom: 18px; }
.auth .tabs2 button { flex: 1; min-height: 36px; border-radius: 999px; font-weight: 500; font-size: .86rem; color: var(--gris); }
.auth .tabs2 button.on { background: #fff; color: var(--tinta); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.err { background: #FDECEC; color: var(--rojo); border-radius: 12px; padding: 10px 14px; font-size: .86rem; margin-bottom: 12px; }
.demo-note { background: #FFF8D6; border-radius: 14px; padding: 12px 14px; font-size: .85rem; margin-bottom: 16px; }
.demo-btns { display: grid; gap: 10px; }

/* ---------- Layout ---------- */
#app { display: flex; min-height: 100vh; min-height: 100dvh; }
.side { width: 244px; flex: none; margin: 12px 0 12px 12px; border-radius: 26px; padding: 22px 12px 14px; display: none; flex-direction: column; position: sticky; top: 12px; height: calc(100vh - 24px); height: calc(100dvh - 24px); }
.side .logo { width: 120px; margin: 2px 12px 0; display: block; }
.side .tag { font-size: .58rem; letter-spacing: .32em; text-transform: uppercase; margin: 4px 12px 22px; color: var(--gris); font-weight: 500; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav .sep { height: 1px; background: var(--linea); margin: 10px 12px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; color: var(--tinta); text-decoration: none; font-weight: 400; font-size: .92rem; position: relative; transition: background .15s; }
.nav a .ic { color: var(--gris); }
.nav a:hover { background: rgba(0, 0, 0, .04); }
.nav a.on { background: var(--naranja-tinte); color: var(--naranja-osc); font-weight: 500; }
.nav a.on .ic { color: var(--naranja); }
.nav .dot, .tabbar .dot { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--rojo); color: #fff; font-size: .68rem; font-weight: 600; display: grid; place-items: center; margin-left: auto; }
.userbox { margin-top: auto; border-top: 1px solid var(--linea); padding: 14px 12px 0; font-size: .84rem; }
.userbox b { display: block; font-weight: 500; }
.userbox small { color: var(--gris); }
.userbox button { margin-top: 10px; display: flex; align-items: center; gap: 8px; color: var(--gris); }
.userbox button:hover { color: var(--rojo); }

.main { flex: 1; min-width: 0; padding-bottom: 150px; }
.top { position: sticky; top: 8px; z-index: 20; margin: 8px 10px 0; border-radius: 999px; display: flex; align-items: center; gap: 12px; padding: 6px 8px 6px 18px; }
.top h1 { font-size: 1.02rem; font-weight: 600; flex: 1; }
.top .mini-logo { height: 22px; display: block; }
.view { padding: 18px 16px; max-width: 1180px; margin: 0 auto; }
.view.narrow { max-width: 820px; }
.demo-bar { margin: 8px 10px 0; padding: 8px 14px; border-radius: 14px; background: #FFF8D6; color: #6b5a00; font-size: .76rem; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; justify-content: center; text-align: center; }
.demo-bar button { text-decoration: underline; color: #6b5a00; font-size: .76rem; font-weight: 500; }

.tabbar { position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); border-radius: 26px; display: flex; overflow-x: auto; padding: 5px; gap: 2px; scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar a { flex: 1 0 60px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 4px; border-radius: 20px; color: var(--gris); text-decoration: none; font-size: .64rem; font-weight: 500; position: relative; }
.tabbar a.on { color: var(--naranja-osc); background: var(--naranja-tinte); }
.tabbar .dot { position: absolute; top: 2px; right: 10px; min-width: 16px; height: 16px; font-size: .58rem; padding: 0 4px; margin: 0; }


@media (min-width: 900px) {
  .side { display: flex; }
  .tabbar, .top .mini-logo { display: none; }
  .main { padding-bottom: 110px; }
  .top { margin: 12px 16px 0 12px; padding: 8px 10px 8px 22px; }
  .top h1 { font-size: 1.1rem; }
  .view { padding: 26px 24px 30px; }
  .demo-bar { margin: 12px 16px 0 12px; }
}

/* ---------- Tarjetas ---------- */
.card { background: #fff; border-radius: var(--radio); padding: 20px; border: 1px solid var(--linea); box-shadow: var(--sombra); }
.card + .card, .grid + .card, .card + .grid { margin-top: 16px; }
.card h2 { font-size: .98rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card.flat { box-shadow: none; }
.grid { display: grid; gap: 14px; }
.g2, .g3, .g4, .g5 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .g5 { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1000px) {
  .split { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; align-items: start; }
  .split > .card, .split > div > .card:first-child { margin-top: 0 !important; }
  .split.even { grid-template-columns: 1fr 1fr; }
}
.kpi { background: #fff; border-radius: 18px; padding: 14px 16px; min-width: 0; border: 1px solid var(--linea); box-shadow: var(--sombra); }
.kpi small { display: block; font-size: .74rem; font-weight: 400; color: var(--gris); margin-bottom: 4px; }
.kpi b { display: block; font-size: 1.2rem; font-weight: 600; overflow-wrap: anywhere; }
.kpi em { font-style: normal; font-size: .75rem; color: var(--gris); }
.kpi.hi b { color: var(--naranja-osc); }
.kpi.pos b { color: var(--verde); } .kpi.neg b { color: var(--rojo); }

.badge { display: inline-block; font-size: .7rem; font-weight: 500; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.badge.red { background: #FDECEC; color: var(--rojo); }
.badge.amber { background: #FFF3D6; color: var(--ambar); }
.badge.green { background: #E3F5EA; color: #137a44; }
.badge.gray { background: var(--panel); color: var(--gris); }
.badge.blue { background: #E4EEFB; color: #1c5fb3; }
.badge.or { background: var(--naranja-tinte); color: var(--naranja-osc); }

.empty { text-align: center; color: var(--gris); padding: 28px 10px; font-size: .9rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .grow { flex: 1; min-width: 200px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--panel); font-weight: 500; font-size: .82rem; white-space: nowrap; color: var(--tinta); }
.chip:hover { background: #E8E8ED; }
.chip.on { background: var(--tinta); color: #fff; }
.searchbox { position: relative; }
.searchbox .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gris); }
.searchbox .inp { padding-left: 42px; border-radius: 999px; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.pagehead h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; }
.pagehead p { color: var(--gris); font-size: .88rem; }
.statline { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--gris); font-size: .86rem; margin-bottom: 16px; }
.statline b { color: var(--tinta); font-weight: 600; }

/* ---------- Día ---------- */
.eyebrow { color: var(--gris); font-size: .84rem; }
.bignum { font-size: clamp(2.4rem, 8vw, 3.6rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; margin: 2px 0 4px; }
.subline { color: var(--gris); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.subline b { color: var(--tinta); font-weight: 500; }
.dia-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.spot { position: relative; margin-bottom: 8px; }
.spot .ic { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--gris); }
.spot .inp { min-height: 54px; padding-left: 50px; border-radius: 16px; font-size: 1.02rem; background: var(--panel); }
.res { background: #fff; border-radius: 16px; border: 1px solid var(--linea); box-shadow: var(--sombra); overflow: hidden; margin-bottom: 8px; }
.res-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--linea); width: 100%; text-align: left; }
.res-row:first-child { border-top: 0; }
.res-row .mid { flex: 1; min-width: 0; }
.res-row .mid b { display: block; font-weight: 500; font-size: .92rem; line-height: 1.25; }
.res-row .mid small { color: var(--gris); font-size: .78rem; }
.res-row .pr { font-weight: 600; font-size: 1.05rem; text-align: right; }
.res-row .pr small { display: block; font-weight: 400; font-size: .72rem; color: var(--gris); }
.res-row .addb { width: 34px; height: 34px; border-radius: 50%; background: var(--naranja-tinte); color: var(--naranja); display: grid; place-items: center; flex: none; }
.res-row .addb:hover { background: var(--naranja); color: #fff; }
.res-row.sin { opacity: .5; }
.sect-title { font-size: .8rem; font-weight: 600; color: var(--gris); text-transform: uppercase; letter-spacing: .08em; margin: 26px 4px 10px; }
.alertline { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: #FFF8EC; color: #7a4a00; font-size: .88rem; text-decoration: none; margin-top: 18px; }
.alertline i { width: 8px; height: 8px; border-radius: 50%; background: var(--ambar); flex: none; }
.alertline span { margin-left: auto; color: var(--gris); }

/* ---------- Productos (tarjetas móvil) ---------- */
.plist { display: grid; gap: 8px; }
.prod { display: flex; gap: 12px; align-items: center; border-radius: 16px; padding: 10px; text-align: left; width: 100%; background: #fff; border: 1px solid var(--linea); }
button.prod:hover { background: var(--panel); }
.prod .th, .th { width: 54px; height: 54px; border-radius: 14px; background: var(--panel); flex: none; display: grid; place-items: center; color: var(--naranja); overflow: hidden; font-weight: 600; font-size: 1.05rem; }
.th img { width: 100%; height: 100%; object-fit: cover; }
.prod .inf { flex: 1; min-width: 0; }
.prod .inf b { font-weight: 500; font-size: .9rem; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.prod .inf small { color: var(--gris); font-size: .76rem; display: block; }
.prod .pr { text-align: right; flex: none; }
.prod .pr b { display: block; font-size: .94rem; font-weight: 600; }
.prod .pr small { color: var(--gris); font-size: .7rem; display: block; margin-bottom: 4px; }
.margen { color: var(--verde); font-weight: 500; }

/* ---------- Tabla ---------- */
.tblwrap { background: #fff; border-radius: var(--radio); overflow: hidden; border: 1px solid var(--linea); box-shadow: var(--sombra); }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--gris); font-weight: 500; padding: 12px; background: #FAFAFC; white-space: nowrap; }
.tbl th.s { cursor: pointer; user-select: none; }
.tbl th.s:hover { color: var(--naranja-osc); }
.tbl td { padding: 9px 12px; border-top: 1px solid var(--linea); vertical-align: middle; }
.tbl tr:hover td { background: #FAFAFC; }
.tbl .r { text-align: right; }
.tbl .nm { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.tbl .nm .th { width: 42px; height: 42px; border-radius: 11px; font-size: .92rem; }
.tbl .nm b { font-weight: 500; display: block; line-height: 1.25; }
.tbl .nm small { color: var(--gris); font-size: .74rem; }
.qinp { width: 64px; min-height: 34px !important; padding: 4px 8px !important; text-align: center; border-radius: 10px !important; font-size: 15px !important; font-weight: 500; }
.mas { text-align: center; padding: 16px; }
.showd { display: none; } .hided { display: block; }
@media (min-width: 900px) { .showd { display: block; } .hided { display: none; } }

.fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot { aspect-ratio: 1; border-radius: 16px; border: 1.5px dashed #D2D2D7; background: var(--panel); position: relative; display: grid; place-items: center; color: var(--gris); font-size: .72rem; text-align: center; overflow: hidden; cursor: pointer; }
.slot:hover { background: #EDEDF0; }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot .rm { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; display: grid; place-items: center; z-index: 2; }

/* ---------- Constructor de venta ---------- */
.pick { display: grid; gap: 0; margin-bottom: 12px; max-height: 250px; overflow: auto; border-radius: 14px; border: 1px solid var(--linea); background: #fff; }
.pick:empty { display: none; }
.pick-it { text-align: left; background: #fff; border-top: 1px solid var(--linea); padding: 10px 14px; display: grid; grid-template-columns: 1fr auto; gap: 0 12px; align-items: center; }
.pick-it:first-child { border-top: 0; }
.pick-it:hover { background: var(--panel); }
.pick-it[disabled] { opacity: .45; pointer-events: none; }
.pick-it b { font-size: .88rem; font-weight: 500; line-height: 1.25; }
.pick-it .pp { font-weight: 600; font-size: .98rem; grid-row: 1 / span 2; grid-column: 2; text-align: right; }
.pick-it small { font-size: .74rem; color: var(--gris); }
.cart-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.cart-row:last-child { border-bottom: 0; }
.cart-row .nm b { display: block; font-size: .9rem; font-weight: 500; line-height: 1.25; }
.cart-row .nm small { color: var(--gris); font-size: .76rem; }
.cart-row .ctl { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.qty { display: inline-flex; align-items: center; background: var(--panel); border-radius: 999px; overflow: hidden; }
.qty button { width: 34px; height: 34px; display: grid; place-items: center; color: var(--naranja-osc); }
.qty button:hover { background: #E8E8ED; }
.qty span { min-width: 28px; text-align: center; font-weight: 600; }
.pinp { width: 108px; min-height: 36px !important; padding: 6px 12px !important; text-align: right; font-size: 15px !important; }
.line-total { margin-left: auto; font-weight: 600; }
.total-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 0 4px; font-size: 1.15rem; font-weight: 600; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: var(--panel); padding: 3px; border-radius: 999px; }
.seg button { min-height: 42px; border-radius: 999px; font-weight: 500; color: var(--gris); }
.seg button.on { background: #fff; color: var(--tinta); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
details.more { margin-top: 12px; }
details.more summary { cursor: pointer; color: var(--gris); font-size: .84rem; padding: 6px 2px; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { margin-bottom: 10px; }
.sale-foot { position: sticky; bottom: -22px; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 28%); padding-top: 14px; margin-top: 8px; }

/* ---------- Listas ---------- */
.list-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.list-item:last-child { border-bottom: 0; }
.list-item .mid { flex: 1; min-width: 0; }
.list-item .mid b { font-weight: 500; }
.list-item .mid small { display: block; color: var(--gris); font-size: .8rem; }
.list-item .rt { text-align: right; flex: none; font-weight: 600; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sumrow { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--linea); gap: 10px; }
.sumrow:last-child { border-bottom: 0; }
.sumrow.big { font-size: 1.05rem; font-weight: 600; }
.pos { color: var(--verde); } .neg { color: var(--rojo); }

/* Barras */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 200px; padding-top: 10px; }
.bar { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; }
.pair { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 100%; width: 100%; }
.pair i { display: block; width: calc(50% - 1px); max-width: 20px; min-height: 2px; border-radius: 5px 5px 0 0; background: var(--naranja); transition: height .4s; }
.pair i.g { background: #34C77B; }
.bar:hover .pair i { filter: brightness(1.08); }
.bar .tip { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: rgba(29, 29, 31, .92); color: #fff; font-size: .7rem; padding: 5px 9px; border-radius: 10px; white-space: nowrap; z-index: 5; pointer-events: none; }
.bar:hover .tip, .bar:focus .tip { display: block; }
.barlbl { display: flex; gap: 3px; font-size: .62rem; color: var(--gris); margin-top: 6px; }
.barlbl span { flex: 1; text-align: center; min-width: 0; overflow: hidden; }
.legend { display: flex; gap: 16px; font-size: .78rem; color: var(--gris); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 4px; margin-right: 6px; background: var(--naranja); }
.legend i.g { background: #34C77B; }
.rank { display: grid; gap: 12px; }
.rank .rk { display: grid; grid-template-columns: 1fr auto; gap: 4px; font-size: .88rem; }
.rank .rk .bg { grid-column: 1 / -1; height: 6px; background: var(--panel); border-radius: 3px; overflow: hidden; }
.rank .rk .bg i { display: block; height: 100%; background: var(--naranja); border-radius: 3px; }

/* ---------- Ventanas / avisos ---------- */
.ov { position: fixed; inset: 0; background: rgba(0, 0, 0, .28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.md { background: rgba(255, 255, 255, .88); width: 100%; max-width: 520px; max-height: 94dvh; overflow: auto; border-radius: 26px 26px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); animation: sub .28s cubic-bezier(.2, .8, .2, 1); }
.md.wide { max-width: 780px; }
.md h2 { font-size: 1.12rem; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; }
.md-foot { display: flex; gap: 10px; margin-top: 18px; }
.md-foot .btn { flex: 1; }
@media (min-width: 700px) { .ov { align-items: center; padding: 20px; } .md { border-radius: 26px; } }
@keyframes sub { from { transform: translateY(20px) scale(.985); opacity: 0; } }
#toast { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: rgba(29, 29, 31, .9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: .88rem; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .4); animation: sub .25s; text-align: center; }
.toast.err { background: rgba(200, 40, 40, .94); }
.toast.out { opacity: 0; transition: opacity .4s; }
.loading { text-align: center; padding: 50px 0; color: var(--gris); }

/* ---------- Editor del catálogo web ---------- */
.ed { display: grid; gap: 16px; }
@media (min-width: 1100px) { .ed { grid-template-columns: 400px 1fr; align-items: start; } .ed .pvcol { position: sticky; top: 90px; } }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--linea); }
.swatch.on { box-shadow: 0 0 0 2px var(--tinta); }
.pv { border-radius: 26px; overflow: hidden; border: 1px solid var(--linea); box-shadow: var(--sombra); background: #fff; margin: 0 auto; transition: width .3s; }
.pv.phone { width: 390px; max-width: 100%; border-radius: 38px; border: 8px solid #1D1D1F; }
.pv iframe { width: 100%; height: 68vh; min-height: 480px; border: 0; display: block; background: #fff; }
.tglrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--linea); }
.tglrow:last-child { border-bottom: 0; }
.tglrow small { display: block; color: var(--gris); font-size: .76rem; }
.subtabs { display: flex; gap: 3px; background: var(--panel); padding: 3px; border-radius: 999px; margin-bottom: 16px; }
.subtabs button { flex: 1; min-height: 38px; border-radius: 999px; font-weight: 500; font-size: .86rem; color: var(--gris); }
.subtabs button.on { background: #fff; color: var(--tinta); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (prefers-reduced-transparency: reduce) { .glass, .side, .top, .tabbar, .md, .auth-card, .vpanel { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; } }
@media print { .side, .tabbar, .top, .btn, .toolbar, .vpanel, .vbar { display: none !important; } body { background: #fff; } }

/* ---------- Botón Venta (arriba a la derecha) y panel de venta ---------- */
/* Botón de venta: en el menú lateral (PC) y botón redondo flotante (celular) */
.vside { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 4px 14px; min-height: 46px; border-radius: 999px; background: var(--naranja); color: #fff; font-weight: 600; font-size: .94rem; box-shadow: 0 10px 20px -10px rgba(224, 86, 15, .9); transition: transform .15s, background .15s; flex: none; }
.vside:hover { background: var(--naranja-osc); }
.vside:active { transform: scale(.97); }
.vside[hidden] { display: none; }
.vfab { position: fixed; z-index: 60; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--naranja); color: #fff; box-shadow: 0 14px 28px -10px rgba(224, 86, 15, .9), 0 2px 6px rgba(0, 0, 0, .15); transition: transform .15s; }
.vfab:active { transform: scale(.92); }
.vfab[hidden] { display: none; }
@media (min-width: 900px) { .vfab { display: none !important; } }
.vside .n, .vbar .n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #fff; color: var(--naranja-osc); font-size: .74rem; display: grid; place-items: center; }
.vscrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); z-index: 85; }
.vpanel { position: fixed; z-index: 90; left: 8px; right: 8px; bottom: 8px; max-height: 92dvh; display: flex; flex-direction: column; border-radius: 28px; overflow: hidden; animation: sub .28s cubic-bezier(.2, .8, .2, 1); background: rgba(255, 255, 255, .9); }
.vpanel[hidden] { display: none; }
.vp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 16px 8px 20px; }
.vp-head h3 { font-size: 1.05rem; flex: 1; }
.vp-head [data-v=volver] { font-size: 1.6rem; line-height: 1; width: 38px; height: 38px; margin-left: -10px; }
.vp-body { padding: 4px 20px 12px; overflow-y: auto; flex: 1; min-height: 120px; }
.vp-foot { padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linea); background: rgba(255, 255, 255, .7); }
.vp-sum { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: .92rem; color: var(--gris); }
.vp-sum b { color: var(--tinta); font-size: 1.15rem; font-weight: 600; }
.vp-sum.total { color: var(--tinta); font-size: 1rem; }
.vp-sum.total b { font-size: 1.6rem; }
.vp-desc { display: flex; gap: 10px; align-items: center; }
.vp-desc .inp { flex: 1; }
.vbar { position: fixed; z-index: 70; left: 14px; right: 14px; bottom: calc(86px + env(safe-area-inset-bottom)); min-height: 54px; border-radius: 999px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 24px; background: var(--naranja); color: #fff; font-weight: 600; box-shadow: 0 14px 30px -10px rgba(224, 86, 15, .8); max-width: 520px; margin: 0 auto; }
@media (min-width: 900px) { .vbar { bottom: 22px; } .vpanel { left: auto; right: 16px; bottom: 16px; width: 420px; } }
@media (min-width: 1200px) {
  .vpanel { top: 16px; width: 400px; max-height: none; border-radius: 28px; }
  body.vp-open .main { margin-right: 424px; }
  .vscrim, .vbar { display: none !important; }
}
