/* 福來偉 會員子頁豪華版 fx-member-sub（2026-11-01 本機預覽，Grok Bot，August 核准做預覽）
   套用頁：/member/order.php、my-orders.php、notifications.php、login.php、register.php、verify.php
   需搭配 /css/fx-member.css（共用 .fm-bg / .fm-main / .fm-card / .fm-btn / 進場與描線）與 /js/fx-member.js。
   只改外觀；表單欄位、name、CSRF、文案、資料完全不動。動畫只動 transform / opacity / stroke-dashoffset；減少動態全部關閉。 */

/* 子頁比首頁窄一點，閱讀與填表更集中 */
.fm-main.fm-sub { max-width: 32rem; }
@media (min-width: 1024px) { .fm-main.fm-sub { max-width: 36rem; padding-bottom: 4rem; } }
.fm-main.fm-auth { max-width: 28rem; }
.fm-sub .fm-head { justify-content: space-between; }
.fm-sub .fm-stack { display: grid; gap: 1rem; }
.fm-sub .fm-intro { margin-bottom: 1.1rem; }

.fm-headlink {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(var(--fx-gold),.45); background: rgba(var(--fx-gold),.08); color: var(--fm-gold) !important;
  font-size: 16px; text-decoration: none !important; white-space: nowrap;
}
.fm-headlink:hover { border-color: rgba(246,227,161,.85); }

/* 標題下金線（描線進場） */
.fm-rule { display: block; width: 100%; height: 8px; margin: .2rem 0 .8rem; overflow: visible; }
.fm-rule path { fill: none; stroke: rgb(var(--fx-gold)); stroke-width: 1.2; stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: .7;
  transition: stroke-dashoffset 1.6s cubic-bezier(.55,0,.25,1) .15s; }
.fm-rule circle { fill: var(--fm-gold); opacity: 0; transition: opacity .6s ease 1.5s; }
.fm-in .fm-rule path, .fm-rule.fm-in path { stroke-dashoffset: 0; }
.fm-in .fm-rule circle, .fm-rule.fm-in circle { opacity: .95; }

/* 提示訊息 */
.fm-alert { border-radius: 14px; padding: .8rem 1rem; font-size: 16px; line-height: 1.6; margin-bottom: 1rem; border: 1px solid; }
.fm-alert.ok { border-color: rgba(120,200,150,.45); background: rgba(40,90,60,.22); color: var(--fm-ok); }
.fm-alert.err { border-color: rgba(230,110,100,.5); background: rgba(110,30,25,.25); color: var(--fm-err); }
.fm-alert.info { border-color: rgba(var(--fx-gold),.3); background: rgba(var(--fx-gold),.06); color: var(--fm-dim); }
.fm-alert.info p + p { margin-top: .3rem; }
.fm-alert a { color: var(--fm-gold); text-decoration: underline; }
.fm-alert strong { color: var(--fm-gold); }

/* 表單 */
.fm-form { display: grid; gap: 1rem; }
.fm-field > label, .fm-field-label { display: block; font-size: 16px; color: var(--fm-dim); letter-spacing: 1px; margin-bottom: .35rem; }
.fm-input {
  width: 100%; min-height: 52px; border-radius: 14px; padding: .7rem .95rem; font-size: 17px;
  background: rgba(8,8,10,.7); color: var(--fm-gold); border: 1px solid rgba(var(--fx-gold),.28);
  box-shadow: inset 0 1px 0 rgba(255,235,180,.04); outline: none;
  transition: border-color .25s ease, box-shadow .25s ease;
  -webkit-appearance: none; appearance: none;
}
.fm-input::placeholder { color: rgba(243,226,176,.45); }
.fm-input:focus { border-color: rgba(246,227,161,.9); box-shadow: 0 0 0 3px rgba(var(--fx-gold),.18), 0 0 18px rgba(var(--fx-gold),.15); }
select.fm-input {
  background-image: linear-gradient(45deg, transparent 50%, var(--fm-gold) 50%), linear-gradient(135deg, var(--fm-gold) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.4rem;
}
select.fm-input option { background: #111; color: var(--fm-gold); }
.fm-input.fm-upper { text-transform: uppercase; letter-spacing: 2px; }

/* 數量：三色卡 */
.fm-qty { border: 1px solid rgba(var(--fx-gold),.22); border-radius: 18px; padding: .9rem; margin: 0; }
.fm-qty legend { padding: 0 .4rem; font-size: 16px; color: var(--fm-gold); letter-spacing: 1px; }
.fm-qty-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: .3rem; }
.fm-qty-grid label { display: flex; flex-direction: column; align-items: center; gap: .45rem; font-size: 16px; color: var(--fm-text);
  border-radius: 14px; padding: .7rem .4rem; background: rgba(0,0,0,.25); border: 1px solid rgba(var(--fx-gold),.14); }
.fm-swatch { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(var(--fx-gold),.55), 0 0 14px rgba(var(--fx-gold),.25); }
.fm-swatch.black { background: radial-gradient(circle at 35% 30%, #5a5a5a, #121212 70%); }
.fm-swatch.red { background: radial-gradient(circle at 35% 30%, var(--fm-err2), var(--fm-err3) 70%); }
.fm-swatch.blue { background: radial-gradient(circle at 35% 30%, #7fb0e6, #1d4d8a 70%); }
.fm-qty-grid .fm-input { text-align: center; padding: .5rem .3rem; min-height: 48px; }

/* 訂單／通知列表卡 */
.fm-list { display: grid; gap: .8rem; }
.fm-item { position: relative; border-radius: 18px; padding: 1rem 1.1rem; background: rgba(18,16,12,.7); border: 1px solid rgba(var(--fx-gold),.18);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.fm-live .fm-item:not(.fm-in) { opacity: 0; transform: translateY(10px); }
.fm-item-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .7rem; }
.fm-item .no { color: var(--fm-gold); font-weight: 700; font-family: ui-monospace, Menlo, monospace; font-size: 16px; letter-spacing: 1px; word-break: break-all; }
.fm-item .t { font-size: 16px; color: var(--fm-dim); margin-top: .2rem; }
.fm-item .amt { margin-top: .55rem; font-size: 17px; color: var(--fm-text); }
.fm-item .amt b { color: var(--fm-gold); font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.fm-item.unread { border-color: rgba(var(--fx-gold),.55); box-shadow: 0 0 0 1px rgba(var(--fx-gold),.12) inset, 0 8px 24px rgba(var(--fx-gold),.08); }
.fm-item.unread::before { content: ""; position: absolute; left: -1px; top: 16px; bottom: 16px; width: 3px; border-radius: 3px; background: var(--fm-gold); box-shadow: 0 0 10px rgba(var(--fx-gold),.8); }
.fm-item .ttl { color: var(--fm-gold); font-weight: 700; font-size: 17px; }
.fm-item pre { margin-top: .7rem; white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 16px; line-height: 1.75; color: rgba(243,226,176,.85); }
.fm-mini { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 999px; font-size: 16px;
  border: 1px solid rgba(var(--fx-gold),.45); background: transparent; color: var(--fm-gold); white-space: nowrap; cursor: pointer; }
.fm-mini:hover { background: rgba(var(--fx-gold),.1); }
.fm-dot-new { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--fm-gold); box-shadow: 0 0 8px rgba(var(--fx-gold),.9); margin-right: .45rem; vertical-align: middle; }
.fm-empty { text-align: center; padding: 1.6rem .5rem; }
.fm-empty svg { width: 54px; height: 54px; stroke: rgba(var(--fx-gold),.6); margin: 0 auto .6rem; display: block; }

/* 登入／註冊／驗證：頂部徽章 */
.fm-crest { display: block; width: 84px; height: 84px; margin: .2rem auto .7rem; }
.fm-crest circle.ring { fill: none; stroke: rgb(var(--fx-gold)); stroke-width: 1.4; stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: .85;
  transition: stroke-dashoffset 1.8s cubic-bezier(.55,0,.25,1) .1s; transform: rotate(-90deg); transform-origin: 50% 50%; }
.fm-crest circle.inner { fill: rgba(var(--fx-gold),.08); stroke: rgba(var(--fx-gold),.3); stroke-width: 1; }
.fm-crest text { fill: var(--fm-gold); font-size: 30px; font-weight: 700; text-anchor: middle; dominant-baseline: central; letter-spacing: 0; }
.fm-in .fm-crest circle.ring { stroke-dashoffset: 0; }
.fm-auth .fm-h1 { text-align: center; display: block; }
.fm-auth .fm-sub-tx { text-align: center; font-size: 16px; color: var(--fm-dim); margin: .2rem 0 1rem; }
.fm-links { text-align: center; font-size: 16px; color: var(--fm-dim); margin-top: 1.2rem; line-height: 2; }
.fm-links a { color: var(--fm-gold); text-decoration: underline; margin: 0 .25rem; }
.fm-links.dim, .fm-links.dim a { color: rgba(243,226,176,.5); }
.fm-result { text-align: center; }
.fm-result .fm-note { text-align: center; }

/* fx-member.js 的描線圓角 20px；卡片內的密碼眼睛顏色 */
.fm-card .fw-pw-toggle { color: var(--fm-gold); }

/* 鍵盤焦點 */
.fm-sub a:focus-visible, .fm-sub button:focus-visible { outline: 2px solid var(--fm-gold); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .fm-item { opacity: 1 !important; transform: none !important; transition: none !important; }
  .fm-rule path, .fm-crest circle.ring { stroke-dashoffset: 0 !important; transition: none !important; }
  .fm-rule circle { opacity: .95 !important; transition: none !important; }
  .fm-input { transition: none !important; }
}
