* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans TC", sans-serif;
  background: #f1f5f9;
  color: #0f172a;
  min-height: 100vh;
  padding: 16px;
}
.card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
h1 { font-size: 1.35rem; margin-bottom: 4px; }
h2 { font-size: 1.1rem; margin-bottom: 12px; }
.sub { color: #64748b; font-size: 0.9rem; margin-bottom: 16px; }
label { display: block; font-size: 0.85rem; color: #475569; margin-bottom: 6px; }
input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 1rem;
  margin-bottom: 12px;
}
button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:disabled { background: #94a3b8; }
.btn-success { background: #16a34a; color: #fff; }
.btn-outline {
  background: #fff;
  color: #2563eb;
  border: 2px solid #2563eb;
}
.btn-outline-teal {
  background: #fff;
  border: 2px solid #0f766e;
  color: #0f766e;
}
.btn-secondary {
  background: #64748b;
  color: #fff;
}
.status {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  margin-top: 8px;
}
.status.ok { background: #dcfce7; color: #166534; }
.status.err { background: #fee2e2; color: #991b1b; }
.status.info { background: #e0f2fe; color: #075985; }
.hidden { display: none; }
#user-info { font-size: 0.9rem; color: #475569; margin-bottom: 12px; }
.history-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge.ok { background: #dcfce7; color: #166534; }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.bad { background: #fee2e2; color: #991b1b; }
.badge.muted { background: #f1f5f9; color: #64748b; }
.log-list { list-style: none; }
.log-item {
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.9rem;
}
.log-item:last-child { border-bottom: none; }
.log-time { font-weight: 600; }
.log-meta { color: #64748b; font-size: 0.85rem; margin-top: 2px; }
.empty { color: #94a3b8; text-align: center; padding: 20px 0; }
.h2-center { text-align: center; margin-bottom: 8px; }
.qr-center { display: flex; justify-content: center; margin: 12px 0; }
.qr-name { text-align: center; font-weight: 600; margin-bottom: 4px; }
.qr-timer { text-align: center; color: #64748b; font-size: 0.9rem; margin-bottom: 12px; }
