/*
 * fm-account-native.css —— 前台账号页（原生渲染器）样式
 *
 * 原 accountOrders/accountReviews 是 SFC 带 scopeId 的样式，
 * 换成原生 JS 渲染后作用域标记消失，这里用全局选择器补齐同等视觉。
 * 命名与原 CSS 对齐（ao-* / ar-*），避免与后台样式冲突。
 */

/* ============ 页面容器 ============ */
.web-main .page.ao-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

@media (min-width: 768px) {
  .web-main .page.ao-page {
    padding: 24px 24px 56px;
  }
}

/* ============ 顶部操作条 ============ */
.ao-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.ao-head-title {
  font-size: 18px;
  font-weight: 700;
  color: #1f2d24;
  margin-right: auto;
}

.ao-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #e3e8e4;
  background: #fff;
  border-radius: 10px;
  color: #1f5c3f;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.ao-back:hover {
  background: #f2f7f4;
  border-color: #c9dcd1;
}

.ao-reviews-link,
.ao-logout {
  border: 1px solid #e3e8e4;
  background: #fff;
  color: #1f5c3f;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.ao-reviews-link:hover,
.ao-logout:hover {
  background: #f2f7f4;
  border-color: #c9dcd1;
}
.ao-logout {
  color: #b0483c;
  border-color: #f0d8d4;
}
.ao-logout:hover {
  background: #fdf4f2;
  border-color: #e6bcb4;
}

/* ============ 当前账号 ============ */
.ao-user {
  font-size: 13px;
  color: #5c6b60;
  background: #f6f9f7;
  border: 1px solid #e6ede8;
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 14px;
  word-break: break-all;
}

/* ============ 三态：加载 / 错误 / 空 ============ */
.ao-state {
  text-align: center;
  color: #7b8a7f;
  font-size: 14px;
  padding: 44px 16px;
  background: #fbfcfb;
  border: 1px dashed #dfe7e1;
  border-radius: 14px;
}
.ao-state-error {
  color: #b0483c;
  background: #fdf6f5;
  border-color: #f0d8d4;
}
.ao-retry {
  display: inline-block;
  margin-top: 10px;
  color: #1f5c3f;
  text-decoration: underline;
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}

/* ============ 订单卡片 ============ */
.ao-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ao-card {
  background: #fff;
  border: 1px solid #e6ede8;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(31, 92, 63, 0.04);
}

.ao-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f4f1;
  margin-bottom: 10px;
}

.ao-no {
  font-size: 13px;
  color: #4a5a4f;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

.ao-status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  background: #eef3f0;
  color: #4a5a4f;
}
.ao-status.is-pending { background: #fff4e3; color: #a06a12; }
.ao-status.is-paid    { background: #e8f1fd; color: #1f5c9e; }
.ao-status.is-shipped { background: #eaf3ee; color: #1f5c3f; }
.ao-status.is-completed { background: #e8f5ec; color: #1a7a42; }
.ao-status.is-cancelled,
.ao-status.is-refunded { background: #f1f3f2; color: #7b8a7f; }

/* ============ 商品行 ============ */
.ao-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ao-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ao-item-img {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f7f4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.ao-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ao-item-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ao-item-name {
  font-size: 13px;
  color: #1f2d24;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ao-item-spec {
  font-size: 12px;
  color: #8b9a90;
}

.ao-item-right {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-size: 13px;
  color: #1f2d24;
}
.ao-item-qty {
  font-size: 12px;
  color: #8b9a90;
}

.ao-item-review {
  margin-top: 3px;
  font-size: 12px;
  color: #1f5c3f;
  background: #eef5f0;
  border: 1px solid #d7e6dd;
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.18s ease;
}
.ao-item-review:hover {
  background: #e2efe7;
}

/* 运输中/待发货等不可点击状态（外贸模式无「确认收货」环节） */
.ao-item-review.is-pending {
  color: #8b9a90;
  background: #f4f7f5;
  border-color: #e6ede8;
  cursor: default;
}
.ao-item-review.is-pending:hover {
  background: #f4f7f5;
}

.ao-item-review.is-disabled {
  color: #a3b0a8;
  background: #f4f7f5;
  border-color: #e6ede8;
  cursor: not-allowed;
}

/* ============ 简洁评价弹窗（订单页直接评价，不跳商品页） ============ */
.fm-rv-mask {
  position: fixed;
  inset: 0;
  background: rgba(31, 45, 36, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 99999;
}

.fm-rv-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 18px 50px rgba(31, 92, 63, 0.22);
}

.fm-rv-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2d24;
  margin-bottom: 4px;
}

.fm-rv-prod {
  font-size: 12px;
  color: #8b9a90;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fm-rv-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.fm-rv-star {
  font-size: 30px;
  color: #dfe7e1;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
  line-height: 1;
}
.fm-rv-star:hover {
  transform: scale(1.12);
}
.fm-rv-star.on {
  color: #e0b03a;
}

.fm-rv-stars-txt {
  text-align: center;
  font-size: 13px;
  color: #1f5c3f;
  margin-bottom: 12px;
}

.fm-rv-text {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e3e8e4;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #1f2d24;
  resize: vertical;
  font-family: inherit;
}
.fm-rv-text:focus {
  outline: none;
  border-color: #1f5c3f;
}

.fm-rv-err {
  min-height: 18px;
  font-size: 12px;
  color: #b0483c;
  margin-top: 6px;
}

.fm-rv-acts {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.fm-rv-btn {
  flex: 1;
  padding: 10px 0;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.18s ease;
}
.fm-rv-btn.ghost {
  background: #f6f9f7;
  border-color: #e3e8e4;
  color: #5c6b60;
}
.fm-rv-btn.ghost:hover {
  background: #eef3f0;
}
.fm-rv-btn.solid {
  background: #1f5c3f;
  color: #fff;
}
.fm-rv-btn.solid:hover {
  background: #174a31;
}
.fm-rv-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ============ 独立评价页 /account/review-write ============ */
.rw-page {
  max-width: 520px;
}

.rw-prod {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #e6ede8;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 14px;
}

.rw-prod-icon {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 10px;
  background: #f3f7f4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.rw-prod-info {
  flex: 1 1 auto;
  min-width: 0;
}

.rw-prod-name {
  font-size: 14px;
  line-height: 1.5;
  color: #1f2d24;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rw-prod-order {
  font-size: 12px;
  color: #8b9a90;
  margin-top: 3px;
}

.rw-block {
  background: #fff;
  border: 1px solid #e6ede8;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}

.rw-label {
  font-size: 13px;
  font-weight: 600;
  color: #1f2d24;
  margin-bottom: 10px;
}

.rw-stars {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}

.rw-star {
  font-size: 34px;
  color: #dfe7e1;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s ease, transform 0.15s ease;
}
.rw-star:hover {
  transform: scale(1.12);
}
.rw-star.on {
  color: #e0b03a;
}

.rw-stars-txt {
  text-align: center;
  font-size: 13px;
  color: #1f5c3f;
}

.rw-text {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e3e8e4;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.7;
  color: #1f2d24;
  resize: vertical;
  font-family: inherit;
}
.rw-text:focus {
  outline: none;
  border-color: #1f5c3f;
}

.rw-count {
  text-align: right;
  font-size: 12px;
  color: #a3b0a8;
  margin-top: 5px;
}

.rw-err {
  min-height: 18px;
  font-size: 12px;
  color: #b0483c;
  margin-bottom: 8px;
}

.rw-acts {
  display: flex;
  gap: 10px;
}

.rw-btn {
  flex: 1;
  padding: 12px 0;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
  text-decoration: none;
  transition: background 0.18s ease;
}
.rw-btn.ghost {
  background: #f6f9f7;
  border-color: #e3e8e4;
  color: #5c6b60;
}
.rw-btn.ghost:hover {
  background: #eef3f0;
}
.rw-btn.solid {
  background: #1f5c3f;
  color: #fff;
}
.rw-btn.solid:hover {
  background: #174a31;
}
.rw-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ============ 商品详情页空白兜底（简化版详情） ============ */
.pd-page {
  max-width: 640px;
}

.pd-fallback-tip {
  font-size: 12px;
  color: #8b9a90;
  background: #f7faf8;
  border: 1px solid #e6ede8;
  border-radius: 8px;
  padding: 7px 10px;
  margin-bottom: 14px;
}

.pd-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 360px;
  background: #f3f7f4;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.pd-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pd-img-empty {
  font-size: 64px;
}

.pd-name {
  font-size: 16px;
  line-height: 1.5;
  color: #1f2d24;
  margin: 0 0 8px;
}

.pd-price {
  font-size: 22px;
  font-weight: 700;
  color: #1f5c3f;
  margin-bottom: 10px;
}

.pd-desc {
  font-size: 13px;
  line-height: 1.7;
  color: #5c6b60;
  margin: 0 0 12px;
  white-space: pre-wrap;
}

.pd-models {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.pd-model {
  font-size: 13px;
  color: #3d4c42;
  background: #f7faf8;
  border: 1px solid #e6ede8;
  border-radius: 8px;
  padding: 8px 10px;
}

.pd-buy {
  display: block;
  text-align: center;
  background: #1f5c3f;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  padding: 12px 0;
  border-radius: 10px;
}
.pd-buy:hover {
  background: #174a31;
}

/* ============ 物流时间线 ============ */
.ao-track {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f0f4f1;
}

.ao-track-head {
  font-size: 12px;
  color: #8b9a90;
  margin-bottom: 8px;
}

.ao-track-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #a3b0a8;
  padding: 4px 0;
  position: relative;
}

.ao-track-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d8e0da;
  flex: none;
}

.ao-track-text {
  flex: 1 1 auto;
}

.ao-track-time {
  font-variant-numeric: tabular-nums;
  color: #b6c1ba;
}

.ao-track-item.is-done {
  color: #1f5c3f;
}
.ao-track-item.is-done .ao-track-dot {
  background: #1f5c3f;
}
.ao-track-item.is-done .ao-track-time {
  color: #6f8a78;
}

.ao-ship-no {
  margin-top: 6px;
  font-size: 12px;
  color: #5c6b60;
}

/* ============ 物流进展（后台「更新物流信息」时累积） ============ */
.ao-tracklog {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f7faf8;
  border: 1px solid #e6ede8;
  border-radius: 10px;
}

.ao-tracklog-title {
  font-size: 12px;
  font-weight: 600;
  color: #1f5c3f;
  margin-bottom: 7px;
}

.ao-tracklog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ao-tracklog-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 10px;
  border-left: 2px solid #d7e6dd;
}

.ao-tracklog-time {
  font-size: 11px;
  color: #8b9a90;
  font-variant-numeric: tabular-nums;
}

.ao-tracklog-note {
  font-size: 13px;
  line-height: 1.55;
  color: #2f3e34;
}

/* 兼容仅有 shipNote 的历史订单 */
.ao-tracklog > .ao-tracklog-note {
  font-size: 13px;
  line-height: 1.6;
  color: #2f3e34;
  white-space: pre-wrap;
}

.ao-auto-note {
  margin-top: 10px;
  font-size: 12px;
  color: #8b9a90;
  background: #f7faf8;
  border-radius: 8px;
  padding: 7px 10px;
}

/* ============ 卡片底部 ============ */
.ao-card-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f0f4f1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ao-time {
  font-size: 12px;
  color: #a3b0a8;
  font-variant-numeric: tabular-nums;
}

.ao-cancel-btn {
  font-size: 12px;
  color: #b0483c;
  background: #fdf6f5;
  border: 1px solid #f0d8d4;
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.18s ease;
}
.ao-cancel-btn:hover {
  background: #fbeae7;
}

.ao-total {
  margin-left: auto;
  font-size: 13px;
  color: #1f2d24;
}
.ao-total b {
  font-size: 15px;
  color: #1f5c3f;
}

.ao-detail {
  font-size: 12px;
  color: #1f5c3f;
  text-decoration: underline;
  white-space: nowrap;
}

/* ============ 评论卡片（原生渲染器补齐） ============ */
.ar-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: #1f2d24;
  margin-bottom: 8px;
}

.ar-stars {
  color: #e0b03a;
  font-size: 13px;
  letter-spacing: 1px;
}
.ar-stars .star {
  opacity: 0.28;
}
.ar-stars .star.on {
  opacity: 1;
}

.ar-content {
  font-size: 13px;
  line-height: 1.65;
  color: #3d4c42;
}

.ar-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #f0f4f1;
}

.ar-date {
  font-size: 12px;
  color: #a3b0a8;
  font-variant-numeric: tabular-nums;
}

.ar-del {
  font-size: 12px;
  color: #b0483c;
  background: #fdf6f5;
  border: 1px solid #f0d8d4;
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.18s ease;
}
.ar-del:hover {
  background: #fbeae7;
}
/* 旧订单缺 productId 时评价按钮置灰 */
.ao-item-review.is-disabled {
  color: #a3b0a8;
  background: #f5f7f6;
  border-color: #e6ebe8;
  cursor: not-allowed;
}
.ao-item-review.is-disabled:hover {
  background: #f5f7f6;
}

/* ============ 页内轻提示（替代 alert） ============ */
.fm-native-toast{position:fixed;top:20px;left:50%;transform:translate(-50%,-16px);background:#1f5c3f;color:#fff;font-size:13px;padding:10px 18px;border-radius:10px;opacity:0;transition:all .3s;z-index:99999;box-shadow:0 4px 16px rgba(31,92,63,.25);max-width:80vw}
.fm-native-toast.show{opacity:1;transform:translate(-50%,0)}

/* ============ 我的评论：商品缩略图 + 暂无评价 ============ */
.ar-prod{display:flex;align-items:center;gap:8px;min-width:0;flex:1}
.ar-thumb{width:38px;height:38px;flex:none;border-radius:8px;object-fit:cover;background:#f3f7f4}
.ar-thumb-empty{display:inline-flex;align-items:center;justify-content:center;font-size:18px}
.ar-prod-name{font-size:12px;color:#5c6b60;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ar-content.is-empty{color:#a3b0a8;font-style:normal}

/* ============ 账号页接管：仅隐藏 Vue 内容区，绝不移除其 DOM ============
   * 保留 Vue 的 .web-main 节点（只加 class），保证页头搜索/语言/购物车
   * 等 Vue 组件的响应式与事件继续正常。 */
.fm-veil-main{display:none !important}
.fm-native-main{display:block}
