/* 主内容区域添加底部间距 */
.main-content {
    padding-bottom: 80px;
}

.order-tabs {
    display: flex;
    background: linear-gradient(180deg, rgba(252, 254, 255, 0.88) 0%, rgba(247, 250, 252, 0.94) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(228, 235, 243, 0.7);
    position: sticky;
    top: 52px;
    z-index: 99;
    padding: 8px 12px 10px;
    margin-top: 0;
}

.order-tab {
    flex: 1;
    padding: 13px 0;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 14px;
}

.order-tab::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 3px 3px 0 0;
    transition: transform 0.3s ease;
}

.order-tab.active {
    color: #315490;
    background: linear-gradient(135deg, rgba(121, 207, 211, 0.12) 0%, rgba(138, 164, 255, 0.12) 100%);
}

.order-tab.active::after {
    transform: translateX(-50%) scaleX(1);
}

.order-tab:hover:not(.active) {
    color: var(--primary-light);
}

.order-list {
    background: linear-gradient(180deg, rgba(241, 247, 249, 0.78) 0%, rgba(248, 250, 252, 1) 42%);
    padding: 12px 12px 12px;
    min-height: calc(100vh - 240px);
}

.order-item {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 12px 28px -22px rgba(89, 118, 158, 0.28);
    border: 1px solid rgba(214, 224, 235, 0.68);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.order-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.order-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px -22px rgba(89, 118, 158, 0.34);
    border-color: rgba(145, 190, 205, 0.72);
}

.order-item:hover::before {
    opacity: 1;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.order-no {
    font-size: 12px;
    color: var(--text-secondary);
}

.order-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.order-status.pending {
    background-color: #fff7e6;
    color: var(--warning-color);
}

.order-status.accepted {
    background-color: #e6f7ff;
    color: var(--primary-color);
}

.order-status.paid {
    background-color: #f6ffed;
    color: var(--success-color);
}

.order-status.completed {
    background-color: #f0f0f0;
    color: var(--text-secondary);
}

.order-status.cancelled {
    background-color: #fff1f0;
    color: var(--error-color);
}

.order-card-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.card-icon-large {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c97ce;
}

.order-card-icon-svg {
    width: 20px;
    height: 20px;
}

.card-info-text {
    flex: 1;
}

.card-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.card-spec {
    font-size: 12px;
    color: var(--text-secondary);
}

.order-partner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.partner-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.partner-name {
    font-size: 14px;
    color: var(--text-secondary);
}

.order-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.amount-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.amount-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--error-color);
}

.order-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.btn-order-action {
    flex: 1;
    padding: 10px 20px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-order-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-order-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.3);
}

.btn-order-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.btn-order-secondary {
    background: var(--bg-white);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-order-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-order-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.my-listings-section {
    padding: 16px;
    background-color: var(--bg-white);
    border-top: 8px solid var(--bg-color);
    margin-bottom: 80px;
}

.btn-my-listings {
display: flex;
align-items: center;
justify-content: space-between;
padding: 18px 16px;
background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
border: 2px solid var(--border-color);
border-radius: var(--radius-xl);
text-decoration: none;
color: var(--text-primary);
transition: all 0.3s ease;
box-shadow: var(--shadow-sm);
}

.btn-my-listings:hover {
border-color: var(--primary-color);
transform: translateX(4px);
box-shadow: var(--shadow-md);
}

.btn-my-listings:active {
transform: translateX(2px);
}

.btn-my-listings .icon {
font-size: 20px;
}

.btn-my-listings .text {
    flex: 1;
    margin-left: 12px;
    font-size: 15px;
    font-weight: 500;
}

.btn-my-listings .arrow {
    font-size: 18px;
    color: var(--text-secondary);
}

.order-detail-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.detail-label {
    color: var(--text-secondary);
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

.payment-qrcode {
    width: 200px;
    height: 200px;
    margin: 12px auto;
    display: block;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: zoom-in;
    object-fit: contain;
    background: white;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline-item {
    position: relative;
    padding-bottom: 16px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -16px;
    top: 12px;
    width: 1px;
    height: calc(100% - 8px);
    background-color: var(--border-color);
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-text {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ── 订单状态徽章 ─────────────────────────────────────────── */
.order-status-badge {
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.status-pending_payment { background: #fff8ed; color: #c8861f; }
.status-pending_confirm { background: #edf7ff; color: #4b7cc9; }
.status-pending_delivery { background: #eefcf7; color: #2f9c7d; }
.status-completed        { background: #f4f6f8; color: #758197; }
.status-cancelled        { background: #fff3f4; color: #d36a77; }
.status-matching         { background: #f6f3ff; color: #7b67c8; }
.status-disputed         { background: #fff6ef; color: #cb7b53; }

/* ── 订单卡片新布局 ──────────────────────────────────────── */
.order-amount-right {
    text-align: right;
    flex-shrink: 0;
}
.amount-num {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: #456ef2;
}
.trade-type-tag {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
}
.trade-type-tag.buy  { background: #edf7ff; color: #4b7cc9; }
.trade-type-tag.sell { background: #eefcf7; color: #2f9c7d; }

.order-partner-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.partner-avatar-sm {
    width: 24px; height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
}
.partner-name-sm {
    font-size: 12px;
    color: var(--text-secondary);
}
.order-status-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding: 7px 10px;
    background: linear-gradient(135deg, #f7fafc 0%, #f2f6fa 100%);
    border-radius: 10px;
    border: 1px solid rgba(222, 231, 239, 0.92);
}

/* ── 倒计时 ─────────────────────────────────────────────── */
.order-countdown {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: #fff8ed;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #c8861f;
}
.countdown-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}
.detail-countdown {
    padding: 12px 16px;
    background: #fff7e6;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #d46b08;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.detail-countdown.urgent {
    background: #fff1f0;
    color: #cf1322;
    animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
    0%,100% { opacity: 1; }
    50%      { opacity: 0.7; }
}

/* ── 操作按钮 ────────────────────────────────────────────── */
.order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.btn-order-primary, .btn-order-secondary, .btn-order-ghost {
    padding: 8px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.btn-order-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 10px 20px rgba(121, 153, 226, 0.2);
}
.btn-order-primary:active { opacity: 0.85; }
.btn-order-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid rgba(214, 224, 235, 0.88);
}
.btn-order-secondary:active { background: #f5f5f5; }
.btn-order-ghost {
    background: #f8fbfc;
    color: #6f7f97;
    border: 1px solid rgba(214, 224, 235, 0.88);
}
.btn-order-ghost:active { background: #f5f5f5; }

/* ── 支付收款码区块（置顶，买家待付款） ──────────────────── */
.payment-section-top {
    background: linear-gradient(135deg, rgba(121, 207, 211, 0.1) 0%, rgba(138, 164, 255, 0.12) 100%);
    border: 1px solid rgba(145, 190, 205, 0.48);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 18px;
    text-align: center;
}
.payment-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.payment-method-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.pm-label {
    background: var(--primary-gradient);
    color: white;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.pm-name { font-size: 14px; color: var(--text-secondary); }
.pm-account {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 500;
}
.payment-qrcode-large {
    width: 220px;
    height: 220px;
    margin: 12px auto;
    display: block;
    border-radius: 12px;
    border: 3px solid white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    object-fit: contain;
    background: white;
    cursor: zoom-in;
}
.payment-qrcode:hover,
.payment-qrcode-large:hover {
    transform: scale(1.02);
}
.payment-qrcode-hint {
    margin-top: 6px;
    font-size: 13px;
    color: #2563eb;
    font-weight: 500;
}
.payment-amount-tip {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 8px 0 16px;
}
.payment-amount-tip strong {
    font-size: 20px;
    color: var(--error-color);
}
.btn-pay-confirm {
    width: 100%;
    padding: 14px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(99,102,241,0.3);
    transition: all 0.2s;
}
.btn-pay-confirm:active { opacity: 0.85; transform: scale(0.98); }

/* ── 详情状态 Banner ──────────────────────────────────────── */
.detail-status-banner {
    padding: 14px 16px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    background: #f1f7ff;
}
.detail-status-banner.status-pending_payment { border-color: #d46b08; background: #fffbf0; }
.detail-status-banner.status-pending_confirm { border-color: #096dd9; background: #f0f8ff; }
.detail-status-banner.status-pending_delivery { border-color: #389e0d; background: #f6fff0; }
.detail-status-banner.status-completed  { border-color: #595959; background: #f9f9f9; }
.detail-status-banner.status-cancelled  { border-color: #cf1322; background: #fff5f5; }
.detail-status-banner.status-disputed   { border-color: #d4380d; background: #fff8f0; }
.status-text-main {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.status-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ── 详情操作按钮 ─────────────────────────────────────────── */
.detail-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}
.btn-detail-primary, .btn-detail-secondary, .btn-detail-ghost {
    width: 100%;
    padding: 13px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.btn-detail-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(99,102,241,0.3);
}
.btn-detail-secondary {
    background: white;
    color: var(--error-color);
    border: 1.5px solid var(--error-color);
}
.btn-detail-ghost {
    background: #f9fafb;
    color: var(--text-secondary);
    border: 1.5px solid #e0e0e0;
}

/* ── 金额高亮 ─────────────────────────────────────────────── */
.amount-highlight {
    color: var(--error-color);
    font-weight: 700;
    font-size: 15px;
}

/* ── 时间线重构 ──────────────────────────────────────────── */
.timeline-dot {
    position: absolute;
    left: -20px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
}
.timeline-content .timeline-text { font-size: 14px; color: var(--text-primary); margin-bottom: 2px; }
.timeline-content .timeline-time { font-size: 12px; color: var(--text-secondary); }

.detail-page {
    background: linear-gradient(180deg, rgba(241, 247, 249, 0.88) 0%, rgba(248, 250, 252, 1) 42%);
    min-height: 100vh;
}

.detail-page-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-back-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 12px;
    color: var(--text-primary);
    box-shadow: 0 8px 18px rgba(118, 141, 177, 0.08);
    cursor: pointer;
}

.detail-back-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.detail-page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.detail-page-main {
    padding: 12px 16px 28px;
}

.detail-page-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 18px 16px 20px;
    border: 1px solid rgba(214, 224, 235, 0.72);
    box-shadow: 0 16px 34px rgba(120, 144, 179, 0.1);
}

/* ── 支付截图上传 ─────────────────────────────────────────── */
.pay-proof-upload {
    margin: 16px 0;
}

.pay-proof-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.pay-proof-area {
    position: relative;
    width: 100%;
    min-height: 120px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pay-proof-area:hover {
    border-color: var(--primary-color);
    background: #f1f7ff;
}

.pay-proof-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
}

.pay-proof-placeholder svg {
    color: #9ca3af;
}

.pay-proof-placeholder span {
    font-size: 14px;
    font-weight: 500;
}

.pay-proof-placeholder small {
    font-size: 12px;
    color: var(--text-tertiary);
}

.pay-proof-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 200px;
}

.pay-proof-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}

.pay-proof-remove:hover {
    background: rgba(239, 68, 68, 0.9);
}

/* ── 支付截图展示（卖家端） ────────────────────────────────── */
.pay-proof-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 16px;
}

.pay-proof-display {
    text-align: center;
}

.pay-proof-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    cursor: zoom-in;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.pay-proof-image:hover {
    transform: scale(1.02);
}

.pay-proof-hint {
    margin-top: 10px;
    font-size: 13px;
    color: #059669;
    font-weight: 500;
}

/* ── 支付截图放大模态框 ────────────────────────────────────── */
.pay-proof-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pay-proof-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.pay-proof-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 1001;
}

.pay-proof-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.pay-proof-modal-hint {
    margin-top: 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
}

.pay-proof-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #374151;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pay-proof-modal-close:hover {
    background: white;
    transform: scale(1.1);
}
