/* task-breakpoint.css — 任务断点 + DLQ 原型样式
   复用 assets/styles.css 变量体系，不引外部资源 */

.tbp-page-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--line);
  margin-bottom: 4px;
}
.tbp-page-tab {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  border: 0;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tbp-page-tab:hover { color: var(--text); background: var(--surface-soft); }
.tbp-page-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tbp-page-tab .tab-count {
  font-size: 11px;
  font-weight: 800;
  background: var(--surface-soft);
  color: var(--muted);
  border-radius: 999px;
  padding: 1px 8px;
}
.tbp-page-tab.active .tab-count { background: var(--brand-soft); color: var(--brand); }
.tbp-page-tab .tab-count.danger { background: var(--red-soft); color: var(--red); }

.tbp-filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  align-items: end;
}
.tbp-filter-bar .search-control { grid-column: span 2; }
.tbp-filter-bar .actions { display: flex; gap: 8px; justify-content: flex-end; }

.bp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.bp-badge .bp-id { font-variant-numeric: tabular-nums; }
.bp-badge.bp-active { background: var(--blue-soft); color: var(--blue); border-color: #bfdbfe; }
.bp-badge.bp-failed { background: var(--red-soft); color: var(--red); border-color: #fecdd3; }
.bp-badge.bp-passed { background: var(--green-soft); color: var(--green); border-color: #bbf7d0; }

.ec-badge {
  display: inline-grid;
  gap: 2px;
  font-size: 11px;
}
.ec-badge .ec-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 750;
  color: var(--text);
}
.ec-badge .ec-family {
  font-size: 10px;
  color: var(--subtle);
  font-weight: 650;
}
.ec-family-CFG { color: #7c3aed; }
.ec-family-SCH { color: #2563eb; }
.ec-family-GPU { color: #b45309; }
.ec-family-NET { color: #0891b2; }
.ec-family-MOD { color: #be185d; }
.ec-family-SYS { color: #b91c1c; }
.ec-family-REQ { color: #475569; }

.resp5-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 750;
  padding: 2px 8px;
  border-radius: 5px;
  white-space: nowrap;
}
.resp5-user { background: #eef2f7; color: #475569; }
.resp5-api { background: var(--violet-soft); color: var(--violet); }
.resp5-ai { background: var(--blue-soft); color: var(--blue); }
.resp5-vendor { background: var(--amber-soft); color: #b45309; }
.resp5-agent { background: var(--red-soft); color: var(--red); }

.attempt-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.attempt-pill .attempt-cur { color: var(--text); font-size: 13px; }
.attempt-pill .attempt-max { color: var(--subtle); }

.pending-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 750;
  color: #b45309;
  background: var(--amber-soft);
  border: 1px solid #fde68a;
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
  vertical-align: middle;
}

.tbp-domain-tabs {
  display: flex;
  border-bottom: 2px solid var(--line);
  margin: -4px 0 14px;
  gap: 0;
}
.tbp-domain-tab {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  border: 0;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
}
.tbp-domain-tab:hover { color: var(--text); }
.tbp-domain-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

.tbp-domain-panel { display: none; }
.tbp-domain-panel.active { display: grid; gap: 14px; }

.tbp-timeline {
  display: grid;
  gap: 0;
  position: relative;
  padding-left: 4px;
}
.tbp-tl-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  padding: 10px 0;
  position: relative;
  align-items: start;
}
.tbp-tl-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 32px;
  bottom: -4px;
  width: 2px;
  background: var(--line);
}
.tbp-tl-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 850;
  z-index: 1;
  background: #fff;
  border: 2px solid var(--line-strong);
  color: var(--subtle);
}
.tbp-tl-item.tl-passed .tbp-tl-dot { background: var(--green); border-color: var(--green); color: #fff; }
.tbp-tl-item.tl-active .tbp-tl-dot { background: var(--blue); border-color: var(--blue); color: #fff; animation: tbp-pulse 1.4s ease-in-out infinite; }
.tbp-tl-item.tl-failed .tbp-tl-dot { background: var(--red); border-color: var(--red); color: #fff; }
.tbp-tl-item.tl-pending .tbp-tl-dot { background: #fff; }
@keyframes tbp-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,.35); }
  50% { box-shadow: 0 0 0 6px rgba(37,99,235,0); }
}
.tbp-tl-body { display: grid; gap: 2px; min-width: 0; }
.tbp-tl-title { font-size: 13px; font-weight: 750; display: flex; align-items: center; gap: 8px; }
.tbp-tl-title .tl-bp { font-size: 11px; font-weight: 850; color: var(--muted); }
.tbp-tl-meta { font-size: 11px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.tbp-tl-meta .tl-error { color: var(--red); font-weight: 700; font-family: ui-monospace, monospace; font-size: 10px; }
.tbp-tl-side { text-align: right; display: grid; gap: 2px; }
.tbp-tl-side .tl-time { font-size: 11px; color: var(--subtle); font-variant-numeric: tabular-nums; }
.tbp-tl-side .tl-dur { font-size: 11px; font-weight: 700; color: var(--muted); }

.tbp-billing-snapshot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.tbp-bs-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 4px;
  background: var(--surface-soft);
}
.tbp-bs-card .bs-label { font-size: 11px; font-weight: 750; color: var(--muted); }
.tbp-bs-card .bs-value { font-size: 18px; font-weight: 850; font-variant-numeric: tabular-nums; }
.tbp-bs-card.bs-frozen .bs-value { color: var(--amber); }
.tbp-bs-card.bs-available .bs-value { color: var(--green); }
.tbp-bs-card.bs-consumed .bs-value { color: var(--text); }
.tbp-bs-card .bs-hint { font-size: 10px; color: var(--subtle); }

.tbp-hold-map {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
  display: grid;
  gap: 8px;
}
.tbp-hold-map .hm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.tbp-hold-map .hm-row span { color: var(--muted); }
.tbp-hold-map .hm-row strong { font-family: ui-monospace, monospace; font-size: 11px; }

.tbp-resp9-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 8px;
  background: var(--surface-soft);
}
.tbp-resp9-card .r9-top { display: flex; align-items: center; justify-content: space-between; }
.tbp-resp9-card .r9-5label { font-size: 11px; color: var(--muted); font-weight: 700; }
.tbp-resp9-card .r9-9label { font-size: 14px; font-weight: 800; }
.tbp-resp9-card .r9-desc { font-size: 11px; color: var(--muted); line-height: 1.5; }

.tbp-dlq-urgency {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 750;
  padding: 2px 8px;
  border-radius: 5px;
}
.tbp-dlq-urgency.urgency-safe { background: var(--green-soft); color: var(--green); }
.tbp-dlq-urgency.urgency-warn { background: var(--amber-soft); color: #b45309; }
.tbp-dlq-urgency.urgency-danger { background: var(--red-soft); color: var(--red); }
.tbp-dlq-urgency.urgency-expired { background: #eef2f7; color: var(--subtle); }

.tbp-dlq-bar {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}
.tbp-dlq-bar > div { height: 100%; border-radius: 2px; }
.tbp-dlq-bar .bar-safe { background: var(--green); }
.tbp-dlq-bar .bar-warn { background: var(--amber); }
.tbp-dlq-bar .bar-danger { background: var(--red); }

.tbp-dlq-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  flex-wrap: wrap;
}
.tbp-dlq-actions { display: flex; gap: 8px; align-items: center; }
.tbp-dlq-selected { font-size: 12px; color: var(--muted); font-weight: 650; }

.tbp-state-overlay {
  padding: 40px 20px;
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.tbp-state-overlay .state-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 24px; font-weight: 850;
}
.tbp-state-overlay.state-empty .state-icon { background: var(--surface-soft); color: var(--subtle); }
.tbp-state-overlay.state-error .state-icon { background: var(--red-soft); color: var(--red); }
.tbp-state-overlay.state-noperm .state-icon { background: var(--amber-soft); color: #b45309; }
.tbp-state-overlay strong { font-size: 15px; }
.tbp-state-overlay p { margin: 0; color: var(--muted); font-size: 13px; max-width: 360px; line-height: 1.6; }

.tbp-threshold-bar {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
}
.tbp-threshold-bar .th-item { display: inline-flex; align-items: center; gap: 6px; }
.tbp-threshold-bar .th-val { font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }

.tbp-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.tbp-section-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tbp-kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}
.tbp-kv { display: grid; gap: 2px; }
.tbp-kv .kv-k { font-size: 11px; color: var(--muted); font-weight: 650; }
.tbp-kv .kv-v { font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
.tbp-kv .kv-v.mono { font-family: ui-monospace, monospace; font-size: 11px; }

.tbp-asset-list { display: grid; gap: 6px; }
.tbp-asset-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  font-size: 12px;
}
.tbp-asset-item .ai-name { font-weight: 700; }
.tbp-asset-item .ai-meta { color: var(--muted); font-size: 11px; }
.tbp-asset-item .ai-note { color: var(--amber); font-size: 11px; font-weight: 650; }

.tbp-notif-list { display: grid; gap: 6px; }
.tbp-notif-item {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}
.tbp-notif-item .ni-top { display: flex; justify-content: space-between; font-size: 12px; }
.tbp-notif-item .ni-type { font-weight: 750; }
.tbp-notif-item .ni-channel { color: var(--muted); font-size: 11px; }
.tbp-notif-item .ni-note { font-size: 11px; color: var(--amber); line-height: 1.4; }

.tbp-audit-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 10px;
}
.tbp-audit-card.audit-blocked { border-color: #fecdd3; background: var(--red-soft); }
.tbp-audit-card.audit-passed { border-color: #bbf7d0; background: var(--green-soft); }

.tbp-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.tbp-btn-sm {
  font-size: 12px;
  padding: 4px 10px;
  min-height: 28px;
  border-radius: 6px;
}
.tbp-btn-sm[disabled] {
  opacity: .4;
  cursor: not-allowed;
}

.tbp-tasks-table { min-width: 1680px; }
.tbp-dlq-table { min-width: 1400px; }

.tbp-check-col { width: 36px; text-align: center; }
.tbp-check-col input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

.task-detail-drawer { width: min(640px, 100vw); }

.tbp-no-retry-hint {
  font-size: 10px;
  color: var(--subtle);
  cursor: help;
}

/* ══════════════ 2026-09-14 P0：免费补偿 + 下架存量监控 样式 ══════════════ */
/* 免费补偿确认弹窗 */
.comp-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}
.comp-mask.open { display: flex; }
.comp-modal {
  width: min(440px, calc(100vw - 32px));
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(2, 6, 23, .25);
  overflow: hidden;
}
.comp-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.comp-modal-head h3 { margin: 0; font-size: 15px; }
.comp-modal-body { padding: 16px 18px; font-size: 13px; line-height: 1.7; color: var(--ink, #0f172a); }
.comp-modal-body p { margin: 0 0 10px; }
.comp-rules { margin: 0 0 12px; padding-left: 18px; }
.comp-rules li { margin: 4px 0; }
.comp-vendor-note {
  margin: 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--amber-soft, #fff7ed);
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 12px;
}
.comp-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}

/* 模型下架存量监控横幅 */
.tbp-drain-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.7;
}
.tbp-drain-banner strong { font-size: 14px; }
.tbp-drain-banner p { margin: 4px 0 0; color: var(--muted, #64748b); }
.tbp-drain-banner .drain-banner-icon { font-size: 22px; line-height: 1.4; }
.tbp-drain-banner .mono { font-weight: 700; color: var(--ink, #0f172a); }
.tbp-drain-banner.drain-blocked {
  background: var(--red-soft, #fef2f2);
  border: 1px solid #fecaca;
}
.tbp-drain-banner.drain-blocked p { color: #7f1d1d; }
.tbp-drain-banner.drain-active {
  background: var(--blue-soft, #eff6ff);
  border: 1px solid #bfdbfe;
}
.tbp-drain-banner .drain-done {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--green-soft, #f0fdf4);
  border: 1px solid #bbf7d0;
  color: #166534;
  font-weight: 700;
}
