/* =========================================================
   order 頁(v7 midnight-gold):狀態頭卡 + 粗進度條圓節點 stepper
   ========================================================= */
.order-narrow { max-width: 660px; }

/* 狀態頭卡 */
.order-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--grad-brand); color: var(--on-accent);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow-pop);
}
.order-no {
  display: inline-block;
  font-family: var(--font-num); font-size: 12px; letter-spacing: .1em;
  background: rgba(255, 255, 255, .18); padding: 4px 12px; border-radius: var(--radius-pill);
  margin-bottom: 8px;
}
.order-hero h1 { font-size: clamp(28px, 6vw, 36px); }
.order-hero p { font-size: 13.5px; opacity: .92; margin-top: 4px; }
.order-hero-avatar {
  flex: 0 0 auto; width: 74px; height: 74px; border-radius: 26px;
  object-fit: cover; border: 3px solid rgba(255, 255, 255, .6);
  box-shadow: 0 8px 22px rgba(4, 8, 16, .18);
}

/* 粗進度條 + 圓節點 */
.order-track { margin: 30px 0 18px; } /* 拉開與頭卡彩色光暈的距離 */
.track-bar {
  position: relative; height: 10px; border-radius: var(--radius-pill);
  background: var(--surface-2);
  margin: 0 10%; /* 讓端點對齊節點中心 */
}
.track-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  border-radius: var(--radius-pill);
  background: var(--grad-chip);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--coral) 40%, transparent);
  transition: width .6s var(--ease);
}
.track-nodes {
  display: grid; grid-template-columns: repeat(5, 1fr);
  margin-top: -27px; /* 節點疊進度條 */
  /* track-bar 是定位元素會壓過非定位節點 → 節點必須自己抬層級 */
  position: relative; z-index: 1;
}
.track-node { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.node-dot {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--text-soft);
  border: 3px solid var(--surface-2);
  box-shadow: var(--shadow-soft);
  transition: all .3s var(--ease);
}
.node-dot svg { width: 18px; height: 18px; }
.node-label { font-size: 12px; font-weight: 800; color: var(--text-soft); }
/* 背景必須不透明:半透明底會讓後方金色進度線透出,icon 同色淹沒 */
.track-node.is-done .node-dot { background: color-mix(in srgb, var(--coral) 16%, var(--bg-elev)); border-color:var(--coral); color: var(--coral); }
.track-node.is-done .node-label { color: var(--text); }
.track-node.is-current .node-dot {
  background: var(--grad-chip); border-color: var(--bg-elev); color: var(--on-accent);
  transform: scale(1.12);
  box-shadow: var(--shadow-pop);
}
.track-node.is-current .node-label { color: var(--coral); }

/* 主卡片 */
.order-card {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 26px 22px;
  display: grid; gap: 15px;
}
.op-lead { font-size: clamp(19px, 4.4vw, 24px); font-weight: 700; font-family: var(--font-display); line-height: 1.4; } /* serif 只載到 700 */
.op-sub { color: var(--text-soft); font-size: 14px; }
.op-cap { font-size: 15px; font-weight: 800; color: var(--text-soft); text-align: center; }

/* st=1 夥伴列 */
.op-partner {
  display: flex; align-items: center; gap: 13px;
  background: var(--bg); border-radius: var(--radius); padding: 13px 15px;
}
.op-avatar { width: 56px; height: 56px; border-radius: 20px; object-fit: cover; }
.op-partner-info { display: flex; flex-direction: column; line-height: 1.4; }
.op-partner-info strong { font-size: 17px; font-weight: 900; }
.op-price { font-family: var(--font-num); font-size: 14px; color: var(--coral); font-weight: 700; }
.op-price small { color: var(--text-faint); font-family: var(--font-body); }
.op-badge {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 800; color: var(--st-idle);
  background: var(--st-idle-soft); padding: 5px 12px; border-radius: var(--radius-pill);
}
.op-badge svg { width: 13px; height: 13px; }

/* st=1 摘要三格 */
.op-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.op-summary li {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--bg); border-radius: var(--radius); padding: 14px 8px;
  font-size: 12px; color: var(--text-faint); font-weight: 700;
}
.op-sum-icon {
  width: 34px; height: 34px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 3px;
}
.op-sum-icon svg { width: 16px; height: 16px; }
.op-summary li:nth-child(1) .op-sum-icon { background: var(--coral-soft); color: var(--coral); }
.op-summary li:nth-child(2) .op-sum-icon { background: var(--violet-soft); color: var(--violet); }
.op-summary li:nth-child(3) .op-sum-icon { background: var(--amber-soft); color: var(--amber); }
.op-summary strong { font-size: 14px; color: var(--text); font-weight: 900; }

/* st=2 ETA */
.eta-big { text-align: center; font-size: clamp(21px, 5vw, 27px); font-weight: 700; font-family: var(--font-display); } /* serif 只載到 700 */
.eta-big strong { font-family: var(--font-num); font-size: 1.35em; }
.route-wrap { position: relative; background: var(--bg); border-radius: var(--radius); padding: 10px; }
.route-svg { width: 100%; height: auto; }
.route-line-bg { stroke: var(--line-strong); } /* surface-2 對深卡面太弱,底線改可辨識的金 22% */
.route-line {
  stroke: var(--coral);
  stroke-dasharray: 8 10;
  animation: route-dash 1.2s linear infinite;
}
@keyframes route-dash { to { stroke-dashoffset: -18; } }
.route-start { fill: var(--violet); }
.route-end { fill: var(--coral); }
.route-pulse { fill: var(--coral); opacity: .5; animation: route-pulse 1.6s infinite; transform-origin: 310px 66px; }
@keyframes route-pulse { from { transform: scale(1); opacity: .5; } to { transform: scale(3.2); opacity: 0; } }
.route-tag {
  position: absolute; font-size: 11px; font-weight: 800;
  background: var(--surface); color: var(--text-soft);
  padding: 4px 11px; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
}
.route-tag-a { left: 6%; bottom: 4px; }
.route-tag-b { right: 4%; top: 16%; }

.op-privacy {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12.5px; font-weight: 700; color: var(--text-faint);
  background: var(--violet-soft); color: var(--violet);
  border-radius: var(--radius-pill); padding: 9px 16px;
}
.op-privacy svg { width: 14px; height: 14px; flex: 0 0 auto; }

/* st=3 確認本人 */
.confirm-photo {
  position: relative; border-radius: var(--radius); overflow: hidden;
  max-width: 320px; margin: 0 auto; box-shadow: var(--shadow-card);
}
.confirm-photo img { aspect-ratio: 4 / 4.4; object-fit: cover; width: 100%; }
.confirm-name {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: baseline; gap: 8px;
  padding: 26px 16px 13px;
  background: linear-gradient(transparent, rgba(6, 11, 20, .82)); /* 深色主題:--text 混色會變亮遮罩 → 固定藍黑壓字漸層 */
  color: var(--text); font-size: 19px; font-weight: 900; /* on-accent 已改深色,深遮罩上改用亮文字 */
}
.confirm-name small { font-size: 12px; font-weight: 700; opacity: .85; }
.op-actions { display: grid; gap: 9px; }

/* st=4 圓環(order.js 操作 #ringArc / #ringTime) */
.ring-wrap { position: relative; width: min(64vw, 240px); margin: 4px auto; }
.ring-wrap svg { width: 100%; height: auto; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line-strong); stroke-width: 13; } /* 底軌要看得出總量,同 route-line-bg 換 --line-strong */
.ring-arc {
  fill: none; stroke: url(#ringGrad); stroke-width: 13; stroke-linecap: round;
  stroke-dasharray: 565.49; /* 2πr, r=90 */
  transition: stroke-dashoffset 1s linear;
}
.ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.ring-cap { font-size: 12px; color: var(--text-faint); font-weight: 800; }
.ring-center strong { font-family: var(--font-num); font-size: clamp(28px, 7vw, 38px); font-weight: 700; }

/* st=5 結算卡 */
.bill-card { background: var(--bg); border-radius: var(--radius); padding: 18px; }
.bill-card h3 { font-size: 15px; margin-bottom: 10px; }
.bill-rows li {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 13.5px; color: var(--text-soft); padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}
.bill-rows strong { color: var(--text); font-family: var(--font-num); }
.bill-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 12px; font-weight: 800; font-size: 14px;
}
.bill-total strong { font-family: var(--font-num); font-size: 24px; }

/* 展示切換 */
.demo-switch { border-top: 1px dashed var(--line); padding-top: 14px; text-align: center; }
.demo-switch-cap { font-size: 11px; letter-spacing: .14em; color: var(--text-faint); font-weight: 800; }
.demo-switch-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.demo-switch-links a, .demo-switch-links .is-here {
  font-size: 12px; font-weight: 800; padding: 5px 13px; border-radius: var(--radius-pill);
}
.demo-switch-links a { background: var(--surface-2); color: var(--text-soft); transition: all .2s; }
.demo-switch-links a:hover { background: var(--coral-soft); color: var(--coral); }
.demo-switch-links .is-here { background: var(--grad-chip); color: var(--on-accent); }

/* =========================================================
   v12 追加:B 版 7 步 stepper / 倒數 / 二選一 / 評分
   ========================================================= */
.track-nodes.is-7 { grid-template-columns: repeat(7, 1fr); margin-top: -23px; }
.track-nodes.is-7 .node-dot { width: 36px; height: 36px; border-width: 2px; }
.track-nodes.is-7 .node-dot svg { width: 15px; height: 15px; }
.track-nodes.is-7 .node-label { font-size: 10.5px; letter-spacing: -.01em; white-space: nowrap; }
@media (min-width: 640px) {
  .track-nodes.is-7 { margin-top: -27px; }
  .track-nodes.is-7 .node-dot { width: 44px; height: 44px; border-width: 3px; }
  .track-nodes.is-7 .node-dot svg { width: 18px; height: 18px; }
  .track-nodes.is-7 .node-label { font-size: 12px; }
}
.track-nodes.is-6 { grid-template-columns: repeat(6, 1fr); margin-top: -25px; }
.track-nodes.is-6 .node-dot { width: 40px; height: 40px; }
.track-nodes.is-6 .node-dot svg { width: 16px; height: 16px; }
.track-nodes.is-6 .node-label { font-size: 11px; white-space: nowrap; }
@media (min-width: 640px) {
  .track-nodes.is-6 { margin-top: -27px; }
  .track-nodes.is-6 .node-dot { width: 44px; height: 44px; }
  .track-nodes.is-6 .node-dot svg { width: 18px; height: 18px; }
  .track-nodes.is-6 .node-label { font-size: 12px; }
}
.order-hero.is-terminal { background: var(--surface-2); color: var(--text); box-shadow: var(--shadow-card); }
.order-hero.is-terminal .order-no { background: var(--surface); color: var(--text-soft); }

/* 倒數卡(見面確認窗 30 分) */
.countdown {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--bg); border-radius: var(--radius); padding: 16px 14px; text-align: center;
}
.countdown-cap { font-size: 12px; font-weight: 800; color: var(--text-faint); letter-spacing: .08em; }
.countdown-num { font-family: var(--font-num); font-size: clamp(34px, 9vw, 46px); font-weight: 700; color: var(--st-hold); line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown.is-warn .countdown-num { color: var(--st-enroute); }
.countdown.is-over .countdown-num { color: var(--st-busy); }
.countdown-sub { font-size: 12.5px; color: var(--text-soft); font-weight: 700; margin-top: 4px; }

/* 款項狀態 pill(對客文案:已付 · 保管中) */
.paid-pill {
  align-self: center;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 800;
}
.paid-pill[data-st="hold"] { background: var(--st-hold-soft); color: var(--st-hold); }
.paid-pill[data-st="idle"] { background: var(--st-idle-soft); color: var(--st-idle); }

/* 等待夥伴回應(三點) */
.op-waiting {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 13px; font-weight: 800; color: var(--text-soft);
  padding: 10px; border-radius: var(--radius-pill); background: var(--bg);
}
.op-waiting .typing-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); animation: op-bounce 1.1s infinite; }
.op-waiting .typing-dot:nth-child(2) { animation-delay: .15s; }
.op-waiting .typing-dot:nth-child(3) { animation-delay: .3s; margin-right: 6px; }
@keyframes op-bounce { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

.op-note { font-size: 12.5px; color: var(--text-faint); font-weight: 700; text-align: center; line-height: 1.6; }

/* 二選一(見面確認:付尾款 / 打槍) */
.op-choice { display: grid; gap: 9px; }
.choice {
  display: flex; flex-direction: column; gap: 3px;
  padding: 15px 18px; border-radius: var(--radius); border: 2px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.choice:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.choice strong { font-size: 15.5px; font-weight: 900; }
.choice span { font-size: 12.5px; font-weight: 700; opacity: .85; }
.choice-yes { background: var(--grad-brand); color: var(--on-accent); box-shadow: var(--shadow-pop); }
.choice-no { background: var(--st-busy-soft); color: var(--st-busy); border-color: color-mix(in srgb, var(--st-busy) 40%, transparent); }
@media (min-width: 640px) { .op-choice { grid-template-columns: 1fr 1fr; } }

/* 加時區進場 */
#extendWrap.is-in { animation: extend-in .4s var(--ease); }
@keyframes extend-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 結算明細:實收列 */
.bill-rows li.is-paid span { color: var(--st-idle); }
.bill-rows li.is-paid strong { color: var(--st-idle); }

/* 評價卡 */
.rate-card { background: var(--bg); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; }
.rate-card h3 { font-size: 15px; display: flex; flex-direction: column; gap: 2px; }
.rate-card h3 small { font-family: var(--font-body); font-size: 12px; color: var(--text-faint); font-weight: 700; }
.stars { display: flex; justify-content: center; gap: 6px; }
.star { color: var(--surface-2); transition: transform .15s var(--ease), color .15s; }
.star svg { width: 36px; height: 36px; }
.star:hover { transform: scale(1.12); }
.star.is-on { color: var(--amber); }
.rate-card .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* 加時:時數下拉(1 ~ 4)+ 送出鈕;手機一行放得下 */
.op-extend { display: grid; gap: 8px; }
.op-extend-pick { display: flex; align-items: center; gap: 10px; }
.op-extend-pick > span { flex: 0 0 auto; font-size: 13px; font-weight: 800; color: var(--text-soft); }
.op-extend-pick select { flex: 1; font-size: 15px; }

/* 客人服務中「提早結束」:收合在計時器下方,不搶「加時」的位置;展開才看到規則與按鈕 */
.op-early { margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.op-early summary { cursor: pointer; list-style: none; text-align: center; font-size: 13.5px; font-weight: 800; color: var(--text-soft); padding: 6px 0; }
.op-early summary::-webkit-details-marker { display: none; }
.op-early summary::after { content: " ▾"; font-size: 11px; }
.op-early[open] summary::after { content: " ▴"; }
.op-early form { margin-top: 8px; }

/* =========================================================
   夥伴任務頁 · 無任務狀態(2026-09-13 業主:沒任務也要能進這頁)
   ========================================================= */
.je-hero { align-items: center; }
.je-hero-ico {
  flex: 0 0 auto; width: 64px; height: 64px; border-radius: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--text-soft); box-shadow: var(--shadow-soft);
}
.je-hero-ico svg { width: 28px; height: 28px; }
/* 依原因換色:有邀請待回應 = 綠、休息中 = 灰、未入駐 / 未綁手機 = 琥珀提醒 */
.je-hero[data-why="invites"] .je-hero-ico { background: var(--st-idle-soft); color: var(--st-idle); }
.je-hero[data-why="no_agent"] .je-hero-ico, .je-hero[data-why="no_phone"] .je-hero-ico { background: var(--st-enroute-soft); color: var(--st-enroute); }
.je-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; margin-left: 6px;
  border-radius: var(--radius-pill); background: rgba(255, 255, 255, .28); font-family: var(--font-num); font-size: 13px;
}
.je-preview .track-node .node-dot { opacity: .75; }
.je-cap { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--text-soft); }
.je-cap svg { width: 15px; height: 15px; }
