/**
 * 任务发布中心样式 - 参考单品直降风格
 * + 高度适配：任务列表卡片无论是否有数据，均撑满当前视口剩余高度
 * + 固定分辨率：3840×2160
 */

/* =========================================================
   1. 全屏高度：整页撑满视口 (100vh)，无多余滚动
   ========================================================= */
html, body {
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body > div.d-flex {
    height: 100vh;
    min-height: 100vh;
}

/* 主页面 SPA 子模块（任务发布中心 / 上传配置）激活后：作为 flex 列容器，填充主内容剩余高度 */
.module-content.sub-module-content[style*="display: flex"],
.module-content.sub-module-content[style*="display: block"],
.module-content.sub-module-content:not([style*="display: none"]) {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
}

.main-content-fullheight {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

.page-fullheight-inner {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.page-header-row {
    flex: 0 0 auto;
    margin-bottom: 1rem;
}

/* 合并卡片后，不再需要 page-header-row；这里兜底保留但不产生大间距 */
.page-header-row:empty,
.page-body-row > .page-body-col > :not(:last-child) {
    margin-bottom: 0.75rem;
}

.page-body-row {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.page-body-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* =========================================================
   2. 筛选卡片 & 任务列表卡片：列表卡填充剩余高度
   ========================================================= */
.filter-card {
    flex: 0 0 auto;
    margin-bottom: 1rem;
}

.list-card {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.list-card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 1rem;
}

/* =========================================================
   3. 表格可滚动区：原生表格语义
      - wrapper 占满查询栏下方剩余视口高度（flex:1 + min-height:0）
      - list-table height:100% 强制填满 wrapper → thead + tbody 共享列宽
      - thead sticky 吸顶，tbody display table-row-group 不改动
      - 空状态只有 1 行：tr.empty-row:only-child height=100%，td colspan 跨列正确
   ========================================================= */
.list-table-wrapper {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
}

.list-table {
    width: 100%;
    margin-bottom: 0 !important;
    table-layout: auto;
    border-collapse: collapse;
    border-spacing: 0;
}

/* 复选框列（第一列）：仅放全选/单选框，居中对齐，宽度最小化 */
.list-table th:first-child,
.list-table td:first-child {
    text-align: center;
    vertical-align: middle;
    padding-left: 0 !important;
    padding-right: 0 !important;
    min-width: 48px;
    max-width: 48px;
    width: 48px;
}

/* 操作列：按钮紧凑换行，固定列宽不被撑超 */
.list-table th:last-child,
.list-table td:last-child {
    min-width: 140px;
    max-width: 160px;
}

.list-table .pt-action-btn {
    font-size: 0.8125rem;
    padding: 4px 8px;
    white-space: nowrap;
}

.list-table th,
.list-table td {
    min-width: 60px;
}

#tdDetailTable {
    table-layout: fixed;
}

#tdDetailTable th:first-child {
    width: 6%;
    min-width: 60px;
}

#tdDetailTable th:nth-child(2) {
    width: 45%;
    min-width: 300px;
}

#tdDetailTable th:nth-child(3) {
    width: 15%;
    min-width: 120px;
}

#tdDetailTable th:nth-child(4) {
    width: 8%;
    min-width: 80px;
}

#tdDetailTable th:nth-child(5) {
    width: 8%;
    min-width: 80px;
}

#tdDetailTable th:nth-child(6) {
    width: 18%;
    min-width: 150px;
}

#taskMainTable {
    table-layout: fixed;
}

#taskMainTable tbody tr td:nth-child(2) {
    font-weight: 500;
    color: #333;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-table-thead {
    position: sticky;
    top: 0;
    z-index: 5;
    background-color: #fafafa;
    box-shadow: inset 0 -2px 0 #e9ecef;
}

/* tbody 必须保持原生 table-row-group（display 属性绝对不能改！
   改了之后 thead 和 tbody 列宽脱钩，tbody 内 td 的 colspan 将失效，空状态挤在第一列）*/
.list-table tbody {
    display: table-row-group;
    height: 100%;
}

/* 只有唯一一行 empty-row 时，高度占满整个 tbody */
.list-table tbody tr.empty-row:only-child {
    height: 100%;
}

.list-table tbody tr.empty-row td {
    height: 100%;
    min-height: 300px;            /* 旧浏览器兜底 */
    padding: 0 !important;
    vertical-align: middle;
    text-align: center;
    color: #999;
    background: #fff;
}

/* 加载状态：与单品直降 flash-sale-loading 同款 */
.flash-sale-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}
.flash-sale-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    color: #667eea;
}
.flash-sale-loading-text {
    margin-top: 16px;
    color: #666;
}

/* 空状态：与单品直降 flash-sale-empty 完全一致 */
.flash-sale-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}
.flash-sale-empty i {
    font-size: 4rem;
    color: #d9d9d9;
}
.flash-sale-empty-text {
    margin-top: 16px;
    color: #666;
}

/* =========================================================
   4. 分页区：固定在列表卡底部，不随表格滚动
   ========================================================= */
.list-card-footer {
    flex: 0 0 auto;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

/* =========================================================
   5. 查询表单（单品直降同款）
   ========================================================= */
#filterForm .form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.4rem;
}

#filterForm .form-select {
    border-radius: 6px;
    border-color: #d9d9d9;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#filterForm .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* =========================================================
   6. 状态徽章（单品直降 flash-sale-status 同款胶囊）
   ========================================================= */
.badge {
    font-weight: 500 !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
}

/* =========================================================
   7. 任务名称（单品直降活动名同款：截断 + 加粗）
   ========================================================= */
.list-table tbody tr td:nth-child(2) {
    font-weight: 500;
    color: #333;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   8. 进度条
   ========================================================= */
.progress {
    border-radius: 4px;
    background-color: #f0f0f0;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.progress-bar {
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.pt-progress-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pt-progress-track {
    display: flex;
    height: 22px;
    background-color: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.pt-progress-track.pt-progress-running {
    box-shadow: 0 0 0 1px rgba(22, 119, 255, 0.2);
}

.pt-progress-fail {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f53f3f;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    min-width: 0;
    transition: width 0.4s ease;
}

.pt-progress-success {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #00b42a;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    min-width: 0;
    transition: width 0.4s ease;
}

.pt-progress-pending {
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(
        45deg,
        #e8e8e8,
        #e8e8e8 6px,
        #d8d8d8 6px,
        #d8d8d8 12px
    );
    min-width: 0;
    transition: width 0.4s ease;
}

.pt-progress-text {
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 12px;
    align-items: center;
}

.pt-progress-text-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.pt-progress-text-item.success .label {
    color: #00b42a;
    font-weight: 500;
}

.pt-progress-text-item.success .value {
    color: #00b42a;
    font-weight: 600;
    font-size: 13px;
}

.pt-progress-text-item.fail .label {
    color: #f53f3f;
    font-weight: 500;
}

.pt-progress-text-item.fail .value {
    color: #f53f3f;
    font-weight: 600;
    font-size: 13px;
}

.pt-progress-text-item.total .label {
    color: #888;
    font-weight: 500;
}

.pt-progress-text-item.total .value {
    color: #333;
    font-weight: 600;
    font-size: 13px;
}

.pt-progress-text-item.pct {
    margin-left: auto;
    background: #f0f0f0;
    color: #333;
    font-weight: 600;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    min-width: 38px;
    text-align: center;
}

/* =========================================================
   9. 表格字体 & 行 hover（单品直降同款）
   ========================================================= */
.list-table th {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    color: #333;
    border-bottom: 2px solid #e9ecef;
}

.list-table td {
    font-size: 0.9rem;
    vertical-align: middle;
    color: #333;
}

.table-light {
    --bs-table-bg: #fafafa !important;
}

.list-table tbody tr:hover {
    background-color: #fafafa;
}

/* =========================================================
   统计卡片样式
   ========================================================= */
.pt-stat-card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    overflow: hidden;
}

.pt-stat-card::before {
    content: '';
    display: block;
    height: 4px;
    width: 100%;
}

.pt-stat-card.total::before {
    background: linear-gradient(90deg, #409eff, #667eea);
}

.pt-stat-card.success::before {
    background: linear-gradient(90deg, #67c23a, #85ce61);
}

.pt-stat-card.fail::before {
    background: linear-gradient(90deg, #f56c6c, #f87171);
}

.pt-stat-card.retry::before {
    background: linear-gradient(90deg, #e6a23c, #f59e0b);
}

.pt-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.pt-stat-card .card-body {
    padding: 24px;
}

.pt-stat-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.pt-stat-value {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
}

.pt-stat-value.total {
    color: #409eff;
}

.pt-stat-value.success {
    color: #67c23a;
}

.pt-stat-value.fail {
    color: #f56c6c;
}

.pt-stat-value.retry {
    color: #e6a23c;
}

/* =========================================================
   商品信息栏样式
   ========================================================= */
.pt-product-info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.pt-product-img {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.pt-product-img-inner {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pt-product-img-inner:hover {
    transform: scale(1.05);
}

.pt-product-img-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: #f1f5f9;
    color: #94a3b8;
}

.pt-product-img-placeholder i {
    font-size: 24px;
}

.pt-product-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.pt-product-title {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    line-height: 1.4;
}

.pt-product-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
}

.pt-product-price {
    color: #dc2626;
    font-weight: 600;
}

.pt-product-brand {
    color: #666;
    background-color: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* =========================================================
   10. 分页（单品直降同款）
   ========================================================= */
.page-size-select {
    width: auto;
    min-width: 80px;
}

/* 操作按钮组 */
.btn-group-sm > .btn,
.btn-group-sm.btn-group {
    border-radius: 4px;
}

/* =========================================================
   11. Header 区域样式
   ========================================================= */
.pt-header-card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.pt-header-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a2e;
}

/* =========================================================
   12. 状态标签样式（Worker 在线、执行中任务）
   ========================================================= */
.pt-status-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.pt-status-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pt-tag-success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.pt-tag-info {
    background-color: #e1f5fe;
    color: #01579b;
}

/* =========================================================
   13. 按钮样式优化
   ========================================================= */
.pt-btn-primary {
    border-radius: 8px;
    padding: 8px 18px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    background: linear-gradient(135deg, #409eff 0%, #667eea 100%);
}

.pt-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.pt-btn-secondary {
    border-radius: 8px;
    padding: 8px 18px;
    font-weight: 500;
    transition: all 0.2s;
}

.pt-btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* =========================================================
   14. 筛选器布局优化
   ========================================================= */
.pt-filter-item {
    display: flex;
    flex-direction: column;
    min-width: 160px;
}

.pt-filter-label {
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
    font-size: 13px;
}

.pt-filter-select {
    height: 38px;
    border-radius: 6px;
    border-color: #d9d9d9;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-size: 14px;
}

.pt-filter-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* =========================================================
   15. 操作列按钮样式
   ========================================================= */
.pt-action-btn {
    height: 32px;
    min-width: 60px;
    padding: 0 10px;
    border-radius: 6px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
}

.pt-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.pt-action-pause {
    background-color: #fff3e0;
    color: #f57c00;
}

.pt-action-pause:hover {
    background-color: #ffe0b2;
}

.pt-action-retry {
    background-color: #e3f2fd;
    color: #1976d2;
}

.pt-action-retry:hover {
    background-color: #bbdefb;
}

.pt-action-view {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.pt-action-view:hover {
    background-color: #e1bee7;
}

.pt-action-edit {
    background-color: #e8f5e9;
    color: #388e3c;
}

.pt-action-edit:hover {
    background-color: #c8e6c9;
}

.pt-action-delete {
    background-color: #fff1f0;
    color: #f53f3f;
}

.pt-action-delete:hover {
    background-color: #ffccc7;
}

/* =========================================================
   16. 任务详情弹窗样式
   ========================================================= */
.pt-detail-label {
    font-weight: 500;
    color: #555;
    margin-bottom: 4px;
    font-size: 13px;
}

.pt-detail-input {
    border-radius: 6px;
    font-size: 14px;
    background-color: #fafafa;
    border-color: #e8e8e8;
}

.pt-detail-status {
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.pt-fail-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    padding: 12px;
    background-color: #fafafa;
}

.pt-fail-item {
    padding: 10px;
    background-color: #fff;
    border-radius: 4px;
    margin-bottom: 8px;
    border-left: 3px solid #f44336;
}

.pt-fail-item:last-child {
    margin-bottom: 0;
}

.pt-fail-item .retry-count {
    font-size: 12px;
    color: #f57c00;
    margin-right: 10px;
}

.pt-fail-item .error-msg {
    font-size: 13px;
    color: #333;
    word-break: break-all;
}

/* =========================================================
   17. 任务名称可点击样式
   ========================================================= */
.pt-task-name-link {
    color: #409eff;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s;
}

.pt-task-name-link:hover {
    color: #667eea;
    text-decoration: underline;
}

/* =========================================================
   18. 新建任务弹窗样式
   ========================================================= */
.pt-modal-large {
    backdrop-filter: blur(8px);
}

.pt-modal-large .modal-backdrop {
    opacity: 0.6 !important;
}

.pt-modal-dialog-xl {
    max-width: 100vw !important;
    width: 100vw !important;
    max-height: 100vh !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pt-modal-large .modal-dialog {
    display: flex;
    flex-direction: column;
}

.pt-modal-large .modal-content {
    border-radius: 0;
    box-shadow: none;
    border: none;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: ptModalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ptModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes ptModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.pt-modal-large .modal-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    border-radius: 0;
    padding: 20px 24px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.pt-modal-large .modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.pt-modal-large .modal-header .modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    position: relative;
    z-index: 1;
}

.pt-modal-large .modal-header .btn-close {
    color: rgba(255, 255, 255, 0.8);
    opacity: 1;
    position: relative;
    z-index: 1;
    transition: all 0.2s;
}

.pt-modal-large .modal-header .btn-close:hover {
    color: #fff;
    opacity: 1;
    transform: rotate(90deg);
}

.pt-modal-body-scroll {
    padding: 24px;
    background: #fff;
    flex-grow: 1;
    overflow-y: auto;
}

.pt-modal-body-scroll::-webkit-scrollbar {
    width: 6px;
}

.pt-modal-body-scroll::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.pt-modal-body-scroll::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.pt-modal-body-scroll::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

#createTaskModal .modal-body .form-label {
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
    font-size: 13px;
}

#createTaskModal .modal-body .form-control,
#createTaskModal .modal-body .form-select {
    border-radius: 8px;
    font-size: 14px;
    background-color: #fafafa;
    border-color: #e8e8e8;
    padding: 10px 12px;
    transition: all 0.2s;
}

#createTaskModal .modal-body .form-control:focus,
#createTaskModal .modal-body .form-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background-color: #fff;
}

#createTaskModal .modal-body .form-control:hover,
#createTaskModal .modal-body .form-select:hover {
    border-color: #d1d5db;
}

#createTaskModal .modal-body .form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#createTaskModal .modal-body .form-check-label {
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

#createTaskModal .modal-body .form-switch .form-check-input {
    width: 40px;
    height: 20px;
    background-color: #e5e7eb;
    border-color: #e5e7eb;
}

#createTaskModal .modal-body .form-switch .form-check-input:checked {
    background-color: #6366f1;
    border-color: #6366f1;
}

#createTaskModal .modal-body .form-switch .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

#createTaskModal .modal-footer {
    padding: 16px 24px;
    background: #f9fafb;
    border-radius: 0;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

#createTaskModal .modal-footer .btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

#createTaskModal .modal-footer .btn-outline-secondary {
    background: #fff;
    border-color: #e5e7eb;
    color: #6b7280;
}

#createTaskModal .modal-footer .btn-outline-secondary:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
}

#createTaskModal .modal-footer .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

#createTaskModal .modal-footer .btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
}

#createTaskModal .modal-footer .btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

#createTaskModal .progress {
    height: 8px;
    border-radius: 4px;
    background: #f1f5f9;
}

#createTaskModal .progress .progress-bar {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* =========================================================
   19. 裂变商品数据表格样式
   ========================================================= */
.pt-data-table-container {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    background: #ffffff;
}

.pt-data-table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.pt-data-table {
    width: 100%;
    min-width: 1000px;
    border-collapse: collapse;
    font-size: 13px;
}

.pt-data-table thead tr {
    background-color: #f7f8fa;
}

.pt-data-table thead th {
    font-weight: 500;
    color: #222222;
    padding: 12px 16px;
    text-align: center;
    white-space: nowrap;
    position: relative;
    border-bottom: 2px solid #e8e8e8;
}

.pt-data-table thead th.pt-data-col-fixed {
    position: sticky;
    left: 0;
    z-index: 10;
    text-align: left;
    background-color: #f7f8fa;
    border-right: 1px solid #e8e8e8;
}

.pt-data-table thead th.pt-data-col-sortable {
    cursor: pointer;
    user-select: none;
}

.pt-data-table thead th.pt-data-col-sortable:hover {
    background-color: #f0f1f2;
}

.pt-data-table thead th.pt-data-col-sorted {
    background-color: #f0f5ff;
}

.pt-data-table thead th.pt-data-col-sorted i {
    color: #1677ff;
}

.pt-data-table thead th i {
    margin-left: 4px;
    font-size: 12px;
    color: #86909c;
    vertical-align: middle;
}

.pt-data-table tbody tr {
    transition: background-color 0.15s ease;
}

.pt-data-table tbody tr:hover {
    background-color: #f7f8fa;
}

.pt-data-table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f1f2;
}

.pt-data-table tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 5;
    background-color: #ffffff;
    border-right: 1px solid #e8e8e8;
}

.pt-data-table tbody tr:hover td:first-child {
    background-color: #f7f8fa;
}

.pt-data-table tbody td:not(:first-child) {
    text-align: center;
}

.pt-data-col-fixed {
    min-width: 140px;
    max-width: 200px;
    white-space: nowrap;
}

.pt-product-info-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pt-product-thumb {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #f5f5f5;
}

.pt-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pt-product-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #94a3b8;
    font-size: 20px;
}

.pt-product-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.pt-product-detail-title {
    font-size: 13px;
    color: #1f2329;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pt-product-detail-id {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #86909c;
}

.pt-product-detail-id span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pt-product-detail-id .pt-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    margin-left: 4px;
    opacity: 0.6;
}

.pt-product-detail-id .pt-copy-btn:hover {
    background: #1677ff;
    opacity: 1;
}

.pt-product-detail-id .pt-copy-btn:hover i {
    color: #fff;
}

.pt-product-detail-id .pt-copy-btn i {
    font-size: 10px;
    color: #86909c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pt-product-detail-tag {
    display: inline-flex;
    padding: 2px 8px;
    background-color: #e6f4ff;
    color: #1677ff;
    font-size: 11px;
    border-radius: 10px;
    font-weight: 500;
    align-self: flex-start;
    white-space: nowrap;
}

.pt-data-value-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.pt-data-value-main {
    font-size: 14px;
    font-weight: 600;
    color: #111111;
}

.pt-data-value-change {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.pt-data-value-change.up {
    color: #f53f3f;
}

.pt-data-value-change.down {
    color: #00b42a;
}

.pt-data-value-change.flat {
    color: #86909c;
}

.pt-fission-pagination {
    margin-top: 12px;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
}

.pt-fission-pagination .pagination {
    margin-bottom: 8px;
}

.pt-pagination-info {
    text-align: center;
    font-size: 12px;
    color: #86909c;
}

.pt-fission-page-btn {
    cursor: pointer;
}

.pt-fission-page-btn:hover:not(.disabled) {
    background-color: #e9ecef;
}

.pt-data-value-change i {
    font-size: 10px;
}

.pt-data-table-scroll::-webkit-scrollbar {
    height: 6px;
}

.pt-data-table-scroll::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.pt-data-table-scroll::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.pt-data-table-scroll::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* =========================================================
   翻新模式 UI 样式（商品信息卡片 + SKU 列表）
   ========================================================= */

/* 翻新根容器：页面边距与背景分层 */
#renovationBlock {
    padding: 4px 0;
}

/* 外层表单容器：左右两栏 Flex 布局 */
.pt-reno-form-container {
    --color-decor: #5843d9;
    --color-page-bg: #F5F7FA;
    --color-card-bg: #FFFFFF;
    --color-title: #1D2129;
    --color-text: #333333;
    --color-text-aux: #6E7681;
    --color-price: #F53F3F;
    --radius: 8px;
    --gap-block: 24px;
    --gap-inner: 16px;
    --card-padding: 20px;

    display: flex;
    gap: var(--gap-block);
    align-items: flex-start;
    padding: var(--card-padding);
    background: var(--color-page-bg);
    border-radius: var(--radius);
    margin-top: 8px;
}

/* 左栏：固定宽度 380px，不再自适应拉伸 */
.pt-reno-left-col {
    flex: 0 0 380px;
    width: 380px;
    max-width: 380px;
}

/* 右栏：flex:1 + min-width:0，解决 flex 子元素溢出 BUG */
.pt-reno-right-col {
    flex: 1 1 0;
    min-width: 0;
}

/* 视口宽度不足 1200px 时切换为上下垂直流式布局 */
@media (max-width: 1199.98px) {
    .pt-reno-form-container {
        flex-direction: column;
        gap: var(--gap-inner);
    }
    .pt-reno-left-col {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
    }
}

/* 卡片容器：白色圆角，轻微阴影，固定内边距 */
.pt-reno-card-wrap {
    background: var(--color-card-bg);
    border-radius: var(--radius);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: var(--card-padding);
    box-sizing: border-box;
}

/* 区块标题：紫色左侧竖线装饰 */
.pt-reno-section-title {
    position: relative;
    padding-left: 10px;
    margin-bottom: var(--gap-inner);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-title);
    line-height: 1.2;
}

.pt-reno-section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 3px;
    border-radius: 2px;
    background: var(--color-decor);
}

.pt-reno-empty {
    text-align: center;
    color: var(--color-text-aux);
    padding: 32px 0;
    font-size: 13px;
}

/* 商品信息列表：垂直排列，独立纵向滚动，高度与右栏 SKU 列表一致 */
.pt-reno-product-list {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scroll-behavior: smooth;
}

.pt-reno-product-list::-webkit-scrollbar {
    width: 6px;
}

.pt-reno-product-list::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.pt-reno-product-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.pt-reno-product-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* 单个商品卡片：垂直堆叠，可点击切换 */
.pt-reno-product-card-item {
    width: 100%;
    margin-bottom: 8px;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e5e6eb;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.pt-reno-product-card-item:last-child {
    margin-bottom: 0;
}

.pt-reno-product-card-item:hover {
    border-color: var(--color-decor);
    background: #faf8ff;
}

.pt-reno-product-card-item.active {
    border-color: var(--color-decor);
    background: #f5f0ff;
    box-shadow: 0 0 0 2px rgba(88, 67, 217, 0.15);
}

/* 卡片内部：左图 + 右文 */
.pt-reno-product-card-item .pt-reno-product-inner {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.pt-reno-product-thumb {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #f5f5f5;
    border: 1px solid #eee;
    box-sizing: border-box;
}

.pt-reno-product-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pt-reno-product-info {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pt-reno-product-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-title);
    line-height: 1.4;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pt-reno-product-id {
    font-size: 11px;
    color: var(--color-text-aux);
    word-break: break-all;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* SKU 列表顶部操作栏：全选 + 数量统计 */
.pt-reno-sku-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0 12px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 8px;
}

.pt-reno-sku-toolbar .form-check-label {
    font-size: 13px;
    color: var(--color-text);
}

.pt-reno-sku-stat {
    font-size: 12px;
    color: var(--color-text-aux);
}

/* SKU 表格容器：独立纵向滚动，表头固定悬浮 */
.pt-reno-sku-table-wrap {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
}

.pt-reno-sku-table-wrap::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.pt-reno-sku-table-wrap::-webkit-scrollbar-track {
    background: #fafafa;
}

.pt-reno-sku-table-wrap::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.pt-reno-sku-table-wrap::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* 表格：强制布局 table-layout:fixed，固定列宽 */
.pt-reno-sku-table {
    width: 100%;
    table-layout: fixed;
    font-size: 12px;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

/* 表头美化：去除 Bootstrap table-light 默认样式 */
.pt-reno-sku-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fafbfc;
    color: var(--color-title);
    font-weight: 600;
    font-size: 12px;
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #e5e6eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pt-reno-sku-table thead th:first-child {
    text-align: center;
}

.pt-reno-sku-table tbody td {
    padding: 8px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
    color: var(--color-text);
    line-height: 1.4;
}

.pt-reno-sku-table tbody tr:last-child td {
    border-bottom: none;
}

.pt-reno-sku-table tbody tr:hover {
    background-color: #f7f8fa;
}

/* 单元格文本截断：超长单行省略 */
.pt-reno-cell-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 复选框列居中 */
.pt-reno-sku-table .pt-reno-col-check {
    text-align: center;
}

.pt-reno-sku-table .pt-reno-col-num {
    text-align: center;
    color: var(--color-text-aux);
}

/* SKU 图片缩略图：固定尺寸 */
.pt-reno-sku-thumb {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f5f5f5;
    border: 1px solid #eee;
    box-sizing: border-box;
    display: inline-block;
}

.pt-reno-sku-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pt-reno-sku-price {
    color: var(--color-price);
    font-weight: 600;
    white-space: nowrap;
}

.pt-reno-sku-name {
    color: var(--color-text);
}

.pt-reno-sku-id {
    color: var(--color-text-aux);
    font-size: 11px;
}

.pt-reno-col-stock {
    text-align: center;
    color: var(--color-text-aux);
}

.pt-reno-col-price {
    text-align: right;
}
