/* RMayoreo · Ventumo. Estilo basado en el Punto de venta de las agendas (v26: pn-card, v26-met, v26-pesos). Móvil primero. */
:root { --ink: #141414; --muted: #6b6b6b; --line: #e7e3dc; --card: #fff; --bg: #f6f4f0; --rose: #b8893b; --rose-d: #8f6a2a; --ok: #1f7a4a; --err: #a12a2a; --warn: #8a5a00;
  --safe-b: env(safe-area-inset-bottom, 0px); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-size: 15px; line-height: 1.35; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
input[type=text], input[type=tel], input[type=number], input[type=password], input[type=date], input[type=search], select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff; font-size: 16px; outline: none; color: var(--ink); font-weight: 500; }
input:focus, select:focus, textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rose) 18%, transparent); }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 14px; }
.top { position: sticky; top: 0; z-index: 20; background: var(--ink); color: #fff; padding: calc(env(safe-area-inset-top, 0px) + 8px) 0 8px; }
.top .wrap { display: flex; align-items: center; gap: 10px; }
.top img.logo { height: 38px; width: auto; }
.top h1 { font-size: 16px; margin: 0; letter-spacing: .5px; font-weight: 700; }
.top small { display: block; color: #cfc6b5; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; }
.top .sp { flex: 1; }
.top button.icb, .top a.icb { width: 40px; height: 40px; border-radius: 12px; border: 1px solid #3a3a3a; background: transparent; color: #fff; display: grid; place-items: center; text-decoration: none; position: relative; }
.pn-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 13px; margin: 10px 0; box-shadow: 0 6px 16px rgba(0,0,0,.04); }
.pn-card h3 { margin: 0 0 6px; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.pn-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pn-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.pn-kpi b { display: block; font-size: 21px; }
.pn-kpi span { font-size: 12px; color: var(--muted); }
.v26-k-tot { border-color: #b5e2c4 !important; background: #f1fbf4 !important; }
.pn-aviso { background: #fff7e8; border: 1px solid #f1d3a6; border-radius: 14px; padding: 11px; font-size: 13px; line-height: 1.4; margin: 10px 0; }
.pn-aviso.err { background: #fdeeee; border-color: #f0c4c4; color: var(--err); }
.pn-tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.pn-tabla th, .pn-tabla td { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.pn-tabla th:first-child, .pn-tabla td:first-child { text-align: left; }
.v26-l { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin: 12px 0 4px; }
.v26-l > input, .v26-l > select, .v26-l > textarea { margin-top: 4px; }
.v26-row { display: flex; gap: 10px; align-items: flex-end; }
.v26-row > * { flex: 1; min-width: 0; }
.v26-step { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.v26-step button { width: 42px; height: 42px; border: 0; background: #fff; font-size: 21px; color: var(--ink); }
.v26-step button[disabled] { opacity: .3; }
.v26-step b, .v26-step input { min-width: 34px; width: 46px; text-align: center; font-size: 16px; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
.v26-pesos { display: flex; align-items: center; gap: 6px; margin-top: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 0 10px; background: #fff; }
.v26-pesos i { font-style: normal; font-weight: 800; color: var(--muted); }
.v26-pesos input { border: 0 !important; box-shadow: none !important; padding: 10px 0 !important; margin: 0 !important; width: 100%; font-size: 19px; font-weight: 800; background: transparent; }
.v26-met { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.v26-met button { display: grid; justify-items: center; gap: 4px; border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 14px; padding: 10px 2px; font-weight: 700; font-size: 12px; min-height: 64px; }
.v26-met button .ic { width: 22px; height: 22px; }
.v26-met button.on { border-color: var(--rose); background: color-mix(in srgb, var(--rose) 10%, white); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 14px; font-weight: 700; text-decoration: none; color: var(--ink); min-height: 44px; }
.btn.pri, .save { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.oro { background: var(--rose); color: #fff; border-color: var(--rose); }
.btn.wa { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.btn.peligro { color: var(--err); border-color: #f0c4c4; }
.btn.chico { min-height: 34px; padding: 6px 10px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .45; }
.btn.full { width: 100%; }
.save.pagar-ya { display: grid; justify-items: center; gap: 2px; width: 100%; border: 0; border-radius: 16px; padding: 14px; font-size: 17px; font-weight: 800; margin-top: 14px; }
.save.pagar-ya small { font-size: 12px; font-weight: 600; opacity: .8; }
.save.pagar-ya[disabled] { opacity: .45; }
.meta { color: var(--muted); font-size: 13px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 13px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.buscar { position: relative; margin-top: 10px; }
.buscar .ic { position: absolute; left: 12px; top: 12px; color: var(--muted); }
.buscar input { padding-left: 40px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.prod { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; position: relative; text-align: left; padding: 0; display: flex; flex-direction: column; }
.prod .ph { aspect-ratio: 1/1; background: #efebe4 center/cover no-repeat; display: grid; place-items: center; color: #b6ad9f; position: relative; }
.prod .ph .ic { width: 38px; height: 38px; stroke-width: 1.5; }
.prod .bd { padding: 9px 10px 10px; display: grid; gap: 2px; }
.prod .bd b { font-size: 14px; line-height: 1.2; }
.prod .bd small { color: var(--muted); font-size: 12px; }
.prod .pr { font-weight: 800; font-size: 15px; }
.prod.agotado .ph { filter: grayscale(1); opacity: .55; }
.badge { position: absolute; top: 8px; left: 8px; background: var(--rose); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 999px; letter-spacing: .3px; }
.badge.gris { background: #555; }
.badge.rojo { background: var(--err); }
.badge.der { left: auto; right: 8px; }
.stock { font-size: 12px; font-weight: 700; color: var(--ok); }
.stock.bajo { color: var(--warn); }
.stock.cero { color: var(--err); }
.hoja-fondo { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.hoja { background: var(--bg); width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; border-radius: 22px 22px 0 0; padding: 8px 14px calc(18px + var(--safe-b)); animation: sube .18s ease-out; }
.hoja .asa { width: 42px; height: 5px; background: #d6d0c6; border-radius: 9px; margin: 2px auto 8px; }
.hoja h2 { margin: 4px 0 8px; font-size: 19px; }
.hoja .cerrar { float: right; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; }
@keyframes sube { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
.pres { display: grid; gap: 8px; margin: 10px 0; }
.pres-op { display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.pres-op.on { border-color: var(--rose); }
.pres-op > div { flex: 1; min-width: 0; }
.pres-op b { display: block; font-size: 15px; }
.pres-op small { color: var(--muted); font-size: 12px; display: block; }
.pres-op .precio { font-weight: 800; font-size: 17px; text-align: right; }
.pres-op .precio s { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 14px calc(10px + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 30%); pointer-events: none; }
.barra .btn { pointer-events: auto; max-width: 640px; margin: 0 auto; display: flex; width: 100%; min-height: 56px; border-radius: 16px; font-size: 16px; box-shadow: 0 10px 24px rgba(0,0,0,.18); justify-content: space-between; padding: 10px 16px; }
.barra .btn .n { background: rgba(255,255,255,.18); border-radius: 999px; padding: 2px 9px; font-size: 13px; }
.linea { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.linea > div { flex: 1; min-width: 0; }
.linea b { display: block; font-size: 14px; }
.linea small { display: block; color: var(--muted); font-size: 12px; }
.linea .promo { color: var(--rose-d); font-weight: 700; }
.linea .imp { font-weight: 800; white-space: nowrap; text-align: right; }
.linea .imp s { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.tot { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.tot.grande { font-size: 20px; font-weight: 800; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 10px; }
.tot.ahorro { color: var(--ok); font-weight: 700; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(90px + var(--safe-b)); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; z-index: 90; font-weight: 600; max-width: 92vw; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: fade .2s; }
.toast.err { background: var(--err); }
.toast.ok { background: var(--ok); }
.vacio { text-align: center; color: var(--muted); padding: 30px 10px; }
.vacio .ic { width: 42px; height: 42px; stroke-width: 1.4; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: #ebe6dd; padding: 4px; border-radius: 13px; }
.seg button { border: 0; background: transparent; border-radius: 10px; padding: 9px 6px; font-weight: 700; font-size: 13px; }
.seg button.on { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.sw { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; font-weight: 600; }
.sw input { width: 22px; height: 22px; accent-color: var(--ink); }
.cuentas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.cuentas div { background: #faf8f4; border: 1px dashed var(--line); border-radius: 12px; padding: 8px; text-align: center; }
.cuentas span { display: block; font-size: 11px; color: var(--muted); font-weight: 700; }
.cuentas b { font-size: 16px; }
.cuentas small { display: block; font-size: 11px; color: var(--ok); font-weight: 700; }
.cuentas small.neg { color: var(--err); }
.cargando { display: grid; place-items: center; padding: 50px 0; color: var(--muted); }
.spin { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--rose); border-radius: 50%; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
