* { box-sizing: border-box; }
body {
  font-family: system-ui, -apple-system, sans-serif;
  max-width: 1000px;
  margin: 40px auto;
  padding: 20px;
  background: #f5f5f5;
}
h1 { color: #333; margin-bottom: 20px; }
h3 { margin: 15px 0 10px; color: #555; }
.connection { display: flex; gap: 15px; margin-bottom: 15px; }
.form-group { margin-bottom: 15px; }
label { font-weight: 600; }
input, select, textarea {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}
select { min-width: 200px; }
button {
  background: #0066cc;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  margin-right: 10px;
}
button:hover { background: #0055aa; }
button:disabled { background: #999; cursor: not-allowed; }
button.secondary { background: #666; }
button.secondary:hover { background: #555; }
.actions { margin: 20px 0; }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel {
  background: white;
  border-radius: 4px;
  border: 1px solid #ddd;
  padding: 15px;
}
pre {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 15px;
  border-radius: 4px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
  font-size: 12px;
}
.status { font-weight: 600; margin-bottom: 10px; }
.status.success { color: #28a745; }
.status.error { color: #dc3545; }
.hidden { display: none; }
.item-row {
  display: grid;
  grid-template-columns: 80px 1fr 50px 80px 60px 60px auto;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.item-row input { width: 100%; }
.item-row select { width: 100%; min-width: auto; }
.remove-btn {
  background: #dc3545;
  padding: 5px 10px;
  margin: 0;
}
.item-header {
  display: grid;
  grid-template-columns: 80px 1fr 50px 80px 60px 60px auto;
  gap: 8px;
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
}
/* POS Interface */
.pos-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
}
.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.pos-item {
  background: white;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.pos-item:hover {
  border-color: #0066cc;
  transform: scale(1.02);
}
.pos-item:active { transform: scale(0.98); }
.pos-item .emoji {
  font-size: 40px;
  display: block;
  margin-bottom: 5px;
}
.pos-item .name {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 3px;
}
.pos-item .price {
  color: #0066cc;
  font-weight: 600;
}
.pos-cart {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
}
.cart-items {
  min-height: 150px;
  max-height: 300px;
  overflow-y: auto;
  border-bottom: 1px solid #eee;
  margin-bottom: 10px;
}
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}
.cart-item .info { flex: 1; }
.cart-item .name { font-weight: 600; font-size: 13px; }
.cart-item .details { font-size: 12px; color: #666; }
.cart-item .qty-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}
.cart-item .qty-controls button {
  width: 24px;
  height: 24px;
  padding: 0;
  margin: 0;
  font-size: 16px;
  line-height: 1;
  border-radius: 4px;
}
.cart-item .qty { min-width: 20px; text-align: center; font-weight: 600; }
.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 700;
  padding: 10px 0;
}
.pos-cart h4 { margin: 15px 0 8px; color: #555; font-size: 14px; }
.pos-cart select { width: 100%; }
.pos-cart button { width: 100%; margin: 0; }

/* Void Form */
.void-header {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 15px;
}
.void-header input {
  width: 150px;
  font-size: 16px;
  font-weight: 600;
}

@media (max-width: 800px) {
  .panels { grid-template-columns: 1fr; }
  .item-row, .item-header { grid-template-columns: 1fr 1fr; }
  .pos-container { grid-template-columns: 1fr; }
}
