/* ===== 创作工作台：视频与图片页 ===== */
/* =========================================================
   创作工作台
   ========================================================= */
.creation-shell { height: 100dvh; min-height: 0; overflow: hidden; }
.creation-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: none;
  height: calc(100dvh - 72px);
  padding: 16px 20px 20px;
  overflow: hidden;
}
.channel-health {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
  padding: 10px 12px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(11, 21, 48, .03);
}
.channel-health-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.channel-health-head > div { flex: 1; min-width: 0; }
.channel-health-head strong { display: block; font-size: 13px; }
.channel-health-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channel-health-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}
.channel-health-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px 11px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(11, 21, 48, .03);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.channel-health-card:hover { border-color: #c7d2fe; }
.channel-health-card.is-active {
  background: #eef4ff;
  border-color: #93b4ff;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, .12), 0 6px 18px rgba(37, 99, 235, .08);
}
.channel-health-card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}
.channel-health-card-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channel-health-trophy {
  display: inline-flex;
  flex: none;
  color: #c7a24a;
}
.channel-health-trophy .icon { width: 15px; height: 15px; }
.channel-health-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}
.channel-health-metrics > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.channel-health-metrics small { color: var(--muted); font-size: 10px; }
.channel-health-metrics strong {
  font-size: 14px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.channel-health-bars {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  height: 12px;
}
.channel-health-bars i {
  display: block;
  min-width: 0;
  border-radius: 3px;
  background: #e2e8f0;
}
.channel-health-bars i.good { background: #22c55e; }
.channel-health-bars i.warn { background: #f59e0b; }
.channel-health-bars i.bad { background: #ef4444; }
.channel-health-bars i.empty { background: #e2e8f0; }
.channel-health-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  flex: none;
}
.channel-health-refresh:hover { color: var(--blue); border-color: #c7d2fe; }
.channel-health-empty {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.creation-workspace {
  display: grid;
  grid-template-columns: minmax(210px, .72fr) minmax(290px, .92fr) minmax(420px, 1.65fr);
  flex: 1;
  height: auto;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(11, 21, 48, .03);
}
.creation-workspace > section { min-width: 0; height: 100%; min-height: 0; }
.creation-models,
.creation-parameters,
.creation-prompt {
  display: flex;
  flex-direction: column;
  gap: 17px;
  padding: 20px;
  border-right: 1px solid var(--border);
}
.creation-models {
  overflow: hidden;
  background: #fbfcfe;
  border-radius: 18px 0 0 18px;
}
.creation-parameters,
.creation-prompt {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.creation-prompt {
  border-right: 0;
  border-radius: 0 18px 18px 0;
}

.creation-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 13px;
  border-bottom: 1px solid #edf1f6;
}
.creation-section-heading > span {
  display: grid;
  place-items: center;
  flex: none;
  width: 27px;
  height: 27px;
  color: var(--blue);
  background: #eef2ff;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
}
.creation-section-heading > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.creation-section-heading > .channel-health-refresh { margin-left: auto; align-self: center; }
.creation-section-heading strong { color: #1e293b; font-size: 14px; }
.creation-section-heading small { color: #94a3b8; font-size: 10px; line-height: 1.45; }

.model-rail-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  min-height: 0;
  padding-right: 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.model-rail-list > button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  min-height: 108px;
  padding: 12px;
  overflow: visible;
  color: #334155;
  text-align: left;
  background: #fff;
  border: 1px solid #e7ecf4;
  border-radius: 12px;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.model-rail-list > button:hover { background: #f8faff; border-color: #cfd8e8; }
.model-rail-list > button.active {
  background: #f2f5ff;
  border-color: #8fa8ff;
  box-shadow: 0 5px 18px rgba(49, 94, 251, .086);
}
.model-rail-list strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.model-rail-list .model-check { color: var(--blue); display: grid; place-items: center; }
.model-rail-list .model-pinned { color: #f59e0b; display: grid; place-items: center; }
.model-rail-list .model-pinned .icon { width: 14px; height: 14px; }
.model-rail-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; min-width: 0; }
.model-rail-heading > strong { color: #172554; min-width: 0; font-size: 12px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.model-rail-heading .model-pinned { flex: none; margin-top: 1px; width: 14px; height: 14px; }
.model-health { display: flex; flex-direction: column; gap: 3px; min-width: 0; color: #64748b; pointer-events: none; }
.model-health-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.model-health-metrics > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.model-health-metrics small { display: block; color: #7c8aa0; font-size: 9px; line-height: 1.2; white-space: nowrap; }
.model-health-metrics b { color: #334155; font-size: 11px; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; }
.model-health-metrics b.great { color: #08775b; }
.model-health-metrics b.good { color: #157a6e; }
.model-health-metrics b.watch { color: #9a5b00; }
.model-health-metrics b.poor { color: #c2413a; }
.model-health-metrics b.empty { color: #7c8aa0; }
.model-health-bars { display: grid; grid-template-columns: repeat(24, minmax(2px, 1fr)); align-items: stretch; gap: 2px; width: 100%; height: 13px; }
.model-health-bars i { display: block; min-width: 2px; background: #dbe2ec; border-bottom: 2px solid #aeb8c7; border-radius: 2px; }
.model-health-bars i.great { background: #19b98b; border-color: #08775b; }
.model-health-bars i.good { background: #38b8b0; border-color: #157a6e; }
.model-health-bars i.watch { background: #f5b83d; border-color: #b56a08; }
.model-health-bars i.poor { background: #ef6a62; border-color: #b93832; }

/* 参数表单 */
.field-label {
  display: block;
  margin-bottom: 9px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}
.field { position: relative; display: block; }
.field > span,
.reference-head > span { display: block; margin-bottom: 9px; color: #334155; font-size: 13px; font-weight: 700; }
.field textarea {
  width: 100%;
  color: #000;
  min-height: 150px;
  padding: 14px;
  line-height: 1.65;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  resize: vertical;
}
.field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49, 94, 251, .07); }
.field > small { position: absolute; right: 11px; bottom: 10px; color: #94a3b8; font-size: 11px; }
.creation-prompt .field.grow { display: flex; flex: 1; flex-direction: column; }
.creation-prompt .field.grow textarea { flex: 1; min-height: 210px; }
.creation-prompt .cost-line { margin-top: auto; }

.reference-box { padding: 14px; background: #fbfcfe; border: 1px solid var(--border); border-radius: 12px; }
.reference-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.reference-image-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.reference-thumb,
.reference-add {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 11px;
}
.reference-thumb > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.reference-thumb > .reference-delete-button {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #be123c;
  cursor: pointer;
  background: rgba(255, 255, 255, .93);
  border: 0;
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .13);
}
.reference-thumb > .reference-delete-button:hover { color: #9f1239; background: #fff1f2; }
.reference-thumb > .reference-delete-button:focus-visible { outline: 3px solid #fda4af; outline-offset: 2px; }
.reference-thumb figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 28px 9px 8px;
  color: #fff;
  background: linear-gradient(transparent, rgba(15, 23, 42, .85));
}
.reference-thumb figcaption strong { font-size: 12px; }
.reference-thumb figcaption span { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; opacity: .8; }
.reference-add { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; color: var(--blue); cursor: pointer; border-style: dashed; border-color: #aebfff; }
.reference-add:hover { background: var(--pale); border-color: var(--blue); }
.reference-add input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.reference-add:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.reference-add .icon { width: 22px; height: 22px; }
.reference-add strong { max-width: 90%; font-size: 12px; line-height: 1.35; text-align: center; }
.reference-add small { color: var(--muted); font-size: 10px; }
.reference-image-grid.is-empty .reference-add {
  grid-column: 1 / -1;
  gap: 8px;
  width: 100%;
  min-height: 132px;
  padding: 18px 14px;
  aspect-ratio: auto;
}
.reference-image-grid.is-empty .reference-add .icon { width: 28px; height: 28px; }
.reference-image-grid.is-empty .reference-add strong { max-width: none; font-size: 13px; }
.reference-audios { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.reference-audios-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.reference-audios-head span { font-size: 13px; font-weight: 650; }
.reference-audios-head small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.reference-audio-list { display: grid; gap: 8px; }
.reference-audios .audio-add { width: 100%; min-height: 64px; padding: 10px; background: #fff; border: 1px dashed #aebfff; border-radius: 12px; position: relative; }
.reference-audios .audio-add strong { font-size: 12px; }
.reference-audio-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.audio-role { flex: none; padding: 3px 9px; color: var(--blue); background: var(--pale); border-radius: 999px; font-size: 11px; font-weight: 700; }
.reference-audio-item audio { flex: 1; min-width: 0; height: 36px; }
.audio-meta { display: flex; flex-direction: column; gap: 1px; max-width: 150px; min-width: 0; }
.audio-meta strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.audio-meta small { color: var(--muted); font-size: 11px; }
.audio-remove {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #64748b;
  background: #f1f5f9;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}
.audio-remove:hover { color: #b91c1c; background: #fee2e2; }
.audio-remove .icon { width: 14px; height: 14px; }
.reference-thumb[draggable="true"] { cursor: grab; transition: opacity .14s, box-shadow .14s, transform .14s; }
.reference-thumb[draggable="true"]:active { cursor: grabbing; }
.reference-thumb.is-dragging { opacity: .48; transform: scale(.97); }
.reference-thumb.is-drop-target { box-shadow: 0 0 0 3px rgba(49, 94, 251, .44); }

.reference-prompt-field { z-index: 4; }
.reference-prompt-editor {
  position: relative;
  overflow: visible;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.reference-prompt-editor:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49, 94, 251, .07); }
.reference-prompt-content {
  min-height: 480px;
  padding: 64px 14px 14px;
  color: #0f172a;
  font-size: 14px;
  line-height: 2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-radius: inherit;
  outline: 0;
  cursor: text;
}
.reference-prompt-content:empty:before { content: attr(data-placeholder); color: #94a3b8; pointer-events: none; }
.prompt-expand-trigger {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-width: 104px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--blue);
  background: #f7f9ff;
  border: 1px solid #c7d4ff;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(49, 94, 251, .07);
  font-size: 12px;
  font-weight: 750;
}
.prompt-expand-trigger:hover { background: var(--pale); border-color: #829dff; }
.prompt-expand-trigger:focus-visible { outline: 3px solid rgba(49, 94, 251, .21); outline-offset: 2px; }
.reference-prompt-help { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.reference-prompt-help code { padding: 2px 5px; color: var(--blue); background: var(--pale); border-radius: 5px; }
.prompt-mention {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  margin: 0 2px;
  padding: 2px 7px 2px 3px;
  color: var(--blue);
  background: #eef3ff;
  border: 1px solid #c7d4ff;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  vertical-align: middle;
  white-space: nowrap;
  user-select: none;
  cursor: default;
}
.prompt-mention img { width: 20px; height: 20px; object-fit: cover; border-radius: 4px; }
.prompt-mention-label { display: inline-block; }
.prompt-mention-popover {
  position: absolute;
  z-index: 30;
  width: min(320px, calc(100% - 16px));
  max-height: 290px;
  padding: 6px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #dbe4ff;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
}
.prompt-mention-popover[hidden] { display: none; }
.mention-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  color: #1e293b;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}
.mention-option:hover,
.mention-option.active { background: #eef3ff; }
.mention-thumb { flex: none; width: 38px; height: 38px; object-fit: cover; background: #eef2f7; border-radius: 8px; }
.mention-copy { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.mention-copy strong { color: var(--blue); font-size: 12px; }
.mention-copy small { overflow: hidden; color: #64748b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mention-kind { flex: none; padding: 3px 7px; color: #475569; background: #f1f5f9; border-radius: 6px; font-size: 10px; font-weight: 700; }
.mention-empty { display: flex; align-items: center; gap: 8px; padding: 14px 12px; color: #64748b; font-size: 12px; line-height: 1.5; }
.mention-empty .icon { flex: none; width: 16px; height: 16px; }
.billing-breakdown {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  padding: 10px 12px;
  color: #64748b;
  background: #f7f9ff;
  border: 1px solid #dbe4ff;
  border-radius: 9px;
  font-size: 12px;
}
.billing-breakdown strong { color: #173bba; font-variant-numeric: tabular-nums; }
.billing-breakdown > small { margin-left: auto; color: #526178; }
.billing-price { display: inline-flex; align-items: baseline; gap: 7px; }
.price-original { color: #94a3b8; font-weight: 600; text-decoration: line-through; }
.billing-price .price-original { font-size: 11px; }
.choice-field { position: relative; }
.choice-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 9px 12px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 11px;
}
.choice-trigger:hover { border-color: #c3cee0; }
.choice-trigger > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.choice-trigger strong { color: #1e293b; font-size: 13px; }
.choice-trigger small { color: #94a3b8; font-size: 10px; }
.choice-trigger .icon { width: 17px; height: 17px; color: #000; }
.choice-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  z-index: 35;
  max-height: 260px;
  padding: 7px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .14);
}
.choice-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  color: #334155;
  text-align: left;
  background: #fff;
  border: 0;
  border-radius: 8px;
}
.choice-menu button:hover,
.choice-menu button.active { color: var(--blue); background: #eef2ff; font-weight: 700; }

.prompt-box { position: relative; display: flex; flex: 1; flex-direction: column; min-height: 480px; }
.prompt-box textarea {
  flex: 1;
  width: 100%;
  min-height: 480px;
  padding: 32px 14px 30px;
  line-height: 1.65;
  resize: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.prompt-box textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49, 94, 251, .07); }
.video-prompt-box textarea { padding-top: 60px; }
.prompt-box textarea::placeholder { color: #94a3b8; }
.char-count {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: #94a3b8;
  font-size: 10px;
  pointer-events: none;
}
.prompt-hint { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.prompt-hint code {
  padding: 1px 5px;
  color: var(--blue);
  background: var(--pale);
  border-radius: 5px;
  font-size: 11px;
}
.expand-prompt {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 10px;
  color: var(--blue);
  background: #f5f8ff;
  border: 1px solid #dbe4ff;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 650;
}
.expand-prompt:hover { background: #eef3ff; }
.prompt-toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pricing-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: #475569;
  background: #f5f7ff;
  border-radius: 9px;
  font-size: 11px;
  line-height: 1.5;
}
.pricing-note strong { color: var(--ink); font-size: 12px; }
.pricing-note small { color: var(--muted); font-size: 10px; }
.cost-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  padding-top: 17px;
  border-top: 1px dashed var(--border);
}
.cost-line span { color: var(--muted); font-size: 13px; }
.cost-line strong { color: var(--coral); font-size: 20px; }
.cost-line small { margin-left: auto; color: var(--muted); }
.generate { width: 100%; height: 48px; }
.generate .icon { width: 18px; height: 18px; }

/* 结果面板 */
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 22px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.panel-title > span { display: flex; align-items: center; gap: 8px; }
.panel-title .icon { width: 17px; height: 17px; }
.panel-title .panel-sub { color: #94a3b8; font-size: 10px; font-weight: 500; }
.empty-result {
  width: min(340px, 70%);
  margin: auto;
  color: var(--muted);
  text-align: center;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto;
  color: var(--blue);
  background: var(--pale);
  border-radius: 18px;
}
.empty-icon .icon { width: 28px; height: 28px; }
.empty-result h3 { margin: 16px 0; color: #334155; font-size: 16px; }
.empty-result p { margin: 13px 0; font-size: 13px; line-height: 1.7; }

.generation-queue {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  flex: 1;
  gap: 14px;
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.generation-task {
  padding: 13px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
}
.generation-task.queued { border-color: #bdcaff; }
.task-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.task-head strong { font-size: 12px; }
.task-status { padding: 4px 8px; border-radius: 7px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.task-status.queued { color: #9a5b00; background: #fffbeb; }
.task-status.running { color: var(--blue); background: #eef3ff; }
.task-status.success { color: #047857; background: #ecfdf5; }
.task-status.failed { color: #b91c1c; background: #fef2f2; }
.task-status.expired { color: #475569; background: #f1f5f9; }
.task-prompt { color: var(--muted); font-size: 11px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-preview {
  position: relative;
  margin-top: 10px;
  overflow: hidden;
  background: #eef2f7;
  border-radius: 10px;
  aspect-ratio: 16 / 10;
}
.task-preview img { width: 100%; height: 100%; object-fit: cover; }
.task-preview .shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, #eef2f7 20%, #f8fafc 40%, #eef2f7 60%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.task-preview .task-progress {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--blue);
}
.task-preview.task-expired {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #64748b;
  background: #f1f5f9;
}
.task-preview.task-expired .task-progress { position: static; color: #64748b; font-size: 11px; font-weight: 600; }
.task-preview.task-expired .icon { fill: none; }
.task-expired-note { display: flex; flex: 1 1 100%; align-items: center; justify-content: center; gap: 4px; color: #64748b; font-size: 10.5px; }
.task-expired-note .icon { width: 14px; height: 14px; }
.task-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; color: #94a3b8; font-size: 10px; }
.task-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.task-actions button,
.task-actions a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  padding: 0 6px;
  color: var(--blue);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 10.5px;
  white-space: nowrap;
}
.task-actions button:hover,
.task-actions a:hover { background: #eef2ff; border-color: #c7d2fe; }
.task-actions .danger { color: #b91c1c; }
.task-image-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 6px; margin-top: 10px; }
.task-image-grid figure { position: relative; margin: 0; overflow: hidden; border-radius: 9px; aspect-ratio: 1; background: #eef2f7; }
.task-image-grid img { width: 100%; height: 100%; object-fit: cover; }
.task-image-grid .shimmer { position: absolute; inset: 0; background: linear-gradient(100deg, #eef2f7 20%, #f8fafc 40%, #eef2f7 60%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
