* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: #2f241d;
  background:
    radial-gradient(900px 600px at 20% 10%, rgba(255,165,0,.22) 0%, rgba(255,165,0,0) 60%),
    radial-gradient(900px 600px at 85% 20%, rgba(255,165,0,.14) 0%, rgba(255,165,0,0) 55%),
    linear-gradient(180deg, rgba(255,165,0,.14) 0%, rgba(255,165,0,.06) 55%, rgba(255,255,255,0) 100%);
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.wt-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.35), transparent 45%),
    radial-gradient(circle at bottom right, rgba(255,255,255,0.15), transparent 65%),
    linear-gradient(160deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02));
  pointer-events: none;
}

.wt-app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page {
  display: none;
  width: 100%;
  max-width: 1024px;
}

.page.active {
  display: block;
}

.page-card {
  width: 100%;
  border-radius: 30px;
  padding: 28px;
  background: rgba(255, 248, 240, 0.575);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.38);
  box-shadow:
    0 20px 60px rgba(120, 56, 8, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.35);
}

.form-card {
  max-width: 820px;
  margin: 0 auto;
}

.record-card {
  max-width: 1100px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.page-header.center {
  flex-direction: column;
  text-align: center;
  gap: 8px;
}

.page-header h1,
.page-header h2 {
  margin: 0;
  color: #4b2400;
  letter-spacing: 0.2px;
}

.page-header p {
  margin: 4px 0 0;
  color: rgba(75, 36, 0, 0.75);
  font-size: 15px;
}

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  max-width: 620px;
  margin: 28px auto 0;
}

.menu-btn {
  min-height: 120px;
  border: none;
  border-radius: 24px;
  padding: 20px;
  font-size: 24px;
  font-weight: 700;
  color: #4b2400;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,0.52), rgba(255,255,255,0.22));
  box-shadow:
    0 10px 30px rgba(152, 78, 14, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.menu-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 32px rgba(152, 78, 14, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.4);
  border-color: rgba(255,255,255,0.65);
}

.menu-btn-wide {
  grid-column: 1 / -1;
}

.bottom-row,
.action-row,
.filter-row,
.summary-grid,
.condition-row {
  display: flex;
  gap: 14px;
}

.bottom-row {
  margin-top: 28px;
}

.center {
  justify-content: center;
}

.back-btn,
.ghost-btn,
.primary-btn,
.qty-btn {
  border: none;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
}

.back-btn {
  min-width: 110px;
  padding: 12px 18px;
  font-size: 15px;
  background: rgba(255,255,255,0.35);
  color: #5a2f05;
  border: 1px solid rgba(255,255,255,0.45);
  box-shadow: 0 8px 20px rgba(120, 56, 8, 0.1);
}

.ghost-btn {
  min-width: 120px;
  padding: 14px 20px;
  font-size: 15px;
  color: #7a430c;
  background: rgba(255,255,255,0.32);
  border: 1px solid rgba(255,255,255,0.42);
  box-shadow: 0 8px 24px rgba(120, 56, 8, 0.1);
}

.primary-btn {
  min-width: 140px;
  padding: 14px 22px;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(180deg, #ff962d, #ef6c00);
  box-shadow: 0 10px 24px rgba(173, 77, 7, 0.28);
}

.small-btn {
  min-width: 96px;
  padding-inline: 16px;
}

.back-btn:hover,
.ghost-btn:hover,
.primary-btn:hover,
.qty-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.form-grid {
  display: grid;
  gap: 18px;
}

.field-block {
  display: grid;
  gap: 8px;
}

.field-block label {
  font-size: 14px;
  font-weight: 700;
  color: #67360a;
}

.input-box {
  width: 100%;
  min-height: 52px;
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.42);
  background: rgba(255,255,255,0.38);
  color: #4b2400;
  font-size: 15px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}

.input-box:focus {
  border-color: rgba(255, 144, 24, 0.85);
  box-shadow:
    0 0 0 3px rgba(255, 145, 0, 0.14),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

.readonly-box {
  display: flex;
  align-items: center;
  color: rgba(75, 36, 0, 0.85);
}

.textarea-box {
  min-height: 100px;
  resize: none;
  overflow-y: auto;
}

.item-row {
  min-height: 72px;
  border-radius: 22px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.32);
  border: 1px solid rgba(255,255,255,0.38);
  box-shadow: 0 8px 24px rgba(120, 56, 8, 0.08);
  margin-bottom: 12px;
}

.item-row:last-child {
  margin-bottom: 0;
}

.item-row.disabled {
  opacity: 0.72;
}

.tick-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: #5c2f06;
  font-size: 16px;
}

.tick-wrap input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: #ef6c00;
}

.qty-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 42px;
  height: 42px;
  font-size: 20px;
  background: linear-gradient(180deg, #ff9e3b, #ef6c00);
  color: #fff;
  box-shadow: 0 8px 18px rgba(173, 77, 7, 0.22);
}

.qty-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.qty-value {
  min-width: 54px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: rgba(255,255,255,0.5);
  color: #6c3506;
  border: 1px solid rgba(255,255,255,0.45);
}

.condition-row {
  flex-wrap: wrap;
}

.radio-pill {
  position: relative;
}

.radio-pill{
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.radio-pill input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-pill span{
  min-width: 120px;
  min-height: 52px;
  padding: 14px 18px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #6b3605;
  background: rgba(255,255,255,0.34);
  border: 1px solid rgba(255,255,255,0.42);
  box-shadow: 0 8px 18px rgba(120, 56, 8, 0.08);
  cursor: pointer;
  transition: all .18s ease;
}

.radio-pill input:checked + span{
  color: #fff;
  background: linear-gradient(180deg, #ffab56, #ffa500);
  border-color: rgba(255,145,0,.9);
  box-shadow: 0 10px 22px rgba(173,77,7,.22);
}

.radio-pill input:focus + span{
  outline: 2px solid rgba(255,145,0,.35);
  outline-offset: 2px;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-pill span {
  min-width: 120px;
  min-height: 52px;
  padding: 14px 18px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #6b3605;
  background: rgba(255,255,255,0.34);
  border: 1px solid rgba(255,255,255,0.42);
  box-shadow: 0 8px 18px rgba(120, 56, 8, 0.08);
}

.action-row {
  margin-top: 26px;
  justify-content: flex-end;
}

.summary-grid {
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.summary-box {
  flex: 1;
  min-width: 180px;
  border-radius: 22px;
  padding: 18px;
  background: rgba(255,255,255,0.32);
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 8px 24px rgba(120, 56, 8, 0.08);
}

.summary-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(90, 48, 10, 0.8);
  margin-bottom: 8px;
}

.summary-value {
  font-size: 34px;
  font-weight: 800;
  color: #512605;
}

.filter-row {
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.small-input {
  min-width: 180px;
  flex: 1;
}

.table-wrap {
  overflow: auto;
  border-radius: 22px;
  background: rgba(255,255,255,0.26);
  border: 1px solid rgba(255,255,255,0.38);
}

.record-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.record-table th,
.record-table td {
  padding: 14px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.24);
}

.record-table th {
  background: rgba(255,255,255,0.2);
  color: #5c3007;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.record-table td {
  color: #472100;
  background: rgba(255,255,255,0.08);
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.tag.takeout {
  color: #7f4200;
  background: rgba(255, 183, 108, 0.45);
}

.tag.return {
  color: #5d3408;
  background: rgba(255, 235, 200, 0.75);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(55, 28, 5, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.hidden {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  border-radius: 28px;
  padding: 26px;
  background: rgba(255,248,240,0.3);
  border: 1px solid rgba(255,255,255,0.44);
  box-shadow:
    0 20px 50px rgba(120, 56, 8, 0.2),
    inset 0 1px 0 rgba(255,255,255,0.3);
  text-align: center;
}

.modal-card h3 {
  margin: 0 0 8px;
  color: #4b2400;
}

.modal-card p {
  margin: 0;
  color: rgba(75, 36, 0, 0.76);
  font-size: 15px;
}

.pin-boxes {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 22px 0 10px;
}

.pin-slot {
  width: 56px;
  height: 60px;
  border-radius: 16px;
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28);
}

.success-lines {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.24);
  text-align: left;
  display: grid;
  gap: 8px;
  color: #4b2400;
}

@media (max-width: 900px) {
  .wt-app {
    padding: 18px;
    align-items: flex-start;
  }

  .page-card {
    padding: 20px;
    border-radius: 24px;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .menu-btn-wide {
    grid-column: auto;
  }

  .page-header {
    flex-wrap: wrap;
  }

  .item-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .qty-box {
    justify-content: flex-end;
  }

  .action-row {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .ghost-btn,
  .primary-btn {
    flex: 1;
  }
}