* {
  box-sizing: border-box;
}

body {
  font-family: Inter, Arial, sans-serif;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  padding: 0.65rem 0.75rem;
  font-size: 0.925rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.textarea {
  min-height: 84px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.btn {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 6px;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}

.btn:hover {
  opacity: 0.92;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.btn-secondary {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-success {
  background: #16a34a;
  color: #fff;
}

.btn-warning {
  background: #f59e0b;
  color: #111827;
}

.btn-danger {
  background: #dc2626;
  color: #fff;
}

.icon-btn {
  display: inline-grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 6px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
}

.menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.75rem;
  border-radius: 6px;
  padding: 0.72rem 0.85rem;
  color: #475569;
  font-weight: 700;
  text-align: left;
}

.menu-item:hover,
.menu-item.active {
  background: #eff6ff;
  color: #2563eb;
}

.card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sales-chart-frame {
  width: 100%;
  min-height: 260px;
  overflow: hidden;
}

.sales-chart-frame canvas {
  display: block;
  width: 100%;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  min-width: 720px;
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-align: left;
  text-transform: uppercase;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 0.85rem;
  vertical-align: top;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.receipt-print {
  display: none;
}

.receipt-paper {
  width: min(100%, 320px);
  margin: 0 auto;
  background: #fff;
  color: #111;
  font-family: Arial, sans-serif;
  font-size: 12px;
  line-height: 1.18;
}

.receipt-logo {
  display: block;
  width: 58px;
  height: 58px;
  margin: 0 auto 4px;
}

.receipt-center {
  text-align: center;
}

.receipt-shop-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.receipt-line {
  margin: 7px 0;
  border-top: 1px dashed #333;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.receipt-row > span:last-child,
.receipt-row > b:last-child {
  text-align: right;
  white-space: nowrap;
}

.receipt-item {
  margin-bottom: 5px;
}

.receipt-item-title {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  font-weight: 700;
}

.receipt-item-detail {
  padding-left: 14px;
}

.receipt-total {
  font-size: 14px;
  font-weight: 800;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

@media print {
  body > *:not(.receipt-print) {
    display: none !important;
  }

  .receipt-print {
    display: block;
    color: #111;
    font-family: Arial, sans-serif;
    font-size: 12px;
    padding: 0;
  }

  .receipt-paper {
    width: 72mm;
    margin: 0;
    padding: 3mm;
  }

  @page {
    size: 80mm auto;
    margin: 0;
  }
}
