/* General */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: sans-serif;
  background: yellow;
}

/* Control de visibilidad */
.pantalla {
  width: 100vw;
  height: 100vh;
  display: none;
  position: absolute;
  top: 0;
  left: 0;
}

.visible {
  display: flex !important;
}

#formLogin.visible {
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.oculto {
  display: none !important;
}
#FrmMesas {
  background: #f5f5f5;
  padding: 20px;
  box-sizing: border-box;
}
/* -------------------------- */
/* Login */
/* -------------------------- */
#formLogin {
  background: #fff8dc;
}

#loginDisplay {
  font-size: 2.5em;
  margin-bottom: 20px;
  padding: 10px;
  min-width: 240px;
  text-align: center;
  border: 2px solid #444;
  border-radius: 8px;
  background: #ffffff;
}

#calculadora {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.teclado {
  display: grid;
  grid-template-columns: repeat(3, 80px);
  gap: 10px;
}

.teclado button, .acciones button {
  padding: 20px;
  font-size: 1.5em;
  cursor: pointer;
  border-radius: 6px;
  border: none;
  background-color: #4CAF50;
  color: white;
  transition: background-color 0.3s;
}

.teclado button:hover, .acciones button:hover {
  background-color: #45a049;
}

.acciones {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* -------------------------- */
/* Principal */
/* -------------------------- */
#formPrincipal {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

/* Lado izquierdo */
#formIzquierdo {
  width: 30%;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #ccc;
  box-sizing: border-box;
}

#formTicket {
  height: 60%;
  background: #ffffff;
  border-bottom: 1px solid #ccc;
  padding: 10px;
  box-sizing: border-box;
}

#formBotones {
  display: flex;
  flex-direction: column;
  padding: 10px;
  height: 40%;
  box-sizing: border-box;
  background: #fafafa;
}

.botones-contenido {
  display: flex;
  flex-direction: row;
  flex-grow: 1;
  gap: 10px;
  height: 100%;
}

/* Grid de botones */
#botonesGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  flex-grow: 1;
  width: 55%; /* ocupa el 55% */
}

/* Label de monedas a la derecha */
#lblMonedas {
  width: 45%;
  font-size: 1.2em;
  font-weight: bold;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
}
#lblMonedasCaja {
  width: 45%;
  font-size: 1.2em;
  font-weight: bold;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
}

/* ---------- NUEVAS REGLAS PARA FORM DERECHO --------- */

#formDerecho {
  width: 70%;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 10px;
  overflow: hidden; /* evitar que crezca */
  background: #fff3e0; /* mismo fondo naranja claro */
}

/* Dividir formDerecho verticalmente en 2 */
#formFamilias {
  flex: 1 1 20%;
  overflow-y: auto;
  background: #fff3e0;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  box-sizing: border-box;
  min-height: 0; /* para que flex con scroll funcione bien */
  height: auto; /* que tome el espacio definido por flex */
}#formArticulos {
  flex: 1 1 80%;
  overflow-y: auto;
  background: #fff3e0;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  box-sizing: border-box;
  min-height: 0; /* para que flex con scroll funcione bien */
  height: auto; /* que tome el espacio definido por flex */
}

/* Botones familias */
#formFamilias button {
  flex: 1 0 calc(16.66% - 8px); /* 6 botones por fila */
  min-width: 100px;
  height: 40px; /* altura fija */
  background-color: black;
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

#formFamilias button:hover {
  background-color: #e67300;
}

/* Botones artículos */
#formArticulos {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px 8px;            /* ajusta a tu gusto */
  padding: 10px;
  box-sizing: border-box;
  overflow-y: auto;
  background: #fff3e0;

  /* Clave para que las filas queden una justo debajo de otra */
  align-content: start;     /* o place-content: start; */
  justify-content: start;   /* opcional, por si acaso */
}

#formArticulos button {
  height: 40px;
  width: 100%;
  background-color: orange;
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;

  margin: 0; /* evita márgenes del UA que puedan sumar espacio */
}

#formArticulos button:hover {
  background-color: #e67300;
}

#contenidoMesas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  padding: 20px;
}

/* Contenedor principal de mesas */
#contenidoMesas {
  display: grid;
 width: 100%;      /* Ocupa todo el ancho del contenedor */
  max-width: 100%;  /* No limitar su tamaño máximo */
  padding: 20px;    /* Si quieres espacio interno */
  box-sizing: border-box; /* Incluye padding dentro del ancho total */
}

/* Sección de cada rango */
.rango-section {
  background: #fff8e1;
  border-radius: 8px;
  padding: 10px;
}

/* Header del rango */
.rango-section h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  color: #333;
}

/* Grid interno de mesas */
/* Grid interno de mesas */
.grid-mesas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* Cada botón mínimo 120px, y se expanden uniformemente */
  gap: 10px;
}

/* Botones de mesa */
.btn-mesa-rango {
  background: orange;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  height: 50px;
  cursor: pointer;
  transition: background-color 0.3s;
  width: 100%; /* Ocupa toda la celda del grid */
}


.btn-mesa-rango:hover {
  background-color: #e67300;
}
.btn-mesa-libre {
    background: green;
    color: white;
height: 50px;
}

.btn-mesa-ocupada {
    background: yellow;
    color: black;
height: 50px;
}
#FormCobro {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%; /* ocupa toda la pantalla */
    background: #f8f8f8;
    border-top: 2px solid #ccc;
    padding: 20px;
    box-sizing: border-box;
    display: none; /* inicialmente invisible */
    z-index: 9999; /* encima de todo */

    display: flex;  
    justify-content: center;  
    align-items: center;  
}

.grid-cobro {
    display: grid;
    grid-template-columns: repeat(5, 120px); /* 5 columnas */
    grid-template-rows: repeat(3, 160px);   /* 3 filas */
    gap: 20px;
    justify-content: center; /* centrado horizontal */
    align-content: center;   /* centrado vertical */
    height:400px;
    width:70%;
}

.cobro-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cmd_moneda_menos {
    width: 60px;
    height: 40px;
    font-size: 20px;
    margin-bottom: 5px;
}

.Lbl_moneda_caption {
    font-size: 18px;
    margin-bottom: 5px;
    text-align: center;
}

.Cmd_billete {
    width: 5-0px; 
    height: 20px; 
    font-size: 18px;
    background: #ddd;
    border: 1px solid #aaa;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
}
h2, h3 {
  text-align: left;
  margin-bottom: 10px;
}



.contenedor-cobro {
  display: flex;
  flex-direction: row;   /* 👈 uno al lado del otro */
  justify-content: space-around;
  align-items: flex-start;
  gap: 20px;
  height: 100%;
margin-left: 100px; 
}

.bloque {
  flex: 1;             /* 👈 cada bloque ocupa el mismo ancho */
  min-width: 250px;    /* 👈 evita que se encojan demasiado */
    margin-left: 100px;
}
.bloque1 {
  flex: 1;             /* 👈 cada bloque ocupa el mismo ancho */
  min-width: 250px;    /* 👈 evita que se encojan demasiado */
    
}
.grid-cobro {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  height:500Px;
  
}

.teclado {
    display: grid;
    grid-template-columns: repeat(4, 50px); /* 4 columnas, ajustable */
    gap: 8px;
    justify-content: start; /* alineación al inicio */
}

.teclado button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid #888;
    background-color: #fff; /* fondo blanco */
    color: #000;            /* texto negro visible */
    font-size: 18px;        
    cursor: pointer;
    display: flex;          
    align-items: center;    
    justify-content: center;
    box-sizing: border-box; 
    transition: background 0.2s, transform 0.1s;
}

.teclado button:hover {
    background-color: #ccc;
    transform: scale(1.1);
}

.teclado button:active {
    background-color: #bbb;
    transform: scale(0.95);
}

#lblChequesOp, #lblVisaOp {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    width: 100px;
    text-align: left;
    background-color: #f0f0f0;
    padding: 5px 8px;
    border-radius: 6px;
}





.total-container {
  display: flex;
  flex-direction: row;   /* 👈 en fila */
  gap: 20px;             /* 👈 separación entre labels */
  align-items: center;  
}

#lblTotal {
  display: block;
  margin-top: 10px;
  font-size: 26px;
  color: #333;
}

.acciones {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.acciones button {
  padding: 15px 40px;
  font-size: 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

#btnCancelar {
  background: #d9534f;
  color: white;
}

#btnAceptar {
  background: #5cb85c;
  color: white;
}

.acciones button:hover {
  opacity: 0.85;
}
#lblFalta, #lblSobra {
  display: block;
  margin-top: 5px;
  font-size: 16px;
  color: #d9534f; /* rojo para destacar que falta pagar */
}

.ticket-item {
  padding: 6px;
  margin: 2px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}

.ticket-item:hover {
  background-color: #f0f0f0;
}

.ticket-item.selected {
  background-color: #007bff !important;
  color: white !important;
  font-weight: bold;
}
.acciones-cambio {
  display: flex;
  justify-content: center;   /* 👈 centra horizontal */
  align-items: center;       /* 👈 centra vertical */
  gap: 30px;                 /* 👈 espacio entre botones */
  height: 100%;              /* 👈 ocupa toda la altura del contenedor */
}
#FormCambio {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f5f5f5;
  padding: 10px;
  box-sizing: border-box;
  display: none;        /* 👈 oculto por defecto */
  overflow-x: auto;     /* 👈 scroll si no entra */
  z-index: 9999;
}
#FormCaja {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f5f5f5;
  padding: 10px;
  box-sizing: border-box;
  display: none;        /* 👈 oculto por defecto */
  overflow-x: auto;     /* 👈 scroll si no entra */
  z-index: 9999;
}
.contenedor-cambio {
  display: flex;
  flex-direction: row;   /* 👈 bloques en fila */
  justify-content: space-around;
  align-items: flex-start;
  gap: 20px;
  height: 100%;
}

.bloque-cambio {
  flex: 1;               /* 👈 ocupa el mismo ancho */
  min-width: 250px;      /* 👈 evita que se encoja demasiado */
}

.grid-cambio {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 👈 5 columnas */
  gap: 10px;
}

.cambio-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.Cmd_cambio_billete {
  background: #e3e3e3;
  border: 1px solid #aaa;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
}

.cmd_cambio_menos {
  background: #ffcccc;
  border: 1px solid #cc0000;
  border-radius: 6px;
  font-size: 18px;
  width: 40px;
  cursor: pointer;
}

.Lbl_cambio_caption {
  font-size: 18px;
  font-weight: bold;
}

.acciones-cambio button {
  padding: 20px 40px;        /* 👈 tamaño grande */
  font-size: 20px;           /* 👈 texto grande */
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: #4CAF50;       /* 👈 verde bonito */
  color: white;
  transition: 0.2s;
}

.acciones-cambio button:hover {
  background: #45a049;       /* 👈 efecto hover */
}
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  color: #fff;
  z-index: 9999;
  opacity: 0.9;
}
.toast-exito { background: #28a745; }  /* verde */
.toast-error { background: #dc3545; }  /* rojo */

