/* ============================================================
   支付订单页前台样式（/pay-orders.html，在线支付订单展示）
   移动优先 + PC 自适应（断点 768px）
   复用站点变量（--c-*），暗黑模式随 html[data-theme="dark"] 自动生效
   说明：本页统一使用 po- 前缀，严禁使用 ad- 前缀（会被广告拦截规则命中）
   ============================================================ */

body { background: var(--c-bg); }

.po-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 12px 88px;
}
@media (min-width: 769px) {
    .po-wrap { max-width: 1000px; padding: 24px 16px 60px; }
    /* 顶部条与内容容器同宽对齐（本文件仅支付订单页引用，可安全覆盖 asset-detail 的 960px） */
    .ast-topbar-inner { max-width: 1000px; }
}

/* 顶部条右侧动作按钮（asset-detail.css 仅定义 .ast-back，此处补齐本页动作按钮样式） */
.ast-topbar-action {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--c-bg-2); color: var(--c-text-2);
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; flex-shrink: 0;
    transition: background .2s, color .2s;
}
.ast-topbar-action:hover { background: var(--c-primary-light); color: var(--c-primary); }

/* ---------- 加载 / 空状态 ---------- */
.po-loading {
    text-align: center;
    padding: 48px 16px;
    color: var(--c-text-2);
    font-size: 14px;
}
.po-loading i { font-size: 24px; color: var(--c-primary); display: block; margin-bottom: 10px; }
.po-empty {
    text-align: center;
    padding: 56px 16px;
    color: var(--c-text-2);
    font-size: 14px;
    background: var(--c-surface);
    border: 1px dashed var(--c-border);
    border-radius: var(--radius-lg);
}
.po-empty i { font-size: 30px; color: var(--c-text-3); display: block; margin-bottom: 10px; }
.po-empty p { margin: 0; }

/* ============================================================
   状态筛选 Tab（药丸样式，横向滚动）
   ============================================================ */
.po-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: var(--space-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.po-tabs::-webkit-scrollbar { display: none; }
.po-tab {
    flex-shrink: 0;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text-2);
    border-radius: 18px;
    padding: 7px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.po-tab.active {
    border-color: transparent;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--c-primary), #36cfc9);
}

/* ============================================================
   移动端订单卡片
   ============================================================ */
.po-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 14px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
}
.po-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}
.po-subject {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--c-text);
    line-height: 1.4;
    word-break: break-word;
}
.po-order-no {
    font-size: 12px;
    color: var(--c-text-3);
    user-select: all;
    word-break: break-all;
}

/* ---------- 状态药丸 ---------- */
.po-pill {
    display: inline-block;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 6px;
    white-space: nowrap;
}
.po-st-pending { color: #0237a3; background: rgba(24, 144, 255, .12); }
.po-st-success { color: #15803d; background: rgba(34, 197, 94, .12); }
.po-st-cancel  { color: var(--c-text-3); background: var(--c-bg-2); }
.po-st-refund  { color: #7c3aed; background: rgba(139, 92, 246, .12); }
.po-st-expired { color: var(--c-text-3); background: var(--c-bg-2); }

/* ---------- 元信息行（业务类型 / 渠道 / 时间） ---------- */
.po-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--c-text-2);
}
.po-meta-item { display: inline-flex; align-items: center; gap: 5px; }
.po-meta-item i { color: var(--c-text-3); font-size: 12px; }

/* ---------- 金额 + 操作 ---------- */
.po-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--c-border);
}
.po-amount { font-size: 16px; font-weight: 800; color: #f43f5e; }
.po-ops { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- 通用小按钮 ---------- */
.po-btn {
    border: 1px solid var(--c-border);
    background: var(--c-bg-2);
    color: var(--c-text-2);
    border-radius: 16px;
    padding: 5px 14px;
    font-size: 12px;
    cursor: pointer;
    transition: opacity .2s;
}
.po-btn:hover { opacity: .85; }
.po-btn.po-btn-primary {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, var(--c-primary), #36cfc9);
    font-weight: 600;
}

/* ============================================================
   PC 表格布局（显隐由媒体查询控制，禁止内联 display:none）
   ============================================================ */
.po-list-pc { display: none; }
@media (min-width: 769px) {
    .po-list { display: none; }
    .po-list-pc { display: block; }
}
.po-pc-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 6px 16px 14px;
    box-shadow: var(--shadow);
    overflow: hidden; /* 兜底：任何内容不得溢出卡片圆角边界 */
}
/* 固定表格布局：列宽可控，长订单号 / 多按钮不再撑破卡片 */
.po-pc-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.po-pc-table th:nth-child(1) { width: 120px; } /* 时间 */
.po-pc-table th:nth-child(3) { width: 178px; } /* 订单号 */
.po-pc-table th:nth-child(4) { width: 90px; }  /* 业务类型 */
.po-pc-table th:nth-child(5) { width: 90px; }  /* 渠道 */
.po-pc-table th:nth-child(6) { width: 90px; }  /* 金额 */
.po-pc-table th:nth-child(7) { width: 80px; }  /* 状态 */
.po-pc-table th:nth-child(8) { width: 110px; } /* 操作 */
.po-pc-table th, .po-pc-table td {
    padding: 12px 10px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid var(--c-border);
    color: var(--c-text);
    vertical-align: middle;
}
.po-pc-table th { color: var(--c-text-2); font-weight: 600; white-space: nowrap; }
.po-pc-table tr:last-child td { border-bottom: none; }
/* 时间 / 订单号：单行省略，避免日期时间被折行 */
.po-pc-table td:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.po-pc-table td:nth-child(3) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 标题单行省略 */
.po-pc-subject b {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.po-pc-amount { color: #f43f5e; font-weight: 700; }
/* 操作列按钮横向排列 */
.po-pc-ops { white-space: nowrap; }

/* ---------- 分页 ---------- */
.po-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px 0 4px;
    flex-wrap: wrap;
}
.po-pagination button {
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text-2);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}
.po-pagination button:disabled { opacity: .45; cursor: not-allowed; }
.po-page-info { font-size: 13px; color: var(--c-text-2); }
