/* Facturador e-CF — tema oscuro coherente con la web (web/styles.css), pensado para el celular.
   Letra grande, botones grandes, mucho contraste. Sin fuentes externas. */
:root {
  --bg: #05070d; --bg-2: #0a0f1a; --card: #0d1322; --card-2: #111a2c;
  --line: rgba(255,255,255,.10); --line-2: rgba(255,255,255,.18);
  --text: #eef2f8; --muted: #9aa6ba;
  --blue: #2f8cff; --cyan: #22d3ee; --green: #34d399; --violet: #a78bfa; --amber: #fbbf24; --red: #f87171;
  --radius: 14px;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", Consolas, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.5 var(--sans); padding-bottom: 84px; }
a { color: var(--cyan); }
h1 { font-size: 1.55rem; margin: .2em 0 .6em; }
h2 { font-size: 1.2rem; margin: 1.2em 0 .5em; }
.wrap { width: min(860px, 100% - 24px); margin-inline: auto; }
.muted { color: var(--muted); } .small { font-size: .88rem; } .right { text-align: right; } .center { text-align: center; }
.mono { font-family: var(--mono); }

/* barra superior */
.top { position: sticky; top: 0; z-index: 10; background: rgba(5,7,13,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 10px; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-decoration: none; }
.brand__mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--blue), var(--cyan)); box-shadow: 0 0 16px rgba(34,211,238,.4); color: #fff; }
.top__emp { margin-left: auto; color: var(--muted); font-size: .85rem; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.demo-badge { font: 700 .7rem var(--mono); letter-spacing: .08em; color: #1a1300; background: var(--amber); padding: 3px 8px; border-radius: 999px; }

/* navegación inferior (móvil) */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr); background: #070b14; border-top: 1px solid var(--line-2); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 2px 10px; color: var(--muted); text-decoration: none; font-size: .78rem; }
.tabs a .ic { font-size: 1.35rem; line-height: 1; }
.tabs a.on { color: var(--cyan); }
.tabs a.vender .ic { display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #fff; box-shadow: 0 6px 20px rgba(47,140,255,.5); }

/* tarjetas */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.stat b { display: block; font-size: 1.3rem; }
.stat span { color: var(--muted); font-size: .85rem; }

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; border-radius: 12px; border: 0; cursor: pointer; font: 600 1rem var(--sans); color: #fff; text-decoration: none; background: linear-gradient(135deg, #2f8cff, #1e6bff); box-shadow: 0 6px 20px rgba(47,140,255,.3); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; border: 1px solid var(--line-2); box-shadow: none; color: var(--text); }
.btn--wa { background: linear-gradient(135deg, #25d366, #128c7e); box-shadow: 0 6px 20px rgba(37,211,102,.25); }
.btn--red { background: transparent; border: 1px solid rgba(248,113,113,.5); color: var(--red); box-shadow: none; }
.btn--big { width: 100%; min-height: 60px; font-size: 1.15rem; }
.btn--block { width: 100%; }
.btn--sm { min-height: 38px; padding: 7px 14px; font-size: .9rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1; }

/* formularios */
label { display: block; font-weight: 600; margin: 12px 0 5px; }
label .muted { font-weight: 400; }
input, select, textarea { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: 1.05rem var(--sans); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
input[type=checkbox] { width: 24px; min-height: 24px; height: 24px; vertical-align: middle; accent-color: var(--blue); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }

/* segmentos (E32 / E31) */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg input { display: none; }
.seg label { margin: 0; text-align: center; padding: 14px 8px; border-radius: 12px; border: 2px solid var(--line-2); background: var(--card-2); cursor: pointer; font-weight: 700; }
.seg label small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.seg input:checked + label { border-color: var(--cyan); background: rgba(34,211,238,.10); }

/* listas */
.list { list-style: none; padding: 0; margin: 0; }
.list li { border-bottom: 1px solid var(--line); }
.list a.item, .list .item { display: flex; gap: 10px; align-items: center; padding: 13px 4px; color: var(--text); text-decoration: none; }
.item .grow { flex: 1; min-width: 0; }
.item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { color: var(--muted); font-size: .85rem; }

/* chips de estado */
.chip { display: inline-block; font: 700 .72rem var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.chip--ACEPTADO { color: var(--green); border-color: rgba(52,211,153,.5); background: rgba(52,211,153,.10); }
.chip--ACEPTADO_CONDICIONAL { color: var(--amber); border-color: rgba(251,191,36,.5); background: rgba(251,191,36,.08); }
.chip--EN_PROCESO, .chip--BORRADOR { color: #9cc8ff; border-color: rgba(47,140,255,.5); background: rgba(47,140,255,.10); }
.chip--RECHAZADO, .chip--ERROR_VALIDACION, .chip--ERROR_TECNICO { color: var(--red); border-color: rgba(248,113,113,.5); background: rgba(248,113,113,.10); }
.chip--e31 { color: var(--violet); border-color: rgba(167,139,250,.45); }

/* mensajes */
.flash { padding: 12px 14px; border-radius: 12px; margin: 10px 0; border: 1px solid; }
.flash--ok { border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.08); }
.flash--error { border-color: rgba(248,113,113,.5); background: rgba(248,113,113,.10); }
.flash--aviso { border-color: rgba(251,191,36,.5); background: rgba(251,191,36,.08); }
.banner-demo { margin: 10px 0; padding: 10px 14px; border-radius: 12px; border: 1px dashed rgba(251,191,36,.6); color: var(--amber); font-size: .9rem; }

/* vender */
.buscador { position: sticky; top: 56px; z-index: 5; background: var(--bg); padding: 8px 0; }
.prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 330px; overflow-y: auto; padding: 2px; }
.prod { text-align: left; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; color: var(--text); font: inherit; cursor: pointer; min-height: 74px; }
.prod:active, .prod.flash-add { border-color: var(--cyan); background: rgba(34,211,238,.12); }
.prod b { display: block; font-size: .93rem; line-height: 1.25; }
.prod span { color: var(--cyan); font-size: .9rem; }
.prod small { color: var(--muted); }
.carrito .ln { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.carrito .ln .d { font-weight: 600; }
.carrito .ln .p { color: var(--muted); font-size: .85rem; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font-size: 1.3rem; cursor: pointer; }
.qty input { width: 76px; min-height: 42px; text-align: center; padding: 6px; }
.totales { font-size: 1rem; }
.totales div { display: flex; justify-content: space-between; padding: 3px 0; }
.totales .gran { font-size: 1.45rem; font-weight: 800; border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 8px; }
.barra-cobro { position: sticky; bottom: 84px; z-index: 6; background: rgba(5,7,13,.96); padding: 10px 0; border-top: 1px solid var(--line); }

table.tabla { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tabla th, .tabla td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.tabla td.n, .tabla th.n { text-align: right; white-space: nowrap; }
details summary { cursor: pointer; color: var(--muted); }

/* menú de usuario (arriba a la derecha) */
.top__emp { margin-left: auto; }
.menu-usuario { position: relative; }
.menu-usuario > summary { list-style: none; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 10px; color: var(--text); white-space: nowrap; }
.menu-usuario > summary::-webkit-details-marker { display: none; }
.menu-usuario__panel { position: absolute; right: 0; top: 44px; z-index: 20; min-width: 230px; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.menu-usuario__panel a { display: block; padding: 9px 6px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.menu-usuario__panel form { margin-top: 8px; }

/* inventario, caja y alta */
.chip--bajo { color: var(--amber); border-color: rgba(251,191,36,.5); background: rgba(251,191,36,.08); }
.chip--ok { color: var(--green); border-color: rgba(52,211,153,.5); }
.chip--34 { color: var(--violet); border-color: rgba(167,139,250,.45); }
.progreso { height: 12px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.progreso > span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.paso { display: flex; gap: 12px; align-items: flex-start; }
.paso__n { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line-2); font-weight: 800; }
.paso--hecho .paso__n { border-color: var(--green); color: var(--green); background: rgba(52,211,153,.10); }
.por-confirmar { color: var(--amber); font-weight: 600; }
.cifra-dif-neg { color: var(--red); } .cifra-dif-pos { color: var(--amber); } .cifra-dif-ok { color: var(--green); }

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabs { position: sticky; top: 56px; bottom: auto; grid-template-columns: repeat(5, max-content); justify-content: center; gap: 14px; border-top: 0; border-bottom: 1px solid var(--line); background: var(--bg); }
  .tabs a { flex-direction: row; gap: 6px; font-size: .95rem; }
  .tabs a.vender .ic { width: 28px; height: 28px; margin-top: 0; font-size: 1rem; }
  .barra-cobro { bottom: 0; }
}
.prod small.bajo { color: var(--amber); font-weight: 700; }

/* --- dashboard del dueño (t-587b86) --- */
.tabs a.solo-escritorio { display: none; }
.dash-cab { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; justify-content: space-between; margin-top: 10px; }
.filtro { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; overflow-x: auto; max-width: 100%; }
.filtro a { padding: 8px 12px; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: .88rem; white-space: nowrap; }
.filtro a.on { background: rgba(34,211,238,.12); color: var(--cyan); font-weight: 600; }
.accesos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0; }
.acceso { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.acceso span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--card-2); flex: none; }
.acceso--main { background: linear-gradient(135deg, #2f8cff, #1e6bff); border-color: transparent; }
.acceso--main span { background: rgba(255,255,255,.18); }
.dash { display: grid; grid-template-columns: 1fr; gap: 12px; }
.kpi { background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--text); text-decoration: none; min-width: 0; }
.kpi--link:hover { border-color: var(--line-2); }
.kpi__t { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.kpi__t .chip { text-transform: none; font-size: .65rem; padding: 2px 6px; }
.kpi__v { font-size: 1.6rem; font-weight: 800; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi__s { font-size: .9rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kpi__p { color: var(--muted); font-size: .8rem; margin-top: 4px; }
.var { font: 700 .78rem var(--mono); padding: 2px 7px; border-radius: 999px; }
.var--up { color: var(--green); background: rgba(52,211,153,.12); }
.var--down { color: var(--red); background: rgba(248,113,113,.12); }
.var--nd { color: var(--muted); background: var(--bg-2); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.panel__cab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.panel h2 { font-size: 1.02rem; margin: 0; }
.panel h3 { font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 4px 0 6px; }
.graf { width: 100%; height: 190px; display: block; }
.graf__guia { stroke: rgba(255,255,255,.07); stroke-width: 1; }
.graf__eje { fill: var(--muted); font-size: 8px; text-anchor: middle; font-family: var(--sans); }
.graf rect:hover { opacity: .75; }
.hbar { margin: 8px 0; }
.hbar__l { display: flex; justify-content: space-between; font-size: .9rem; gap: 8px; }
.hbar__b { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; margin-top: 4px; }
.hbar__b span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.dos-col { display: grid; grid-template-columns: 1fr; gap: 12px; }
.fila-top { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.fila-top .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); text-decoration: none; }
.fila-top .n { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 6px; background: var(--card-2); font-size: .75rem; color: var(--muted); }
.estados { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.estado { display: flex; flex-direction: column; padding: 10px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--muted); font-size: .78rem; }
.estado b { font-size: 1.4rem; color: var(--text); }
.estado--ok b { color: var(--green); } .estado--proc b { color: #9cc8ff; } .estado--mal b { color: var(--red); }
@media (min-width: 640px) {
  .dash { grid-template-columns: repeat(2, 1fr); }
  .accesos { grid-template-columns: repeat(4, 1fr); }
  .dos-col { grid-template-columns: 1fr 1fr; }
  .span-2, .span-3 { grid-column: 1 / -1; }
}
@media (min-width: 900px) and (max-width: 1023px) {
  .tabs { grid-template-columns: none; grid-auto-flow: column; }
}
@media (min-width: 1024px) {
  .tabs { position: fixed; top: 56px; left: 0; bottom: 0; width: 210px; display: flex; flex-direction: column; justify-content: flex-start;
          gap: 2px; padding: 14px 10px; border: 0; border-right: 1px solid var(--line); background: var(--bg-2); overflow-y: auto; }
  .tabs a, .tabs a.solo-escritorio { display: flex; flex-direction: row; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: .95rem; color: var(--muted); }
  .tabs a:hover { background: rgba(255,255,255,.04); color: var(--text); }
  .tabs a.on { background: rgba(34,211,238,.10); color: var(--cyan); }
  .tabs a .ic { width: 22px; text-align: center; font-size: 1.05rem; }
  .tabs a.vender { margin: 6px 0; background: linear-gradient(135deg, #2f8cff, #1e6bff); color: #fff; }
  .tabs a.vender .ic { width: 22px; height: auto; margin: 0; background: none; box-shadow: none; font-size: 1.05rem; }
  .tabs ~ main.wrap { width: auto; max-width: 900px; margin-left: 234px; margin-right: 24px; }
  .tabs ~ main.wrap--ancho { max-width: 1440px; }
  .dash { grid-template-columns: repeat(4, 1fr); }
  .span-2 { grid-column: span 2; }
  .span-3 { grid-column: span 3; }
}

/* ===================== Botón de tema + TEMA CLARO ===================== */
.tema-btn {
  margin-left: auto; flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: var(--text);
  font-size: 1.1rem; cursor: pointer; padding: 0;
}
.top__emp + .tema-btn { margin-left: 6px; }
.tema-btn:hover { border-color: var(--cyan); }
.tema-btn__luna { display: none; }
html[data-tema="claro"] .tema-btn__sol { display: none; }
html[data-tema="claro"] .tema-btn__luna { display: inline; }

html[data-tema="claro"] {
  --bg: #f4f6fb; --bg-2: #ffffff; --card: #ffffff; --card-2: #f7f9fd;
  --line: rgba(15,23,42,.10); --line-2: rgba(15,23,42,.18);
  --text: #0f172a; --muted: #5b6780;
  --blue: #1e6bff; --cyan: #0284c7; --green: #059669; --violet: #7c3aed; --amber: #b45309; --red: #dc2626;
  color-scheme: light;
}
html[data-tema="claro"] body { background: var(--bg); }
html[data-tema="claro"] .top { background: rgba(255,255,255,.92); }
html[data-tema="claro"] .tabs { background: #ffffff; box-shadow: 0 -4px 18px rgba(15,23,42,.06); }
html[data-tema="claro"] .tabs a:hover { background: rgba(15,23,42,.04); }
html[data-tema="claro"] .tabs a.on { background: rgba(2,132,199,.10); }
html[data-tema="claro"] .tabs a.vender, html[data-tema="claro"] .tabs a.vender .ic { color: #fff; }
html[data-tema="claro"] .barra-cobro { background: rgba(244,246,251,.96); }
html[data-tema="claro"] .card, html[data-tema="claro"] .stat { box-shadow: 0 1px 3px rgba(15,23,42,.06); }
html[data-tema="claro"] .menu-usuario__panel { box-shadow: 0 10px 30px rgba(15,23,42,.15); }
html[data-tema="claro"] .demo-badge { color: #1a1300; background: #fbbf24; }
html[data-tema="claro"] .banner-demo { border-color: rgba(180,83,9,.5); background: rgba(251,191,36,.10); }
html[data-tema="claro"] .chip--EN_PROCESO, html[data-tema="claro"] .chip--BORRADOR,
html[data-tema="claro"] .estado--proc b { color: #1d4ed8; }
html[data-tema="claro"] .graf__guia { stroke: rgba(15,23,42,.08); }
html[data-tema="claro"] .btn--ghost { color: var(--text); }
html[data-tema="claro"] input::placeholder, html[data-tema="claro"] textarea::placeholder { color: #94a3b8; }
html[data-tema="claro"] select option { background: #ffffff; color: #0f172a; }

/* --- efectivo recibido y devuelta en Vender (t-ebfd31); solo variables -> sirve en tema oscuro y claro --- */
.efectivo { margin-top: 10px; padding: 12px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--card-2); }
.efectivo label { margin-top: 0; }
.efectivo input { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rapidos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rapido { min-height: 42px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: 600 .95rem var(--sans); cursor: pointer; }
.rapido:active { border-color: var(--cyan); }
.devuelta { margin-top: 10px; font-size: 1.6rem; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; min-height: 1.4em; }
.devuelta--ok { color: var(--green); }
.devuelta--falta { color: var(--red); }
.totales .devuelta-fila { font-weight: 800; color: var(--green); }

/* --- entradas y salidas de efectivo (t-406a4a); solo variables -> tema oscuro y claro --- */
.mov-botones { margin: 8px 0; }
.mov-form h3 { font-size: 1rem; }
.mov-form--salida { border-color: var(--red); }
.mov-form--entrada { border-color: var(--green); }
.mov-confirma { margin-top: 8px; padding: 10px; border-radius: 10px; border: 1px dashed var(--line-2); background: var(--card-2); }
.mov-sal { color: var(--red); } .mov-ent { color: var(--green); }
.mov-ok { color: var(--green); font-weight: 600; } .mov-pend { color: var(--amber); font-weight: 600; }
.mov--anulado { opacity: .55; } .mov--anulado .t, .mov--anulado b { text-decoration: line-through; }

/* mis retiros (t-059611) */
.aviso-firma ul { color: var(--text); }
#mis-retiros .fila-top a.small { flex: none; }

/* panel admin (t-957f25) */
.chip-estado--activo { color: var(--green); border-color: var(--green); }
.chip-estado--prueba { color: var(--cyan); border-color: var(--cyan); }
.chip-estado--pendiente { color: var(--amber); border-color: var(--amber); }
.chip-estado--suspendido { color: var(--red); border-color: var(--red); }
.negocio--suspendido { border-color: var(--red); }
.negocio--pendiente { border-color: var(--amber); }

/* datos en vivo (t-957f25) */
.vivo-aviso { position: fixed; right: 16px; bottom: 96px; z-index: 50; max-width: 320px; padding: 12px 16px; border-radius: 12px; background: var(--card); color: var(--text); border: 1px solid var(--green); box-shadow: 0 10px 30px rgba(0,0,0,.35); text-decoration: none; font-weight: 700; transform: translateY(20px); opacity: 0; pointer-events: none; transition: .25s; }
.vivo-aviso--on { transform: none; opacity: 1; pointer-events: auto; }
.vivo-cambio { animation: vivo-flash 1.5s; }
@keyframes vivo-flash { from { color: var(--green); } }
@media (min-width: 1024px) { .vivo-aviso { bottom: 24px; } }

/* logo Kuadra según tema (t-957f25) */
.brand--logo { display: inline-flex; align-items: center; }
.brand--logo .logo { display: block; height: 30px; width: auto; }
.logo--claro { display: none !important; }
html[data-tema="claro"] .logo--oscuro { display: none !important; }
html[data-tema="claro"] .logo--claro { display: block !important; }
.logo-login { display: block; height: 52px; width: auto; margin: 14px 0 6px; }

/* --- PWA y ventas sin conexión (t-957f25 §4) --- */
.estado-red { font-size: .78rem; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); text-decoration: none; white-space: nowrap; }
.estado-red--on { color: var(--green); border-color: var(--green); }
.estado-red--off { color: var(--red); border-color: var(--red); font-weight: 700; }
.estado-red--pend { color: var(--amber); border-color: var(--amber); font-weight: 700; }
.instalar-btn { min-height: 32px; padding: 4px 10px; }
.pend-pendiente { color: var(--amber); } .pend-subida { color: var(--green); } .pend-error { color: var(--red); }
@media (max-width: 640px) { .estado-red { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; } .instalar-btn { display: none; } }
#ticket-provisional { display: none; }
@media print {
  body.imprimiendo-provisional > *:not(#ticket-provisional) { display: none !important; }
  body.imprimiendo-provisional { background: #fff !important; padding: 0 !important; }
  body.imprimiendo-provisional #ticket-provisional { display: block !important; }
  @page { margin: 0; }
}
#ticket-provisional .tp { width: 72mm; margin: 0 auto; padding: 3mm; color: #000; background: #fff; font: 12px/1.35 "Segoe UI", Arial, sans-serif; }
#ticket-provisional .tp-aviso { border: 2px solid #000; font-weight: 800; text-align: center; padding: 6px; margin: 6px 0; font-size: 13px; }
#ticket-provisional table { width: 100%; border-collapse: collapse; margin: 6px 0; border-top: 1px dashed #000; border-bottom: 1px dashed #000; }
#ticket-provisional td { padding: 2px 0; vertical-align: top; } #ticket-provisional .r { text-align: right; white-space: nowrap; }
#ticket-provisional .c { text-align: center; } #ticket-provisional .fila { display: flex; justify-content: space-between; }
#ticket-provisional .g { font-size: 1.3em; font-weight: 800; } #ticket-provisional .small { font-size: 11px; }

/* t-714d8e: campo trampa del registro (invisible para personas) y QR del 2FA */
.campo-trampa { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.qr-2fa svg { width: 220px; height: 220px; background: #fff; padding: 8px; border-radius: 8px; display: block; }

/* --- t-714d8e: ajustes visuales vistos en navegador --- */
/* Top productos: la cantidad y su unidad nunca se cortan; la descripción cede espacio */
.fila-top b { flex: none; white-space: nowrap; text-align: right; }
.dos-col { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
/* Móvil estrecho: barra superior sin nombre del negocio e indicador de conexión como punto de color */
@media (max-width: 430px) {
  .top__in { gap: 6px; }
  .top__emp { display: none !important; }
  .demo-badge { padding: 2px 6px; }
  .estado-red { font-size: 0; width: 14px; height: 14px; min-width: 14px; padding: 0; border-radius: 50%; border-width: 2px; margin-left: auto; overflow: hidden; }
  .estado-red--on { background: var(--green); }
  .estado-red--off { background: var(--red); }
  .estado-red--pend { background: var(--amber); }
  .brand--logo .logo { height: 24px; }
  .menu-usuario > summary .small { display: none; }
}
