html, body {
  height: 100%;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 360px;
  overflow: hidden;
}

.product-area {
  overflow-y: auto;
  padding: 1rem;
}

.cart-panel {
  display: flex;
  flex-direction: column;
  border-left: 2px solid oklch(var(--b3));
  height: 100%;
  overflow: hidden;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

.cart-summary {
  border-top: 2px solid oklch(var(--b3));
  padding: 0.75rem;
}

.product-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(var(--grid-cols, 5), 1fr);
}

.product-card {
  cursor: pointer;
  user-select: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.product-card.in-cart {
  border-color: oklch(var(--p));
  box-shadow: 0 0 0 2px oklch(var(--p) / 0.3);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  justify-content: center;
}

.qty-control .btn {
  min-height: 2rem;
  height: 2rem;
  min-width: 2rem;
  padding: 0;
}

.qty-control .qty-display {
  min-width: 2rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.checkout-btn {
  min-height: 3.5rem;
  font-size: 1.1rem;
}

.daily-report-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: oklch(var(--b1));
  overflow-y: auto;
}

.toast-notification {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  animation: toast-in 0.3s ease, toast-out 0.3s ease 2.2s forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(1rem); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toast-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr 300px;
  }
  .product-grid {
    --grid-cols: 3 !important;
  }
}

@media (max-width: 768px) {
  .main-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
}
