/* FreshTrack · 「Pro」页专用样式（web-live/ft-app/views/pro.js）
 * 用途：仅补外壳组件库没有的少量结构类（状态行、三步流程、兑换码行、常见问题折叠）。
 * 颜色一律用 --ft-* 令牌。
 */

/* 会员状态行 */
.ft-pro-status {
  display: flex;
  align-items: center;
  gap: var(--ft-s2);
  flex-wrap: wrap;
  margin-bottom: var(--ft-s3);
  font-size: var(--ft-fs-heading);
  line-height: var(--ft-lh-heading);
}

/* 权益对比：数值列窄、居中，第一列占满剩余宽度 */
.ft-pro-table th:first-child,
.ft-pro-table td:first-child { width: 50%; }
.ft-pro-table th:not(:first-child),
.ft-pro-table td:not(:first-child) { text-align: center; white-space: nowrap; }
.ft-pro-table tbody th { font-weight: 500; color: var(--ft-ink); }
.ft-pro-yes { display: inline-flex; color: var(--ft-brand); }
.ft-pro-no { color: var(--ft-ink-3); }
.ft-pro-note { font-size: var(--ft-fs-micro); color: var(--ft-ink-2); white-space: normal; }

/* 开通三步 */
.ft-pro-steps { list-style: none; margin: 0 0 var(--ft-s4); padding: 0; display: flex; flex-direction: column; gap: var(--ft-s4); }
.ft-pro-steps > li { display: flex; gap: var(--ft-s3); align-items: flex-start; }
.ft-pro-step-n {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ft-brand-tint);
  color: var(--ft-brand-strong);
  font-size: var(--ft-fs-label);
  font-weight: 600;
}
.ft-pro-step-title { margin: 0 0 2px; font-size: var(--ft-fs-body); font-weight: 600; }
.ft-pro-contact { display: flex; align-items: center; gap: var(--ft-s3); flex-wrap: wrap; margin-top: var(--ft-s2); }
.ft-pro-step-title + .ft-micro { margin: 0; }

/* 兑换码 */
.ft-pro-sub { margin: var(--ft-s4) 0 var(--ft-s3); font-size: var(--ft-fs-heading); font-weight: 600; }
.ft-pro-redeem { display: flex; align-items: flex-end; gap: var(--ft-s3); }
.ft-pro-redeem .ft-field { flex: 1; margin-bottom: 0; }

/* 常见问题折叠 */
.ft-pro-faqs { display: flex; flex-direction: column; }
.ft-pro-faq { border-top: 1px solid var(--ft-border); }
.ft-pro-faq:first-child { border-top: 0; }
.ft-pro-faq summary {
  display: flex;
  align-items: center;
  gap: var(--ft-s2);
  min-height: 44px;
  padding: var(--ft-s2) 0;
  cursor: pointer;
  font-size: var(--ft-fs-body);
  font-weight: 500;
  list-style: none;
}
.ft-pro-faq summary::-webkit-details-marker { display: none; }
.ft-pro-faq summary:focus-visible { outline: 2px solid var(--ft-focus); outline-offset: 2px; border-radius: var(--ft-r-control); }
.ft-pro-faq summary .ft-i { color: var(--ft-ink-3); transition: transform var(--ft-dur-panel) var(--ft-ease-out); }
.ft-pro-faq[open] summary .ft-i { transform: rotate(180deg); }
.ft-pro-faq > p { margin: 0 0 var(--ft-s3); padding-left: calc(var(--ft-s2) + 16px); font-size: var(--ft-fs-label); line-height: 1.75; color: var(--ft-ink-2); }

/* 契约里的布局类（.ft-page-section / .ft-loading-row）由共享 views.css 提供，这里不重复声明 */

@media (max-width: 767px) {
  .ft-pro-redeem { flex-direction: column; align-items: stretch; }
  .ft-pro-table th:first-child,
  .ft-pro-table td:first-child { width: 46%; }
}

/* 会员剩余天数 + 临期提醒 */
.ft-pro-days { margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: var(--ft-brand-tint, #eef7ea); color: var(--ft-brand-strong, #1d7a4c); font-size: 12.5px; font-weight: 600; }
.ft-pro-days.is-warn { background: #fdf3e4; color: #a16207; }

/* ── 开通流程：套餐选择 / 扫码支付 / 卡片间距 ─────────────── */
.ft-page-section + .ft-page-section { margin-top: var(--ft-s7, 40px); }
.ft-page-section { margin-bottom: 0; }

.ft-pro-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ft-s3, 12px); margin-bottom: var(--ft-s4, 16px); }
.ft-pro-plan {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 10px; cursor: pointer; font: inherit;
  background: var(--ft-surface); color: var(--ft-ink);
  border: 1.5px solid var(--ft-border-strong); border-radius: var(--ft-r-control, 12px);
  transition: border-color .15s, background .15s, transform .15s;
}
.ft-pro-plan:hover { border-color: var(--ft-brand); }
.ft-pro-plan.is-active { border-color: var(--ft-brand); background: var(--ft-brand-tint); box-shadow: 0 0 0 3px rgba(58,174,115,.14); }
.ft-pro-plan-name { font-size: 13px; color: var(--ft-ink-2); }
.ft-pro-plan-price { font-size: 17px; font-weight: 700; color: var(--ft-ink); }

.ft-pro-total {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; margin-bottom: var(--ft-s5, 20px);
  background: var(--ft-brand-tint); border-radius: var(--ft-r-control, 12px);
  font-size: 13.5px; color: var(--ft-ink-2);
}
.ft-pro-total strong { font-size: 22px; font-weight: 800; color: var(--ft-brand-strong, #1d7a4c); }

.ft-pro-pay { display: flex; gap: var(--ft-s4, 16px); align-items: flex-start; }
.ft-pro-qr { width: 150px; height: 150px; border-radius: 14px; border: 1px solid var(--ft-border); object-fit: cover; flex: none; background: #fff; }
.ft-pro-pay-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ft-pro-actions { display: flex; gap: var(--ft-s2, 8px); justify-content: flex-start; flex-wrap: wrap; margin-top: var(--ft-s5, 20px); }

@media (max-width: 640px) {
  .ft-pro-plans { grid-template-columns: 1fr; }
  .ft-pro-pay { flex-direction: column; align-items: center; text-align: center; }
  .ft-pro-pay-side { align-items: center; }
}

.ft-pro-per { font-style: normal; font-size: 12px; font-weight: 500; color: var(--ft-ink-3); }

/* ── AI 七日餐单：天数切换 ─────────────────────────────────── */
.ft-mealplan-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--ft-s4, 16px); }
.ft-mealplan-tab {
  border: 1px solid var(--ft-border-strong); background: var(--ft-surface); color: var(--ft-ink-2);
  border-radius: var(--ft-r-pill, 999px); padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.ft-mealplan-tab:hover { border-color: var(--ft-brand); color: var(--ft-ink); }
.ft-mealplan-tab.is-active { background: var(--ft-brand); border-color: var(--ft-brand); color: var(--ft-brand-contrast); font-weight: 600; }

/* ── 营养评分与缺口推荐 ───────────────────────────────────── */
.ft-score { display: flex; align-items: center; gap: var(--ft-s5, 20px); margin-bottom: var(--ft-s5, 20px); }
.ft-score-ring {
  --p: 0;
  width: 96px; height: 96px; flex: none; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: conic-gradient(var(--ft-brand) calc(var(--p) * 1%), var(--ft-surface-3) 0);
  position: relative;
}
.ft-score-ring::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--ft-surface); }
.ft-score-ring strong { position: relative; z-index: 1; font-size: 26px; font-weight: 800; color: var(--ft-ink); line-height: 1; }
.ft-score-ring span { position: relative; z-index: 1; font-size: 11px; color: var(--ft-ink-3); }
.ft-score-side { display: flex; flex-direction: column; gap: 4px; }
.ft-score-grade { margin: 0; font-size: 18px; font-weight: 700; color: var(--ft-ink); }

.ft-score-rows { display: grid; gap: 10px; }
.ft-score-row { display: grid; grid-template-columns: 84px 1fr auto 46px; align-items: center; gap: 10px; font-size: 12.5px; }
.ft-score-label { color: var(--ft-ink-2); }
.ft-score-bar { height: 8px; border-radius: 4px; background: var(--ft-surface-3); overflow: hidden; }
.ft-score-bar i { display: block; height: 100%; background: var(--ft-brand); border-radius: 4px; }
.ft-score-note { color: var(--ft-ink-3); font-variant-numeric: tabular-nums; }
.ft-score-pts { text-align: right; color: var(--ft-ink-2); font-variant-numeric: tabular-nums; }

.ft-gap { margin-top: var(--ft-s5, 20px); padding: 14px 16px; background: var(--ft-brand-tint); border-radius: var(--ft-r-control, 12px); }
.ft-gap-title { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; color: var(--ft-brand-strong, #1d7a4c); }
.ft-gap-list { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.9; color: var(--ft-ink-2); }
.ft-gap-list b { color: var(--ft-ink); font-weight: 600; }

@media (max-width: 640px) {
  .ft-score-row { grid-template-columns: 70px 1fr 46px; }
  .ft-score-note { display: none; }
}

/* ── 付款截图上传（AI 自动核验）────────────────────────────── */
.ft-receipt-shot { margin: 4px 0 var(--ft-s4, 16px); }
.ft-receipt-drop {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 14px 16px; border-radius: 14px;
  background: var(--ft-brand-tint); border: 1px dashed rgba(31,138,85,.45);
  transition: border-color var(--ft-dur-hover), background var(--ft-dur-hover);
}
.ft-receipt-drop:hover { border-color: var(--ft-brand); }
.ft-receipt-drop-ico {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ft-surface); color: var(--ft-brand-strong);
  box-shadow: var(--ft-shadow-1);
}
.ft-receipt-drop-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ft-receipt-drop-main strong { font-size: 14px; color: var(--ft-ink); }
.ft-receipt-drop-main i { font-style: normal; font-size: 12px; line-height: 1.5; color: var(--ft-ink-2); }
.ft-receipt-preview {
  display: flex; align-items: center; gap: 12px; margin-top: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: var(--ft-surface-2); border: 1px solid var(--ft-border);
}
.ft-receipt-preview img { width: 56px; height: 56px; object-fit: cover; border-radius: 9px; border: 1px solid var(--ft-border-strong); }
.ft-receipt-preview span { font-size: 12.5px; color: var(--ft-ink-2); }
