/* ============================================================
   TEMA v2 · 60 · VENTAS  ·  gestión de ventas
   Gris acero. Panel de filtros tipo consola administrativa y tabla
   limpia con importes en cifras condensadas.
   ============================================================ */
#view[data-route="ventas"] .page-title { background: var(--hdr); }
#view[data-route="ventas"] .filtros-panel { border: 1px solid var(--border); border-top: 5px solid var(--accent-solid); border-radius: 22px; background: var(--surface); }
#view[data-route="ventas"] .filtros-grid input, #view[data-route="ventas"] .filtros-grid select { min-height: 46px; border-radius: 12px; background: var(--surface-2); border-color: transparent; font-size: 14.5px; }
#view[data-route="ventas"] .filtros-grid select { font-size: 13px; padding-inline: 8px; }
#view[data-route="ventas"] .filtros-grid input:focus, #view[data-route="ventas"] .filtros-grid select:focus { background: var(--surface); border-color: var(--accent-solid); }
#view[data-route="ventas"] .filtros-acc { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
#view[data-route="ventas"] .check-line { font-weight: 600; }
#view[data-route="ventas"] .toolbar .search { min-width: 280px; }
#view[data-route="ventas"] .toolbar .hint { font-weight: 700; color: var(--text); background: var(--accent-soft); border-radius: 999px; padding: 6px 16px; margin: 0; font-size: 13px; }

@media (min-width: 641px) { #view[data-route="ventas"] table.data tbody td:first-child { box-shadow: inset 6px 0 0 var(--accent-solid); } }
#view[data-route="ventas"] table.data tbody td { font-size: 14.5px; }
#view[data-route="ventas"] table.data .num b { font-size: 21px; color: var(--text); }
#view[data-route="ventas"] tr.fila-anulada td { background: var(--danger-soft); opacity: 1; }
@media (min-width: 641px) { #view[data-route="ventas"] tr.fila-anulada td:first-child { box-shadow: inset 6px 0 0 var(--danger); } }
#view[data-route="ventas"] tr.fila-anulada td, #view[data-route="ventas"] tr.fila-anulada td b { color: var(--danger); text-decoration: line-through; text-decoration-thickness: 1.5px; }
#view[data-route="ventas"] tr.fila-anulada .badge { text-decoration: none; }
#view[data-route="ventas"] .badge-danger { background: var(--danger-solid); color: #fff; border-color: transparent; }
#view[data-route="ventas"] tr.clickable { cursor: pointer; }
.venta-comanda { border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; margin: 8px 0; background: var(--surface-2); min-width: 0; }
.venta-comanda > summary { cursor: pointer; min-height: 40px; display: list-item; list-style-position: inside; overflow-wrap: anywhere; font-weight: 700; }
.venta-comanda[open] > summary { color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: 7px; }

/* VENTAS · ETAPA 2: editor de lo recibido por medio (resumen de cuenta/recibido/propina) */
.cv-resumen-pago { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2, rgba(0,0,0,.04)); font-size: 14px; }
.cv-resumen-pago.bad { color: var(--danger); }
.cv-resumen-pago b { font-variant-numeric: tabular-nums; }

/* VENTAS · detalle de una venta: todos los botones quedan DENTRO de su recuadro (pie del diálogo y tarjetas), en computadora y en celular. */
.venta-modal .modal-foot { flex-wrap: wrap; justify-content: flex-end; }
.venta-modal .modal-foot .btn { flex: 1 1 140px; min-width: 0; max-width: 100%; padding-inline: 12px; white-space: normal; line-height: 1.2; }
.venta-modal .filtros-acc, .venta-modal .venta-comanda > div { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.venta-modal .venta-comanda > div:not(.filtros-acc) { display: block; }
.venta-modal .venta-comanda .btn, .venta-modal .cierre-card .btn, .venta-modal #venta-devoluciones .btn { max-width: 100%; white-space: normal; }
.venta-modal .pi, .venta-modal .pi-main { min-width: 0; overflow-wrap: anywhere; }

/* ===== VENTAS · filtros de período compactos (tanda 21): Hoy · Esta semana · Este mes · Este año · Rango. Desde/Hasta solo aparecen con «Rango». ===== */
.vp-panel { padding: 12px 14px; }
.vp-barra { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); }
.vp-btn { flex: 1 1 0; min-width: 0; min-height: 42px; padding: 0 10px; border: 0; border-radius: 12px; background: transparent; color: var(--text-muted); font: inherit; font-size: 14px; font-weight: 750; cursor: pointer; white-space: nowrap; transition: background .15s ease, color .15s ease; }
.vp-btn:hover { color: var(--accent); }
.vp-btn.on { background: var(--accent-solid); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-solid) 38%, transparent); }
.vp-btn:focus-visible { outline: 3px solid var(--accent-solid); outline-offset: 2px; }
.vp-rango { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--border-strong, var(--border)); border-radius: 14px; background: var(--surface); }
.vp-rango[hidden] { display: none; }
.vp-campo { display: grid; gap: 4px; min-width: 0; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.vp-campo input { min-width: 0; width: 100%; min-height: 42px; padding: 8px 10px; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--text); }
.vp-error { grid-column: 1 / -1; margin: 0; padding: 6px 10px; border-radius: 10px; background: var(--danger-soft, #fbe3df); color: var(--danger, #c0262d); font-size: 13px; font-weight: 700; }
.vp-error[hidden] { display: none; }
.vp-texto { margin: 8px 2px 0; font-size: 13px; min-height: 0; }
.vp-texto:empty { display: none; }
.vp-mas { margin-top: 8px; }
.vp-mas > summary { cursor: pointer; min-height: 38px; display: flex; align-items: center; font-size: 13.5px; font-weight: 700; color: var(--text-muted); list-style: none; }
.vp-mas > summary::-webkit-details-marker { display: none; }
.vp-mas > summary::before { content: "＋"; margin-right: 6px; color: var(--accent); }
.vp-mas[open] > summary::before { content: "－"; }
.vp-mas .filtros-grid { margin-top: 4px; }
@media (max-width: 560px) { .vp-btn { flex: 1 1 calc(33.333% - 6px); font-size: 13.5px; padding: 0 6px; } .vp-btn[data-vp="anio"], .vp-btn[data-vp="rango"] { flex-basis: calc(50% - 6px); } }

/* ===== VENTAS · búsqueda, Buscar, Limpiar, Exportar y sus textos viven dentro de «Más filtros» (tanda 22) ===== */
.vp-mas-cuerpo { display: grid; gap: 10px; margin-top: 6px; min-width: 0; }
.vp-mas-cuerpo .vp-busca { min-width: 0; width: 100%; }
#view[data-route="ventas"] .vp-mas-cuerpo .toolbar .search, #view[data-route="ventas"] .vp-busca { min-width: 0; }
.vp-mas-cuerpo .filtros-acc { margin-top: 2px; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.vp-mas-cuerpo .filtros-acc .btn { flex: 1 1 150px; min-width: 0; }
.vp-mas-cuerpo .hint { margin: 0; }
.vp-mas-cuerpo .hint[hidden] { display: none; }

