:root {
  --bg: #0c0e12;
  --surface: #161920;
  --surface-2: #202530;
  --border: #2c3342;
  --text: #ffffff;
  --muted: #9aa3b2;
  --accent: #f59e0b;
  --accent-strong: #ff7a00;
  --green: #16a34a;
  --nequi: #c026d3;
  --blue: #0284c7;
  --danger: #dc2626;
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #363e52 #101319;
}

*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

*::-webkit-scrollbar-track {
  background: #101319;
}

*::-webkit-scrollbar-thumb {
  background: #363e52;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

html,
body {
  height: 100%;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.hidden {
  display: none !important;
}

/* HEADER */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: #080a0d;
  border-bottom: 2px solid var(--accent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #000;
  font-weight: 900;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand h1 {
  font-size: 0.96rem;
  font-weight: 900;
  letter-spacing: 0.3px;
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.8px;
}

.nav-tabs {
  display: flex;
  gap: 6px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 8px 13px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
}

.nav-btn.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.tab-pill {
  background: #000;
  color: var(--accent);
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 900;
}

.nav-btn.active .tab-pill {
  background: #000;
  color: #fff;
}

/* LAYOUT CAJA PC */
.vista-caja {
  display: grid;
  grid-template-columns: 1fr 425px;
  height: calc(100vh - 60px);
  overflow: hidden;
}

.panel-catalogo {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px 16px;
  overflow: hidden;
  border-right: 1px solid var(--border);
}

.buscador-wrap {
  position: relative;
  flex-shrink: 0;
  margin-bottom: 12px;
}

.buscador-wrap input {
  width: 100%;
  padding: 11px 40px 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
}

.buscador-wrap input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-clear-search {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.catalogo-nav {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.catalogo-nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-volver-menu {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: rgba(245, 158, 11, 0.14);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.btn-volver-menu:hover {
  background: var(--accent);
  color: #000;
}

.catalogo-titulo-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.catalogo-titulo-wrap h2 {
  font-size: 0.98rem;
  font-weight: 900;
}

.catalogo-subtitulo {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.grid-catalogo {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
  padding-bottom: 10px;
  align-content: start;
}

/* TARJETAS CATEGORÍA / PRODUCTO / AGREGAR */
.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 108px;
  padding: 15px;
  border-radius: 14px;
  background: linear-gradient(160deg, #1b202b 0%, #141820 100%);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.cat-card:hover {
  border-color: var(--accent);
}

.cat-card:active {
  transform: scale(0.97);
}

.cat-card-title {
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.2;
}

.cat-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--muted);
}

.cat-card-arrow {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 900;
}

.prod-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 102px;
  padding: 13px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.prod-card:hover {
  border-color: var(--accent);
}

.prod-card:active {
  transform: scale(0.97);
}

.prod-card.en-carrito {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.prod-cat {
  font-size: 0.66rem;
  font-weight: 800;
  color: var(--accent);
}

.prod-nombre {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
}

.prod-precio {
  font-size: 1.02rem;
  font-weight: 900;
  color: #4ade80;
}

.prod-badge-qty {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #000;
  font-size: 0.78rem;
  font-weight: 900;
  display: grid;
  place-items: center;
}

.add-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 108px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.06);
  border: 2px dashed var(--accent);
  color: var(--accent);
  cursor: pointer;
  text-align: center;
}

.add-card:hover {
  background: rgba(245, 158, 11, 0.16);
}

.add-card-plus {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
  display: grid;
  place-items: center;
}

.add-card-label {
  font-size: 0.8rem;
  font-weight: 900;
}

/* PANEL CARRITO Y PAGO */
.panel-carrito {
  display: flex;
  flex-direction: column;
  background: #11141a;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.carrito-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.carrito-titulo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carrito-header h2 {
  font-size: 0.9rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 7px;
}

.count-pill {
  background: var(--accent);
  color: #000;
  font-size: 0.74rem;
  padding: 2px 8px;
  border-radius: 999px;
}

.btn-cerrar-movil {
  display: none;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
}

.btn-vaciar {
  background: transparent;
  color: #f87171;
  border: 1px solid #7f1d1d;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.banner-edicion {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #0c4a6e;
  border-bottom: 1px solid #38bdf8;
  color: #e0f2fe;
  font-size: 0.78rem;
  font-weight: 900;
}

.btn-salir-edicion {
  background: #082f49;
  color: #fff;
  border: 1px solid #38bdf8;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 900;
  cursor: pointer;
}

.carrito-lista {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.carrito-vacio {
  margin: auto;
  text-align: center;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 16px;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}

.cart-item-name {
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
}

.cart-item-meta {
  font-size: 0.73rem;
  color: var(--muted);
  margin-top: 2px;
}

.tag-cocina {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 900;
  background: #14532d;
  color: #86efac;
}

.tag-nuevo {
  background: #78350f;
  color: #fde68a;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

.qty-btn.plus {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.qty-val {
  min-width: 20px;
  text-align: center;
  font-weight: 900;
  font-size: 0.88rem;
}

/* TIPO PEDIDO Y MESAS */
.tipo-pedido-box {
  flex-shrink: 0;
  padding: 8px 12px 6px;
  border-top: 1px solid var(--border);
  background: #131720;
}

.tipo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.btn-tipo {
  padding: 7px 4px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}

.btn-tipo.active {
  background: var(--blue);
  border-color: #38bdf8;
  color: #fff;
}

.mesas-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-top: 6px;
}

.btn-mesa {
  padding: 6px 2px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-mesa.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.datos-pedido {
  flex-shrink: 0;
  padding: 6px 12px 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  background: #131720;
}

.datos-pedido input {
  width: 100%;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.datos-pedido input:focus {
  outline: none;
  border-color: var(--accent);
}

.pago-box {
  flex-shrink: 0;
  padding: 9px 12px 11px;
  background: var(--surface);
  border-top: 2px solid var(--border);
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}

.total-row span {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
}

.total-row strong {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--accent);
}

.metodos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 7px;
}

.btn-metodo,
.btn-metodo-edit {
  padding: 8px 5px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.btn-metodo.active[data-metodo="EFECTIVO"],
.btn-metodo-edit.active[data-metodo="EFECTIVO"] {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.btn-metodo.active[data-metodo="NEQUI"],
.btn-metodo-edit.active[data-metodo="NEQUI"] {
  background: var(--nequi);
  border-color: var(--nequi);
  color: #fff;
}

.btn-metodo.active[data-metodo="AMBAS"],
.btn-metodo-edit.active[data-metodo="AMBAS"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.bloque-pago {
  background: #11141a;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 8px;
}

.campo-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.campo-inline label,
.campo-stack label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
}

.campo-inline input,
.campo-stack input {
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 900;
  text-align: right;
}

.campo-inline input {
  width: 140px;
}

.campo-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.campo-stack input {
  width: 100%;
}

.campo-inline input:focus,
.campo-stack input:focus {
  outline: none;
  border-color: var(--accent);
}

.billetes-rapidos {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.chip-billete {
  flex: 1 1 auto;
  padding: 5px 6px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.vueltas-box {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #0f291a;
  color: #4ade80;
  font-size: 0.84rem;
  font-weight: 900;
  text-align: center;
}

.vueltas-box.error {
  background: #3a1216;
  color: #fca5a5;
}

.nequi-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  background: #2e1038;
  color: #f5d0fe;
  font-weight: 900;
}

.mixto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.acciones-cobro {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 8px;
}

.btn-espera {
  width: 100%;
  padding: 12px 8px;
  border: 2px solid var(--blue);
  border-radius: 10px;
  background: rgba(2, 132, 199, 0.16);
  color: #7dd3fc;
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
}

.btn-espera:hover:not(:disabled) {
  background: var(--blue);
  color: #fff;
}

.btn-espera:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-cobrar {
  width: 100%;
  padding: 12px 10px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #000;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.4px;
  cursor: pointer;
}

.btn-cobrar:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.barra-movil {
  display: none;
}

/* VISTAS SECUNDARIAS (ESPERA Y CUADRE) */
.vista-pagina {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px;
}

.pagina-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.pagina-toolbar h2 {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--accent);
}

.subtitulo-toolbar {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
}

.espera-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.espera-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--blue);
  border-radius: 14px;
  padding: 14px;
}

.espera-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.espera-destino {
  font-size: 1.05rem;
  font-weight: 900;
  color: #fff;
}

.espera-meta {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 700;
  margin-top: 2px;
}

.badge-tipo {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  background: #0c4a6e;
  color: #bae6fd;
}

.badge-tipo-LLEVAR {
  background: #78350f;
  color: #fde68a;
}

.badge-tipo-DOMICILIO {
  background: #4c1d95;
  color: #ddd6fe;
}

.espera-items {
  background: #11141a;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  font-size: 0.83rem;
  line-height: 1.5;
}

.espera-nota {
  font-size: 0.78rem;
  color: #fde68a;
  font-weight: 800;
}

.espera-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}

.espera-total-row strong {
  font-size: 1.25rem;
  color: var(--accent);
}

.espera-acciones {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
}

/* CUADRE */
.cuadre-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.cuadre-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fecha-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fecha-control label {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--muted);
}

.fecha-control input[type="date"] {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
}

.btn-secundario {
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
}

.btn-whatsapp {
  padding: 10px 13px;
  border-radius: 10px;
  border: none;
  background: #16a34a;
  color: #fff;
  font-weight: 900;
  font-size: 0.82rem;
  cursor: pointer;
}

.btn-peligro {
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid #991b1b;
  background: rgba(220, 38, 38, 0.14);
  color: #fca5a5;
  font-weight: 900;
  font-size: 0.82rem;
  cursor: pointer;
}

.btn-peligro-solid {
  padding: 12px 14px;
  border-radius: 10px;
  border: none;
  background: var(--danger);
  color: #fff;
  font-weight: 900;
  font-size: 0.88rem;
  cursor: pointer;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-card span {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--muted);
}

.kpi-card strong {
  font-size: 1.5rem;
  font-weight: 900;
}

.kpi-card small {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 700;
}

.kpi-gold { border-top-color: var(--accent); }
.kpi-gold strong { color: var(--accent); }
.kpi-green { border-top-color: var(--green); }
.kpi-green strong { color: #4ade80; }
.kpi-nequi { border-top-color: var(--nequi); }
.kpi-nequi strong { color: #e879f9; }
.kpi-mix { border-top-color: #38bdf8; }
.kpi-mix strong { color: #38bdf8; }

.cuadre-contenido {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 14px;
}

.card-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.card-panel h3 {
  font-size: 0.94rem;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 10px;
}

.tabla-wrap {
  overflow-x: auto;
}

.tabla-conteo {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.tabla-conteo th,
.tabla-conteo td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.tabla-conteo th {
  color: var(--muted);
  font-size: 0.74rem;
}

.col-num {
  text-align: right !important;
  font-weight: 800;
}

.lista-ventas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 62vh;
  overflow-y: auto;
}

.venta-card {
  background: #11141a;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.venta-card.anulada {
  opacity: 0.55;
  border-color: #7f1d1d;
}

.venta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.venta-id {
  font-weight: 900;
  font-size: 0.86rem;
}

.badge-metodo {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
}

.badge-EFECTIVO { background: #14532d; color: #86efac; }
.badge-NEQUI { background: #4a044e; color: #f0abfc; }
.badge-AMBAS { background: #78350f; color: #fde68a; }
.badge-ANULADA { background: #7f1d1d; color: #fecaca; }

.venta-items {
  font-size: 0.82rem;
  color: #e2e8f0;
  margin: 6px 0;
  line-height: 1.45;
}

.venta-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 0.8rem;
}

.venta-total {
  font-size: 1rem;
  font-weight: 900;
  color: var(--accent);
}

.venta-acciones {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-mini {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-cambiar-pago {
  background: rgba(245, 158, 11, 0.14);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.btn-cambiar-pago-full {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: rgba(245, 158, 11, 0.14);
  color: var(--accent);
  font-weight: 900;
  font-size: 0.82rem;
  cursor: pointer;
}

.btn-anular {
  background: transparent;
  color: #f87171;
  border: 1px solid #7f1d1d;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.texto-vacio {
  text-align: center;
  color: var(--muted);
  padding: 24px;
  font-weight: 700;
  grid-column: 1 / -1;
}

/* MODALES */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.8);
  display: grid;
  place-items: center;
  padding: 14px;
}

.modal-card {
  width: 100%;
  max-width: 450px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 14px;
  padding: 18px;
}

.modal-danger {
  border-color: var(--danger);
}

.modal-header {
  text-align: center;
  margin-bottom: 12px;
}

.modal-ok {
  display: inline-block;
  background: #14532d;
  color: #86efac;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.modal-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.16);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.modal-badge-danger {
  display: inline-block;
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
  border: 1px solid var(--danger);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.modal-desc {
  font-size: 0.82rem;
  color: #cbd5e1;
  text-align: center;
  line-height: 1.45;
  margin-bottom: 14px;
}

.cambiar-pago-resumen {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: #11141a;
  border: 1px solid var(--border);
}

.cambiar-pago-resumen strong {
  font-size: 1.35rem;
  color: var(--accent);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.input-modal {
  text-align: left !important;
  text-transform: uppercase;
  padding: 11px 12px !important;
  font-size: 0.94rem !important;
}

.input-precio-modal {
  text-align: right !important;
  font-size: 1.1rem !important;
  color: #4ade80 !important;
}

.input-pin {
  text-align: center !important;
  font-size: 1.25rem !important;
  letter-spacing: 6px;
}

.recibo-cuerpo {
  background: #11141a;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 0.84rem;
  line-height: 1.5;
  margin-bottom: 12px;
  max-height: 45vh;
  overflow-y: auto;
}

.recibo-linea {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.recibo-sep {
  border-top: 1px dashed var(--border);
  margin: 8px 0;
}

.recibo-vueltas {
  margin-top: 8px;
  padding: 9px;
  border-radius: 8px;
  background: #0f291a;
  color: #4ade80;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 900;
}

/* IMPRESIÓN TÉRMICA */
.imp-controles {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.imp-ancho-wrap,
.imp-modo-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--muted);
}

.btn-papel,
.btn-modo-imp {
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}

.btn-papel.active,
.btn-modo-imp.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.imp-preview {
  background: #fafafa;
  color: #111;
  border-radius: 10px;
  padding: 12px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-x: auto;
  max-height: 44vh;
  margin-bottom: 12px;
}

.modal-acciones-recibo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-acciones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  background: #000;
  color: #fff;
  border: 1px solid var(--accent);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
}

/* RESPONSIVE CELULAR */
@media (max-width: 960px) {
  .topbar {
    padding: 0 10px;
  }

  .brand h1 {
    font-size: 0.86rem;
  }

  .brand-sub {
    display: none;
  }

  .nav-btn {
    padding: 7px 9px;
    font-size: 0.74rem;
  }

  .vista-caja {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 60px);
    overflow: visible;
    padding-bottom: 78px;
  }

  .panel-catalogo {
    border-right: none;
    overflow: visible;
    padding: 12px;
  }

  .grid-catalogo {
    grid-template-columns: repeat(2, 1fr);
    overflow: visible;
    gap: 10px;
  }

  .panel-carrito {
    position: fixed;
    inset: 0;
    z-index: 60;
    transform: translateY(100%);
    transition: transform 0.22s ease;
  }

  .panel-carrito.abierto {
    transform: translateY(0);
  }

  .btn-cerrar-movil {
    display: inline-block;
  }

  .barra-movil {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #080a0d;
    border-top: 2px solid var(--accent);
  }

  .barra-movil-info {
    display: flex;
    flex-direction: column;
  }

  .barra-movil-info span {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 800;
  }

  .barra-movil-info strong {
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 900;
  }

  .btn-abrir-carrito {
    padding: 12px 15px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #000;
    font-weight: 900;
    font-size: 0.84rem;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cuadre-contenido {
    grid-template-columns: 1fr;
  }
}