/* ===== 色票：湖水綠 × 奶油白 × 淡綠背景 × 鵝黃點綴 ===== */
:root {
  --bg-1: #eef8f1;
  --bg-2: #dbf0e6;
  --card: #fffdf6;
  --ink: #2c4744;
  --muted: #6f8884;
  --line: #e1ebe3;
  --primary: #58c2b3;
  --primary-strong: #2e9a8c;
  --primary-ink: #143e39;
  --sun: #f6e58d;
  --danger: #c0594a;
  --danger-bg: #fbece8;
  --ok-bg: #e3f5ef;
  --warn-bg: #fdf3d3;
  --radius-lg: 36px;
  --radius-md: 18px;
  --shadow: 0 24px 60px -24px rgba(46, 154, 140, 0.35);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 100%) fixed;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

.stage {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 16px;
}

/* 卡片 */
.card {
  width: 100%; max-width: 646px;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 56px 62px 40px;
  box-shadow: var(--shadow);
}
.card-wide { max-width: 860px; padding: 40px 44px; }

.logo {
  width: 80px; height: 80px; border-radius: 24px;
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 28px;
}
.logo-sm { width: 34px; height: 34px; border-radius: 11px; margin: 0; }

.eyebrow {
  margin: 0 0 8px; font-size: 14px; font-weight: 700;
  letter-spacing: 0.16em; color: var(--primary-strong);
}
.title { margin: 0 0 8px; font-size: 36px; line-height: 1.25; font-weight: 700; }
.title-sm { font-size: 26px; }
.subtitle { margin: 0 0 32px; color: var(--muted); font-size: 17px; }

/* 表單 */
label { display: block; margin: 20px 0 8px; font-weight: 700; font-size: 16px; color: #4a625f; }
input {
  width: 100%; height: 56px; padding: 0 22px;
  border: 1px solid var(--line); border-radius: 28px;
  background: #fff; color: var(--ink);
  font: inherit; font-weight: 500;
}
input::placeholder { color: #8a9c99; font-weight: 500; }
input:focus-visible { outline: 3px solid rgba(88, 194, 179, 0.45); border-color: var(--primary); }

.btn {
  width: 100%; height: 56px; margin-top: 28px;
  border: 0; border-radius: 28px; cursor: pointer;
  background: var(--primary); color: var(--primary-ink);
  font: inherit; font-weight: 700; font-size: 16px;
  box-shadow: 0 14px 28px -14px rgba(46, 154, 140, 0.7);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(46, 154, 140, 0.5); outline-offset: 2px; }
.btn:disabled { opacity: 0.6; cursor: progress; }

.btn-ghost {
  width: auto; height: 40px; margin: 0; padding: 0 18px;
  background: transparent; color: var(--primary-strong);
  border: 1px solid var(--line); box-shadow: none;
}

.form-error {
  margin: 18px 0 0; padding: 10px 16px; border-radius: 14px;
  background: var(--danger-bg); color: var(--danger); font-size: 15px;
}

.footnote { margin: 24px 0 0; text-align: center; color: #94a5a2; font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
code { background: #f1f0e4; padding: 2px 6px; border-radius: 6px; font-size: 0.9em; }

/* 登入後 */
.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: rgba(255, 253, 246, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }

.badge {
  padding: 4px 14px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: var(--ok-bg); color: var(--primary-strong);
}
.badge.viewer { background: var(--warn-bg); color: #8a6d12; }

.content {
  position: relative; z-index: 1;
  display: flex; justify-content: center;
  padding: 48px 16px;
}

.checks { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.checks li {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 20px; border-radius: var(--radius-md);
  background: #fff; border: 1px solid var(--line);
}
.checks .label { font-weight: 700; }
.checks .detail { color: var(--muted); font-size: 15px; text-align: right; }
.pill {
  flex: none; padding: 2px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
}
.pill.ok { background: var(--ok-bg); color: var(--primary-strong); }
.pill.warn { background: var(--warn-bg); color: #8a6d12; }
.pill.fail { background: var(--danger-bg); color: var(--danger); }

/* ===== Viewer：防隨手複製（只擋一般操作，不是真正的防護） ===== */
body.viewer #view-app,
body.viewer #view-app * {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
body.viewer #view-app input,
body.viewer #view-app textarea {
  -webkit-user-select: text; user-select: text;
}
@media print {
  body.viewer #view-app { display: none !important; }
  body.viewer::before { content: "此頁面不提供列印"; display: block; padding: 40px; }
}

/* 窄螢幕（手機）也要能用 */
@media (max-width: 640px) {
  .card { padding: 36px 24px 28px; border-radius: 28px; }
  .card-wide { padding: 28px 20px; }
  .title { font-size: 28px; }
  .topbar { padding: 12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
