:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --sidebar: #14161d;
  --sidebar-2: #1d202a;
  --text: #1b1e28;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --border: #e6e8ee;
  --border-strong: #d5d8e1;
  --accent: #5b5bd6;
  --accent-soft: #eeeeff;
  --accent-dark: #4747b8;
  --danger: #d03a45;
  --danger-soft: #fdeef0;
  --success: #167a55;
  --success-soft: #e8f6ef;
  --warn: #a15c0a;
  --warn-soft: #fdf3e2;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 22, 29, 0.04), 0 8px 24px rgba(20, 22, 29, 0.04);
  --font: "Inter", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

/* 应用外壳 */
.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: var(--sidebar);
  color: #cbd0dc;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px 18px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, #7c7cf0, #4d4dbb);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(91, 91, 214, 0.4);
}

.brand-name {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.nav {
  flex: 1;
  padding: 8px 12px;
  overflow-y: auto;
}

.nav-group-label {
  padding: 18px 10px 6px;
  color: #6f7689;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  margin: 2px 0;
  border-radius: 8px;
  color: #aeb4c3;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
}

.nav-item:hover {
  background: var(--sidebar-2);
  color: #fff;
}

.nav-item.active {
  background: #262a3a;
  color: #fff;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  opacity: 0.9;
}

.sidebar-footer {
  border-top: 1px solid #262a36;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #323747;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  flex: 0 0 30px;
}

.sidebar-user {
  min-width: 0;
  flex: 1;
}

.sidebar-user-name {
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  color: #7f8698;
  font-size: 11px;
}

.icon-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn:hover {
  background: #2a2e3c;
  color: #fff;
}

.workspace {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(244, 245, 247, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h1 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.2px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.view {
  padding: 6px 28px 40px;
  max-width: 1440px;
  width: 100%;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  background: #f7f8fa;
}

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

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

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-danger {
  color: var(--danger);
  border-color: #efc6ca;
  background: #fff;
}

.btn-danger:hover {
  background: var(--danger-soft);
}

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

.btn-ghost:hover {
  background: #eceef3;
  color: var(--text);
}

.btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 12.5px;
  border-radius: 7px;
}

.btn svg {
  width: 15px;
  height: 15px;
}

/* 卡片与布局 */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 15px;
  font-weight: 600;
}

.card-body {
  padding: 20px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.toolbar-spacer {
  flex: 1;
}

.page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.section-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
}

/* 表单 */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 12.5px;
  font-weight: 500;
  color: #454b5a;
}

.field-hint {
  font-size: 12px;
  color: var(--muted-2);
}

.input,
.select,
.textarea {
  width: 100%;
  height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  padding: 0 11px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.textarea {
  height: auto;
  min-height: 96px;
  padding: 9px 11px;
  resize: vertical;
  line-height: 1.55;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 91, 214, 0.12);
}

.input::placeholder,
.textarea::placeholder {
  color: #b3b8c4;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

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

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #3f4553;
}

/* 表格 */
.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: #fafbfc;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f1f5;
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: #fafbfe;
}

.table .cell-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 190px;
}

.table .cell-name {
  font-weight: 500;
}

.table .cell-sub {
  color: var(--muted-2);
  font-size: 12px;
}

.table .actions {
  display: flex;
  gap: 4px;
}

/* 素材库列表固定列宽，长名称与组名截断显示，操作列保持可见 */
.asset-table {
  table-layout: fixed;
}

.asset-table th:nth-child(1) {
  width: 32%;
}

.asset-table th:nth-child(2) {
  width: 20%;
}

.asset-table th:nth-child(3) {
  width: 10%;
}

.asset-table th:nth-child(4) {
  width: 8%;
}

.asset-table th:nth-child(5) {
  width: 16%;
}

.asset-table th:nth-child(6) {
  width: 14%;
}

.asset-table .cell-main {
  min-width: 0;
}

.asset-table .cell-main > div:last-child {
  min-width: 0;
  overflow: hidden;
}

.asset-table .cell-name,
.asset-table .cell-sub,
.asset-table .cell-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-table .actions {
  justify-content: flex-start;
}

.thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #f0f1f5;
  object-fit: cover;
  flex: 0 0 44px;
  border: 1px solid #e9ebf1;
}

.thumb-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #f2f3f7;
  color: #a5abba;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
}

.thumb-placeholder svg {
  width: 20px;
  height: 20px;
}

/* 状态与标签 */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1;
}

.pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.pill-active,
.pill-succeeded {
  color: var(--success);
  background: var(--success-soft);
}

.pill-processing,
.pill-pending,
.pill-uploading,
.pill-submitting,
.pill-running {
  color: var(--warn);
  background: var(--warn-soft);
}

.pill-failed,
.pill-delete_failed,
.pill-query_error {
  color: var(--danger);
  background: var(--danger-soft);
}

.pill-deleted,
.pill-abandoned,
.pill-unknown {
  color: var(--muted);
  background: #f1f2f6;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

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

.badge-person {
  color: #8a4b00;
  background: #fff1db;
}

/* 空状态 */
.empty {
  padding: 64px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: #f1f2f6;
  display: grid;
  place-items: center;
  color: #a4aab8;
}

.empty-icon svg {
  width: 22px;
  height: 22px;
}

.empty-title {
  font-weight: 500;
  color: #3f4553;
  margin-bottom: 4px;
}

.empty-sub {
  font-size: 12.5px;
  color: var(--muted-2);
  margin-bottom: 16px;
}

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
}

.pager {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 素材组卡片 */
.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.group-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.group-card:hover {
  border-color: #d2d5e0;
}

.group-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.group-name {
  font-size: 15px;
  font-weight: 600;
  word-break: break-all;
}

.group-desc {
  color: var(--muted);
  font-size: 12.5px;
  min-height: 19px;
  word-break: break-all;
}

.group-stats {
  display: flex;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid #f1f2f6;
  border-bottom: 1px solid #f1f2f6;
}

.group-stat-value {
  font-size: 17px;
  font-weight: 650;
}

.group-stat-label {
  font-size: 11.5px;
  color: var(--muted-2);
}

.group-card-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.real-person-session {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.real-person-session:last-child {
  border-bottom: 0;
}

.real-person-modal-status {
  margin-bottom: 16px;
}

@media (max-width: 720px) {
  .real-person-session {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* 弹窗 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 19, 26, 0.45);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px;
  overflow-y: auto;
}

.modal {
  width: 100%;
  max-width: 540px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 17, 24, 0.24);
  animation: modal-in 0.18s ease;
}

.modal-wide {
  max-width: 860px;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

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

.modal-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 30px;
  height: 30px;
  border-radius: 7px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.modal-close:hover {
  background: #f1f2f6;
}

.modal-body {
  padding: 22px;
}

.modal-footer {
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
}

/* 提示 */
.toast-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  min-width: 220px;
  max-width: 380px;
  background: #1d202a;
  color: #fff;
  padding: 11px 15px;
  border-radius: 9px;
  font-size: 13px;
  box-shadow: 0 12px 32px rgba(15, 17, 24, 0.24);
  animation: toast-in 0.18s ease;
}

.toast-error {
  background: #a92d38;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 登录 */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(400px, 0.95fr);
  background: #fff;
}

.login-art {
  background:
    radial-gradient(circle at 18% 22%, rgba(124, 124, 240, 0.55), transparent 38%),
    radial-gradient(circle at 82% 78%, rgba(73, 190, 160, 0.28), transparent 42%),
    linear-gradient(145deg, #14161d 0%, #1e2130 62%, #22263a 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 52px;
  position: relative;
  overflow: hidden;
}

.login-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 82%);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.login-brand .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 17px;
}

.login-brand-name {
  font-size: 17px;
  font-weight: 600;
}

.login-art-title {
  position: relative;
  z-index: 1;
  font-size: 40px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -1px;
  max-width: 460px;
}

.login-art-line {
  width: 56px;
  height: 3px;
  background: #7c7cf0;
  border-radius: 3px;
  margin-top: 22px;
}

.login-art-foot {
  position: relative;
  z-index: 1;
  color: #8f96a8;
  font-size: 12px;
}

.login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-form {
  width: 100%;
  max-width: 340px;
}

.login-form h1 {
  font-size: 24px;
  font-weight: 650;
  margin-bottom: 26px;
  letter-spacing: -0.4px;
}

.login-form .field + .field {
  margin-top: 16px;
}

.login-form .btn {
  width: 100%;
  margin-top: 24px;
  height: 40px;
}

.login-error {
  margin-top: 14px;
  color: var(--danger);
  font-size: 13px;
  min-height: 19px;
}

/* 素材详情 */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 22px;
}

.preview-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f7f8fa;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.preview-box img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
}

.preview-empty {
  color: var(--muted-2);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px;
  text-align: center;
}

.preview-empty svg {
  width: 30px;
  height: 30px;
}

.detail-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.detail-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  font-size: 13px;
}

.detail-label {
  color: var(--muted);
}

.detail-value {
  word-break: break-all;
}

.copy-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.copy-line code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  background: #f3f4f8;
  padding: 3px 7px;
  border-radius: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* 统计与进度 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.stat {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 15px 16px;
  background: #fff;
}

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

.stat-value {
  font-size: 23px;
  font-weight: 650;
  margin-top: 4px;
  letter-spacing: -0.5px;
}

.progress-row + .progress-row {
  margin-top: 15px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 6px;
  color: #454b5a;
}

.progress-track {
  height: 7px;
  border-radius: 999px;
  background: #eef0f4;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.progress-bar.warn {
  background: #d99a2b;
}

.progress-bar.danger {
  background: var(--danger);
}

/* 接口文档 */
.docs {
  max-width: 920px;
}

.docs-section + .docs-section {
  margin-top: 26px;
}

.docs h2 {
  font-size: 17px;
  font-weight: 650;
  margin-bottom: 10px;
}

.docs h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 18px 0 8px;
}

.docs p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.docs ul {
  margin: 8px 0 12px;
  padding-left: 20px;
  color: #454b5a;
  font-size: 13px;
}

.docs li + li {
  margin-top: 4px;
}

.docs code.inline {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  background: #f1f2f6;
  padding: 2px 5px;
  border-radius: 5px;
}

.code-block {
  background: #171a22;
  color: #d7dbe7;
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre;
  margin: 8px 0 14px;
}

.code-block .muted {
  color: #7d8598;
}

.action-table td code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  background: #f3f4f8;
  padding: 2px 5px;
  border-radius: 4px;
}

/* 上传 */
.dropzone {
  border: 1.5px dashed #cfd3de;
  border-radius: 10px;
  padding: 30px 20px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: #f8f8ff;
}

.dropzone-icon {
  width: 38px;
  height: 38px;
  margin: 0 auto 10px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.dropzone-icon svg {
  width: 19px;
  height: 19px;
}

.dropzone strong {
  color: var(--text);
  font-weight: 500;
}

.dropzone .file-name {
  margin-top: 8px;
  color: var(--accent);
  font-size: 12.5px;
  word-break: break-all;
}

/* 视频测试 */
.selected-assets {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.selected-asset {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 10px;
  background: #fafbfc;
}

.selected-asset .order {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  flex: 0 0 22px;
}

.selected-asset .name {
  flex: 1;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-asset .select {
  width: 118px;
  height: 30px;
  font-size: 12px;
}

.selected-asset .icon-btn {
  color: var(--muted);
  width: 26px;
  height: 26px;
}

.selected-asset .icon-btn:hover {
  background: #eceef3;
  color: var(--danger);
}

.result-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  background: #fafbfc;
}

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

.result-meta {
  display: grid;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.result-meta b {
  color: var(--text);
  font-weight: 500;
}

/* 素材选择弹窗 */
.picker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
}

.picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  cursor: pointer;
}

.picker-item:hover {
  border-color: #cfd3de;
  background: #fafbfe;
}

.picker-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.picker-item.selected {
  border-color: var(--accent);
  background: #f7f7ff;
}

.picker-item img,
.picker-item .thumb-placeholder {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.picker-item-info {
  min-width: 0;
  flex: 1;
}

.picker-item-name {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-item-sub {
  color: var(--muted-2);
  font-size: 11.5px;
}

.picker-check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  flex: 0 0 18px;
  color: #fff;
}

.picker-item.selected .picker-check {
  background: var(--accent);
  border-color: var(--accent);
}

/* 管理页面 */
.subnav {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.subnav-item {
  padding: 9px 12px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

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

.subnav-item.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 500;
}

.mono {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.nowrap {
  white-space: nowrap;
}

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

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

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

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

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

.spin {
  animation: spin 0.9s linear infinite;
}

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

@media (max-width: 1024px) {
  .split,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .sidebar {
    width: 64px;
    flex-basis: 64px;
  }
  .brand {
    padding: 18px 16px;
  }
  .brand-name,
  .nav-group-label,
  .nav-item span,
  .sidebar-user {
    display: none;
  }
  .nav-item {
    justify-content: center;
    padding: 11px;
  }
  .sidebar-footer {
    justify-content: center;
  }
  .view,
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-art {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}
