:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --accent: #0b5fff;
  --danger: #b42318;
  --text: #1f2937;
  --muted: #6b7280;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  padding: 16px;
}

.pin-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  padding: 16px;
}

.pin-gate[hidden] {
  display: none;
}

.pin-card {
  width: min(100%, 320px);
  background: var(--panel);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.pin-card h2 {
  margin-top: 0;
}

.pin-hint {
  color: var(--muted);
  margin: 0 0 12px;
}

.pin-card input {
  width: 100%;
  font-size: 1.25rem;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

.pin-card button {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.pin-error {
  color: var(--danger);
  margin: 12px 0 0;
  font-size: 0.9rem;
}

.approval-card .btn-secondary {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  background: transparent;
  color: var(--text);
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 8px;
}

.approval-poll-status {
  font-style: italic;
}

h1, h2 {
  margin: 0 0 12px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 16px;
}

.topbar h1 {
  flex: 1;
  margin: 0;
  min-width: 160px;
}

.menu-btn {
  font-size: 1.25rem;
  line-height: 1;
  border: 1px solid #e5e7eb;
  background: var(--panel);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.app-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 8px 0;
}

.app-menu[hidden] {
  display: none;
}

.app-menu a,
.app-menu button {
  text-align: left;
  font-size: 0.95rem;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: var(--panel);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}

.status {
  color: var(--muted);
  font-size: 0.95rem;
  margin-left: auto;
}

.status.status-hidden {
  display: none;
}

.pos-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.product-card {
  background: var(--panel);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-name {
  font-weight: 600;
}

.product-price {
  color: var(--muted);
}

.product-prices {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
}

.price-reg {
  color: var(--muted);
}

.price-sale {
  color: #047857;
  font-weight: 600;
}

.field-label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.customer-select {
  width: 100%;
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 0.95rem;
}

.cart-detail {
  font-size: 0.85rem;
  color: var(--muted);
}

.cart-summary-893 {
  margin-top: 6px;
  font-size: 0.9rem;
  color: #047857;
  font-weight: 600;
}

.cart-muted {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--muted);
}

.tag-893 {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #ecfdf5;
  color: #047857;
}

.cart-panel {
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 14px;
  min-height: 360px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eef2f7;
  padding: 10px 0;
}

.cart-footer {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.total {
  font-size: 1.1rem;
  font-weight: 700;
}

.history-wrap {
  margin-top: 16px;
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 14px;
}

button, select {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 1rem;
}

button {
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0 14px;
}

button.remove {
  background: var(--danger);
}

button.checkout {
  font-size: 1.05rem;
  font-weight: 600;
}

@media (max-width: 980px) {
  .pos-layout {
    grid-template-columns: 1fr;
  }
}
