* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f0f4f8;
  color: #1a202c;
  min-height: 100vh;
  padding: 16px;
}

.container {
  max-width: 640px;
  margin: 0 auto;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #1e3a5f;
}

/* 入力エリア */
.input-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.input-group {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.input-group.flex2 {
  flex: 2;
}

label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 4px;
}

input {
  padding: 8px 10px;
  border: 1.5px solid #cbd5e0;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

input:focus {
  border-color: #2563eb;
}

.btn-add {
  width: 100%;
  padding: 10px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 4px;
}

.btn-add:hover {
  background: #1d4ed8;
}

/* 注文一覧 */
.orders-section {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  margin-bottom: 16px;
}

.table-header {
  background: #1e3a5f;
  color: #fff;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 1rem;
}

.order-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #e2e8f0;
  gap: 8px;
}

.order-item:last-of-type {
  border-bottom: none;
}

.order-name {
  flex: 1;
  font-size: 0.95rem;
}

.order-qty {
  font-size: 0.85rem;
  color: #718096;
  white-space: nowrap;
}

.order-price {
  font-size: 0.95rem;
  font-weight: 600;
  min-width: 72px;
  text-align: right;
  white-space: nowrap;
}

.btn-delete {
  background: none;
  border: none;
  color: #e53e3e;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s;
  flex-shrink: 0;
}

.btn-delete:hover {
  background: #fff5f5;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-top: 2px solid #2563eb;
  background: #eff6ff;
}

.total-label {
  font-weight: 700;
  font-size: 1rem;
  color: #1e3a5f;
}

.total-amount {
  font-weight: 700;
  font-size: 1.3rem;
  color: #2563eb;
}

/* アクションボタン */
.action-buttons {
  display: flex;
  gap: 10px;
}

.btn-reset {
  flex: 1;
  padding: 10px;
  background: #fff;
  color: #e53e3e;
  border: 2px solid #e53e3e;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-reset:hover {
  background: #e53e3e;
  color: #fff;
}

.empty-msg {
  text-align: center;
  color: #a0aec0;
  padding: 24px;
  font-size: 0.9rem;
}

/* スマホ対応 */
@media (max-width: 480px) {
  h1 {
    font-size: 1.3rem;
  }

  .input-row {
    flex-wrap: wrap;
  }

  .input-group.flex2 {
    flex: 1 0 100%;
  }

  .order-item {
    padding: 10px 12px;
  }
}
