/* =====================================================================
   Bogo AI CRM · Ventas para restaurantes (2026-10-08)
   Tema claro: azul #2563EB, dorado mínimo. Clases con prefijo rv-.
   ===================================================================== */
.rv-ventas, .rv-mod, .rv-overlay, .rv-toasts {
  --rv-blue: #2563EB; --rv-blue-d: #1D4ED8; --rv-blue-s: #EFF4FF; --rv-ink: #0F172A; --rv-txt: #334155; --rv-mut: #64748B;
  --rv-line: #E6ECF5; --rv-bg: #F6F8FC; --rv-gold: #E9C46A; --rv-gold-s: #FFF8E6; --rv-green: #059669; --rv-red: #DC2626;
  --rv-r: 16px; --rv-sh: 0 10px 28px rgba(15,23,42,.07);
  font-family: inherit; color: var(--rv-txt);
}
.rv-ventas *, .rv-mod *, .rv-overlay * { box-sizing: border-box; }
.rv-ventas button, .rv-mod button, .rv-overlay button { font-family: inherit; transform: none !important; }
.rv-ventas button:focus-visible, .rv-mod button:focus-visible, .rv-overlay button:focus-visible,
.rv-ventas input:focus-visible, .rv-mod input:focus-visible, .rv-mod select:focus-visible { outline: 2px solid rgba(37,99,235,.45); outline-offset: 2px; }

/* ---------- piezas comunes ---------- */
.rv-card { background: #fff; border: 1px solid var(--rv-line); border-radius: var(--rv-r); box-shadow: var(--rv-sh); }
.rv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--rv-line); background: #fff; color: var(--rv-ink); font-weight: 700; font-size: 13px; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s, color .15s; white-space: nowrap; margin: 0; }
.rv-btn:hover { border-color: #C9D6EE; background: #F8FAFF; }
.rv-btn-primary { background: var(--rv-blue); border-color: var(--rv-blue); color: #fff; box-shadow: 0 6px 16px rgba(37,99,235,.22); }
.rv-btn-primary:hover { background: var(--rv-blue-d); border-color: var(--rv-blue-d); color: #fff; }
.rv-btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.rv-btn-sm { height: 32px; padding: 0 11px; font-size: 12px; border-radius: 9px; }
.rv-btn-block { width: 100%; }
.rv-link { background: none; border: 0; padding: 0; color: var(--rv-blue); font-weight: 700; cursor: pointer; font-size: 12.5px; }
.rv-link:hover { text-decoration: underline; }
.rv-ico { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--rv-blue-s); color: var(--rv-blue); font-size: 16px; flex: 0 0 auto; }
.rv-search { position: relative; display: flex; align-items: center; margin: 0; flex: 1 1 220px; max-width: 340px; }
.rv-search i { position: absolute; left: 12px; color: var(--rv-mut); font-size: 13px; }
.rv-search input { width: 100%; height: 38px; border: 1px solid var(--rv-line); border-radius: 11px; padding: 0 12px 0 34px; background: var(--rv-bg); color: var(--rv-ink); font-size: 13px; text-align: left; margin: 0; }
.rv-search input:focus { background: #fff; border-color: #BFD1F7; box-shadow: 0 0 0 3px rgba(37,99,235,.12); outline: 0; }
.rv-seg { display: inline-flex; background: #EEF2F8; border-radius: 12px; padding: 3px; gap: 2px; }
.rv-seg button { border: 0; background: transparent; height: 32px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--rv-mut); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.rv-seg button.on { background: #fff; color: var(--rv-blue); box-shadow: 0 2px 6px rgba(15,23,42,.08); }
.rv-seg button em { font-style: normal; background: var(--rv-blue-s); color: var(--rv-blue); border-radius: 999px; padding: 0 6px; font-size: 11px; }
.rv-seg-full { display: flex; width: 100%; }
.rv-seg-full button { flex: 1 1 0; padding: 0 6px; }
.rv-seg-sm button { height: 28px; font-size: 12px; }
.rv-vacio { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 34px 16px; color: var(--rv-mut); font-size: 13px; }
.rv-vacio > i { font-size: 26px; color: #A9B8D3; margin-bottom: 4px; }
.rv-vacio b { color: var(--rv-ink); font-size: 14px; }
.rv-vacio-sm { padding: 18px 12px; }
.rv-vacio-sm > i { font-size: 20px; }
.rv-vacio-error > i, .rv-vacio-error span { color: var(--rv-red); }
.rv-cargando { padding: 26px; text-align: center; color: var(--rv-mut); font-size: 13px; }
.rv-tag-demo { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .04em; color: #8A6A14; background: var(--rv-gold-s); border: 1px solid #F1DFAE; border-radius: 6px; padding: 0 5px; vertical-align: 1px; }
.rv-tag-off { display: inline-block; font-size: 10px; font-weight: 700; color: var(--rv-mut); background: #F1F5F9; border-radius: 6px; padding: 0 5px; }
.rv-hint { font-size: 12px; color: var(--rv-mut); margin: 8px 0 0; line-height: 1.45; }
.rv-lab { display: block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--rv-mut); margin-bottom: 7px; }
.rv-badge { background: var(--rv-blue); color: #fff; border-radius: 999px; min-width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; padding: 0 7px; }
.rv-step { display: inline-flex; align-items: center; background: var(--rv-blue-s); border-radius: 10px; padding: 2px; }
.rv-step button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: #fff; color: var(--rv-blue); font-size: 17px; font-weight: 800; line-height: 1; cursor: pointer; box-shadow: 0 1px 3px rgba(15,23,42,.08); padding: 0; }
.rv-step button:hover { background: var(--rv-blue); color: #fff; }
.rv-step b { min-width: 28px; text-align: center; color: var(--rv-ink); font-size: 14px; }
.rv-step-sm button { width: 26px; height: 26px; font-size: 15px; }
.rv-step-sm b { min-width: 24px; font-size: 13px; }
.rv-est { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.rv-est-azul { background: #EFF4FF; color: #1D4ED8; }
.rv-est-navy { background: #EEF2FF; color: #3730A3; }
.rv-est-oro { background: var(--rv-gold-s); color: #92400E; }
.rv-est-cielo { background: #E0F2FE; color: #0369A1; }
.rv-est-verde { background: #ECFDF5; color: #047857; }
.rv-est-rojo { background: #FEF2F2; color: #B91C1C; }
.rv-est-gris { background: #F1F5F9; color: #475569; }
.rv-tone-0 { background: linear-gradient(135deg, #EFF4FF, #DCE7FF); color: #1D4ED8; }
.rv-tone-1 { background: linear-gradient(135deg, #FFF7E6, #FDEBC4); color: #92400E; }
.rv-tone-2 { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); color: #047857; }
.rv-tone-3 { background: linear-gradient(135deg, #E0F2FE, #CDEBFB); color: #0369A1; }
.rv-tone-4 { background: linear-gradient(135deg, #F5F3FF, #E9E5FF); color: #5B21B6; }
@keyframes rvShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.rv-shake { animation: rvShake .3s ease 2; }

/* ---------- toasts ---------- */
.rv-toasts { position: fixed; right: 18px; bottom: 18px; z-index: 100000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.rv-toast { pointer-events: auto; display: flex; align-items: center; gap: 9px; background: #0F172A; color: #fff; border-radius: 12px; padding: 11px 15px; font-size: 13px; font-weight: 600; box-shadow: 0 12px 30px rgba(15,23,42,.25); animation: rvToastIn .22s ease; max-width: 380px; transition: opacity .3s, transform .3s; }
.rv-toast i { color: #34D399; font-size: 16px; }
.rv-toast-error { background: #7F1D1D; }
.rv-toast-error i { color: #FCA5A5; }
.rv-toast.rv-out { opacity: 0; transform: translateY(6px); }
@keyframes rvToastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- modal y panel lateral ---------- */
.rv-overlay { position: fixed; inset: 0; z-index: 99990; background: rgba(15,23,42,.38); display: flex; align-items: center; justify-content: center; padding: 18px; opacity: 0; transition: opacity .2s; }
.rv-overlay.rv-in { opacity: 1; }
.rv-modal { background: #fff; border-radius: 18px; width: 100%; max-width: 640px; max-height: calc(100vh - 36px); display: flex; flex-direction: column; box-shadow: 0 30px 70px rgba(15,23,42,.28); transform: translateY(10px); transition: transform .22s; overflow: hidden; }
.rv-modal > form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.rv-overlay.rv-in .rv-modal { transform: none; }
.rv-modal-sm { max-width: 440px; }
.rv-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--rv-line); }
.rv-modal-head h3 { margin: 0; font-size: 17px; font-weight: 800; color: var(--rv-ink); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rv-x { width: 34px; height: 34px; border-radius: 10px; border: 0; background: #F1F5F9; color: var(--rv-mut); font-size: 20px; line-height: 1; cursor: pointer; }
.rv-x:hover { background: #E2E8F0; color: var(--rv-ink); }
.rv-modal-body { padding: 18px 20px; overflow: auto; min-height: 0; }
.rv-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--rv-line); background: #FAFBFD; }
.rv-confirm-txt { margin: 0; font-size: 14px; line-height: 1.55; color: var(--rv-txt); }
.rv-overlay:has(.rv-drawer) { justify-content: flex-end; padding: 0; }
.rv-drawer { max-width: 520px; height: 100vh; max-height: 100vh; border-radius: 18px 0 0 18px; transform: translateX(30px); }
.rv-form { display: flex; flex-direction: column; gap: 12px; }
.rv-fld { display: flex; flex-direction: column; gap: 5px; margin: 0; flex: 1 1 0; font-weight: 400; }
.rv-fld > span { font-size: 12px; font-weight: 700; color: var(--rv-txt); }
.rv-fld input, .rv-fld select, .rv-fld textarea, .rv-det-estado select, .rv-det-estado input { width: 100%; border: 1px solid var(--rv-line); border-radius: 10px; min-height: 38px; padding: 7px 11px; font-size: 13.5px; color: var(--rv-ink); background: #fff; text-align: left; text-align-last: left; margin: 0; font-family: inherit; }
.rv-fld textarea { resize: vertical; }
.rv-fld input:focus, .rv-fld select:focus, .rv-fld textarea:focus, .rv-det-estado select:focus, .rv-det-estado input:focus { border-color: #BFD1F7; box-shadow: 0 0 0 3px rgba(37,99,235,.12); outline: 0; }
.rv-fld-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.rv-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--rv-txt); margin: 0 0 8px; cursor: pointer; }
.rv-check input { width: 16px; height: 16px; accent-color: var(--rv-blue); margin: 0; }
.rv-check-sm { font-size: 12px; margin: 0; }
.rv-form-prod { flex-direction: row; gap: 18px; align-items: flex-start; }
.rv-form-cols { flex: 1 1 auto; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rv-img-pick { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 132px; flex: 0 0 132px; text-align: center; }
.rv-img-pick small { color: var(--rv-mut); font-size: 11px; }
.rv-img-pick .rv-btn { cursor: pointer; }
.rv-thumb { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: 0 0 auto; }
.rv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rv-thumb-lg { width: 132px; height: 112px; border-radius: 14px; font-size: 26px; background: var(--rv-bg); color: #A9B8D3; border: 1px dashed #CBD5E1; }

/* =====================================================================
   PESTAÑA VENTAS
   ===================================================================== */
.rv-ventas { position: relative; padding: 2px 0 8px; }
.rv-v-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "menu cart" "hist cart"; gap: 16px; align-items: start; }
.rv-v-menu { grid-area: menu; padding: 16px; min-width: 0; }
.rv-v-cart { grid-area: cart; position: sticky; top: 12px; padding: 16px; max-height: calc(100vh - 24px); overflow: auto; transition: box-shadow .3s, border-color .3s; }
.rv-v-cart.rv-ok { border-color: #A7F3D0; box-shadow: 0 0 0 4px rgba(16,185,129,.15), var(--rv-sh); }
.rv-v-hist { grid-area: hist; padding: 16px; min-width: 0; }
.rv-v-menu-top, .rv-v-hist-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rv-v-tit { display: flex; align-items: center; gap: 11px; min-width: 0; }
.rv-v-tit h3 { margin: 0; font-size: 16px; font-weight: 800; color: var(--rv-ink); }
.rv-v-tit small { display: block; color: var(--rv-mut); font-size: 12px; margin-top: 1px; }
.rv-chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: thin; }
.rv-chip { flex: 0 0 auto; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--rv-line); background: #fff; color: var(--rv-txt); font-size: 12.5px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all .15s; }
.rv-chip em { font-style: normal; font-size: 11px; color: var(--rv-mut); background: #F1F5F9; border-radius: 999px; padding: 0 6px; }
.rv-chip:hover { border-color: #BFD1F7; color: var(--rv-blue); }
.rv-chip.on { background: var(--rv-blue); border-color: var(--rv-blue); color: #fff; box-shadow: 0 6px 14px rgba(37,99,235,.2); }
.rv-chip.on em { background: rgba(255,255,255,.22); color: #fff; }
.rv-chips.rv-buscando .rv-chip.on { background: #fff; color: var(--rv-txt); border-color: var(--rv-line); box-shadow: none; }
.rv-chips.rv-buscando .rv-chip.on em { background: #F1F5F9; color: var(--rv-mut); }
.rv-v-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.rv-v-prods > .rv-vacio, .rv-v-prods > .rv-cargando { grid-column: 1 / -1; }
.rv-prod { display: flex; flex-direction: column; border: 1px solid var(--rv-line); border-radius: 14px; overflow: hidden; background: #fff; transition: border-color .15s, box-shadow .15s; }
.rv-prod:hover { border-color: #C9D6EE; box-shadow: 0 8px 20px rgba(15,23,42,.06); }
.rv-prod.rv-sel { border-color: #93B4F5; box-shadow: 0 0 0 3px rgba(37,99,235,.10); }
.rv-prod.rv-off { opacity: .6; }
.rv-prod-img { height: 92px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; letter-spacing: .02em; }
.rv-prod-img img { width: 100%; height: 100%; object-fit: cover; }
.rv-prod-body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1 1 auto; }
.rv-prod-body h4 { margin: 0 0 3px; font-size: 14px; font-weight: 800; color: var(--rv-ink); line-height: 1.3; }
.rv-prod-body p { margin: 0 0 10px; font-size: 12px; color: var(--rv-mut); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 33px; }
.rv-prod-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rv-prod-foot strong { font-size: 15px; color: var(--rv-ink); font-weight: 800; }
.rv-add { height: 32px; border: 1px solid #BFD1F7; background: var(--rv-blue-s); color: var(--rv-blue); border-radius: 10px; padding: 0 11px; font-weight: 800; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.rv-add:hover { background: var(--rv-blue); border-color: var(--rv-blue); color: #fff; }
.rv-agotado { font-size: 11.5px; font-weight: 700; color: var(--rv-red); background: #FEF2F2; border-radius: 8px; padding: 4px 8px; }

.rv-cart-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--rv-line); margin-bottom: 4px; }
.rv-cart-head > div { flex: 1 1 auto; min-width: 0; }
.rv-cart-head h3 { margin: 0; font-size: 17px; font-weight: 800; color: var(--rv-ink); }
.rv-cart-head small { display: block; color: var(--rv-mut); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-lines { list-style: none; margin: 0; padding: 0; }
.rv-line { padding: 10px 0; border-bottom: 1px dashed var(--rv-line); }
.rv-line-main { display: flex; align-items: center; gap: 10px; }
.rv-line-txt { flex: 1 1 auto; min-width: 0; }
.rv-line-txt b { display: block; font-size: 13.5px; color: var(--rv-ink); line-height: 1.3; }
.rv-line-txt small { color: var(--rv-mut); font-size: 11.5px; }
.rv-line-tot { font-size: 13.5px; color: var(--rv-ink); min-width: 74px; text-align: right; }
.rv-line-extra { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.rv-line-extra input { flex: 1 1 auto; height: 30px; border: 1px solid transparent; background: var(--rv-bg); border-radius: 8px; padding: 0 9px; font-size: 12px; color: var(--rv-txt); text-align: left; margin: 0; min-width: 0; }
.rv-line-extra input:focus { border-color: #BFD1F7; background: #fff; outline: 0; }
.rv-x-sm { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: #94A3B8; cursor: pointer; flex: 0 0 auto; }
.rv-x-sm:hover { background: #FEF2F2; color: var(--rv-red); }
.rv-cart-sec { padding: 12px 0 0; }
.rv-in { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; border: 1px solid var(--rv-line); border-radius: 10px; padding: 0 10px; background: #fff; font-weight: 400; }
.rv-in > i { color: var(--rv-mut); }
.rv-in > span { font-size: 12px; color: var(--rv-mut); white-space: nowrap; font-weight: 600; }
.rv-in input { flex: 1 1 auto; border: 0; height: 36px; font-size: 13px; color: var(--rv-ink); background: transparent; text-align: left; margin: 0; min-width: 0; padding: 0; }
.rv-in input:focus { outline: 0; }
.rv-in:focus-within { border-color: #BFD1F7; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.rv-in-money input { text-align: right; font-weight: 700; }
.rv-pagos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rv-pago { height: 36px; border: 1px solid var(--rv-line); border-radius: 10px; background: #fff; color: var(--rv-txt); font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 0 6px; }
.rv-pago:hover { border-color: #BFD1F7; }
.rv-pago.on { border-color: var(--rv-blue); background: var(--rv-blue-s); color: var(--rv-blue); box-shadow: inset 0 0 0 1px var(--rv-blue); }
.rv-cart-sec textarea { width: 100%; border: 1px solid var(--rv-line); border-radius: 10px; padding: 8px 10px; font-size: 13px; resize: vertical; min-height: 44px; color: var(--rv-ink); font-family: inherit; margin: 0; text-align: left; }
.rv-cart-sec textarea:focus { border-color: #BFD1F7; box-shadow: 0 0 0 3px rgba(37,99,235,.12); outline: 0; }
.rv-tot { margin: 14px 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--rv-bg); }
.rv-tot > div { display: flex; justify-content: space-between; font-size: 13px; color: var(--rv-mut); padding: 2px 0; }
.rv-tot > div b { color: var(--rv-txt); }
.rv-tot .rv-tot-big { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--rv-line); color: var(--rv-ink); font-weight: 800; font-size: 15px; align-items: baseline; }
.rv-tot .rv-tot-big strong { font-size: 24px; color: var(--rv-ink); letter-spacing: -.01em; }
.rv-enviar { height: 46px; font-size: 14.5px; border-radius: 12px; }
.rv-hist { list-style: none; margin: 0; padding: 0; }
.rv-hist li + li { border-top: 1px solid var(--rv-line); }
.rv-hist button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 6px; background: none; border: 0; text-align: left; cursor: pointer; border-radius: 10px; }
.rv-hist button:hover { background: #F8FAFF; }
.rv-hist-id { font-weight: 800; color: var(--rv-blue); font-size: 13px; min-width: 42px; }
.rv-hist-main { flex: 1 1 auto; min-width: 0; }
.rv-hist-main b { display: block; font-size: 13px; color: var(--rv-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-hist-main small { color: var(--rv-mut); font-size: 11.5px; }
.rv-hist strong { font-size: 13.5px; color: var(--rv-ink); min-width: 80px; text-align: right; }
.rv-v-bar { display: none; }

/* La sección legada queda oculta pero sus IDs siguen disponibles para ajax.js */
.rv-legacy { display: none !important; }

@media (max-width: 1199px) { .rv-v-grid { grid-template-columns: minmax(0, 1fr) 340px; } }
@media (max-width: 991px) {
  .rv-v-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "menu" "cart" "hist"; }
  .rv-v-cart { position: static; max-height: none; }
  .rv-ventas:has(.rv-v-bar:not([hidden])) { padding-bottom: 78px; }
  .rv-v-bar:not([hidden]) { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 1030; margin: 0; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 9px 9px 16px; background: #0F172A; color: #fff; border-radius: 14px; box-shadow: 0 14px 30px rgba(15,23,42,.28); font-size: 13.5px; }
  .rv-v-bar strong { color: #fff; }
  .rv-v-bar .rv-btn { height: 36px; }
}
@media (max-width: 560px) {
  .rv-v-menu, .rv-v-cart, .rv-v-hist { padding: 13px; border-radius: 14px; }
  .rv-v-prods { grid-template-columns: 1fr; gap: 9px; }
  .rv-prod { flex-direction: row; }
  .rv-prod-img { width: 84px; height: auto; min-height: 96px; flex: 0 0 84px; font-size: 18px; }
  .rv-prod-body p { min-height: 0; margin-bottom: 8px; }
  .rv-search { max-width: none; flex-basis: 100%; }
  .rv-hist strong { min-width: 0; }
  .rv-hist .rv-est { display: none; }
}

/* =====================================================================
   PÁGINAS: Pedidos y Menú
   ===================================================================== */
.rv-mod { padding: 18px 20px 30px; }
.rv-head { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--rv-line); border-radius: 18px; padding: 16px 18px; box-shadow: var(--rv-sh); margin-bottom: 14px; position: relative; overflow: hidden; }
.rv-head::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--rv-blue), #60A5FA); }
.rv-head-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--rv-blue-s); color: var(--rv-blue); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex: 0 0 auto; }
.rv-head-txt { flex: 1 1 auto; min-width: 0; }
.rv-head-txt h2 { margin: 0; font-size: 21px; font-weight: 800; color: var(--rv-ink); letter-spacing: -.01em; }
.rv-head-txt p { margin: 2px 0 0; color: var(--rv-mut); font-size: 13px; }
.rv-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.rv-aviso { background: var(--rv-gold-s); border: 1px solid #F1DFAE; color: #7A5B0F; border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.rv-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: #fff; border: 1px solid var(--rv-line); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; box-shadow: 0 4px 14px rgba(15,23,42,.04); }
.rv-field { display: flex; flex-direction: column; gap: 4px; margin: 0; font-weight: 400; min-width: 140px; }
.rv-field > span { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--rv-mut); }
.rv-field input, .rv-field select { height: 38px; border: 1px solid var(--rv-line); border-radius: 10px; padding: 0 10px; font-size: 13px; color: var(--rv-ink); background: #fff; text-align: left; text-align-last: left; margin: 0; }
.rv-field input:focus, .rv-field select:focus { border-color: #BFD1F7; box-shadow: 0 0 0 3px rgba(37,99,235,.12); outline: 0; }
.rv-field-grow { flex: 1 1 220px; }
.rv-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.rv-kpi { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--rv-line); border-radius: 16px; padding: 13px 15px; box-shadow: 0 4px 14px rgba(15,23,42,.04); }
.rv-kpi small { display: block; color: var(--rv-mut); font-size: 12px; font-weight: 600; }
.rv-kpi b { font-size: 20px; color: var(--rv-ink); font-weight: 800; letter-spacing: -.01em; }
.rv-kpi-ico { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; flex: 0 0 auto; }
.rv-k-azul { background: var(--rv-blue-s); color: var(--rv-blue); }
.rv-k-oro { background: var(--rv-gold-s); color: #B7791F; }
.rv-k-verde { background: #ECFDF5; color: var(--rv-green); }
.rv-k-navy { background: #EEF2FF; color: #3730A3; }

.rv-board { display: grid; grid-template-columns: repeat(6, minmax(188px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.rv-col { background: #F3F6FB; border: 1px solid var(--rv-line); border-radius: 16px; padding: 10px; min-height: 160px; }
.rv-col > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 8px; font-size: 13px; font-weight: 800; color: var(--rv-ink); }
.rv-col > header i { margin-right: 3px; }
.rv-col > header em { font-style: normal; background: #fff; border: 1px solid var(--rv-line); border-radius: 999px; padding: 0 8px; font-size: 12px; color: var(--rv-txt); }
.rv-col-azul > header i { color: #2563EB; } .rv-col-navy > header i { color: #4338CA; } .rv-col-oro > header i { color: #D69E2E; }
.rv-col-cielo > header i { color: #0284C7; } .rv-col-verde > header i { color: #059669; } .rv-col-rojo > header i { color: #DC2626; }
.rv-col-azul { border-top: 3px solid #2563EB; } .rv-col-navy { border-top: 3px solid #6366F1; } .rv-col-oro { border-top: 3px solid var(--rv-gold); }
.rv-col-cielo { border-top: 3px solid #38BDF8; } .rv-col-verde { border-top: 3px solid #10B981; } .rv-col-rojo { border-top: 3px solid #F87171; }
.rv-col-tot { display: block; margin: -4px 4px 8px; color: var(--rv-mut); font-size: 11.5px; font-weight: 700; }
.rv-col-body { display: flex; flex-direction: column; gap: 9px; }
.rv-col-vacio { text-align: center; color: #94A3B8; font-size: 12px; padding: 22px 6px; border: 1px dashed #D5DEEC; border-radius: 12px; }
.rv-pcard { background: #fff; border: 1px solid var(--rv-line); border-radius: 13px; padding: 10px 11px; box-shadow: 0 2px 8px rgba(15,23,42,.04); }
.rv-pcard:hover { border-color: #C9D6EE; box-shadow: 0 8px 18px rgba(15,23,42,.07); }
.rv-pcard > header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.rv-pcard-id { border: 0; background: none; padding: 0; font-weight: 800; color: var(--rv-blue); font-size: 13.5px; cursor: pointer; }
.rv-pcard-time { font-size: 11.5px; color: var(--rv-mut); font-weight: 600; }
.rv-pcard-time.rv-tarde { color: #B45309; background: var(--rv-gold-s); border-radius: 6px; padding: 1px 6px; }
.rv-pcard-body { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 0; cursor: pointer; }
.rv-pcard-body b { display: block; font-size: 13.5px; color: var(--rv-ink); }
.rv-pcard-body small { display: block; color: var(--rv-mut); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 1px 0 5px; }
.rv-pcard-items { display: block; font-size: 12px; color: var(--rv-txt); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rv-pcard-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11.5px; color: var(--rv-mut); flex-wrap: wrap; }
.rv-pcard-meta strong { margin-left: auto; font-size: 14px; color: var(--rv-ink); }
.rv-pcard > footer { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--rv-line); }
.rv-pcard > footer .rv-btn { flex: 1 1 100%; padding: 0 8px; }
.rv-pcard > footer .rv-sel-est { flex: 1 1 100%; }
.rv-sel-est { height: 32px; border: 1px solid var(--rv-line); border-radius: 9px; font-size: 12px; padding: 0 6px; background: #fff; color: var(--rv-txt); max-width: 100%; text-align: left; text-align-last: left; margin: 0; flex: 1 1 96px; min-width: 0; }
.rv-tabla-wrap { overflow-x: auto; }
.rv-tabla { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.rv-tabla th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--rv-mut); padding: 10px 12px; border-bottom: 1px solid var(--rv-line); background: #FAFBFD; white-space: nowrap; }
.rv-tabla td { padding: 10px 12px; border-bottom: 1px solid #EEF2F8; vertical-align: middle; color: var(--rv-txt); }
.rv-tabla tbody tr:hover td { background: #FAFCFF; }
.rv-tabla small { color: var(--rv-mut); }
.rv-tabla .rv-r { text-align: right; } .rv-tabla .rv-c { text-align: center; }
.rv-td-items { max-width: 320px; }
.rv-td-vacio { text-align: center; color: var(--rv-mut); padding: 28px !important; }
.rv-lista .rv-sel-est { width: 150px; }
.rv-nowrap { white-space: nowrap; }

.rv-det-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.rv-det-grid > div { background: var(--rv-bg); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.rv-det-grid small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--rv-mut); }
.rv-det-grid b { display: block; color: var(--rv-ink); font-size: 13.5px; margin-top: 2px; }
.rv-det-grid span { display: block; color: var(--rv-txt); font-size: 12.5px; overflow-wrap: anywhere; }
.rv-tabla-det { margin-bottom: 12px; }
.rv-tabla-det tfoot td { padding: 6px 12px; color: var(--rv-mut); border: 0; }
.rv-tabla-det .rv-tfoot-tot td { font-size: 15px; font-weight: 800; color: var(--rv-ink); border-top: 1px solid var(--rv-line); padding-top: 10px; }
.rv-nota { color: #92400E !important; }
.rv-det-nota { background: var(--rv-gold-s); border-radius: 10px; padding: 9px 12px; font-size: 13px; color: #7A5B0F; margin: 0 0 12px; }
.rv-det-cancel { background: #FEF2F2; color: #991B1B; }
.rv-det-estado { background: #F8FAFF; border: 1px solid #DCE6FA; border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.rv-det-estado-row { display: flex; gap: 8px; flex-wrap: wrap; }
.rv-det-estado select { flex: 0 0 170px; width: 170px; }
.rv-det-estado input { flex: 1 1 160px; width: auto; }
.rv-sub { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--rv-mut); margin: 0 0 8px; }
.rv-traza { list-style: none; margin: 0; padding: 0 0 0 4px; }
.rv-traza li { display: flex; gap: 10px; align-items: flex-start; padding: 0 0 12px 14px; border-left: 2px solid var(--rv-line); position: relative; }
.rv-traza li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--rv-blue); }
.rv-traza li:last-child { border-left-color: transparent; }
.rv-traza b { display: block; font-size: 12.5px; color: var(--rv-ink); font-weight: 600; }
.rv-traza small { color: var(--rv-mut); font-size: 11.5px; }

.rv-menu-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 14px; align-items: start; }
.rv-cats { padding: 14px; position: sticky; top: 12px; }
.rv-cats h3, .rv-prods-top h3 { margin: 0 0 10px; font-size: 15px; font-weight: 800; color: var(--rv-ink); }
.rv-cat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.rv-cat-list li { display: flex; align-items: center; gap: 4px; border-radius: 10px; }
.rv-cat { flex: 1 1 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; border: 0; background: transparent; border-radius: 10px; padding: 0 10px; font-size: 13.5px; font-weight: 700; color: var(--rv-txt); cursor: pointer; text-align: left; min-width: 0; }
.rv-cat span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rv-cat em { font-style: normal; font-size: 11.5px; color: var(--rv-mut); background: #F1F5F9; border-radius: 999px; padding: 0 7px; }
.rv-cat:hover { background: #F5F8FE; }
.rv-cat.on { background: var(--rv-blue-s); color: var(--rv-blue); }
.rv-cat.on em { background: #fff; color: var(--rv-blue); }
.rv-cat.rv-inact { color: #94A3B8; }
.rv-cat-acc { display: inline-flex; opacity: .55; transition: opacity .15s; }
.rv-cat-list li:hover .rv-cat-acc, .rv-cat-acc:focus-within { opacity: 1; }
.rv-cat-acc button, .rv-icon-btn { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--rv-mut); cursor: pointer; }
.rv-cat-acc button:hover, .rv-icon-btn:hover { background: var(--rv-blue-s); color: var(--rv-blue); }
.rv-icon-btn.rv-danger:hover, .rv-cat-acc button:last-child:hover { background: #FEF2F2; color: var(--rv-red); }
.rv-prods { padding: 14px; min-width: 0; }
.rv-prods-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.rv-prods-top h3 { margin: 0; }
.rv-tabla-menu tr.rv-inact td { opacity: .55; }
.rv-td-img { width: 62px; }
.rv-cod { font-size: 10.5px !important; background: #F1F5F9; color: var(--rv-mut); border-radius: 5px; padding: 0 5px; font-weight: 700; }
.rv-switch { position: relative; display: inline-block; width: 40px; height: 22px; margin: 0; vertical-align: middle; cursor: pointer; }
.rv-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.rv-switch span { position: absolute; inset: 0; background: #CBD5E1; border-radius: 999px; transition: background .15s; }
.rv-switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.rv-switch input:checked + span { background: var(--rv-blue); }
.rv-switch input:checked + span::after { transform: translateX(18px); }
.rv-switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(37,99,235,.25); }
.rv-switch input:disabled { cursor: not-allowed; }
.rv-switch input:disabled + span { opacity: .6; }

@media (max-width: 1199px) { .rv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 991px) {
  .rv-menu-grid { grid-template-columns: 1fr; }
  .rv-cats { position: static; }
  .rv-board { grid-template-columns: repeat(6, 260px); }
}
@media (max-width: 640px) {
  .rv-mod { padding: 12px 10px 24px; }
  .rv-head { flex-wrap: wrap; padding: 13px 14px; }
  .rv-head-actions { width: 100%; justify-content: flex-start; }
  .rv-head-actions .rv-btn span { display: none; }
  .rv-field { min-width: calc(50% - 5px); flex: 1 1 calc(50% - 5px); }
  .rv-kpi b { font-size: 16px; }
  .rv-det-grid { grid-template-columns: 1fr; }
  .rv-form-prod { flex-direction: column; align-items: stretch; }
  .rv-img-pick { width: 100%; flex: 0 0 auto; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; }
  .rv-thumb-lg { width: 96px; height: 80px; }
  .rv-drawer { border-radius: 0; }
  .rv-det-estado select { flex: 1 1 100%; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .rv-overlay, .rv-modal, .rv-toast, .rv-chip, .rv-prod, .rv-switch span, .rv-switch span::after { transition: none !important; animation: none !important; }
  .rv-shake { animation: none !important; }
}
