/* 客人繳款查詢頁（spec 2026-11-19 §5）。獨立於後台的 Tailwind；顏色 token 照 spec。 */
:root {
  --bg-1: #D5EFE6; --bg-2: #EDF7F3; --bg-3: #F7FAF8;
  --card: #FFFFFF; --ink: #142821; --ink-2: #4A5C55; --line: #E1EDE8; --line-2: #C5DAD1;
  --brand: #0E7C66; --brand-hover: #0B6857; --brand-soft: #DDF0EA; --pay: #22806C; --pay-ink: #FFFFFF; --pay-ink-2: #E2F3EE;
  --danger: #B42318; --danger-soft: #FDF1EF; --late: #8A5A00; --rest: #E2EEE9;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg-1: #0F1A17; --bg-2: #121D1A; --bg-3: #121D1A;
    --card: #17231F; --ink: #E5EEEA; --ink-2: #A9BAB3; --line: #26352F; --line-2: #3A4D46;
    --brand: #3FBF9F; --brand-hover: #6CD3B9; --brand-soft: #143229; --pay: #1D6E5D; --pay-ink: #FFFFFF; --pay-ink-2: #D7EEE7;
    --danger: #F97066; --danger-soft: #3A1D1A; --late: #E3B341; --rest: #26352F;
  }
}
* { box-sizing: border-box; }
body.pt { margin: 0; min-height: 100vh; color: var(--ink);
  background: linear-gradient(180deg, var(--bg-1) 0, var(--bg-2) 320px, var(--bg-3) 640px) no-repeat, var(--bg-3);
  font-family: "Nunito", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-variant-numeric: tabular-nums; font-size: 16px; line-height: 1.6; }
.pt-wrap { max-width: 1120px; margin: 0 auto; padding: 24px 18px 32px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 768px) { .pt-wrap { padding: 32px 32px 40px; gap: 24px; } }
.pt-brand { margin: 0; font-weight: 800; color: var(--brand); }
.pt-h1 { margin: 0; font-size: 24px; font-weight: 700; }
@media (min-width: 768px) { .pt-h1 { font-size: 32px; } }
.pt-h3 { margin: 16px 0 4px; font-size: 16px; }
.pt-lead { margin: 0; color: var(--ink-2); }
.pt-muted { margin: 0; color: var(--ink-2); font-size: 14px; }
.pt-ok { color: var(--brand); font-weight: 800; }
.pt-card { background: var(--card); border-radius: 24px; padding: 20px; border: 1px solid transparent; }
@media (prefers-color-scheme: dark) { .pt-card { border-color: var(--line); } }
.pt-message p { margin: 0; font-size: 17px; }
a { color: var(--brand); }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
a, button { cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s; }

.pt-form { display: flex; flex-direction: column; gap: 10px; }
.pt-label { font-weight: 800; }
.pt-input { height: 58px; border: 2px solid var(--line-2); border-radius: 14px; padding: 0 18px; font: inherit;
  font-size: 26px; font-weight: 800; letter-spacing: .5em; color: var(--ink); background: var(--card); width: 100%; }
.pt-input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.pt-input.is-error { border-color: var(--danger); }
.pt-error { margin: 0; color: var(--danger); font-weight: 700; font-size: 14px; }

.pt-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 20px;
  border-radius: 999px; border: 0; font: inherit; font-weight: 800; text-decoration: none; }
.pt-btn-primary { background: var(--brand); color: #FFFFFF; }
.pt-btn-primary:hover { background: var(--brand-hover); }
.pt-btn-line { background: #06C755; color: #FFFFFF; }
.pt-btn-line:hover { background: #05A648; color: #FFFFFF; }
.pt-btn-ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.pt-btn-ghost:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--brand); }
.pt-link { min-height: 44px; border: 0; background: none; color: var(--brand); font: inherit; font-weight: 800; padding: 0; }
.pt-link:hover { color: var(--brand-hover); text-decoration: underline; }

.pt-alert { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 22px; padding: 14px 16px; }
.pt-alert strong { color: var(--danger); }
.pt-alert p { margin: 0; color: var(--ink-2); font-size: 14px; }
.pt-alert-icon { flex: none; width: 40px; height: 40px; border-radius: 999px; background: var(--danger-soft);
  color: var(--danger); display: flex; align-items: center; justify-content: center; }

.pt-grid { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.pt-col { flex: 1.2 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pt-periods { flex: 1 1 380px; min-width: 0; }
@media (max-width: 520px) { .pt-col, .pt-periods { flex-basis: 100%; } }

.pt-paycard { position: relative; overflow: hidden; border-radius: 24px; padding: 22px 20px; background: var(--pay);
  color: var(--pay-ink); display: flex; flex-direction: column; gap: 14px; }
.pt-paycard::after { content: ""; position: absolute; right: -50px; bottom: -70px; width: 220px; height: 220px;
  border-radius: 999px; border: 30px solid rgba(255,255,255,.09); pointer-events: none; }
.pt-paycard-head { display: flex; justify-content: space-between; align-items: center; color: var(--pay-ink-2); }
.pt-amount { margin: 0; font-size: 54px; font-weight: 800; line-height: 1; }
@media (min-width: 768px) { .pt-amount { font-size: 72px; } }
.pt-cur { font-size: 18px; font-weight: 500; margin-right: 6px; color: var(--pay-ink-2); }
.pt-paycard-sub { margin: 0; color: var(--pay-ink-2); }
.pt-paycard-sub strong { color: var(--pay-ink); }
.pt-paycard-acct { border-top: 1px solid rgba(255,255,255,.25); padding-top: 14px; display: flex; flex-direction: column; gap: 4px; position: relative; z-index: 1; }
.pt-paycard-bank { font-size: 13px; color: var(--pay-ink-2); }
.pt-acct-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pt-acct { font-size: 22px; font-weight: 800; letter-spacing: .06em; }
.pt-copy { min-height: 44px; min-width: 76px; padding: 0 14px; border: 0; border-radius: 12px; background: #FFFFFF;
  color: #0E7C66; font: inherit; font-weight: 800; }
.pt-copy:hover { background: #DDF0EA; }
.pt-paycard-done { align-items: center; }
.pt-done { margin: 0; font-size: 22px; font-weight: 800; }
.pt-pill { font-size: 13px; font-weight: 800; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.pt-pill-onCard { background: #FFFFFF; color: #B42318; }
.pt-pill-danger { background: var(--danger); color: #FFFFFF; }
.pt-pill-ok { background: var(--brand-soft); color: var(--brand); }

.pt-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pt-qr-img { background: #FFFFFF; border-radius: 14px; padding: 6px; line-height: 0; }
.pt-qr-img svg { width: 140px; height: 140px; }
@media (min-width: 768px) { .pt-qr { flex-direction: row; text-align: left; } .pt-qr-img svg { width: 160px; height: 160px; } }

.pt-progress { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
@media (min-width: 768px) { .pt-progress { flex-direction: row; text-align: left; } }
.pt-ring { width: 112px; height: 112px; flex: none; }
@media (min-width: 768px) { .pt-ring { width: 128px; height: 128px; } }
.pt-ring circle { fill: none; stroke-width: 12; transform: rotate(-90deg); transform-origin: 50% 50%; }
.pt-ring-track { stroke: var(--rest); }
.pt-ring-paid { stroke: var(--brand); }
.pt-ring-over { stroke: #E06A5C; }
.pt-ring-num { font-size: 26px; font-weight: 800; text-anchor: middle; fill: var(--ink); }
.pt-ring-sub { font-size: 11px; text-anchor: middle; fill: var(--ink-2); }
.pt-legend { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.pt-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 4px 0 10px; }
.pt-dot-paid { background: var(--brand); } .pt-dot-over { background: #E06A5C; } .pt-dot-rest { background: var(--line-2); }

.pt-periods-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 44px; }
.pt-periods-head h2 { margin: 0; font-size: 17px; }
.pt-period-list { list-style: none; margin: 0; padding: 0; }
.pt-period { display: grid; grid-template-columns: 1fr auto 88px; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.pt-period.is-extra { display: none; }
.pt-period-no, .pt-period-amt { display: flex; flex-direction: column; }
.pt-period-no span, .pt-period-when { font-size: 13px; color: var(--ink-2); }
.pt-period-amt { align-items: flex-end; }
.pt-period-mark { justify-self: center; font-size: 13px; color: var(--ink-2); text-align: center; }
.pt-period.is-overdue { background: var(--danger-soft); border-radius: 10px; padding: 10px 8px; margin: 0 -8px; border-top-color: transparent; }
.pt-period.is-overdue strong, .pt-period.is-overdue .pt-period-mark, .pt-period.is-overdue .pt-period-when { color: var(--danger); font-weight: 800; }
.pt-period.is-late .pt-period-when { color: var(--late); font-weight: 700; }
.pt-period.is-partial .pt-period-mark { color: var(--brand); font-weight: 800; }
.pt-period.is-settled, .pt-period.is-not_due { color: var(--ink-2); }
.pt-stamp { display: inline-block; font-family: "Noto Serif TC", serif; font-size: 12px; font-weight: 700;
  border: 1.5px solid currentColor; border-radius: 4px; padding: 2px 6px; transform: rotate(-5deg); }
.pt-stamp-ok { color: var(--brand); } .pt-stamp-late { color: var(--late); transform: rotate(4deg); }
.pt-show-all { width: 100%; }
.pt-payments { list-style: none; margin: 0; padding: 0; }
.pt-payments li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.pt-payments small { display: block; color: var(--ink-2); font-size: 13px; }

.pt-contract { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.pt-contract:hover { color: var(--ink); box-shadow: 0 10px 28px -18px rgba(14,90,74,.6); }
.pt-contract.is-overdue { background: var(--pay); color: var(--pay-ink); }
.pt-contract.is-overdue .pt-muted { color: var(--pay-ink-2); }
.pt-contract.is-overdue .pt-pill-danger { background: #FFFFFF; color: #B42318; }
.pt-contract-head, .pt-contract-body { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.pt-contract-body > span:first-child { display: flex; flex-direction: column; }
.pt-amount-md { font-size: 34px; font-weight: 800; line-height: 1.05; }
.pt-more { font-weight: 800; }
.pt-row-link { display: flex; justify-content: space-between; align-items: center; min-height: 56px; border-radius: 18px;
  padding: 0 20px; background: var(--brand-soft); color: var(--ink-2); text-decoration: none; }
.pt-row-link:hover { color: var(--ink); }

.pt-contact { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.pt-contact-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
