/* El teclado en pantalla (0.26.2) para las pantallas que no cargan la hoja de la caja (la entrada y la Gestión).
   Es el mismo de la caja: estas reglas son copia de las de /caja/estilos.css («teclados flotantes»); si se cambia uno,
   cambiar el otro. Los colores tienen valor por si la pantalla no define las variables de la caja. */
.teclado {
  position: fixed; z-index: 70; padding: 12px; border-radius: 22px; background: var(--grafito, #161B22);
  box-shadow: var(--sombra, 0 20px 48px rgba(18, 24, 32, .28));
  display: flex; flex-direction: column; gap: 8px; touch-action: none; user-select: none; font-family: var(--fuente, system-ui, sans-serif);
}
.teclado.numerico { width: 344px; }
.teclado.completo { width: 760px; max-width: calc(100vw - 16px); }
.teclado .barra-teclado { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.teclado .agarre {
  flex: 1; min-width: 0; height: 38px; border: 0; border-radius: 10px; background: var(--grafito2, #222934); color: var(--sobre-grafito2, #A9B4C2);
  cursor: grab; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; font-family: inherit;
}
.teclado .cerrar {
  height: 38px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--grafito2, #222934); color: var(--sobre-grafito, #F2F5F8);
  display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; font-family: inherit;
}
.teclado .visor { padding: 8px 14px 10px; border-radius: 14px; background: #0E1217; display: flex; flex-direction: column; gap: 2px; }
.teclado .visor .titulo { font-size: 13px; font-weight: 600; color: var(--sobre-grafito2, #A9B4C2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.teclado .visor .valor { min-height: 36px; font-size: 30px; font-weight: 800; line-height: 1.2; text-align: right; color: #fff; overflow: hidden; }
.teclado .visor .valor.vacio { color: #4A5464; }
.teclado .grilla-num { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 62px; gap: 8px; }
.teclado .fila { display: flex; gap: 8px; }
.teclado .tecla {
  border: 0; border-radius: 14px; background: var(--grafito3, #2B3340); color: #fff; font-size: 26px; font-weight: 700; min-width: 0;
  font-family: inherit; cursor: pointer;
}
.teclado .fila .tecla { border-radius: 12px; font-size: 22px; height: 56px; }
.teclado .fila.numeros .tecla { height: 46px; font-size: 18px; background: var(--grafito2, #222934); }
.teclado .tecla:active { background: var(--grafito4, #3A4352); transform: scale(.97); }
.teclado .tecla.gris { background: var(--grafito4, #3A4352); }
.teclado .tecla.verde { background: var(--verde, #0B7A46); font-size: 18px; }
.teclado .tecla.enter-num {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 0 4px; font-size: 15px; line-height: 1.1; text-align: center; white-space: nowrap; overflow: hidden;
}
.teclado .tecla.enter-num.chico { font-size: 13px; letter-spacing: -.2px; }
.teclado .tecla.azul, .teclado .tecla.activa { background: var(--azul, #1E5BB8); }
.teclado .tecla.fija { background: var(--azul, #1E5BB8); box-shadow: inset 0 -4px 0 #fff; }
.teclado .tecla.texto { font-size: 16px; }
.teclado .fila.dominios .tecla { height: 44px; font-size: 15px; background: var(--grafito2, #222934); padding: 0 4px; white-space: nowrap; overflow: hidden; }
@media (max-height: 820px) {
  .teclado { padding: 10px; gap: 6px; }
  .teclado .fila { gap: 6px; }
  .teclado .fila .tecla { height: 46px; font-size: 20px; }
  .teclado .fila.numeros .tecla { height: 38px; font-size: 17px; }
  .teclado .grilla-num { grid-auto-rows: 54px; gap: 7px; }
  .teclado .visor .valor { min-height: 30px; font-size: 26px; }
  .teclado .tecla.texto { font-size: 14px; }
}
/* el diálogo nunca queda debajo del teclado: se achica y hace scroll */
.capa .dialogo {
  max-height: calc(100vh - 8vh - 16px - var(--alto-teclado, 0px)); overflow: auto; overscroll-behavior: contain;
  transform: translateX(var(--correr-dialogo, 0px)); transition: transform .15s ease;
}
body.con-teclado .capa { padding-top: 12px; }
body.con-teclado .capa .dialogo { max-height: calc(100vh - 24px - var(--alto-teclado, 0px)); }
/* el selector Táctil / PC de la cabecera (el mismo ajuste que en la caja: por PC) */
.pn-modo { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--grafito2, #222934); flex: none; }
.pn-modo button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--sobre-grafito2, #A9B4C2);
  font: 700 14px var(--fuente, system-ui, sans-serif); cursor: pointer; }
.pn-modo button[aria-pressed="true"] { background: #fff; color: var(--tinta, #121820); }
@media (max-width: 640px) { .pn-modo { display: none; } }
/* con el teclado abierto, los avisos salen arriba (no tapan las teclas) */
body.con-teclado #pn-aviso { top: 76px; bottom: auto; }
