/* ============================================================
 * 排版整改 切片 I5 —— 任务队列页样式
 * 颜色全部复用既有 hex / v10 变量（浅蓝白体系），零深色引入
 * 统计卡 / 筛选栏 / 已选胶囊 / 任务卡片 / 进度条 / 批量浮动栏 / 详情抽屉 / 高危弹窗 / 空态
 * ============================================================ */

.i5-wrap { padding-bottom: 120px; }

/* ---------- 顶部统计卡 ---------- */
.i5-stats {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px;
}
.i5-stat {
  background: #fff; border: 1px solid rgba(22, 11, 255, .18); border-radius: 12px;
  padding: 14px 16px; box-shadow: 0 4px 16px rgba(29, 33, 41, .07);
  display: flex; flex-direction: column; gap: 4px;
}
.i5-stat b { font-size: 24px; font-weight: 700; color: #303133; line-height: 1; }
.i5-stat span { font-size: 13px; color: #606266; }
.i5-stat.i5-s-queued b { color: #1d2129; }
.i5-stat.i5-s-running b { color: #38BDF8; }
.i5-stat.i5-s-done b { color: #2F8A5B; }
.i5-stat.i5-s-fail b { color: #f53f3f; }
.i5-stat.i5-s-cancel b { color: #8A97A6; }
@media (max-width: 900px) { .i5-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .i5-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 工具行 ---------- */
.i5-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px;
}
.i5-toolbar .v10-inp { width: auto; }
.i5-search { flex: 1 1 220px; min-width: 180px; }
.i5-w120 { width: 120px !important; }
.i5-w130 { width: 136px !important; }
.i5-w140 { width: 150px !important; }
.i5-w150 { width: 160px !important; }
.i5-spacer { flex: 1 1 auto; }

/* ---------- 已选条件胶囊 ---------- */
.i5-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; min-height: 4px; }
.i5-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #e6f4ff; color: #1d2129; border: 1px solid rgba(22, 11, 255, .3);
  border-radius: 999px; padding: 4px 10px; font-size: 13px;
}
.i5-chip-x {
  border: 0; background: rgba(62, 109, 166, .15); color: #1d2129;
  width: 16px; height: 16px; border-radius: 999px; cursor: pointer;
  font-size: 12px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.i5-chip-x:hover { background: rgba(62, 109, 166, .3); }
.i5-chip-clear { background: #ffece8; color: #f53f3f; border-color: rgba(194, 80, 80, .3); cursor: pointer; }
.i5-chip-clear:hover { background: #fbdcdc; }

/* ---------- 任务卡片列表 ---------- */
.i5-list { display: flex; flex-direction: column; gap: 12px; }
.i5-card {
  background: #fff; border: 1px solid rgba(22, 11, 255, .18); border-radius: 12px;
  padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start;
  box-shadow: 0 4px 16px rgba(29, 33, 41, .06); cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.i5-card:hover { border-color: rgba(22, 11, 255, .45); box-shadow: 0 8px 24px rgba(29, 33, 41, .12); }
.i5-card.i5-card-on { border-color: #38BDF8; box-shadow: 0 0 0 2px rgba(22, 11, 255, .25); }
.i5-cb { margin-top: 6px; flex: none; cursor: pointer; }
.i5-sel { width: 16px; height: 16px; accent-color: #38BDF8; cursor: pointer; }

/* 缩略预览占位（纯 CSS） */
.i5-thumb {
  flex: none; width: 96px; height: 60px; border-radius: 12px;
  background: #e6f4ff; display: flex; align-items: center; justify-content: center;
  color: #909399; font-size: 20px;
}
.i5-thumb-ok {
  background: linear-gradient(135deg, #38BDF8, #38BDF8); color: #fff; position: relative;
}
.i5-thumb-play { font-size: 16px; opacity: .9; }
.i5-thumb-tag { position: absolute; bottom: 3px; right: 5px; font-size: 12px; background: rgba(255,255,255,.85); color: #1d2129; border-radius: 4px; padding: 1px 4px; }

.i5-card-main { flex: 1; min-width: 0; }
.i5-card-row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.i5-no { font-size: 16px; color: #303133; }
.i5-model { font-size: 12px; color: #38BDF8; background: #e6f4ff; padding: 2px 8px; border-radius: 999px; }
.i5-qg { font-size: 12px; color: #606266; }
.i5-card-meta { font-size: 13px; color: #606266; margin-top: 5px; }
.i5-cost { display: inline-block; font-size: 12px; color: #909399; margin-top: 5px; }
.i5-errline { font-size: 13px; color: #f53f3f; margin-top: 5px; }

/* 状态胶囊 */
.i5-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.i5-b-queued { background: #e6f4ff; color: #1d2129; }
.i5-b-running, .i5-b-progress { background: linear-gradient(90deg, #38BDF8, #38BDF8); color: #fff; }
.i5-b-completed { background: #E6F4EC; color: #2F8A5B; }
.i5-b-failed { background: #ffece8; color: #f53f3f; }
.i5-b-cancelled { background: #EEF1F5; color: #8A97A6; }
.i5-b-iso { outline: 1px dashed #f53f3f; outline-offset: 1px; }

/* 进度条 */
.i5-prog { height: 5px; background: #e6f4ff; border-radius: 4px; margin-top: 8px; overflow: hidden; }
.i5-prog-bar { height: 100%; background: linear-gradient(90deg, #38BDF8, #38BDF8); border-radius: 4px; transition: width .3s; }

/* ---------- 骨架屏 ---------- */
.i5-skel { cursor: default; }
.i5-sk-thumb { flex: none; width: 96px; height: 60px; border-radius: 12px; background: #e6f4ff; }
.i5-sk-body { flex: 1; }
.i5-sk-line { height: 12px; border-radius: 8px; background: #e6f4ff; margin-bottom: 8px; }
.i5-sk-line.w60 { width: 60%; } .i5-sk-line.w40 { width: 40%; } .i5-sk-line.w80 { width: 80%; }

/* ---------- 底部无限滚动 ---------- */
.i5-scroll { padding: 14px 0; text-align: center; }
.i5-more { font-size: 13px; color: #909399; }
.i5-more-end { color: #B6C4D6; }

/* ---------- 空态 ---------- */
.i5-empty { padding: 56px 20px; }
.i5-empty-ic { font-size: 42px; margin-bottom: 10px; }
.i5-empty-tx { font-size: 16px; font-weight: 600; color: #303133; margin-bottom: 6px; }
.i5-empty-sub { font-size: 13px; color: #606266; }

/* ---------- 批量浮动栏 ---------- */
.i5-batchbar {
  position: fixed; left: 50%; transform: translate(-50%, 120%); bottom: 18px; z-index: 80;
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid rgba(22, 11, 255, .3); border-radius: 12px;
  padding: 10px 14px; box-shadow: 0 12px 40px rgba(50, 80, 130, .22);
  opacity: 0; pointer-events: none; transition: transform .2s, opacity .2s;
}
.i5-batchbar.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.i5-bb-count { font-size: 13px; color: #303133; }
.i5-bb-count b { color: #38BDF8; }
.i5-bb-all { font-size: 13px; color: #606266; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.i5-bb-all input { accent-color: #38BDF8; }
.i5-batchbar .v10-btn { padding: 7px 14px; font-size: 13px; }
.i5-batchbar .v10-btn:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 760px) {
  .i5-batchbar { width: calc(100% - 24px); flex-wrap: wrap; justify-content: center; }
}

/* ---------- 详情抽屉 ---------- */
.i5-mask {
  position: fixed; inset: 0; background: rgba(30, 42, 58, .32); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.i5-mask.show { opacity: 1; pointer-events: auto; }
.i5-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 92vw); z-index: 95;
  background: #fff; box-shadow: -12px 0 40px rgba(50, 80, 130, .2);
  transform: translateX(105%); transition: transform .22s ease;
  display: flex; flex-direction: column;
}
.i5-drawer.open { transform: translateX(0); }
.i5-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid #f5f7fa;
}
.i5-drawer-title { font-size: 16px; font-weight: 700; color: #303133; display: flex; align-items: center; gap: 8px; }
.i5-drawer-close { border: 0; background: #e6f4ff; color: #606266; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.i5-drawer-close:hover { background: #DFEBF9; color: #1d2129; }
.i5-drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px; }

.i5-d-sec { margin-bottom: 18px; }
.i5-d-h { font-size: 13px; font-weight: 700; color: #303133; margin-bottom: 8px; }
.i5-d-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 5px 0; color: #606266; }
.i5-d-kv span:first-child { flex: none; color: #909399; }
.i5-d-kv span:last-child { text-align: right; color: #303133; word-break: break-all; }
.i5-prompt {
  background: #ffffff; border: 1px solid #f5f7fa; border-radius: 12px; padding: 10px 12px;
  font-size: 13px; color: #303133; line-height: 1.6;
}
.i5-dim { color: #909399; }
.i5-ecode { color: #f53f3f; }

/* 限流详情块 */
.i5-d-ratelimit {
  margin-top: 10px; background: #FDF6EC; border: 1px solid #F0E0C0; border-radius: 12px; padding: 10px 12px;
}
.i5-d-rl-t { font-size: 13px; font-weight: 700; color: #A8762A; margin-bottom: 6px; }
.i5-d-rl-note { font-size: 12px; color: #A8762A; margin-top: 6px; line-height: 1.5; }

/* 进度（抽屉） */
.i5-d-prog { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.i5-d-prog { flex: 1; height: 6px; background: #e6f4ff; border-radius: 4px; overflow: hidden; position: relative; }
.i5-d-prog-bar { height: 100%; background: linear-gradient(90deg, #38BDF8, #38BDF8); }
.i5-d-prog span { font-size: 12px; color: #606266; }

/* 成片预览 */
.i5-preview { border: 1px solid #f5f7fa; border-radius: 12px; overflow: hidden; background: #0F1B2D; }
.i5-preview-frame { position: relative; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1B2E4A, #0F1B2D); }
.i5-preview-play {
  width: 46px; height: 46px; border-radius: 999px; background: rgba(255,255,255,.92); color: #38BDF8;
  display: flex; align-items: center; justify-content: center; font-size: 20px; padding-left: 3px;
}
.i5-preview-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px; font-size: 12px; color: #C9D8EC; background: rgba(10, 20, 36, .55); }
.i5-preview-empty { color: #909399; }
.i5-dl { margin-top: 10px; width: 100%; }

.i5-d-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.i5-d-actions .v10-btn { flex: 1 1 auto; }

/* ---------- 高危弹窗 ---------- */
.i5-modal-mask { align-items: center; justify-content: center; display: flex; }
.i5-modal { border-top: 3px solid #f53f3f; }
.i5-modal h3 { color: #303133; }
.i5-modal-desc { font-size: 14px; color: #606266; line-height: 1.6; margin: 10px 0 18px; }
.i5-modal-desc b { color: #f53f3f; }
.i5-modal-ft { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- 轻提示 ---------- */
.i5-toast {
  position: fixed; left: 50%; transform: translate(-50%, -10px); bottom: 84px; z-index: 120;
  background: #303133; color: #fff; font-size: 13px; padding: 9px 16px; border-radius: 12px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  box-shadow: 0 8px 24px rgba(30, 50, 80, .25); max-width: 80vw;
}
.i5-toast.show { opacity: 1; transform: translate(-50%, 0); }
.i5-toast.i5-t-ok { background: #2F8A5B; }
.i5-toast.i5-t-warn { background: #f53f3f; }
