:root {
  --ink: #1f2428;
  --muted: #6b7378;
  --line: #e3e6e8;
  --accent: #1a56db;
  --ok: #157347;
  --warn: #b54708;
  --bg: #f6f7f8;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 32px;
  width: 100%;
  max-width: 560px;
}
.brand {
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--muted);
  margin-bottom: 24px;
}
h1 { font-size: 22px; margin: 0 0 20px; font-weight: 700; }
h2 { font-size: 16px; margin: 28px 0 12px; font-weight: 700; }
.detail { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.detail th, .detail td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.detail th { color: var(--muted); font-weight: 400; width: 7em; }
.amount { font-weight: 700; font-size: 18px; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
}
.btn:hover { opacity: 0.92; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.muted { color: var(--muted); font-size: 13px; }
.state { padding: 12px 16px; border-radius: 6px; font-weight: 700; margin-bottom: 16px; }
.state.ok { background: #e8f3ed; color: var(--ok); }
.state.warn { background: #fdf0e4; color: var(--warn); }

/* 後台 */
.admin { max-width: 860px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 2fr 140px auto; gap: 12px; align-items: end; }
.msg { font-size: 14px; margin: 10px 0; min-height: 1.4em; }
.msg.err { color: #b42318; }
.msg.ok { color: var(--ok); }
table.orders { width: 100%; border-collapse: collapse; font-size: 14px; }
table.orders th, table.orders td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.orders th { color: var(--muted); font-weight: 400; font-size: 13px; }
.status-pending { color: var(--warn); }
.status-paid { color: var(--ok); font-weight: 700; }
.copybtn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.copybtn:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 720px) {
  .form-row { grid-template-columns: 1fr; }
}
