* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", "Microsoft JhengHei", sans-serif;
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(145deg, #e8e4df 0%, #f5f0eb 50%, #ebe6e1 100%);
  color: #2c2c2c;
}

.container {
  width: 100%;
  max-width: 900px;
}

header {
  text-align: center;
  margin-bottom: 1.75rem;
}

header h1 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  color: #1a5f4a;
  letter-spacing: 0.02em;
}

.main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.form-section,
.list-section {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

#order-form label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: #444;
}

#order-form input[type="text"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  margin-top: 0.35rem;
  border: 1px solid #d4d0cb;
  border-radius: 10px;
  font-size: 1rem;
  background: #fafaf9;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#order-form input[type="text"]:focus {
  outline: none;
  border-color: #1a5f4a;
  box-shadow: 0 0 0 3px rgba(26, 95, 74, 0.12);
}

#order-form .option-group {
  margin-top: 0.35rem;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#order-form .option-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #d4d0cb;
  border-radius: 10px;
  font-size: 0.95rem;
  background: #fafaf9;
  color: #444;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

#order-form .option-btn:hover {
  border-color: #1a5f4a;
  background: #f0f5f3;
  color: #1a5f4a;
}

#order-form .option-btn.selected {
  background: #1a5f4a;
  border-color: #1a5f4a;
  color: #fff;
}

#order-form button[type="submit"] {
  margin-top: 0.75rem;
  padding: 0.7rem 1.4rem;
  width: 100%;
  background: #1a5f4a;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

#order-form button[type="submit"]:hover {
  background: #14503e;
}

#order-form button[type="submit"]:active {
  transform: scale(0.99);
}

.list-section {
  min-height: 280px;
}

#loading {
  color: #666;
  margin: 0;
  font-size: 0.95rem;
}

#order-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#order-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid #eee;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 1rem;
  align-items: baseline;
}

#order-list li:last-child {
  border-bottom: none;
}

#order-list li:first-child {
  padding-top: 0;
}

#order-list .name {
  font-weight: 600;
  grid-column: 1;
  color: #222;
}

#order-list .detail {
  grid-column: 1 / -1;
  font-size: 0.9rem;
  color: #555;
}

#order-list .time {
  grid-column: 2;
  grid-row: 1;
  font-size: 0.8rem;
  color: #888;
}

.error {
  color: #b33;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(0.5rem);
  padding: 0.75rem 1.25rem;
  background: #1a5f4a;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(26, 95, 74, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 640px) {
  .main {
    grid-template-columns: 1fr;
  }
}
