* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background: #f4f5f7;
  color: #1f2937;
}
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}
.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
h1, h2, h3 { margin-top: 0; }
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 12px 0 6px;
}
input[type="text"], input[type="number"], input[type="date"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
}
textarea { resize: vertical; min-height: 70px; }
button, .btn {
  display: inline-block;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
button.secondary { background: #6b7280; }
button.danger { background: #dc2626; }
button:disabled { background: #9ca3af; cursor: not-allowed; }
.btn-block { width: 100%; margin-top: 16px; }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 1; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #e5e7eb; }
th { color: #6b7280; font-weight: 600; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: #e0e7ff; color: #3730a3; }
.muted { color: #6b7280; font-size: 13px; }
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.top-bar a { color: #2563eb; text-decoration: none; font-size: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-box { background: #fff; border-radius: 12px; padding: 14px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.stat-box .num { font-size: 22px; font-weight: 700; color: #2563eb; }
.stat-box .label { font-size: 12px; color: #6b7280; margin-top: 4px; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; }
.tabs button { background: #e5e7eb; color: #374151; padding: 8px 14px; font-size: 14px; white-space: nowrap; }
.tabs button.active { background: #2563eb; color: #fff; }
.preview-img { max-width: 100%; border-radius: 8px; margin-top: 8px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px; z-index: 999; }
@media (min-width: 640px) {
  .container { max-width: 720px; }
}
