/* =========================================================
   愛回覆 — 官網樣式
   色彩、字級、間距都集中在 :root 變數；深色模式只覆寫變數。
   ========================================================= */

:root {
  color-scheme: light dark;

  /* 品牌綠（與 macOS App 一致） */
  --brand: #06a94d;          /* 裝飾、圖示、焦點 */
  --brand-strong: #05843b;   /* 實心按鈕底色（白字 4.8:1） */
  --brand-hover: #046e31;
  --brand-soft: #e7f6ee;
  --brand-soft-2: #cfeedc;
  --on-brand: #ffffff;
  --link: #047a37;
  --ok-text: #047033;

  /* 中性色 */
  --bg: #f5f7f6;
  --surface: #ffffff;
  --surface-2: #f0f3f2;
  --surface-3: #e8edeb;
  --line: #e2e8e5;
  --line-strong: #cbd5d0;
  --text: #0f1a14;
  --text-2: #33413a;
  --muted: #5d6b64;

  /* 狀態色 */
  --warn: #8f5400;
  --warn-soft: #fff4e0;
  --warn-line: #f3d6a2;
  --err: #b4232a;
  --err-strong: #b4232a;
  --err-soft: #fdecec;
  --err-line: #f4c7c9;
  --info: #1b57b0;
  --info-soft: #eaf2fd;
  --info-line: #c6daf6;

  /* 形狀與陰影 */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 26, 20, .06);
  --shadow: 0 1px 2px rgba(15, 26, 20, .04), 0 6px 20px rgba(15, 26, 20, .06);
  --shadow-lg: 0 24px 60px -18px rgba(10, 40, 24, .28), 0 2px 6px rgba(15, 26, 20, .05);
  --ring: 0 0 0 3px rgba(6, 169, 77, .35);

  /* 字體與字級 */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro TC", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 15px;
  --fs-md: 17px;
  --fs-lg: 20px;
  --fs-xl: 24px;
  --fs-2xl: 30px;
  --fs-3xl: 40px;

  --hl-grad: linear-gradient(120deg, #047a37 0%, #06a94d 100%);
  --wrap: 1160px;
  --topbar-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #2fcb74;
    --brand-strong: #2fcb74;
    --brand-hover: #4fd98b;
    --brand-soft: rgba(47, 203, 116, .12);
    --brand-soft-2: rgba(47, 203, 116, .22);
    --on-brand: #04170b;
    --link: #55dc90;
    --ok-text: #6fe3a1;

    --bg: #0b100e;
    --surface: #121916;
    --surface-2: #18211d;
    --surface-3: #1f2a25;
    --line: #24302b;
    --line-strong: #34443c;
    --text: #e8efeb;
    --text-2: #c4cfc9;
    --muted: #94a39b;

    --warn: #f3bb63;
    --warn-soft: rgba(243, 187, 99, .12);
    --warn-line: rgba(243, 187, 99, .3);
    --err: #ff8e8e;
    --err-strong: #e5484d;
    --err-soft: rgba(255, 110, 110, .12);
    --err-line: rgba(255, 110, 110, .32);
    --info: #8dbbff;
    --info-soft: rgba(125, 179, 255, .12);
    --info-line: rgba(125, 179, 255, .3);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .3);
    --ring: 0 0 0 3px rgba(47, 203, 116, .45);
    --hl-grad: linear-gradient(120deg, #2fcb74 0%, #8be8b4 100%);
  }
}

/* ---------- 基礎 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: var(--fs-base)/1.7 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
svg.i { display: inline-block; flex: none; vertical-align: -0.2em; }
a { color: var(--link); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--text); line-height: 1.35; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.005em; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); font-size: .9em; background: var(--surface-2); border: 1px solid var(--line); padding: .1em .45em; border-radius: 6px; word-break: break-all; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
::selection { background: var(--brand-soft-2); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }
.mono { font-family: var(--mono); font-size: .92em; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow); font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---------- 頂部導覽 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: var(--topbar-h); gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; color: var(--text); white-space: nowrap; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.logo-img { border-radius: 9px; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.nav { display: flex; align-items: center; gap: 4px; min-width: 0; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-right: 8px; }
.nav-actions { display: flex; align-items: center; gap: 4px; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); padding: 7px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.nav-link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-link.active { color: var(--text); background: var(--surface-2); font-weight: 600; }
.nav-link .i { color: var(--muted); }
.nav .btn { margin-left: 4px; }
@media (max-width: 880px) { .nav-links { display: none; } }
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .topbar-inner { gap: 8px; }
  .brand { font-size: 15px; gap: 8px; }
  .brand .logo-img { width: 28px; height: 28px; }
  .nav-link { padding: 6px 7px; font-size: 13px; }
  .nav-link .i { display: none; }
  .nav .btn-sm { padding: 7px 11px; font-size: 13px; }
}
@media (max-width: 360px) { .brand-name { display: none; } }

/* ---------- 頁尾 ---------- */
.foot { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 14px; margin-top: auto; }
.foot-inner { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding-top: 44px; padding-bottom: 32px; }
.foot-brand p { margin: 12px 0 0; max-width: 34ch; line-height: 1.7; }
.foot h2 { font-size: 13px; font-weight: 700; color: var(--text); margin: 4px 0 12px; letter-spacing: .02em; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }
.foot-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 18px; padding-bottom: 22px; font-size: 13px; }
.foot-slim .foot-bottom { border-top: 0; }
.foot-slim .foot-bottom nav { display: flex; gap: 16px; }
@media (max-width: 760px) {
  .foot-inner { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .foot-brand { grid-column: 1 / -1; }
}

/* ---------- 主要版面 ---------- */
.main-default, .main-app { padding: 32px 0 64px; }
.main-auth {
  display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px 64px;
  background:
    radial-gradient(900px 420px at 50% -120px, var(--brand-soft), transparent 70%),
    var(--bg);
}
.auth-shell { width: 100%; max-width: 440px; }
.auth-shell.wide { max-width: 520px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: 28px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.back-link:hover { color: var(--text); }

/* ---------- 按鈕 ---------- */
.btn {
  --btn-bg: var(--brand-strong); --btn-fg: var(--on-brand); --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 18px; border: 1px solid var(--btn-bd); border-radius: 10px;
  background: var(--btn-bg); color: var(--btn-fg);
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.3; white-space: nowrap;
  cursor: pointer; text-decoration: none; user-select: none;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { --btn-bg: var(--brand-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; box-shadow: none; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 14px; border-radius: 9px; gap: 6px; }
.btn-lg { min-height: 50px; padding: 12px 24px; font-size: 16px; border-radius: 12px; }
.btn-block { display: flex; width: 100%; }
.btn-ghost { --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--line-strong); }
.btn-ghost:hover { --btn-bg: var(--surface-2); --btn-bd: var(--line-strong); }
.btn-quiet { --btn-bg: transparent; --btn-fg: var(--text-2); box-shadow: none; }
.btn-quiet:hover { --btn-bg: var(--surface-2); }
.btn-danger { --btn-bg: var(--surface); --btn-fg: var(--err); --btn-bd: var(--err-line); }
.btn-danger:hover { --btn-bg: var(--err-soft); --btn-bd: var(--err); }
.btn-danger-solid { --btn-bg: var(--err-strong); --btn-fg: #fff; }
.btn-danger-solid:hover { --btn-bg: #9b1c22; }
.btn-on-dark { --btn-bg: #fff; --btn-fg: #05301a; }
.btn-on-dark:hover { --btn-bg: #e9fbf1; }
.btn-outline-dark { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .45); box-shadow: none; }
.btn-outline-dark:hover { --btn-bg: rgba(255, 255, 255, .1); }
button.link { background: none; border: 0; color: var(--link); cursor: pointer; font: inherit; font-weight: 600; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
form.inline { display: inline; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btn-row form { margin: 0; }

/* ---------- 卡片 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 440px; margin: 24px auto; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 10px; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.card.flush .card-head { padding: 18px 22px; margin: 0; border-bottom: 1px solid var(--line); }
.card-foot { border-top: 1px solid var(--line); margin: 20px -24px -24px; padding: 14px 24px; background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.icon-tile { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); flex: none; }
.icon-tile.lg { width: 48px; height: 48px; border-radius: 14px; }
.icon-tile.warn { background: var(--warn-soft); color: var(--warn); }
.icon-tile.err { background: var(--err-soft); color: var(--err); }
.icon-tile.muted { background: var(--surface-2); color: var(--muted); }
.icon-tile.info { background: var(--info-soft); color: var(--info); }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid2 > .card { margin-bottom: 0; }
.grid2.tight { gap: 0 16px; }
.grid2 + .card, .grid2 + .grid2 { margin-top: 20px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.dash-grid > .card { margin-bottom: 0; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } .grid2.tight { gap: 0; } }

/* ---------- 表單 ---------- */
label, .field > label, .label { display: block; font-weight: 600; font-size: 14px; color: var(--text); }
label { margin-bottom: 16px; }
.field { margin-bottom: 18px; }
.field > label { margin-bottom: 6px; }
.field .opt, label .opt { font-weight: 400; color: var(--muted); font-size: 13px; }
.hint, label small { display: block; margin-top: 6px; font-size: 13px; font-weight: 400; color: var(--muted); line-height: 1.55; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.label-row label { margin: 0; }
.label-row a { font-size: 13px; font-weight: 500; }

input, select, textarea {
  display: block; width: 100%; min-height: 44px; margin-top: 6px; padding: 10px 13px;
  font: inherit; font-size: 15px; font-weight: 400; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
  -webkit-appearance: none; appearance: none;
}
.field input, .field select, .field textarea { margin-top: 0; }
input::placeholder { color: var(--muted); opacity: .75; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--line-strong) 60%, var(--text) 40%); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
input[type="date"] { min-height: 44px; }
select {
  padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a968f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
input[type="checkbox"] {
  width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; flex: none; border-radius: 6px; cursor: pointer;
  display: inline-grid; place-content: center; border: 1.5px solid var(--line-strong);
}
input[type="checkbox"]::before {
  content: ""; width: 11px; height: 11px; transform: scale(0); transition: transform .12s;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  background: var(--on-brand);
}
input[type="checkbox"]:checked { background: var(--brand-strong); border-color: var(--brand-strong); }
input[type="checkbox"]:checked::before { transform: scale(1); }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; line-height: 1.6; cursor: pointer; }
label.check input { margin-top: 2px; }
label.check.switchrow { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
label.check .check-text b { display: block; font-weight: 600; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }
.pw-toggle:focus-visible { outline: none; box-shadow: var(--ring); }

.input-icon { position: relative; flex: 1; min-width: 0; }
.input-icon > .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 40px; margin: 0; }

fieldset.group { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
fieldset.group + fieldset.group { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 6px; }
fieldset.group legend { padding: 0; margin-bottom: 4px; font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; }
fieldset.group .legend-desc { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- 提示 ---------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px; border-radius: var(--radius); margin: 0 0 18px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-size: 14px; line-height: 1.6;
}
.alert > .i { margin-top: 2px; }
.alert-body { flex: 1; min-width: 0; }
.alert-body form { display: inline; }
.alert-ok { background: var(--brand-soft); border-color: var(--brand-soft-2); }
.alert-ok > .i { color: var(--brand); }
.alert-err { background: var(--err-soft); border-color: var(--err-line); color: var(--err); }
.alert-warn { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.alert-info { background: var(--info-soft); border-color: var(--info-line); }
.alert-info > .i { color: var(--info); }
.alert-err button.link, .alert-warn button.link { color: inherit; }
.flash-wrap { padding-top: 20px; }
.flash-wrap .alert { margin-bottom: 0; }

/* ---------- 徽章 ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; line-height: 1.5; padding: 2px 10px; border-radius: 99px; white-space: nowrap; border: 1px solid transparent; vertical-align: middle; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.badge-ok { background: var(--brand-soft); color: var(--ok-text); border-color: var(--brand-soft-2); }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.badge-err { background: var(--err-soft); color: var(--err); border-color: var(--err-line); }
.badge-muted { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.badge-info { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.badge-lg { font-size: 13px; padding: 4px 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }

/* ---------- 描述清單 ---------- */
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.meta-grid > div { background: var(--surface); padding: 12px 14px; min-width: 0; }
.meta-grid dt { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.meta-grid dd { margin: 0; font-weight: 600; font-size: 15px; }
@media (max-width: 640px) { .meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 進度條 ---------- */
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.progress.warn > span { background: #e59a1a; }
.progress-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.progress-meta b { color: var(--text); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .02em; background: var(--surface-2); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table tr.clickable { cursor: pointer; }
.table.small td { font-size: 13px; padding: 9px 16px; }
.table td.right, .table th.right { text-align: right; }
.table .cell-main { font-weight: 600; color: var(--text); }
.table .cell-sub { display: block; font-size: 13px; color: var(--muted); }
.table td form { margin: 0; display: inline-block; }
.card:not(.flush) > .table th:first-child, .card:not(.flush) > .table td:first-child,
.card:not(.flush) > .table-wrap .table th:first-child, .card:not(.flush) > .table-wrap .table td:first-child { padding-left: 0; }
.card:not(.flush) > .table thead th, .card:not(.flush) > .table-wrap thead th { background: none; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who > div { min-width: 0; }
.who a { font-weight: 600; overflow-wrap: anywhere; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--ok-text); font-weight: 700; font-size: 14px; }
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.code-chip { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; white-space: nowrap; color: var(--text-2); }

/* 手機：表格改成卡片堆疊 */
@media (max-width: 720px) {
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .table-stack tbody tr:last-child { border-bottom: 0; }
  .table-stack td { border: 0; padding: 3px 0 !important; text-align: left !important; display: flex; gap: 12px; justify-content: space-between; align-items: center; }
  .table-stack td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; flex: none; }
  .table-stack td.stack-head { display: block; padding-bottom: 6px !important; }
  .table-stack td.stack-head::before { display: none; }
  .table-stack td.stack-actions { justify-content: flex-end; padding-top: 10px !important; }
  .table-stack td.stack-actions::before { display: none; }
  .table-stack tbody tr:hover td { background: none; }
  .card:not(.flush) .table-stack tr { padding-left: 0; padding-right: 0; }
}

/* ---------- 空狀態 ---------- */
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty .icon-tile { margin: 0 auto 12px; }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.empty p { margin: 0; font-size: 14px; }

/* ---------- 驗證／授權卡（auth） ---------- */
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 36px 32px 28px; }
.auth-card .auth-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-card .auth-logo img { width: 52px; height: 52px; border-radius: 14px; box-shadow: var(--shadow); }
.auth-card h1 { text-align: center; font-size: 24px; margin-bottom: 6px; }
.auth-card .auth-sub { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.auth-card .btn-block { margin-top: 6px; }
.auth-alt { text-align: center; color: var(--muted); font-size: 14px; margin: 20px 0 0; }
.auth-alt a { font-weight: 600; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 22px 0 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth-points { list-style: none; margin: 22px 4px 0; padding: 0; display: grid; gap: 10px; color: var(--muted); font-size: 14px; }
.auth-points li { display: flex; gap: 10px; align-items: flex-start; }
.auth-points .i { color: var(--brand); margin-top: 3px; }
.status-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 4px auto 18px; background: var(--brand-soft); color: var(--brand); }
.status-icon.warn { background: var(--warn-soft); color: var(--warn); }
.status-icon.err { background: var(--err-soft); color: var(--err); }
.auth-card .status-msg { text-align: center; color: var(--text-2); }
@media (max-width: 480px) {
  .main-auth { padding: 24px 12px 48px; }
  .auth-card { padding: 28px 20px 22px; border-radius: var(--radius-lg); }
}

/* ---------- 會員中心 ---------- */
.license-card { position: relative; overflow: hidden; }
.license-card::after { content: ""; position: absolute; right: -80px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, var(--brand-soft) 0%, transparent 70%); pointer-events: none; }
.license-card.is-warn::after { background: radial-gradient(circle, var(--warn-soft) 0%, transparent 70%); }
.license-card.is-err::after { background: radial-gradient(circle, var(--err-soft) 0%, transparent 70%); }
.license-top { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; position: relative; z-index: 1; }
.license-top h2 { margin: 2px 0 4px; font-size: 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.license-top p { margin: 0; color: var(--muted); font-size: 14px; }
.license-card > *:not(.license-top) { position: relative; z-index: 1; }
.license-progress { margin-top: 18px; }
.mini-steps { list-style: none; counter-reset: s; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mini-steps li { counter-increment: s; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; color: var(--text-2); }
.mini-steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-strong); color: var(--on-brand); font-size: 12px; font-weight: 700; margin-right: 8px; }
.mini-steps li.done::before { content: "✓"; }
@media (max-width: 640px) { .mini-steps { grid-template-columns: 1fr; } }
.activate-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.activate-row .hint { margin: 0; }
.dl-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.dl-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.dl-item .who b { display: block; font-size: 14px; }
.dl-item .who span { font-size: 13px; color: var(--muted); }
.devices-meter { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.devices-meter .progress { width: 90px; height: 6px; }

/* ---------- 管理後台 ---------- */
.admin { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.admin-nav { position: sticky; top: calc(var(--topbar-h) + 24px); }
.admin-nav .admin-nav-title { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .06em; padding: 0 12px; margin: 0 0 8px; }
.admin-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.admin-nav a .i { color: var(--muted); }
.admin-nav a:hover { background: var(--surface); text-decoration: none; color: var(--text); }
.admin-nav a.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); border: 1px solid var(--line); padding: 8px 11px; }
.admin-nav a.active .i { color: var(--brand); }
@media (max-width: 960px) {
  .admin { grid-template-columns: 1fr; gap: 16px; }
  .admin-nav { position: static; margin: 0 -16px; padding: 0 16px; overflow-x: auto; border-bottom: 1px solid var(--line); }
  .admin-nav .admin-nav-title { display: none; }
  .admin-nav ul { display: flex; gap: 4px; }
  .admin-nav a, .admin-nav a.active { border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 10px 12px; white-space: nowrap; box-shadow: none; background: none; }
  .admin-nav a.active { border-bottom-color: var(--brand); }
}

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-size: 26px; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 13px; }
@media (max-width: 760px) { .stats { gap: 8px; } .stat { padding: 12px 14px; } .stat .icon-tile { display: none; } .stat b { font-size: 22px; } .stat span { font-size: 12px; line-height: 1.4; display: block; } }

.filter { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.filter input, .filter select { margin: 0; min-height: 40px; }
.filter .input-icon { min-width: 200px; }
.filter select { width: auto; min-width: 130px; }
.filter .btn { min-height: 40px; }
.filter-meta { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  .filter .input-icon { flex-basis: 100%; }
  .filter select { flex: 1; }
  .filter-meta { margin-left: 0; flex-basis: 100%; }
}

.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.profile-head h1, .profile-head h2 { margin: 0; font-size: 20px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.profile-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.action-list { display: grid; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.action-list form { margin: 0; }
.action-list .btn { width: 100%; justify-content: flex-start; }
.extend-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.extend-row form { margin: 0; }
.danger-zone { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--err-line); border-radius: var(--radius); background: var(--err-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.danger-zone b { color: var(--err); display: block; font-size: 14px; }
.danger-zone span { font-size: 13px; color: var(--text-2); }
.danger-zone form { margin: 0; }
.danger-zone .btn-danger { background: var(--surface); }
.sub-title { font-size: 13px; font-weight: 700; color: var(--muted); margin: 20px 0 10px; letter-spacing: .02em; }
.status-line { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; margin: 4px 0 18px; }
.callback-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- 條款頁 ---------- */
.prose { max-width: 820px; margin: 0 auto; line-height: 1.9; color: var(--text-2); }
.card.prose { padding: 44px 48px; }
.prose h1 { color: var(--text); font-size: 30px; margin-bottom: 4px; }
.prose h2 { margin-top: 34px; font-size: 19px; padding-top: 6px; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose b { color: var(--text); }
@media (max-width: 640px) { .card.prose { padding: 26px 20px; } .prose h1 { font-size: 24px; } }

/* =========================================================
   首頁
   ========================================================= */
.section { padding: 96px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.section-head .kicker { display: inline-block; color: var(--link); font-weight: 700; font-size: 14px; letter-spacing: .04em; margin-bottom: 10px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 12px; letter-spacing: -.01em; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }
@media (max-width: 760px) { .section { padding: 64px 0; } .section-head { margin-bottom: 32px; } }

/* Hero */
.hero { position: relative; padding: 72px 0 88px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(700px 400px at 85% 10%, var(--brand-soft-2), transparent 65%),
    radial-gradient(600px 380px at 0% 0%, var(--brand-soft), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 56px; align-items: center; }
.hero-pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 22px; }
.hero-pill .dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.hero h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.22; letter-spacing: -.02em; margin: 0 0 20px; font-weight: 800; }
.hero h1 .hl { color: var(--brand-strong); background: var(--hl-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lead { color: var(--text-2); font-size: clamp(16px, 1.6vw, 18px); line-height: 1.8; margin: 0 0 28px; max-width: 34em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-checks { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: 14px; }
.hero-checks li { display: inline-flex; align-items: center; gap: 7px; }
.hero-checks .i { color: var(--brand); }
@media (max-width: 960px) {
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-checks { justify-content: center; }
}
@media (max-width: 480px) { .hero-cta .btn { flex: 1 1 100%; } }

/* 產品示意圖 */
.mock-stage { position: relative; padding: 0 0 0 0; }
.mock {
  position: relative; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); overflow: hidden; font-size: 12px; line-height: 1.5; color: var(--text);
}
.mock-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.mock-bar i:nth-child(2) { background: #febc2e; }
.mock-bar i:nth-child(3) { background: #28c840; }
.mock-bar span { margin-left: 10px; font-weight: 600; color: var(--muted); font-size: 12px; }
.mock-body { display: grid; grid-template-columns: 48px 170px minmax(0, 1fr); height: 380px; }
.mock-side { background: var(--surface-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; }
.mock-side b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--muted); }
.mock-side b.on { background: var(--brand-soft); color: var(--brand); }
.mock-list { border-right: 1px solid var(--line); overflow: hidden; }
.mock-list-head { padding: 12px 12px 8px; font-weight: 700; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.mock-list-head em { font-style: normal; font-size: 11px; background: var(--brand-strong); color: var(--on-brand); border-radius: 99px; padding: 0 7px; }
.mock-conv { display: flex; gap: 9px; padding: 9px 12px; border-top: 1px solid var(--line); }
.mock-conv.on { background: var(--brand-soft); }
.mock-ava { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; background: #7c8a83; }
.mock-ava.a { background: #e58a5b; } .mock-ava.b { background: #5b8de5; } .mock-ava.c { background: #b06ad9; } .mock-ava.d { background: #3fb68b; }
.mock-conv div { min-width: 0; flex: 1; }
.mock-conv strong { display: flex; justify-content: space-between; font-size: 12px; }
.mock-conv strong small { font-weight: 400; color: var(--muted); font-size: 10.5px; }
.mock-conv p { margin: 0; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-tag { display: inline-block; font-size: 10px; font-weight: 600; padding: 0 6px; border-radius: 4px; margin-top: 3px; background: var(--surface-3); color: var(--text-2); }
.mock-tag.g { background: var(--brand-soft-2); color: var(--ok-text); }
.mock-tag.o { background: var(--warn-soft); color: var(--warn); }
.mock-chat { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.mock-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.mock-chat-head strong { font-size: 13px; }
.mock-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--brand-soft); color: var(--ok-text); white-space: nowrap; }
.mock-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.mock-msgs { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 9px; overflow: hidden; }
.bubble { max-width: 78%; padding: 8px 11px; border-radius: 14px; font-size: 12px; line-height: 1.55; }
.bubble.in { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.out { align-self: flex-end; background: var(--brand-strong); color: var(--on-brand); border-bottom-right-radius: 4px; }
.bubble-meta { align-self: flex-end; font-size: 10px; color: var(--muted); margin-top: -5px; display: flex; align-items: center; gap: 4px; }
.mock-booking { align-self: flex-end; width: 74%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mock-booking .bk-top { background: var(--brand-soft); color: var(--ok-text); font-weight: 700; padding: 6px 10px; display: flex; align-items: center; gap: 6px; font-size: 11.5px; }
.mock-booking .bk-body { padding: 8px 10px; display: grid; gap: 2px; }
.mock-booking .bk-body span { color: var(--muted); font-size: 11px; }
.mock-sys { align-self: center; font-size: 10.5px; color: var(--muted); background: var(--surface-3); border-radius: 99px; padding: 2px 10px; }
.mock-compose { display: flex; gap: 6px; padding: 9px 12px; border-top: 1px solid var(--line); background: var(--surface); align-items: center; }
.mock-compose span { font-size: 10.5px; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.mock-compose i { flex: 1; height: 26px; border-radius: 8px; background: var(--surface-2); }
.mock-float {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  font-size: 12.5px; line-height: 1.4; animation: float 6s ease-in-out infinite;
}
.mock-float b { display: block; font-size: 13px; }
.mock-float span { color: var(--muted); }
.mock-float.f1 { left: -28px; bottom: 36px; }
.mock-float.f2 { right: -18px; top: 64px; animation-delay: -3s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (max-width: 1200px) { .mock-float.f1 { left: 12px; bottom: -22px; } .mock-float.f2 { right: 12px; top: -20px; } }
@media (max-width: 720px) {
  .mock-body { grid-template-columns: minmax(0, 1fr); height: 360px; }
  .mock-side, .mock-list { display: none; }
  .mock-float.f2 { display: none; }
  .mock-float.f1 { left: 50%; transform: translateX(-50%); bottom: -24px; animation: none; white-space: nowrap; }
}

/* 三步驟 */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; position: relative; }
.steps::before { content: ""; position: absolute; top: 34px; left: 16%; right: 16%; border-top: 2px dashed var(--line-strong); z-index: 0; }
.step { position: relative; z-index: 1; text-align: center; padding: 0 12px; }
.step-num { position: relative; display: inline-grid; place-items: center; width: 68px; height: 68px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--brand); margin-bottom: 18px; }
.step-num em { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-strong); color: var(--on-brand); font-style: normal; font-size: 12px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--bg); }
.section-alt .step-num em { box-shadow: 0 0 0 3px var(--surface); }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { margin: 0 auto; color: var(--muted); max-width: 26ch; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .steps::before { top: 30px; bottom: 30px; left: 34px; right: auto; border-top: 0; border-left: 2px dashed var(--line-strong); }
  .step { display: grid; grid-template-columns: 68px 1fr; gap: 0 18px; text-align: left; padding: 0; align-items: start; }
  .step-num { margin: 0; grid-row: span 2; }
  .step h3 { margin-top: 8px; }
  .step p { margin: 0; max-width: none; }
}

/* 功能 */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s, border-color .2s; }
.feature:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--brand-soft-2); }
.feature .icon-tile { margin-bottom: 18px; }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--muted); margin: 0 0 16px; }
.feature ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.feature li { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); }
.feature li .i { color: var(--brand); }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; gap: 14px; } .feature { padding: 22px; } }

/* 架構／信任 */
.trust { position: relative; overflow: hidden; color: #e6f4ec; background: #07291a; border-radius: 28px; padding: 64px 56px; isolation: isolate; }
.trust::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(600px 300px at 90% 0%, rgba(6, 169, 77, .45), transparent 70%), radial-gradient(500px 300px at 0% 100%, rgba(0, 195, 137, .25), transparent 70%); }
.trust .kicker { color: #6fe3a1; font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.trust h2 { color: #fff; font-size: clamp(26px, 3.4vw, 36px); margin: 10px 0 14px; }
.trust > .trust-grid > div > p { color: #b8d4c4; font-size: 17px; margin: 0 0 28px; }
.trust-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.trust-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.trust-points li { display: flex; gap: 14px; }
.trust-points .icon-tile { background: rgba(111, 227, 161, .14); color: #6fe3a1; }
.trust-points b { display: block; color: #fff; font-size: 16px; margin-bottom: 2px; }
.trust-points span { color: #b8d4c4; font-size: 14px; }
.arch { display: grid; gap: 14px; }
.arch-node { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.arch-node b { color: #fff; display: block; font-size: 15px; }
.arch-node span { color: #a9c6b6; font-size: 13px; }
.arch-node .icon-tile { background: rgba(255, 255, 255, .1); color: #fff; }
.arch-node.core { background: rgba(6, 169, 77, .18); border-color: rgba(111, 227, 161, .5); box-shadow: 0 0 0 6px rgba(6, 169, 77, .08); padding: 20px; flex-direction: column; align-items: stretch; }
.arch-node.core .core-head { display: flex; gap: 14px; align-items: center; }
.arch-node.core .icon-tile { background: #06a94d; color: #fff; }
.arch-svcs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.arch-svcs span { display: block; text-align: center; font-size: 12px; font-weight: 600; color: #e6f4ec; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; padding: 6px 4px; }
.arch-link { display: flex; align-items: center; justify-content: center; gap: 8px; color: #8fbfa5; font-size: 12px; }
.arch-link::before, .arch-link::after { content: ""; flex: 0 0 1px; height: 14px; background: rgba(255, 255, 255, .25); }
@media (max-width: 960px) { .trust { padding: 44px 24px; border-radius: 22px; } .trust-grid { grid-template-columns: 1fr; gap: 36px; } }
@media (max-width: 480px) { .arch-svcs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .trust { margin: 0 -4px; } }

/* 下載 */
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.platform { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-sm); }
.platform.primary { border-color: var(--brand-soft-2); box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow-sm); }
.platform-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.platform h3 { margin: 0; font-size: 18px; }
.platform p { color: var(--muted); font-size: 14px; margin: 0 0 18px; flex: 1; }
.platform .btn, .platform .soon { margin-top: auto; }
.soon { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border-radius: 10px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 14px; font-weight: 600; }
@media (max-width: 860px) { .platforms { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 800px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color .2s; }
.faq details[open] { border-color: var(--brand-soft-2); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 600; font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-radius: var(--radius); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:focus-visible { outline: none; box-shadow: var(--ring); }
.faq summary .i { color: var(--muted); transition: transform .2s; }
.faq details[open] summary .i { transform: rotate(180deg); color: var(--brand); }
.faq .faq-a { padding: 0 22px 20px; color: var(--text-2); }
.faq .faq-a p:last-child { margin: 0; }

/* 最後行動呼籲 */
.cta-band { text-align: center; padding: 64px 24px; border-radius: 28px; background: linear-gradient(135deg, #04612b 0%, #05843b 50%, #06903f 100%); color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(500px 240px at 50% 0%, rgba(255, 255, 255, .14), transparent 70%); }
.cta-band h2 { color: #fff; font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 10px; }
.cta-band p { color: rgba(255, 255, 255, .92); font-size: 17px; margin: 0 auto 28px; max-width: 34em; }
.cta-band .hero-cta { justify-content: center; }
@media (max-width: 480px) { .cta-band { padding: 44px 20px; border-radius: 22px; } }

/* ---------- 員工與權限（會員中心） ---------- */
.member-list { list-style: none; margin: 0; padding: 0; }
.member-item { padding: 16px 22px; border-bottom: 1px solid var(--line); }
.member-item:last-child { border-bottom: 0; }
.member-main { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 10px 16px; align-items: center; }
.member-name { display: block; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.member-sub { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.member-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.member-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.member-actions form { margin: 0; }
.member-edit { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.member-edit[open] { border-color: var(--brand-soft-2); }
.member-edit summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-size: 13px; font-weight: 600; color: var(--text-2); border-radius: var(--radius); }
.member-edit summary::-webkit-details-marker { display: none; }
.member-edit summary:focus-visible { outline: none; box-shadow: var(--ring); }
.member-edit summary .i:last-child { margin-left: auto; color: var(--muted); transition: transform .2s; }
.member-edit[open] summary .i:last-child { transform: rotate(180deg); }
.member-edit form { padding: 4px 14px 14px; }
.member-edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 0 14px; }
.member-edit .field { margin-bottom: 12px; }
.team-section { padding: 22px; border-top: 1px solid var(--line); }
.team-h { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 15px; }
.team-h .i { color: var(--brand); }
.field.is-off > label, .field.is-off .hint { opacity: .55; }
.field input:disabled { background: var(--surface-2); cursor: not-allowed; }
.role-table td:first-child { width: 1%; }
@media (max-width: 860px) {
  .member-main { grid-template-columns: minmax(0, 1fr); }
  .member-actions { justify-content: flex-start; }
  .member-edit-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .member-item { padding: 14px 18px; }
  .team-section { padding: 18px; }
  .role-table td:first-child { width: auto; }
}

/* 動畫偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 列印 */
@media print {
  .topbar, .foot, .skip-link, .admin-nav { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
