/* --- Apariencia: modo noche, estilo sólido, tamaño de letra, sin animaciones --- */
html[data-fuente='S'] body {
  zoom: 0.92;
}
html[data-fuente='L'] body {
  zoom: 1.12;
}
html[data-fuente='XL'] body {
  zoom: 1.25;
}
html[data-anim='no'] *,
html[data-anim='no'] *::before,
html[data-anim='no'] *::after {
  animation: none !important;
  transition: none !important;
}
/* sólido (sin cristal) */
html[data-estilo='solido'] * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html[data-estilo='solido'] body {
  background: var(--t0) !important;
}
html[data-estilo='solido'] {
  --glass: #fff;
  --glass-b: var(--line);
  --sh: 0 2px 8px rgba(0, 0, 0, 0.08);
}
html[data-estilo='solido'][data-modo='oscuro'] {
  --glass: #241b1e;
}
/* --- modo noche --- */
html[data-modo='oscuro'] {
  --bg: #151012;
  --card: #231a1d;
  --ink: #f4eaec;
  --mut: #b7a5aa;
  --line: rgba(255, 255, 255, 0.13);
  --glass: rgba(40, 29, 33, 0.78);
  --glass-b: rgba(255, 255, 255, 0.1);
  --sh: 0 10px 30px rgba(0, 0, 0, 0.45);
  --navy: var(--acc-t);
  --ok: #5fd08d;
  --okb: rgba(60, 170, 100, 0.22);
  --warn: #f0b24d;
  --warnb: rgba(230, 160, 40, 0.22);
  --bad: #ff8e8e;
  --badb: rgba(230, 70, 70, 0.25);
}
html[data-modo='oscuro'] body {
  color: var(--ink);
}
html[data-modo='oscuro'] body:not(.login) {
  background:
    radial-gradient(900px 500px at 8% -5%, var(--t1) 0, transparent 60%),
    radial-gradient(800px 500px at 100% 105%, var(--t2) 0, transparent 55%), var(--t0);
}
html[data-modo='oscuro'] button,
html[data-modo='oscuro'] .btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border-color: var(--line);
}
html[data-modo='oscuro'] button:hover,
html[data-modo='oscuro'] .btn:hover {
  background: rgba(255, 255, 255, 0.15);
}
html[data-modo='oscuro'] button.ok {
  color: #fff;
  background: var(--ok);
  border-color: var(--ok);
}
html[data-modo='oscuro'] button.primary,
html[data-modo='oscuro'] button.pri,
html[data-modo='oscuro'] .btn.primary {
  color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--acc) 85%, #fff 15%), var(--acc-d));
  border-color: transparent;
}
html[data-modo='oscuro'] button.danger,
html[data-modo='oscuro'] button.bad {
  color: #ff9a9a;
  background: rgba(255, 255, 255, 0.05);
}
html[data-modo='oscuro'] input,
html[data-modo='oscuro'] select,
html[data-modo='oscuro'] textarea {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.18);
}
html[data-modo='oscuro'] input::placeholder,
html[data-modo='oscuro'] textarea::placeholder {
  color: #8f7f84;
}
html[data-modo='oscuro'] option {
  background: #241b1e;
  color: var(--ink);
}
html[data-modo='oscuro'] .tablewrap,
html[data-modo='oscuro'] .card2,
html[data-modo='oscuro'] .kpi,
html[data-modo='oscuro'] .panel {
  color: var(--ink);
}
html[data-modo='oscuro'] td {
  border-top-color: var(--line);
}
html[data-modo='oscuro'] tr.row:hover td {
  background: rgba(255, 255, 255, 0.06);
}
html[data-modo='oscuro'] #modal {
  background: rgba(0, 0, 0, 0.6);
}
html[data-modo='oscuro'] #modal .card {
  background: rgba(36, 27, 30, 0.96);
  color: var(--ink);
}
html[data-modo='oscuro'] .neu {
  background: rgba(255, 255, 255, 0.12);
  color: var(--ink);
}
html[data-modo='oscuro'] .tile,
html[data-modo='oscuro'] .acc {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}
html[data-modo='oscuro'] .acc:hover {
  background: rgba(255, 255, 255, 0.13);
}
html[data-modo='oscuro'] .tile.has-img {
  color: #fff;
}
html[data-modo='oscuro'] .chip {
  background: rgba(255, 255, 255, 0.09);
  color: var(--ink);
}
html[data-modo='oscuro'] .chip.on {
  color: #fff;
}
html[data-modo='oscuro'] #mapwrap svg {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)) !important;
}
html[data-modo='oscuro'] .seg button {
  background: rgba(255, 255, 255, 0.08);
}
html[data-modo='oscuro'] .seg button.on {
  color: #fff;
}
html[data-modo='oscuro'] #calc {
  background: rgba(36, 27, 30, 0.92);
  border-color: var(--line);
}
html[data-modo='oscuro'] #calc .scr {
  background: rgba(255, 255, 255, 0.08);
}
html[data-modo='oscuro'] #calc .scr b {
  color: var(--ink);
}
html[data-modo='oscuro'] #calc .keys .op {
  background: rgba(255, 255, 255, 0.1);
  color: var(--acc-t);
}
html[data-modo='oscuro'] .fab.pos {
  background: #241b1e;
  color: var(--acc-t);
}
html[data-modo='oscuro'] .c {
  background: var(--glass) !important;
  color: var(--ink);
}
html[data-modo='oscuro'] .c label {
  color: var(--mut);
}
html[data-modo='oscuro'] body.login,
html[data-modo='oscuro'] body:has(.c) {
  background: var(--t0);
}
html[data-modo='oscuro'] .bar span,
html[data-modo='oscuro'] .kv {
  color: var(--ink);
}
html[data-modo='oscuro'] code {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 6px;
}
/* colores escritos dentro del código (tarjetas, alertas, barras) */
html[data-modo='oscuro'] [style*='rgba(255,235,238'] {
  background: rgba(255, 255, 255, 0.06) !important;
}
html[data-modo='oscuro'] [style*='#fff4e5'],
html[data-modo='oscuro'] [style*='#fff3cd'] {
  background: rgba(240, 178, 77, 0.14) !important;
  color: var(--ink);
}
html[data-modo='oscuro'] [style*='#f3c27a'],
html[data-modo='oscuro'] [style*='#f0d78c'] {
  border-color: rgba(240, 178, 77, 0.45) !important;
}
html[data-modo='oscuro'] [style*='#f0c4cc'],
html[data-modo='oscuro'] [style*='#f4dde1'] {
  border-color: var(--line) !important;
}
html[data-modo='oscuro'] [style*='background:#fff']:not(.ticket):not([style*='#fff4']):not([style*='#fff3']) {
  background: #241b1e !important;
  color: var(--ink);
}
html[data-modo='oscuro'] [style*='background:#eee'] {
  background: rgba(255, 255, 255, 0.14) !important;
}
html[data-modo='oscuro'] [style*='#e6f0ff'] {
  background: rgba(80, 140, 255, 0.18) !important;
  color: var(--ink);
}
html[data-modo='oscuro'] [style*='#e3f6e8'] {
  background: rgba(60, 170, 100, 0.2) !important;
  color: #8fe0b0 !important;
}
html[data-modo='oscuro'] [style*='#fde8e8'] {
  background: rgba(230, 70, 70, 0.2) !important;
  color: #ffadad !important;
}
html[data-modo='oscuro'] [style*='color:#a15c00'],
html[data-modo='oscuro'] [style*='color:#8a5a00'] {
  color: #f0b24d !important;
}
html[data-modo='oscuro'] [style*='color:#b3261e'],
html[data-modo='oscuro'] [style*='color:#d33'] {
  color: #ff8e8e !important;
}
html[data-modo='oscuro'] [style*='color:#14663a'] {
  color: #8fe0b0 !important;
}
/* botón de modo noche */
.fab.modo {
  font-size: 20px;
  background: #fff;
  color: #333;
  border: 2px solid var(--acc);
}
html[data-modo='oscuro'] .fab.modo {
  background: #241b1e;
  color: #ffd75e;
}

/* --- Modo fácil del POS (facil.js): oculta lo que no es del día a día; nada se borra --- */
#tabs .modo-btn {
  font-weight: 700;
}
body:not(.pos-facil) #tabs .solo-facil {
  display: none;
}
body.pos-facil #tabs > button:not(.facil-ve),
body.pos-facil #fabs,
body.pos-facil #calcbtn,
body.pos-facil #bar #clock,
body.pos-facil #bar [data-version],
body.pos-facil #bar a.adm {
  display: none !important;
}
.mas-lista {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.mas-lista button {
  min-height: 52px;
  font-size: 15px;
  text-align: left;
  padding: 10px 12px;
}
#barraCta {
  display: none;
}
@media (max-width: 1000px) {
  body.pos-facil #mapwrap {
    display: none !important;
  }
  body.pos-facil #barraCta {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 8; /* debajo de las ventanas (#modal z-index 9) */
    gap: 8px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: var(--glass, #fff);
    border-top: 1px solid var(--line, #ddd);
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  #barraCta button {
    min-height: 50px;
    font-size: 16px;
  }
  #barraCta .cta-ver {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
  }
  #barraCta .cta-cobrar {
    flex: 0 0 auto;
    min-width: 110px;
    font-weight: 700;
  }
  body.pos-facil main {
    padding-bottom: 84px !important;
  }
  /* completo en celular: que los botones flotantes no tapen «Cobrar» */
  body:not(.pos-facil) main {
    padding-bottom: 120px !important;
  }
}
@media (max-width: 1000px) {
  body.pos-facil #tabs {
    flex-wrap: wrap;
    overflow: visible;
    gap: 6px;
  }
  body.pos-facil #tabs button {
    padding: 8px 12px;
    white-space: nowrap;
  }
}
/* modo noche: el precio de los productos en un tono claro para que se lea sobre fondo oscuro */
html[data-modo='oscuro'] .tile:not(.sep) > span,
html[data-modo='oscuro'] .tile.sep .t-pre {
  color: color-mix(in srgb, var(--acc, #c62828) 50%, #fff);
}
/* los botones verdes (Cobrar, Confirmar cobro) no se vuelven blancos al pasar el mouse */
button.ok:not(:disabled):hover {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
  filter: brightness(1.07);
}
