/* ===== 基础重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "Microsoft YaHei", "Segoe UI", sans-serif; background: #f0f2f5; color: #333; }
a { text-decoration: none; color: inherit; }

/* ===== 登录页 ===== */
.login-body {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-card {
    width: 380px; background: #fff; border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.15); overflow: hidden;
}
.login-header { text-align: center; padding: 36px 24px 20px; }
.login-header h2 { font-size: 22px; color: #333; margin-bottom: 8px; }
.login-header p { font-size: 14px; color: #999; }
.login-form { padding: 0 32px 32px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; color: #666; margin-bottom: 6px; }
.form-group input {
    width: 100%; height: 44px; border: 1px solid #ddd; border-radius: 8px;
    padding: 0 14px; font-size: 15px; transition: border-color .2s;
}
.form-group input:focus { outline: none; border-color: #667eea; }
.login-error { color: #e74c3c; font-size: 13px; min-height: 20px; margin-bottom: 8px; }
.btn-login {
    width: 100%; height: 44px; border: none; border-radius: 8px;
    background: #667eea; color: #fff; font-size: 16px; cursor: pointer;
    transition: background .2s;
}
.btn-login:hover { background: #5568d3; }
.btn-login:disabled { background: #a0a8e8; cursor: not-allowed; }

/* ===== 主布局 ===== */
.app-layout { display: flex; min-height: 100vh; }

/* ===== 侧边栏 ===== */
.sidebar {
    width: 220px; background: #001529; color: #fff; flex-shrink: 0;
    display: flex; flex-direction: column; position: fixed; top: 0; left: 0;
    height: 100vh; z-index: 100;
}
.sidebar-logo {
    height: 64px; display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-menu { flex: 1; padding: 12px 0; }
.menu-item {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 24px; font-size: 15px; color: rgba(255,255,255,.7);
    transition: all .2s; cursor: pointer;
}
.menu-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.menu-item.active { color: #fff; background: #1890ff; }
.menu-icon { font-size: 18px; }

/* ===== 主区域 ===== */
.main-wrapper { flex: 1; margin-left: 220px; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
    height: 64px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; position: sticky; top: 0; z-index: 50;
}
.page-title { font-size: 18px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.user-name { font-size: 14px; color: #666; }
.btn-logout {
    padding: 6px 16px; border-radius: 6px; font-size: 13px;
    background: #f5f5f5; color: #666; transition: all .2s;
}
.btn-logout:hover { background: #e74c3c; color: #fff; }
.content { flex: 1; padding: 20px 24px; }

/* ===== 筛选条件栏 ===== */
.filter-bar {
    background: #fff; border-radius: 8px; padding: 20px 24px; margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.filter-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.filter-item { display: flex; flex-direction: column; gap: 6px; }
.filter-item label { font-size: 13px; color: #999; }
.filter-item select, .filter-item input {
    height: 36px; border: 1px solid #ddd; border-radius: 6px;
    padding: 0 10px; font-size: 14px; min-width: 160px; background: #fff;
}
.filter-item select:focus, .filter-item input:focus { outline: none; border-color: #1890ff; }
.btn-query {
    height: 36px; padding: 0 24px; border: none; border-radius: 6px;
    background: #1890ff; color: #fff; font-size: 14px; cursor: pointer; transition: background .2s;
}
.btn-query:hover { background: #40a9ff; }

/* ===== 指标卡片按钮组（名称/数值/变化） ===== */
.metric-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.metric-tab {
    display: flex; flex-direction: column; gap: 4px;
    padding: 12px 14px;
    border: 1px solid #e8e8e8; border-radius: 8px;
    background: #fff; cursor: pointer; transition: all .2s;
    text-align: left; font-family: inherit;
}
.metric-tab:hover { border-color: #1890ff; background: #f0f7ff; transform: translateY(-1px); }
.metric-tab-static { cursor: default; }
.metric-tab-static:hover { border-color: #e8e8e8; background: #fff; transform: none; }
.metric-tab.active {
    border-color: #1890ff; background: #e6f7ff;
    box-shadow: 0 2px 8px rgba(24,144,255,.25);
}
.metric-tab .metric-name {
    font-size: 13px; color: #8c8c8c; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.metric-tab.active .metric-name { color: #1890ff; }
.metric-tab .metric-value {
    font-size: 22px; font-weight: 600; color: #262626; line-height: 1.3;
}
.metric-tab.active .metric-value { color: #096dd9; }
.metric-tab .metric-change { font-size: 12px; line-height: 1.2; }
.metric-tab-empty {
    grid-column: 1/-1; text-align: center; padding: 40px 20px;
    color: #999; font-size: 14px;
}

/* ===== 指标汇总区 ===== */
.metrics-section { background: #fff; border-radius: 8px; padding: 20px 24px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.section-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; padding-left: 10px; border-left: 3px solid #1890ff; }
.updatetime-info { font-size: 13px; font-weight: 400; color: #999; margin-left: 16px; }
.updatetime-info b { color: #1890ff; font-weight: 500; }

/* 趋势天数切换按钮 */
.trend-days-btn {
    padding: 2px 10px; margin-left: 4px; font-size: 12px; cursor: pointer;
    border: 1px solid #d9d9d9; background: #fff; color: #666; border-radius: 4px;
    transition: all .2s;
}
.trend-days-btn:hover { border-color: #1890ff; color: #1890ff; }
.trend-days-btn.active { background: #1890ff; border-color: #1890ff; color: #fff; }
.change-up { color: #e74c3c; }
.change-down { color: #52c41a; }
.change-flat { color: #999; }

/* ===== 图表区域 ===== */
.chart-section { background: #fff; border-radius: 8px; padding: 20px 24px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.chart-container { width: 100%; height: 400px; }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 60px 20px; color: #999; font-size: 15px; }

/* ===== 店铺绑定页 ===== */
.shopbind-layout { display: flex; gap: 16px; align-items: stretch; min-height: calc(100vh - 64px - 40px); }
.sb-left {
    width: 260px; flex-shrink: 0; background: #fff; border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06); display: flex; flex-direction: column; overflow: hidden;
}
.sb-header {
    padding: 16px 20px; font-size: 15px; font-weight: 600; border-bottom: 1px solid #f0f0f0;
    background: #fafafa; color: #333;
}
.sb-user-list { flex: 1; overflow-y: auto; max-height: calc(100vh - 64px - 40px - 53px); }
.sb-user-item {
    padding: 14px 20px; cursor: pointer; border-bottom: 1px solid #f5f5f5; transition: all .15s;
}
.sb-user-item:hover { background: #f0f7ff; }
.sb-user-item.active { background: #e6f7ff; border-left: 3px solid #1890ff; padding-left: 17px; }
.sb-user-name { font-size: 14px; color: #333; font-weight: 500; margin-bottom: 4px; }
.sb-user-meta { font-size: 12px; color: #999; }
.sb-user-meta .bc { color: #1890ff; }

.sb-right { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.sb-right-header {
    background: #fff; border-radius: 8px; padding: 14px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.sb-filter { display: flex; gap: 10px; align-items: center; }
.sb-filter select, .sb-search {
    height: 34px; border: 1px solid #ddd; border-radius: 6px; padding: 0 10px; font-size: 13px; background: #fff;
}
.sb-filter select { min-width: 180px; }
.sb-search { min-width: 200px; }
.sb-actions { display: flex; gap: 8px; align-items: center; }
.sb-count { font-size: 13px; color: #666; margin-right: 4px; }
.sb-count b { color: #1890ff; font-size: 15px; }
.sb-btn-link {
    height: 30px; padding: 0 12px; border: 1px solid #d9d9d9; border-radius: 6px;
    background: #fff; color: #595959; font-size: 13px; cursor: pointer; transition: all .15s;
}
.sb-btn-link:hover { border-color: #1890ff; color: #1890ff; }
.sb-btn-save {
    height: 34px; padding: 0 20px; border: none; border-radius: 6px;
    background: #1890ff; color: #fff; font-size: 14px; cursor: pointer; transition: background .15s;
}
.sb-btn-save:hover:not(:disabled) { background: #40a9ff; }
.sb-btn-save:disabled { background: #a0cfff; cursor: not-allowed; }

.sb-tip { background: #fff; border-radius: 8px; padding: 80px 20px; text-align: center; color: #999; font-size: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.sb-shop-list {
    flex: 1; background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px;
    align-content: start; overflow-y: auto; max-height: calc(100vh - 64px - 40px - 70px - 12px);
}
.sb-shop-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border: 1px solid #e8e8e8; border-radius: 6px; cursor: pointer; transition: all .15s;
}
.sb-shop-item:hover { border-color: #1890ff; background: #f0f7ff; }
.sb-shop-item.bound { border-color: #1890ff; background: #e6f7ff; }
.sb-shop-item input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }
.sb-shop-info { flex: 1; min-width: 0; }
.sb-shop-name { font-size: 14px; color: #333; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-shop-zhuti { font-size: 12px; color: #999; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-empty { text-align: center; padding: 40px 20px; color: #999; font-size: 14px; }

/* ===== 运营自助页（无左侧栏，右侧撑满） ===== */
.myshops-layout .sb-right-full {
    flex: 1;  /* 独占整行 */
}

/* ===== 双 Tab 切换条 ===== */
.sb-tabs {
    display: flex; gap: 0; border-bottom: 1px solid #e8e8e8; background: #fafafa;
    border-radius: 8px 8px 0 0;
}
.sb-tab {
    padding: 12px 20px; font-size: 14px; color: #666; cursor: pointer;
    border-bottom: 2px solid transparent; transition: all .15s; user-select: none;
}
.sb-tab:hover { color: #1890ff; }
.sb-tab.active { color: #1890ff; border-bottom-color: #1890ff; background: #fff; font-weight: 600; }
.sb-tab-badge {
    display: inline-block; min-width: 18px; height: 18px; line-height: 18px;
    padding: 0 5px; margin-left: 4px; background: #1890ff; color: #fff;
    border-radius: 9px; font-size: 11px; font-weight: 600;
}

/* Tab 面板 */
.sb-tab-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; }
/* 让右侧容器变成纵向 flex，Tab 面板撑满 */
.sb-right { display: flex; flex-direction: column; }

/* 已绑定的店铺卡片（绑定 Tab 中灰显） */
.sb-shop-item.bound-disabled {
    background: #f5f5f5; border-color: #eee; cursor: not-allowed; opacity: .75;
}
.sb-shop-item.bound-disabled .sb-shop-name { color: #999; }
.sb-shop-item.bound-disabled:hover { border-color: #eee; background: #f5f5f5; }
.sb-shop-item.picked { border-color: #1890ff; background: #e6f7ff; }
.sb-tag-bound {
    flex-shrink: 0; font-size: 11px; color: #1890ff; background: #e6f7ff;
    border: 1px solid #91d5ff; border-radius: 3px; padding: 1px 6px;
}

/* 已绑定列表行 */
.sb-bound-row { cursor: default; }
.sb-bound-row:hover { border-color: #e8e8e8; background: #fff; }
.sb-btn-unbind {
    flex-shrink: 0; padding: 4px 12px; font-size: 13px; cursor: pointer;
    color: #e34d59; background: #fff; border: 1px solid #ffb3b9; border-radius: 4px;
    transition: all .15s;
}
.sb-btn-unbind:hover:not(:disabled) { background: #fff1f0; border-color: #e34d59; }
.sb-btn-unbind:disabled { opacity: .5; cursor: not-allowed; }

/* 已绑行多选框 */
.sb-bound-row .sb-bound-check {
    flex-shrink: 0; display: flex; align-items: center; cursor: pointer;
    padding: 0 4px 0 2px;
}
.sb-bound-row .sb-bound-check input { width: 16px; height: 16px; cursor: pointer; margin: 0; }
.sb-bound-row.is-picked { border-color: #fa8c16; background: #fff7e6; }

/* 批量解绑按钮 */
.sb-btn-unbind-batch {
    padding: 4px 12px; font-size: 13px; cursor: pointer;
    color: #fff; background: #fa8c16; border: 1px solid #fa8c16; border-radius: 4px;
    transition: all .15s;
}
.sb-btn-unbind-batch:hover:not(:disabled) { background: #d46b08; border-color: #d46b08; }
.sb-btn-unbind-batch:disabled { opacity: .5; cursor: not-allowed; background: #ffd591; border-color: #ffd591; }

/* ===== Toast 提示 ===== */
.toast-container {
    position: fixed; top: 20px; right: 20px; z-index: 99999;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none; /* 不遮挡页面操作 */
}
.toast {
    padding: 10px 20px; border-radius: 6px; color: #fff; font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,.15); max-width: 360px; word-break: break-all;
    animation: toastIn .2s ease;
}
.toast-success { background: #52c41a; }
.toast-error { background: #f5222d; }
.toast-info { background: #1890ff; }
.toast.toast-out { animation: toastOut .3s ease forwards; }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    to { opacity: 0; transform: translateX(30px); }
}

/* ===== 店铺商品报表 ===== */
/* 指标开关按钮（显示/隐藏某指标的所有曲线）*/
.metric-toggle-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    padding: 0 0 12px;
}
.metric-toggle {
    height: 30px; padding: 0 16px; border: 2px solid var(--mc, #1890ff);
    border-radius: 15px; background: var(--mc, #1890ff); color: #fff;
    font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s;
    user-select: none; position: relative;
}
.metric-toggle::before {
    content: ''; display: inline-block; width: 10px; height: 10px;
    border-radius: 50%; background: #fff; margin-right: 6px; vertical-align: middle;
}
.metric-toggle:not(.active) {
    background: #fff; color: #999; border-color: #d9d9d9; opacity: .65;
}
.metric-toggle:not(.active)::before { background: #d9d9d9; }
.metric-toggle:hover { opacity: 1; }
.metric-toggle-hint { font-size: 12px; color: #bbb; margin-left: 4px; }

/* 国家多选标签条（用于在售情况汇总区，展示带数据的国家方框）*/
.site-tags-bar {
    display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px;
    padding: 10px 0 14px; border-bottom: 1px dashed #eee; margin-bottom: 14px;
}
.site-tags-label { font-size: 13px; color: #666; font-weight: 500; }
.site-tag-btn {
    height: 28px; padding: 0 12px; border: 1px solid #d9d9d9; border-radius: 4px;
    background: #fff; color: #666; font-size: 12px; cursor: pointer; transition: all .2s;
}
.site-tag-btn:hover { border-color: #1890ff; color: #1890ff; }
.site-tags-sep { width: 1px; height: 20px; background: #e8e8e8; margin: 0 4px; }
#siteTags { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.site-tag {
    width: 148px; padding: 8px 10px 8px 12px; border: 1px solid #d9d9d9; border-radius: 8px;
    background: #fff; color: #333; font-size: 13px; cursor: pointer; transition: all .15s;
    user-select: none; text-align: left; display: inline-block; vertical-align: top;
}
.site-tag:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.site-tag.active { color: #fff; font-weight: 500; }
.site-tag.active .stm i { background: #fff !important; }
.site-tag-name {
    display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px;
    border-bottom: 1px solid rgba(0,0,0,.08); padding-bottom: 4px;
}
.site-tag.active .site-tag-name { border-bottom-color: rgba(255,255,255,.3); }
.site-tag-metrics { display: block; }
.stm {
    display: flex; align-items: center; font-size: 11px; line-height: 1.7; color: #555;
}
.site-tag.active .stm { color: rgba(255,255,255,.92); }
.stm i {
    display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    margin-right: 5px; flex-shrink: 0;
}

/* 视图标签条 */
.sr-tabs {
    display: flex; gap: 4px; padding: 0; margin-bottom: 14px;
    border-bottom: 1px solid #e8e8e8;
}
.sr-tab {
    padding: 9px 18px; cursor: pointer; font-size: 14px; color: #666;
    border-bottom: 2px solid transparent; transition: all .2s; user-select: none;
}
.sr-tab:hover { color: #1890ff; }
.sr-tab.active { color: #1890ff; border-bottom-color: #1890ff; font-weight: 600; }

/* 表格容器：固定高度，上方已有筛选+卡片+曲线，表格独立滚动 */
.sr-table-wrap {
    overflow: auto; max-height: 520px;
    border: 1px solid #f0f0f0; border-radius: 6px;
}
.sr-table {
    border-collapse: separate; border-spacing: 0; width: 100%;
    font-size: 13px; white-space: nowrap;
}
.sr-table th, .sr-table td {
    padding: 8px 12px; text-align: right; border-bottom: 1px solid #f0f0f0;
}
.sr-table th {
    background: #fafafa; font-weight: 600; color: #333; cursor: pointer;
    position: sticky; top: 0; z-index: 3; user-select: none;
    border-bottom: 1px solid #e8e8e8; white-space: nowrap;
}
.sr-table th:hover { background: #e6f7ff; }
/* 排序标记 */
.sr-th.sort-asc::after { content: " ▲"; color: #1890ff; font-size: 10px; }
.sr-th.sort-desc::after { content: " ▼"; color: #1890ff; font-size: 10px; }
/* 冻结前两列：店铺 + 主体 */
.sr-th-sticky1, .sr-td-sticky1 {
    position: sticky; left: 0; z-index: 4; text-align: left;
    min-width: 130px; width: 130px;
}
.sr-th-sticky2, .sr-td-sticky2 {
    position: sticky; left: 130px; z-index: 4; text-align: left;
    min-width: 160px; width: 160px;
}
/* 冻结列背景（thead 用更高 z-index 的底色，td 需要不透明背景遮住滚动内容） */
.sr-th-sticky1, .sr-th-sticky2 { background: #fafafa; }
.sr-td-sticky1, .sr-td-sticky2 { background: #fff; }
.sr-table tbody tr:hover td { background: #f5faff; }
.sr-table tbody tr:hover .sr-td-sticky1,
.sr-table tbody tr:hover .sr-td-sticky2 { background: #e6f7ff; }
/* 汇总行 */
.sr-sum-row td {
    font-weight: 700; background: #fafafa !important; border-top: 2px solid #1890ff;
    color: #1890ff; position: sticky; bottom: 0;
}
.sr-sum-row .sr-td-sticky1, .sr-sum-row .sr-td-sticky2 { background: #fafafa !important; }
/* 异常值红色高亮 */
.cell-warn { color: #f5222d !important; font-weight: 600; }
/* 空数据 */
.empty-row { text-align: center; color: #999; padding: 40px; }

/* ===== 订单违规处罚 ===== */
.wg-table-wrap {
    overflow: auto; max-height: calc(100vh - 260px); border: 1px solid #e8e8e8; border-radius: 6px;
    position: relative;
}
.wg-table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 13px; }
.wg-table thead th {
    background: #f0f5ff; color: #333; font-weight: 600; padding: 10px 12px;
    border-bottom: 2px solid #d6e4ff; position: sticky; top: 0; z-index: 20; text-align: left;
    cursor: pointer; user-select: none;
}
.wg-table thead th:hover { background: #e6efff; }
.wg-table tbody td { padding: 8px 12px; border-bottom: 1px solid #f0f0f0; white-space: nowrap; }
.wg-table tbody tr:hover td { background: #fafcff; }
.wg-table tbody tr:nth-child(even) td { background: #fcfcfe; }
.wg-table tbody tr:nth-child(even):hover td { background: #fafcff; }
/* 冻结列 */
.wg-table .freeze-col {
    position: sticky; z-index: 10; background: #fff !important;
    box-shadow: 2px 0 4px rgba(0,0,0,.04);
}
.wg-table thead th.freeze-col { background: #f0f5ff !important; z-index: 30; }
.wg-table tbody tr:nth-child(even) td.freeze-col { background: #fcfcfe !important; }
.wg-table tbody tr:hover td.freeze-col { background: #fafcff !important; }
.wg-table tfoot .summary-row td {
    font-weight: 700; background: #fafafa !important; border-top: 2px solid #1890ff;
    color: #1890ff; position: sticky; bottom: 0; z-index: 10;
}
/* 详情按钮 */
.wg-detail-btn {
    height: 26px; padding: 0 12px; border: 1px solid #1890ff; border-radius: 4px;
    background: #1890ff; color: #fff; font-size: 12px; cursor: pointer; transition: all .15s;
}
.wg-detail-btn:hover { background: #40a9ff; border-color: #40a9ff; }
.wg-detail-btn:disabled { background: #f5f5f5; color: #bbb; border-color: #e8e8e8; cursor: not-allowed; }
.btn-reset:hover { background: #999 !important; }

/* 左滑详情面板 */
.wg-drawer-mask {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.0); z-index: 1000;
    pointer-events: none; transition: background .3s;
}
.wg-drawer-mask.open { background: rgba(0,0,0,.35); pointer-events: auto; }
.wg-drawer {
    position: fixed; top: 0; right: auto; bottom: 0; left: 0;
    width: 520px; max-width: 90vw; background: #fff;
    box-shadow: 4px 0 24px rgba(0,0,0,.12);
    transform: translateX(-100%); transition: transform .3s ease;
    z-index: 1001; display: flex; flex-direction: column;
}
.wg-drawer.open { transform: translateX(0); }
.wg-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #f0f0f0; background: #fafcff;
    flex-shrink: 0;
}
.wg-drawer-title { font-size: 16px; font-weight: 600; color: #1890ff; }
.wg-drawer-close {
    width: 28px; height: 28px; border: none; background: transparent;
    font-size: 18px; color: #999; cursor: pointer; border-radius: 4px;
}
.wg-drawer-close:hover { background: #f0f0f0; color: #333; }
.wg-drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.wg-info-card {
    background: #fafcff; border: 1px solid #e6f0ff; border-radius: 8px;
    padding: 12px 16px; margin-bottom: 18px;
}
.wg-info-row { display: flex; padding: 5px 0; font-size: 13px; border-bottom: 1px dashed #eee; }
.wg-info-row:last-child { border-bottom: none; }
.wg-info-row span { width: 90px; color: #888; flex-shrink: 0; }
.wg-info-row b { color: #333; font-weight: 500; word-break: break-all; }
.wg-detail-title { font-size: 14px; font-weight: 600; color: #333; margin: 8px 0 10px; }
.wg-detail-empty { color: #bbb; font-size: 13px; padding: 16px; text-align: center; }
.wg-detail-scalar {
    background: #f9f9f9; padding: 10px 12px; border-radius: 4px;
    font-size: 13px; color: #555; word-break: break-all; white-space: pre-wrap;
}
.wg-detail-obj { display: flex; flex-direction: column; gap: 6px; }
.wg-detail-row { display: flex; padding: 6px 8px; background: #fafafa; border-radius: 4px; font-size: 13px; }
.wg-detail-row span { width: 130px; color: #888; flex-shrink: 0; }
.wg-detail-row b { color: #333; font-weight: 500; word-break: break-all; flex: 1; }
.wg-detail-nested { flex-direction: column; }
.wg-detail-sub { margin-top: 6px; padding-left: 12px; border-left: 2px solid #e6f0ff; width: 100%; }
.wg-detail-list { display: flex; flex-direction: column; gap: 12px; }
.wg-detail-item {
    background: #f0f5ff; border-radius: 6px; padding: 10px 12px;
}
.wg-detail-item-title { font-size: 13px; font-weight: 600; color: #1890ff; margin-bottom: 8px; }
.wg-detail-item .wg-detail-row { background: #fff; }

/* ===== 店铺售后 ===== */
/* 视图Tab */
.sh-view-tabs {
    display: flex; gap: 0; border-bottom: 2px solid #f0f0f0; margin-bottom: 12px;
}
.sh-view-tab {
    padding: 8px 20px; cursor: pointer; font-size: 14px; color: #666;
    border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s;
    user-select: none;
}
.sh-view-tab:hover { color: #1890ff; }
.sh-view-tab.active {
    color: #1890ff; font-weight: 600; border-bottom-color: #1890ff;
}
/* 表格容器（复用 wg-table-wrap 的 sticky 结构）*/
.sh-table-wrap {
    overflow: auto; max-height: calc(100vh - 260px); border: 1px solid #e8e8e8; border-radius: 6px;
    position: relative;
}
.sh-table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 13px; }
.sh-table thead th {
    background: #f0f5ff; color: #333; font-weight: 600; padding: 10px 12px;
    border-bottom: 2px solid #d6e4ff; position: sticky; top: 0; z-index: 20; text-align: left;
    cursor: pointer; user-select: none; white-space: nowrap;
}
.sh-table thead th:hover { background: #e6efff; }
.sh-table tbody td { padding: 8px 12px; border-bottom: 1px solid #f0f0f0; }
.sh-table tbody tr:hover td { background: #fafcff; }
.sh-table tbody tr:nth-child(even) td { background: #fcfcfe; }
.sh-table tbody tr:nth-child(even):hover td { background: #fafcff; }
/* 冻结列 */
.sh-table .freeze-col {
    position: sticky; z-index: 10; background: #fff !important;
    box-shadow: 2px 0 4px rgba(0,0,0,.04);
}
.sh-table thead th.freeze-col { background: #f0f5ff !important; z-index: 30; }
.sh-table tbody tr:nth-child(even) td.freeze-col { background: #fcfcfe !important; }
.sh-table tbody tr:hover td.freeze-col { background: #fafcff !important; }
.sh-table tfoot .summary-row td {
    font-weight: 700; background: #fafafa !important; border-top: 2px solid #1890ff;
    color: #1890ff; position: sticky; bottom: 0; z-index: 10;
}
/* 商品缩略图 */
.sh-thumb-cell { padding: 4px !important; text-align: center; }
.sh-thumb {
    width: 44px; height: 44px; object-fit: cover; border-radius: 4px;
    border: 1px solid #eee; transition: transform .15s;
}
.sh-thumb:hover { transform: scale(1.5); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
/* 退款状态彩色标签 */
.sh-status { display: inline-block; }
/* 长文本截断 */
.sh-clip-cell { max-width: 280px; }
.sh-clip {
    display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; vertical-align: middle;
}
.sh-clip-cell:hover .sh-clip { white-space: normal; word-break: break-all; }
/* 详情面板里的商品大图 */
.sh-detail-img {
    text-align: center; margin-bottom: 16px; padding: 8px;
    background: #fafcff; border-radius: 6px; border: 1px solid #e6f0ff;
}
.sh-detail-img img {
    max-width: 100%; max-height: 200px; object-fit: contain; border-radius: 4px;
}
/* 分页器 */
.sh-pager {
    display: flex; align-items: center; gap: 6px; padding: 12px 4px; flex-wrap: wrap;
    font-size: 13px; color: #666;
}
.sh-pager .pg-info { color: #888; margin: 0 8px; }
.sh-pager .pg-btn {
    min-width: 32px; height: 30px; padding: 0 10px; border: 1px solid #d9d9d9;
    border-radius: 4px; background: #fff; color: #333; cursor: pointer; font-size: 13px;
    transition: all .15s;
}
.sh-pager .pg-btn:hover:not(:disabled) { border-color: #1890ff; color: #1890ff; }
.sh-pager .pg-btn:disabled { color: #ccc; cursor: not-allowed; background: #f9f9f9; }
.sh-pager .pg-btn.active { background: #1890ff; color: #fff; border-color: #1890ff; }

/* 列配置按钮 */
.sh-col-config-btn {
    margin-left: auto; padding: 4px 12px; border: 1px solid #d9d9d9; border-radius: 4px;
    background: #fafafa; color: #666; font-size: 12px; cursor: pointer; user-select: none;
    transition: all .15s;
}
.sh-col-config-btn:hover { border-color: #1890ff; color: #1890ff; background: #e6f7ff; }
/* 列配置右滑抽屉 */
.wg-col-drawer {
    left: auto; right: 0; transform: translateX(100%);
    transition: transform .3s ease;
}
.wg-col-drawer.open { transform: translateX(0); }
.col-list { display: flex; flex-direction: column; gap: 2px; }
.col-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px;
    border-radius: 4px; cursor: pointer; font-size: 13px; transition: background .12s;
}
.col-item:hover { background: #f5f5f5; }
.col-item input[type=checkbox] { cursor: pointer; width: 15px; height: 15px; }

/* 附件按钮（操作列） */
.sh-action-cell { white-space: nowrap; }
.sh-attach-btn {
    background: #fff7e6 !important; color: #fa8c16 !important; border-color: #ffd591 !important;
    margin-right: 4px; padding: 2px 6px !important; font-size: 12px !important;
}
.sh-attach-btn:hover { background: #ffe7ba !important; border-color: #ffc53d !important; }
/* 详情面板：买家附件缩略图网格 */
.sh-attach-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px; padding: 0 0 12px;
}
.sh-attach-thumb {
    width: 100%; height: 100px; object-fit: cover; border-radius: 6px; cursor: pointer;
    border: 1px solid #eee; transition: transform .15s, box-shadow .15s;
}
.sh-attach-thumb:hover { transform: scale(1.03); box-shadow: 0 2px 8px rgba(0,0,0,.15); }

/* 图片预览模态层 */
.iv-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.92);
    z-index: 2000; align-items: center; justify-content: center;
}
.iv-overlay.open { display: flex; }
.iv-img {
    max-width: 90vw; max-height: 85vh; object-fit: contain;
    border-radius: 4px; box-shadow: 0 4px 30px rgba(0,0,0,.5);
}
.iv-close-btn {
    position: absolute; top: 16px; right: 24px; width: 40px; height: 40px;
    border-radius: 50%; border: none; background: rgba(255,255,255,.15);
    color: #fff; font-size: 20px; cursor: pointer; transition: background .15s;
}
.iv-close-btn:hover { background: rgba(255,255,255,.3); }
.iv-counter {
    position: absolute; top: 24px; left: 50%; transform: translateX(-50%);
    color: #fff; font-size: 15px; background: rgba(0,0,0,.4); padding: 4px 14px; border-radius: 14px;
}
.iv-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 48px; height: 64px; border: none; border-radius: 6px;
    background: rgba(255,255,255,.12); color: #fff; font-size: 36px; line-height: 60px;
    cursor: pointer; transition: background .15s;
}
.iv-nav:hover { background: rgba(255,255,255,.25); }
.iv-prev { left: 24px; }
.iv-next { right: 24px; }
