/* ============================================================
   TPV INTEGRADO — estilos (DEMO). Usa los colores de la marca
   (brand.css) y un azul propio para los botones del TPV.
   ============================================================ */
:root {
  --tpv-blue: #2F5BEA;
  --tpv-blue-2: #2449C9;
  --tpv-blue-soft: #EAF0FF;
  --tpv-green: #1F6B4A;
  --tpv-green-2: #18573C;
}
.tpv-ic { width: 1.2em; height: 1.2em; flex: none; display: inline-block; vertical-align: middle; }

/* ── Menú lateral y botón de Inicio ── */
.tpv-nav { display: none !important; }
body.tpv-on .tpv-nav { display: flex !important; }
.tpv-nav-ic { display: inline-flex; align-items: center; justify-content: center; }
.tpv-nav-ic .tpv-ic { width: 22px; height: 22px; }
.tpv-nav-count:not(:empty) { margin-left: auto; background: var(--tpv-blue); color: #fff; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 1px 8px; }
.tpv-dash-bar { display: none; }
body.tpv-on .tpv-dash-bar {
  display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 10px 12px 10px 16px; border-radius: 14px;
  background: var(--tpv-blue-soft); border: 1px solid #C9D6FF;
}
.tpv-dash-ic { display: inline-flex; width: 38px; height: 38px; border-radius: 10px; align-items: center; justify-content: center; background: var(--tpv-blue); color: #fff; flex: none; }
.tpv-dash-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.tpv-dash-txt strong { font-weight: 900; color: var(--ink, #151A40); }
.tpv-dash-txt span { color: var(--ink-2, #4A5070); font-size: .9rem; }
.tpv-dash-btn { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px; border: none; border-radius: 10px; background: var(--tpv-blue); color: #fff; font-weight: 800; font-size: .9rem; cursor: pointer; white-space: nowrap; font-family: inherit; }
.tpv-dash-btn:hover { background: var(--tpv-blue-2); }
.tpv-dash-btn.is-ghost { background: #fff; color: var(--tpv-blue); box-shadow: inset 0 0 0 1.5px var(--tpv-blue); }
@media (max-width: 760px) { body.tpv-on .tpv-dash-bar { flex-wrap: wrap; } .tpv-dash-btn { flex: 1; justify-content: center; } }

/* ── Botón «ABRIR MESA TPV» de cada reserva ── */
.tpv-card-btn {
  display: inline-flex; align-items: center; gap: 10px; flex: none; align-self: center;
  min-height: 52px; padding: 8px 18px; margin: 0 12px 0 8px; border: none; border-radius: 12px;
  background: var(--tpv-blue); color: #fff; cursor: pointer; font-family: inherit;
  box-shadow: 0 2px 10px rgba(47, 91, 234, .28); transition: background .15s, transform .15s;
}
.tpv-card-btn:hover { background: var(--tpv-blue-2); transform: translateY(-1px); }
.tpv-card-btn .tpv-ic { width: 24px; height: 24px; }
.tpv-card-btn-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.tpv-card-btn-txt strong { font-size: .9rem; font-weight: 900; letter-spacing: .04em; }
.tpv-card-btn-txt small { font-size: .82rem; font-weight: 700; opacity: .95; margin-top: 2px; }
.tpv-card-btn.is-open { background: #fff; color: var(--tpv-blue); box-shadow: inset 0 0 0 2px var(--tpv-blue); }
.tpv-card-btn.is-open:hover { background: var(--tpv-blue-soft); }
.tpv-card-bar { padding: 0 14px 14px; }
.tpv-card-bar .tpv-card-btn { width: 100%; justify-content: center; margin: 0; min-height: 50px; }
.tpv-card-bar .tpv-card-btn-txt { align-items: center; }
.tpv-card-bar .tpv-card-btn-txt strong { font-size: .95rem; }
.tpv-card-btn-amt { margin-left: 6px; padding: 3px 10px; border-radius: 8px; background: var(--tpv-blue); color: #fff; font-weight: 900; font-size: .95rem; }

/* ── Botón en las mesas del plano ── */
.tpv-mesa-btn {
  position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); z-index: 6;
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border: none; border-radius: 999px;
  background: var(--tpv-blue); color: #fff; font: 800 11px/1.2 inherit; white-space: nowrap; cursor: pointer;
  box-shadow: 0 2px 6px rgba(47, 91, 234, .35);
}
.tpv-mesa-btn .tpv-ic { width: 13px; height: 13px; }
.tpv-mesa-btn.is-open { background: #fff; color: var(--tpv-blue); box-shadow: inset 0 0 0 2px var(--tpv-blue), 0 2px 6px rgba(21, 26, 64, .15); }

/* ── Pantalla TPV a pantalla completa ── */
body.tpv-abierto { overflow: hidden; }
#tpv-app { display: none; }
#tpv-app.open {
  display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 1200;
  background: var(--bg, #F4F5FA); color: var(--ink, #151A40); font-family: 'Lato', 'Manrope', system-ui, sans-serif;
}
#tpv-app button { font-family: inherit; }
.tpv-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tpv-top {
  display: flex; align-items: center; gap: 14px; padding: 10px 16px; min-height: 62px;
  background: var(--navy, #151A40); color: #fff; flex: none;
}
.tpv-top-back, .tpv-top-x {
  display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--navy-line, #2E3566); background: var(--navy-3, #232A55); color: #fff; font-weight: 700; cursor: pointer;
}
.tpv-top-x { padding: 0 10px; }
.tpv-top-back:hover, .tpv-top-x:hover { background: #2E3566; }
.tpv-top-title { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; font-weight: 800; }
.tpv-top-title em { font-style: normal; font-weight: 400; color: var(--on-navy-2, #C4C9E4); }
.tpv-demo-tag { font-size: .66rem; font-weight: 900; letter-spacing: .08em; padding: 2px 7px; border-radius: 6px; background: var(--lav, #9FB0FF); color: var(--navy, #151A40); }
.tpv-tabs { display: flex; gap: 6px; margin-left: auto; }
.tpv-tab { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 16px; border-radius: 10px; border: none; background: transparent; color: var(--on-navy-2, #C4C9E4); font-weight: 700; cursor: pointer; }
.tpv-tab.active { background: #fff; color: var(--navy, #151A40); }
.tpv-top-clock { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--on-navy-2, #C4C9E4); }
.tpv-top-acc { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.tpv-top-mesa { display: inline-flex; align-items: center; gap: 6px; background: var(--tpv-blue); padding: 6px 12px; border-radius: 10px; font-weight: 900; font-size: 1.1rem; white-space: nowrap; }
.tpv-top-name, .tpv-top-pax { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--navy-line, #2E3566); color: #fff; border-radius: 10px; height: 38px; padding: 0 12px; font-weight: 800; font-size: 1rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.tpv-top-name .tpv-ic { opacity: .6; width: 15px; }
.tpv-top-link { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; color: var(--lav-2, #C9D1FF); white-space: nowrap; }
.tpv-top-right { display: flex; align-items: center; gap: 14px; }
.tpv-top-user { display: inline-flex; align-items: center; gap: 6px; color: var(--on-navy-2, #C4C9E4); font-weight: 700; font-size: .9rem; }

.tpv-body { flex: 1; padding: 22px 24px 40px; }
.tpv-loading, .tpv-empty { padding: 28px; text-align: center; color: var(--ink-3, #585E7E); background: #fff; border: 1px dashed var(--line, #DCDFEA); border-radius: 14px; }
.tpv-empty.sm { padding: 16px; font-size: .9rem; border: 0; background: transparent; }
.tpv-h2 { font-size: 1.1rem; font-weight: 900; margin: 26px 0 12px; display: flex; align-items: center; gap: 8px; }
.tpv-hint { color: var(--ink-3, #585E7E); font-size: .9rem; margin: 0 0 12px; }

/* Sala */
.tpv-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px; background: var(--warning-light, #FBEFE6); color: #7A3510; margin-bottom: 16px; }
.tpv-banner .tpv-ic { width: 26px; height: 26px; }
.tpv-banner div { flex: 1; }
.tpv-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 1.1fr; gap: 14px; }
.tpv-quick-card {
  display: flex; align-items: center; gap: 14px; padding: 18px; min-height: 92px; border-radius: 16px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--line, #DCDFEA); color: var(--ink, #151A40); box-shadow: var(--shadow-xs);
}
.tpv-quick-card:hover { border-color: var(--tpv-blue); }
.tpv-quick-card .tpv-ic { width: 34px; height: 34px; color: var(--tpv-blue); }
.tpv-quick-card strong { display: block; font-size: 1.05rem; font-weight: 900; }
.tpv-quick-card small { color: var(--ink-3, #585E7E); }
.tpv-quick-card.is-blue { background: var(--tpv-blue); border-color: var(--tpv-blue); color: #fff; }
.tpv-quick-card.is-blue .tpv-ic, .tpv-quick-card.is-blue small { color: #fff; }
.tpv-quick-stat { display: flex; flex-direction: column; justify-content: center; padding: 16px 20px; border-radius: 16px; background: var(--navy, #151A40); color: #fff; }
.tpv-quick-stat small { color: var(--on-navy-2, #C4C9E4); }
.tpv-quick-stat strong { font-size: 1.7rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.tpv-acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tpv-acc-grid.sm { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.tpv-acc {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; text-align: left; cursor: pointer; border-radius: 14px;
  background: #fff; border: 1px solid var(--line, #DCDFEA); border-top: 5px solid var(--tpv-blue); color: var(--ink, #151A40); box-shadow: var(--shadow-xs);
}
.tpv-acc:hover { box-shadow: var(--shadow-md); }
.tpv-acc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tpv-acc-mesa { display: inline-flex; align-items: center; gap: 6px; font-weight: 900; font-size: 1.15rem; }
.tpv-acc-time { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--ink-3, #585E7E); font-weight: 700; }
.tpv-acc-name { font-weight: 700; color: var(--ink-2, #4A5070); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpv-acc-meta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-3, #585E7E); }
.tpv-acc-total { font-size: 1.4rem; font-weight: 900; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tpv-warn { color: var(--warning, #C2581A); }
.tpv-ok, .is-ok { color: var(--success, #1F6B4A); }
.is-neg { color: var(--danger, #B42318); }
.is-pos { color: var(--warning, #C2581A); }
.tpv-res-list { display: grid; gap: 8px; }
.tpv-res { display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line, #DCDFEA); }
.tpv-res-hora { font-size: 1.15rem; font-weight: 900; font-variant-numeric: tabular-nums; width: 58px; }
.tpv-res-name { flex: 1; display: flex; flex-direction: column; }
.tpv-res-name small { color: var(--ink-3, #585E7E); }
.tpv-res .tpv-card-btn { margin: 0; }

/* ── Pantalla de cuenta (productos, cuenta y teclado) ── */
.tpv-pos { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(330px, 1.05fr) minmax(250px, .72fr) minmax(360px, 1.5fr); gap: 12px; padding: 12px; }
.tpv-ticket, .tpv-pad, .tpv-products { min-height: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line, #DCDFEA); border-radius: 16px; overflow: hidden; }
.tpv-ticket-head, .tpv-line { display: grid; grid-template-columns: 44px 1fr 72px 82px 26px; gap: 6px; align-items: center; }
.tpv-ticket-head { padding: 10px 12px; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3, #585E7E); border-bottom: 1px solid var(--line, #DCDFEA); background: var(--mist, #EEF0F8); }
.tpv-ticket-head span:nth-child(3), .tpv-ticket-head span:nth-child(4) { text-align: right; }
.tpv-ticket-lines { flex: 1; min-height: 0; }
.tpv-line { width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--border-light, #E8EAF2); background: #fff; text-align: left; cursor: pointer; color: var(--ink, #151A40); font-size: .95rem; }
.tpv-line:hover { background: var(--hover, #F6F7FB); }
.tpv-line.is-sel { background: var(--tpv-blue-soft); box-shadow: inset 4px 0 0 var(--tpv-blue); }
.tpv-line-q { font-weight: 900; font-size: 1.05rem; text-align: center; background: var(--mist, #EEF0F8); border-radius: 8px; padding: 4px 0; }
.tpv-line-n { font-weight: 700; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tpv-line-note { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--warning, #C2581A); font-weight: 700; }
.tpv-line-tag { align-self: flex-start; font-size: .7rem; font-weight: 900; padding: 1px 6px; border-radius: 6px; background: var(--lav-soft, #EEF0FF); color: var(--lav-ink, #3B4BB8); }
.tpv-line-tag.is-inv { background: var(--success-light, #E7F2EC); color: var(--success, #1F6B4A); }
.tpv-line.is-inv .tpv-line-t { text-decoration: line-through; color: var(--ink-3, #585E7E); }
.tpv-line-p { text-align: right; color: var(--ink-3, #585E7E); font-size: .85rem; font-variant-numeric: tabular-nums; }
.tpv-line-t { text-align: right; font-weight: 900; font-variant-numeric: tabular-nums; }
.tpv-line-s { display: flex; justify-content: center; }
.tpv-line-s .is-pend { color: var(--warning, #C2581A); }
.tpv-line-actions { display: grid; grid-template-columns: 52px 52px 1fr 1fr 52px; gap: 6px; padding: 8px; border-top: 1px solid var(--line, #DCDFEA); background: var(--mist, #EEF0F8); }
.tpv-line-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 46px; border-radius: 10px; border: 1px solid var(--line, #DCDFEA); background: #fff; color: var(--ink, #151A40); font-weight: 800; cursor: pointer; }
.tpv-line-actions button:disabled { opacity: .4; cursor: default; }
.tpv-line-actions button.is-danger { color: var(--danger, #B42318); }
.tpv-totals { padding: 10px 14px 12px; border-top: 1px solid var(--line, #DCDFEA); font-size: .86rem; }
.tpv-totals > div { display: flex; justify-content: space-between; padding: 2px 0; font-variant-numeric: tabular-nums; }
.tpv-totals .is-iva { color: var(--ink-3, #585E7E); font-size: .8rem; }
.tpv-totals .is-dto { color: var(--success, #1F6B4A); font-weight: 700; }
.tpv-totals .is-pagado { color: var(--success, #1F6B4A); font-weight: 800; }
.tpv-total { align-items: baseline; margin-top: 6px; padding-top: 8px !important; border-top: 2px solid var(--ink, #151A40); }
.tpv-total span { font-weight: 900; letter-spacing: .08em; }
.tpv-total strong { font-size: 2rem; font-weight: 900; }

.tpv-pad { padding: 10px; gap: 8px; }
.tpv-display { min-height: 52px; display: flex; align-items: center; justify-content: flex-end; padding: 8px 14px; border-radius: 10px; background: var(--navy, #151A40); color: var(--on-navy-2, #C4C9E4); font-size: .85rem; font-weight: 700; text-align: right; }
.tpv-display.has-value { color: #fff; font-size: 1.35rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.tpv-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tpv-mode { height: 38px; border-radius: 9px; border: 1px solid var(--line, #DCDFEA); background: #fff; font-weight: 800; font-size: .85rem; color: var(--ink-2, #4A5070); cursor: pointer; }
.tpv-mode.active { background: var(--lav-soft, #EEF0FF); border-color: var(--lav-ink, #3B4BB8); color: var(--lav-ink, #3B4BB8); }
.tpv-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tpv-key { height: 56px; border-radius: 10px; border: 1px solid var(--line, #DCDFEA); background: var(--hover, #F6F7FB); font-size: 1.45rem; font-weight: 800; color: var(--ink, #151A40); cursor: pointer; }
.tpv-key:active { background: var(--lav-soft, #EEF0FF); }
.tpv-key.is-c { color: var(--danger, #B42318); }
.tpv-ok { height: 50px; border-radius: 10px; border: none; background: var(--navy, #151A40); color: #fff; font-weight: 900; font-size: .95rem; cursor: pointer; }
.tpv-side-actions { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-content: start; overflow-y: auto; }
.tpv-side-actions button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; border-radius: 10px; border: 1px solid var(--line, #DCDFEA); background: #fff; color: var(--ink, #151A40); font-weight: 800; font-size: .78rem; cursor: pointer; }
.tpv-side-actions button .tpv-ic { width: 20px; height: 20px; color: var(--tpv-blue); }
.tpv-side-actions button.is-danger .tpv-ic, .tpv-side-actions button.is-danger { color: var(--danger, #B42318); }
.tpv-side-actions button.is-attn { background: var(--warning-light, #FBEFE6); border-color: var(--warning, #C2581A); }
.tpv-side-actions button.is-attn .tpv-ic { color: var(--warning, #C2581A); }
.tpv-side-actions b { position: absolute; top: 5px; right: 6px; background: var(--warning, #C2581A); color: #fff; border-radius: 999px; font-size: .7rem; padding: 0 6px; }

.tpv-products { padding: 10px; gap: 8px; }
.tpv-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 42px; border-radius: 10px; border: 1px solid var(--line, #DCDFEA); color: var(--ink-3, #585E7E); }
.tpv-search input { flex: 1; border: 0; outline: 0; font: inherit; font-size: .95rem; background: transparent; color: var(--ink, #151A40); }
.tpv-fams { display: flex; flex-wrap: wrap; gap: 6px; }
.tpv-fam { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(21, 26, 64, .08); background: var(--fam, #EEF0FF); color: var(--ink, #151A40); font-weight: 800; font-size: .88rem; cursor: pointer; }
.tpv-fam.active { background: var(--navy, #151A40); color: #fff; box-shadow: inset 0 -4px 0 var(--fam); }
.tpv-fam small { font-weight: 700; opacity: .6; }
.tpv-fam.is-add { background: #fff; border-style: dashed; color: var(--ink-3, #585E7E); }
.tpv-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); grid-auto-rows: 92px; gap: 8px; align-content: start; }
.tpv-prod {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 10px; border-radius: 12px; cursor: pointer; text-align: left;
  border: 1px solid rgba(21, 26, 64, .08); background: var(--fam, #EEF0FF); color: var(--ink, #151A40); box-shadow: 0 1px 0 rgba(21, 26, 64, .06);
}
.tpv-prod:hover { filter: brightness(.97); }
.tpv-prod:active { transform: scale(.97); }
.tpv-prod-n { font-weight: 800; font-size: .9rem; line-height: 1.15; }
.tpv-prod-p { font-weight: 900; font-size: 1rem; font-variant-numeric: tabular-nums; }
.tpv-prod-k { position: absolute; right: 8px; bottom: 9px; color: var(--ink-3, #585E7E); opacity: .7; }
.tpv-bottom { display: flex; align-items: center; gap: 12px; padding: 0 12px 12px; }
.tpv-bottom-info { flex: 1; color: var(--ink-3, #585E7E); font-weight: 700; font-size: .9rem; }
.tpv-cobrar { display: inline-flex; align-items: center; gap: 14px; height: 64px; padding: 0 28px; min-width: 360px; justify-content: center; border-radius: 14px; border: none; background: var(--tpv-green); color: #fff; font-size: 1.15rem; font-weight: 900; letter-spacing: .06em; cursor: pointer; box-shadow: 0 4px 14px rgba(31, 107, 74, .3); }
.tpv-cobrar strong { font-size: 1.6rem; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.tpv-cobrar:hover { background: var(--tpv-green-2); }
.tpv-cobrar:disabled { opacity: .45; cursor: default; }
.tpv-cobrar .tpv-ic { width: 26px; height: 26px; }

/* Tickets y caja */
.tpv-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.tpv-toolbar .tpv-h2 { margin: 0; }
.tpv-toolbar-sum { color: var(--ink-3, #585E7E); }
.tpv-toolbar-btns { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.tpv-date { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; height: 40px; border: 1px solid var(--line, #DCDFEA); border-radius: 10px; background: #fff; }
.tpv-date input { border: 0; font: inherit; outline: 0; }
.tpv-table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line, #DCDFEA); border-radius: 14px; overflow: hidden; font-size: .92rem; }
.tpv-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3, #585E7E); background: var(--mist, #EEF0F8); padding: 10px 12px; }
.tpv-table td { padding: 10px 12px; border-top: 1px solid var(--border-light, #E8EAF2); font-variant-numeric: tabular-nums; }
.tpv-table .r { text-align: right; }
.tpv-table.sm td, .tpv-table.sm th { padding: 7px 10px; }
.tpv-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tpv-kpi { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line, #DCDFEA); }
.tpv-kpi small { color: var(--ink-3, #585E7E); font-weight: 700; }
.tpv-kpi strong { font-size: 1.7rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.tpv-kpi:first-child { background: var(--navy, #151A40); color: #fff; border-color: var(--navy, #151A40); }
.tpv-kpi:first-child small { color: var(--on-navy-2, #C4C9E4); }
.tpv-caja-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.tpv-panel { background: #fff; border: 1px solid var(--line, #DCDFEA); border-radius: 14px; padding: 6px 18px 16px; }
.tpv-panel h3 { font-size: .95rem; font-weight: 900; margin: 14px 0 8px; }
.tpv-bar { display: grid; grid-template-columns: 120px 1fr 100px; align-items: center; gap: 10px; padding: 6px 0; }
.tpv-bar span:first-child { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.tpv-bar-track { height: 10px; border-radius: 999px; background: var(--mist, #EEF0F8); overflow: hidden; }
.tpv-bar-track i { display: block; height: 100%; background: var(--tpv-blue); border-radius: 999px; }
.tpv-bar strong { text-align: right; font-variant-numeric: tabular-nums; }
.tpv-mov { display: grid; grid-template-columns: 1fr auto 100px; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--border-light, #E8EAF2); }
.tpv-mov span { display: inline-flex; align-items: center; gap: 6px; }
.tpv-mov small { color: var(--ink-3, #585E7E); }
.tpv-mov strong { text-align: right; font-variant-numeric: tabular-nums; }
.tpv-caja-open { max-width: 460px; margin: 20px auto; padding: 28px; text-align: center; background: #fff; border: 1px solid var(--line, #DCDFEA); border-radius: 18px; }
.tpv-caja-open-ic .tpv-ic { width: 54px; height: 54px; color: var(--tpv-blue); }
.tpv-caja-open h2 { margin: 6px 0; }
.tpv-caja-open p { color: var(--ink-3, #585E7E); }
.tpv-caja-open .tpv-field { text-align: left; }

/* Botones, campos y selectores del TPV */
.tpv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font-weight: 800; font-size: .92rem; cursor: pointer; font-family: inherit; }
.tpv-btn.sm { height: 34px; padding: 0 10px; font-size: .82rem; }
.tpv-btn.lg { height: 54px; padding: 0 24px; font-size: 1.05rem; }
.tpv-btn-primary { background: var(--navy, #151A40); color: #fff; }
.tpv-btn-primary:hover { background: var(--navy-3, #232A55); }
.tpv-btn-success { background: var(--tpv-green); color: #fff; }
.tpv-btn-success:hover { background: var(--tpv-green-2); }
.tpv-btn-success:disabled { opacity: .45; }
.tpv-btn-ghost { background: #fff; color: var(--ink, #151A40); border-color: var(--line, #DCDFEA); }
.tpv-btn-ghost:hover { border-color: var(--ink-3, #585E7E); }
.tpv-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.tpv-field span { font-size: .8rem; font-weight: 800; color: var(--ink-2, #4A5070); }
.tpv-field input, .tpv-cfg-table input[type=text], .tpv-cfg-table select { height: 46px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2, #C3C7D6); font: inherit; font-size: 1rem; color: var(--ink, #151A40); background: #fff; }
.tpv-field input:focus { outline: none; box-shadow: var(--focus); border-color: var(--lav-ink, #3B4BB8); }
.tpv-seg { display: flex; gap: 6px; margin-bottom: 14px; }
.tpv-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 48px; border-radius: 10px; border: 1px solid var(--line, #DCDFEA); background: #fff; font-weight: 800; cursor: pointer; color: var(--ink, #151A40); }
.tpv-seg button.active { background: var(--navy, #151A40); color: #fff; border-color: var(--navy, #151A40); }
.tpv-seg.sm button { height: 40px; }
.tpv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tpv-chip { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 64px; min-height: 52px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line, #DCDFEA); background: #fff; cursor: pointer; color: var(--ink, #151A40); }
.tpv-chip strong { font-size: 1.05rem; font-weight: 900; }
.tpv-chip small { font-size: .68rem; color: var(--ink-3, #585E7E); }
.tpv-chip.is-current { background: var(--tpv-blue); border-color: var(--tpv-blue); color: #fff; }
.tpv-chip.is-current small { color: #fff; }
.tpv-icon-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line, #DCDFEA); background: #fff; color: var(--danger, #B42318); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

/* Modales del TPV */
.tpv-modal-bg { position: fixed; inset: 0; z-index: 1300; background: rgba(15, 18, 38, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.tpv-modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; color: var(--ink, #151A40); font-family: 'Lato', system-ui, sans-serif; }
.tpv-modal.is-wide { max-width: 860px; }
.tpv-modal.is-ticket { max-width: 460px; }
.tpv-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line, #DCDFEA); }
.tpv-modal-head h3 { margin: 0; font-size: 1.2rem; font-weight: 900; }
.tpv-modal-x { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line, #DCDFEA); background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--ink, #151A40); }
.tpv-modal-body { padding: 18px 20px; overflow-y: auto; }
.tpv-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line, #DCDFEA); background: var(--mist, #EEF0F8); flex-wrap: wrap; }

.tpv-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.tpv-pay-total { display: flex; flex-direction: column; padding: 16px 18px; border-radius: 14px; background: var(--navy, #151A40); color: #fff; margin-bottom: 14px; }
.tpv-pay-total small { color: var(--on-navy-2, #C4C9E4); font-weight: 700; }
.tpv-pay-total strong { font-size: 2.3rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.tpv-pay-mets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.tpv-paym { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 12px; border: 2px solid var(--line, #DCDFEA); background: #fff; font-weight: 900; cursor: pointer; color: var(--ink, #151A40); }
.tpv-paym .tpv-ic { width: 30px; height: 30px; color: var(--tpv-blue); }
.tpv-paym.active { border-color: var(--tpv-blue); background: var(--tpv-blue-soft); }
.tpv-pay-split { margin-bottom: 6px; }
.tpv-pay-split > span { display: block; font-size: .8rem; font-weight: 800; color: var(--ink-2, #4A5070); margin-bottom: 5px; }
.tpv-bills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.tpv-bills button { height: 52px; border-radius: 10px; border: 1px solid var(--line, #DCDFEA); background: var(--hover, #F6F7FB); font-weight: 900; font-size: 1rem; cursor: pointer; color: var(--ink, #151A40); }
.tpv-change { padding: 14px 18px; border-radius: 14px; background: var(--success-light, #E7F2EC); color: var(--success, #1F6B4A); display: flex; flex-direction: column; }
.tpv-change strong { font-size: 2rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.tpv-change.is-bad { background: var(--danger-light, #FBECEA); color: var(--danger, #B42318); }
.tpv-pay-wait { height: 100%; min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; border-radius: 14px; background: var(--mist, #EEF0F8); padding: 20px; }
.tpv-pay-wait .tpv-ic { width: 46px; height: 46px; color: var(--tpv-blue); }
.tpv-pay-wait p { color: var(--ink-3, #585E7E); margin: 0; font-size: .9rem; }
.tpv-split-list { display: grid; gap: 6px; }
.tpv-split-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line, #DCDFEA); }
.tpv-split-n { display: flex; flex-direction: column; font-weight: 800; }
.tpv-split-n small { font-weight: 400; color: var(--ink-3, #585E7E); }
.tpv-stepper { display: inline-flex; align-items: center; gap: 8px; }
.tpv-stepper button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line, #DCDFEA); background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--ink, #151A40); }
.tpv-stepper b { min-width: 26px; text-align: center; font-size: 1.15rem; }
.tpv-split-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: var(--tpv-blue-soft); }
.tpv-split-total strong { font-size: 1.5rem; font-weight: 900; }
.tpv-z-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.tpv-z-grid div { padding: 12px 14px; border-radius: 12px; background: var(--mist, #EEF0F8); display: flex; flex-direction: column; }
.tpv-z-grid strong { font-size: 1.4rem; font-weight: 900; }
.tpv-warn-box { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--warning-light, #FBEFE6); color: #7A3510; font-weight: 700; font-size: .88rem; }
.tpv-done { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; margin-bottom: 14px; }
.tpv-done > .tpv-ic { width: 48px; height: 48px; color: #fff; background: var(--tpv-green); border-radius: 999px; padding: 10px; }
.tpv-done strong { font-size: 1.5rem; font-weight: 900; }
.tpv-done small { color: var(--ink-3, #585E7E); }
.tk-paper { background: #FDFDFB; border: 1px solid var(--line, #DCDFEA); border-radius: 6px; padding: 14px 6px; box-shadow: inset 0 0 0 4px #fff; }
.tk { font: 12px/1.35 "Courier New", monospace; color: #000; max-width: 300px; margin: 0 auto; }
.tk table { width: 100%; border-collapse: collapse; }
.tk td { padding: 1px 0; vertical-align: top; }
.tk .r { text-align: right; white-space: nowrap; }
.tk-c { text-align: center; }
.tk-hr { border-top: 1px dashed #000; margin: 6px 0; }
.tk-big td { font-weight: 700; font-size: 14px; padding-top: 3px; }
.tk-qr { padding: 6px 0; }
.tpv-toast-ic { display: inline-flex; margin-right: 6px; vertical-align: middle; }

/* ── Configuración › TPV ── */
.tpv-tab-ic { display: inline-flex; }
.tpv-tab-ic .tpv-ic { width: 18px; height: 18px; }
.tpv-new { font-size: .6rem; font-weight: 900; letter-spacing: .06em; padding: 1px 5px; border-radius: 5px; background: var(--tpv-blue); color: #fff; }
.tpv-cfg-card { display: flex; align-items: center; gap: 18px; padding: 20px 22px; border-radius: 18px; background: #fff; border: 1px solid var(--line, #DCDFEA); margin-bottom: 18px; }
.tpv-cfg-card.is-on { border-color: var(--tpv-blue); box-shadow: 0 0 0 3px var(--tpv-blue-soft); }
.tpv-cfg-ic { width: 58px; height: 58px; flex: none; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--tpv-blue-soft); color: var(--tpv-blue); }
.tpv-cfg-ic .tpv-ic { width: 30px; height: 30px; }
.tpv-cfg-txt { flex: 1; }
.tpv-cfg-txt h3 { margin: 0 0 4px; font-size: 1.15rem; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.tpv-cfg-txt p { margin: 0; color: var(--ink-2, #4A5070); }
.tpv-switch { position: relative; width: 74px; height: 40px; flex: none; border-radius: 999px; border: none; background: var(--line-2, #C3C7D6); cursor: pointer; transition: background .2s; }
.tpv-switch span { position: absolute; top: 4px; left: 4px; width: 32px; height: 32px; border-radius: 999px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); transition: left .2s; }
.tpv-switch.on { background: var(--tpv-blue); }
.tpv-switch.on span { left: 38px; }
.tpv-cfg-cols { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.tpv-cfg-ticket-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.tpv-cfg-table th:first-child { width: 34%; }
.tpv-cfg-cols.is-off { opacity: .55; }
.tpv-cfg-block { background: #fff; border: 1px solid var(--line, #DCDFEA); border-radius: 16px; padding: 18px; }
.tpv-cfg-head h3 { margin: 0 0 2px; font-weight: 900; font-size: 1.05rem; }
.tpv-cfg-fams { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tpv-cfg-table { margin-bottom: 12px; }
.tpv-cfg-table td { padding: 6px 8px; }
.tpv-cfg-table input[type=text], .tpv-cfg-table select { height: 38px; font-size: .9rem; width: 100%; padding: 0 8px; }
.tpv-cfg-table input.sm { width: 80px; }
.tpv-cfg-table input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--tpv-blue); }
.tpv-cfg-note { display: flex; gap: 8px; margin-top: 16px; padding: 12px; border-radius: 12px; background: var(--mist, #EEF0F8); font-size: .85rem; color: var(--ink-2, #4A5070); }

/* ── v0.2: botones y teclado más grandes, acciones abajo, estado de cocina y accesos ── */
.tpv-pos { grid-template-columns: minmax(340px, 1fr) minmax(300px, .82fr) minmax(400px, 1.55fr); }
.tpv-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); grid-auto-rows: 118px; gap: 10px; }
.tpv-prod { padding: 12px 14px; border-radius: 14px; }
.tpv-prod-n { font-size: 1.08rem; line-height: 1.2; }
.tpv-prod-p { font-size: 1.25rem; }
.tpv-prod-k .tpv-ic { width: 20px; height: 20px; }
.tpv-fam { height: 50px; padding: 0 18px; font-size: 1rem; border-radius: 12px; }
.tpv-search { height: 48px; }
.tpv-pad { gap: 10px; padding: 12px; }
.tpv-display { min-height: 60px; font-size: 1rem; }
.tpv-display.has-value { font-size: 1.5rem; }
.tpv-modes { gap: 8px; }
.tpv-mode { height: 52px; font-size: 1rem; border-radius: 12px; }
.tpv-keys { gap: 8px; flex: 1; min-height: 0; grid-auto-rows: minmax(64px, 1fr); }
.tpv-key { height: auto; min-height: 64px; font-size: 2rem; border-radius: 14px; }
.tpv-ok { height: 68px; font-size: 1.15rem; border-radius: 14px; flex: none; }
.tpv-line { padding: 12px; font-size: 1rem; }
/* Las acciones de la cuenta van en la barra de abajo (en tablet, dentro del teclado desplegable) */
.tpv-pad .tpv-side-actions { display: none; }
.tpv-funcs { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; }
.tpv-funcs button { position: relative; flex: 1 0 86px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 64px; padding: 0 8px; border-radius: 12px; border: 1px solid var(--line, #DCDFEA); background: #fff; color: var(--ink, #151A40); font-weight: 800; font-size: .8rem; cursor: pointer; white-space: nowrap; }
.tpv-funcs button .tpv-ic { width: 22px; height: 22px; color: var(--tpv-blue); }
.tpv-funcs button.is-danger, .tpv-funcs button.is-danger .tpv-ic { color: var(--danger, #B42318); }
.tpv-funcs button.is-send { flex-basis: 120px; }
.tpv-funcs button.is-attn { background: var(--warning-light, #FBEFE6); border-color: var(--warning, #C2581A); }
.tpv-funcs button.is-attn .tpv-ic { color: var(--warning, #C2581A); }
.tpv-funcs b { position: absolute; top: 5px; right: 6px; background: var(--warning, #C2581A); color: #fff; border-radius: 999px; font-size: .7rem; padding: 0 6px; }
.tpv-bottom .tpv-bottom-info { display: none; }
.tpv-cobrar { min-width: 300px; height: 64px; }
/* Estado de cada plato en cocina */
.tpv-line-s .tpv-ic { width: 20px; height: 20px; }
.tpv-line-s.is-cola { color: var(--ink-3, #585E7E); }
.tpv-line-s.is-prep { color: var(--warning, #C2581A); }
.tpv-line-s.is-ok { color: var(--success, #1F6B4A); }
.tpv-line-tag { display: inline-flex; align-items: center; gap: 4px; }
.tpv-line-tag .tpv-ic { width: 12px; height: 12px; }
.tpv-line-tag.is-com { background: var(--mist, #EEF0F8); color: var(--ink-2, #4A5070); }
.tpv-line-tag.is-warn { background: var(--warning-light, #FBEFE6); color: var(--warning, #C2581A); }
.tpv-cocina-ley { display: flex; gap: 12px; padding: 6px 12px; font-size: .74rem; font-weight: 700; color: var(--ink-3, #585E7E); border-top: 1px solid var(--border-light, #E8EAF2); }
.tpv-cocina-ley span { display: inline-flex; align-items: center; gap: 4px; }
.tpv-cocina-ley .tpv-ic { width: 14px; height: 14px; }
/* Accesos al resto del sistema */
.tpv-links { display: flex; gap: 6px; }
.tpv-link, .tpv-top-res { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--navy-line, #2E3566); background: var(--navy-3, #232A55); color: #fff; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tpv-link:hover { background: #2E3566; }
.tpv-top-res { background: #fff; color: var(--navy, #151A40); border-color: #fff; font-weight: 900; }
.tpv-top-res .tpv-ic { color: var(--tpv-blue); }
.tpv-top-back { font-weight: 900; }
/* Menú lateral: acceso directo al TPV bien visible */
body.tpv-on .tpv-nav { background: var(--tpv-blue); color: #fff !important; border-radius: 12px; margin: 6px 0; font-weight: 800; }
body.tpv-on .tpv-nav:hover { background: var(--tpv-blue-2); }
body.tpv-on .tpv-nav .nav-icon, body.tpv-on .tpv-nav .nav-text { color: #fff !important; }
body.tpv-on .tpv-nav .tpv-nav-count:not(:empty) { background: #fff; color: var(--tpv-blue); }

/* ── Tablet vertical y móvil ── */
.tpv-pad-toggle { display: none; }
@media (max-width: 1180px) {
  /* Tablet: cuenta y productos a la vista; el teclado y las acciones se despliegan */
  .tpv-pos { grid-template-columns: minmax(300px, 1fr) minmax(0, 1.25fr); }
  .tpv-pad { display: none; position: absolute; right: 12px; top: 74px; bottom: 88px; width: 330px; z-index: 20; box-shadow: var(--shadow-lg); }
  #tpv-app.pad-open .tpv-pad { display: flex; }
  .tpv-pad { width: 380px; overflow-y: auto; }
  .tpv-pad .tpv-side-actions { display: grid; flex: none; }
  .tpv-keys { flex: none; grid-auto-rows: 64px; }
  .tpv-funcs { display: none; }
  .tpv-links span { display: none; }
  .tpv-link { padding: 0 11px; }
  .tpv-pad-toggle { display: inline-flex; align-items: center; gap: 8px; height: 64px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line, #DCDFEA); background: #fff; color: var(--ink, #151A40); font-weight: 800; cursor: pointer; }
  #tpv-app.pad-open .tpv-pad-toggle { background: var(--navy, #151A40); color: #fff; }
  .tpv-cobrar { min-width: 280px; }
  .tpv-quick { grid-template-columns: repeat(2, 1fr); }
  .tpv-kpis { grid-template-columns: repeat(2, 1fr); }
  .tpv-cfg-cols { grid-template-columns: 1fr; }
  .tpv-top-user, .tpv-top-title em { display: none; }
}
@media (max-width: 760px) {
  #tpv-app.open { overflow-y: auto; }
  .tpv-top { flex-wrap: wrap; }
  .tpv-tabs { margin-left: 0; width: 100%; }
  .tpv-tab { flex: 1; justify-content: center; }
  .tpv-top-back span, .tpv-top-clock { display: none; }
  .tpv-pos { display: flex; flex-direction: column; }
  .tpv-pad { position: fixed; left: 8px; right: 8px; width: auto; top: 70px; bottom: 90px; overflow-y: auto; }
  .tpv-top-link, .tpv-top-user { display: none; }
  .tpv-top-name { max-width: 150px; }
  .tpv-bottom { position: sticky; bottom: 0; background: var(--bg, #F4F5FA); padding-top: 8px; z-index: 15; }
  .tpv-pad-toggle span { display: none; }
  .tpv-ticket { min-height: 320px; }
  .tpv-ticket-lines { flex: none; overflow: visible; }
  .tpv-products { min-height: 420px; }
  .tpv-quick, .tpv-caja-cols, .tpv-pay { grid-template-columns: 1fr; }
  .tpv-cobrar { min-width: 0; width: 100%; }
  .tpv-bottom-info { display: none; }
  .tpv-body { padding: 14px 16px 30px; }
  .tpv-cfg-card { flex-wrap: wrap; }
}
.tpv-cocina-ley .is-prep { color: var(--warning, #C2581A); }
.tpv-cocina-ley .is-ok { color: var(--success, #1F6B4A); }
@media (max-width: 1180px) { .tpv-bottom .tpv-cobrar { flex: 1; } }

/* ── v0.3 · Configuración › Platos y menús ── */
.tpv-carta-head h3 { margin: 0 0 4px; font-size: 1.3rem; color: var(--ink, #151A40); }
.tpv-carta-head p { margin: 0 0 14px; color: var(--ink-3, #585E7E); max-width: 820px; }
.tpv-carta-secs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tpv-carta-sec { height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line, #DCDFEA); background: #fff; color: var(--ink, #151A40); font: inherit; font-weight: 800; cursor: pointer; }
.tpv-carta-sec small { font-weight: 700; opacity: .55; margin-left: 4px; }
.tpv-carta-sec.active { background: var(--navy, #151A40); color: #fff; border-color: var(--navy, #151A40); }
.tpv-carta-body .tpv-cfg-fams { margin-top: 0; }
.tpv-cfg-resumen { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.tpv-cfg-resumen div { flex: 1; min-width: 130px; padding: 12px 14px; border-radius: 12px; background: var(--mist, #EEF0F8); }
.tpv-cfg-resumen strong { display: block; font-size: 1.5rem; color: var(--ink, #151A40); }
.tpv-cfg-resumen span { font-size: .85rem; color: var(--ink-3, #585E7E); }
.tpv-menus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tpv-menu-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; border: 1px solid var(--line, #DCDFEA); border-top: 5px solid var(--tpv-blue); background: #fff; }
.tpv-menu-card.is-off { opacity: .55; }
.tpv-menu-card.is-add { align-items: center; justify-content: center; min-height: 180px; border: 2px dashed var(--line-2, #C3C7D6); border-top-width: 2px; color: var(--ink-3, #585E7E); font: inherit; font-weight: 800; cursor: pointer; }
.tpv-menu-card.is-add .tpv-ic { width: 28px; height: 28px; }
.tpv-menu-card.is-add:hover { border-color: var(--tpv-blue); color: var(--tpv-blue); }
.tpv-menu-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.tpv-menu-top h4 { margin: 0 0 4px; font-size: 1.05rem; }
.tpv-menu-tipo { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--tpv-blue); }
.tpv-menu-precio { text-align: right; font-size: 1.35rem; font-weight: 900; white-space: nowrap; }
.tpv-menu-precio small { display: block; font-size: .72rem; font-weight: 700; color: var(--ink-3, #585E7E); }
.tpv-menu-plato span { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3, #585E7E); }
.tpv-menu-plato p { margin: 2px 0 0; font-size: .9rem; line-height: 1.4; }
.tpv-menu-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line, #DCDFEA); }
.tpv-menu-foot .tpv-check { margin-right: auto; }
.tpv-check { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.tpv-check input { width: 20px; height: 20px; accent-color: var(--tpv-blue); flex: none; }
.tpv-check small { margin-left: auto; color: var(--ink-3, #585E7E); font-weight: 700; }
.tpv-modal.tpv-modal-wide { max-width: 900px; }
.tpv-menu-form { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 0 12px; }
.tpv-menu-form .tpv-field-ancho { grid-column: 1 / -1; }
.tpv-field select { height: 46px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2, #C3C7D6); font: inherit; background: #fff; }
.tpv-menu-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tpv-menu-col { padding: 12px; border-radius: 12px; background: var(--mist, #EEF0F8); display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; }
.tpv-menu-col h5 { margin: 0 0 2px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3, #585E7E); }
.tpv-menu-col .tpv-check { font-weight: 600; font-size: .92rem; }
@media (max-width: 760px) {
  .tpv-menu-form { grid-template-columns: 1fr 1fr; }
  .tpv-menu-form .tpv-field:first-child { grid-column: 1 / -1; }
  .tpv-menu-cols { grid-template-columns: 1fr; }
}
.tpv-check small { white-space: nowrap; }
.tpv-carta-body select[data-f="destino"] { min-width: 104px; }
.tpv-carta-body select[data-f="categoria_cocina"] { min-width: 170px; }

/* ── v0.3 · Menú cerrado en la cuenta ── */
.tpv-line.is-menu { background: #F2F6FF; box-shadow: inset 4px 0 0 var(--tpv-blue); }
.tpv-line.is-menu .tpv-line-n { font-weight: 900; }
.tpv-line.is-en-menu { background: #FAFBFF; color: var(--ink-2, #4A5070); }
.tpv-line.is-en-menu .tpv-line-n { padding-left: 14px; border-left: 2px solid #C9D6FF; font-weight: 600; }
.tpv-line.is-sel { background: var(--tpv-blue-soft); }
.tpv-line-p s { color: var(--ink-3, #585E7E); font-weight: 600; }
.tpv-line-tag.is-menu { background: var(--tpv-blue); color: #fff; }
.tpv-line-tag.is-incl { background: var(--tpv-blue-soft); color: var(--tpv-blue-2); }
.tpv-fam.is-menus { gap: 6px; }
.tpv-fam.is-menus .tpv-ic { width: 16px; height: 16px; }
.tpv-prod.is-menu { border-top: 4px solid var(--tpv-blue); }
.tpv-funcs button.is-menu { flex-basis: 110px; }
.tpv-mc-res { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--tpv-blue-soft); color: var(--tpv-blue-2); margin-bottom: 14px; font-size: .95rem; }
.tpv-mc-res .tpv-ic { width: 20px; height: 20px; flex: none; }
.tpv-mc-step { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; font-weight: 900; }
.tpv-mc-step small { font-weight: 600; color: var(--ink-3, #585E7E); }
.tpv-mc-step > span { width: 24px; height: 24px; border-radius: 999px; background: var(--navy, #151A40); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.tpv-mc-menus { display: flex; flex-wrap: wrap; gap: 8px; }
.tpv-mc-menus .tpv-chip { flex-direction: row; font-weight: 800; padding: 0 16px; }
.tpv-mc-cant { display: flex; align-items: center; gap: 12px; }
.tpv-mc-cant .tpv-key { width: 64px; min-height: 56px; height: 56px; font-size: 1.4rem; }
.tpv-mc-cant .tpv-key .tpv-ic { width: 24px; height: 24px; }
.tpv-mc-cant strong { font-size: 2rem; min-width: 44px; text-align: center; }
.tpv-mc-cant span { font-size: 1.05rem; color: var(--ink-2, #4A5070); }
.tpv-mc-lineas { display: flex; flex-direction: column; border: 1px solid var(--line, #DCDFEA); border-radius: 12px; overflow: hidden; max-height: 300px; overflow-y: auto; }
.tpv-mc-linea { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line, #DCDFEA); background: #fff; font: inherit; text-align: left; cursor: pointer; color: var(--ink, #151A40); }
.tpv-mc-linea:last-child { border-bottom: 0; }
.tpv-mc-linea.on { background: var(--tpv-blue-soft); }
.tpv-mc-box { width: 24px; height: 24px; flex: none; border-radius: 6px; border: 2px solid var(--line-2, #C3C7D6); display: inline-flex; align-items: center; justify-content: center; background: #fff; }
.tpv-mc-linea.on .tpv-mc-box { background: var(--tpv-blue); border-color: var(--tpv-blue); color: #fff; }
.tpv-mc-box .tpv-ic { width: 16px; height: 16px; }
.tpv-mc-n { flex: 1; font-weight: 700; }
.tpv-mc-n small { margin-left: 8px; font-size: .72rem; font-weight: 800; color: var(--tpv-blue); background: #fff; border: 1px solid #C9D6FF; padding: 1px 6px; border-radius: 6px; }
.tpv-mc-p { font-weight: 800; white-space: nowrap; }
.tpv-mc-resumen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.tpv-mc-resumen div { padding: 12px 14px; border-radius: 12px; background: var(--mist, #EEF0F8); display: flex; flex-direction: column; gap: 4px; }
.tpv-mc-resumen div:last-child { background: var(--tpv-blue); color: #fff; }
.tpv-mc-resumen span { font-size: .82rem; font-weight: 700; opacity: .85; }
.tpv-mc-resumen s, .tpv-mc-resumen strong { font-size: 1.5rem; font-weight: 900; }
@media (max-width: 640px) { .tpv-mc-resumen { grid-template-columns: 1fr; } }
.tpv-chip.is-libre { gap: 6px; border-style: dashed; }
.tpv-chip.is-libre .tpv-ic { width: 18px; height: 18px; }
.tpv-chip.is-libre.is-current { border-style: solid; }
.tpv-mc-libre { display: grid; grid-template-columns: 2fr 1fr; gap: 0 12px; }
@media (max-width: 640px) { .tpv-mc-libre { grid-template-columns: 1fr; } }
/* v0.5.2: botón Precio en las acciones de línea */
.tpv-line-actions { grid-template-columns: 44px 44px repeat(3, minmax(0, 1fr)) 44px; gap: 5px; }
.tpv-line-actions button { min-width: 0; padding: 0 4px; gap: 4px; font-size: 14px; }
.tpv-line-actions button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1180px) { .tpv-line-actions button span { display: none; } .tpv-line-actions { grid-template-columns: repeat(6, 1fr); } }
/* v0.7 */
.tpv-modes.is-2 { grid-template-columns: repeat(2, 1fr); }
/* Botón de TPV en la tarjeta de reserva: pequeño y en la misma fila que la comanda */
.tpv-card-bar { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 0 14px 12px; }
.tpv-card-bar .tpv-card-btn, .tpv-card-bar .tpv-card-mini { width: auto; min-height: 34px; padding: 4px 12px; margin: 0; gap: 6px; border-radius: 9px; box-shadow: none; font-size: .82rem; }
.tpv-card-bar .tpv-card-btn .tpv-ic, .tpv-card-mini .tpv-ic { width: 17px; height: 17px; }
.tpv-card-bar .tpv-card-btn-txt strong { font-size: .8rem; letter-spacing: 0; font-weight: 800; }
.tpv-card-bar .tpv-card-btn-amt { font-size: .8rem; padding: 2px 7px; border-radius: 6px; margin-left: 2px; }
.tpv-card-bar .tpv-card-btn.is-open { box-shadow: inset 0 0 0 1.5px var(--tpv-blue); }
.tpv-card-mini { display: inline-flex; align-items: center; border: 0; background: #fff; color: var(--ink, #151A40); box-shadow: inset 0 0 0 1.5px var(--line, #DCDFEA) !important; font-weight: 800; font-family: inherit; cursor: pointer; }
.tpv-card-mini:hover { background: var(--mist, #EEF0F8); }

/* ══════════════════════════════════════════════════════════════
   v1.0 — Limpieza del TPV (28/10), igual que el panel de reservas:
   píldoras, pesos tipográficos tranquilos y la mesa como «S1 / M9».
   ══════════════════════════════════════════════════════════════ */
.tpv-sitio { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.tpv-mi { font-size: 1.15em; line-height: 1; }
.tpv-res-name small .tpv-sitio { font-weight: 700; color: var(--ink-2, #4A5070); }
.tpv-chip strong { display: inline-flex; align-items: center; gap: 4px; }

/* Pesos: 800 para títulos y cifras, 700 para el resto (antes 900 en todo) */
html body .tpv-h2, html body .tpv-acc-mesa, html body .tpv-acc-total, html body .tpv-res-hora,
html body .tpv-quick-card strong, html body .tpv-quick-stat strong, html body .tpv-top-mesa,
html body .tpv-total strong, html body .tpv-chip strong, html body .tpv-top-back { font-weight: 800 !important; }
html body .tpv-card-btn-txt strong, html body .tpv-total span, html body .tpv-top-res, html body .tpv-btn { font-weight: 700 !important; }

/* Forma de píldora en pestañas, botones y chips, como en el panel */
html body .tpv-tab, html body .tpv-btn, html body .tpv-top-back, html body .tpv-top-x,
html body .tpv-top-name, html body .tpv-top-pax, html body .tpv-top-mesa, html body .tpv-top-res,
html body .tpv-card-btn, html body .tpv-chip { border-radius: 999px !important; }
html body .tpv-chip { padding: 8px 16px !important; }

/* Tarjetas de cuenta: acento superior fino en vez de franja gruesa */
html body .tpv-acc { border-top-width: 3px !important; box-shadow: none !important; }
html body .tpv-acc:hover { box-shadow: 0 6px 18px -10px rgba(21, 26, 64, .35) !important; }

/* Reservas sin cuenta: el botón deja de gritar en cada fila */
html body .tpv-res { padding: 10px 12px 10px 18px !important; }
html body .tpv-res .tpv-card-btn { background: var(--tpv-blue-soft, #EEF3FF) !important; color: var(--tpv-blue, #2563EB) !important; box-shadow: none !important; height: 40px; padding: 0 16px !important; }
html body .tpv-res .tpv-card-btn:hover { background: var(--tpv-blue, #2563EB) !important; color: #fff !important; transform: none !important; }
html body .tpv-res .tpv-card-btn .tpv-ic { width: 20px; height: 20px; }
html body .tpv-res .tpv-card-btn-txt strong { font-size: .88rem; }

/* ══════════════════════════════════════════════════════════════
   v1.2 — Carta: plato nuevo abajo, «Guardar» con confirmación,
   carta desde el TPV con código y señal descontada (28/10)
   ══════════════════════════════════════════════════════════════ */
.tpv-carta-acciones { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.tpv-carta-acciones .tpv-btn-primary { margin-left: auto; }
.tpv-carta-estado { display: inline-flex; align-items: center; gap: 6px; color: var(--tpv-green); font-size: .9rem; opacity: 0; transition: opacity .25s ease; }
.tpv-carta-estado.is-on { opacity: 1; }
.tpv-carta-estado svg { width: 16px; height: 16px; }
.tpv-cfg-table tr.is-new td { background: #FFF8E6; }
.tpv-cfg-table tr.is-saved td { animation: tpvGuardado 1.2s ease; }
@keyframes tpvGuardado { 0% { background: #E3F4EA; } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .tpv-cfg-table tr.is-saved td { animation: none; } .tpv-carta-estado { transition: none; } }
.tpv-carta-tpv { max-width: 1280px; margin: 0 auto; padding: 4px 4px 32px; }
.tpv-carta-aviso { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; background: #FFF6E5; color: #6B4A00; font-size: .92rem; }
.tpv-carta-aviso svg { width: 18px; height: 18px; flex: none; }
.tpv-carta-aviso .tpv-btn { margin-left: auto; }
.tpv-carta-lock { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; color: #4A5068; }
.tpv-carta-lock svg { width: 28px; height: 28px; flex: none; color: var(--tpv-blue); }
.tpv-carta-lock p { margin: 0; line-height: 1.45; }
.tpv-carta-error { min-height: 1.2em; margin: 8px 0 0; color: #B42318; font-size: .9rem; }
.tpv-totals .is-senal span:last-child { color: var(--tpv-green); }
.tpv-acc-meta .tpv-acc-pagado { color: var(--tpv-green); font-weight: 600; }

/* ══════════════════════════════════════════════════════════════
   v1.3 — Informe por fechas y facturas desde un ticket (28/10)
   ══════════════════════════════════════════════════════════════ */
.tpv-rango { margin-top: 18px; }
.tpv-rango-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tpv-rango-head h3 { margin: 0; }
.tpv-rango-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.tpv-rango-row .tpv-field { margin: 0; min-width: 170px; }
.tpv-rango-row .tpv-btn { height: 44px; }
.tpv-rango-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tpv-rchip { height: 34px; padding: 0 14px; border-radius: 999px; border: 1.5px solid #DDE1EE; background: #fff; color: #2B3150; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.tpv-rchip:hover { border-color: var(--tpv-blue); color: var(--tpv-blue); }
.tpv-rchip.active { background: var(--tpv-blue-soft); border-color: var(--tpv-blue); color: var(--tpv-blue-2); }
.tpv-fac-res { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; max-height: 220px; overflow: auto; }
.tpv-fac-op { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border: 1.5px solid #E3E6F0; border-radius: 12px; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.tpv-fac-op:hover { border-color: var(--tpv-blue); background: var(--tpv-blue-soft); }
.tpv-fac-op span { color: #5B6180; font-size: .86rem; }
.tpv-fac-elegido:not(:empty) { display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 12px; border-radius: 12px; background: #E8F5EE; color: var(--tpv-green); font-size: .92rem; }
.tpv-fac-elegido svg { width: 18px; height: 18px; flex: none; }
.tpv-fac-elegido .tpv-btn { margin-left: auto; }
.tpv-fac-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tpv-fac-form .tpv-field { margin: 0; }
.tpv-fac-form .tpv-field-ancho { grid-column: span 2; }
@media (max-width: 720px) { .tpv-fac-form { grid-template-columns: 1fr; } .tpv-fac-form .tpv-field-ancho { grid-column: auto; } }
.tpv-fac-total { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; background: #F4F5FA; color: #4A5068; }
.tpv-fac-total strong { font-size: 1.25rem; color: #151A40; }
.tpv-fac-num { font-variant-numeric: tabular-nums; }

/* ══════════════════════════════════════════════════════════════
   v1.4 — Fotos de los platos, vista del TPV y orden arrastrando (28/10)
   ══════════════════════════════════════════════════════════════ */
/* Botones del TPV con foto */
.tpv-grid.is-ambos { grid-auto-rows: 150px; }
.tpv-grid.is-imagen { grid-auto-rows: 120px; }
.tpv-prod.has-img { padding: 0; overflow: hidden; justify-content: flex-start; }
.tpv-prod-img { display: block; width: 100%; flex: 1 1 auto; min-height: 0; background: #E9EBF3 center / cover no-repeat; }
.tpv-prod-txt { display: flex; flex-direction: column; gap: 2px; padding: 7px 10px 8px; background: var(--fam, #EEF0FF); }
.tpv-prod.has-img .tpv-prod-txt .tpv-prod-n { font-size: .86rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tpv-prod.has-img .tpv-prod-txt .tpv-prod-p { font-size: .95rem; }
.tpv-prod.is-solo-img .tpv-prod-img { height: 100%; }
.tpv-prod.is-solo-img > .tpv-prod-p { position: absolute; right: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .92); font-size: .9rem; box-shadow: 0 1px 3px rgba(21, 26, 64, .18); }

/* Configuración: vista y orden */
.tpv-vista-cfg { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; padding: 4px 0 18px; margin-bottom: 16px; border-bottom: 1px solid #ECEEF4; }
@media (max-width: 1000px) { .tpv-vista-cfg { grid-template-columns: 1fr; } }
.tpv-vista-grupo h4 { margin: 0 0 10px; font-size: .95rem; }
.tpv-vista-ops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tpv-vista-op { display: flex; flex-direction: column; gap: 10px; padding: 10px; border: 1.5px solid #DDE1EE; border-radius: 14px; background: #fff; cursor: pointer; font: inherit; text-align: left; }
.tpv-vista-op:hover { border-color: var(--tpv-blue); }
.tpv-vista-op.active { border-color: var(--tpv-blue); box-shadow: 0 0 0 3px var(--tpv-blue-soft); }
.tpv-vista-prev.tpv-grid { flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 64px; gap: 5px; pointer-events: none; }
.tpv-vista-prev.is-ambos { grid-auto-rows: 92px; }
.tpv-vista-prev.is-imagen { grid-auto-rows: 72px; }
.tpv-vista-prev .tpv-prod { padding: 6px; border-radius: 8px; cursor: default; }
.tpv-vista-prev .tpv-prod.has-img { padding: 0; }
.tpv-vista-prev .tpv-prod-n { font-size: .66rem; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tpv-vista-prev .tpv-prod-p, .tpv-vista-prev .tpv-prod.has-img .tpv-prod-txt .tpv-prod-p { font-size: .7rem; }
.tpv-vista-prev .tpv-prod.has-img .tpv-prod-txt .tpv-prod-n { font-size: .62rem; }
.tpv-vista-prev .tpv-prod-txt { padding: 3px 5px 4px; gap: 0; }
.tpv-vista-prev .tpv-prod.is-solo-img > .tpv-prod-p { right: 3px; bottom: 3px; padding: 0 5px; font-size: .62rem; }
.tpv-vista-prev .tpv-prod-k { display: none; }
.tpv-vista-t { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .92rem; color: #2B3150; }
.tpv-vista-t svg { width: 16px; height: 16px; opacity: 0; }
.tpv-vista-op.active .tpv-vista-t { color: var(--tpv-blue-2); }
.tpv-vista-op.active .tpv-vista-t svg { opacity: 1; }
.tpv-orden-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: #F1F2F7; }
.tpv-orden-seg button { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-weight: 700; color: #4A5068; cursor: pointer; }
.tpv-orden-seg button svg { width: 16px; height: 16px; }
.tpv-orden-seg button.active { background: #fff; color: #151A40; box-shadow: 0 1px 3px rgba(21, 26, 64, .15); }

/* Fotos en la tabla de platos */
.tpv-col-img { width: 64px; }
.tpv-foto { position: relative; display: inline-block; }
.tpv-foto-btn { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 10px; border: 1.5px dashed #C9CEDF; background: #F7F8FB center / cover no-repeat; color: #8A90AA; cursor: pointer; }
.tpv-foto-btn:hover { border-color: var(--tpv-blue); color: var(--tpv-blue); }
.tpv-foto-btn.has-img { border-style: solid; border-color: transparent; }
.tpv-foto-btn svg { width: 20px; height: 20px; }
.tpv-foto-x { position: absolute; top: -6px; right: -6px; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; border-radius: 999px; border: 1px solid #DDE1EE; background: #fff; color: #B42318; cursor: pointer; }
.tpv-foto-x svg { width: 12px; height: 12px; }

/* Arrastrar para ordenar */
.tpv-col-asa { width: 28px; padding-right: 0 !important; }
.tpv-asa { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 40px; color: #A3A8BF; cursor: grab; touch-action: none; border-radius: 8px; }
.tpv-asa:hover { color: #4A5068; background: #F1F2F7; }
.tpv-asa svg { width: 18px; height: 18px; }
.tpv-cfg-fams.is-ordenable .tpv-fam[data-id] { cursor: grab; touch-action: none; }
tr.is-drag td { background: var(--tpv-blue-soft) !important; }
.tpv-fam.is-drag { opacity: .85; outline: 2px dashed var(--tpv-blue); outline-offset: 2px; }
body.tpv-arrastrando, body.tpv-arrastrando * { cursor: grabbing !important; user-select: none !important; }
.tpv-cfg-table th:first-child { width: auto; }
.tpv-cfg-table th.tpv-col-asa { width: 30px; }
.tpv-cfg-table th.tpv-col-img { width: 62px; }
.tpv-cfg-table th.tpv-col-nombre { width: 30%; }
.tpv-orden-seg button { white-space: nowrap; }

/* ══ v1.5: menú lateral siempre visible, código de trabajador y movimientos ══ */

/* El TPV se abre dentro del panel: el menú lateral queda a la vista */
@media (min-width: 769px) {
  body.sidebar-mini { --sidebar-w: 84px; }
  body.tpv-abierto #tpv-app.open { left: var(--sidebar-w); }
  body.tpv-abierto .tpv-top > .tpv-top-back, .tpv-tab.is-movil { display: none; }
}
@media (min-width: 1181px) {
  body.sidebar-mini .sidebar { width: var(--sidebar-w); }
  body.sidebar-mini .main-content { margin-left: var(--sidebar-w); }
  body.sidebar-mini .sidebar .nav-text,
  body.sidebar-mini .sidebar-plan-card,
  body.sidebar-mini .sidebar-wordmark { display: none; }
  body.sidebar-mini .sidebar-header { padding-left: 0; padding-right: 0; justify-content: center; }
  body.sidebar-mini .sidebar .sidebar-brand-container { width: 100%; display: flex; justify-content: center; margin: 0; }
  body.sidebar-mini .sidebar .sidebar-logo-img { width: 56px; max-width: 56px; height: auto; margin: 0; }
  body.sidebar-mini .sidebar-nav { padding: 16px 10px; }
  body.sidebar-mini .sidebar .nav-link { justify-content: center; padding: 12px 0; min-height: 48px; }
  body.sidebar-mini .sidebar .nav-icon { font-size: 24px; margin: 0; }
  body.sidebar-mini .sidebar-footer .logout-btn { justify-content: center; padding: 12px 0; }
}
.sidebar, .main-content { transition: width .2s ease, margin-left .2s ease; }
#tpv-app.open { transition: left .2s ease; }

/* Plegar el menú a solo iconos (al pie del menú, encima de «Cerrar sesión») */
.sidebar-mini-btn { width: calc(100% - 16px); margin: 0 8px 2px; border: 0; background: transparent; color: rgba(255, 255, 255, .7); font: inherit; cursor: pointer; text-align: left; }
.sidebar-mini-btn:hover { color: #fff; }
.sidebar-mini-btn .nav-icon .tpv-ic { width: 20px; height: 20px; }
body.sidebar-mini .sidebar-mini-btn .tpv-ic { transform: scaleX(-1); }
@media (max-width: 1180px) { .sidebar-mini-btn { display: none !important; } }

/* Apartados del TPV bajo «Abrir TPV» (solo con el TPV abierto) */
.tpv-subnav { display: none; flex-direction: column; gap: 2px; margin: 2px 0 6px 18px; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .12); }
body.tpv-abierto .tpv-subnav { display: flex; }
.tpv-subnav .nav-link.tpv-sub { min-height: 40px; padding-top: 8px; padding-bottom: 8px; font-size: .92rem; }
.tpv-subnav .nav-icon .tpv-ic { width: 19px; height: 19px; }
@media (min-width: 769px) and (max-width: 1180px) { .tpv-subnav { margin-left: 0; padding-left: 0; border-left: 0; } }
@media (min-width: 1181px) { body.sidebar-mini .tpv-subnav { margin-left: 0; padding-left: 0; border-left: 0; } }
@media (max-width: 768px) { .tpv-subnav { display: none !important; } }

/* Cabecera de la venta: abrir mesa y cuentas abiertas siempre a mano */
.tpv-top-start { display: flex; align-items: center; gap: 8px; flex: none; }
.tpv-top-open {
  display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--tpv-blue); color: #fff; font-weight: 800; cursor: pointer; white-space: nowrap;
}
.tpv-top-open:hover { filter: brightness(1.08); }
.tpv-top-cuenta .tpv-top-back { border-radius: 999px; white-space: nowrap; }
.tpv-top-back b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--navy, #151A40); font-size: .78rem; display: inline-flex; align-items: center; justify-content: center; }
.tpv-top-acc.is-nueva { flex-direction: column; align-items: flex-start; gap: 2px; }
.tpv-top-acc.is-nueva .tpv-top-mesa { background: transparent; padding: 0; font-size: 1.05rem; }
.tpv-top-acc.is-nueva small { color: var(--on-navy-2, #C4C9E4); font-size: .8rem; }
.tpv-top-nueva { display: inline-flex; align-items: center; gap: 5px; height: 38px; padding: 0 14px; border: 1px dashed var(--navy-line, #3A4275); border-radius: 999px; background: transparent; color: #C4C9E4; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tpv-top-nueva:hover { color: #fff; border-style: solid; }
.tpv-funcs.is-off, .tpv-side-actions.is-off { opacity: 1; }
.tpv-funcs-off { margin: 0; padding: 0 6px; font-size: .85rem; color: var(--ink-3, #585E7E); align-self: center; }
.tpv-top .tpv-funcs-off { color: var(--on-navy-2, #C4C9E4); }
@media (max-width: 1180px) { .tpv-top-start .tpv-top-back span, .tpv-top-nueva span { display: none; } }

/* Quién está usando el TPV */
.tpv-oper {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 6px 0 12px; border-radius: 999px;
  border: 1px solid var(--navy-line, #2E3566); background: var(--navy-3, #232A55); color: #fff; font-weight: 800; cursor: pointer; white-space: nowrap;
}
.tpv-oper small { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #C4C9E4; font-size: .74rem; font-weight: 700; }
.tpv-oper:hover small { background: #fff; color: var(--navy, #151A40); }
.tpv-oper.is-nadie { border-color: #F5B54A; color: #FFE3B0; }

/* Pantalla de código */
.tpv-lock {
  position: fixed; inset: 0; z-index: 1400; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(21, 26, 64, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-family: 'Lato', 'Manrope', system-ui, sans-serif; animation: tpvLockIn .18s ease-out;
}
@keyframes tpvLockIn { from { opacity: 0; } to { opacity: 1; } }
.tpv-lock-box { width: min(380px, 100%); padding: 28px 26px 20px; border-radius: 22px; background: #fff; color: #151A40; text-align: center; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.tpv-lock-ic { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 999px; background: var(--tpv-blue-soft, #EAF0FF); color: var(--tpv-blue); }
.tpv-lock-ic .tpv-ic { width: 24px; height: 24px; }
.tpv-lock-box h2 { margin: 12px 0 4px; font-size: 1.35rem; font-weight: 800; }
.tpv-lock-box > p { margin: 0 auto; max-width: 300px; font-size: .9rem; color: #585E7E; line-height: 1.4; }
.tpv-lock-dots { display: flex; justify-content: center; gap: 12px; margin: 20px 0 6px; }
.tpv-lock-dots i { width: 14px; height: 14px; border-radius: 999px; border: 2px solid #C9CEDF; transition: background .12s, border-color .12s; }
.tpv-lock-dots i.on { background: #151A40; border-color: #151A40; }
.tpv-lock-dots.is-error { animation: tpvShake .3s; }
.tpv-lock-dots.is-error i { border-color: #D92D20; }
@keyframes tpvShake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.tpv-lock-box .tpv-lock-err { min-height: 20px; margin: 0 0 8px; color: #B42318; font-weight: 700; font-size: .85rem; }
.tpv-lock-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tpv-lock-key { height: 62px; border: 1px solid #E3E6F0; border-radius: 999px; background: #F7F8FB; color: #151A40; font: 800 1.5rem/1 inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tpv-lock-key:hover { background: #EEF0F7; }
.tpv-lock-key:active { transform: scale(.96); }
.tpv-lock-key .tpv-ic { width: 22px; height: 22px; }
.tpv-lock-key.is-ok { grid-column: 1 / -1; height: 54px; background: var(--tpv-blue); border-color: var(--tpv-blue); color: #fff; font-size: 1.05rem; }
.tpv-lock-salir { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: #585E7E; font: 700 .88rem inherit; cursor: pointer; padding: 8px 12px; border-radius: 999px; }
.tpv-lock-salir:hover { background: #F1F2F7; color: #151A40; }
.tpv-lock-salir .tpv-ic { width: 16px; height: 16px; }

/* Abrir mesa: mesas del plano por sala */
.tpv-mesas-zona { margin: 10px 0 14px; }
.tpv-mesas-zona h4 { margin: 0 0 8px; font-size: .78rem; font-weight: 800; color: #585E7E; }
.tpv-chip.is-ocupada { background: #F1F2F7; border-style: dashed; color: #585E7E; }
.tpv-chip.is-ocupada small { color: #2F5BEA; font-weight: 700; }

/* Configuración: control de trabajadores */
.tpv-cfg-trab { grid-column: 1 / -1; }
.tpv-trab-ops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.tpv-trab-op { display: flex; align-items: flex-start; gap: 10px; text-align: left; padding: 14px; border-radius: 14px; border: 1.5px solid #E3E6F0; background: #fff; cursor: pointer; font: inherit; color: #151A40; }
.tpv-trab-op .tpv-ic { flex: none; width: 20px; height: 20px; margin-top: 2px; color: #8A90AA; }
.tpv-trab-op strong { display: block; font-weight: 800; }
.tpv-trab-op small { display: block; margin-top: 3px; color: #585E7E; font-size: .82rem; line-height: 1.35; }
.tpv-trab-op.active { border-color: var(--tpv-blue); background: var(--tpv-blue-soft, #EAF0FF); }
.tpv-trab-op.active .tpv-ic { color: var(--tpv-blue); }
.tpv-trab-min { max-width: 260px; }
@media (max-width: 900px) { .tpv-trab-ops { grid-template-columns: 1fr; } }

/* Movimientos del personal */
.tpv-reg-filtros { margin-bottom: 16px; }
.tpv-reg-filtros select { height: 44px; }
.tpv-reg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tpv-reg-card { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid #E3E6F0; background: #fff; text-align: left; cursor: pointer; font: inherit; color: #151A40; }
.tpv-reg-card.is-sel { border-color: var(--tpv-blue); box-shadow: 0 0 0 3px rgba(47, 91, 234, .12); }
.tpv-reg-who { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.tpv-reg-who .tpv-ic { grid-row: span 2; width: 22px; height: 22px; color: var(--tpv-blue); }
.tpv-reg-who small { color: #585E7E; font-size: .8rem; }
.tpv-reg-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tpv-reg-nums span { display: flex; flex-direction: column; font-size: .72rem; color: #585E7E; line-height: 1.25; }
.tpv-reg-nums b { font-size: 1.02rem; color: #151A40; font-variant-numeric: tabular-nums; }
.tpv-reg-nums .is-warn b { color: #B42318; }
.tpv-reg-tipos { margin: 0 0 12px; }
.tpv-reg-table td small { display: block; color: #585E7E; font-size: .82rem; margin-top: 2px; }
.tpv-reg-acc { display: inline-flex; align-items: center; gap: 6px; }
.tpv-reg-acc .tpv-ic { width: 16px; height: 16px; color: #8A90AA; }
.tpv-reg-table tr.is-alerta .tpv-reg-acc strong, .tpv-reg-table tr.is-alerta .tpv-reg-acc .tpv-ic { color: #B42318; }
.tpv-reg-table tr.is-sesion td { background: #FAFBFD; color: #585E7E; }
.tpv-muted { color: #8A90AA; }
.tk-sm { font-size: .78em; }

/* Menú plegado: cocina y usuario solo con icono */
@media (min-width: 769px) and (max-width: 1180px) {
  .sidebar-cocina-btn { justify-content: center; margin: 0 10px 10px; padding: 10px; }
  .sidebar-cocina-txt, .usuario-actual > span:last-child { display: none; }
  .usuario-actual { justify-content: center; }
}
@media (min-width: 1181px) {
  body.sidebar-mini .sidebar-cocina-btn { justify-content: center; margin: 0 10px 10px; padding: 10px; }
  body.sidebar-mini .sidebar-cocina-txt, body.sidebar-mini .usuario-actual > span:last-child { display: none; }
  body.sidebar-mini .usuario-actual { justify-content: center; padding-left: 0; padding-right: 0; }
}
/* Con el TPV abierto el menú gana sitio para sus apartados */
body.tpv-abierto .sidebar-plan-card { display: none; }
.tpv-subnav .nav-link.tpv-sub { min-height: 36px; padding-top: 6px; padding-bottom: 6px; }

/* Cabecera de la venta sin apreturas */
.tpv-top-cuenta { gap: 10px; }
.tpv-top-cuenta .tpv-top-acc { min-width: 0; flex: 1 1 auto; }
.tpv-top-cuenta .tpv-top-name { min-width: 60px; max-width: 220px; }
.tpv-top-cuenta .tpv-top-pax, .tpv-top-cuenta .tpv-top-mesa { flex: none; }
@media (max-width: 1599px) {
  .tpv-top-cuenta .tpv-top-clock, .tpv-top-cuenta .tpv-top-link { display: none; }
  .tpv-top-cuenta .tpv-links .tpv-link span { display: none; }
  .tpv-top-cuenta .tpv-links .tpv-link { padding: 0 12px; }
  .tpv-top-nueva span { display: none; }
}
@media (max-width: 1399px) {
  .tpv-top-cuenta .tpv-top-start .tpv-top-back span { display: none; }
  .tpv-oper small { display: none; }
  .tpv-oper { padding-right: 12px; }
}

/* v1.5.1: la misma barra en todas las pantallas del TPV */
.tpv-top-title { border: 0; background: transparent; color: #fff; font: inherit; font-size: 1.15rem; font-weight: 800; cursor: pointer; padding: 6px 8px; border-radius: 999px; white-space: nowrap; }
.tpv-top-title:hover { background: rgba(255, 255, 255, .06); }
.tpv-tab { border-radius: 999px; white-space: nowrap; }
.tpv-tab:not(.active):hover { background: rgba(255, 255, 255, .08); color: #fff; }
.tpv-tab-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--tpv-blue); color: #fff; font-size: .76rem; display: inline-flex; align-items: center; justify-content: center; }
.tpv-tab.active .tpv-tab-n { background: var(--navy, #151A40); }
.tpv-top { gap: 10px; }
@media (max-width: 1499px) { .tpv-top .tpv-links .tpv-link span { display: none; } .tpv-top .tpv-links .tpv-link { padding: 0 12px; } }
@media (max-width: 1299px) { .tpv-top-title em, .tpv-top-clock, .tpv-oper small, .tpv-top-title .tpv-demo-tag { display: none; } .tpv-oper { padding-right: 12px; } }

/* Datos de la cuenta abierta, encima de las líneas */
.tpv-acc-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--line, #DCDFEA); background: #fff; }
.tpv-acc-bar .tpv-top-mesa { color: #fff; font-size: 1rem; padding: 5px 12px; border-radius: 999px; }
.tpv-acc-name, .tpv-acc-pax, .tpv-acc-nueva { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid #DCDFEA; background: #fff; color: #151A40; font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.tpv-acc-name .tpv-ic { opacity: .5; width: 14px; }
.tpv-acc-res { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: #585E7E; }
.tpv-acc-nueva { margin-left: auto; border-style: dashed; color: #585E7E; font-weight: 700; }
.tpv-acc-nueva:hover { border-style: solid; color: #151A40; }

/* «Abrir mesa» grande encima del teclado */
.tpv-abrir-mesa { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 60px; margin-bottom: 10px; border: 0; border-radius: 999px; background: var(--tpv-blue); color: #fff; font: inherit; font-size: 1.15rem; font-weight: 800; cursor: pointer; box-shadow: 0 4px 14px rgba(47, 91, 234, .28); flex: none; }
.tpv-abrir-mesa:hover { filter: brightness(1.07); }
.tpv-abrir-mesa .tpv-ic { width: 22px; height: 22px; }

/* v1.5.2: vista dividida — botones de la reserva en una sola fila y solo con iconos */
.view-mode-split .reservation-card .card-main { grid-template-areas: "hora info" "estado estado" !important; row-gap: 10px; }
.view-mode-split .reservation-card .card-status-wrap { justify-self: stretch; justify-content: flex-start; flex-wrap: wrap; gap: 6px; }
.view-mode-split .reservation-card .card-tags { flex-wrap: nowrap; gap: 6px; }
.view-mode-split .reservation-card .card-tags .tpv-card-inline { flex-wrap: nowrap; gap: 6px; }
.view-mode-split .reservation-card .card-tags .origen-badge { overflow: hidden; font-size: 0 !important; width: 32px; height: 32px; min-height: 32px; padding: 0 !important; justify-content: center; gap: 0 !important; }
.view-mode-split .reservation-card .card-tags .origen-badge .material-symbols-rounded { font-size: 1.05rem !important; }
.view-mode-split .reservation-card .card-tags .tpv-card-inline .tpv-card-mini > span,
.view-mode-split .reservation-card .card-tags .tpv-card-inline .tpv-card-btn-txt { display: none; }
.view-mode-split .reservation-card .card-tags .tpv-card-inline .tpv-card-mini,
.view-mode-split .reservation-card .card-tags .tpv-card-inline .tpv-card-btn { min-width: 32px; height: 32px; min-height: 32px; padding: 0 9px !important; justify-content: center; }
.view-mode-split .reservation-card .card-tags .tpv-card-inline .tpv-ic { width: 16px; height: 16px; }
.view-mode-split .reservation-card .card-tags .tpv-card-inline .tpv-card-btn-amt { margin-left: 4px; }
.view-mode-split .reservation-card .card-status-wrap .status-badge { min-height: 32px; }

/* v1.6: extras de cada plato */
.tpv-ext-btn { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px dashed #C9CEDF; background: #fff; color: #585E7E; font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tpv-ext-btn .tpv-ic { width: 15px; height: 15px; }
.tpv-ext-btn:hover { border-color: var(--tpv-blue); color: var(--tpv-blue); }
.tpv-ext-btn.has { border-style: solid; border-color: #C9D6FF; background: var(--tpv-blue-soft); color: var(--tpv-blue); }
.tpv-modal.is-extras { width: min(560px, calc(100vw - 32px)); }
.tpv-ex-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.tpv-ex-row, .tpv-ex-nuevo { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 8px; align-items: center; }
.tpv-ex-row input, .tpv-ex-nuevo input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #DCDFEA; border-radius: 10px; font: inherit; font-size: .95rem; }
.tpv-ex-precio { position: relative; display: block; }
.tpv-ex-precio input { padding-right: 26px; text-align: right; }
.tpv-ex-precio span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #8A90AA; font-size: .85rem; pointer-events: none; }
.tpv-ex-vacio { margin: 0; padding: 14px; border: 1px dashed #DCDFEA; border-radius: 12px; color: #585E7E; font-size: .9rem; text-align: center; }
.tpv-ex-nuevo { padding-top: 12px; border-top: 1px solid #ECEEF4; }
.tpv-ex-otros { margin-top: 14px; }
.tpv-ex-otros > span { display: block; margin-bottom: 8px; font-size: .78rem; font-weight: 700; color: #585E7E; }
.tpv-ex-otros .tpv-chip { flex-direction: row; gap: 4px; min-height: 36px; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.tpv-ex-otros .tpv-chip .tpv-ic { width: 14px; height: 14px; }
.tpv-ex-otros .tpv-chip small { font-size: .78rem; color: var(--tpv-blue); }
/* Elegir extras en la venta */
.tpv-modal.is-elegir-ex { width: min(560px, calc(100vw - 32px)); }
.tpv-ex-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.tpv-ex-op { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 14px; border-radius: 16px; border: 1.5px solid #E3E6F0; background: #fff; color: #151A40; font: inherit; text-align: left; cursor: pointer; }
.tpv-ex-check { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 999px; border: 1.5px solid #C9CEDF; color: transparent; }
.tpv-ex-check .tpv-ic { width: 14px; height: 14px; }
.tpv-ex-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tpv-ex-n { font-weight: 800; font-size: 1rem; line-height: 1.2; }
.tpv-ex-p { font-size: .82rem; font-weight: 700; color: #585E7E; white-space: nowrap; }
.tpv-ex-op.active { border-color: var(--tpv-blue); background: var(--tpv-blue-soft); }
.tpv-ex-op.active .tpv-ex-check { background: var(--tpv-blue); border-color: var(--tpv-blue); color: #fff; }
.tpv-ex-op.active .tpv-ex-p { color: var(--tpv-blue); }
.tpv-ex-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 12px; background: #F4F5FA; }
.tpv-ex-total strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.tpv-line-tag.is-ex { color: #2F5BEA; background: var(--tpv-blue-soft); }
.tpv-line-tag.is-ex .tpv-ic { width: 12px; height: 12px; }

.tpv-line-ex { display: block; margin-top: 3px; font-size: .78rem; font-weight: 600; line-height: 1.3; color: #2F5BEA; }
/* v1.6.2 · Familias: renombrar, borrar y orden propio */
.tpv-fam-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 12px; padding: 8px 10px 8px 14px; border-radius: 14px; background: #F4F5FA; }
.tpv-fam-bar > span { flex: 1; min-width: 180px; font-size: .9rem; color: #585E7E; }
.tpv-fam-bar > span strong { color: #151A40; }
.tpv-btn-sm { min-height: 36px; padding: 6px 14px; font-size: .88rem; }
.tpv-btn.is-danger, .tpv-btn.is-danger .tpv-ic { color: var(--danger, #B42318); }
.tpv-btn-danger { background: var(--danger, #B42318); border-color: var(--danger, #B42318); color: #fff; }
.tpv-btn-danger .tpv-ic { color: #fff; }
.tpv-fam-modos { display: grid; gap: 10px; margin-top: 12px; }
.tpv-fam-modo { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid #E3E6F0; border-radius: 14px; cursor: pointer; }
.tpv-fam-modo:has(input:checked) { border-color: var(--tpv-blue); background: var(--tpv-blue-soft); }
.tpv-fam-modo input { margin-top: 3px; accent-color: var(--tpv-blue); }
.tpv-fam-modo > span { display: grid; gap: 6px; flex: 1; }
.tpv-fam-modo small { color: #585E7E; font-size: .82rem; }
.tpv-fam-modo select { min-height: 40px; border-radius: 10px; border: 1px solid #D5D9E6; padding: 0 10px; font: inherit; background: #fff; }
.tpv-orden-fila { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.tpv-orden-fila > span { width: 64px; font-size: .85rem; font-weight: 700; color: #585E7E; }
/* v1.7 · Pago mixto, facturas sin contar dos veces, enviar factura */
.tpv-pay-prog { height: 6px; margin: 10px 0 8px; border-radius: 999px; background: rgba(255,255,255,.18); overflow: hidden; }
.tpv-pay-prog i { display: block; height: 100%; border-radius: inherit; background: #34C38F; }
.tpv-pay-hechos { display: flex; flex-wrap: wrap; gap: 6px; }
.tpv-pay-hechos span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: .82rem; color: #fff; }
.tpv-pay-hechos span .tpv-ic { width: 14px; height: 14px; }
.tpv-pay-hechos span b { font-variant-numeric: tabular-nums; }
.tpv-pay-hechos span.is-total { background: transparent; padding-left: 0; color: var(--on-navy-2, #C4C9E4); }
.tpv-pay-quedara { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: #F4F5FA; color: #585E7E; font-size: .86rem; line-height: 1.4; }
.tpv-pay-quedara.is-on { background: #FFF4E5; color: #8A4B00; }
.tpv-pay-quedara b { color: inherit; font-variant-numeric: tabular-nums; }
.tpv-link-btn { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 8px; padding: 6px 0; border: 0; background: none; color: var(--tpv-blue, #2F5BEA); font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; }
.tpv-link-btn .tpv-ic { width: 15px; height: 15px; }
.tpv-fac-plantilla { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: #F4F5FA; margin-bottom: 8px; }
.tpv-fac-plantilla small { color: #585E7E; }
.tpv-fac-plantilla .tpv-btn { justify-self: start; }
.tpv-fac-form textarea, .tpv-fac-plantilla textarea { width: 100%; min-height: 96px; padding: 10px 12px; border: 1px solid #D5D9E6; border-radius: 12px; font: inherit; resize: vertical; box-sizing: border-box; }
.tpv-fac-form .tpv-field-full { grid-column: 1 / -1; }
.tpv-fac-plantilla[hidden] { display: none; }
