:root { --ink: #14202b; --muted: #6b7c8f; --brand: #2f86e0; --ok: #1a9c5b; --warn: #d9822b; --bad: #d64545; --line: #e3e9f1; }
* { box-sizing: border-box; }
body { margin: 0; background: linear-gradient(180deg, #eef4fb 0%, #f6f8fb 320px); color: var(--ink);
  font-family: "Noto Sans CJK TC", "Noto Sans CJK SC", "PingFang TC", -apple-system, sans-serif; font-size: 15px; }
.fwrap { max-width: 560px; margin: 0 auto; padding: 18px 16px 40px; }
.fhead { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.flogo { width: 38px; height: 38px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 800;
  display: grid; place-items: center; font-size: 18px; }
.fhead b { display: block; font-size: 16px; }
.fhead small { color: var(--muted); font-size: 12px; }
.fadmin { margin-left: auto; font-size: 12.5px; color: var(--brand); text-decoration: none; font-weight: 600; }
.fhero { margin: 6px 0 16px; }
.fhero h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: -.2px; }
.fhero p { margin: 0; color: #4c6176; font-size: 13.5px; line-height: 1.7; }
.fcard { background: #fff; border-radius: 16px; padding: 20px 18px; box-shadow: 0 8px 24px rgba(20, 40, 70, .08); }
.fcard label { display: block; font-size: 13px; color: #40566b; font-weight: 700; margin: 14px 0 6px; }
.fcard label:first-child { margin-top: 0; }
.fcard input, .fcard select, .fcard textarea { width: 100%; border: 1px solid var(--line); border-radius: 11px;
  padding: 12px 13px; font-size: 15px; background: #fbfdff; color: var(--ink); font-family: inherit; }
.fcard input:focus, .fcard select:focus, .fcard textarea:focus { outline: 2px solid #b9d7f6; border-color: var(--brand); }
.frow { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; }
.fhint { color: var(--muted); font-size: 12px; margin: 6px 0 0; line-height: 1.6; }
.fhint.center { text-align: center; }
.fsubmit { display: block; width: 100%; margin-top: 18px; background: var(--brand); color: #fff; border: none;
  border-radius: 12px; padding: 14px; font-size: 16px; font-weight: 800; cursor: pointer; text-align: center; text-decoration: none; }
.fsubmit:hover { background: #2673c4; }
.ferror { background: #fdeaea; color: #b83535; border-radius: 12px; padding: 12px 14px; font-size: 13.5px; margin-bottom: 14px; line-height: 1.6; }
.ffoot { color: #93a3b3; font-size: 12px; text-align: center; margin-top: 22px; line-height: 1.7; }

/* 追蹤頁 */
.fstatus { border-radius: 12px; padding: 12px 14px; font-weight: 800; font-size: 15px; margin-bottom: 16px; }
.fstatus.wait { background: #eef4fd; color: var(--brand); }
.fstatus.ok { background: #e6f6ed; color: var(--ok); }
.fstatus.bad { background: #fdeaea; color: var(--bad); }
.fsteps { list-style: none; margin: 0; padding: 0; }
.fsteps li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; font-size: 14px; color: #8b9aab; line-height: 1.5; }
.fsteps li .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #d6dfe9; flex: 0 0 18px; margin-top: 2px; }
.fsteps li.done { color: var(--ink); }
.fsteps li.done .dot { background: var(--ok); border-color: var(--ok); }
.fsteps li.now { color: var(--ink); font-weight: 700; }
.fsteps li.now .dot { border-color: var(--brand); background: #d9eafc; }
.fsteps li.warn { color: var(--warn); font-weight: 700; }
.fsteps li.warn .dot { border-color: var(--warn); background: #fdeedc; }
.fsteps li.bad { color: var(--bad); font-weight: 700; }
.fsteps li.bad .dot { border-color: var(--bad); background: #fbdcdc; }
.fmeta { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 12px; display: grid; gap: 10px; }
.fmeta span { display: block; color: var(--muted); font-size: 12px; }
.fmeta b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; }

.fok { background: #e6f6ed; color: var(--ok); border-radius: 12px; padding: 12px 14px; font-weight: 800;
  font-size: 14px; margin-bottom: 14px; }
.fnext { border-radius: 12px; padding: 14px 16px; margin: 4px 0 14px; line-height: 1.65; font-size: 14px; }
.fnext b { display: block; font-size: 13px; margin-bottom: 4px; }
.fnext p { margin: 0; }
.fnext.wait { background: #eef4fd; color: #1c4f86; }
.fnext.ok { background: #e6f6ed; color: #17663c; }
.fnext.warn { background: #fff6e5; color: #8a5a00; }
.fnext.bad { background: #fdeaea; color: #b83535; }
.fsubmit.small { display: inline-block; width: auto; padding: 10px 18px; font-size: 14px; margin-top: 10px; }
.fsubmit.ghost { background: #fff; color: var(--brand); border: 1.5px solid var(--brand); }
.fsubmit.ghost:hover { background: #eef4fd; }
.fsubmit[disabled] { opacity: .6; cursor: wait; }
.fcopy { display: block; width: 100%; margin-top: 16px; background: #f2f6fa; color: var(--ink);
  border: 1.5px dashed #c7d4e2; border-radius: 12px; padding: 12px; font-size: 14px; font-weight: 700; cursor: pointer; }
.fhint.tight { margin: 4px 0 0; }

.ferror ul { margin: 6px 0 0; padding-left: 18px; }
.ferror li { margin: 2px 0; }
.fcard input.bad, .fcard select.bad { border-color: #e06a6a; background: #fff7f7; }

.fstatus.warn { background: #fff6e5; color: #8a5a00; }

.fauto { text-align: center; color: #7d8c9c; font-size: 12px; margin: 14px 0 0; }

.fnav { margin-left: auto; display: flex; gap: 14px; font-size: 14px; }
.fnav a { color: var(--brand); text-decoration: none; font-weight: 700; }
.fmlist { list-style: none; margin: 0; padding: 0; }
.fmlist li { border-bottom: 1px dashed var(--line); }
.fmlist li:last-child { border-bottom: none; }
.fmlist a { display: block; padding: 14px 2px; text-decoration: none; color: var(--ink); }
.fmrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.fmrow b { font-size: 16px; }
.fmlist small { color: var(--muted); font-size: 12px; }
.fmbadge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.fmbadge.ok { background: #e6f6ed; color: #17663c; }
.fmbadge.wait { background: #eef4fd; color: #1c4f86; }
.fmbadge.warn { background: #fff6e5; color: #8a5a00; }
.fmbadge.bad { background: #fdeaea; color: #b83535; }

.fdetails summary { display: block; list-style: none; cursor: pointer; font-weight: 800; font-size: 15px; color: var(--ink); }
.fdetails summary::-webkit-details-marker { display: none; }
.fdetails summary::before { content: "▸ "; color: var(--brand); }
.fdetails[open] summary::before { content: "▾ "; }
.fdetails summary + p { margin-top: 10px; }

.ftgbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #e6f6ed;
  color: #17663c; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; font-weight: 700; margin-bottom: 14px; }
.ftgbar form { margin: 0; }
.ftgbar button { background: none; border: 1px solid #9ed3b4; color: #17663c; border-radius: 8px; padding: 4px 10px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; }
.ftgcard { text-align: center; }
.ftgcard b { font-size: 16px; }
.ftgcard code { background: #eef2f6; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }

.ftgsoon { display: inline-block; background: #f2f6fa; color: #6b7b8c; border: 1.5px dashed #c7d4e2;
  border-radius: 10px; padding: 12px 16px; font-size: 13.5px; font-weight: 700; }
/* v0.7 流程修正 */
.fquick{display:flex;gap:8px;margin-top:10px}
.fquick>div{flex:1;min-width:0;background:#fff;border:1px solid #e6e9f0;border-radius:12px;padding:10px 6px;text-align:center;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.fquick b{display:block;font-size:20px;margin-bottom:2px}
.fquick span{font-size:12px;color:#475467;line-height:1.35;display:block}
.fstepbar{display:flex;align-items:center;gap:8px;margin:0 0 16px}
.fstepbar>div{display:flex;align-items:center;gap:6px;font-size:13px;color:#98a2b3;font-weight:600}
.fstepbar i{width:20px;height:20px;border-radius:50%;background:#eef1f6;color:#667085;font-style:normal;font-size:12px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 20px}
.fstepbar .on{color:#0f766e}
.fstepbar .on i{background:#0f766e;color:#fff}
.fstepbar .sep{flex:1;height:2px;background:#eef1f6;border-radius:2px;min-width:12px}
.fstep.is-hidden{display:none}
.fback{background:none;border:0;color:#667085;font-size:13px;padding:0 0 12px;cursor:pointer;font-family:inherit}
.faddr{display:flex;gap:8px;align-items:stretch}
.faddr input{flex:1;min-width:0;margin:0}
.fpaste{flex:0 0 auto;border:1px solid #cfd6e4;background:#f8fafc;color:#344054;border-radius:10px;padding:0 14px;font-size:14px;font-weight:600;cursor:pointer;font-family:inherit}
.fmask{margin:6px 0 0;font-size:12.5px;color:#98a2b3;min-height:16px}
.fmask.ok{color:#0f766e;font-weight:600}
.fmore{margin:14px 0 4px;border-top:1px dashed #e4e7ec;padding-top:10px}
.fmore summary{cursor:pointer;color:#475467;font-size:13.5px;font-weight:600}
.flink{font-size:12px;font-weight:600;color:#0f766e;margin-left:6px;text-decoration:none;white-space:nowrap}
.fcancel{margin:10px 0 0;text-align:center}
.flinkbtn{background:none;border:0;color:#98a2b3;font-size:12.5px;text-decoration:underline;cursor:pointer;padding:4px;font-family:inherit}

.fmeta b span[hidden]{display:none!important}

/* 收款帳戶清單（三端串接） */
.facc-h { font-size: 15px; margin: 20px 0 10px; }
.facc { display: flex; flex-direction: column; gap: 10px; }
.facc-row { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fbfdff; }
.facc-row.now { border-color: #f0c48a; background: #fff8ee; }
.facc-row.wait { border-color: #bcd8f5; background: #f2f8ff; }
.facc-row.done { border-color: #a9dfc2; background: #f1fbf5; }
.facc-row.warn { border-color: #f0c48a; background: #fff8ee; }
.facc-row.bad { border-color: #f0b4b4; background: #fff5f5; }
.facc-main b { display: block; font-size: 14.5px; }
.facc-main span { display: block; font-size: 13px; color: #4c6176; margin-top: 4px; line-height: 1.5; }
.facc-up { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.facc-up input[type=file] { font-size: 12.5px; color: #4c6176; }
