/* =========================================================
   项目工作台（对齐 tv.qinjor.com 项目页）
   ========================================================= */
:root {
  --dash-bg: #0c0c10;
  --dash-top: #101014;
  --dash-panel: #16161c;
  --dash-panel-2: #1b1b22;
  --dash-border: #24242b;
  --dash-border-soft: #1f1f26;
  --dash-text: #f4f4f5;
  --dash-muted: #8b8b96;
  --dash-subtle: #6b6b76;
  --dash-primary: #6366f1;
  --dash-primary-soft: rgba(99, 102, 241, 0.14);
  --dash-dashed: #3b3b44;
}

html[data-theme="light"] {
  --bg-page: #f5f6fa;
  --bg-card: #ffffff;
  --bg-inner: #f1f2f7;
  --bg-hover: #e9eaf2;
  --border-color: #e4e6ef;
  --border-muted: #d7d9e4;
  --text-primary: #17181f;
  --text-bright: #000000;
  --text-muted: #5d6072;
  --text-subtle: #8a8d9f;

  --dash-bg: #f5f6fa;
  --dash-top: #ffffff;
  --dash-panel: #ffffff;
  --dash-panel-2: #f1f2f7;
  --dash-border: #e4e6ef;
  --dash-border-soft: #eceef5;
  --dash-text: #17181f;
  --dash-muted: #6b6f80;
  --dash-subtle: #9a9daf;
  --dash-primary-soft: rgba(99, 102, 241, 0.1);
  --dash-dashed: #d3d5e0;
}

.dash-page {
  min-height: 100vh;
  background: var(--dash-bg);
  color: var(--dash-text);
}

/* ---------- 顶部栏 ---------- */
.dash-top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 56px;
  padding: 0 20px;
  background: var(--dash-top);
  border-bottom: 1px solid var(--dash-border-soft);
}

.dash-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dash-text);
  flex-shrink: 0;
}

.dash-brand img {
  width: 26px;
  height: 26px;
  display: block;
  border-radius: 7px;
}

.dash-brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.dash-version {
  color: var(--dash-subtle);
  font-size: 11px;
  align-self: flex-end;
  margin-bottom: 2px;
}

.dash-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
}

.dash-nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 100%;
  padding: 0 10px;
  border: none;
  background: none;
  color: var(--dash-muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.dash-nav-item svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-nav-item:hover {
  color: var(--dash-text);
}

.dash-nav-item.is-active {
  color: var(--dash-primary);
}

.dash-nav-item.is-active::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--dash-primary);
}

.dash-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.dash-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  min-width: 32px;
  padding: 0 7px;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  background: transparent;
  color: var(--dash-muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.dash-icon-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-icon-btn:hover {
  color: var(--dash-text);
  border-color: var(--dash-muted);
  background: var(--dash-panel-2);
}

.dash-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--dash-panel-2);
  color: var(--dash-muted);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

/* 主题图标切换 */
.dash-icon-btn .icon-moon {
  display: none;
}

html[data-theme="light"] .dash-icon-btn .icon-sun {
  display: none;
}

html[data-theme="light"] .dash-icon-btn .icon-moon {
  display: block;
}

/* ---------- 用户菜单 ---------- */
.dash-user {
  position: relative;
}

.dash-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 6px 0 4px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--dash-text);
  cursor: pointer;
  transition: background 0.2s ease;
}

.dash-user-btn:hover {
  background: var(--dash-panel-2);
}

.dash-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  flex-shrink: 0;
}

.dash-user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.dash-chevron {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--dash-muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: 210px;
  padding: 6px;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  background: var(--dash-panel);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.45);
}

.dash-menu[hidden] {
  display: none;
}

.dash-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--dash-border-soft);
}

.dash-menu-name {
  font-size: 13px;
  font-weight: 600;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.dash-menu-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--dash-text);
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.dash-menu-item:hover {
  background: var(--dash-panel-2);
}

.dash-menu-item.is-danger {
  color: #f87171;
}

.dash-menu-divider {
  height: 1px;
  margin: 4px 2px;
  background: var(--dash-border-soft);
}

/* ---------- 工具条 ---------- */
.dash-toolbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 20px 16px;
}

.dash-toolbar-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.dash-toolbar-hint {
  color: var(--dash-subtle);
  font-size: 12px;
  font-weight: 400;
}

.dash-search {
  position: relative;
  flex: 1 1 auto;
  max-width: 420px;
  margin-left: auto;
}

.dash-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--dash-subtle);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.dash-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--dash-border);
  border-radius: 9px;
  background: var(--dash-panel);
  color: var(--dash-text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dash-search input::placeholder {
  color: var(--dash-subtle);
}

.dash-search input:focus {
  border-color: var(--dash-primary);
  box-shadow: 0 0 0 3px var(--dash-primary-soft);
}

.dash-search input::-webkit-search-cancel-button {
  filter: grayscale(1);
}

.dash-filter-wrap {
  position: relative;
  flex-shrink: 0;
}

.dash-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  border: none;
  background: none;
  color: var(--dash-muted);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.dash-filter:hover {
  color: var(--dash-text);
}

.dash-filter svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-filter-menu {
  width: 150px;
}

/* ---------- 主区域 ---------- */
.dash-main {
  padding: 0 20px 20px;
}

.dash-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: calc(100vh - 200px);
  border: 1.5px dashed var(--dash-dashed);
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.02);
}

.dash-empty[hidden] {
  display: none;
}

.dash-empty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: var(--dash-panel-2);
  color: var(--dash-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.dash-empty-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.dash-empty-btn:hover {
  background: var(--dash-primary-soft);
  color: var(--dash-primary);
  transform: scale(1.05);
}

.dash-empty-label {
  color: var(--dash-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.dash-grid[hidden] {
  display: none;
}

.dash-card {
  position: relative;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  background: var(--dash-panel);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-card:hover {
  border-color: rgba(99, 102, 241, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.dash-card-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  font-size: 38px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.02em;
}

.dash-card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), transparent 55%);
}

.cover-0 { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.cover-1 { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.cover-2 { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.cover-3 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.cover-4 { background: linear-gradient(135deg, #10b981, #0ea5e9); }
.cover-5 { background: linear-gradient(135deg, #6366f1, #22d3ee); }
.cover-6 { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.cover-7 { background: linear-gradient(135deg, #334155, #6366f1); }

.dash-card-body {
  padding: 12px 14px 14px;
}

.dash-card-name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-card-meta {
  margin-top: 5px;
  color: var(--dash-subtle);
  font-size: 11px;
}

.dash-card-more {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 7px;
  background: rgba(10, 10, 14, 0.55);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.dash-card:hover .dash-card-more,
.dash-card-more:focus-visible {
  opacity: 1;
}

.dash-card-more:hover {
  background: rgba(10, 10, 14, 0.8);
}

.dash-card-menu {
  position: absolute;
  top: 40px;
  right: 8px;
  z-index: 5;
  width: 132px;
  padding: 5px;
  border: 1px solid var(--dash-border);
  border-radius: 9px;
  background: var(--dash-panel);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
}

.dash-card-menu[hidden] {
  display: none;
}

/* ---------- 创作助手 ---------- */
.dash-assistant {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(99, 102, 241, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-assistant svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.dash-assistant:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(99, 102, 241, 0.5);
}

.dash-assistant-panel {
  position: fixed;
  right: 24px;
  bottom: 84px;
  z-index: 36;
  display: flex;
  flex-direction: column;
  width: min(360px, calc(100vw - 32px));
  height: min(460px, calc(100vh - 140px));
  border: 1px solid var(--dash-border);
  border-radius: 16px;
  background: var(--dash-panel);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.dash-assistant-panel[hidden] {
  display: none;
}

.dash-assistant-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--dash-border-soft);
  font-size: 14px;
  font-weight: 600;
}

.dash-assistant-close {
  border: none;
  background: none;
  color: var(--dash-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.dash-assistant-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  overflow-y: auto;
}

.dash-assistant-msg {
  max-width: 86%;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
}

.dash-assistant-msg.is-bot {
  align-self: flex-start;
  background: var(--dash-panel-2);
  color: var(--dash-text);
  border-bottom-left-radius: 4px;
}

.dash-assistant-msg.is-user {
  align-self: flex-end;
  background: var(--dash-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.dash-assistant-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--dash-border-soft);
}

.dash-assistant-form input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--dash-border);
  border-radius: 9px;
  background: var(--dash-panel-2);
  color: var(--dash-text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.dash-assistant-form input:focus {
  border-color: var(--dash-primary);
}

.dash-assistant-form button {
  flex-shrink: 0;
  height: 38px;
  padding: 0 14px;
  border: none;
  border-radius: 9px;
  background: var(--dash-primary);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

/* ---------- 弹窗 ---------- */
.dash-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.62);
}

.dash-modal[hidden] {
  display: none;
}

.dash-modal-dialog {
  width: min(400px, 100%);
  padding: 24px;
  border: 1px solid var(--dash-border);
  border-radius: 14px;
  background: var(--dash-panel);
  box-shadow: 0 30px 72px rgba(0, 0, 0, 0.5);
}

.dash-modal-title {
  font-size: 17px;
  font-weight: 600;
}

.dash-modal-sub {
  margin-top: 6px;
  color: var(--dash-muted);
  font-size: 12px;
  line-height: 1.6;
}

.dash-modal-input {
  width: 100%;
  height: 42px;
  margin-top: 16px;
  padding: 0 12px;
  border: 1px solid var(--dash-border);
  border-radius: 9px;
  background: var(--dash-panel-2);
  color: var(--dash-text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dash-modal-input:focus {
  border-color: var(--dash-primary);
  box-shadow: 0 0 0 3px var(--dash-primary-soft);
}

.dash-modal-input[hidden] {
  display: none;
}

.dash-modal-error {
  display: none;
  margin-top: 8px;
  color: #f87171;
  font-size: 12px;
}

.dash-modal-error.is-on {
  display: block;
}

.dash-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.dash-btn {
  height: 38px;
  padding: 0 18px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.dash-btn-ghost {
  border: 1px solid var(--dash-border);
  background: transparent;
  color: var(--dash-muted);
}

.dash-btn-ghost:hover {
  color: var(--dash-text);
  border-color: var(--dash-muted);
}

.dash-btn-primary {
  border: none;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
}

.dash-btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.dash-btn-danger {
  background: #dc2626;
  color: #fff;
  border: none;
}

/* ---------- toast ---------- */
.dash-toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  z-index: 70;
  transform: translate(-50%, 12px);
  padding: 10px 18px;
  border: 1px solid var(--dash-border);
  border-radius: 999px;
  background: rgba(24, 24, 31, 0.96);
  color: #f4f4f5;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.dash-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 一键生成视频 ---------- */
.dash-gen-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  height: 34px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.dash-gen-btn:hover {
  opacity: 0.9;
}

.dash-gen-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-gen-dialog {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 60px);
  padding: 28px 28px 26px;
  border: 1px solid var(--dash-border);
  border-radius: 18px;
  background: var(--dash-panel);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.55);
  overflow-y: auto;
}

.dash-gen-dialog .dash-create-title {
  font-size: 20px;
}

.dash-gen-input {
  width: 100%;
  min-height: 92px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  background: var(--dash-panel-2);
  color: var(--dash-text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dash-gen-input:focus {
  border-color: var(--dash-primary);
  box-shadow: 0 0 0 3px var(--dash-primary-soft);
}

.dash-gen-opts {
  display: flex;
  gap: 14px;
  margin-top: 14px;
}

.dash-gen-field {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  color: var(--dash-muted);
  font-size: 12px;
}

.dash-gen-field select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--dash-border);
  border-radius: 9px;
  background: var(--dash-panel-2);
  color: var(--dash-text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.dash-gen-status {
  margin-top: 16px;
}

.dash-gen-status[hidden] {
  display: none;
}

.dash-gen-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--dash-panel-2);
  overflow: hidden;
}

.dash-gen-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  transition: width 0.4s ease;
}

/* 真实模型无进度回调时使用的不确定态加载动画 */
#genProgress.is-loading {
  width: 40% !important;
  animation: dash-gen-slide 1.4s ease-in-out infinite;
}

@keyframes dash-gen-slide {
  0% {
    margin-left: -40%;
  }
  100% {
    margin-left: 100%;
  }
}

.dash-gen-status-text {
  margin-top: 8px;
  color: var(--dash-muted);
  font-size: 12px;
}

.dash-gen-result {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.dash-gen-result[hidden] {
  display: none;
}

.dash-gen-result video {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .dash-top {
    gap: 14px;
    padding: 0 14px;
  }
  .dash-version,
  .dash-toolbar-hint,
  .dash-user-name {
    display: none;
  }
  .dash-toolbar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
  }
  .dash-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin-left: 0;
  }
  .dash-main {
    padding: 0 14px 14px;
  }
  .dash-empty {
    min-height: calc(100vh - 240px);
  }
}

/* ---------- 快捷开拍 ---------- */
.dash-quickstart {
  margin-top: 22px;
}

.dash-quickstart-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.dash-quickstart-head h2 {
  font-size: 15px;
  font-weight: 600;
}

.dash-quickstart-head p {
  color: var(--dash-subtle);
  font-size: 12px;
}

.dash-quickstart-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 10px;
}

.quick-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  background: var(--dash-panel);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.quick-card:hover {
  border-color: rgba(99, 102, 241, 0.55);
  transform: translateY(-2px);
}

.quick-cover {
  display: block;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
  overflow: hidden;
}

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

.quick-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px 14px;
}

.quick-title {
  color: var(--dash-text);
  font-size: 14px;
  font-weight: 600;
}

.quick-sub {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--dash-subtle);
  font-size: 12px;
  line-height: 1.5;
}

.quick-tag {
  align-self: flex-start;
  margin-top: 2px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--dash-panel-2);
  color: #a5b4fc;
  font-size: 11px;
}

html[data-theme="light"] .quick-tag {
  color: #4f46e5;
}

/* ---------- 项目卡片类型标签 ---------- */
.dash-card-tag {
  display: inline-block;
  margin-top: 7px;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--dash-panel-2);
  color: #a5b4fc;
  font-size: 11px;
}

html[data-theme="light"] .dash-card-tag {
  color: #4f46e5;
}

/* ---------- 创建项目弹窗 ---------- */
.dash-create-dialog {
  position: relative;
  width: min(680px, 100%);
  max-height: calc(100vh - 60px);
  padding: 30px 32px 34px;
  border: 1px solid var(--dash-border);
  border-radius: 20px;
  background: var(--dash-panel);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.55);
  overflow-y: auto;
}

.dash-create-close {
  position: absolute;
  top: 16px;
  right: 18px;
  border: none;
  background: none;
  color: var(--dash-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.dash-create-close:hover {
  color: var(--dash-text);
}

.dash-create-title {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
}

.dash-scope-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 18px;
}

.dash-scope-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 2px 10px;
  border: none;
  background: none;
  color: var(--dash-muted);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}

.dash-scope-tab svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-scope-tab[disabled] {
  cursor: not-allowed;
  opacity: 0.75;
}

.dash-scope-tab.is-active {
  color: var(--dash-primary);
}

.dash-scope-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--dash-primary);
}

.dash-type-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 104px;
  padding: 18px 10px;
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  background: var(--dash-panel-2);
  color: var(--dash-text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.type-card:hover {
  border-color: var(--dash-primary);
  background: var(--dash-primary-soft);
  transform: translateY(-2px);
}

.type-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-size: 24px;
  line-height: 1;
}

.type-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-create-dialog .dash-modal-error {
  text-align: center;
}

@media (max-width: 1100px) {
  .dash-quickstart-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .dash-quickstart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dash-create-dialog {
    padding: 26px 18px 28px;
  }
  .dash-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .dash-quickstart-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- 项目可见性与专属创作表单 ---------- */
.dash-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.dash-card-tags .dash-card-tag {
  margin-top: 0;
}

.dash-card-tag.visibility-public {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
}

.dash-card-tag.visibility-private {
  color: #a5b4fc;
}

.dash-card-add-cover {
  background: transparent;
  border-bottom: 1px dashed var(--dash-border);
  color: var(--dash-muted);
  font-size: 26px;
  font-weight: 400;
}

.dash-gen-dialog {
  width: min(760px, 100%);
}

.dash-demo-notice {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 9px;
  background: var(--dash-primary-soft);
  color: #a5b4fc;
  font-size: 12px;
  line-height: 1.6;
}

html[data-theme="light"] .dash-demo-notice {
  color: #4f46e5;
}

.dash-gen-project {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 2fr);
  gap: 14px;
  margin-top: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--dash-border-soft);
}

.dash-gen-new-project {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 1fr);
  gap: 14px;
}

.dash-gen-new-project[hidden] {
  display: none;
}

.dash-gen-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.dash-schema-field.is-wide,
.dash-schema-field.is-file {
  grid-column: 1 / -1;
}

.dash-gen-control,
.dash-gen-field input:not([type="file"]) {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--dash-border);
  border-radius: 9px;
  background: var(--dash-panel-2);
  color: var(--dash-text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea.dash-gen-control {
  min-height: 96px;
  resize: vertical;
}

.dash-gen-control:focus,
.dash-gen-field input:not([type="file"]):focus {
  border-color: var(--dash-primary);
  box-shadow: 0 0 0 3px var(--dash-primary-soft);
}

input[type="file"].dash-gen-control {
  padding: 7px;
  color: var(--dash-muted);
  cursor: pointer;
}

.dash-schema-field small {
  color: var(--dash-subtle);
  font-size: 11px;
  line-height: 1.5;
}

.dash-file-preview {
  display: grid;
  gap: 8px;
}

.dash-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--dash-border-soft);
  border-radius: 8px;
  color: var(--dash-muted);
  font-size: 11px;
  word-break: break-all;
}

.dash-file-media {
  display: block;
  width: 96px;
  max-width: 96px;
  max-height: 82px;
  border-radius: 6px;
  object-fit: contain;
  background: #08080b;
  flex-shrink: 0;
}

audio.dash-file-media {
  width: 220px;
  max-width: 220px;
  max-height: 36px;
}

.dash-gen-result {
  max-height: 560px;
  padding: 14px;
  overflow-y: auto;
  border: 1px solid var(--dash-border);
  background: var(--dash-panel-2);
  color: var(--dash-text);
}

.dash-demo-notice.is-result {
  margin-top: 0;
  margin-bottom: 12px;
  text-align: center;
  font-weight: 600;
}

.dash-result-video,
.dash-gen-result video.dash-result-video,
.dash-result-image {
  display: block;
  width: 100%;
  max-height: 360px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: #000;
  object-fit: contain;
}

.dash-result-title {
  margin: 4px 0 12px;
  font-size: 17px;
  line-height: 1.5;
}

.dash-result-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.dash-result-tools .dash-btn {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.dash-result-section {
  margin-top: 10px;
  border: 1px solid var(--dash-border);
  border-radius: 9px;
  background: var(--dash-panel);
  overflow: hidden;
}

.dash-result-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  border-bottom: 1px solid var(--dash-border-soft);
  font-size: 12px;
}

.dash-result-section-head button {
  padding: 2px 7px;
  border: none;
  border-radius: 5px;
  background: var(--dash-primary-soft);
  color: #a5b4fc;
  font-size: 11px;
  cursor: pointer;
}

.dash-result-section pre {
  margin: 0;
  padding: 11px;
  color: var(--dash-text);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.dash-assistant-msg > span {
  display: block;
}

.dash-assistant-use {
  display: block;
  width: 100%;
  margin-top: 9px;
  padding: 7px 9px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 7px;
  background: var(--dash-primary-soft);
  color: #a5b4fc;
  font-size: 11px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}

.dash-assistant-use:hover {
  border-color: var(--dash-primary);
}

@media (max-width: 680px) {
  .dash-gen-project,
  .dash-gen-new-project,
  .dash-gen-fields {
    grid-template-columns: 1fr;
  }

  .dash-gen-dialog {
    padding: 26px 18px 22px;
  }

  .dash-file-item {
    align-items: flex-start;
    flex-direction: column;
  }
}
