/* ===== PLANO INTERACTIVO DE MESAS ===== */
#planoCanvas {
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  position: relative;
  min-height: 600px;
}
#planoCanvas::-webkit-scrollbar { width: 6px; height: 6px; }
#planoCanvas::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

.mesa-plano {
  position: absolute;
  cursor: move;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 3px solid #86efac;
  background: rgba(134,239,172,0.12);
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  z-index: 10;
  overflow: hidden;
  text-align: center;
  line-height: 1.2;
  padding: 2px;
  box-sizing: border-box;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.mesa-plano:hover {
  box-shadow: 0 0 0 3px rgba(59,130,246,0.4);
  z-index: 20;
}
.mesa-plano:active { cursor: grabbing; }
.mesa-plano.ocupada {
  border-color: #fb923c;
  background: rgba(251,146,60,0.10);
}
.mesa-plano.seleccionada {
  box-shadow: 0 0 0 3px #3b82f6 !important;
  border-color: #3b82f6 !important;
  z-index: 30 !important;
}
.mesa-plano .mesa-numero {
  font-size: clamp(14px, 3vw, 24px);
  font-weight: 800;
  pointer-events: none;
}
.mesa-plano .mesa-nombre {
  font-size: 10px;
  font-weight: 400;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95%;
  pointer-events: none;
}
.mesa-plano .mesa-total {
  font-size: 10px;
  font-weight: 700;
  color: #dc2626;
  pointer-events: none;
}
.mesa-plano.forma-redonda { border-radius: 50%; }
.mesa-plano.forma-rectangular { border-radius: 6px; }
@media (max-width: 768px) {
  #planoSidebar {
    position: fixed; bottom: 0; left: 0; right: 0;
    width: 100%; z-index: 1000;
    border-radius: 12px 12px 0 0;
    max-height: 60vh; overflow-y: auto;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  }
  #planoCanvas { min-height: 350px; }
}
