/* club-mirror: 客服订单中心布局补丁 — 新版模板类名 CSS 缺失修复 */

/* ========== 搜索按钮（nav-bar 内） ========== */
.page.gradient-bg .order-search-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
  padding: 4px 8px;
}
.page.gradient-bg .order-search-btn-text { font-size: 13px; color: #475569; }
.page.gradient-bg .pc-order-heading { display: none; }

/* ========== 搜索栏（展开时） ========== */
.page.gradient-bg .order-search-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: #fff; border-bottom: 1px solid #f3f4f6;
}
.page.gradient-bg .order-search-input-wrap {
  flex: 1; display: flex; align-items: center; gap: 6px;
  height: 36px; background: #f4f6f9; border-radius: 8px; padding: 0 10px;
}
.page.gradient-bg .order-search-input {
  flex: 1; font-size: 14px; color: #111827; background: transparent; border: none; outline: none;
}
.page.gradient-bg .order-search-clear {
  width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
  background: #dce0e6; border-radius: 50%; font-size: 12px; color: #fff; flex-shrink: 0;
}
.page.gradient-bg .order-search-submit {
  flex-shrink: 0; padding: 6px 16px; background: #5b8cff; color: #fff; border-radius: 999px; font-size: 13px; font-weight: 500;
}
.page.gradient-bg .order-search-cancel { flex-shrink: 0; padding: 6px 12px; color: #6b7280; font-size: 13px; }

/* ========== 客服数据面板 ========== */
.page.gradient-bg .customer-stats-panel {
  background: #fff; border-radius: 12px; margin: 8px 12px; padding: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.page.gradient-bg .customer-stats-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.page.gradient-bg .customer-stats-title { font-size: 15px; font-weight: 700; color: #111827; }
.page.gradient-bg .customer-stats-subtitle { display: block; margin-top: 2px; font-size: 11px; color: #9ca3af; }
.page.gradient-bg .customer-stats-toggle { display: flex; align-items: center; gap: 4px; flex-shrink: 0; font-size: 12px; color: #5b8cff; }
.page.gradient-bg .customer-stats-arrow { font-size: 14px; line-height: 1; transition: transform 0.2s; }
.page.gradient-bg .customer-stats-arrow.expanded { transform: rotate(180deg); }
.page.gradient-bg .customer-stats-overview { display: flex; gap: 8px; }
.page.gradient-bg .customer-stat-primary {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 10px 6px; border-radius: 10px; background: #f8f9fd;
}
.page.gradient-bg .customer-stat-primary-value { font-size: 22px; font-weight: 800; color: #111827; line-height: 1.1; }
.page.gradient-bg .customer-stat-primary-label { display: block; margin-top: 4px; font-size: 11px; color: #9ca3af; }
.page.gradient-bg .customer-stats-details { margin-top: 10px; padding-top: 10px; border-top: 1px solid #f3f4f6; }
.page.gradient-bg .customer-stats-section { margin-bottom: 10px; }
.page.gradient-bg .customer-stats-section:last-child { margin-bottom: 0; }
.page.gradient-bg .customer-stats-section-title { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: #374151; }
.page.gradient-bg .customer-stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.page.gradient-bg .customer-stat-detail { padding: 8px 6px; border-radius: 8px; background: #f8f9fd; text-align: center; }
.page.gradient-bg .customer-stat-detail-label { display: block; font-size: 11px; color: #9ca3af; }
.page.gradient-bg .customer-stat-detail-value { display: block; margin-top: 4px; font-size: 16px; font-weight: 700; color: #111827; }

/* ========== Tab 标签栏 ========== */
.page.gradient-bg .tabs { display: flex; align-items: center; padding: 0 12px; overflow-x: auto; white-space: nowrap; background: #fff; border-bottom: 1px solid #f3f4f6; }
.page.gradient-bg .tab-item { position: relative; padding: 12px 10px; font-size: 14px; color: #6b7280; margin-right: 16px; flex-shrink: 0; }
.page.gradient-bg .tab-item.active { color: #5b8cff; font-weight: 600; }
.page.gradient-bg .tab-item.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: #5b8cff; border-radius: 2px; }
.page.gradient-bg .tab-item .badge { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; margin-left: 4px; border-radius: 999px; background: #ff4d5a; color: #fff; font-size: 10px; font-weight: 700; line-height: 1; }

/* ========== 订单列表滚动区 ========== */
.page.gradient-bg .order-scroll { height: calc(100vh - 8.75rem); padding: 8px 12px; padding-bottom: calc(4.25rem + env(safe-area-inset-bottom)); box-sizing: border-box; }

/* ========== 订单卡片 ========== */
.page.gradient-bg .order-card { background: #fff; border: 1px solid rgba(148,163,184,0.12); border-radius: 11px; padding: 10px; margin-bottom: 8px; box-shadow: 0 3px 9px rgba(15,23,42,0.04); }
.page.gradient-bg .order-body { display: flex; align-items: stretch; gap: 9px; }
.page.gradient-bg .order-cover { width: 74px; height: 74px; border-radius: 8px; flex-shrink: 0; }
.page.gradient-bg .order-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.page.gradient-bg .order-title-row { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-bottom: 4px; }
.page.gradient-bg .order-title { font-size: 13px; font-weight: 600; color: #111827; line-height: 1.4; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page.gradient-bg .vip-badge { display: inline-flex; align-items: center; background: #fff5d8; color: #b77900; font-size: 9px; font-weight: 700; padding: 1px 5px; border: 1px solid rgba(245,183,35,0.24); border-radius: 3.5px; flex-shrink: 0; white-space: nowrap; }
.page.gradient-bg .order-desc { font-size: 11px; color: #7b8493; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page.gradient-bg .order-meta { display: flex; align-items: center; gap: 6px; margin-top: auto; }
.page.gradient-bg .order-meta .price { font-size: 13px; font-weight: 700; color: #f59e0b; }

/* ========== 订单操作区 ========== */
.page.gradient-bg .order-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #f3f4f6; }
.page.gradient-bg .order-state-block { flex-shrink: 0; }
.page.gradient-bg .order-waiting { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: #8c96a7; background: #f4f6f9; padding: 3px 8px; border-radius: 999px; }
.page.gradient-bg .order-waiting.urgent { color: #c46b35; background: #fff7ed; }
.page.gradient-bg .action-group { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.page.gradient-bg .action-btn { display: flex; align-items: center; justify-content: center; min-width: 66px; height: 28px; padding: 0 12px; box-sizing: border-box; border-radius: 999px; font-size: 13px; font-weight: 500; }
.page.gradient-bg .action-btn.plain { background: #f3f4f6; color: #6b7280; }
.page.gradient-bg .action-btn.primary { background: #5b8cff; color: #fff; }

/* ========== 空状态 ========== */
.page.gradient-bg .empty { text-align: center; padding: 48px 20px; }
.page.gradient-bg .empty-icon { width: 56px; height: 56px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #f0f4ff; color: #5b8cff; font-size: 28px; }
.page.gradient-bg .empty-title { display: block; font-size: 14px; font-weight: 600; color: #6b7280; margin-bottom: 4px; }
.page.gradient-bg .empty-desc { display: block; font-size: 12px; color: #9ca3af; line-height: 1.5; }
.page.gradient-bg .loading { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 20px 0; color: #9ca3af; font-size: 13px; }

/* ========== PC 宽屏布局 ========== */
@media screen and (min-width: 1024px) {
  .page.pc-business-page.pc-list-page {
    width: min(1320px, calc(100vw - 48px));
    margin: 20px auto 36px;
    border-radius: 18px;
    background: transparent;
    box-sizing: border-box;
  }
  .page.pc-list-page .pc-order-heading { display: flex; align-items: baseline; gap: 10px; margin-right: auto; }
  .page.pc-list-page .pc-order-title { font-size: 20px; font-weight: 800; color: #111827; }
  .page.pc-list-page .pc-order-subtitle { font-size: 13px; color: #94a3b8; }
  .page.pc-list-page .pc-order-tools { display: flex; align-items: center; gap: 10px; }
  .page.pc-list-page .pc-order-count { font-size: 13px; color: #64748b; }
  .page.pc-list-page .pc-order-refresh { padding: 6px 14px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 13px; cursor: pointer; }
  .page.pc-list-page .order-scroll { height: auto; max-height: calc(100vh - 220px); padding: 0; overflow-y: auto; }
  .page.pc-list-page .order-card { max-width: 100%; }
}
