/* ========== 订单管理模块样式 ========== */

/* 状态徽章（订单状态）：一行一个、无外边框（block+fit-content 独占一行且宽度贴内容，padding 参与布局） */
.order-status {
    display: block;
    width: fit-content;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
    margin: 0 0 6px;
}

/* 待处理 */
.order-status.status-pending {
    background: #fff3cd;
    color: #856404;
}

/* 已支付 */
.order-status.status-paid {
    background: #d4edda;
    color: #155724;
}

/* 已使用 */
.order-status.status-used {
    background: #d1ecf1;
    color: #0c5460;
}

/* 已取消 */
.order-status.status-cancelled {
    background: #e2e3e5;
    color: #6c757d;
}

/* 退款中 */
.order-status.status-refunding {
    background: #f8d7da;
    color: #721c24;
}

/* 已退款 */
.order-status.status-refunded {
    background: #f5c6cb;
    color: #721c24;
}

/* 已预约 */
.order-status.status-booking {
    background: #cce5ff;
    color: #004085;
}

/* 已出票 */
.order-status.status-ticketing {
    background: #e8daef;
    color: #6a1b9a;
}

/* 部分状态胶囊（一单多张的混合状态） */
.order-status.status-partial-verify {
    background: #f6ffed;
    color: #389e0d;
}

.order-status.status-partial-refund {
    background: #fff1f0;
    color: #cf1322;
}

.order-status.status-partial-refunding {
    background: #fff7e6;
    color: #d46b08;
}

/* 预约状态徽章 */
.booking-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* 待处理 */
.booking-status.status-waiting {
    background: #fff3cd;
    color: #856404;
}

/* 已确认 */
.booking-status.status-confirmed {
    background: #d4edda;
    color: #155724;
}

/* 已变更 */
.booking-status.status-changed {
    background: #cce5ff;
    color: #004085;
}

/* 已取消 */
.booking-status.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

/* 统计卡片 */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 15px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-card .stat-label {
    font-size: 13px;
    color: #6c757d;
}

.stat-card .stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #212529;
}

.stat-card .stat-extra {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

/* 图表容器 */
.chart-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chart-container .chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 16px;
}

/* 产品占比分布卡标题行：标题 + 指标切换按钮（订单数/销售额） */
.chart-title.chart-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rank-toggle {
    margin-left: auto;
    display: inline-flex;
    background: #f1f3f5;
    border-radius: 999px;
    padding: 2px;
}

.rank-toggle-btn {
    border: 0;
    background: transparent;
    color: #6c757d;
    font-size: 12px;
    line-height: 1.5;
    padding: 3px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .12s, color .12s;
}

.rank-toggle-btn:hover {
    color: #212529;
}

.rank-toggle-btn.active {
    background: #fff;
    color: #007bff;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.chart-container .chart-body {
    width: 100%;
    height: 360px;
}

/* 统计页（订单统计/核销统计共用）：内容撑满可视高度，两页布局高度保持一致 */
.stats-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* 图表卡随视口高度伸缩填满剩余空间（对齐凭证统计页效果，避免出现纵向滚动条） */
.stats-page > .chart-container {
    flex: 1 1 0;
    min-height: 260px;
    display: flex;
    flex-direction: column;
}

.stats-page > .chart-container .chart-body {
    flex: 1;
    height: auto;
    min-height: 160px;
}

.stats-page .ovs-chart-row {
    flex: 1 1 0;
    min-height: 260px;
}

/* 并排行内的图表/列表 body 拉伸填满卡片剩余高度 */
.stats-page .ovs-chart-row .chart-body {
    flex: 1;
    height: auto;
    min-height: 160px;
}

.stats-page .ovs-chart-row .chart-body-sm {
    height: auto;
}

/* 双图表并排（订单统计/核销统计共用，窄屏单列）；卡片纵向 flex + 默认 stretch 保证等高 */
.ovs-chart-row {
    display: flex;
    align-items: stretch;
    gap: 20px;
    margin-bottom: 0;
}

.ovs-chart-row .chart-container {
    flex: 1;
    min-width: 0;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.ovs-chart-row .chart-body-sm {
    height: 300px;
}

/* 并排时列表类 body 拉伸填满卡片剩余高度（与图表卡片等高） */
.ovs-chart-row .chart-body-list {
    flex: 1;
    height: auto;
}

@media (max-width: 992px) {
    .ovs-chart-row {
        flex-direction: column;
    }
}

/* 分销商占比列表（订单统计页）：参考概念稿 B 案「产品分布」——名称 + 横向细条 + 条尾金额(占比) */
.chart-body-list {
    height: auto;
    min-height: 120px;
}

.dist-rank {
    padding: 8px 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.dist-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 12px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.dist-row:hover {
    background: #f8f9fa;
}

.dist-row:last-child {
    border-bottom-color: transparent;
}

.dist-name {
    width: 160px;
    flex-shrink: 0;
    color: #333;
    font-size: 13px;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dist-bar-zone {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.dist-bar-track {
    flex: 1;
    min-width: 0;
    height: 12px;
    background: transparent;
    border-radius: 0 3px 3px 0;
    overflow: hidden;
}

.dist-bar {
    height: 100%;
    background: #007bff;
    border-radius: 0 3px 3px 0;
    transition: width 0.4s ease;
}

.dist-val {
    flex-shrink: 0;
    font-size: 12px;
    color: #6c757d;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.dist-val em {
    font-style: normal;
    color: #adb5bd;
}

.dist-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 13px;
    padding: 0;
}

/* 特殊订单操作表单 */
.special-order-form .form-modal-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.special-order-form .form-modal-row>label {
    width: 110px;
    color: #495057;
    font-weight: 500;
}

.special-order-form .required {
    color: #dc3545;
    margin-left: 2px;
}

/* 延期操作的产品列表样式 */
.extension-product-list .product-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 10px;
    background: #fafbfc;
}

.extension-product-list .product-row.selected {
    background: #e7f1ff;
    border-color: #007bff;
}

.extension-product-list .product-row .product-info {
    flex: 1;
}

.extension-product-list .product-row .product-name {
    font-weight: 600;
    color: #212529;
}

.extension-product-list .product-row .product-meta {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

/* 影响范围预览框 */
.impact-preview {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 12px 0;
    color: #6d4c00;
}

.impact-preview .impact-num {
    font-size: 18px;
    font-weight: 600;
    color: #d84315;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 2px 10px;
    font-size: 12px;
}

/* 表格内二维码/核销码 */
.code-cell {
    font-family: 'Courier New', monospace;
    background: #f1f3f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* ========== 订单列表（10列表格，样式独立于产品页：od- 前缀 + .od-card/.od-table 作用域） ========== */

/* 列表卡片：白底容器 + 横向滚动（不用 overflow:hidden，避免裁剪固定定位的下拉菜单） */
.od-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

/* 空态 / 加载态 */
.od-empty {
    padding: 48px 0;
}

/* 表格：min-width 按 1920×1080 视口适配（1920−180侧栏−28内容区padding≈1712），
   低于可用宽度则不出横向滚动条；更窄屏幕仍保留横向滚动防列宽挤压 */
.od-table {
    width: 100%;
    min-width: 1680px;
    border-collapse: collapse;
    table-layout: fixed;
}

/* 复选框列：表头与数据行统一左对齐，保证复选框垂直对齐 */
.od-table .cb-col {
    text-align: left;
    padding-left: 14px;
}

/* 全选标签 */
.od-table thead th .th-check-all {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    cursor: pointer;
}

/* 表头 */
.od-table thead th {
    background: var(--table-header-bg);
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

/* 数据行 */
.od-table tbody td {
    padding: 12px;
    font-size: 12px;
    color: var(--text-primary);
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
}

.od-table tbody tr:last-child td {
    border-bottom: none;
}

.od-table tbody tr:hover {
    background: var(--table-row-hover);
}

/* ---------- 首尾列固定（sticky）：窄屏出现横向滚动条时，
   左侧信息列（复选框+商品信息 / 商品信息）固定在左、操作列固定在右 ----------
   订单列表首列是复选框(30px)+商品信息跟随固定；
   已核销/申请退单列表无复选框列，首列即商品信息，用 :has(.cb-col) 区分两种结构 */
.od-table th:first-child,
.od-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
}

.od-table:has(thead th:first-child.cb-col) th:nth-child(2),
.od-table:has(thead th:first-child.cb-col) td:nth-child(2) {
    position: sticky;
    left: 30px;
    z-index: 2;
}

.od-table th:last-child,
.od-table td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
}

/* sticky 单元格必须自带不透明背景，否则滚动时下层内容透出；
   表头与数据行背景色不同，分开赋值（不可统一覆盖） */
.od-table thead th:first-child,
.od-table:has(thead th:first-child.cb-col) thead th:nth-child(2),
.od-table thead th:last-child {
    z-index: 3; /* 表头压过行内 sticky 单元格 */
    background: var(--table-header-bg);
}

.od-table tbody td:first-child,
.od-table:has(thead th:first-child.cb-col) tbody td:nth-child(2),
.od-table tbody td:last-child {
    background: var(--card-bg);
}

/* 行 hover 背景原本挂在 tr 上（td 透明）；sticky 单元格有实色背景，
   需把 hover 背景同步下放到 td，固定列才能随行变色 */
.od-table tbody tr:hover td {
    background: var(--table-row-hover);
}

/* 商品信息列（复选框结构下的第 2 列固定）的实色背景规则含 :has()，
   其参数参与特异性计算得 (0,4,4)，压过上方通用 hover 规则 (0,2,3)，
   导致行 hover 时该列不变色；补同结构规则 (0,5,5) 恢复 hover 生效 */
.od-table:has(thead th:first-child.cb-col) tbody tr:hover td:nth-child(2) {
    background: var(--table-row-hover);
}

/* 滚动层次阴影：Chromium 不渲染 table-cell 的 box-shadow，
   改用 ::after 渐变条悬浮在被遮住的一侧（td 已是定位元素，可作包含块）；
   仅在有内容被固定列遮住（存在折叠）时显示——容器横向滚动进度驱动透明度。
   阴影挂在左侧固定组最右一列：有复选框列=商品信息列，无复选框列=首列 */
.od-table:has(thead th:first-child.cb-col) th:nth-child(2)::after,
.od-table:has(thead th:first-child.cb-col) td:nth-child(2)::after,
.od-table:not(:has(thead th:first-child.cb-col)) th:first-child::after,
.od-table:not(:has(thead th:first-child.cb-col)) td:first-child::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 100%;
    width: 12px;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0));
    pointer-events: none;
    /* 基础隐藏：宽屏无滚动条时时间轴 inactive，动画不驱动，保持不显示 */
    opacity: 0;
    /* scrollLeft=0 时左侧无折叠→隐藏，滚动后渐显 */
    animation: od-shadow-left linear both;
    animation-timeline: scroll(nearest inline);
}

.od-table th:last-child::after,
.od-table td:last-child::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 100%;
    width: 12px;
    background: linear-gradient(to left, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0));
    pointer-events: none;
    /* 基础隐藏：宽屏无滚动条时时间轴 inactive，动画不驱动，保持不显示 */
    opacity: 0;
    /* 滚到最右（scrollLeft=max）时右侧无折叠→隐藏，其余状态显示 */
    animation: od-shadow-right linear both;
    animation-timeline: scroll(nearest inline);
}

@keyframes od-shadow-left {
    0% { opacity: 0; }   /* 最左：左侧无折叠 */
    5% { opacity: 1; }   /* 略一滚动即满显 */
    100% { opacity: 1; }
}

@keyframes od-shadow-right {
    0% { opacity: 1; }
    95% { opacity: 1; }  /* 接近最右仍显示 */
    100% { opacity: 0; } /* 最右：右侧无折叠 */
}

/* 打开"更多"下拉时提升所在固定单元格层级：菜单虽切为 fixed 定位，
   但仍处于该 td（z-index:2）的 stacking context 内，
   下方行的 sticky 单元格同为 z-index:2 且 DOM 靠后，会整块盖住菜单，
   展开期间需临时抬层级（10 > 表头 3） */
.od-table td:has(.op-more.open) {
    z-index: 10;
}

/* ---------- 商品信息列 ---------- */
.od-card .prod-info {
    min-width: 0;
    flex: 1;
}

.od-card .prod-info .prod-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    padding-right: 14px;
}

.od-card .prod-info .prod-id {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ID 复制按钮：默认隐藏，悬停订单行时显示（各信息列通用），悬停按钮变蓝 */
.od-card .copy-id-btn {
    display: none;
    margin-left: 4px;
    padding: 2px 4px;
    font-size: 10px;
    line-height: 1;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    vertical-align: 1px;
    transition: color 0.15s;
}

.od-table tbody tr:hover .copy-id-btn {
    display: inline-block;
}

.od-card .copy-id-btn:hover {
    color: var(--primary-color);
}

/* 可复制值文本（订单号/采购订单号等）：点击文本本身即复制，与悬停复制按钮等效 */
.od-card .info-value.copyable-val {
    cursor: pointer;
    user-select: none;
}

.od-card .info-value.copyable-val:hover {
    color: var(--primary-color);
}

.od-card .prod-info .prod-attrs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

/* 产品类型小标签（门票/酒店） */
.od-card .mini-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 18px;
    background: rgba(0, 123, 255, 0.08);
    color: #007bff;
    white-space: nowrap;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.od-card .mini-tag.type-tag {
    background: #f0f2f5;
    color: var(--text-secondary);
}

/* 产品类型胶囊：颜色与"全部产品"页属性标签行首位类型角标一致（scenic-tickets.css .prod-type-badge.badge-*） */
.od-card .mini-tag.prod-type-scenic {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.od-card .mini-tag.prod-type-hotel {
    background: rgba(99, 102, 241, 0.12);
    color: #4338ca;
}

.od-card .mini-tag.prod-type-package {
    background: rgba(234, 88, 12, 0.12);
    color: #c2410c;
}

/* ---------- 通用信息行（订单信息/分销渠道/凭证列）：灰色小标签 + 值，每项独立一行 ---------- */
.od-card .info-line {
    display: flex;
    align-items: baseline;
    gap: 6px;
    /* 行间距：单元格内每条信息行的纵向间隔 */
    margin-bottom: 4px;
    overflow: hidden;
}

.od-card .info-label {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.od-card .info-value {
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.od-card .info-value.iv-strong {
    color: var(--text-primary);
}

/* 订单号等宽字体 */
.od-card .info-value.iv-mono {
    font-family: 'Courier New', monospace;
}

/* ---------- 价格信息列 ---------- */
.od-card .price-cell {
    line-height: 1.5;
}

.od-card .price-cell .sale-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
}

.od-card .price-cell .sale-label {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}

/* 到账金额行（与数量列同风格） */
.od-card .price-cell .recv-line {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
}

/* 括号内单价（弱化小字） */
.od-card .price-cell .price-unit {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}

/* ---------- 数量列：灰色小字数字（无彩色胶囊；凭证弹窗仍用 .qty-pill 彩色状态） ---------- */
.od-card .qty-cell .qty-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.od-card .qty-cell .qty-num {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 票码状态胶囊（凭证弹窗内使用，位于 .od-card 之外，保持全局） */
.qty-pill {
    display: inline-block;
    padding: 0 8px;
    border-radius: 9px;
    font-size: 11px;
    line-height: 17px;
    background: #f0f2f5;
    color: var(--text-secondary);
}

/* 可使用=绿，已使用=蓝，退单相关=红 */
.qty-pill.q-usable {
    background: #e8f7ee;
    color: #28a745;
}

.qty-pill.q-used {
    background: #e7f1ff;
    color: #1d4ed8;
}

.qty-pill.q-refund {
    background: #fdecec;
    color: #dc3545;
}

/* 不可用/已失效=灰（名额耗尽时残余码、过期码） */
.qty-pill.q-invalid {
    background: #f0f1f3;
    color: #8a94a6;
}

/* ---------- 凭证列：码号可点击查看 ---------- */
.od-card .cert-cell .code-link {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--primary-color);
    cursor: pointer;
}

.od-card .cert-cell .code-link:hover {
    text-decoration: underline;
}

/* ---------- 时间信息列 ---------- */
.od-card .time-cell .time-line {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.od-card .time-cell .time-label {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.od-card .time-cell .time-value {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* 分次核销：使用时间高亮蓝色，悬停有明细气泡 */
.od-card .time-cell .time-value.multi-used {
    color: #1a73e8;
}

/* ---------- 操作列（垂直链接 + 更多下拉） ---------- */
.od-card .ops-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.od-card .ops-cell .op-link {
    font-size: 13px;
    color: var(--primary-color);
    cursor: pointer;
    line-height: 1.3;
}

.od-card .ops-cell .op-link:hover {
    text-decoration: underline;
}

.od-card .ops-cell .op-more {
    position: relative;
}

.od-card .ops-cell .op-more-toggle {
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.od-card .ops-cell .op-more-toggle:hover {
    color: var(--primary-color);
}

/* 默认锚定在"更多"下方；展开时 JS 切为 fixed 视口定位，收起时还原内联样式 */
.od-card .ops-cell .op-more-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 30;
    min-width: 110px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    padding: 4px 0;
}

.od-card .ops-cell .op-more.open .op-more-menu {
    display: block;
}

.od-card .ops-cell .op-more-menu .menu-item {
    display: block;
    padding: 6px 14px;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
}

.od-card .ops-cell .op-more-menu .menu-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.od-card .ops-cell .op-more-menu .menu-item.danger {
    color: #dc3545;
}

/* 凭证弹窗：大号码号 */
.ticket-code-big {
    font-family: 'Courier New', monospace;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-primary);
    text-align: center;
    padding: 16px 0 8px;
}

/* 凭证弹窗：二维码（订单级主码 + 一票一码网格） */
.tc-qr-main {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}

.tc-qr-main img,
.tc-qr-main canvas {
    border: 1px solid #e8ebf0;
    border-radius: 8px;
    padding: 8px;
    background: #fff;
    box-sizing: content-box;
}

.tc-qr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.tc-qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border: 1px solid #f0f2f5;
    border-radius: 8px;
    background: #fafbfc;
}

.tc-qr-item .tc-qr-img img,
.tc-qr-item .tc-qr-img canvas {
    width: 96px;
    height: 96px;
    display: block;
}

/* 已核销/不可用码：二维码置灰（仍可辨认） */
.tc-qr-item .tc-qr-img.dim {
    filter: grayscale(1);
    opacity: .75;
}

/* 已退票码：灰色占位块（保持网格对齐，不渲染二维码） */
.tc-qr-item .tc-qr-img.void {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f1f3;
    border-radius: 6px;
    color: #8a94a6;
    font-size: 13px;
    letter-spacing: 2px;
}

.tc-qr-code {
    font-size: 12px;
    color: var(--text-primary);
}

/* 响应式 */
@media (max-width: 768px) {
    .stat-cards {
        grid-template-columns: 1fr;
    }

    /* 统计页图表移动端降级：降低高度，避免单列布局下图表过高挤压明细表 */
    .chart-container {
        padding: 14px;
    }
    .chart-container .chart-title {
        font-size: 15px;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    .chart-container .chart-body {
        height: 260px;
    }
    .ovs-chart-row .chart-body-sm {
        height: 230px;
    }

    .special-order-form .form-modal-row {
        flex-direction: column;
        align-items: stretch;
    }

    .add-product-grid {
        grid-template-columns: 1fr;
    }
}

/* 添加产品弹窗 - 卡片网格 */
.add-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.add-product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #fafbfc;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.add-product-card:hover {
    border-color: #007bff;
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.add-product-card:focus {
    outline: none;
}

.add-product-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.add-product-icon img {
    width: 30px;
    height: 30px;
}

.add-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
}

.add-product-desc {
    font-size: 12px;
    color: #6c757d;
}

/* ========== 订单详情抽屉（右侧滑入，od-drawer- 前缀） ========== */

/* 遮罩层 */
.od-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.25s;
}

.od-drawer-overlay.show {
    display: block;
    opacity: 1;
}

/* 抽屉主体：右侧滑入 */
.od-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 820px;
    max-width: 94vw;
    background: var(--card-bg, #fff);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 1051;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
}

.od-drawer.open {
    transform: translateX(0);
}

/* 头部：标题 + 状态徽章 + 关闭 */
.od-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--table-header-bg, #f8f9fa);
    position: sticky;
    top: 0;
    z-index: 2;
}

.od-drawer-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #212529);
    display: flex;
    align-items: center;
    gap: 8px;
}

.od-drawer-title .fas {
    color: var(--primary-color, #007bff);
}

.od-drawer-title .order-status {
    margin-left: 4px;
}

.od-drawer-close {
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: var(--text-secondary, #6c757d);
    cursor: pointer;
    padding: 0 4px;
}

.od-drawer-close:hover {
    color: var(--text-primary, #212529);
}

/* 内容区：浅灰底 + 分区白卡片（呼应列表 od-card） */
.od-drawer-body {
    flex: 1;
    padding: 16px 20px;
    background: #f5f6f8;
}

.od-drawer-section {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.od-drawer-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #212529);
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    align-items: center;
    gap: 6px;
}

.od-drawer-section-title .fas {
    color: var(--primary-color, #007bff);
    font-size: 12px;
}

.od-drawer-section-title small {
    font-weight: 400;
    color: var(--text-secondary, #6c757d);
}

/* 键值行：灰标签 + 值（与列表 info-line 风格一致） */
.od-drawer-row {
    display: flex;
    align-items: flex-start;
    padding: 4px 0;
    font-size: 12px;
    line-height: 1.6;
}

.od-drawer-label {
    flex: 0 0 88px;
    color: var(--text-secondary, #6c757d);
}

.od-drawer-value {
    flex: 1;
    min-width: 0;
    color: var(--text-primary, #212529);
    word-break: break-all;
}

.od-drawer-value code {
    font-size: 12px;
}

/* 富文本（温馨提示）：块级元素间距收敛，样式跟随抽屉排版 */
.od-drawer-value .od-rich-text div,
.od-drawer-value .od-rich-text p {
    margin: 0 0 2px;
}

.od-drawer-value .od-rich-text img {
    max-width: 100%;
    height: auto;
}

.od-drawer-value .od-rich-text b,
.od-drawer-value .od-rich-text strong {
    font-weight: 600;
}

.od-drawer-amount {
    color: #e64545;
    font-weight: 600;
    font-size: 14px;
}

/* 流转记录表 */
.od-drawer-timeline {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.od-drawer-timeline thead th {
    background: var(--table-header-bg, #f8f9fa);
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #6c757d);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.od-drawer-timeline tbody td {
    padding: 7px 8px;
    border-bottom: 1px solid #f0f2f5;
    color: var(--text-primary, #212529);
    vertical-align: top;
}

.od-drawer-timeline tbody tr:last-child td {
    border-bottom: none;
}

.od-drawer-timeline tbody tr:hover {
    background: var(--table-row-hover, #f8f9fa);
}

/* 底部操作栏 */
.od-drawer-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg, #fff);
    text-align: right;
    position: sticky;
    bottom: 0;
}

/* ---------- 订单筛选：状态Tab（带数量角标） ---------- */
.order-status-tabs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    width: fit-content; /* 收缩为 Tab 内容宽度，底部分隔线止于文字右缘 */
    /* margin-bottom: 14px; */
    border-bottom: 1px solid #e9ecef;
}

/* Tab 行独占一行：fit-content 不再强制换行，需把 Tab 之后的筛选区压到下一行 */
.filter-section > .order-status-tabs ~ * {
    flex-basis: 100%;
}

.ost-tab {
    appearance: none;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 14px;
    font-size: 15px;
    color: var(--text-muted, #8a94a6);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}

.ost-tab:hover {
    color: var(--text-primary, #212529);
}

.ost-tab.active {
    color: var(--primary, #2f6bff);
    font-weight: 600;
    border-bottom-color: var(--primary, #2f6bff);
}

.ost-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #eef0f4;
    color: var(--text-muted, #8a94a6);
    font-size: 11px;
    font-weight: 500;
    line-height: 18px;
    text-align: center;
    transition: background 0.15s, color 0.15s;
}

.ost-tab.active .ost-count {
    background: var(--primary, #2f6bff);
    color: #fff;
}

/* ---------- 订单筛选：更多筛选折叠区 ---------- */
.btn-more-filter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 34px;
    padding: 0 4px;
    font-size: 13px;
    color: #555;
    background: transparent;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s;
}

.btn-more-filter:hover {
    color: var(--primary, #2f6bff);
}

.btn-more-filter .more-arrow {
    font-size: 11px;
    transition: transform 0.2s;
}

.btn-more-filter.open .more-arrow {
    transform: rotate(180deg);
}

.filter-more {
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 16px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: -2px;
}

.filter-more .form-control {
    min-width: 120px;
}

.filter-sep {
    color: #999;
    font-size: 13px;
    margin: 0 2px;
}

/* ---------- 核销验票弹窗 ---------- */
/* 信息表格：覆盖全局 .table td 居中，改左对齐 + 标签列灰底 */
#verifyModal .v-info-table td {
    text-align: left;
    padding: 9px 12px;
    font-size: 13px;
    vertical-align: middle;
}

#verifyModal .v-info-table td:first-child {
    width: 100px;
    color: #6b7280;
    background: #fafbfc;
    white-space: nowrap;
}

/* 核销进度条 */
#verifyModal .v-bar {
    flex: 1;
    min-width: 60px;
    height: 8px;
    background: #edf0f4;
    border-radius: 4px;
    overflow: hidden;
}

#verifyModal .v-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #52c41a, #73d13d);
    border-radius: 4px;
    transition: width 0.3s;
}

#verifyModal .v-bar-text {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* 套餐内容清单 */
#verifyModal .v-items {
    background: #f7f8fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 2px 14px 4px;
    margin-top: 10px;
}

#verifyModal .v-items-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 0 7px;
    color: #8a94a6;
    font-size: 12px;
}

#verifyModal .v-items-title+.v-item {
    border-top: none;
}

#verifyModal .v-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid #eceef1;
    font-size: 13px;
}

#verifyModal .v-item-tag {
    flex: 0 0 auto;
}

#verifyModal .v-item-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#verifyModal .v-item-progress {
    flex: 0 0 auto;
    min-width: 66px;
    text-align: right;
    font-size: 12px;
    color: #fa8c16;
    white-space: nowrap;
}

#verifyModal .v-item-progress.ok {
    color: #52c41a;
}

#verifyModal .v-item-qty {
    flex: 0 0 auto;
    width: 56px;
    height: 28px;
    padding: 2px 4px;
    font-size: 12px;
    text-align: center;
}

#verifyModal .v-item-btn {
    flex: 0 0 auto;
    font-size: 12px;
    padding: 3px 12px;
    border-radius: 4px;
}