h2, h3 {
  margin-bottom: 20px;
  color: #333;
  text-align: center;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
  min-width: 600px; /* 保持桌面清晰度 */
}

th, td {
  padding: 12px 16px;
  border: 1px solid #ddd;
  text-align: left;
}

th {
  background: #f1f3f5;
}

tr:nth-child(even) {
  background: #f9f9f9;
}

tr:hover {
  background: #e6f4ff;
}

.error {
  color: red;
  background: #ffe6e6;
  padding: 10px;
  border-left: 5px solid red;
  margin-bottom: 20px;
}

/* 🔍 查詢表單 */
.check-form {
  margin-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.check-form input[type="text"] {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 300px;
  font-size: 1rem;
}

.check-form button {
  padding: 8px 18px;
  background-color: #007bff;
  color: white;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.check-form button:hover {
  background-color: #0056b3;
}

.error-details {
  background-color: #ffe6e6;
  border: 1px solid #cc0000;
  padding: 15px;
  border-radius: 6px;
  margin-top: 15px;
}

.error-details p, .error-details li {
  color: #cc0000;
  margin: 5px 0;
}

/* ✅ 表格包裹容器，啟用手機橫向滾動 */
.table-wrapper {
  overflow-x: auto;
  width: 100%;
}

/* ✅ Mobile 優化 */
@media (max-width: 768px) {
  h2, h3 {
    font-size: 1.25rem;
  }

  .check-form {
    flex-direction: column;
    align-items: stretch;
  }

  .check-form input[type="text"] {
    width: 100%;
  }

  .check-form button {
    width: 100%;
    font-size: 1rem;
  }

  table {
    font-size: 14px;
    min-width: unset;
  }
}
