:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-subtle: #fafbfc;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --primary: #18181b;
  --primary-hover: #27272a;
  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --success: #047857;
  --success-soft: #ecfdf5;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  padding: 8px 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (min-width: 1720px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .brand {
    justify-self: start;
  }

  .workspace-switcher {
    justify-self: center;
  }

  .topbar-utility {
    justify-self: end;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
}

.brand-name {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* 核心双主舱切换器（顶栏居中视觉焦点） */
.workspace-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  background: linear-gradient(180deg, #eef1f8 0%, #e5e9f4 100%);
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.06),
    0 2px 10px rgba(79, 70, 229, 0.07);
}

.ws-switch-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px 7px 11px;
  border-radius: 10px;
  border: 1.5px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.72);
  color: #1e293b;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.ws-switch-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #e0e7ff;
  color: #4338ca;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.ws-switch-copy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ws-switch-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.ws-switch-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.1);
  color: #4338ca;
  border: 1px solid rgba(79, 70, 229, 0.16);
  white-space: nowrap;
}

.ws-switch-btn:not(.active):hover {
  background: #ffffff;
  border-color: #818cf8;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.12);
}

.ws-switch-btn.active {
  background: linear-gradient(135deg, #18181b 0%, #262262 100%);
  border-color: #3730a3;
  color: #ffffff;
  box-shadow: 0 5px 16px rgba(30, 27, 75, 0.26);
}

.ws-switch-btn.active .ws-switch-icon {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.5);
}

.ws-switch-btn.active .ws-switch-badge {
  background: rgba(255, 255, 255, 0.15);
  color: #e0e7ff;
  border-color: rgba(255, 255, 255, 0.22);
}

/* 右侧次级管理菜单与账户栏（视觉降权） */
.topbar-utility {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.secondary-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.sub-nav-tab {
  position: relative;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.sub-nav-tab:hover {
  color: var(--text);
  background: var(--bg);
}

.sub-nav-tab.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.sub-nav-tab.active::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.topbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.credit-pill {
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid #fde68a;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.user-chip {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.main-container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px 18px 18px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

@supports (content-visibility: hidden) {
  .view {
    display: block;
    content-visibility: hidden;
    height: 0;
    overflow: hidden;
    pointer-events: none;
    contain-intrinsic-size: auto 0px;
  }

  .view.active {
    content-visibility: visible;
    height: auto;
    overflow: visible;
    pointer-events: auto;
    contain-intrinsic-size: none;
  }
}

.studio-grid {
  width: 100%;
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: 296px minmax(560px, 1.52fr) minmax(420px, 0.92fr);
  gap: 14px;
  align-items: stretch;
}

.studio-grid.is-sidebar-collapsed {
  grid-template-columns: minmax(640px, 1.56fr) minmax(430px, 0.92fr);
}

.studio-grid.is-sidebar-collapsed .director-sidebar-panel {
  display: none;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.composer-title-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.active-tpl-pill-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.tpl-clear-btn {
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.tpl-clear-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-soft);
}

.muted-text {
  color: var(--text-muted);
  font-size: 12px;
}

/* 提示词区：紧凑灵感模板快捷条 + 按需展开模板库浮层 */
.tpl-toolbar-anchor {
  position: relative;
  margin-bottom: 9px;
}

.tpl-quick-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  overflow: hidden;
}

.tpl-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid #c7d2fe;
  background: #ffffff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.tpl-trigger-btn small {
  font-size: 11px;
  padding: 0 5px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
}

.tpl-trigger-btn:hover,
.tpl-trigger-btn.is-open {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}

.tpl-trigger-btn:hover small,
.tpl-trigger-btn.is-open small {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.tpl-chevron {
  font-size: 11px;
  line-height: 1;
  transition: transform 0.15s ease;
}

.tpl-trigger-btn.is-open .tpl-chevron {
  transform: rotate(180deg);
}

.tpl-quick-sep {
  width: 1px;
  height: 16px;
  background: var(--border);
  flex-shrink: 0;
}

.tpl-quick-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.tpl-quick-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}

.tpl-quick-chips::-webkit-scrollbar {
  display: none;
}

.tpl-chip {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.tpl-chip:hover {
  border-color: #818cf8;
  color: var(--accent);
}

.tpl-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.tpl-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 25;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.tpl-popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.tpl-popover-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.tpl-popover-title-wrap strong {
  font-size: 14px;
  color: var(--text);
}

.tpl-popover-close {
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
}

.tpl-popover-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tpl-cat-pill {
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.tpl-cat-pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.tpl-cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.tpl-popover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  max-height: 330px;
  overflow-y: auto;
  padding-right: 2px;
}

.tpl-card {
  text-align: left;
  background: var(--surface-subtle);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tpl-card:hover {
  background: #ffffff;
  border-color: #818cf8;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.08);
}

.tpl-card.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.tpl-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.tpl-card-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}

.tpl-card-meta {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-secondary);
  white-space: nowrap;
}

.tpl-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.block {
  margin-bottom: 16px;
}

.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.segmented {
  display: inline-flex;
  background: var(--bg);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
}

.seg-btn.active {
  background: #fff;
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.upload-zone {
  border: 1.5px dashed var(--border-strong);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  transition: border-color 0.15s, background 0.15s;
}

.upload-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upload-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.thumb-item {
  width: 102px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.thumb-item.dragging {
  opacity: 0.45;
  transform: scale(0.96);
}

.thumb-item.drag-over .thumb-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.25);
}

.thumb-card {
  position: relative;
  width: 102px;
  height: 84px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  cursor: grab;
}

.thumb-card:active {
  cursor: grabbing;
}

.thumb-filename {
  font-size: 10px;
  line-height: 1.3;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
}

.thumb-note-input {
  width: 100%;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 5px;
  font-size: 11px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.thumb-note-input:focus {
  border-color: var(--accent);
}

.thumb-card img,
.thumb-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-audio-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  text-align: center;
}

.thumb-audio-play {
  border: 1px solid #c7d2fe;
  background: #fff;
  color: var(--accent);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  cursor: pointer;
}

.thumb-audio-name {
  font-size: 10px;
  color: var(--text-secondary);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumb-badge.badge-audio {
  background: rgba(79, 70, 229, 0.88);
}

.thumb-badge.badge-video {
  background: rgba(13, 148, 136, 0.88);
}

.thumb-badge.badge-warn {
  background: rgba(220, 38, 38, 0.9);
}

.upload-actions-box {
  flex: 1;
  min-width: 200px;
  min-height: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px;
}

.upload-quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.upload-hint-text {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

.price-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.model-limit-notice {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.pill:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.thumb-badge {
  position: absolute;
  left: 4px;
  bottom: 4px;
  background: rgba(17, 24, 39, 0.84);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: background 0.14s ease, transform 0.12s ease;
}

.thumb-badge:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.thumb-remove {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  font-size: 13px;
}

.upload-add-btn {
  flex: 1;
  min-width: 160px;
  min-height: 82px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-secondary);
}

.upload-add-btn .plus-icon {
  font-size: 20px;
  line-height: 1;
  color: var(--accent);
}

.upload-add-btn small {
  font-size: 11px;
  color: var(--text-muted);
}

.prompt-editor-wrap {
  position: relative;
  background: #ffffff;
  border-radius: 10px;
}

.prompt-highlight-backdrop {
  position: absolute;
  top: 1px;
  left: 1px;
  z-index: 1;
  margin: 0;
  padding: 12px;
  box-sizing: border-box;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  font-style: normal;
  font-kerning: none;
  font-variant-ligatures: none;
  line-height: 1.65;
  letter-spacing: 0;
  word-spacing: 0;
  tab-size: 4;
  text-indent: 0;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.prompt-textarea.has-highlight-mirror {
  position: relative;
  z-index: 2;
  display: block;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  font-style: normal;
  font-kerning: none;
  font-variant-ligatures: none;
  line-height: 1.65;
  letter-spacing: 0;
  word-spacing: 0;
  tab-size: 4;
  text-indent: 0;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  background: transparent !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  caret-color: #111827 !important;
}

.prompt-textarea.has-highlight-mirror::placeholder {
  color: #9ca3af;
  -webkit-text-fill-color: #9ca3af;
  opacity: 1;
}

.prompt-textarea.has-highlight-mirror::selection {
  background: rgba(79, 70, 229, 0.22);
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.prompt-ref-mark {
  font: inherit;
  letter-spacing: inherit;
  margin: 0;
  padding: 1px 0;
  border-radius: 4px;
  font-weight: 400;
}

.prompt-ref-mark.is-image {
  color: #3730a3;
  background: #dbeafe;
  box-shadow: inset 0 0 0 1px #93c5fd;
}

.prompt-ref-mark.is-audio {
  color: #92400e;
  background: #fef3c7;
  box-shadow: inset 0 0 0 1px #fcd34d;
}

.prompt-ref-mark.is-video {
  color: #065f46;
  background: #d1fae5;
  box-shadow: inset 0 0 0 1px #6ee7b7;
}

.stage-prompt .prompt-ref-mark,
.task-item-prompt .prompt-ref-mark,
.vh-row-prompt .prompt-ref-mark,
.asset-card-prompt .prompt-ref-mark,
.asset-lightbox-prompt .prompt-ref-mark,
.img-darkroom-subprompt .prompt-ref-mark {
  padding: 0 5px;
  font-weight: 600;
}

.prompt-textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.65;
  resize: vertical;
  outline: none;
  background: #fff;
}

.prompt-textarea:focus,
.text-input:focus,
.select-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.textarea-foot {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.textarea-foot-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mention-quick-btn {
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: var(--accent);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.mention-quick-btn:hover {
  background: #e0e7ff;
  border-color: var(--accent);
}

.mention-popover {
  position: absolute;
  left: 10px;
  top: 44px;
  z-index: 36;
  width: min(380px, calc(100% - 20px));
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.mention-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.mention-popover-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.mention-popover-close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 3px;
}

.mention-popover-close:hover {
  color: var(--text);
}

.mention-popover-list {
  max-height: 256px;
  overflow-y: auto;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mention-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.mention-item:hover,
.mention-item.is-active {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.mention-item-thumb {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.mention-item-thumb img,
.mention-item-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mention-item-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mention-item-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mention-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 700;
  background: #4f46e5;
  color: #ffffff;
  flex-shrink: 0;
}

.mention-tag-pill.kind-audio {
  background: #7c3aed;
}

.mention-tag-pill.kind-video {
  background: #0d9488;
}

.mention-orig-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mention-item-note {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mention-enter-hint {
  font-size: 10.5px;
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
  opacity: 0;
}

.mention-item.is-active .mention-enter-hint,
.mention-item:hover .mention-enter-hint {
  opacity: 1;
}

.mention-empty-box {
  padding: 12px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.director-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.director-select {
  height: 30px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0 8px;
  font-size: 12px;
  background: #fff;
  color: var(--text);
  outline: none;
  cursor: pointer;
}

.director-select:focus {
  border-color: var(--accent);
}

.btn-director {
  background: var(--accent-soft);
  border-color: #c7d2fe;
  color: var(--accent);
}

.btn-director:hover:not(:disabled) {
  background: #e0e7ff;
  border-color: var(--accent);
}

.director-summary {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.director-summary-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.director-summary-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.params-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.param-wide {
  grid-column: 1 / -1;
}

.select-input,
.text-input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 0 11px;
  font-size: 13px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.quick-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
}

.pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.render-line-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 7px 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.render-line-title {
  margin: 0 !important;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.render-line-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.render-line-sep {
  color: var(--border-strong);
  font-size: 12px;
  user-select: none;
}

.render-line-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.render-line-btn:hover {
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
}

.render-line-btn.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.22);
}

.range-input {
  width: 100%;
  accent-color: var(--primary);
}

.param-switches {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.submit-box {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.cost-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.cost-main {
  font-size: 14px;
  color: var(--text);
  margin-right: 8px;
}

.cost-main strong {
  font-size: 18px;
  color: var(--accent);
}

.cost-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.btn {
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-ghost {
  background: var(--surface-subtle);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: #fff;
}

.btn-danger-ghost {
  background: transparent;
  color: var(--danger);
  border-color: #fecaca;
}

.btn-lg {
  height: 44px;
  font-size: 15px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.tag-soft {
  background: var(--accent-soft);
  color: var(--accent);
}

.tag-green {
  background: var(--success-soft);
  color: var(--success);
}

.tag-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.tag-red {
  background: var(--danger-soft);
  color: var(--danger);
}

.stage-box {
  border-radius: 12px;
  background: #111318;
  color: #f3f4f6;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.stage-box.is-empty-stage {
  min-height: 210px;
}

.empty-stage {
  padding: 36px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.empty-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 12px;
  color: #9ca3af;
}

.stage-video {
  width: 100%;
  max-height: 440px;
  background: #000;
  display: block;
}

.stage-meta {
  padding: 12px 14px;
  background: #181b22;
  font-size: 12px;
}

.stage-prompt {
  color: #e5e7eb;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stage-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 13px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-right: 2px;
}

.task-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface-subtle);
  cursor: pointer;
  content-visibility: auto;
  contain-intrinsic-size: auto 132px;
  contain: layout style;
  transition: border-color 0.15s, background-color 0.15s;
}

.task-item:hover,
.task-item.active {
  border-color: var(--accent);
  background: #fff;
}

.task-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.task-item-prompt {
  font-size: 12px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}

.task-item-foot {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

.page-narrow {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-wide {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wallet-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 20px;
  align-items: center;
}

.wallet-balance {
  font-size: 36px;
  font-weight: 800;
  margin: 4px 0;
  color: var(--text);
}

.wallet-balance small {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.redeem-row {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  margin-top: 6px;
}

.admin-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.form-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 110px;
}

.form-grow {
  flex: 1;
}

.generated-box {
  margin-top: 12px;
  padding: 10px;
  background: var(--accent-soft);
  border-radius: 10px;
}

.code-textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 8px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.email-bind-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
}

.email-bind-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.email-bind-row .btn {
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--surface-subtle);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-head h3 {
  margin: 0;
}

.icon-close {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg);
  padding: 4px;
  border-radius: 9px;
  margin-bottom: 14px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.link-btn {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

.link-btn-center {
  align-self: center;
  margin-top: 2px;
}

.auth-fields-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reset-code-row {
  margin: 0;
}

.reset-code-row .btn {
  white-space: nowrap;
}

.turnstile-wrap {
  display: flex;
  justify-content: center;
  min-height: 65px;
}

.auth-tab {
  border: none;
  background: transparent;
  padding: 7px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
}

.auth-tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-hint {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface-subtle);
  font-size: 12px;
  color: var(--text-muted);
}

.toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #18181b;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.toast.error {
  background: var(--danger);
}

.toast.success {
  background: var(--success);
}

/* ===== 数据看板与任务日志 ===== */
.analytics-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.analytics-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.analytics-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.analytics-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.analytics-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.analytics-select {
  width: auto;
  min-width: 150px;
  height: 34px;
  padding: 4px 10px;
}

.analytics-custom-range {
  margin-bottom: 14px;
  padding: 12px 16px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kpi-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.kpi-icon-blue { background: #eff6ff; color: #2563eb; }
.kpi-icon-green { background: #ecfdf5; color: #059669; }
.kpi-icon-purple { background: #f5f3ff; color: #7c3aed; }
.kpi-icon-cyan { background: #ecfeff; color: #0891b2; }
.kpi-icon-amber { background: #fffbeb; color: #d97706; }

.kpi-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.kpi-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.kpi-sub-admin {
  margin-top: 2px;
  padding-top: 4px;
  border-top: 1px dashed var(--border);
}

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-center { text-align: center; }

.chart-panel {
  margin-bottom: 14px;
}

.chart-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.chart-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chart-title-group h3 {
  margin: 0;
}

.chart-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-green { background: #10b981; }
.dot-purple { background: #8b5cf6; }

.chart-sub-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 4px 0 6px;
}

.chart-stage {
  position: relative;
  width: 100%;
  height: 320px;
}

.chart-canvas {
  width: 100%;
  height: 100%;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.55);
}

.model-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-color-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.model-name-main {
  font-weight: 600;
  color: var(--text);
}

.model-id-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-family: ui-monospace, Consolas, monospace;
}

/* 任务日志筛选与表格 */
.logs-filter-panel {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.logs-filter-grid {
  display: grid;
  grid-template-columns: 2.1fr 1.5fr 1fr 0.8fr;
  gap: 10px;
  align-items: center;
}

.logs-date-range {
  display: flex;
  align-items: center;
  gap: 6px;
}

.logs-date-range .text-input {
  flex: 1;
  min-width: 0;
}

.logs-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.logs-summary-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.summary-chip strong {
  color: var(--text);
}

.chip-blue { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.chip-purple { border-color: #ddd6fe; background: #f5f3ff; color: #6d28d9; }
.chip-cyan { border-color: #a5f3fc; background: #ecfeff; color: #0e7490; }
.chip-amber { border-color: #fde68a; background: #fffbeb; color: #b45309; }
.chip-green { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.chip-red { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }

.logs-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.toolbar-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 4px;
}

.logs-table-panel {
  padding-bottom: 12px;
}

.logs-table th {
  white-space: nowrap;
}

.nowrap-cell {
  white-space: nowrap;
}

.id-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mono-id,
.mono-text {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
}

.copy-mini-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 11px;
  cursor: pointer;
}

.copy-mini-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.type-model-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.model-name-inline {
  font-weight: 600;
  color: var(--text);
}

.cell-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tag-type-video {
  background: #eef2ff;
  color: #4338ca;
}

.tag-type-text {
  background: #ecfeff;
  color: #0e7490;
}

.status-progress-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 106px;
}

.mini-progress-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-progress-track {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.bar-success { background: #10b981; }
.bar-danger { background: #ef4444; }
.bar-running { background: #4f46e5; }

.mini-progress-num {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 32px;
}

.artifact-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.logs-empty-cell {
  padding: 54px 16px !important;
  text-align: center !important;
  border-bottom: none !important;
}

.logs-empty-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.logs-empty-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.logs-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.logs-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.logs-page-meta,
.logs-page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-size-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.page-size-select {
  width: auto;
  height: 30px;
  padding: 2px 8px;
}

.page-indicator {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 0 4px;
}

/* 任务详情弹窗 */
.modal-card-wide {
  max-width: 720px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.log-detail-body {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 4px;
}

.detail-top-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-model-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.detail-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.detail-kv {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
}

.detail-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.detail-video-player {
  width: 100%;
  max-height: 360px;
  border-radius: 10px;
  background: #0f172a;
}

.detail-pre {
  margin: 0;
  padding: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 240px;
  overflow-y: auto;
}

.detail-summary-box {
  padding: 10px 12px;
  background: var(--accent-soft);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
}

.detail-alert {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.detail-alert-error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #fecaca;
}

.detail-alert-warn {
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid #fde68a;
}

@media (max-width: 1180px) {
  .topbar {
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 10px;
  }

  .workspace-switcher {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .ws-switch-btn {
    flex: 1;
    justify-content: center;
  }

  .topbar-utility {
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .studio-grid {
    grid-template-columns: 1fr;
  }

  .wallet-hero,
  .admin-two-col,
  .stats-grid,
  .kpi-grid,
  .logs-filter-grid,
  .detail-kv-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .ws-switch-badge,
  .topbar-divider,
  .tpl-quick-label,
  .tpl-quick-sep {
    display: none;
  }

  .ws-switch-btn {
    padding: 7px 10px;
  }

  .ws-switch-title {
    font-size: 14px;
  }

  .main-container {
    padding: 12px 12px 24px;
  }
}


/* ================= 商业图片创作台（原创横向矩阵 + 三步投递舱 + 暗房蓝图与作品墙） ================= */
.mt-4 {
  margin-top: 4px;
}

/* 商业图片创作台：全屏三栏大工作台（左栏草稿 + 中栏宽敞操作台 + 右栏预览与历史） */
.img-center-panel {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  min-width: 0;
  gap: 8px;
}

.img-center-header {
  margin-bottom: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.img-active-cat-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #4f46e5;
  color: #ffffff;
}

.img-active-mode-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
}

/* 通用高对比度清晰按钮（彻底告别暗色低对比模糊按钮） */
.btn-outline-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn-outline-clear:hover:not(:disabled) {
  border-color: #6366f1;
  background: #eef2ff;
  color: #3730a3;
}

.btn-outline-clear.btn-xs {
  height: 29px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 7px;
}

.btn-outline-clear.btn-sm {
  height: 33px;
  padding: 0 12px;
  font-size: 12.5px;
}

.btn-outline-clear.is-fav {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #b45309;
}

.btn-vip-import {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1.5px solid #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.14);
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.btn-vip-import:hover:not(:disabled) {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #d97706;
  color: #78350f;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.2);
}

.btn-vip-import.btn-sm {
  height: 33px;
  padding: 0 11px;
  font-size: 12.5px;
}

.img-draft-out-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
}

.director-session-snippet {
  font-size: 11.5px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 商业管线顶部浮层与单行快捷切换条（对标视频创作台） */
.img-pipeline-popover {
  right: 0;
  left: auto;
  width: min(680px, 90vw);
  max-height: min(74vh, 560px);
  overflow-y: auto;
  z-index: 48;
}

.img-quick-pipeline-strip {
  margin-bottom: 2px;
}

.img-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.img-cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.img-cat-tab small {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: inherit;
}

.img-cat-tab:hover {
  border-color: #6366f1;
  color: #3730a3;
}

.img-cat-tab.active {
  background: #18181b;
  border-color: #18181b;
  color: #ffffff;
}

.img-cat-tab.active small {
  background: rgba(255, 255, 255, 0.22);
}

.img-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 9px;
}

.img-mode-tile {
  text-align: left;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1.5px solid #dbe2ef;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-inline-size: 0;
  transition: border-color 0.16s, background-color 0.16s, box-shadow 0.16s, transform 0.14s;
}

.img-mode-tile:hover {
  border-color: #818cf8;
  background: #fafbff;
  transform: translateY(-1px);
}

.img-mode-tile.active {
  border-color: #4f46e5;
  border-width: 2px;
  background: linear-gradient(135deg, #eef2ff 0%, #f8faff 100%);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.14);
}

.img-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.img-tile-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.img-mode-tile.active .img-tile-icon {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}

.img-tile-icon svg {
  width: 17px;
  height: 17px;
  display: block;
}

.img-tile-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.img-mode-tile.active .img-tile-tag {
  background: #4f46e5;
  color: #ffffff;
}

.img-tile-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}

.img-tile-sub {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: clip;
}

/* 多轮图文对话气泡流视口（对标视频台对话流，出图后自动展开） */
.img-thread-viewport {
  flex: 1 1 auto;
  min-height: 230px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.img-thread-viewport.hidden {
  display: none !important;
}

.img-turn-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.img-turn-user-row {
  display: flex;
  justify-content: flex-end;
}

.img-turn-user-bubble {
  max-width: min(86%, 650px);
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  background: linear-gradient(135deg, #2e2a7b 0%, #4338ca 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(49, 46, 129, 0.16);
}

.img-turn-user-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 5px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.85);
}

.img-turn-user-meta strong {
  color: #ffffff;
  font-weight: 800;
}

.img-turn-mode-chip {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #e0e7ff;
  font-size: 11px;
  font-weight: 700;
}

.img-turn-lock-pill {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.24);
  border: 1px solid rgba(110, 231, 183, 0.5);
  color: #d1fae5;
  font-size: 11px;
  font-weight: 700;
}

.img-turn-batch-pill {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #ffffff;
}

.img-turn-time {
  margin-left: auto;
  font-size: 11px;
  opacity: 0.78;
  font-variant-numeric: tabular-nums;
}

.img-turn-user-text {
  font-size: 13.5px;
  line-height: 1.58;
  white-space: pre-wrap;
  word-break: break-word;
}

.img-turn-user-text .muted-text {
  color: rgba(224, 231, 255, 0.88);
}

.img-turn-user-text mark.prompt-ref-mark {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
}

.img-turn-ref-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.img-turn-ref-item {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(15, 23, 42, 0.4);
  cursor: zoom-in;
}

.img-turn-ref-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-turn-ref-item span {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.img-turn-result-row {
  display: flex;
  justify-content: flex-start;
}

.img-turn-result-card {
  width: min(94%, 660px);
  padding: 12px 14px;
  border-radius: 14px 14px 14px 4px;
  background: #ffffff;
  border: 1.5px solid #dbe2ef;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.img-turn-result-card.is-active-base {
  border-color: #4f46e5;
  border-width: 2px;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.13);
}

.img-turn-result-card.is-batch-card {
  width: min(98%, 920px);
}

.img-turn-batch-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.img-turn-batch-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .img-turn-batch-grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .img-turn-batch-grid,
  .img-turn-batch-grid.cols-3 {
    grid-template-columns: 1fr;
  }
}

.img-turn-batch-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 11px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.img-turn-batch-item.is-item-base {
  border-color: #4f46e5;
  background: #eef2ff;
  box-shadow: 0 3px 12px rgba(79, 70, 229, 0.12);
}

.img-turn-batch-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.img-turn-batch-item-head strong {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
}

.img-turn-batch-item .img-turn-result-media {
  min-height: 136px;
  max-height: 220px;
}

.img-turn-batch-item .img-turn-result-media img {
  max-height: 204px;
}

.img-turn-batch-item .img-turn-actions {
  gap: 5px;
}

.img-turn-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.img-turn-result-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.img-turn-result-title strong {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

.img-turn-result-title span {
  font-size: 12px;
  color: #64748b;
}

.img-turn-base-badge {
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #a5b4fc;
  color: #3730a3;
}

.img-turn-result-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  min-height: 150px;
  max-height: 256px;
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.14) 1px, transparent 0) 0 0 / 16px 16px,
    linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  cursor: zoom-in;
}

.img-turn-result-media img {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.img-turn-zoom-badge {
  position: absolute;
  right: 9px;
  bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
}

.img-turn-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.img-turn-running-box {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.img-turn-running-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: #334155;
}

.img-turn-error-box {
  padding: 10px 12px;
  border-radius: 9px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* 连续追改与首轮人脸防变脸状态栏 */
.img-iter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 10px;
  border-radius: 9px;
  background: linear-gradient(90deg, #eef2ff 0%, #f8fafc 100%);
  border: 1px solid #c7d2fe;
  flex-shrink: 0;
}

.img-iter-banner-left,
.img-iter-banner-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.img-iter-mode-pill {
  font-size: 12.5px;
  font-weight: 800;
  color: #1e1b4b;
}

.img-face-lock-toggle {
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #94a3b8;
  background: #ffffff;
  color: #475569;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.img-face-lock-toggle.is-locked {
  border-color: #10b981;
  background: #ecfdf5;
  color: #047857;
}

.img-face-lock-toggle:hover {
  filter: brightness(0.97);
}

/* 一体化核心创作舱（首次出图前撑满主舞台；进入多轮对话后自动收拢为紧凑追改底坞） */
.img-unified-composer-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.img-unified-composer-stage.is-iterating {
  flex: 0 0 auto;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px solid #dbe2ef;
  background: #ffffff;
  box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.03);
}

.img-unified-composer-stage.is-iterating .img-compact-media-bar {
  padding: 7px 9px;
  gap: 6px;
}

.img-unified-composer-stage.is-iterating .img-main-prompt-section {
  flex: 0 0 auto;
  min-height: 0;
  gap: 6px;
}

.img-unified-composer-stage.is-iterating .img-editor-wrap {
  flex: 0 0 auto;
  min-height: 78px;
}

.img-unified-composer-stage.is-iterating .prompt-textarea.img-prompt-box,
.img-unified-composer-stage.is-iterating .prompt-textarea.img-prompt-box.has-highlight-mirror,
.img-unified-composer-stage.is-iterating .prompt-highlight-backdrop.img-highlight-backdrop {
  flex: 0 0 auto;
  min-height: 78px;
  max-height: 156px;
  padding: 10px 14px;
  font-size: 14.5px;
  line-height: 1.6;
}

.img-mini-card.is-base-anchor .img-mini-media {
  border-color: #6366f1;
  border-width: 2px;
}

.img-mini-card.is-face-anchor .img-mini-media {
  border-color: #10b981;
  border-width: 2px;
}

.img-mini-caption.is-locked-cap {
  color: #312e81;
  font-weight: 800;
}

.img-compact-media-bar {
  flex-shrink: 0;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1.5px dashed #cbd5e1;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.img-compact-media-bar.dragover {
  border-color: #4f46e5;
  background: #eef2ff;
}

.img-compact-slots-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px 1px 3px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.img-compact-slots-strip:empty {
  display: none;
}

.img-mini-slot-empty {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 58px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1.5px dashed #94a3b8;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.img-mini-slot-empty:hover,
.img-mini-slot-empty.dragover {
  border-color: #4f46e5;
  background: #eef2ff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.12);
}

.img-mini-slot-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #4f46e5;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.img-mini-slot-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.img-mini-slot-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.img-mini-slot-head {
  display: flex;
  align-items: center;
  gap: 5px;
}

.img-mini-slot-head strong {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.img-mini-req {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  white-space: nowrap;
}

.img-mini-req.is-req {
  background: #e0e7ff;
  color: #3730a3;
}

.img-mini-slot-sub {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}

.img-mini-slot-vip {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #b45309;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.img-mini-slot-vip:hover {
  border-color: #d97706;
  background: #fde68a;
}

.img-mini-card {
  flex: 0 0 80px;
  width: 80px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.img-mini-card.dragover .img-mini-media {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.25);
}

.img-mini-media {
  position: relative;
  width: 80px;
  height: 58px;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  cursor: zoom-in;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.img-mini-media:hover {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.22);
}

.img-mini-card.is-over-limit .img-mini-media {
  border-color: #ef4444;
}

.img-mini-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.16s ease;
}

.img-mini-media:hover img {
  transform: scale(1.05);
}

.img-mini-cite {
  position: absolute;
  left: 4px;
  bottom: 4px;
  z-index: 2;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid rgba(199, 210, 254, 0.78);
  background: rgba(30, 27, 75, 0.88);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  transition: background-color 0.14s ease, transform 0.12s ease;
}

.img-mini-cite:hover {
  background: #4f46e5;
  transform: scale(1.04);
}

.img-mini-cite.is-over {
  background: rgba(185, 28, 28, 0.94);
  border-color: #fca5a5;
}

.img-mini-del {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 2;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.img-mini-del:hover {
  background: #dc2626;
}

.img-mini-caption {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.img-mini-note-input {
  width: 100%;
  height: 22px;
  padding: 0 5px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 11px;
  outline: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.img-mini-note-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.img-mini-add-tile {
  flex: 0 0 64px;
  width: 64px;
  height: 58px;
  border-radius: 8px;
  border: 1.5px dashed #94a3b8;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.img-mini-add-tile:hover {
  border-color: #4f46e5;
  background: #eef2ff;
  color: #4338ca;
}

.img-mini-add-plus {
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.img-mini-add-txt {
  font-size: 11px;
  font-weight: 700;
}

.img-mini-free-empty {
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px dashed #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.img-mini-free-empty:hover {
  border-color: #6366f1;
  background: #eef2ff;
  color: #3730a3;
}

.img-media-actions-bar #imgFeatureHintText {
  max-width: 390px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.img-slot-counter-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-variant-numeric: tabular-nums;
}

.img-slot-counter-pill.is-over-limit {
  background: #fee2e2;
  color: #b91c1c;
}

.img-char-counter {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

/* 主舞台大尺寸提示词编辑区（自动撑满剩余高度） */
.img-main-prompt-section {
  flex: 1 1 auto;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.img-prompt-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.img-prompt-top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.img-prompt-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.img-prompt-label {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.img-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.img-quick-chip {
  height: 27px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.img-quick-chip:hover {
  border-color: #6366f1;
  background: #eef2ff;
  color: #3730a3;
}

.img-quick-chip.is-used {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
  font-weight: 700;
}

.img-editor-wrap {
  flex: 1 1 auto;
  min-height: 210px;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #f9fafd;
  border-radius: 13px;
}

.img-editor-wrap:focus-within {
  background: #ffffff;
}

.prompt-textarea.img-prompt-box,
.prompt-textarea.img-prompt-box.has-highlight-mirror,
.prompt-highlight-backdrop.img-highlight-backdrop {
  width: 100%;
  flex: 1 1 auto;
  height: 100%;
  min-height: 210px;
  max-height: none;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.68;
  border-radius: 13px;
  resize: none;
}

.prompt-textarea.img-prompt-box {
  border: 1.5px solid #cbd5e1;
}

.prompt-textarea.img-prompt-box:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* 底部模型规格折叠浮层内容（对标视频创作台） */
.img-composer-toolbar {
  flex-shrink: 0;
  padding-top: 2px;
}

.img-prefs-popover {
  width: min(520px, 90vw);
  max-height: min(76vh, 560px);
}

.img-prefs-popover-body {
  margin-bottom: 10px;
}

.img-sub-label {
  font-size: 12.5px;
  font-weight: 800;
  color: #334155;
  margin: 10px 0 6px;
}

.img-engine-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.img-engine-card {
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid #dbe2ef;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.img-engine-card:hover {
  border-color: #818cf8;
  background: #ffffff;
}

.img-engine-card.active {
  border-color: #4f46e5;
  border-width: 2px;
  background: #eef2ff;
  box-shadow: 0 3px 12px rgba(79, 70, 229, 0.12);
}

.img-engine-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.img-engine-top strong {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

.img-engine-price {
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
}

.img-engine-desc {
  margin-top: 4px;
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
}

.img-ratio-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.img-ratio-pills.img-toolbar-ratios {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  min-height: 38px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}

.img-ratio-pill {
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.img-toolbar-ratios .img-ratio-pill {
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
}

.img-ratio-pill:hover {
  border-color: #6366f1;
  background: #eef2ff;
  color: #3730a3;
}

.img-ratio-pill.active,
.img-toolbar-ratios .img-ratio-pill.active {
  border-color: #18181b;
  background: #18181b;
  color: #ffffff;
}

.img-count-pills.img-toolbar-counts {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 38px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}

.img-toolbar-counts .img-count-pill {
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.img-toolbar-counts .img-count-pill:hover {
  background: #eef2ff;
  color: #3730a3;
}

.img-toolbar-counts .img-count-pill.active {
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.24);
}

.img-size-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

@media (max-width: 560px) {
  .img-size-cards {
    grid-template-columns: 1fr;
  }
}

.img-size-card {
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.img-size-card:hover {
  border-color: #818cf8;
  background: #ffffff;
}

.img-size-card.active {
  border-color: #4f46e5;
  border-width: 2px;
  background: #eef2ff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.12);
}

.img-size-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.img-size-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

.img-size-cost {
  font-size: 12px;
  font-weight: 800;
  color: #4338ca;
}

.img-size-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 3px;
  line-height: 1.35;
}

/* 右侧舞台：已传参考图页面内即时切换胶囊 */
.img-stage-ref-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
}

.img-stage-ref-pill {
  height: 27px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}

.img-stage-ref-pill:hover {
  border-color: #6366f1;
  background: #eef2ff;
  color: #3730a3;
}

.img-stage-ref-pill.active {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #ffffff;
}

/* 右栏：高清预览区与历史记录卡片 */
.img-stage-box {
  border: 1.5px solid #dbe2ef;
  background: #0f172a;
}

.img-stage-canvas {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  min-height: 250px;
  max-height: 360px;
  cursor: zoom-in;
  background:
    radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.14) 1px, transparent 0) 0 0 / 18px 18px,
    linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

.stage-result-img {
  max-width: 100%;
  max-height: 332px;
  border-radius: 10px;
  object-fit: contain;
  display: block;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.img-stage-zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 600;
  pointer-events: none;
}

.stage-meta.img-stage-meta-card {
  background: #ffffff;
  color: #0f172a;
  border-top: 1px solid #e2e8f0;
  padding: 12px 14px;
}

.stage-meta.img-stage-meta-card .stage-prompt {
  color: #1e293b;
  font-size: 13px;
  margin-bottom: 10px;
}

.img-stage-subprompt {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.img-stage-actions-bar {
  gap: 8px;
}

.img-spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 12px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: #818cf8;
  border-radius: 50%;
  animation: imgSpin 0.8s linear infinite;
}

@keyframes imgSpin {
  to {
    transform: rotate(360deg);
  }
}

/* 右栏生图历史记录横卡（同视频历史列表统一风格） */
.img-rtask-card {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  content-visibility: auto;
  contain-intrinsic-size: auto 108px;
  contain: layout style;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.img-rtask-card:hover {
  border-color: #818cf8;
  background: #fafbff;
}

.img-rtask-card.active {
  border-color: #4f46e5;
  background: #eef2ff;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.12);
}

.img-rtask-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.img-rtask-thumb {
  width: 68px;
  height: 68px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  flex-shrink: 0;
  display: block;
  background: #0f172a;
}

.img-rtask-thumb.is-placeholder {
  display: grid;
  place-items: center;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
}

.img-rtask-thumb.is-placeholder.is-fail {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.img-rtask-body {
  flex: 1;
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.task-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.img-rtask-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-prompt-snippet {
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: clip;
}

.task-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.task-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* 原寸大图放大检视灯箱 */
dialog.native-dialog.img-lightbox-dialog {
  width: min(1080px, calc(100vw - 28px));
  max-height: min(92vh, 940px);
}

.img-lightbox-viewport {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  flex: 1 1 auto;
}

.img-lightbox-canvas {
  flex: 1 1 auto;
  min-height: 320px;
  max-height: calc(92vh - 150px);
  overflow: auto;
  border-radius: 12px;
  background: #0f172a;
  padding: 16px;
  display: grid;
  place-items: center;
}

.img-lightbox-canvas img {
  max-width: 100%;
  max-height: calc(92vh - 186px);
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

.img-lightbox-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.img-lightbox-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-type-image {
  background: #fdf2f8;
  color: #db2777;
  border: 1px solid #fbcfe8;
}

.detail-image-box {
  background: #0f172a;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.detail-image-preview {
  max-width: 100%;
  max-height: 380px;
  border-radius: 8px;
  object-fit: contain;
}

@media (max-width: 1560px) {
  .ws-switch-badge {
    display: none;
  }

  .ws-switch-btn {
    padding: 6px 13px 6px 9px;
    gap: 8px;
  }
}

.vip-crown-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #78350f;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  margin-right: 5px;
  white-space: nowrap;
}

.tag-gold {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.btn-vip-lib {
  color: #92400e;
  background: #fffbeb;
  border-color: #fcd34d;
  font-weight: 600;
}

.btn-vip-lib:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #78350f;
}

.img-step-head-right,
.img-wall-head-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.history-sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.seg-compact .seg-btn {
  padding: 4px 9px;
  font-size: 12px;
}

.seg-compact small {
  font-size: 11px;
  opacity: 0.85;
  margin-left: 2px;
}

.history-head-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.task-item-badges {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.task-item-mini-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.task-mini-btn {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.task-mini-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.task-mini-btn.task-dl-btn {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

.task-mini-btn.task-dl-btn:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}

.task-mini-btn.is-fav,
.is-fav-btn {
  color: #b45309 !important;
  background: #fffbeb !important;
  border-color: #fcd34d !important;
}

/* 原生模态框统一规范（阻断底层页面滚动穿透，不改动根滚动条防跳动） */
dialog.native-dialog:not([open]) {
  display: none !important;
}

dialog.native-dialog {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  background: var(--surface);
  color: var(--text);
  width: min(520px, calc(100vw - 28px));
  max-height: min(88vh, 880px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  overscroll-behavior: contain;
}

dialog.native-dialog.modal-card-wide {
  width: min(980px, calc(100vw - 28px));
}

dialog.native-dialog[open].modal-card-wide {
  display: flex;
  flex-direction: column;
}

dialog.native-dialog::backdrop {
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(4px);
  overflow: hidden;
  overscroll-behavior: contain;
}

/* 资产中心主页面 */
.assets-page-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.assets-hero-panel {
  padding: 16px 20px;
}

.assets-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.assets-sec-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border-radius: 12px;
  background: #eef1f7;
  border: 1px solid #d5dce8;
  flex-wrap: wrap;
}

.assets-sec-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.assets-sec-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.assets-sec-tab.active {
  background: #18181b;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.18);
}

.assets-sec-tab.is-vip-tab.active {
  background: linear-gradient(135deg, #1c1917 0%, #451a03 100%);
  border-color: #b45309;
}

.assets-sec-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.14);
  color: #4338ca;
}

.assets-sec-tab.active .assets-sec-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.assets-sec-badge.vip {
  background: #fef3c7;
  color: #92400e;
}

.assets-sec-tab.active .assets-sec-badge.vip {
  background: #f59e0b;
  color: #1c1917;
}

.assets-right-status {
  flex: 1;
  min-width: 290px;
  display: flex;
  justify-content: flex-end;
}

.assets-retention-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.assets-retention-copy {
  display: flex;
  flex-direction: column;
  font-size: 12.5px;
}

.assets-retention-copy span {
  font-size: 11.5px;
  color: var(--text-muted);
}

.assets-quota-deck {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 560px;
  justify-content: flex-end;
}

.assets-quota-info {
  flex: 1;
  min-width: 220px;
}

.assets-quota-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  margin-bottom: 6px;
}

.assets-quota-track {
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: clip;
}

.assets-quota-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  transition: width 0.25s ease;
}

.assets-quota-fill.is-warn {
  background: linear-gradient(90deg, #ea580c, #c2410c);
}

.assets-quota-fill.is-danger {
  background: linear-gradient(90deg, #ef4444, #b91c1c);
}

.assets-upload-cta-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.assets-drop-strip {
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: 11px;
  border: 1.5px dashed #f59e0b;
  background: linear-gradient(90deg, #fffbeb 0%, #fefce8 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.assets-drop-strip:hover,
.assets-drop-strip.dragover {
  background: #fef3c7;
  border-color: #d97706;
}

.assets-drop-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: #78350f;
}

.assets-drop-left span {
  font-size: 11.5px;
  color: #92400e;
}

.assets-drop-note-box {
  width: min(290px, 100%);
}

.assets-toolbar-panel {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.assets-type-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.assets-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.assets-search-input {
  width: 260px;
  max-width: 100%;
}

.assets-batch-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.assets-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 15px;
}

.asset-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  content-visibility: auto;
  contain-intrinsic-size: auto 340px;
  contain: layout style;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.assets-load-more-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 0 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.asset-card:hover {
  border-color: #a5b4fc;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.asset-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.22);
}

.asset-media-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0f1219;
  cursor: pointer;
  overflow: hidden;
}

.asset-card-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.asset-play-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 11px;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.asset-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #cbd5e1;
  font-size: 12.5px;
}

.asset-audio-stage {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 35%, #292524 0%, #0c0a09 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.asset-audio-wave {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  height: 26px;
}

.asset-audio-wave span {
  width: 4px;
  border-radius: 999px;
  background: #fbbf24;
  height: 14px;
}

.asset-audio-wave span:nth-child(2),
.asset-audio-wave span:nth-child(4) {
  height: 24px;
}

.asset-audio-wave span:nth-child(3) {
  height: 18px;
}

.asset-audio-stage .asset-audio-play-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fef3c7;
  border-color: rgba(251, 191, 36, 0.45);
}

.asset-top-overlays {
  position: absolute;
  inset: 8px 8px auto 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.asset-overlays-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

.asset-check-wrap {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.asset-overlay-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  backdrop-filter: blur(5px);
}

.asset-overlay-pill.is-video {
  background: rgba(67, 56, 202, 0.88);
  color: #ffffff;
}

.asset-overlay-pill.is-image {
  background: rgba(15, 118, 110, 0.88);
  color: #ffffff;
}

.asset-overlay-pill.is-audio {
  background: rgba(180, 83, 9, 0.9);
  color: #ffffff;
}

.asset-overlay-pill.is-ttl {
  background: rgba(15, 23, 42, 0.78);
  color: #f1f5f9;
}

.asset-overlay-pill.is-urgent {
  background: rgba(185, 28, 28, 0.9);
  color: #ffffff;
}

.asset-overlay-pill.is-perm {
  background: rgba(217, 119, 6, 0.92);
  color: #ffffff;
}

.asset-card-body {
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.asset-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.asset-card-title {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-card-time {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.asset-card-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.asset-card-prompt {
  font-size: 12px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}

.asset-card-note-row {
  min-height: 24px;
  display: flex;
  align-items: center;
}

.asset-note-chip {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.asset-edit-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 11.5px;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
}

.asset-card-actions {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

/* 普通用户点击贵宾常驻参考素材库时的专属锁定介绍卡 */
.assets-vip-gate-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 36px 32px;
  background: linear-gradient(140deg, #12131a 0%, #231b12 60%, #171721 100%);
  color: #f8fafc;
  border: 1px solid rgba(245, 158, 11, 0.42);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16);
}

.assets-vip-gate-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.4);
  margin-bottom: 12px;
}

.assets-vip-gate-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  color: #fef3c7;
}

.assets-vip-gate-desc {
  margin: 0 0 22px;
  max-width: 780px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.65;
}

.assets-vip-perks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.assets-vip-perk {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.assets-vip-perk strong {
  color: #fde68a;
  font-size: 14px;
}

.assets-vip-perk span {
  color: #cbd5e1;
  font-size: 12.5px;
}

.assets-vip-gate-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.assets-vip-contact-tip {
  font-size: 13px;
  color: #fcd34d;
}

.assets-empty-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 48px 24px;
  text-align: center;
}

.assets-empty-icon {
  font-size: 34px;
  margin-bottom: 8px;
}

.assets-empty-btns {
  margin-top: 16px;
  display: inline-flex;
  gap: 10px;
}

/* 大屏检视弹窗、常驻库选片抽屉弹窗与全量视频历史弹窗 */
.asset-lightbox-stage {
  background: #090b10;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  place-items: center;
  max-height: 62vh;
  overflow: hidden;
}

.asset-lightbox-media {
  max-width: 100%;
  max-height: 58vh;
  border-radius: 8px;
  object-fit: contain;
}

.asset-lightbox-foot {
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.asset-lightbox-prompt {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 680px;
  max-height: 90px;
  overflow-y: auto;
}

.asset-picker-toolbar,
.vh-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--border);
}

.vh-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.vh-search-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.asset-picker-grid {
  padding: 14px 0 6px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 12px;
  max-height: 56vh;
  overflow-y: auto;
}

.asset-picker-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 0;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.asset-picker-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.14);
}

.asset-picker-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0f172a;
  display: grid;
  place-items: center;
}

.asset-picker-thumb img,
.asset-picker-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.picker-audio-thumb {
  color: #fde68a;
  font-size: 13px;
  font-weight: 700;
}

.asset-picker-meta {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.asset-picker-meta strong {
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-picker-meta span {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-picker-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 36px 16px;
}

.vh-list-body {
  max-height: 55vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
}

.vh-row {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.vh-row-main {
  flex: 1;
  min-width: 260px;
}

.vh-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  font-size: 13px;
}

.vh-row-prompt {
  font-size: 12.5px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vh-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* 运营管理后台：用户搜索与属性扩容弹窗 */
.admin-users-head {
  flex-wrap: wrap;
  gap: 10px;
}

.admin-user-search-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-user-search-input {
  width: 190px;
}

.admin-user-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.admin-attr-user-banner {
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mb-8 {
  margin-bottom: 8px;
}


/* 任务关联参考素材缩略图条（近期记录、预览台与全量历史弹窗） */
.task-ref-mini-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.ref-mini-thumb {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0f172a;
  display: inline-block;
  flex-shrink: 0;
}

.ref-mini-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ref-mini-thumb em {
  position: absolute;
  right: 1px;
  bottom: 1px;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  padding: 1px 3px;
  border-radius: 3px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
}

.ref-mini-chip {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
}

.ref-mini-chip.is-audio {
  background: #fffbeb;
  color: #92400e;
  border-color: #fcd34d;
}

.ref-mini-chip.is-video {
  background: #ecfdf5;
  color: #065f46;
  border-color: #6ee7b7;
}

.ref-mini-more,
.task-ref-expired-tip {
  font-size: 11px;
  color: var(--text-muted);
}

.stage-ref-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}

.stage-ref-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.stage-ref-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.stage-ref-item {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: #0f172a;
  display: inline-block;
  flex-shrink: 0;
}

.stage-ref-item img,
.stage-ref-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stage-ref-item em {
  position: absolute;
  left: 2px;
  bottom: 2px;
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.1;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(55, 48, 163, 0.88);
  color: #ffffff;
}

.stage-ref-chip {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  text-decoration: none;
}

.stage-ref-chip.is-audio {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.stage-ref-expired-chip,
.stage-ref-expired {
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

/* ======================== 资产中心升级：近期任务素材按视频成组 + 四维常驻素材库 ======================== */
.assets-drop-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.assets-drop-select {
  width: auto;
  min-width: 162px;
  background: #ffffff;
}

.assets-drop-note-input {
  width: 240px;
  max-width: 100%;
  background: #ffffff;
}

.lib-breadcrumb-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
}

.batch-mini-select {
  width: auto;
  min-width: 142px;
  height: 30px;
  padding: 2px 26px 2px 9px;
  font-size: 12px;
}

.assets-lib-layout {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.assets-lib-sidebar {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 76px;
}

.lib-side-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lib-side-group + .lib-side-group {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.lib-side-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.lib-side-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0 6px;
  margin-bottom: 2px;
}

.lib-side-title-row .lib-side-title {
  margin-bottom: 0;
}

.lib-new-folder-btn {
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.lib-new-folder-btn:hover {
  background: #fef3c7;
}

.lib-side-item {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.14s ease, color 0.14s ease;
}

.lib-side-item:hover:not(.active) {
  background: var(--surface-subtle);
  color: var(--text);
}

.lib-side-item.active {
  background: #eef2ff;
  color: #3730a3;
  font-weight: 700;
}

.lib-side-item small {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted);
  flex-shrink: 0;
}

.lib-side-item.active small {
  background: #4f46e5;
  color: #ffffff;
}

.lib-folder-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.assets-lib-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.folder-active-banner {
  padding: 14px 16px;
  border-radius: 13px;
  background: linear-gradient(135deg, #18181b 0%, #292524 100%);
  color: #f8fafc;
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.folder-active-left {
  display: flex;
  align-items: center;
  gap: 11px;
}

.folder-active-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.36);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.folder-active-left strong {
  display: block;
  font-size: 15px;
  color: #fef3c7;
}

.folder-active-left .muted-text {
  color: #cbd5e1;
  font-size: 12px;
}

.folder-active-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.folder-active-banner .btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: #f8fafc;
}

.folder-active-banner .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.asset-overlay-pill.is-cat {
  background: rgba(15, 23, 42, 0.78);
  color: #fde68a;
}

.asset-tags-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.asset-folder-chip {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: #eef2ff;
  color: #3730a3;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-unfiled-chip {
  font-size: 11.5px;
  color: var(--text-muted);
}

.asset-used-works-btn {
  border: 1px solid #c7d2fe;
  background: #f5f7ff;
  color: #4338ca;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.asset-used-works-btn:hover {
  background: #e0e7ff;
  border-color: #818cf8;
}

.asset-unused-tag {
  font-size: 11px;
  color: var(--text-muted);
}

/* 近期任务素材按视频成组视图 */
.task-mat-groups-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-mat-group-card {
  padding: 16px;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.task-mat-anchor {
  display: flex;
  gap: 12px;
  padding-right: 16px;
  border-right: 1px dashed var(--border);
}

.task-mat-anchor-thumb {
  position: relative;
  width: 112px;
  height: 144px;
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid var(--border);
  flex-shrink: 0;
  cursor: pointer;
}

.task-mat-anchor-thumb video,
.task-mat-anchor-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.task-mat-anchor-thumb .asset-overlay-pill {
  position: absolute;
  left: 6px;
  top: 6px;
}

.task-mat-anchor-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #cbd5e1;
  font-size: 12px;
  padding: 8px;
  text-align: center;
}

.task-mat-anchor-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.task-mat-anchor-title {
  font-size: 13.5px;
  color: var(--text);
}

.task-mat-anchor-prompt {
  font-size: 12px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.task-mat-anchor-btns {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-vip-lib {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #f59e0b;
  color: #92400e;
  font-weight: 700;
}

.btn-vip-lib:hover {
  background: #fde68a;
  border-color: #d97706;
}

.task-mat-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
  gap: 10px;
}

.tm-item-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tm-item-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0f172a;
  overflow: hidden;
}

.tm-item-thumb img,
.tm-item-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tm-audio-box {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 40%, #292524 0%, #0c0a09 100%);
}

.tm-audio-box .asset-audio-play-btn {
  color: #fef3c7;
  border-color: rgba(251, 191, 36, 0.45);
}

.tm-tag-badge {
  position: absolute;
  left: 6px;
  top: 6px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(55, 48, 163, 0.9);
  color: #ffffff;
}

.tm-ttl-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.76);
  color: #e2e8f0;
}

.tm-item-meta {
  padding: 8px 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.tm-item-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-item-note {
  font-size: 11px;
  color: #92400e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-item-foot {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  flex-wrap: wrap;
}

.tm-saved-pill {
  font-size: 10.5px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  padding: 1px 6px;
  border-radius: 5px;
  max-width: 96px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tm-mini-save-btn,
.tm-mini-use-btn {
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  cursor: pointer;
}

.tm-mini-save-btn {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.tm-mini-save-btn:hover {
  background: #fef3c7;
}

.tm-mini-use-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 选片弹窗文件夹筛选与关联成片弹窗 */
.asset-picker-right-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.asset-picker-folder-select {
  width: auto;
  min-width: 175px;
}

.save-task-mat-summary {
  padding: 10px 12px;
  border-radius: 9px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 13px;
  font-weight: 600;
}

.linked-works-list {
  padding: 12px 0 4px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  max-height: 58vh;
  overflow-y: auto;
}

.linked-work-item {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.linked-work-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0f172a;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.linked-work-media video,
.linked-work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.linked-work-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.linked-work-info strong {
  font-size: 13px;
  color: var(--text);
}

@media (max-width: 980px) {
  .assets-lib-layout {
    grid-template-columns: 1fr;
  }

  .assets-lib-sidebar {
    position: static;
  }

  .task-mat-group-card {
    grid-template-columns: 1fr;
  }

  .task-mat-anchor {
    padding-right: 0;
    padding-bottom: 12px;
    border-right: none;
    border-bottom: 1px dashed var(--border);
  }
}

/* 生成任务实时百分比与原生 <progress> 进度条 */
.tag,
.img-wall-badge,
.mini-progress-num {
  font-variant-numeric: tabular-nums;
}

progress.ui-progress {
  --progress-bar-radius: 999px;
  --progress-bar-track: rgba(255, 255, 255, 0.14);
  --progress-bar-fill: linear-gradient(90deg, #6366f1, #818cf8, #38bdf8);
  appearance: none;
  border: 0 solid;
  overflow: clip;
  display: block;
  width: 100%;
  height: 7px;
  border-radius: var(--progress-bar-radius);
  background: var(--progress-bar-track);
}

progress.ui-progress::-webkit-progress-bar {
  background: transparent;
}

progress.ui-progress::-webkit-progress-value {
  background: var(--progress-bar-fill);
  border-radius: var(--progress-bar-radius);
  transition: inline-size 0.35s ease;
}

progress.ui-progress::-moz-progress-bar {
  background: var(--progress-bar-fill);
  border-radius: var(--progress-bar-radius);
  transition: inline-size 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
  progress.ui-progress::-webkit-progress-value {
    transition: none;
  }
  progress.ui-progress::-moz-progress-bar {
    transition: none;
  }
}

.stage-progress-box {
  width: min(100%, 340px);
  margin: 12px auto 10px;
  text-align: left;
}

.stage-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.stage-progress-sub {
  font-size: 12px;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}

.stage-progress-pct {
  font-size: 14px;
  font-weight: 700;
  color: #a5b4fc;
  font-variant-numeric: tabular-nums;
}

.stage-progress-bar {
  height: 8px;
}

.task-card-progress {
  --progress-bar-track: #e5e7eb;
  --progress-bar-fill: linear-gradient(90deg, #4f46e5, #0ea5e9);
  height: 4px;
  margin: 6px 0 8px;
}

.img-wall-run-inner {
  width: 100%;
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.img-spinner-sm {
  width: 22px;
  height: 22px;
  margin: 0 auto 2px;
  border-width: 2.5px;
}

.img-wall-progress {
  width: 84%;
  height: 5px;
}

/* ============================================================================
   对话式智能编导共创工作台（多轮提意见精修 + 分镜卡片确认生成闭环）
   ============================================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.director-sidebar-panel {
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  gap: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fafd 100%);
}

.director-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.director-sidebar-title-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.director-sidebar-title-group h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.sidebar-collapse-btn {
  width: 28px;
  height: 28px;
  font-size: 15px;
  line-height: 1;
}

.director-new-draft-btn {
  height: 38px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  background: linear-gradient(135deg, #18181b 0%, #3730a3 100%);
  box-shadow: 0 3px 10px rgba(49, 46, 129, 0.18);
}

.director-new-draft-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #27272a 0%, #4338ca 100%);
}

.director-sidebar-search {
  flex-shrink: 0;
}

.sidebar-search-input {
  height: 34px;
  padding: 0 10px;
  font-size: 12.5px;
  border-radius: 9px;
  background: #f8fafc;
}

.director-studio-panel {
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  min-width: 0;
}

.preview-panel {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  min-width: 0;
}

.preview-panel .history-section {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

@media (min-width: 1181px) {
  .director-sidebar-panel,
  .director-studio-panel,
  .preview-panel {
    height: calc(100vh - 96px);
    height: calc(100dvh - 96px);
    min-height: 660px;
    max-height: none;
    overflow: hidden;
  }

  .img-center-panel {
    height: calc(100vh - 96px);
    height: calc(100dvh - 96px);
    min-height: 660px;
    max-height: none;
    overflow: visible;
  }

  .director-chat-viewport {
    min-height: 220px;
  }
}

@media (min-width: 1181px) and (max-width: 1480px) {
  .studio-grid {
    grid-template-columns: 252px minmax(470px, 1.42fr) minmax(370px, 0.92fr);
    gap: 12px;
  }
}

@media (max-width: 1180px) {
  .director-sidebar-panel .director-sessions-list {
    max-height: 250px;
  }
}

.director-panel-header {
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.director-head-left,
.director-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.director-current-session-pill {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 11px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.director-session-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: #4f46e5;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.director-session-count.is-empty {
  background: #cbd5e1;
  color: #475569;
}

.director-sessions-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-right: 2px;
}

.director-sessions-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.director-session-item {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 5px 5px 5px 7px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: #ffffff;
  content-visibility: auto;
  contain-intrinsic-size: auto 74px;
  contain: layout style;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.director-session-item:hover {
  border-color: #a5b4fc;
  background: #fafbff;
}

.director-session-item.is-active {
  border-color: #6366f1;
  border-left: 3.5px solid #4f46e5;
  background: linear-gradient(135deg, #eef2ff 0%, #f8faff 100%);
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.1);
}

.director-session-select-btn {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  text-align: left;
  padding: 4px 5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.director-session-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.director-session-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.director-session-time {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.director-session-badges-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.director-session-ver-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e0e7ff;
  color: #4338ca;
}

.director-session-draft-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.director-session-draft-pill.is-sub {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.director-session-video-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
}

.director-session-media-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.director-session-item-sub {
  display: flex;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.director-session-item-sub span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.director-session-del-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  width: 24px;
  border-radius: 7px;
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.65;
}

.director-session-del-btn:hover {
  opacity: 1;
  background: var(--danger-soft);
  color: var(--danger);
}

.director-tpl-anchor {
  margin-bottom: 0;
}

.director-tpl-popover {
  right: 0;
  left: auto;
  width: min(560px, 88vw);
}

.btn-director-outline {
  border: 1px solid #a5b4fc;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 600;
}

.btn-director-outline:hover {
  background: #e0e7ff;
  border-color: #6366f1;
}

.director-quick-tpl-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  border-radius: 9px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  overflow-x: auto;
  flex-shrink: 0;
}

.director-chat-viewport {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px;
  border-radius: 13px;
  background: linear-gradient(180deg, #f9fafd 0%, #f3f5fb 100%);
  border: 1px solid #e2e8f0;
  margin-bottom: 10px;
}

.director-empty-welcome {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px 16px;
}

.director-welcome-emblem {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  color: #4338ca;
  border: 1px solid #c7d2fe;
  margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.12);
}

.director-welcome-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.director-welcome-sub {
  margin: 0 0 18px;
  max-width: 640px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.director-angle-grid {
  width: 100%;
  max-width: 780px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 680px) {
  .director-angle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.director-angle-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid #dbe2ef;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.director-angle-card:hover {
  transform: translateY(-1px);
  border-color: #6366f1;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.director-angle-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
}

.director-angle-desc {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-muted);
}

.director-msg-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.director-msg-row {
  display: flex;
  width: 100%;
}

.director-msg-row.is-user {
  justify-content: flex-end;
}

.director-msg-row.is-assistant {
  justify-content: flex-start;
}

.director-bubble.user-bubble {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  background: linear-gradient(135deg, #1e1b4b 0%, #3730a3 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(30, 27, 75, 0.18);
}

.director-user-text {
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.director-bubble.user-bubble .media-ref-chip {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}

.director-user-time {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(224, 231, 255, 0.78);
  text-align: right;
}

.director-bubble.assistant-bubble {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #dce3f0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.director-msg-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}

.director-role-badge {
  font-size: 12px;
  font-weight: 700;
  color: #3730a3;
  background: #eef2ff;
  padding: 2px 9px;
  border-radius: 999px;
}

.director-credit-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.director-assistant-reply {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  margin-bottom: 10px;
}

.director-media-warn-banner {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.55;
  white-space: pre-wrap;
}

.director-discussion-tip {
  margin-top: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  font-size: 12px;
  color: var(--text-secondary);
}

.director-script-card {
  border-radius: 12px;
  border: 1px solid #d1d9e8;
  background: #fbfcff;
  padding: 11px 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.director-script-card.is-active-version {
  border: 1.5px solid #6366f1;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.09);
}

.director-script-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.director-script-ver-group,
.director-script-card-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.director-ver-badge {
  font-size: 13px;
  font-weight: 700;
  color: #1e1b4b;
}

.director-card-summary {
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef2ff;
  border: 1px solid #dbe4ff;
  font-size: 12.5px;
  line-height: 1.55;
  color: #1e293b;
  margin-bottom: 9px;
}

.director-shots-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.director-shot-row {
  padding: 7px 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e5eaf3;
  border-left: 3px solid #6366f1;
}

.director-shot-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.director-shot-no {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
  background: #18181b;
  color: #ffffff;
}

.director-shot-time {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 5px;
  background: #eef2ff;
  color: #4338ca;
  font-variant-numeric: tabular-nums;
}

.director-shot-title {
  font-size: 12.5px;
  color: var(--text);
}

.director-shot-snippet {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.director-shot-detail-block {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.director-shot-detail-block.is-sub {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed #e2e8f0;
}

.director-shot-subtag {
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #334155;
  letter-spacing: 0.02em;
}

.director-shot-subtag.is-cam {
  background: #eff6ff;
  color: #1d4ed8;
}

.director-shot-subtag.is-snd {
  background: #f0fdf4;
  color: #15803d;
}

.director-shot-fulltext {
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.director-shot-speech {
  margin-top: 4px;
  font-size: 12px;
  color: #0f766e;
  font-weight: 500;
}

.director-raw-fallback,
.director-raw-drawer-body {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.director-raw-drawer {
  margin-top: 9px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f8fafc;
  border: 1px solid var(--border);
  max-height: 300px;
  overflow-y: auto;
}

.director-raw-drawer-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #4338ca;
  margin-bottom: 5px;
}

.director-edit-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.director-edit-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.director-card-confirm-bar {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.director-card-spec-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
}

.director-spec-link-btn {
  border: none;
  background: transparent;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.director-confirm-gen-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 9px;
  white-space: nowrap;
}

.director-iterate-tip {
  margin-top: 8px;
  font-size: 11.5px;
  color: #4338ca;
  background: #eef2ff;
  padding: 5px 9px;
  border-radius: 7px;
}

/* 底部一体化大气输入舱（100% 铺满中栏全宽，告别局促半宽与矮框） */
.director-composer-dock,
.upload-zone.director-composer-dock {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  gap: 11px;
  padding: 15px 18px;
  border-radius: 18px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, padding 0.16s ease;
}

.upload-zone.director-composer-dock.is-iterating {
  gap: 8px;
  padding: 11px 16px;
}

.director-composer-dock:focus-within,
.upload-zone.director-composer-dock:focus-within {
  border-color: #6366f1;
  box-shadow: 0 10px 32px rgba(79, 70, 229, 0.13);
}

.director-media-bar {
  width: 100%;
  margin-bottom: 0;
  padding-bottom: 9px;
  border-bottom: 1px solid #eef1f6;
}

.upload-zone.director-composer-dock.is-iterating .director-media-bar {
  padding-bottom: 7px;
}

/* 紧凑单行素材胶囊条（不挤压分镜脚本框，同时完整保留看图、插入引用、增删素材） */
.director-media-compact-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
}

.director-compact-chips {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.director-compact-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 2px 6px 2px 3px;
  border-radius: 999px;
  border: 1px solid #dbe2ef;
  background: #f8fafc;
  transition: border-color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
}

.director-compact-pill:hover {
  border-color: #818cf8;
  background: #eef2ff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.1);
}

.director-compact-pill.is-warn {
  border-color: #f59e0b;
  background: #fffbeb;
}

.compact-thumb-box {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #e2e8f0;
  cursor: zoom-in;
}

.compact-thumb-box img,
.compact-thumb-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.compact-audio-btn {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: none;
  background: #0ea5e9;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.compact-cite-btn {
  border: none;
  background: transparent;
  padding: 0 3px;
  font-size: 12.5px;
  font-weight: 700;
  color: #3730a3;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}

.director-compact-pill.is-warn .compact-cite-btn {
  color: #b45309;
}

.compact-cite-btn:hover {
  color: #4f46e5;
  text-decoration: underline;
}

.compact-note-snip {
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: #64748b;
  background: rgba(255, 255, 255, 0.8);
  padding: 1px 5px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
}

.compact-del-btn {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  padding: 0;
}

.compact-del-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

.director-compact-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.director-compact-actions .btn,
.director-bar-toggle-btn {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
}

.director-bar-toggle-btn {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.director-bar-toggle-btn:hover {
  border-color: #6366f1;
  background: #e0e7ff;
}

.director-media-expanded-wrap {
  width: 100%;
}

/* 展开态改为单行横向胶片滑轨，杜绝多图折行撑爆底部高度 */
.director-upload-thumbs {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  max-height: none;
  gap: 10px;
  margin-bottom: 9px;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.director-upload-thumbs:empty {
  display: none;
  margin-bottom: 0;
  padding: 0;
}

.director-upload-thumbs .thumb-item {
  flex: 0 0 104px;
  width: 104px;
  gap: 4px;
}

.director-upload-thumbs .thumb-card {
  width: 104px;
  height: 78px;
  border-radius: 9px;
}

.director-upload-thumbs .thumb-filename {
  font-size: 11px;
}

.director-upload-thumbs .thumb-note-input {
  height: 26px;
  font-size: 11.5px;
  padding: 0 6px;
  border-radius: 7px;
}

.director-media-actions {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.director-media-actions .upload-quick-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.director-media-actions .upload-quick-btns .btn {
  height: 31px;
  padding: 0 11px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
}

.director-media-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.director-media-limit {
  font-size: 11.5px;
  color: var(--text-muted);
}

.director-media-bar .segmented-xs .seg-btn {
  padding: 4px 10px;
  font-size: 12px;
}

.director-input-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.upload-zone.director-composer-dock.is-iterating .director-input-form {
  gap: 8px;
}

.director-editor-wrap {
  width: 100%;
  margin-bottom: 0;
  background: #f9fafd;
  border-radius: 13px;
  transition: background 0.15s ease;
}

.director-editor-wrap:focus-within {
  background: #ffffff;
}

.prompt-textarea.director-chat-textarea,
.prompt-textarea.director-chat-textarea.has-highlight-mirror,
.prompt-highlight-backdrop.director-highlight-backdrop {
  width: 100%;
  min-height: 72px;
  max-height: 250px;
  padding: 12px 15px;
  font-size: 15px;
  line-height: 1.64;
  border-radius: 13px;
}

.prompt-textarea.director-chat-textarea {
  border: 1.5px solid #dbe2ef;
}

.prompt-textarea.director-chat-textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.director-composer-toolbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.director-toolbar-left,
.director-toolbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.video-prefs-anchor {
  position: relative;
}

.video-prefs-trigger {
  display: inline-flex;
  align-items: center;
  height: 38px;
  gap: 7px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.video-prefs-trigger:hover,
.video-prefs-trigger.is-open {
  border-color: #6366f1;
  background: #eef2ff;
  color: #3730a3;
}

.prefs-price-chip {
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.director-composer-toolbar .mention-quick-btn {
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}

.director-char-count {
  font-size: 12px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  padding: 0 4px;
  user-select: none;
}

.director-char-count.is-warn {
  color: #d97706;
  font-weight: 600;
}

.director-char-count.is-limit {
  color: #dc2626;
  font-weight: 700;
}

.director-composer-toolbar .director-select {
  height: 38px;
  padding: 0 30px 0 13px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
}

.video-prefs-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 48;
  width: min(520px, 88vw);
  max-height: min(74vh, 620px);
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22);
}

.video-prefs-grid {
  margin-top: 10px;
  margin-bottom: 10px;
}

.video-prefs-cost {
  margin-bottom: 0;
}

.btn-deep-director-toggle {
  display: inline-flex;
  align-items: center;
  height: 38px;
  gap: 6px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.16s ease;
}

.btn-deep-director-toggle:hover:not(:disabled) {
  border-color: #818cf8;
  background: #f5f3ff;
  color: #4338ca;
}

.btn-deep-director-toggle .deep-toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #94a3b8;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.btn-deep-director-toggle .deep-toggle-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.btn-deep-director-toggle.is-active {
  border-color: #7c3aed;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  color: #5b21b6;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.16), 0 3px 10px rgba(109, 40, 217, 0.14);
}

.btn-deep-director-toggle.is-active .deep-toggle-dot {
  background: #7c3aed;
  box-shadow: 0 0 6px rgba(124, 58, 237, 0.85);
}

.btn-deep-director-toggle.is-active .deep-toggle-badge {
  background: #7c3aed;
  color: #ffffff;
}

.btn-deep-director-toggle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-director-send {
  display: inline-flex;
  align-items: center;
  height: 40px;
  gap: 8px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid #312e81;
  background: linear-gradient(135deg, #18181b 0%, #3730a3 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(49, 46, 129, 0.24);
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease, background 0.16s ease;
}

.btn-director-send.is-deep-mode {
  border-color: #6d28d9;
  background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 55%, #b45309 100%);
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.34);
}

.btn-director-send:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(49, 46, 129, 0.32);
}

.btn-director-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.send-arrow {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
}

.director-manual-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

dialog.native-dialog:modal {
  overscroll-behavior: contain;
}

dialog.native-dialog.modal-card-confirm {
  width: min(460px, calc(100vw - 28px));
  padding: 20px 22px;
}

.confirm-dialog-heading {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.confirm-dialog-sub {
  margin: 6px 0 12px;
  font-size: 12.5px;
  line-height: 1.55;
}

.confirm-task-summary {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.confirm-task-meta-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  margin-bottom: 5px;
}

.confirm-task-meta-snippet {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  word-break: break-word;
}

.confirm-dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.confirm-cost-highlight {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #4338ca;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.director-head-gen-btn {
  font-weight: 700;
  white-space: nowrap;
}

.director-inline-ready-card {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px solid #c7d2fe;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.director-inline-ready-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 200px;
  flex: 1 1 240px;
}

.director-inline-ready-info strong {
  font-size: 13px;
  color: var(--text);
}

.director-inline-ready-info span {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 顶部导航公告按钮与站内更新公告原生模态框 */
.announcement-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  color: #3730a3;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  font-weight: 700;
}

.announcement-nav-btn:hover {
  background: #e0e7ff;
  border-color: #818cf8;
  color: #312e81;
}

.ann-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22);
  flex-shrink: 0;
}

dialog.native-dialog.modal-card-announcement {
  width: min(680px, calc(100vw - 28px));
  max-height: min(86vh, 780px);
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #dbe2ef;
}

dialog.native-dialog[open].modal-card-announcement {
  display: flex;
  flex-direction: column;
}

.ann-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 24px 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.ann-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ann-modal-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}

.ann-modal-meta {
  font-size: 12.5px;
  color: #64748b;
}

.ann-rich-body {
  padding: 20px 26px;
  overflow-y: auto;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.72;
  color: #1e293b;
}

.ann-sec-title {
  margin: 10px 0 4px;
  padding: 6px 12px;
  border-left: 3.5px solid #4f46e5;
  background: #f5f7ff;
  border-radius: 0 8px 8px 0;
  font-size: 15.5px;
  font-weight: 800;
  color: #1e1b4b;
  line-height: 1.45;
}

.ann-sec-title:first-child {
  margin-top: 0;
}

.ann-bullet-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ann-bullet-item {
  line-height: 1.72;
  color: #334155;
}

.ann-bullet-item strong {
  color: #0f172a;
  font-weight: 700;
}

.ann-paragraph {
  margin: 0;
  line-height: 1.72;
  color: #334155;
}

.ann-code-pill {
  display: inline-block;
  padding: 1px 7px;
  margin: 0 2px;
  border-radius: 6px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
}

.ann-modal-foot {
  padding: 14px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.ann-foot-hint {
  font-size: 12.5px;
  color: #64748b;
}

/* 商业图片创作台：多参考图统一 @图片1~@图片16 点击引用角标与备注输入 */
.img-editor-wrap {
  position: relative;
}

.img-slot-counter-pill.is-over-limit {
  background: #fee2e2;
  color: #b91c1c;
}

/* 全站通用参考图与多媒体放大预览交互与画廊灯箱 */
[data-zoom-media-url] {
  cursor: zoom-in !important;
}

.director-shot-body mark.prompt-ref-mark,
.stage-prompt mark.prompt-ref-mark,
.task-mat-anchor-prompt mark.prompt-ref-mark {
  cursor: zoom-in;
  transition: filter 0.14s ease, transform 0.12s ease;
}

.director-shot-body mark.prompt-ref-mark:hover,
.stage-prompt mark.prompt-ref-mark:hover,
.task-mat-anchor-prompt mark.prompt-ref-mark:hover {
  filter: brightness(0.93);
}

.tm-item-thumb[data-zoom-media-url]:hover img,
.tm-item-thumb[data-zoom-media-url]:hover video,
.thumb-card[data-zoom-media-url]:hover img,
.thumb-card[data-zoom-media-url]:hover video,
.stage-ref-item[data-zoom-media-url]:hover img,
.ref-mini-thumb[data-zoom-media-url]:hover img {
  transform: scale(1.04);
  transition: transform 0.16s ease;
}

.stage-ref-item[data-zoom-media-url]:hover,
.ref-mini-thumb[data-zoom-media-url]:hover {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.tm-zoom-hint {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.tm-item-thumb:hover .tm-zoom-hint {
  opacity: 1;
}

.thumb-zoom-hint {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 11px;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.thumb-card:hover .thumb-zoom-hint,
.img-mini-media:hover .thumb-zoom-hint {
  opacity: 1;
}

.asset-picker-thumb {
  position: relative;
}

.picker-zoom-trigger {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  cursor: zoom-in;
  z-index: 2;
  transition: background-color 0.14s ease, transform 0.12s ease;
}

.picker-zoom-trigger:hover {
  background: #4f46e5;
  transform: scale(1.05);
}

dialog.native-dialog.global-media-lightbox {
  width: min(1140px, calc(100vw - 24px));
  max-height: min(94vh, 960px);
  padding: 16px 20px;
  gap: 12px;
}

.gmlb-head {
  margin-bottom: 0;
  flex-shrink: 0;
}

.gmlb-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.gmlb-title-wrap h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  color: #0f172a;
}

.gmlb-counter-pill {
  padding: 2px 10px;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.gmlb-stage-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 360px;
  max-height: calc(94vh - 140px);
  border-radius: 14px;
  background:
    radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.14) 1px, transparent 0) 0 0 / 20px 20px,
    linear-gradient(180deg, #0b0f19 0%, #151c2c 100%);
  border: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gmlb-canvas {
  width: 100%;
  height: 100%;
  max-height: calc(94vh - 142px);
  overflow: auto;
  padding: 16px 54px;
  display: grid;
  place-items: center;
}

.gmlb-media-img {
  max-width: 100%;
  max-height: calc(94vh - 178px);
  object-fit: contain;
  display: block;
  border-radius: 8px;
  cursor: zoom-in;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
}

.gmlb-canvas.is-actual-size {
  place-items: start center;
  padding: 16px;
}

.gmlb-canvas.is-actual-size .gmlb-media-img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

.gmlb-media-video {
  max-width: 100%;
  max-height: calc(94vh - 178px);
  border-radius: 8px;
  background: #000000;
  display: block;
}

.gmlb-audio-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 24px;
}

.gmlb-audio-icon {
  font-size: 48px;
}

.gmlb-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
  transition: background-color 0.15s ease, transform 0.14s ease;
}

.gmlb-nav-btn:hover {
  background: #4f46e5;
  border-color: #818cf8;
  transform: translateY(-50%) scale(1.06);
}

.gmlb-prev {
  left: 12px;
}

.gmlb-next {
  right: 12px;
}

.gmlb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.gmlb-meta {
  font-size: 13px;
  color: #475569;
}

.gmlb-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 原图后台并发上传实时进度覆盖层 */
.thumb-upload-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}

.thumb-upload-overlay.is-error {
  background: rgba(127, 29, 29, 0.82);
  pointer-events: auto;
}

.thumb-upload-mini-track {
  width: 82%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}

.thumb-upload-mini-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  border-radius: 999px;
  transition: width 0.14s ease;
}

.thumb-retry-btn {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 7px;
  cursor: pointer;
}

.thumb-retry-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.compact-upload-pct {
  font-size: 10.5px;
  font-weight: 700;
  color: #4f46e5;
  font-variant-numeric: tabular-nums;
}

.compact-upload-pct.is-err {
  color: #dc2626;
}







/* ==================== 独立「团队报表（员工每日工作量与成片抽检）」 ==================== */
.wl-page-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wl-top-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.wl-top-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wl-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.wl-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wl-day-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wl-export-anchor {
  position: relative;
}

.wl-export-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
  padding: 6px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wl-export-item {
  border: none;
  background: transparent;
  text-align: left;
  padding: 9px 11px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.14s ease;
}

.wl-export-item:hover {
  background: var(--surface-subtle);
}

.wl-export-item strong {
  font-size: 13px;
  color: var(--text);
}

.wl-export-item span {
  font-size: 11.5px;
  color: var(--text-muted);
}

.wl-filter-panel {
  padding: 10px 14px;
  margin-bottom: 0;
}

.wl-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wl-custom-dates {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wl-date-input {
  width: 142px;
  padding: 6px 9px;
  font-size: 12.5px;
}

.wl-select {
  min-width: 156px;
  max-width: 240px;
  padding: 6px 10px;
  font-size: 12.5px;
}

.wl-keyword-input {
  width: 190px;
  padding: 6px 10px;
  font-size: 12.5px;
}

.wl-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.wl-check-pill input {
  margin: 0;
  accent-color: var(--accent);
}

.wl-filter-spacer {
  flex: 1;
}

.wl-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.wl-kpi-card {
  padding: 13px 14px;
  gap: 5px;
}

.wl-kpi-card .kpi-value {
  font-size: 21px;
}

.wl-kpi-card .kpi-value small {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.wl-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.wl-zero-pill {
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #b45309;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.14s ease, transform 0.12s ease;
}

.wl-zero-pill:hover,
.wl-zero-pill.is-active {
  background: #f59e0b;
  border-color: #d97706;
  color: #ffffff;
}

.wl-all-active-pill {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
}

.wl-charts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr);
  gap: 12px;
}

.wl-chart-card {
  margin-bottom: 0;
  padding: 13px 15px;
}

.wl-chart-stage {
  height: 244px;
}

.wl-chart-canvas {
  height: 244px;
}

.wl-table-panel {
  margin-bottom: 0;
  padding: 12px 14px;
}

.wl-table-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 9px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  font-size: 12.5px;
}

.wl-table th.wl-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.wl-table th.wl-sortable:hover {
  color: var(--accent);
}

.wl-sort-ind {
  color: var(--accent);
  font-weight: 700;
  margin-left: 2px;
}

.wl-user-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wl-user-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.wl-medal {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.wl-rank-num {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

.wl-zero-row td {
  background: rgba(254, 243, 199, 0.36);
}

.wl-zero-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.wl-metric-link {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.wl-metric-link:hover {
  text-decoration: underline;
}

.wl-share-track {
  width: 88px;
  height: 5px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  margin-top: 4px;
}

.wl-share-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #4f46e5);
}

.wl-share-fill.is-green {
  background: linear-gradient(90deg, #10b981, #059669);
}

.wl-rate-high {
  color: #059669;
  font-weight: 600;
}

.wl-rate-mid {
  color: #d97706;
  font-weight: 600;
}

.wl-rate-low {
  color: #dc2626;
  font-weight: 600;
}

/* 员工成片与任务抽检弹窗 */
.wl-works-dialog {
  width: min(1140px, 95vw);
  max-width: 1140px;
  max-height: 90vh;
  padding: 18px 20px;
}

.wl-works-head {
  margin-bottom: 10px;
}

.wl-works-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.wl-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  max-height: 62vh;
  overflow-y: auto;
  padding: 2px 4px 6px 2px;
}

.wl-work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.wl-work-thumb-box {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0f172a;
  cursor: pointer;
  overflow: hidden;
}

.wl-work-thumb-box img,
.wl-work-thumb-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wl-zoom-chip {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.76);
  color: #ffffff;
}

.wl-work-fail-box {
  aspect-ratio: 16 / 10;
  background: #fef2f2;
  color: #991b1b;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
}

.wl-work-fail-box.is-neutral {
  background: var(--surface-subtle);
  color: var(--text-muted);
  align-items: center;
  text-align: center;
}

.wl-work-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.wl-work-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.wl-work-spec {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wl-work-prompt {
  font-size: 12px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
}

.wl-work-foot {
  margin-top: auto;
  padding-top: 7px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
}

.wl-works-pager {
  margin-top: 12px;
}

@media (max-width: 1420px) {
  .wl-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .wl-charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .wl-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* 企业后台直达团队报表横幅 ＋ 顶栏窄视口自适应防挤压 */
.org-report-entry-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px 18px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: linear-gradient(90deg, #eef2ff 0%, #f5f3ff 60%, #faf5ff 100%);
  border: 1px solid #c7d2fe;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.06);
}

.org-report-entry-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.org-report-entry-copy strong {
  font-size: 14.5px;
  color: #1e1b4b;
}

.org-report-entry-copy span {
  font-size: 12.5px;
  color: #4338ca;
}

.team-report-nav-tab {
  color: #4338ca;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.08);
}

.team-report-nav-tab:hover {
  background: rgba(99, 102, 241, 0.16);
  color: #312e81;
}

@media (max-width: 1680px) {
  .topbar {
    flex-wrap: wrap;
    padding: 8px 16px;
    gap: 8px 12px;
  }

  .topbar-utility {
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }

  .sub-nav-tab {
    padding: 5px 8px;
    font-size: 12.5px;
  }
}
