/* Liquidaciones (pantallas/liquidaciones.js): lo que el organizador liquida a cada foodtruck.
   Estética Arc del ERP, como Eventos: bloques blancos con borde fino y radio 22px, neutros, la acción
   casi negra y, para los datos, el mismo verde suave (oklch 52% .16 150 mezclado con la tarjeta).
   Lleva sus propias piezas para no depender de eventos.css. */

.lq-raiz {
  --lq-r: 22px; --lq-gap: 16px;
  --lq-g: oklch(52% .16 150);
  --lq-v0: color-mix(in oklab, var(--lq-g) 8%, var(--fc-card));
  --lq-v1: color-mix(in oklab, var(--lq-g) 16%, var(--fc-card));
  --lq-tinta: oklch(45% .13 150);
  --lq-ambar: var(--fc-warning, #b7791f);
  display: grid; gap: var(--lq-gap); min-width: 0;
}
html[data-theme="dark"] .lq-raiz { --lq-g: oklch(78% .17 150); --lq-tinta: oklch(80% .15 150); }
.lq-raiz * { box-sizing: border-box; }
.lq-raiz .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lq-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Cabecera ---------- */
.lq-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.lq-cab h1 { margin: 0; font-family: var(--arc-display, inherit); font-weight: 500; letter-spacing: -.035em; }
.lq-cab p { margin: 4px 0 0; color: var(--fc-muted); font-size: 14px; }
.lq-acciones { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Botones ---------- */
.lq-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--fc-border); background: var(--fc-card); color: var(--fc-ink); font: inherit; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: background-color var(--arc-fast, 160ms) ease, transform 80ms ease; }
.lq-btn:hover { background: var(--fc-row-hover); }
.lq-btn:active { transform: scale(.98); }
.lq-btn svg { flex: none; }
.lq-btn.primario, .lq-btn.oscuro { background: var(--fc-primary); color: var(--fc-on-primary); border-color: transparent; }
.lq-btn.primario:hover, .lq-btn.oscuro:hover { filter: brightness(1.15); }
.lq-btn.chico { min-height: 34px; padding: 0 11px; font-size: 13px; border-radius: 10px; gap: 6px; }
.lq-btn.fantasma { border-color: transparent; background: transparent; color: var(--fc-muted); }
.lq-btn.fantasma:hover { color: var(--fc-error, #c0392b); background: var(--fc-row-hover); }
.lq-btn[hidden] { display: none; }

/* ---------- Bloques ---------- */
.lq-bloque { min-width: 0; border: 1px solid var(--fc-border); border-radius: var(--lq-r); background: var(--fc-card); animation: arc-entrada var(--arc-considered, 480ms) var(--arc-ease-enter, ease) both; }
.lq-bloque-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 18px 22px 10px; }
.lq-bloque-cab h2 { margin: 0; font-family: var(--arc-display, inherit); font-size: 17px; font-weight: 500; letter-spacing: -.025em; }
.lq-bloque-cab p { margin: 2px 0 0; font-size: 12.5px; color: var(--fc-muted); }
.lq-nada { margin: 0; padding: 6px 22px 22px; font-size: 13.5px; color: var(--fc-muted); }

/* ---------- Evento y tipos, en una fila ---------- */
.lq-config { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; padding: 10px; border-radius: 18px; position: relative; z-index: 5; }
.lq-tipos { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.lq-campo { display: grid; grid-template-columns: auto auto; align-items: center; gap: 0 8px; min-height: 48px; padding: 5px 8px 5px 12px; border: 1px solid var(--fc-border); border-radius: 12px; cursor: text; }
.lq-campo small { grid-column: 1 / -1; font-size: 12px; color: var(--fc-muted); }
.lq-entrada { display: inline-flex; align-items: baseline; gap: 3px; }
.lq-entrada input { width: 5ch; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--fc-ink); font: inherit; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; outline: none; }
.lq-entrada i { font-style: normal; font-size: 13px; color: var(--fc-muted); }
.lq-ayuda { font-size: 12px; color: var(--fc-muted); white-space: nowrap; }
.lq-campo:focus-within { border-color: var(--fc-ink); box-shadow: 0 0 0 3px var(--fc-selected); }

/* Los desplegables propios (evento y ficha de terceros) */
.lq-desplegable { position: relative; min-width: 0; }
.lq-desplegable > button { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; width: 100%; min-height: 48px; padding: 5px 12px; border: 1px solid var(--fc-border); border-radius: 12px; background: var(--fc-card); color: var(--fc-ink); font: inherit; text-align: left; cursor: pointer; transition: background-color var(--arc-fast, 160ms) ease; }
.lq-desplegable > button:hover { background: var(--fc-row-hover); }
.lq-desplegable .lq-flecha { display: inline-flex; grid-column: 2; grid-row: 1 / span 3; opacity: .6; transition: transform var(--arc-fast, 160ms) ease; }
.lq-desplegable.abierto .lq-flecha { transform: rotate(180deg); }
.lq-evento { flex: 1 1 300px; max-width: 460px; }
.lq-evento > button small { font-size: 12px; color: var(--fc-muted); }
.lq-evento > button span { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lq-evento > button em { font-style: normal; font-size: 12.5px; color: var(--fc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lq-menu { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: 320px; max-width: calc(100vw - 32px); max-height: 380px; display: flex; flex-direction: column; padding: 6px; border: 1px solid var(--fc-border); border-radius: 16px; background: var(--fc-card); box-shadow: 0 18px 40px -12px oklch(0% 0 0 / .22), 0 2px 6px oklch(0% 0 0 / .06); animation: lq-menu-entra 160ms var(--arc-ease, ease) both; }
.lq-menu.a-la-derecha { left: auto; right: 0; }
@keyframes lq-menu-entra { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.lq-menu input { width: 100%; min-height: 38px; margin: 0 0 6px; padding: 0 12px; border: 1px solid var(--fc-border); border-radius: 10px; background: var(--fc-card); color: var(--fc-ink); font: inherit; font-size: 14px; }
.lq-menu ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; }
.lq-menu li button { display: grid; gap: 1px; width: 100%; min-height: 38px; padding: 7px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--fc-ink); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.lq-menu li button:hover, .lq-menu li button.foco { background: var(--fc-selected); }
.lq-menu li button.elegido { font-weight: 600; background: var(--fc-selected); }
.lq-menu li button small { color: var(--fc-muted); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }
.lq-menu .lq-menu-vacio { padding: 10px; color: var(--fc-muted); font-size: 13px; }
.lq-menu-crear { display: flex; align-items: center; gap: 8px; min-height: 40px; margin-top: 6px; padding: 0 10px; border: 0; border-top: 1px solid var(--fc-border); border-radius: 0 0 10px 10px; background: transparent; color: var(--fc-ink); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.lq-menu-crear:hover { background: var(--fc-selected); }

/* ---------- Aviso ---------- */
.lq-aviso { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border: 1px solid color-mix(in oklab, var(--lq-ambar) 35%, var(--fc-border)); border-radius: 18px; background: color-mix(in oklab, var(--lq-ambar) 7%, var(--fc-card)); color: var(--fc-ink); font-size: 13.5px; }
.lq-aviso svg { flex: none; color: var(--lq-ambar); margin-top: 1px; }
.lq-aviso b { display: block; font-weight: 600; }
.lq-aviso span { color: var(--fc-muted); }

/* ---------- Cifras clave ---------- */
.lq-kpis-caja { overflow: hidden; }
.lq-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lq-kpi { display: grid; gap: 4px; padding: 18px 22px 20px; border-right: 1px solid var(--fc-border); min-width: 0; }
.lq-kpi:last-child { border-right: 0; background: var(--lq-v0); }
.lq-kpi-nombre { display: inline-flex; align-items: center; font-size: 13.5px; color: var(--fc-muted); }
.lq-kpi-ico { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 8px; border-radius: 8px; background: var(--lq-v0); color: var(--lq-tinta); }
.lq-kpi:last-child .lq-kpi-ico { background: var(--lq-v1); }
.lq-kpi-ico svg { width: 15px; height: 15px; }
.lq-kpi-cifra { font-family: var(--arc-display, inherit); font-size: clamp(22px, 1.4vw + 8px, 30px); font-weight: 400; letter-spacing: -.045em; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lq-kpi small { font-size: 12.5px; color: var(--fc-muted); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Segmentos (tipo de puesto) ---------- */
.lq-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 13px; background: var(--fc-selected); }
.lq-seg button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--fc-muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: color var(--arc-fast, 160ms) ease, background-color var(--arc-fast, 160ms) ease; }
.lq-seg button:hover { color: var(--fc-ink); }
.lq-seg button.activo { background: var(--fc-card); color: var(--fc-ink); box-shadow: 0 1px 2px oklch(0% 0 0 / .08), 0 0 0 .5px oklch(0% 0 0 / .05); }

/* ---------- Tablas ---------- */
.lq-tabla-caja { padding: 0 12px 12px; }
.lq-tabla { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.lq-tabla th { padding: 10px 8px; border-bottom: 1px solid var(--fc-border); color: var(--fc-muted); font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; }
.lq-tabla td { padding: 10px 8px; border-bottom: 1px solid var(--fc-border); vertical-align: middle; }
.lq-tabla tbody tr { transition: background-color var(--arc-fast, 160ms) ease; }
.lq-tabla tbody tr:hover { background: var(--fc-row-hover); }
.lq-tabla tbody tr:last-child td { border-bottom: 0; }
.lq-tabla td small { display: block; margin-top: 1px; font-size: 12px; color: var(--fc-muted); }
.lq-tabla tfoot td { border-top: 1px solid var(--fc-border); border-bottom: 0; font-weight: 600; }
.lq-tabla .lq-pagar { font-weight: 600; color: var(--lq-tinta); }
.lq-tabla tfoot .lq-pagar { font-size: 14.5px; }
.lq-puesto b { font-weight: 600; white-space: nowrap; }
.lq-tercero { width: 200px; min-width: 170px; }
.lq-tercero .lq-desplegable > button { min-height: 44px; padding: 4px 10px; border-color: transparent; background: transparent; }
.lq-tercero .lq-desplegable > button:hover, .lq-tercero .lq-desplegable.abierto > button { border-color: var(--fc-border); background: var(--fc-card); }
.lq-ficha { display: grid; min-width: 0; }
.lq-ficha-nombre { font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.lq-ficha small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lq-falta { color: var(--lq-ambar) !important; }
.lq-pct button { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--fc-ink); font: inherit; font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; }
.lq-pct button svg { opacity: .35; }
.lq-pct button:hover { border-color: var(--fc-border); background: var(--fc-card); }
.lq-pct button:hover svg { opacity: .8; }
.lq-pct button.propio { background: var(--lq-v0); color: var(--lq-tinta); font-weight: 600; }
.lq-acc { white-space: nowrap; text-align: right; }
.lq-acc > * + * { margin-left: 6px; }
.lq-tabla-puestos .lq-btn.chico { padding: 0 10px; }
.lq-emitida i { width: 7px; height: 7px; border-radius: 50%; background: var(--fc-success, #3d8a5a); }
.lq-emitida span { font-variant-numeric: tabular-nums; }
.lq-estado { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: 999px; background: var(--fc-selected); font-size: 12.5px; font-weight: 500; white-space: nowrap; vertical-align: middle; }
.lq-estado i { width: 7px; height: 7px; border-radius: 50%; background: var(--fc-success, #3d8a5a); }
.lq-estado.anulada { color: var(--fc-muted); }
.lq-estado.anulada i { background: var(--fc-error, #c0392b); }
.lq-numero b { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.lq-fecha { white-space: nowrap; }

/* ---------- Estados vacíos y carga ---------- */
.lq-vacio { display: grid; justify-items: center; gap: 8px; padding: 48px 24px; text-align: center; border: 1px dashed var(--fc-border); border-radius: var(--lq-r); background: var(--fc-card); }
.lq-vacio h2 { margin: 6px 0 0; font-family: var(--arc-display, inherit); font-size: 20px; font-weight: 500; letter-spacing: -.03em; }
.lq-vacio p { margin: 0; max-width: 460px; color: var(--fc-muted); font-size: 14px; }
.lq-vacio .ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--lq-v0); color: var(--lq-tinta); }
.lq-cargando { height: 180px; border-radius: var(--lq-r); background: linear-gradient(90deg, var(--fc-selected), color-mix(in oklab, var(--fc-selected) 40%, var(--fc-card)), var(--fc-selected)); background-size: 200% 100%; animation: lq-brillo 1.3s ease-in-out infinite; }
@keyframes lq-brillo { to { background-position: -200% 0; } }

/* ---------- Alta rápida de tercero ---------- */
.lq-dialogo .ui-dialog { width: min(560px, calc(100vw - 24px)); }
.lq-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; }
.lq-form-ancho { grid-column: 1 / -1; }
.lq-campo-form { display: grid; gap: 4px; font-size: 12.5px; color: var(--fc-muted); }
.lq-campo-form input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--fc-border); border-radius: 12px; background: var(--fc-card); color: var(--fc-ink); font: inherit; font-size: 14.5px; }
.lq-campo-form input:focus { outline: none; border-color: var(--fc-ink); box-shadow: 0 0 0 3px var(--fc-selected); }

/* ---------- Bloque estrecho: la tabla de puestos deja la base y el IVA de la comisión (están en
   el PDF) para que el resto quepa sin scroll lateral ---------- */
#lq-puestos { container-type: inline-size; }
@container (max-width: 1280px) {
  .lq-tabla-puestos th:nth-child(5), .lq-tabla-puestos td:nth-child(5),
  .lq-tabla-puestos th:nth-child(8), .lq-tabla-puestos td:nth-child(8) { display: none; }
}
@media (max-width: 1050px) { .lq-tipos { margin-left: 0; } }

/* ---------- Móvil: cada puesto, una tarjeta ---------- */
@media (max-width: 800px) {
  .lq-config { display: grid; grid-template-columns: minmax(0, 1fr); }
  .lq-evento { max-width: none; }
  .lq-tipos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .lq-tipos .lq-btn { grid-column: 1 / -1; }
  .lq-campo { padding: 5px 10px; }
  .lq-campo small { white-space: nowrap; font-size: 12px; }
  .lq-ayuda { display: none; }
  .lq-entrada input { font-size: 16px; width: 4ch; text-align: left; }
  .lq-menu input { font-size: 16px; }
  .lq-campo-form input { font-size: 16px; }
  .lq-kpis { grid-template-columns: minmax(0, 1fr); }
  .lq-kpi { border-right: 0; border-bottom: 1px solid var(--fc-border); padding: 14px 16px; }
  .lq-kpi:last-child { border-bottom: 0; }
  .lq-bloque-cab { padding: 16px 16px 8px; }
  .lq-bloque-cab .lq-seg { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lq-nada { padding: 4px 16px 18px; }
  .lq-tabla-caja { padding: 0 16px 8px; }
  .lq-tabla thead { display: none; }
  .lq-tabla, .lq-tabla tbody, .lq-tabla tfoot { display: block; }
  .lq-tabla tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--fc-border); }
  .lq-tabla tbody tr:hover { background: transparent; }
  .lq-tabla td { display: block; padding: 0; border: 0; min-width: 0; }
  .lq-tabla td.num { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
  .lq-tabla td.num::before { content: attr(data-th); color: var(--fc-muted); font-weight: 400; }
  .lq-tabla-puestos th:nth-child(5), .lq-tabla-puestos td:nth-child(5),
  .lq-tabla-puestos th:nth-child(8), .lq-tabla-puestos td:nth-child(8) { display: flex; }
  .lq-tabla-puestos .lq-puesto, .lq-tabla-puestos .lq-tercero, .lq-tabla-puestos .lq-acc { grid-column: 1 / -1; }
  /* La casilla de marcar, arriba a la derecha de la tarjeta */
  .lq-tabla-puestos tr { position: relative; }
  .lq-tabla-puestos td.lq-marca { position: absolute; top: 12px; right: 0; width: auto; }
  .lq-tabla-puestos tfoot td.lq-marca, .lq-tabla-puestos tfoot td:first-child { display: none; }
  .lq-seleccion { margin: 0 16px 12px; }
  .lq-resultado { margin: 0 16px 12px; }
  .lq-tabla-emitidas .lq-correo { grid-column: 1 / -1; }
  .lq-tercero { width: auto; min-width: 0; }
  .lq-tercero .lq-desplegable > button { border-color: var(--fc-border); margin: 4px 0; }
  .lq-tabla-puestos .lq-pct { display: flex; align-items: center; }
  .lq-tabla-puestos .lq-pct button { min-height: 28px; padding: 0 6px; margin-right: -6px; }
  .lq-tabla .lq-pagar { font-size: 14px; }
  .lq-tabla .lq-acc { display: flex; gap: 8px; justify-content: flex-start; margin-top: 6px; text-align: left; }
  .lq-acc > * + * { margin-left: 0; }
  .lq-tabla .lq-acc .lq-btn { min-height: 40px; flex: 1 1 0; }
  .lq-acc .lq-estado { min-height: 40px; flex: 1 1 0; justify-content: center; }
  .lq-tabla tfoot tr { border-bottom: 0; grid-template-columns: minmax(0, 1fr); }
  .lq-tabla tfoot td { border-top: 0; }
  .lq-tabla tbody tr:last-child { border-bottom: 0; }
  .lq-tabla-puestos tbody tr:last-child { border-bottom: 1px solid var(--fc-border); }
  .lq-tabla tfoot td:empty { display: none; }
  .lq-tabla tfoot td:first-child { grid-column: 1 / -1; }
  .lq-tabla-emitidas td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .lq-tabla-emitidas .lq-fecha { text-align: right; color: var(--fc-muted); font-size: 12.5px; }
  .lq-tabla-emitidas td:nth-child(5) { text-align: right; }
  .lq-tabla-emitidas .lq-acc { grid-column: 1 / -1; }
  .lq-aviso { padding: 12px 14px; }
  .lq-form { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .lq-raiz *, .lq-raiz *::before { animation: none !important; transition: none !important; }
}

/* Los puestos al 100 % (los internos, por defecto) no se liquidan */
.lq-nulo { color: var(--fc-muted); }
.lq-nulo-ficha { display: inline-block; padding: 0 10px; font-size: 12.5px; color: var(--fc-muted); }
/* Interno / externo de cada puesto: un conmutador pequeño bajo su nombre */
.lq-puesto b { display: block; }
.lq-mini-seg { display: inline-flex; gap: 2px; margin-top: 5px; padding: 2px; border-radius: 9px; background: var(--fc-selected); }
.lq-mini-seg button { min-height: 24px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; color: var(--fc-muted); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; transition: color var(--arc-fast, 160ms) ease, background-color var(--arc-fast, 160ms) ease; }
.lq-mini-seg button:hover { color: var(--fc-ink); }
.lq-mini-seg button.activo { background: var(--fc-card); color: var(--fc-ink); font-weight: 500; box-shadow: 0 1px 2px oklch(0% 0 0 / .08), 0 0 0 .5px oklch(0% 0 0 / .05); }
@media (max-width: 800px) {
  .lq-mini-seg button { min-height: 32px; padding: 0 12px; font-size: 13px; }
  .lq-tabla-puestos .lq-puesto { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .lq-tabla-puestos .lq-puesto .lq-mini-seg { margin-top: 0; }
  .lq-tipos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lq-nulo-ficha { padding: 4px 0; }
}
.lq-propio { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--fc-selected); color: var(--fc-muted); font-size: 12px; white-space: nowrap; }

/* ---------- Marcar varios para emitir de una vez, y el envío por correo ---------- */
.lq-marca { width: 36px; padding-right: 0 !important; }
.lq-check { position: relative; display: inline-grid; place-items: center; width: 22px; height: 22px; cursor: pointer; }
.lq-check input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.lq-check span { width: 18px; height: 18px; border: 1.5px solid var(--fc-input, var(--fc-border)); border-radius: 6px; background: var(--fc-card); transition: background-color var(--arc-fast, 160ms) ease, border-color var(--arc-fast, 160ms) ease; }
.lq-check input:checked + span { background: var(--lq-g); border-color: var(--lq-g); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4 10-10'/%3E%3C/svg%3E"); background-size: 13px; background-position: center; background-repeat: no-repeat; }
.lq-check input:focus-visible + span { outline: 2px solid oklch(0% 0 0 / .22); outline-offset: 2px; }
.lq-tabla-puestos tr.marcado td { background: var(--lq-v0); }
.lq-seleccion { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin: 0 22px 12px; padding: 10px 12px 10px 16px; border: 1px solid var(--lq-v1); border-radius: 14px; background: var(--lq-v0); font-size: 13.5px; animation: arc-entrada 260ms var(--arc-ease-enter, ease) both; }
.lq-seleccion.vacia { border-color: var(--fc-border); background: transparent; color: var(--fc-muted); animation: none; }
.lq-sel-cuenta b { font-variant-numeric: tabular-nums; }
.lq-sel-acc { display: flex; gap: 8px; margin-left: auto; }
.lq-enviar { position: relative; display: inline-flex; align-items: center; gap: 8px; color: var(--fc-ink); cursor: pointer; }
.lq-seleccion.vacia .lq-enviar { margin-left: auto; }
.lq-enviar input { position: absolute; width: 18px; height: 18px; margin: 0; opacity: 0; cursor: pointer; }
.lq-enviar > span { flex: none; width: 18px; height: 18px; border: 1.5px solid var(--fc-input, var(--fc-border)); border-radius: 6px; background: var(--fc-card); }
.lq-enviar input:checked + span { background: var(--lq-g); border-color: var(--lq-g); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4 10-10'/%3E%3C/svg%3E"); background-size: 13px; background-position: center; background-repeat: no-repeat; }
.lq-enviar svg { color: var(--fc-muted); }
.lq-resultado { margin: 0 22px 12px; padding: 12px 16px; border: 1px solid var(--lq-v1); border-radius: 14px; background: var(--lq-v0); font-size: 13.5px; }
.lq-resultado.con-avisos { border-color: color-mix(in oklab, var(--lq-ambar) 40%, var(--fc-border)); background: color-mix(in oklab, var(--lq-ambar) 7%, var(--fc-card)); }
.lq-res-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lq-resultado ul { margin: 8px 0 0; padding-left: 18px; color: var(--fc-ink); }
.lq-resultado li { margin: 3px 0; }
.lq-correo { white-space: nowrap; }
.lq-correo .lq-btn { margin-left: 8px; }
.lq-enviada { display: inline-flex; align-items: center; gap: 6px; color: var(--lq-tinta); font-size: 12.5px; }
.lq-envio-error { color: var(--lq-ambar); font-size: 12.5px; font-weight: 500; }
.lq-sin-enviar { color: var(--fc-muted); font-size: 12.5px; }

/* ---------- Acuerdo de regalos ---------- */
/* El del evento, en la barra de arriba, como un campo más */
.lq-regalos-evento { display: inline-flex; align-items: center; gap: 2px; min-height: 48px; padding: 5px 12px 5px 8px; border: 1px solid var(--fc-border); border-radius: 12px; background: var(--fc-card); color: var(--fc-ink); font: inherit; text-align: left; cursor: pointer; transition: background-color var(--arc-fast, 160ms) ease; }
.lq-regalos-evento:hover { background: var(--fc-row-hover); }
.lq-regalos-evento > span:nth-child(2) { display: grid; margin-right: 8px; }
.lq-regalos-evento small { font-size: 12px; color: var(--fc-muted); }
.lq-regalos-evento b { font-size: 14px; font-weight: 600; white-space: nowrap; }
.lq-regalos-evento > svg { opacity: .4; }
.lq-regalos-evento.con { border-color: var(--lq-v1); }
/* La celda de cada puesto: lo que se paga por regalos o cuántos canjeó */
.lq-regalos button { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 2px 8px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--fc-ink); font: inherit; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; cursor: pointer; }
.lq-regalos button > span { display: grid; justify-items: end; line-height: 1.2; }
.lq-regalos button small { font-size: 11.5px; color: var(--fc-muted); font-weight: 400; }
.lq-regalos button svg { opacity: .35; }
.lq-regalos button:hover { border-color: var(--fc-border); background: var(--fc-card); }
.lq-regalos button:hover svg { opacity: .8; }
.lq-regalos button.propio { background: var(--lq-v0); color: var(--lq-tinta); font-weight: 600; }
/* La ventana */
.lq-regalos-dialogo { width: min(520px, calc(100vw - 24px)); }
.lq-rg-cuerpo { display: grid; gap: 12px; }
.lq-rg-detalle { display: grid; gap: 12px; }
.lq-rg-detalle[hidden] { display: none; }
.lq-rg-fila { display: grid; gap: 6px; }
.lq-rg-etq { font-size: 12.5px; color: var(--fc-muted); }
.lq-seg-ancho { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; }
.lq-rg-fila .lq-entrada { min-height: 44px; padding: 0 12px; border: 1px solid var(--fc-border); border-radius: 12px; background: var(--fc-card); align-items: center; }
.lq-rg-fila .lq-entrada:focus-within { border-color: var(--fc-ink); box-shadow: 0 0 0 3px var(--fc-selected); }
.lq-rg-fila .lq-entrada input { width: 100%; text-align: left; font-size: 16px; }
.lq-rg-previa { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--lq-v0); color: var(--fc-ink); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.lq-rg-previa:empty { display: none; }
.lq-rg-previa small { color: var(--fc-muted); }
@media (max-width: 800px) { .lq-regalos-evento { width: 100%; } }

/* La ficha que viene del mismo puesto en otro evento */
.lq-heredada { display: block; color: var(--lq-tinta); font-size: 11.5px; }
/* Lo emitido y enviado, cada una con su tick verde (Vidal, 02-12-2026) */
.lq-res-ok { list-style: none; padding-left: 0 !important; display: grid; gap: 2px; }
.lq-res-ok li { display: grid; grid-template-columns: 22px minmax(90px, auto) auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 0 !important; padding: 6px 4px; border-bottom: 1px solid var(--lq-v1); }
.lq-res-ok li:last-child { border-bottom: 0; }
.lq-res-ok li span { color: var(--fc-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lq-res-ok li em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* La ventana va fuera de la raíz de Liquidaciones: sus colores llevan valor de reserva */
.lq-tick { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--lq-g, oklch(52% .16 150)); color: #fff; }
@media (max-width: 640px) { .lq-res-ok li { grid-template-columns: 22px minmax(0, 1fr) auto; } .lq-res-ok li span:nth-of-type(3) { display: none; } }
/* La ventana del archivo SEPA: cuenta, fecha y total arriba; cada transferencia con su tick */
html[data-ui] .ui-dialog.lq-sepa-dialogo { width: min(720px, calc(100vw - 32px)) !important; max-width: min(720px, calc(100vw - 32px)) !important; }
.lq-sepa-cuerpo { display: grid; gap: 12px; }
.lq-sepa-datos { display: grid; grid-template-columns: 1.2fr 1fr 1fr; border: 1px solid var(--fc-border); border-radius: 14px; background: var(--fc-row-hover); overflow: hidden; }
.lq-sepa-datos > * { display: grid; gap: 2px; padding: 10px 12px; border-right: 1px solid var(--fc-border); min-width: 0; }
.lq-sepa-datos > *:last-child { border-right: 0; }
.lq-sepa-datos span { font-size: 12px; color: var(--fc-muted); }
.lq-sepa-datos b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lq-sepa-datos small { font-size: 11.5px; color: var(--fc-muted); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lq-sepa-datos input { min-height: 34px; padding: 0 8px; border: 1px solid var(--fc-border); border-radius: 10px; background: var(--fc-card); color: var(--fc-ink); font: inherit; font-size: 14px; }
.lq-sepa-lista { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; border: 1px solid var(--fc-border); border-radius: 14px; }
.lq-sepa-lista li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--fc-border); }
.lq-sepa-lista li:last-child { border-bottom: 0; }
.lq-sepa-lista li > span:nth-child(2) { display: grid; min-width: 0; }
.lq-sepa-lista li b { font-weight: 600; font-size: 14px; }
.lq-sepa-lista li small { font-size: 12px; color: var(--fc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lq-sepa-num { font-size: 12.5px; color: var(--fc-muted); white-space: nowrap; }
.lq-sepa-lista em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lq-sepa-fuera { padding: 10px 12px; border: 1px solid color-mix(in oklab, var(--lq-ambar, #b7791f) 40%, var(--fc-border)); border-radius: 12px; background: color-mix(in oklab, var(--lq-ambar, #b7791f) 7%, var(--fc-card)); font-size: 13px; }
.lq-sepa-fuera ul { margin: 6px 0 0; padding-left: 18px; }
.lq-sepa-aviso { margin: 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in oklab, var(--lq-ambar, #b7791f) 9%, var(--fc-card)); font-size: 13px; }
.lq-sepa-vacio { margin: 0; padding: 16px; text-align: center; color: var(--fc-muted); font-size: 13.5px; border: 1px dashed var(--fc-border); border-radius: 14px; }
@media (max-width: 640px) { .lq-sepa-datos { grid-template-columns: 1fr; } .lq-sepa-datos > * { border-right: 0; border-bottom: 1px solid var(--fc-border); } .lq-sepa-num { display: none; } .lq-sepa-lista li { grid-template-columns: 22px minmax(0, 1fr) auto; } }
.lq-sepa-todas { display: inline-flex; align-items: center; gap: 8px; justify-self: start; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.lq-sepa-todas input, .lq-sepa-marca { width: 18px; height: 18px; margin: 0; accent-color: var(--lq-g, oklch(52% .16 150)); cursor: pointer; }
