:root {
  color-scheme: dark;
  --bg-page: #06080d;
  --bg-shell: #090d14;
  --bg-sidebar: #070a10;
  --bg-panel: #101722;
  --bg-panel-2: #151c27;
  --bg-panel-3: #1b2431;
  --bg-elevated: #111821;
  --bg-overlay: rgba(2, 6, 12, 0.72);
  --text-primary: #f6f8fc;
  --text-secondary: #b9c2d0;
  --text-muted: #7d8a9d;
  --text-disabled: #4e5a69;
  --border-subtle: #202936;
  --border-strong: #354154;
  --border-active: #4d8dff;
  --primary: #3f7fff;
  --primary-strong: #2f6df1;
  --primary-soft: rgba(63, 127, 255, 0.12);
  --cyan: #4fc3d7;
  --success: #21c995;
  --success-soft: rgba(33, 201, 149, 0.14);
  --warning: #f5b84b;
  --warning-soft: rgba(245, 184, 75, 0.14);
  --danger: #ff5c73;
  --danger-soft: rgba(255, 92, 115, 0.14);
  --info: #69a7ff;
  --info-soft: rgba(105, 167, 255, 0.14);
  --gradient-primary: linear-gradient(180deg, #4f8dff 0%, #2e69e8 100%);
  --gradient-card: linear-gradient(180deg, rgba(18, 25, 35, .98), rgba(11, 16, 24, .98));
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-full: 999px;
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, .22);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, .34);
  --shadow-lg: 0 22px 64px rgba(0, 0, 0, .46);
  --shadow-glow: 0 0 0 1px rgba(79, 141, 255, .38), 0 10px 28px rgba(0, 0, 0, .22);
  --duration-fast: 120ms;
  --duration-base: 180ms;
  --duration-slow: 260ms;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-in: cubic-bezier(.4, 0, 1, 1);
  --ease-spring: cubic-bezier(.16, 1, .3, 1);
  --sidebar-width: 104px;
  --dashboard-sidebar-width: 104px;
  --header-height: 84px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg-page); color: var(--text-primary); }
body {
  font-size: 14px;
  line-height: 22px;
  background:
    radial-gradient(circle at 82% -12%, rgba(63, 127, 255, .12), transparent 30%),
    linear-gradient(180deg, #070a10 0%, #05070b 100%),
    var(--bg-page);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .55; }
img { max-width: 100%; display: block; }

.dashboard-shell {
  min-height: 100vh;
  margin-left: var(--dashboard-sidebar-width);
  overflow-x: auto;
  background: var(--bg-page);
}

.dashboard-icon-sidebar,
.qiqi-dashboard-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--dashboard-sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 22px 12px;
  overflow: hidden;
  background: #05070b;
  border-right: 1px solid #1d2532;
}

.qiqi-dashboard-sidebar {
  gap: 22px;
}

.dashboard-sidebar-brand,
.qiqi-dashboard-brand {
  width: 68px;
  min-height: 36px;
  display: grid;
  place-items: center;
  padding-bottom: 20px;
  color: #9fbcff;
  font-size: 22px;
  font-weight: 900;
}

.qiqi-dashboard-brand {
  min-height: 48px;
  padding: 0 0 20px;
  visibility: hidden;
}

.dashboard-sidebar-nav,
.dashboard-sidebar-bottom,
.qiqi-dashboard-nav,
.qiqi-dashboard-nav-bottom {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.qiqi-dashboard-nav,
.qiqi-dashboard-nav-bottom {
  justify-items: start;
}

.qiqi-dashboard-nav {
  flex: 1;
  min-height: 0;
  align-content: start;
  overflow-y: auto;
  scrollbar-width: none;
}

.qiqi-dashboard-nav::-webkit-scrollbar {
  display: none;
}

.dashboard-sidebar-bottom,
.qiqi-dashboard-nav-bottom {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.055);
}

.dashboard-nav-link,
.qiqi-dashboard-nav-item {
  position: relative;
  width: 68px;
  height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  border-radius: 18px;
  color: #a9b5c7;
  border: 1px solid transparent;
  transition:
    color var(--duration-base) var(--ease-out),
    background var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

.dashboard-nav-link:hover,
.qiqi-dashboard-nav-item:hover {
  color: #e5ecf8;
  background: rgba(255,255,255,.055);
}

.dashboard-nav-link.active {
  color: #e9f0ff;
  background: rgba(63, 127, 255, .14);
  border-color: rgba(79,141,255,.32);
  box-shadow: inset 0 1px rgba(255,255,255,.06), 0 0 18px rgba(47,115,255,.16);
}

.qiqi-dashboard-nav-item.active {
  color: var(--text-primary);
  background: rgba(63, 127, 255, .12);
  border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(63, 127, 255, .22);
}

.dashboard-nav-link.active::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 28px;
  height: 2px;
  transform: translateX(-50%);
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #7caeff, #16b99b);
}

.dashboard-nav-link.locked,
.qiqi-dashboard-nav-item.locked {
  color: #536075;
}

.dashboard-nav-icon,
.qiqi-dashboard-nav-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: none;
}

.dashboard-nav-label,
.qiqi-dashboard-nav-label {
  display: block;
  max-width: 58px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
  color: #8d98aa;
  font-size: 11px;
  font-weight: 650;
  line-height: 13px;
  letter-spacing: 0;
  pointer-events: none;
}

.dashboard-nav-link.active .dashboard-nav-label,
.qiqi-dashboard-nav-item.active .qiqi-dashboard-nav-label {
  color: #f6f8fc;
}

.dashboard-nav-link:hover .dashboard-nav-label,
.qiqi-dashboard-nav-item:hover .qiqi-dashboard-nav-label {
  color: #d6deec;
}

.dashboard-lock-icon,
.qiqi-dashboard-lock-icon {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 10px;
  height: 10px;
  color: #6b7585;
}

.dashboard-nav-badge,
.qiqi-dashboard-nav-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  font-weight: 800;
}

.dashboard-nav-link.distributor,
.qiqi-dashboard-nav-item.distributor {
  color: #f5c451;
  background: rgba(245, 184, 75, .08);
  border-color: rgba(245, 184, 75, .18);
}

.pager-row,
.upload-preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pager-row {
  min-height: 58px;
  padding: 12px 4px 0;
  color: #6b7585;
  font-size: 12px;
}

.danger-confirm,
.notice-box,
.upload-preview-stack {
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(10,16,26,.72);
}

.danger-confirm {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-color: rgba(239,68,68,.18);
  background: rgba(239,68,68,.06);
}

.danger-confirm p {
  margin: 0;
  color: #ff7c8b;
  font-size: 13px;
  line-height: 20px;
}

.security-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-danger-zone {
  margin-top: 14px;
  padding: 0;
  overflow: hidden;
}

.account-danger-zone summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
  color: #ffb2bc;
  font-weight: 700;
}

.account-danger-zone summary::-webkit-details-marker {
  display: none;
}

.account-danger-zone summary small {
  color: #8d99ab;
  font-size: 12px;
  font-weight: 500;
}

.account-danger-zone[open] summary {
  border-bottom: 1px solid rgba(239,68,68,.16);
}

.account-danger-zone:not([open]) .danger-zone-content {
  display: none;
}

.danger-zone-content {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.modal-body-stack,
.suggestion-stack,
.scroll-stack,
.upload-preview-stack {
  display: grid;
  gap: 10px;
}

.modal-body-stack {
  padding: 18px;
}

.modal-body-stack.compact {
  padding: 14px;
}

.notice-box {
  overflow: hidden;
  border-color: rgba(47,115,255,.18);
  background: rgba(47,115,255,.08);
}

.notice-summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  color: #75a7ff;
  font-size: 12px;
  font-weight: 700;
}

.notice-steps {
  display: grid;
  gap: 4px;
  padding: 0 12px 12px;
  color: #aeb6c4;
  font-size: 12px;
  line-height: 20px;
}

.inline-empty {
  margin: 0;
  padding: 14px;
  color: #6b7585;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}

.inline-empty.compact {
  padding: 10px;
}

.inline-tab-row {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.inline-tab {
  position: relative;
  flex: 1;
  min-height: 34px;
  padding: 0 8px;
  background: transparent;
  color: #aeb6c4;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
  transition: color var(--duration-base) var(--ease-out);
}

.inline-tab-indicator {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  border-radius: var(--radius-full);
  background: #3d82ff;
}

.scroll-stack.compact {
  max-height: 144px;
  overflow-y: auto;
  padding-right: 4px;
}

.upload-preview-stack {
  margin: 16px 0;
  padding: 12px;
}

.upload-preview-video {
  width: 100%;
  max-height: 300px;
  border-radius: 8px;
  background: #05070b;
}

.upload-preview-meta p {
  flex: 1;
  margin: 0;
  color: #aeb6c4;
  font-size: 13px;
  line-height: 20px;
}

.qr-modal-body {
  display: grid;
  gap: 12px;
  text-align: center;
}

.qr-plan-name,
.qr-status,
.qr-hint {
  margin: 0;
  font-size: 12px;
  line-height: 20px;
}

.qr-plan-name {
  color: #9aa4b5;
}

.qr-price {
  margin: 0;
  color: #f6f8ff;
  font-size: 24px;
  line-height: 30px;
  font-weight: 800;
}

.qr-image {
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}

.qr-label {
  margin: 0;
  color: #d0d8e8;
  font-size: 14px;
  line-height: 22px;
  font-weight: 650;
}

.qr-link {
  color: #4a88ff;
  font-size: 12px;
  line-height: 20px;
  transition: opacity var(--duration-base) var(--ease-out);
}

.qr-link:hover {
  opacity: .8;
}

.qr-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #6b7585;
}

.qr-hint {
  color: #fbbf24;
}

.alert-inline {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 20px;
}

.alert-inline.danger {
  color: #ff7c8b;
  border: 1px solid rgba(239,68,68,.2);
  background: rgba(239,68,68,.1);
}

.alert-inline.with-margin {
  margin-top: 12px;
}

.bgm-option {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06);
  transition:
    background var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.bgm-option.active {
  background: rgba(47,115,255,.08);
  border-color: rgba(47,115,255,.4);
}

.bgm-option-copy {
  min-width: 0;
}

.bgm-option-title {
  color: #d0d8e8;
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bgm-option.active .bgm-option-title {
  color: #fff;
}

.bgm-option-meta {
  color: #6b7585;
  font-size: 10px;
  line-height: 16px;
}

.media-fill {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.025);
}

.favorite-text-preview {
  width: 100%;
  height: 100%;
  padding: 16px;
  overflow: hidden;
}

.favorite-text-preview p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #aeb6c4;
  font-size: 14px;
  line-height: 22px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.modal-list {
  margin: 12px 0;
}

.modal-empty-block {
  min-height: 144px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px 0;
  color: #687386;
  text-align: center;
}

.modal-empty-block p {
  margin: 0;
  color: #7b8798;
  font-size: 12px;
  line-height: 20px;
}

.panel-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 0;
  border-top: 1px solid rgba(30,42,56,.64);
}

.compact-select {
  width: 136px;
}

.compact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.compact-tags .tag {
  min-width: 64px;
  justify-content: center;
}

.full-btn {
  width: 100%;
}

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

.preview-panel {
  position: sticky;
  top: 18px;
  align-self: start;
}

.q-template-empty-state,
.q-upload-zone {
  min-height: 230px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 22px;
  border-radius: 9px;
  border: 1px dashed rgba(79, 141, 255, .24);
  background: #080d14;
  color: var(--text-muted);
  text-align: center;
}

.q-template-empty-state h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 24px;
}

.q-template-empty-state p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 20px;
}

.q-upload-zone {
  min-height: 186px;
}

.q-upload-file {
  width: 100%;
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.06);
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 20px;
}

.core-row-body {
  min-width: 0;
}

.truncate-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.danger-copy {
  margin: 4px 0 0;
  color: #ef4444;
  font-size: 12px;
  line-height: 18px;
}

.inline-note {
  margin: 0;
  color: #6b7585;
  font-size: 12px;
  line-height: 20px;
}

.inline-kbd {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.08);
  color: #d7deea;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}

.mono-textarea {
  min-height: 120px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.edit-stage {
  min-height: 0;
}

.edit-stage .video-preview.positioned {
  position: relative;
  aspect-ratio: 9 / 16;
  max-height: calc(100vh - 230px);
  margin: 0 auto;
  background: #06080d;
}

.edit-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 10;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.18);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
}

.edit-play-btn:hover {
  background: rgba(255,255,255,.28);
}

.caption-area {
  pointer-events: none;
}

.caption-area.bottom { justify-content: flex-end; }
.caption-area.center { justify-content: center; }
.caption-area.top,
.caption-area.fullscreen { justify-content: flex-start; }

.caption-layer {
  display: block;
  word-break: break-word;
}

.caption-layer.headline {
  font-weight: 800;
}

.caption-layer.subheadline {
  font-weight: 650;
  opacity: .92;
}

.caption-layer.keyword {
  display: inline-block;
  font-weight: 750;
}

.template-thumb {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border-radius: 8px;
  background: #080d14;
}

.edit-template-list .template-thumb {
  width: 48px;
  flex-shrink: 0;
}

.template-tile.active .template-thumb {
  box-shadow: 0 0 0 2px #2f73ff;
}

.pro-admin .panel[data-state="voice"] .voice-grid,
.core-page .panel[data-state="voice"] .voice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pro-admin .panel[data-state="voice"] .voice-tile,
.core-page .panel[data-state="voice"] .voice-tile {
  min-height: 172px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border-radius: 9px;
  background: #080d14;
  border: 1px solid rgba(255,255,255,.055);
}

.pro-admin .panel[data-state="voice"] .voice-tile .avatar,
.core-page .panel[data-state="voice"] .voice-tile .avatar {
  width: 38px;
  height: 38px;
}

.pro-admin .panel[data-state="avatar"] .avatar-list,
.core-page .panel[data-state="avatar"] .avatar-list,
.pro-admin .panel[data-state="asset"] .asset-list,
.core-page .panel[data-state="asset"] .asset-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pro-admin .panel[data-state="tpl"] .template-list,
.core-page .panel[data-state="tpl"] .template-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pro-admin .panel[data-state="works"] .split-layout,
.core-page .panel[data-state="works"] .split-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

.pro-admin [data-state="settings"] .panel,
.core-page [data-state="settings"] .panel {
  background: linear-gradient(180deg, rgba(17,24,34,.98), rgba(9,13,20,.99));
}

@media (max-width: 1440px) {
  :root {
    --sidebar-width: 88px;
    --dashboard-sidebar-width: 88px;
  }

  .qiqi-dashboard-sidebar {
    padding: 18px 10px;
  }

  .qiqi-dashboard-brand,
  .qiqi-dashboard-nav-item {
    width: 58px;
  }

  .qiqi-dashboard-nav-item {
    height: 58px;
    gap: 4px;
    border-radius: 16px;
  }

  .qiqi-dashboard-nav-icon {
    width: 19px;
    height: 19px;
  }

  .qiqi-dashboard-nav-label {
    max-width: 52px;
    font-size: 10px;
    line-height: 12px;
  }
}

@media (max-height: 900px) {
  .dashboard-icon-sidebar,
  .qiqi-dashboard-sidebar {
    gap: 10px;
    padding-top: 18px;
    padding-bottom: 14px;
  }

  .dashboard-sidebar-brand,
  .qiqi-dashboard-brand {
    min-height: 30px;
    padding-bottom: 10px;
  }

  .dashboard-sidebar-nav,
  .dashboard-sidebar-bottom,
  .qiqi-dashboard-nav,
  .qiqi-dashboard-nav-bottom {
    gap: 6px;
  }

  .dashboard-sidebar-bottom,
  .qiqi-dashboard-nav-bottom {
    padding-top: 10px;
  }

  .dashboard-nav-link {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }

  .dashboard-nav-icon {
    width: 20px;
    height: 20px;
  }
}

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); background: rgba(6, 8, 13, .92); }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 22px 12px;
  background: linear-gradient(180deg, rgba(10, 14, 21, .99), rgba(6, 8, 13, .99));
  border-right: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 12px; font-size: 19px; font-weight: 800; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: #111a28; border: 1px solid #2c3a50; box-shadow: none; color: #83adff; }
.nav { display: grid; gap: 6px; }
.nav-bottom { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.055); }
.nav-item { height: 48px; display: flex; align-items: center; gap: 11px; padding: 0 14px; border-radius: var(--radius-md); color: var(--text-secondary); transition: background var(--duration-base) var(--ease-out), color var(--duration-base) var(--ease-out); }
.nav-item:hover { background: var(--bg-panel-2); color: var(--text-primary); }
.nav-item.active { background: rgba(63, 127, 255, .12); color: var(--text-primary); box-shadow: inset 0 0 0 1px rgba(63, 127, 255, .22); }
.nav-icon { width: 18px; height: 18px; opacity: .95; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-full); background: var(--primary); display: grid; place-items: center; font-size: 12px; line-height: 20px; }
.member-card { margin-top: auto; padding: 12px; border-radius: var(--radius-lg); background: var(--gradient-card); border: 1px solid var(--border-subtle); }
.member-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.avatar { width: 34px; height: 34px; border-radius: var(--radius-full); object-fit: cover; border: 1px solid var(--border-strong); }
.vip { color: #241600; background: linear-gradient(135deg, #ffe6a3, #d7a94d); font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: var(--radius-xs); }

.main { min-width: 1180px; padding: 18px 24px 28px; }
.topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.title-block h1 { margin: 0; font-size: 30px; line-height: 38px; letter-spacing: 0; }
.subtitle { color: var(--text-muted); margin-top: 2px; }
.top-metrics { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.metric { min-width: 142px; height: 44px; padding: 6px 14px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: rgba(15, 23, 34, .82); }
.metric small { display: block; color: var(--text-muted); font-size: 12px; line-height: 14px; }
.metric strong { font-size: 14px; line-height: 18px; }
.progress { height: 5px; overflow: hidden; border-radius: var(--radius-full); background: #263140; margin-top: 6px; }
.progress > span { display: block; height: 100%; width: var(--value, 60%); background: var(--gradient-primary); transition: width var(--duration-slow) var(--ease-out); }

.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.workbench-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) 360px; gap: 14px; align-items: stretch; }
.step-grid { display: grid; grid-template-columns: 1fr 350px; gap: 14px; }
.panel, .card {
  background: var(--gradient-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 12px 28px rgba(0, 0, 0, .18);
  backdrop-filter: blur(10px);
}
.panel { padding: 16px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(47, 62, 82, .55); margin-bottom: 14px; }
.panel-title { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 700; }
.step-num { width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 7px; background: #1a2d50; border: 1px solid rgba(79,141,255,.36); color: #a9c6ff; box-shadow: none; font-weight: 800; }
.section-title { margin: 0 0 12px; font-size: 18px; line-height: 26px; }
.muted { color: var(--text-muted); }
.secondary { color: var(--text-secondary); }
.divider { height: 1px; background: var(--border-subtle); margin: 14px 0; }

.btn {
  min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-sm); padding: 0 14px; background: var(--bg-panel-2); color: var(--text-primary);
  border: 1px solid var(--border-subtle); font-weight: 650; transition: transform var(--duration-fast), background var(--duration-base), border-color var(--duration-base), box-shadow var(--duration-base);
}
.btn:hover { background: var(--bg-panel-3); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--gradient-primary); border-color: rgba(118, 162, 255, .38); box-shadow: 0 8px 18px rgba(23, 75, 176, .24); }
.btn.primary:hover { box-shadow: 0 10px 22px rgba(23, 75, 176, .3); }
.btn.secondary { background: rgba(47, 123, 255, .12); color: #dce9ff; border-color: rgba(47, 123, 255, .28); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--danger-soft); color: #ffd7de; border-color: rgba(255, 92, 115, .32); }
.btn.large { height: 48px; padding: 0 26px; font-size: 17px; border-radius: var(--radius-md); }
.btn.icon { width: 36px; padding: 0; }
.btn.loading::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; animation: spin 900ms linear infinite; }

.input, .select, .textarea {
  width: 100%; min-height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle);
  background: rgba(10, 16, 26, .9); color: var(--text-primary); padding: 0 12px; outline: none;
  transition: border-color var(--duration-base), box-shadow var(--duration-base), background var(--duration-base);
}
.textarea { min-height: 116px; padding: 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--border-active); box-shadow: 0 0 0 3px rgba(47, 123, 255, .16); }
.input.error, .textarea.error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 92, 115, .13); }
.field { display: grid; gap: 6px; }
.field label { color: var(--text-secondary); font-weight: 650; font-size: 13px; }
.field-note { font-size: 12px; color: var(--text-muted); }
.field-note.error { color: var(--danger); }

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border-subtle); }
.tab { position: relative; height: 36px; display: inline-flex; align-items: center; color: var(--text-muted); font-weight: 650; background: none; padding: 0; }
.tab.active { color: #7eb0ff; }
.tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: var(--radius-full); background: var(--primary); }
.segmented { display: inline-flex; gap: 6px; padding: 4px; border-radius: var(--radius-md); background: rgba(10, 16, 26, .72); border: 1px solid var(--border-subtle); }
.segmented .seg { height: 30px; padding: 0 12px; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); }
.segmented .seg.active { background: var(--primary-soft); color: #dcebff; box-shadow: inset 0 0 0 1px rgba(47, 123, 255, .35); }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--radius-full); background: var(--bg-panel-3); color: var(--text-secondary); font-size: 12px; font-weight: 650; }
.badge.primary { background: var(--primary-soft); color: #8ebaff; }
.badge.success { background: var(--success-soft); color: #70e5bd; }
.badge.warning { background: var(--warning-soft); color: #ffd17a; }
.badge.danger { background: var(--danger-soft); color: #ff9aaa; }
.tag { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle); background: rgba(21, 31, 43, .75); color: var(--text-secondary); }
.tag.active { color: #dbeaff; border-color: rgba(79,141,255,.54); background: var(--primary-soft); }

.table { width: 100%; border-collapse: collapse; }
.table th { height: 42px; text-align: left; color: var(--text-muted); font-size: 12px; font-weight: 650; border-bottom: 1px solid var(--border-subtle); }
.table td { height: 56px; border-bottom: 1px solid rgba(30, 42, 56, .72); color: var(--text-secondary); }
.table tr:hover td { background: rgba(47, 123, 255, .05); }
.table strong { color: var(--text-primary); }

.empty, .error-state, .loading-state { min-height: 188px; display: grid; place-items: center; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--text-muted); padding: 24px; background: rgba(10, 16, 26, .45); }
.empty h3, .error-state h3 { margin: 8px 0 4px; color: var(--text-primary); }
.skeleton { position: relative; overflow: hidden; background: #172232; border-radius: var(--radius-sm); min-height: 14px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); animation: shimmer 1.2s infinite; }

.template-list, .avatar-list, .asset-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.thumb-card { position: relative; overflow: hidden; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); background: var(--bg-panel-2); min-height: 132px; transition: border-color var(--duration-base), box-shadow var(--duration-base), transform var(--duration-base); }
.thumb-card:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.thumb-card.active { border-color: rgba(79,141,255,.76); box-shadow: 0 0 0 1px rgba(79,141,255,.24); }
.thumb-card img { width: 100%; height: 116px; object-fit: cover; }
.thumb-card .thumb-info { padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.check-dot { position: absolute; right: 8px; top: 8px; width: 20px; height: 20px; border-radius: 50%; background: #3f7fff; display: grid; place-items: center; color: white; font-size: 12px; box-shadow: 0 6px 14px rgba(0,0,0,.3); }

.video-preview { overflow: hidden; border-radius: var(--radius-lg); background: #05070a; border: 1px solid var(--border-subtle); }
.video-preview img { width: 100%; aspect-ratio: 9 / 13; object-fit: cover; }
.video-controls { padding: 12px; background: #08090b; }
.timeline { height: 4px; border-radius: var(--radius-full); background: #303030; margin-top: 10px; }
.timeline span { display: block; width: 35%; height: 100%; background: var(--primary); border-radius: inherit; }

.footer-steps { position: sticky; bottom: 0; margin-top: 18px; padding: 12px 20px; border-top: 1px solid var(--border-subtle); background: rgba(7, 11, 18, .9); backdrop-filter: blur(14px); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.step-chain { display: flex; align-items: center; gap: 16px; }
.pill-step { height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: var(--radius-full); background: var(--bg-panel-2); color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.pill-step.done .step-num { width: 22px; height: 22px; background: var(--success); border-radius: 50%; font-size: 0; }
.pill-step.done .step-num::before { content: "✓"; font-size: 14px; }

.toast-stack { position: fixed; right: 24px; top: 24px; display: grid; gap: 10px; z-index: 50; }
.toast, .alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); background: var(--bg-elevated); box-shadow: var(--shadow-md); }
.toast.success, .alert.success { border-color: rgba(33, 201, 149, .28); background: #0d211f; }
.toast.danger, .alert.danger { border-color: rgba(255, 92, 115, .28); background: #241219; }
.toast.info, .alert.info { border-color: rgba(105, 167, 255, .28); background: #101b2d; }
.modal-backdrop { position: fixed; inset: 0; background: var(--bg-overlay); display: none; align-items: center; justify-content: center; z-index: 40; padding: 24px; }
.modal-backdrop.open { display: flex; animation: fade-in var(--duration-slow) var(--ease-out); }
.modal { width: min(560px, 100%); background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 18px; animation: slide-up var(--duration-slow) var(--ease-spring); }
.modal-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.modal-header h3 {
  margin: 0;
  color: #f6f8fc;
  -webkit-text-fill-color: #f6f8fc;
  font-size: 18px;
}

.state-switcher { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.demo-state { display: none; }
.demo-state.active { display: block; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 72px minmax(0, 1fr); }
  .sidebar { padding: 18px 8px; }
  .brand span, .nav-item span:not(.nav-badge), .member-card { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .main { min-width: 0; padding: 16px; }
  .workbench-grid, .step-grid { grid-template-columns: 1fr; }
  .template-list, .avatar-list, .asset-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { align-items: flex-start; flex-direction: column; }
}

/* V2 high-fidelity primitives */
.page-kicker {
  display: inline-flex; align-items: center; gap: 8px; height: 22px; padding: 0 9px; margin-bottom: 6px;
  border-radius: var(--radius-full); border: 1px solid rgba(79, 141, 255, .22);
  background: rgba(79, 141, 255, .08); color: #94b8ff; font-size: 11px; font-weight: 700; letter-spacing: .02em;
}
.hero-strip {
  position: relative; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(17, 24, 34, .98), rgba(9, 13, 20, .98));
  padding: 18px; box-shadow: var(--shadow-sm);
}
.hero-strip::after { content: none; }
.hero-strip > * { position: relative; z-index: 1; }
.metric-card {
  min-height: 128px; padding: 16px; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(24, 35, 49, .96), rgba(10, 16, 26, .96));
  display: grid; align-content: space-between; gap: 12px;
}
.metric-card .metric-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--text-muted); }
.metric-value { margin: 0; font-size: 30px; line-height: 34px; font-weight: 800; letter-spacing: 0; }
.metric-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-muted); font-size: 12px; }
.chart-grid {
  min-height: 280px; display: grid; grid-template-columns: 44px repeat(12, 1fr); grid-template-rows: repeat(4, 1fr) 24px;
  gap: 0 10px; padding: 14px 6px 0; border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(12, 19, 30, .72), rgba(8, 12, 20, .18));
}
.chart-axis { color: var(--text-muted); font-size: 11px; align-self: start; border-top: 1px solid rgba(47, 62, 82, .45); padding-top: 4px; }
.chart-bar { align-self: end; border-radius: 8px 8px 2px 2px; background: linear-gradient(180deg, #45d8e2, #2f7bff); box-shadow: 0 12px 24px rgba(47, 123, 255, .22); min-height: 28px; }
.chart-label { align-self: center; text-align: center; color: var(--text-muted); font-size: 11px; }
.split-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; }
.operations-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; }
.insight-card {
  padding: 14px; border-radius: var(--radius-lg); border: 1px solid rgba(47, 123, 255, .2);
  background: linear-gradient(135deg, rgba(47, 123, 255, .13), rgba(24, 201, 210, .06));
}
.insight-card strong { display: block; margin-bottom: 4px; }
.mini-feed { display: grid; gap: 8px; }
.feed-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: var(--radius-md); background: rgba(10, 16, 26, .62); border: 1px solid rgba(30, 42, 56, .7); }
.feed-icon { width: 34px; height: 34px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--primary-soft); color: #9cc2ff; font-weight: 900; }
.work-card {
  display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; padding: 12px;
  border-radius: var(--radius-lg); border: 1px solid var(--border-subtle); background: rgba(12, 18, 28, .72);
}
.work-cover { width: 76px; height: 54px; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); }
.quality-score { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--primary) 0 82%, #263140 82% 100%); color: #fff; font-weight: 800; }
.template-tile {
  position: relative; overflow: hidden; min-height: 196px; border-radius: var(--radius-lg); border: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(21, 31, 43, .8), rgba(8, 12, 20, .96));
}
.template-tile img { width: 100%; height: 138px; object-fit: cover; }
.template-tile .template-meta { padding: 10px; display: grid; gap: 4px; }
.floating-toolbar {
  display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: var(--radius-lg);
  background: rgba(7, 11, 18, .76); border: 1px solid var(--border-subtle); backdrop-filter: blur(12px);
}
.density-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid rgba(30, 42, 56, .64); }
.density-row:last-child { border-bottom: 0; }
.studio-stage { min-height: 500px; display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 14px; }
.step-panel { min-height: 0; }
.preview-shell {
  background: linear-gradient(180deg, rgba(15, 21, 30, .98), rgba(7, 9, 14, .99));
  border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 14px;
}
.caption-preview {
  position: absolute; left: 22px; right: 22px; bottom: 108px; text-align: center; font-size: 18px; line-height: 27px;
  font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 8px 22px rgba(0,0,0,.6);
}
.caption-preview mark { background: rgba(255, 221, 64, .92); color: #141414; border-radius: 3px; padding: 0 4px; box-decoration-break: clone; }
.video-preview.positioned { position: relative; }
.state-switcher.compact {
  margin: 0 0 10px auto;
  padding: 4px;
  width: max-content;
  background: rgba(10, 14, 21, .54);
  border: 1px solid rgba(32, 41, 54, .72);
  border-radius: 9px;
}
.state-switcher.compact .btn {
  min-height: 30px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 620;
}
.page-note {
  margin-top: 16px; padding: 10px 12px; border-radius: var(--radius-md); border: 1px dashed rgba(47, 123, 255, .32);
  color: var(--text-muted); background: rgba(47, 123, 255, .08); font-size: 12px;
}

/* Lift older resource pages into the V2 system without changing their business structure. */
.main > .panel:has(.state-switcher),
.main > .panel:has(.asset-list),
.main > .panel:has(.avatar-list) {
  position: relative; overflow: hidden; margin-top: 14px;
  background:
    linear-gradient(180deg, rgba(18, 28, 42, .96), rgba(8, 13, 21, .98)),
    radial-gradient(circle at 85% 0%, rgba(47, 123, 255, .18), transparent 34%);
}
.main > .panel:has(.state-switcher)::after,
.main > .panel:has(.asset-list)::after,
.main > .panel:has(.avatar-list)::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 38px 38px; opacity: .5;
}
.main > .panel:has(.state-switcher) > *,
.main > .panel:has(.asset-list) > *,
.main > .panel:has(.avatar-list) > * { position: relative; z-index: 1; }
.state-switcher:not(.compact) {
  padding: 6px; border-radius: var(--radius-lg); border: 1px solid var(--border-subtle);
  background: rgba(10, 16, 26, .64);
}
.grid.cols-3 > .panel,
.grid.cols-2 > .panel {
  background: linear-gradient(180deg, rgba(23, 34, 49, .9), rgba(10, 16, 26, .92));
}
.asset-list .thumb-card,
.avatar-list .thumb-card,
.template-list .thumb-card {
  background: linear-gradient(180deg, rgba(23, 34, 49, .92), rgba(9, 14, 22, .98));
}
.asset-list .thumb-card img,
.avatar-list .thumb-card img,
.template-list .thumb-card img {
  filter: saturate(1.04) contrast(1.02);
}
.title-block h1::after { content: none; }

/* Premium pass: reduce decorative noise and make the creation workspace feel like a serious tool. */
.q-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 14px;
  align-items: start;
}
.q-left-stack { display: grid; gap: 12px; }
.q-card {
  background: linear-gradient(180deg, rgba(17, 24, 34, .98), rgba(10, 14, 21, .99));
  border: 1px solid #202936;
  border-radius: 10px;
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.q-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(32, 41, 54, .9);
}
.q-title { display: flex; align-items: center; gap: 9px; font-weight: 720; font-size: 15px; }
.q-subtle { color: var(--text-muted); font-size: 12px; }
.q-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: 12px; }
.q-avatar-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.q-avatar {
  position: relative; overflow: hidden; border-radius: 8px; border: 1px solid #222c39; background: #121923;
}
.q-avatar img { width: 100%; height: 132px; object-fit: cover; filter: saturate(.94) contrast(1.02); }
.q-avatar strong { display: block; padding: 8px 9px 0; font-size: 13px; }
.q-avatar span:not(.check-dot) { display: block; padding: 0 9px 9px; color: var(--text-muted); font-size: 12px; }
.q-avatar.active { border-color: rgba(79,141,255,.72); box-shadow: inset 0 0 0 1px rgba(79,141,255,.18); }
.q-template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.q-template {
  overflow: hidden; border-radius: 9px; border: 1px solid #222c39; background: #111821;
}
.q-template img { width: 100%; height: 118px; object-fit: cover; filter: saturate(.9) contrast(1.03); }
.q-template div { padding: 9px 10px; }
.q-template strong { display: block; font-size: 13px; }
.q-template span { color: var(--text-muted); font-size: 12px; }
.q-template.active { border-color: rgba(79,141,255,.72); }
.q-assets { display: grid; grid-template-columns: 1fr repeat(3, 92px); gap: 10px; }
.q-asset {
  min-height: 74px; border-radius: 8px; border: 1px solid #222c39; overflow: hidden; background: #0d131c;
}
.q-asset img { width: 100%; height: 74px; object-fit: cover; filter: saturate(.9); }
.q-asset.add { display: grid; place-items: center; color: var(--text-muted); border-style: dashed; font-size: 12px; }
.q-preview {
  position: sticky;
  top: 18px;
  background: linear-gradient(180deg, #101720, #07090d);
  border: 1px solid #202936;
  border-radius: 10px;
  padding: 14px;
}
.q-video {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #1e2631;
  background: #050608;
}
.q-video img { width: 100%; aspect-ratio: 9 / 13; object-fit: cover; filter: saturate(.94) contrast(1.02); }
.q-caption {
  position: absolute; left: 22px; right: 22px; bottom: 104px; text-align: center;
  color: #fff; font-size: 17px; line-height: 25px; font-weight: 780;
  text-shadow: 0 2px 4px rgba(0,0,0,.9), 0 8px 20px rgba(0,0,0,.55);
}
.q-caption mark { background: rgba(248, 220, 70, .94); color: #111; border-radius: 3px; padding: 0 4px; }
.q-controlbar { padding: 11px 12px; background: #07080a; border-top: 1px solid #171b22; }
.q-preview .density-row { padding: 9px 0; }
.q-preview .alert { padding: 10px 12px; box-shadow: none; }
.q-bottom {
  position: sticky; bottom: 0; margin-top: 14px; padding: 12px 18px;
  border: 1px solid #202936; border-radius: 12px 12px 0 0;
  background: rgba(8, 11, 17, .92); backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}

@media (min-width: 1200px) {
  .q-avatar img { height: 126px; }
}

/* Pro creator workspace direction: Runway/CapCut-style, quieter and more precise. */
body.pro-workspace {
  background:
    radial-gradient(circle at 82% -20%, rgba(63, 127, 255, .08), transparent 34%),
    linear-gradient(180deg, #05070b 0%, #06080c 100%);
}
.pro-workspace .app-shell {
  grid-template-columns: 72px minmax(0, 1fr);
  background: #05070b;
}
.pro-workspace .sidebar {
  padding: 18px 8px;
  align-items: center;
}
.pro-workspace .brand {
  justify-content: center;
  width: 100%;
  padding: 0 0 14px;
  margin-bottom: 4px;
}
.pro-workspace .brand span:not(.brand-mark),
.pro-workspace .brand strong,
.pro-workspace .nav-item span:not(.nav-badge),
.pro-workspace .member-card {
  display: none;
}
.pro-workspace .nav-item {
  width: 48px;
  padding: 0;
  justify-content: center;
  border-radius: 12px;
}
.pro-workspace .nav {
  gap: 8px;
}
.pro-workspace .nav-bottom {
  width: 100%;
  margin-top: auto;
  padding-top: 12px;
  padding-bottom: 2px;
  justify-items: center;
}
.pro-workspace .brand-mark {
  width: 30px;
  height: 30px;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #9fbcff;
  font-size: 18px;
}
.pro-workspace .main {
  min-width: 0;
  padding: 18px 20px 0 20px;
}
.pro-workspace .topbar {
  min-height: 58px;
  margin-bottom: 10px;
  align-items: flex-start;
}
.pro-workspace .title-block h1 {
  font-size: 28px;
  line-height: 34px;
  font-weight: 760;
}
.pro-workspace .subtitle {
  color: #8b95a6;
}
.pro-workspace .page-kicker {
  background: transparent;
  border-color: #263247;
  color: #8fa9d8;
}
.pro-workspace .top-metrics {
  gap: 6px;
}
.pro-workspace .metric {
  min-width: 130px;
  height: 42px;
  border-color: #1e2633;
  background: #0b111a;
}
.pro-workspace .state-switcher.compact {
  opacity: .72;
  transform: scale(.92);
  transform-origin: right center;
}
.pro-workspace .state-switcher.compact:hover {
  opacity: 1;
}
.pro-workspace .q-workspace {
  grid-template-columns: minmax(0, 1fr) 352px;
  gap: 12px;
  align-items: start;
}
.pro-workspace .q-left-stack {
  gap: 10px;
}
.pro-workspace .q-card,
.pro-workspace .q-preview {
  background: #0c1119;
  border-color: #1d2532;
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.pro-workspace .q-card {
  padding: 13px;
}
.pro-workspace .q-card-header {
  min-height: 34px;
  padding-bottom: 9px;
  margin-bottom: 10px;
  border-bottom-color: #1a222e;
}
.pro-workspace .q-title {
  font-size: 14px;
  font-weight: 730;
}
.pro-workspace .step-num {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 13px;
  background: #14223a;
  border-color: #2b4778;
  color: #adc8ff;
}
.pro-workspace .textarea,
.pro-workspace .input,
.pro-workspace .select {
  background: #080d14;
  border-color: #1b2430;
}
.pro-workspace .textarea {
  min-height: 122px;
  line-height: 23px;
}
.pro-workspace .btn {
  min-height: 34px;
  border-radius: 7px;
  background: #0d131d;
  border-color: #1f2937;
  box-shadow: none;
}
.pro-workspace .btn:hover {
  background: #111925;
}
.pro-workspace .btn.primary {
  background: #356fe8;
  border-color: #497eea;
  box-shadow: none;
}
.pro-workspace .btn.large {
  height: 44px;
  font-size: 15px;
}
.pro-workspace .segmented {
  width: 100%;
  background: #080d14;
  border-color: #1b2430;
}
.pro-workspace .segmented .seg {
  flex: 1;
}
.pro-workspace .tab {
  height: 32px;
}
.pro-workspace .tag {
  height: 27px;
  background: #0d131d;
  border-color: #1c2632;
}
.pro-workspace .badge {
  background: #111926;
}
.pro-workspace .q-avatar,
.pro-workspace .q-template,
.pro-workspace .q-asset {
  border-color: #1c2531;
  background: #0a0f16;
}
.pro-workspace .q-avatar img {
  height: 118px;
  object-position: center top;
}
.pro-workspace .q-avatar strong {
  font-size: 12px;
  padding-top: 7px;
}
.pro-workspace .q-avatar span:not(.check-dot) {
  font-size: 11px;
  padding-bottom: 8px;
}
.pro-workspace .q-template img {
  height: 104px;
}
.pro-workspace .q-assets {
  grid-template-columns: 1fr repeat(3, 86px);
}
.pro-workspace .q-asset,
.pro-workspace .q-asset img {
  min-height: 68px;
  height: 68px;
}
.pro-workspace .q-video {
  border-color: #1a222d;
  border-radius: 9px;
}
.pro-workspace .q-video img {
  aspect-ratio: 9 / 13.2;
}
.pro-workspace .q-controlbar {
  position: relative;
  padding: 10px 11px;
}
.q-safe-area {
  position: absolute;
  left: 9%;
  right: 9%;
  top: 8%;
  bottom: 19%;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 6px;
  pointer-events: none;
  opacity: .55;
}
.q-safe-area::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 11%;
  height: 1px;
  background: rgba(255,255,255,.22);
}
.q-play {
  position: absolute;
  left: 50%;
  top: 43%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 13, .58);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  font-size: 16px;
  backdrop-filter: blur(10px);
  opacity: .82;
}
.q-play:hover {
  opacity: 1;
  background: rgba(20, 28, 40, .72);
}
.pro-workspace .density-row {
  border-bottom-color: #19212c;
}
.pro-workspace .q-bottom {
  margin-top: 12px;
  padding: 10px 18px;
  border-color: #1d2532;
  background: rgba(7, 10, 15, .94);
  align-items: center;
}
.pro-workspace .pill-step {
  height: 34px;
  background: #0d131d;
  border-color: #1d2532;
}
.pro-workspace .pill-step.done .step-num {
  background: #1c7f6a;
  border-color: #2aa88d;
  color: #fff;
}
.pro-workspace .step-num.optional {
  background: #151b26;
  border-color: #2b3647;
  color: #96a4ba;
}
.q-card-note {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
}

@media (max-width: 1280px) {
  .pro-workspace .q-workspace {
    grid-template-columns: minmax(0, 1fr) 336px;
  }
  .pro-workspace .q-two {
    grid-template-columns: 1fr;
  }
  .pro-workspace .q-avatar-grid {
    grid-template-columns: repeat(4, minmax(92px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .pro-workspace .q-template-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* 9:16 poster thumbnails for avatar and video-template choices. */
.pro-workspace .q-avatar-grid {
  display: inline-flex;
  gap: 12px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  vertical-align: top;
}
.pro-workspace .q-avatar {
  flex: 0 0 136px;
}
.pro-workspace .q-avatar img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center top;
}
.pro-workspace .q-avatar::after,
.pro-workspace .q-template::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 46px;
  height: 54px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(5, 7, 11, .72));
}
.pro-workspace .q-template-grid {
  display: inline-flex;
  gap: 12px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
  vertical-align: top;
}
.pro-workspace .q-template {
  flex: 0 0 150px;
  position: relative;
}
.pro-workspace .q-template img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center top;
}
.q-template-layout {
  display: grid;
  grid-template-columns: max-content 220px;
  gap: 12px;
  align-items: start;
  justify-content: start;
}
.q-template-area {
  min-width: 0;
  max-width: 100%;
}
.q-tune-panel {
  min-width: 0;
  padding: 9px;
  border: 1px solid #1c2531;
  border-radius: 9px;
  background: #090e15;
  display: grid;
  gap: 8px;
}
.q-switch {
  height: 28px;
  padding: 0 10px 0 6px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #263244;
  border-radius: 999px;
  background: #101722;
  color: var(--text-muted);
  font-weight: 740;
  cursor: pointer;
}
.q-switch span {
  width: 22px;
  height: 14px;
  border-radius: 999px;
  background: #313a48;
  position: relative;
}
.q-switch span::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #c8d1df;
  transition: transform .18s ease, background .18s ease;
}
.q-switch.on {
  color: #80f0c9;
  border-color: #214d43;
  background: #0b1d1a;
}
.q-switch.on span {
  background: #1f8d73;
}
.q-switch.on span::after {
  transform: translateX(8px);
  background: #ecfff9;
}
.q-tune-title {
  color: var(--text-secondary);
  font-weight: 740;
  font-size: 13px;
  line-height: 18px;
}
.q-tune-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.q-tune-head .btn {
  min-height: 24px;
  padding: 0 4px;
  color: #9dbfff;
}
.q-tune-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(47, 62, 82, .55);
}
.q-tune-tabs button {
  min-height: 28px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-weight: 760;
  font-size: 12px;
  cursor: pointer;
}
.q-tune-tabs button.active {
  color: #72a7ff;
  border-bottom-color: var(--primary);
}
.q-tune-panel-body {
  display: grid;
  gap: 10px;
  padding-top: 10px;
}
.q-tune-panel-body[hidden] {
  display: none;
}
.q-chip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.q-chip-grid .tag {
  justify-content: center;
  padding: 0 6px;
  height: 26px;
  font-size: 12px;
}
.q-range {
  padding: 0;
  min-height: 24px;
}
.q-compact-row {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #19212c;
  color: var(--text-muted);
  font-weight: 650;
}
.q-compact-row strong {
  color: var(--text-primary);
}
.voice-source-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 2px 0 10px;
  padding: 4px;
  border-radius: var(--radius-md);
  background: rgba(7, 12, 20, .45);
  border: 1px solid rgba(47, 62, 82, .48);
}
.voice-source-tabs button {
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 760;
  cursor: pointer;
}
.voice-source-tabs button.active {
  color: #d9e7ff;
  background: rgba(63, 127, 255, .18);
  box-shadow: inset 0 0 0 1px rgba(63, 127, 255, .32);
}
.voice-source-panel {
  display: grid;
  gap: 8px;
}
.voice-source-panel[hidden] {
  display: none;
}
.clone-voice-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(47, 62, 82, .5);
}
.clone-voice-section.compact {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.clone-voice-grid {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.clone-voice-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 7px 8px;
  border-radius: var(--radius-md);
  background: rgba(7, 12, 20, .6);
  border: 1px solid rgba(255,255,255,.055);
}
.clone-voice-card.active {
  border-color: rgba(63, 127, 255, .55);
  box-shadow: inset 2px 0 0 var(--primary);
}
.clone-voice-card .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.clone-voice-main strong {
  display: block;
  font-size: 13px;
  line-height: 18px;
}
.clone-voice-meta {
  display: grid;
  grid-template-columns: max-content minmax(72px, 120px);
  gap: 8px;
  align-items: center;
}
.clone-voice-main p {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 15px;
  white-space: nowrap;
}
.clone-voice-main .q-waveform {
  height: 14px;
  width: 100%;
  margin: 0;
}
.clone-voice-actions {
  display: flex;
  gap: 5px;
}
.clone-voice-actions .btn {
  min-height: 26px;
  padding: 0 9px;
  font-size: 12px;
}
.subtitle-color-row {
  display: grid;
  grid-template-columns: 64px repeat(3, 24px) 42px;
  gap: 8px;
  align-items: center;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}
.subtitle-color-row.compact {
  grid-template-columns: 64px repeat(3, 24px) minmax(34px, 1fr);
}
.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  background: var(--swatch);
  box-shadow: 0 0 0 3px rgba(255,255,255,.03);
}
.color-swatch.active {
  box-shadow: 0 0 0 3px rgba(63, 127, 255, .26);
  border-color: rgba(142, 186, 255, .72);
}
.subtitle-color-row input[type="color"] {
  width: 38px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(47, 62, 82, .72);
  border-radius: 8px;
  background: transparent;
}
.q-mini-tabs {
  gap: 12px;
  overflow: hidden;
}
.q-mini-tabs .tab {
  height: 28px;
  font-size: 12px;
}
.q-mix-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
  transition: opacity .18s ease, filter .18s ease;
}
.q-mix-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.pro-workspace .q-mix-assets {
  grid-template-columns: minmax(150px, 1.35fr) repeat(4, minmax(70px, 84px));
  align-items: stretch;
}
.pro-workspace .q-mix-assets .q-asset {
  position: relative;
}
.pro-workspace .q-mix-assets .q-asset small {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(0,0,0,.58);
  color: #fff;
  font-size: 11px;
}
.pro-workspace .q-mix-assets .q-asset.add {
  line-height: 20px;
}
.pro-workspace .q-mix-assets .q-asset.add span {
  color: var(--text-muted);
  font-size: 11px;
}
.q-insert-list {
  border: 1px solid #1c2531;
  border-radius: 9px;
  overflow: hidden;
  background: #090e15;
}
.q-insert-title {
  padding: 9px 10px;
  border-bottom: 1px solid #19212c;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 740;
}
.q-insert-row {
  display: grid;
  grid-template-columns: 92px 76px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border-bottom: 1px solid #19212c;
}
.q-insert-row:last-child {
  border-bottom: 0;
}
.q-insert-row strong {
  color: #83b1ff;
  font-size: 12px;
}
.q-insert-row span {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 12px;
}
.q-insert-row em {
  color: var(--text-muted);
  font-style: normal;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.q-mix-off {
  display: none;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px dashed #263244;
  border-radius: 9px;
  background: #080d14;
  color: var(--text-muted);
}
.q-mix-off strong {
  display: block;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.mix-disabled .q-mix-layout {
  display: none;
}
.mix-disabled .q-mix-off {
  display: block;
}
.mix-disabled .q-card-header .badge {
  background: #121820;
  color: var(--text-muted);
}
.q-preview-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  margin-bottom: 10px;
  border: 1px solid #1b2430;
  border-radius: 9px;
  background: #080d14;
}
.q-preview-tabs button {
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 720;
}
.q-preview-tabs button.active {
  background: #121c2d;
  color: #dbe8ff;
}
.q-video-status {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
}
.q-video-status span,
.q-video-status strong {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(5, 8, 13, .58);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.86);
  font-size: 11px;
  backdrop-filter: blur(10px);
}
.q-video-status strong {
  font-weight: 720;
  color: #b8cdf4;
}
.q-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.q-player-row span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}
.q-player-row div {
  display: flex;
  gap: 4px;
}
.q-player-row button {
  min-width: 34px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid #202a36;
  border-radius: 999px;
  background: #0c1119;
  color: var(--text-muted);
  font-size: 11px;
}
.q-generate-hint {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
}
.pill-step.optional {
  color: var(--text-muted);
}

@media (max-width: 1280px) {
  .q-template-layout {
    grid-template-columns: max-content 204px;
  }
  .q-mix-layout {
    grid-template-columns: 1fr;
  }
}

.q-voice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 8px;
}
.q-audio-btn {
  padding: 0 10px;
  white-space: nowrap;
}
.q-audio-mini {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px solid #1b2430;
  border-radius: 8px;
  background: #080d14;
  color: var(--text-muted);
  font-size: 12px;
}
.q-audio-mini strong {
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}
.q-audio-range {
  width: 100%;
  min-height: 18px;
  padding: 0;
  accent-color: #76a8ff;
}
.q-audio-result {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #1c2531;
  border-radius: 9px;
  background: #080d14;
}
.q-audio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}
.q-audio-head strong {
  font-size: 12px;
  color: var(--text-secondary);
}
.q-audio-player {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 82px;
  gap: 8px;
  align-items: center;
}
.q-audio-player span {
  color: var(--text-muted);
  font-size: 12px;
  text-align: right;
}
.q-round-play {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #13213a;
  border: 1px solid #2b4778;
  color: #c9dcff;
  font-size: 11px;
}
.q-waveform {
  height: 30px;
  position: relative;
  display: block;
  margin-top: 9px;
  opacity: .85;
}
.q-waveform::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/icons/waveform.svg") center / 100% 100% no-repeat;
}
.q-waveform i {
  display: none;
}
.q-live-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  margin-top: 10px;
  opacity: 1;
}
.q-live-waveform::before {
  display: none;
}
.q-live-waveform i {
  display: block;
  width: 1px;
  height: var(--bar-h, 18px);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(122, 171, 255, 0.98) 0%, rgba(61, 130, 255, 0.96) 100%);
  box-shadow: none;
  transform-origin: center;
  opacity: 0.9;
}
.q-live-waveform.playing i {
  animation: qiqi-wave-pulse-thin 1.15s ease-in-out infinite;
}
@keyframes qiqi-wave-pulse-thin {
  0%, 100% {
    transform: scaleY(0.72);
    opacity: 0.56;
  }
  50% {
    transform: scaleY(1.08);
    opacity: 1;
  }
}

/* Shared polish for all non-creation admin pages, matched to the auto-create workspace. */
.pro-admin .main {
  padding-bottom: 28px;
}
.pro-admin .topbar {
  padding-bottom: 10px;
  border-bottom: 1px solid #141d2a;
}
.pro-admin .title-block h1 {
  color: #f6f8fc;
  -webkit-text-fill-color: #f6f8fc;
  font-size: 26px;
  line-height: 32px;
}
.pro-admin .panel,
.pro-admin .card,
.pro-admin .hero-strip,
.pro-admin .metric-card,
.pro-admin .work-card,
.pro-admin .template-tile,
.pro-admin .feed-item,
.pro-admin .insight-card {
  border-color: #1c2531;
  background: linear-gradient(180deg, rgba(14, 20, 30, .98), rgba(7, 11, 17, .99));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.026);
}
.pro-admin .panel {
  padding: 13px;
}
.pro-admin .panel-header {
  min-height: 34px;
  padding-bottom: 9px;
  margin-bottom: 12px;
  border-bottom-color: #1a222e;
}
.pro-admin .panel-title {
  font-size: 15px;
  font-weight: 740;
}
.pro-admin .hero-strip {
  padding: 14px;
  margin-top: 14px;
}
.pro-admin .metric-card {
  min-height: 108px;
  padding: 13px;
}
.pro-admin .metric-value {
  font-size: 27px;
  line-height: 31px;
}
.pro-admin .floating-toolbar {
  background: #070b12;
  border-color: #1b2430;
  border-radius: 9px;
}
.pro-admin .state-switcher:not(.compact) {
  display: inline-flex;
  width: max-content;
  margin-bottom: 12px;
  padding: 4px;
  border-radius: 9px;
  background: #080d14;
  border-color: #1b2430;
}
.pro-admin .state-switcher:not(.compact) .btn {
  min-height: 30px;
  font-size: 12px;
}
.pro-admin .split-layout {
  grid-template-columns: minmax(0, 1fr) 336px;
}
.pro-admin .workbench-grid {
  grid-template-columns: minmax(0, 1fr) 336px;
}
.pro-admin .operations-grid {
  grid-template-columns: minmax(0, 1fr) 380px;
}
.pro-admin .work-card {
  grid-template-columns: 64px minmax(0, 1fr) auto;
  padding: 10px;
}
.pro-admin .work-cover {
  width: 64px;
  height: 82px;
  aspect-ratio: 9 / 12;
  object-fit: cover;
}
.pro-admin .quality-score {
  width: 40px;
  height: 40px;
  font-size: 13px;
}
.pro-admin .feed-item {
  min-height: 66px;
}
.pro-admin .feed-icon {
  background: #14223a;
  border: 1px solid #2b4778;
}
.pro-admin .grid.cols-3,
.pro-admin .grid.cols-4,
.pro-admin .grid.cols-2 {
  gap: 12px;
}
.pro-admin .template-tile {
  min-height: 0;
  border-radius: 9px;
}
.pro-admin .template-tile img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center top;
  filter: saturate(.96) contrast(1.02);
}
.pro-admin .template-tile .template-meta {
  min-height: 104px;
  padding: 10px;
  background: #070b12;
  border-top: 1px solid #17202b;
}
.pro-admin .avatar-list,
.pro-admin .asset-list,
.pro-admin .template-list {
  display: grid;
  gap: 12px;
}
.pro-admin .avatar-list {
  grid-template-columns: repeat(5, minmax(128px, 1fr)) !important;
}
.pro-admin .asset-list {
  grid-template-columns: repeat(6, minmax(120px, 1fr)) !important;
}
.pro-admin .avatar-list .thumb-card,
.pro-admin .asset-list .thumb-card {
  overflow: hidden;
  border-radius: 9px;
  border: 1px solid #1c2531;
  background: #080d14;
}
.pro-admin .avatar-list .thumb-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center top;
}
.pro-admin .asset-list .thumb-card img {
  width: 100%;
  height: 116px;
  object-fit: cover;
}
.pro-admin .thumb-card.active {
  border-color: rgba(79,141,255,.72);
  box-shadow: inset 0 0 0 1px rgba(79,141,255,.2);
}
.pro-admin .thumb-info {
  padding: 9px 10px 10px;
  display: grid;
  gap: 3px;
  color: var(--text-secondary);
}
.pro-admin .thumb-info strong,
.pro-admin .thumb-info:first-line {
  color: var(--text-primary);
  font-weight: 740;
}
.pro-admin .video-preview {
  position: relative;
  overflow: hidden;
  border-radius: 9px;
  border: 1px solid #1a222d;
  background: #050608;
}
.pro-admin .video-preview > img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center top;
  filter: saturate(.95) contrast(1.02);
}
.pro-admin .video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 11px;
  background: linear-gradient(180deg, transparent, rgba(3,5,8,.94) 32%);
}
.pro-admin .caption-preview {
  bottom: 88px;
  font-size: 16px;
  line-height: 24px;
}
.pro-admin .table th {
  height: 38px;
}
.pro-admin .table td {
  height: 52px;
}
.pro-admin .input,
.pro-admin .select,
.pro-admin .textarea {
  background: #080d14;
  border-color: #1b2430;
}
.pro-admin .alert {
  box-shadow: none;
}
.pro-admin .modal {
  background: #0b111a;
  border-color: #243044;
}
.pro-admin .page-note {
  border-color: #263247;
  background: #080d14;
}

@media (max-width: 1280px) {
  .pro-admin .split-layout,
  .pro-admin .workbench-grid,
  .pro-admin .operations-grid {
    grid-template-columns: 1fr;
  }
  .pro-admin .grid.cols-4,
  .pro-admin .grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pro-admin .avatar-list,
  .pro-admin .asset-list {
    grid-template-columns: repeat(3, minmax(120px, 1fr)) !important;
  }
}

/* Page-level refinement pass: make library/market pages feel designed, not merely styled. */
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .grid.cols-3 > .panel {
  position: relative;
  overflow: hidden;
  min-height: 174px;
  padding: 14px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(16, 24, 36, .98), rgba(7, 11, 17, .99)),
    radial-gradient(circle at 88% 0%, rgba(79, 141, 255, .16), transparent 38%);
}
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .grid.cols-3 > .panel::before {
  content: "";
  display: block;
  height: 48px;
  margin: 14px 0 12px;
  background: url("../assets/icons/waveform.svg") center / 100% 100% no-repeat;
  opacity: .78;
}
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .grid.cols-3 > .panel::after {
  content: "试听 00:08 · 可拖动试听 · 已通过降噪检测";
  display: block;
  margin-top: -2px;
  color: var(--text-muted);
  font-size: 12px;
}
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .avatar {
  width: 44px;
  height: 44px;
}
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .divider {
  display: none;
}
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .row:last-child {
  margin-top: 10px;
}

.pro-admin .panel:has([data-state="asset"]) .asset-list {
  grid-template-columns: repeat(5, minmax(118px, 1fr)) 300px !important;
  align-items: stretch;
}
.pro-admin .panel:has([data-state="asset"]) .asset-list::after {
  content: "当前素材\\A产品展示.jpg\\A\\A类型  JPG 图片\\A尺寸  1080 x 1920\\A标签  产品 / 展示 / 混剪\\A引用  3 个视频草稿\\A\\A智能建议\\A适合插入 00:05 - 00:08 产品展示段";
  white-space: pre-line;
  padding: 14px;
  border: 1px solid #1c2531;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(13, 20, 31, .98), rgba(7, 11, 17, .99));
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 22px;
  text-align: left;
}
.pro-admin .panel:has([data-state="asset"]) .asset-list .empty {
  min-height: 170px !important;
}
.pro-admin .panel:has([data-state="asset"]) .asset-list .thumb-card {
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.pro-admin .panel:has([data-state="asset"]) .asset-list .thumb-card:hover {
  transform: translateY(-2px);
  border-color: #2b4778;
}

.pro-admin .panel:has([data-state="tpl"]) .template-tile {
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.pro-admin .panel:has([data-state="tpl"]) .split-layout > .grid.cols-3 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.pro-admin .panel:has([data-state="tpl"]) .template-tile:hover {
  transform: translateY(-2px);
  border-color: #2b4778;
}
.pro-admin .panel:has([data-state="tpl"]) .template-tile::after {
  content: "9:16 · 口播 · 可微调";
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(5, 8, 13, .62);
  border: 1px solid rgba(255,255,255,.13);
  color: rgba(255,255,255,.86);
  font-size: 11px;
  backdrop-filter: blur(10px);
}
.pro-admin .panel:has([data-state="tpl"]) .template-tile.active {
  border-color: rgba(79,141,255,.78);
  box-shadow: inset 0 0 0 1px rgba(79,141,255,.18);
}
.pro-admin .panel:has([data-state="tpl"]) aside.panel {
  position: sticky;
  top: 18px;
}
.pro-admin .panel:has([data-state="tpl"]) .template-tile .template-meta {
  min-height: 92px;
}

.pro-admin .panel:has([data-state="works"]) .work-card,
.pro-admin .sample-stack .work-card {
  position: relative;
  overflow: hidden;
}
.pro-admin .panel:has([data-state="works"]) .work-card::before,
.pro-admin .sample-stack .work-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 999px;
  background: #3f7fff;
  opacity: .58;
}
.pro-admin .panel:has([data-state="works"]) .work-card:hover,
.pro-admin .sample-stack .work-card:hover {
  border-color: #2b4778;
  background: linear-gradient(180deg, rgba(17, 25, 38, .98), rgba(8, 13, 20, .99));
}

.pro-admin .panel:has([data-state="settings"]) .grid.cols-2 > .panel {
  min-height: 190px;
}
.pro-admin .panel:has([data-state="settings"]) .table td {
  height: 62px;
}

@media (max-width: 1280px) {
  .pro-admin .panel:has([data-state="asset"]) .asset-list {
    grid-template-columns: repeat(3, minmax(120px, 1fr)) !important;
  }
  .pro-admin .panel:has([data-state="tpl"]) .split-layout > .grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .pro-admin .panel:has([data-state="asset"]) .asset-list::after {
    grid-column: 1 / -1;
  }
}

/* Surface parity: admin pages use the same solid, precise card treatment as auto-create. */
.pro-admin .panel,
.pro-admin .card,
.pro-admin .hero-strip,
.pro-admin .preview-shell {
  background: #0c1119;
  border-color: #1d2532;
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
  backdrop-filter: none;
}
.pro-admin .metric-card,
.pro-admin .work-card,
.pro-admin .template-tile,
.pro-admin .feed-item,
.pro-admin .insight-card,
.pro-admin .avatar-list .thumb-card,
.pro-admin .asset-list .thumb-card,
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .grid.cols-3 > .panel {
  background: #080d14;
  border-color: #1c2531;
  box-shadow: none;
}
.pro-admin .main > .panel:has(.state-switcher),
.pro-admin .main > .panel:has(.asset-list),
.pro-admin .main > .panel:has(.avatar-list) {
  background: #0c1119;
}
.pro-admin .main > .panel:has(.state-switcher)::after,
.pro-admin .main > .panel:has(.asset-list)::after,
.pro-admin .main > .panel:has(.avatar-list)::after {
  content: none;
}
.pro-admin .panel-header {
  border-bottom-color: #1a222e;
}
.pro-admin .template-tile .template-meta,
.pro-admin .thumb-info,
.pro-admin .panel:has([data-state="asset"]) .asset-list::after,
.pro-admin .state-switcher:not(.compact),
.pro-admin .floating-toolbar {
  background: #080d14;
  border-color: #1b2430;
}
.pro-admin .grid.cols-3 > .panel,
.pro-admin .grid.cols-2 > .panel,
.pro-admin .grid.cols-4 > .panel {
  background: #080d14;
  border-color: #1c2531;
}
.pro-admin .empty,
.pro-admin .error-state,
.pro-admin .loading-state {
  background: #080d14;
  border-color: #243044;
}

/* Compact resource management density: voice/avatar libraries should scan like assets, not promos. */
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .grid.cols-3 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .grid.cols-3 > .panel {
  min-height: 0;
  padding: 9px;
  border-radius: 8px;
}
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .grid.cols-3 > .panel > .row:first-child {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .grid.cols-3 > .panel > .row:first-child strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 18px;
}
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .grid.cols-3 > .panel > .row:first-child .muted {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .avatar {
  width: 34px;
  height: 34px;
}
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .grid.cols-3 > .panel::before {
  height: 18px;
  margin: 7px 0 5px;
  opacity: .86;
}
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .grid.cols-3 > .panel::after {
  content: "00:08 · 降噪通过";
  margin-top: 0;
  font-size: 11px;
  line-height: 16px;
}
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .row:last-child {
  margin-top: 6px;
  gap: 6px;
}
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .row:last-child .btn {
  min-height: 26px;
  padding: 0 8px;
  font-size: 11px;
}

.pro-admin .panel:has([data-state="avatar"]) .avatar-list {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 12px;
}
.pro-admin .panel:has([data-state="avatar"]) .avatar-list .thumb-card {
  border-radius: 9px;
}
.pro-admin .panel:has([data-state="avatar"]) .avatar-list .thumb-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center top;
}
.pro-admin .panel:has([data-state="avatar"]) .avatar-list .thumb-info {
  min-height: 92px;
  padding: 10px;
  gap: 5px;
}
.pro-admin .panel:has([data-state="avatar"]) .avatar-list .thumb-info strong {
  font-size: 13px;
  line-height: 18px;
}
.pro-admin .panel:has([data-state="avatar"]) .avatar-list .thumb-info .badge {
  width: max-content;
  height: 20px;
  font-size: 11px;
}
.pro-admin .panel:has([data-state="avatar"]) .avatar-list .empty {
  min-height: 404px !important;
  padding: 18px;
}

@media (max-width: 1280px) {
  .pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .pro-admin .panel:has([data-state="avatar"]) .avatar-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Quiet premium pass: fewer default outlines, clearer active/focus states. */
.pro-workspace .btn,
.pro-admin .btn {
  border-color: rgba(255,255,255,.045);
  background: #0d131d;
}
.pro-workspace .btn.ghost,
.pro-admin .btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
}
.pro-workspace .btn.secondary,
.pro-admin .btn.secondary {
  border-color: rgba(79,141,255,.14);
  background: rgba(79,141,255,.09);
}
.pro-workspace .btn:hover,
.pro-admin .btn:hover {
  border-color: rgba(126,176,255,.26);
  background: #111925;
}
.pro-workspace .btn.primary,
.pro-admin .btn.primary {
  border-color: rgba(126,176,255,.28);
  box-shadow: 0 8px 18px rgba(28, 87, 206, .18);
}
.pro-workspace .tag,
.pro-admin .tag {
  border-color: transparent;
  background: #0f1621;
}
.pro-workspace .tag.active,
.pro-admin .tag.active {
  border-color: rgba(79,141,255,.34);
  background: rgba(79,141,255,.12);
}
.pro-workspace .badge,
.pro-admin .badge {
  box-shadow: none;
}
.pro-workspace .input,
.pro-workspace .select,
.pro-workspace .textarea,
.pro-admin .input,
.pro-admin .select,
.pro-admin .textarea {
  border-color: rgba(255,255,255,.055);
  background: #080d14;
}
.pro-workspace .input:hover,
.pro-workspace .select:hover,
.pro-workspace .textarea:hover,
.pro-admin .input:hover,
.pro-admin .select:hover,
.pro-admin .textarea:hover {
  border-color: rgba(126,176,255,.18);
}
.pro-workspace .input:focus,
.pro-workspace .select:focus,
.pro-workspace .textarea:focus,
.pro-admin .input:focus,
.pro-admin .select:focus,
.pro-admin .textarea:focus {
  border-color: rgba(79,141,255,.66);
  box-shadow: 0 0 0 3px rgba(47,123,255,.12);
}
.pro-workspace .q-card,
.pro-workspace .q-preview,
.pro-admin .panel,
.pro-admin .card,
.pro-admin .hero-strip,
.pro-admin .preview-shell {
  border-color: rgba(255,255,255,.06);
}
.pro-workspace .q-avatar,
.pro-workspace .q-template,
.pro-workspace .q-asset,
.pro-admin .metric-card,
.pro-admin .work-card,
.pro-admin .template-tile,
.pro-admin .feed-item,
.pro-admin .insight-card,
.pro-admin .avatar-list .thumb-card,
.pro-admin .asset-list .thumb-card,
.pro-admin .grid.cols-3 > .panel,
.pro-admin .grid.cols-2 > .panel,
.pro-admin .grid.cols-4 > .panel,
.pro-admin .panel:has([data-state="voice"]) .demo-state[data-name="default"] .grid.cols-3 > .panel {
  border-color: transparent;
}
.pro-workspace .q-avatar:hover,
.pro-workspace .q-template:hover,
.pro-workspace .q-asset:hover,
.pro-admin .work-card:hover,
.pro-admin .template-tile:hover,
.pro-admin .avatar-list .thumb-card:hover,
.pro-admin .asset-list .thumb-card:hover,
.pro-admin .feed-item:hover {
  border-color: rgba(126,176,255,.22);
}
.pro-workspace .q-avatar.active,
.pro-workspace .q-template.active,
.pro-admin .thumb-card.active,
.pro-admin .template-tile.active,
.pro-admin .avatar-list .thumb-card.active,
.pro-admin .asset-list .thumb-card.active {
  border-color: rgba(79,141,255,.58);
  box-shadow: inset 0 0 0 1px rgba(79,141,255,.14);
}
.pro-workspace .q-card-header,
.pro-admin .panel-header {
  border-bottom-color: rgba(255,255,255,.055);
}
.pro-admin .table th {
  border-bottom-color: rgba(255,255,255,.06);
}
.pro-admin .table td,
.pro-workspace .density-row,
.pro-admin .density-row {
  border-bottom-color: rgba(255,255,255,.045);
}
.pro-admin .table tr:hover td {
  background: rgba(79,141,255,.035);
}
.pro-workspace .segmented,
.pro-admin .segmented,
.pro-workspace .q-audio-mini,
.pro-workspace .q-audio-result,
.pro-workspace .q-tune-panel,
.pro-workspace .q-insert-list,
.pro-workspace .q-preview-tabs,
.pro-admin .state-switcher:not(.compact),
.pro-admin .floating-toolbar,
.pro-admin .template-tile .template-meta,
.pro-admin .thumb-info,
.pro-admin .panel:has([data-state="asset"]) .asset-list::after {
  border-color: rgba(255,255,255,.055);
}
.pro-workspace .q-video,
.pro-admin .video-preview {
  border-color: rgba(255,255,255,.055);
}
.pro-workspace .q-bottom {
  border-color: rgba(255,255,255,.065);
}

/* Works page density: keep list rows compact and give the review rail breathing room. */
.pro-admin .panel:has([data-state="works"]) .split-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
.pro-admin .panel:has([data-state="works"]) .sample-stack {
  display: grid;
  gap: 6px;
  align-self: start;
}
.pro-admin .panel:has([data-state="works"]) .work-card {
  grid-template-columns: 58px minmax(0, 1fr) 194px;
  min-height: 82px;
  padding: 8px 10px;
  gap: 10px;
  align-items: center;
  border-radius: 8px;
}
.pro-admin .panel:has([data-state="works"]) .work-card::before {
  top: 8px;
  bottom: 8px;
  width: 2px;
}
.pro-admin .panel:has([data-state="works"]) .work-cover {
  width: 58px;
  height: 64px;
  border-radius: 7px;
}
.pro-admin .panel:has([data-state="works"]) .work-card > div:nth-child(2) {
  min-width: 0;
}
.pro-admin .panel:has([data-state="works"]) .work-card > div:nth-child(2) .row {
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}
.pro-admin .panel:has([data-state="works"]) .work-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 20px;
}
.pro-admin .panel:has([data-state="works"]) .work-card .muted {
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 18px;
}
.pro-admin .panel:has([data-state="works"]) .work-card > .row:last-child {
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}
.pro-admin .panel:has([data-state="works"]) .quality-score {
  width: 34px;
  height: 34px;
  font-size: 12px;
  flex: 0 0 auto;
}
.pro-admin .panel:has([data-state="works"]) .work-card .btn {
  min-height: 36px;
  padding: 0 9px;
  font-size: 12px;
}
.pro-admin .panel:has([data-state="works"]) aside.panel {
  padding: 12px;
}
.pro-admin .panel:has([data-state="works"]) aside.panel .video-preview > img {
  max-height: 420px;
}

@media (max-width: 1280px) {
  .pro-admin .panel:has([data-state="works"]) .split-layout {
    grid-template-columns: 1fr;
  }
}

/* Spec-driven pages generated from ui-spec-for-codex.md */
.spec-page {
  --bg-primary: #090d13;
  --bg-card: linear-gradient(145deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)), #11161e;
  --border-card: rgba(255,255,255,0.09);
  --border-divider: rgba(255,255,255,0.06);
  --accent-blue: #2f73ff;
  --accent-blue-light: #4a88ff;
  --accent-green: #22c55e;
  --accent-red: #ef4444;
  --accent-yellow: #fbbf24;
  --accent-purple: #a855f7;
  --accent-teal: #16b99b;
}

.spec-page .main.spec-main {
  min-width: 1220px;
  padding: 20px 28px 36px;
}

.spec-page .brand {
  justify-content: center;
  padding-inline: 0;
}

.spec-page .brand strong {
  display: none;
}

.spec-route {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  margin-bottom: 8px;
  border-radius: 999px;
  color: #8db7ff;
  background: rgba(47, 115, 255, .1);
  border: 1px solid rgba(47, 115, 255, .2);
  font-size: 12px;
  font-weight: 700;
}

.spec-page .spec-topbar { margin-bottom: 16px; }

.spec-panel {
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,.034), rgba(255,255,255,.012)), #0c1119;
  border: 1px solid rgba(255,255,255,.075);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 18px 50px rgba(0,0,0,.18);
}

.spec-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.055);
}

.spec-panel-head h2,
.spec-hero h2 {
  margin: 0;
  font-size: 18px;
  line-height: 26px;
  letter-spacing: 0;
}

.spec-panel-head p,
.spec-hero p {
  margin: 3px 0 0;
  color: var(--text-muted);
}

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

.spec-grid .span-4 { grid-column: span 4; }
.spec-grid .span-5 { grid-column: span 5; }
.spec-grid .span-6 { grid-column: span 6; }
.spec-grid .span-7 { grid-column: span 7; }
.spec-grid .span-8 { grid-column: span 8; }
.spec-grid .span-12 { grid-column: span 12; }

.spec-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 14px;
}

.spec-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  min-height: 210px;
}

.spec-hero-preview {
  min-height: 210px;
  padding: 12px;
  border-radius: 14px;
  background: #080d14;
  border: 1px solid rgba(255,255,255,.06);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.spec-app-surface {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 14px;
  margin-bottom: 14px;
}

.spec-work-area,
.spec-side-panel {
  min-height: 420px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,.034), rgba(255,255,255,.012)), #0c1119;
  border: 1px solid rgba(255,255,255,.075);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 18px 50px rgba(0,0,0,.18);
}

.spec-work-area {
  display: grid;
  align-content: start;
  gap: 16px;
}

.spec-side-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  background: #080d14;
}

.spec-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.055);
}

.spec-section-head.slim {
  padding-bottom: 10px;
}

.spec-section-head h2 {
  margin: 8px 0 4px;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: 0;
}

.spec-section-head p {
  margin: 0;
  max-width: 720px;
  color: var(--text-muted);
}

.spec-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.spec-metric-card {
  min-height: 92px;
  padding: 13px;
  border-radius: 13px;
  background: #080d14;
  border: 1px solid rgba(255,255,255,.055);
}

.spec-metric-card small,
.spec-metric-card span {
  display: block;
  color: #7f8b9d;
  font-size: 12px;
  line-height: 18px;
}

.spec-metric-card strong {
  display: block;
  margin: 7px 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f6f8ff;
  font-size: 20px;
  line-height: 26px;
}

.spec-data-list {
  display: grid;
  gap: 8px;
}

.spec-data-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #080d14;
  border: 1px solid rgba(255,255,255,.045);
}

.spec-data-row.active {
  border-color: rgba(47,115,255,.28);
  background: linear-gradient(90deg, rgba(47,115,255,.08), rgba(8,13,20,1) 50%);
}

.spec-row-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #9ec0ff;
  background: rgba(47,115,255,.11);
  border: 1px solid rgba(47,115,255,.22);
  font-weight: 800;
}

.spec-data-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.spec-data-row p {
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}

.spec-form-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.spec-side-panel .spec-work-row {
  grid-template-columns: 76px minmax(0, 1fr);
}

.spec-side-panel .spec-work-row .badge {
  grid-column: 2;
  justify-self: start;
}

.spec-side-panel .api-list.compact {
  grid-template-columns: 1fr;
}

.spec-flow-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(360px, 1fr);
  gap: 14px;
}

.spec-flow-grid > .spec-panel {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.spec-handoff {
  margin-top: 4px;
}

.spec-handoff .spec-panel-head h2::after {
  content: "（交付明细）";
  margin-left: 6px;
  color: #657185;
  font-size: 12px;
  font-weight: 650;
}

.spec-table-wrap {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.055);
  background: rgba(5, 9, 15, .56);
}

.spec-table-wrap + .spec-table-wrap { margin-top: 10px; }

.spec-caption {
  padding: 10px 12px;
  color: #eaf1ff;
  font-weight: 750;
  border-bottom: 1px solid rgba(255,255,255,.055);
}

.spec-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.spec-table th,
.spec-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255,255,255,.045);
}

.spec-table th {
  color: #8f9bac;
  font-size: 12px;
  font-weight: 750;
  background: rgba(255,255,255,.018);
  white-space: nowrap;
}

.spec-table td {
  color: #c5cfde;
  font-size: 13px;
}

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

.spec-table code,
.api-list code {
  color: #9ec0ff;
  background: rgba(47, 115, 255, .095);
  border: 1px solid rgba(47, 115, 255, .16);
  border-radius: 6px;
  padding: 1px 5px;
}

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

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

.spec-form-grid .field {
  padding: 10px;
  border-radius: 12px;
  background: #080d14;
  border: 1px solid rgba(255,255,255,.055);
}

.spec-form-grid .field span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #dce5f4;
}

.spec-form-grid .field small { color: #768396; }

.required {
  color: #ff8191;
  font-style: normal;
}

.status-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.status-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--chip-color) 9%, #080d14);
  border: 1px solid color-mix(in srgb, var(--chip-color) 24%, transparent);
}

.status-chip strong { color: color-mix(in srgb, var(--chip-color) 70%, #fff); }
.status-chip span { color: #8b96a8; font-size: 12px; }

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

.api-list.compact code {
  font-size: 12px;
  line-height: 18px;
}

.api-list code {
  display: block;
  padding: 9px 10px;
  color: #b9ccff;
  white-space: normal;
}

.spec-list {
  margin: 0;
  padding-left: 18px;
  color: #c5cfde;
}

.spec-list li + li { margin-top: 6px; }
.spec-copy p { margin: 0 0 8px; color: #c5cfde; }

.spec-empty-line,
.spec-note {
  padding: 12px;
  border-radius: 12px;
  color: #8f9bac;
  background: #080d14;
  border: 1px dashed rgba(255,255,255,.09);
}

.spec-state-preview {
  min-height: 120px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border-radius: 14px;
  background: #080d14;
  border: 1px solid rgba(255,255,255,.055);
}

.loader {
  width: 26px;
  height: 26px;
  display: inline-block;
  border-radius: 50%;
  border: 3px solid rgba(47,115,255,.2);
  border-top-color: #2f73ff;
  animation: spin .9s linear infinite;
}

.switch {
  width: 42px;
  height: 24px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  position: relative;
}

.switch::after {
  content: "";
  width: 18px;
  height: 18px;
  position: absolute;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #fff;
  transition: transform 180ms var(--ease-out);
}

.switch.is-on { background: #2f73ff; }
.switch.is-on::after { transform: translateX(18px); }

.spec-work-row {
  width: 100%;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: #060a10;
  border: 1px solid rgba(255,255,255,.055);
}

.spec-work-row img {
  width: 74px;
  height: 92px;
  object-fit: cover;
  border-radius: 10px;
}

.spec-preview-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.spec-preview-cards .thumb-card { min-height: 0; }
.spec-preview-cards .thumb-card img {
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center top;
}

.voice-card.compact {
  width: 100%;
  min-height: 170px;
  padding: 14px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  border-radius: 14px;
  background: #060a10;
  border: 1px solid rgba(255,255,255,.055);
}

.voice-card.compact .q-waveform,
.voice-card.compact .spec-actions { grid-column: 1 / -1; }

@media (max-width: 1280px) {
  .spec-page .main.spec-main { min-width: 980px; }
  .spec-hero { grid-template-columns: 1fr; }
  .spec-app-surface,
  .spec-flow-grid { grid-template-columns: 1fr; }
  .spec-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec-grid .span-4,
  .spec-grid .span-5,
  .spec-grid .span-6,
  .spec-grid .span-7,
  .spec-grid .span-8 { grid-column: span 12; }
}

/* Core product pages: real UI, not spec-table pages. */
.core-page .brand strong { display: none; }
.core-page .main {
  min-width: 1180px;
}
.core-page .panel {
  margin-bottom: 14px;
  background: linear-gradient(180deg, rgba(12,17,25,.99), rgba(8,12,18,.99));
  border-color: rgba(255,255,255,.058);
}
.core-page .topbar {
  align-items: flex-start;
}
.core-page .top-metrics {
  flex-wrap: nowrap;
}
.core-page .metric {
  min-width: 112px;
}
.core-page .panel-header {
  min-height: 32px;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.core-page .panel-title {
  font-size: 14px;
  line-height: 20px;
}
.core-page .btn {
  min-height: 32px;
  border-radius: 7px;
}
.core-page .btn.large {
  height: 44px;
  font-size: 14px;
}
.core-hero,
.dashboard-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  min-height: 260px;
  margin-bottom: 14px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255,255,255,.034), rgba(255,255,255,.012)), #0c1119;
}
.core-hero h2 { margin: 12px 0 8px; font-size: 34px; line-height: 42px; letter-spacing: 0; }
.core-hero p { max-width: 620px; color: var(--text-muted); }
.dashboard-command {
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.dashboard-hero-panel {
  min-height: 278px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(79,141,255,.10), rgba(33,201,149,.04)), #0b1018;
}
.dashboard-hero-panel h2 {
  max-width: 820px;
  margin: 14px 0 8px;
  color: #f6f8fc;
  -webkit-text-fill-color: #f6f8fc;
  font-size: 30px;
  line-height: 38px;
  letter-spacing: 0;
}
.dashboard-hero-panel p {
  max-width: 760px;
  color: var(--text-muted);
}

.dashboard-preview-meta strong,
.dashboard-kpi-grid strong,
.dashboard-left .panel-title,
.dashboard-right .panel-title {
  color: #f6f8fc;
  -webkit-text-fill-color: #f6f8fc;
}
.dashboard-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}
.dashboard-preview-card {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 14px;
  background: #080d14;
}
.dashboard-preview-card img {
  width: 100%;
  height: 214px;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}
.dashboard-preview-meta {
  padding: 12px;
  background: #070b12;
}
.dashboard-preview-meta strong {
  color: #eef5ff;
}
.dashboard-preview-meta p {
  margin: 4px 0 0;
}
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.kpi-card {
  min-height: 86px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.055);
  background: linear-gradient(180deg, rgba(13,18,27,.96), rgba(7,11,17,.98));
}
.kpi-card span {
  display: block;
  color: #7f8b9d;
  font-size: 12px;
}
.kpi-card strong {
  display: block;
  margin-top: 8px;
  color: #eef5ff;
  font-size: 26px;
  line-height: 28px;
}
.kpi-card p {
  margin: 6px 0 0;
  color: #7f8b9d;
  font-size: 12px;
}
.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}
.dashboard-left,
.dashboard-right {
  display: grid;
  gap: 14px;
}
.dense-list .core-row {
  min-height: 70px;
}
.formula-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.formula-card.blue {
  border-color: rgba(79,141,255,.22);
}
.quick-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.quick-grid.compact a {
  min-height: 68px;
}
.dashboard-template-list,
.notification-mini-list {
  display: grid;
  gap: 8px;
}
.dashboard-template-list article,
.notification-mini-list article {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 58px;
  padding: 8px;
  border-radius: 9px;
  background: #080d14;
  border: 1px solid rgba(255,255,255,.045);
}
.dashboard-template-list img {
  width: 46px;
  height: 54px;
  object-fit: cover;
  border-radius: 7px;
}
.dashboard-template-list span,
.notification-mini-list p {
  display: block;
  margin: 2px 0 0;
  color: #7f8b9d;
  font-size: 12px;
}

.qiqi-onboarding-modal {
  background: linear-gradient(180deg, rgba(15, 22, 33, .98), rgba(8, 12, 18, .99)) !important;
  border: 1px solid rgba(132, 155, 194, .18);
  border-radius: 12px !important;
  color: #f6f8fc;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.qiqi-onboarding-modal h2,
.qiqi-onboarding-modal .text-slate-900,
.qiqi-onboarding-modal .text-slate-800,
.qiqi-onboarding-modal .text-slate-700 {
  color: #f6f8fc !important;
}

.qiqi-onboarding-modal .text-slate-600,
.qiqi-onboarding-modal .text-slate-500,
.qiqi-onboarding-modal .text-slate-400 {
  color: #8d99ab !important;
}

.qiqi-onboarding-modal .bg-white,
.qiqi-onboarding-modal .bg-slate-50,
.qiqi-onboarding-modal .bg-slate-100 {
  background: rgba(12, 18, 27, .92) !important;
}

.qiqi-onboarding-modal .border-slate-100,
.qiqi-onboarding-modal .border-slate-200 {
  border-color: rgba(132, 155, 194, .18) !important;
}

.qiqi-onboarding-modal .hover\:bg-brand-50:hover {
  background: rgba(47, 115, 255, .12) !important;
}

.qiqi-onboarding-modal .bg-brand-50 {
  background: rgba(47, 115, 255, .14) !important;
}

.qiqi-onboarding-modal .bg-brand-500 {
  background: #2f73ff !important;
}

.qiqi-onboarding-modal .text-brand-500,
.qiqi-onboarding-modal .text-brand-600 {
  color: #72a7ff !important;
}

.qiqi-onboarding-modal .text-white {
  color: #fff !important;
}

.qiqi-onboarding-modal button:disabled {
  opacity: .55;
}

.qiqi-redeem-dialog {
  background: linear-gradient(180deg, rgba(15, 22, 33, .98), rgba(8, 12, 18, .99)) !important;
  border: 1px solid rgba(132, 155, 194, .18);
  border-radius: 12px !important;
  color: #f6f8fc;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.qiqi-redeem-dialog h3,
.qiqi-redeem-dialog .text-slate-900,
.qiqi-redeem-dialog .text-slate-800,
.qiqi-redeem-dialog .text-slate-700 {
  color: #f6f8fc !important;
}

.qiqi-redeem-dialog .text-slate-600,
.qiqi-redeem-dialog .text-slate-500,
.qiqi-redeem-dialog .text-slate-400,
.qiqi-redeem-dialog .text-content-muted {
  color: #8d99ab !important;
}

.qiqi-redeem-dialog .bg-white,
.qiqi-redeem-dialog .bg-slate-50,
.qiqi-redeem-dialog .bg-brand-50 {
  background: rgba(12, 18, 27, .92) !important;
}

.qiqi-redeem-dialog input {
  border-color: rgba(132, 155, 194, .18);
  background: #070b12;
  color: #e7edf7;
}

.qiqi-redeem-dialog input::placeholder {
  color: #667285;
}

.qiqi-redeem-dialog button[type="submit"] {
  background: linear-gradient(180deg, #4f86f7, #2f6de9) !important;
}

.qiqi-ui-dialog-panel,
.qiqi-ui-sheet-panel {
  background: linear-gradient(180deg, rgba(15, 22, 33, .98), rgba(8, 12, 18, .99)) !important;
  border: 1px solid rgba(132, 155, 194, .18);
  color: #f6f8fc;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.qiqi-ui-dialog-panel h2,
.qiqi-ui-dialog-panel h3,
.qiqi-ui-dialog-panel .text-content-title,
.qiqi-ui-dialog-panel .text-slate-900,
.qiqi-ui-dialog-panel .text-slate-800,
.qiqi-ui-sheet-panel h2,
.qiqi-ui-sheet-panel h3,
.qiqi-ui-sheet-panel .text-slate-900,
.qiqi-ui-sheet-panel .text-slate-800 {
  color: #f6f8fc !important;
}

.qiqi-ui-dialog-panel .text-content-muted,
.qiqi-ui-dialog-panel .text-content-body,
.qiqi-ui-dialog-panel .text-slate-600,
.qiqi-ui-dialog-panel .text-slate-500,
.qiqi-ui-dialog-panel .text-slate-400,
.qiqi-ui-sheet-panel .text-slate-600,
.qiqi-ui-sheet-panel .text-slate-500,
.qiqi-ui-sheet-panel .text-slate-400 {
  color: #8d99ab !important;
}

.qiqi-ui-dialog-panel .bg-white,
.qiqi-ui-dialog-panel .bg-slate-50,
.qiqi-ui-dialog-panel .bg-slate-100,
.qiqi-ui-sheet-panel .bg-white,
.qiqi-ui-sheet-panel .bg-slate-50,
.qiqi-ui-sheet-panel .bg-slate-100 {
  background: rgba(12, 18, 27, .92) !important;
}

.qiqi-ui-dialog-panel .border-border,
.qiqi-ui-dialog-panel .border-slate-100,
.qiqi-ui-dialog-panel .border-slate-200,
.qiqi-ui-sheet-panel .border-slate-100,
.qiqi-ui-sheet-panel .border-slate-200 {
  border-color: rgba(132, 155, 194, .18) !important;
}

.qiqi-ui-dialog-panel input,
.qiqi-ui-dialog-panel textarea,
.qiqi-ui-dialog-panel select,
.qiqi-ui-sheet-panel input,
.qiqi-ui-sheet-panel textarea,
.qiqi-ui-sheet-panel select {
  border-color: rgba(132, 155, 194, .18) !important;
  background: #070b12 !important;
  color: #e7edf7 !important;
}
.notification-mini-list article {
  grid-template-columns: 30px minmax(0, 1fr);
}
.core-preview-mini {
  align-self: stretch;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: #080d14;
  border: 1px solid rgba(255,255,255,.055);
}
.core-preview-mini img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; object-position: center top; border-radius: 10px; }
.core-preview-mini div { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.core-grid { display: grid; gap: 14px; margin-bottom: 14px; }
.core-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.core-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.core-grid .span-2 { grid-column: span 2; }
.core-list { display: grid; gap: 8px; }
.core-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 9px 10px;
  border-radius: 9px;
  background: #080d14;
  border: 1px solid rgba(255,255,255,.05);
}
.core-row > img { width: 58px; height: 64px; object-fit: cover; border-radius: 8px; }
.core-row strong, .task-row strong { color: var(--text-primary); }
.core-row p, .task-row p { margin: 2px 0 0; color: var(--text-muted); }
.danger-line { border-color: rgba(239,68,68,.18); }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick-grid a, .formula-card {
  min-height: 82px;
  padding: 12px;
  border-radius: 10px;
  background: #080d14;
  border: 1px solid rgba(255,255,255,.055);
}
.quick-grid span, .formula-card p { display: block; margin-top: 5px; color: var(--text-muted); }
.formula-card { border-color: rgba(245,158,11,.22); }
.formula-card.pink { border-color: rgba(236,72,153,.22); }
.formula-card.red { border-color: rgba(239,68,68,.22); }
.waiting-layout, .detail-layout, .edit-layout, .publish-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}
.waiting-main {
  min-height: 560px;
  display: grid;
  place-items: center;
  text-align: center;
  align-content: center;
}
.progress-ring {
  width: 180px;
  height: 180px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: conic-gradient(#3f7fff 0 65%, #202936 65% 100%);
  position: relative;
}
.progress-ring::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: #080d14; }
.progress-ring span { position: relative; z-index: 1; font-size: 34px; font-weight: 800; }
.step-timeline { display: grid; gap: 10px; }
.step-timeline > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #080d14;
  border: 1px solid rgba(255,255,255,.055);
}
.step-timeline b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #121a25;
  color: var(--text-muted);
}
.step-timeline .done b { background: #1c7f6a; color: #fff; }
.step-timeline .running { border-color: rgba(47,115,255,.32); }
.step-timeline .running b { background: #2f73ff; color: #fff; }
.task-board { display: grid; gap: 8px; }
.task-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  min-height: 88px;
  padding: 12px;
  border-radius: 10px;
  background: #080d14;
  border: 1px solid rgba(255,255,255,.055);
}
.task-row.running { border-color: rgba(47,115,255,.24); }
.task-row.success { border-color: rgba(34,197,94,.2); }
.task-row-thumb {
  width: 82px;
  height: 122px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
  background: #050608;
}
.task-row-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}
.task-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
}
.task-row-main p {
  margin: 0;
  line-height: 20px;
}
.drawer { justify-content: flex-end; }
.drawer-panel { height: 100%; max-height: none; width: 460px; border-radius: 0; }
.detail-video .video-preview.detail {
  width: min(100%, 340px);
  margin: 0 auto;
}
.detail-video .video-preview.detail video,
.detail-video .video-preview.detail img {
  display: block;
  width: 100%;
  max-height: 540px;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #050608;
}
.spec-actions.vertical { display: grid; }
.script-block {
  margin: 0;
  padding: 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  background: #080d14;
  border: 1px solid rgba(255,255,255,.055);
  line-height: 26px;
}
.platform-dot {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
}
.platform-dot.red { background: #ff2442; }
.platform-dot.black { background: #020204; border: 1px solid rgba(255,255,255,.2); }
.platform-dot.green { background: #22c55e; }
.platform-dot.orange { background: #ff7a1a; }

/* Final /dashboard/works/[id] polish: refined work detail surface. */
.core-page .work-detail-page,
.pro-admin .work-detail-page {
  gap: 12px;
}
.core-page .work-detail-hero,
.pro-admin .work-detail-hero {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 12px;
  align-items: start;
}
.core-page .work-detail-page .panel,
.pro-admin .work-detail-page .panel {
  border-color: rgba(255,255,255,.055) !important;
  border-radius: 10px;
  background: rgba(8,12,18,.58) !important;
  box-shadow: none !important;
}
.core-page .work-detail-page .panel-header,
.pro-admin .work-detail-page .panel-header {
  min-height: 38px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.055);
}
.core-page .work-detail-page .panel-title,
.pro-admin .work-detail-page .panel-title {
  color: #e8edf6;
  font-size: 15px;
  font-weight: 760;
}
.core-page .work-detail-video-panel,
.pro-admin .work-detail-video-panel {
  padding: 14px !important;
}
.core-page .work-detail-video-panel .segmented,
.pro-admin .work-detail-video-panel .segmented {
  min-height: 34px;
  padding: 3px;
  border-color: rgba(255,255,255,.055);
  border-radius: 9px;
  background: rgba(5,8,14,.46);
}
.core-page .work-detail-video-panel .segmented .seg,
.pro-admin .work-detail-video-panel .segmented .seg {
  height: 28px;
  border-radius: 7px;
  color: #8e9aab;
  box-shadow: none;
}
.core-page .work-detail-video-panel .segmented .seg.active,
.pro-admin .work-detail-video-panel .segmented .seg.active {
  border-color: rgba(79,141,255,.28);
  background: rgba(79,141,255,.12);
  color: #dbe8ff;
  box-shadow: none;
}
.core-page .work-detail-video-panel .video-preview.detail,
.pro-admin .work-detail-video-panel .video-preview.detail {
  width: min(100%, 320px);
  border-color: rgba(255,255,255,.06);
  border-radius: 10px;
  background: rgba(3,5,8,.92);
  box-shadow: none;
}
.core-page .work-detail-video-panel .video-preview.detail video,
.pro-admin .work-detail-video-panel .video-preview.detail video {
  max-height: 500px;
  background: #030508;
}
.core-page .work-detail-video-panel .video-controls,
.pro-admin .work-detail-video-panel .video-controls {
  padding: 9px 10px;
  background: rgba(3,5,8,.72);
}
.core-page .work-detail-video-panel .timeline,
.pro-admin .work-detail-video-panel .timeline {
  height: 3px;
  margin-top: 0;
  background: rgba(115,130,155,.24);
}
.core-page .work-detail-video-panel .timeline span,
.pro-admin .work-detail-video-panel .timeline span {
  background: rgba(79,141,255,.82);
}
.core-page .work-detail-action-panel,
.pro-admin .work-detail-action-panel {
  padding: 12px !important;
}
.core-page .work-detail-action-panel .spec-actions.vertical,
.pro-admin .work-detail-action-panel .spec-actions.vertical {
  gap: 7px;
}
.core-page .work-detail-action-panel .btn,
.pro-admin .work-detail-action-panel .btn,
.core-page .work-detail-page .btn,
.pro-admin .work-detail-page .btn {
  min-height: 34px;
  border-radius: 8px;
  box-shadow: none;
}
.core-page .work-detail-page .btn.primary,
.pro-admin .work-detail-page .btn.primary {
  background: rgba(79,141,255,.16);
  border-color: rgba(79,141,255,.28);
  color: #dbe8ff;
}
.core-page .work-detail-page .btn.secondary,
.pro-admin .work-detail-page .btn.secondary,
.core-page .work-detail-page .btn.ghost,
.pro-admin .work-detail-page .btn.ghost {
  background: rgba(255,255,255,.025);
  border-color: rgba(255,255,255,.065);
  color: #c6cfdd;
}
.core-page .work-detail-page .btn.danger,
.pro-admin .work-detail-page .btn.danger {
  background: rgba(255,92,115,.08);
  border-color: rgba(255,128,148,.20);
  color: #ffc0cc;
}
.core-page .work-detail-info-grid,
.pro-admin .work-detail-info-grid {
  gap: 12px;
}
.core-page .work-detail-script-panel,
.core-page .work-detail-publish-panel,
.pro-admin .work-detail-script-panel,
.pro-admin .work-detail-publish-panel {
  padding: 14px !important;
}
.core-page .work-detail-script-panel .script-block,
.pro-admin .work-detail-script-panel .script-block {
  padding: 12px;
  border-color: rgba(255,255,255,.055);
  border-radius: 9px;
  background: rgba(6,10,16,.42);
  color: #aeb8c8;
  font-size: 13px;
  line-height: 24px;
}
.core-page .work-detail-publish-panel .core-list,
.pro-admin .work-detail-publish-panel .core-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 9px;
  background: rgba(6,10,16,.36);
}
.core-page .work-detail-publish-panel .core-row,
.pro-admin .work-detail-publish-panel .core-row {
  min-height: 62px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.core-page .work-detail-publish-panel .core-row + .core-row,
.pro-admin .work-detail-publish-panel .core-row + .core-row {
  border-top: 1px solid rgba(255,255,255,.045);
}
.core-page .work-detail-publish-panel .platform-dot,
.pro-admin .work-detail-publish-panel .platform-dot {
  width: 30px;
  height: 30px;
  font-size: 13px;
  background: rgba(79,141,255,.14);
  color: #bcd3ff;
}
.core-page .work-detail-publish-panel .inline-empty,
.pro-admin .work-detail-publish-panel .inline-empty {
  min-height: 90px;
  border-color: rgba(255,255,255,.055);
  border-radius: 9px;
  background: rgba(6,10,16,.36);
}
@media (max-width: 1080px) {
  .core-page .work-detail-hero,
  .pro-admin .work-detail-hero,
  .core-page .work-detail-info-grid,
  .pro-admin .work-detail-info-grid {
    grid-template-columns: 1fr;
  }
}

.template-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.template-strip .template-tile img { aspect-ratio: 9 / 16; height: auto; }
.edit-layout .q-preview, .publish-layout .q-preview { position: sticky; top: 18px; }
.platform-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.platform-card {
  min-height: 112px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.065);
  background: #080d14;
  color: var(--text-secondary);
}
.platform-card.active { border-color: rgba(47,115,255,.52); box-shadow: inset 0 0 0 1px rgba(47,115,255,.16); }
.platform-card.disabled { opacity: .45; }
.span-full { grid-column: 1 / -1; }
/* PC deliverable: keep desktop composition even in narrow preview panes. */
@media (max-width: 1280px) {
  .core-page .main { min-width: 1180px; }
}

.media-dashboard {
  display: grid;
  grid-template-columns: repeat(5, minmax(156px, 204px));
  justify-content: start;
  gap: 9px;
}
.media-dashboard a {
  min-height: 154px;
  display: grid;
  grid-template-rows: 78px auto auto;
  align-content: start;
  gap: 5px;
  padding: 9px;
  border-radius: 8px;
  background: #080d14;
  border: 1px solid rgba(255,255,255,.05);
}
.media-dashboard img {
  width: 100%;
  height: 78px;
  object-fit: cover;
  object-position: center top;
  border-radius: 7px;
  order: -1;
}
.media-dashboard .q-waveform {
  order: -1;
  height: 78px;
  margin: 0;
  border-radius: 8px;
  background: #060a10;
}
.media-dashboard strong { font-size: 13px; line-height: 19px; }
.media-dashboard span { color: var(--text-muted); font-size: 12px; line-height: 18px; }
.upload-zone {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  margin: 14px 0;
  padding: 24px;
  border-radius: 12px;
  background: #080d14;
  border: 1px dashed rgba(79,141,255,.32);
  color: var(--text-muted);
}
.voice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 280px));
  justify-content: start;
  gap: 10px;
}
.voice-tile {
  min-height: 158px;
  padding: 9px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px 10px;
  align-content: start;
  border-radius: 8px;
  background: #080d14;
  border: 1px solid rgba(255,255,255,.055);
}
.voice-tile > .avatar {
  width: 38px;
  height: 38px;
}
.voice-tile > .q-waveform,
.voice-tile > .q-audio-player,
.voice-tile > .row {
  grid-column: 1 / -1;
}
.voice-tile .q-waveform { height: 24px; margin-top: 0; }
.voice-tile .row { flex-wrap: nowrap; }
.voice-tile .btn { min-height: 28px; padding: 0 9px; font-size: 12px; }
.voice-card-panel {
  min-height: 220px;
  padding: 20px 22px;
  display: grid;
  gap: 18px;
  align-content: start;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(180deg, rgba(12,17,25,.98), rgba(8,13,20,.99));
}
.voice-card-head {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.voice-card-avatar {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  object-fit: cover;
}
.voice-card-meta {
  min-width: 0;
  display: grid;
  gap: 8px;
}
.voice-card-meta strong {
  color: #f3f7ff;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 760;
}
.voice-card-meta p {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
  color: #c0cada;
  font-size: 15px;
}
.voice-card-preview {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}
.voice-preview-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(8,13,20,.9);
}
.voice-preview-chip.is-ready {
  border-color: rgba(79,141,255,.22);
  background: rgba(15,26,43,.62);
}
.voice-preview-chip .q-round-play {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(79,141,255,.35);
  background: rgba(39,71,124,.32);
  color: #d8e5ff;
  font-size: 16px;
  line-height: 1;
}
.voice-preview-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}
.voice-preview-copy strong {
  color: #edf4ff;
  font-size: 15px;
  font-weight: 720;
  white-space: nowrap;
}
.voice-preview-copy span {
  color: #95a2b8;
  font-size: 13px;
  line-height: 1.4;
}
.voice-preview-wave {
  min-width: 0;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.05);
  background: rgba(8,13,20,.52);
}
.voice-preview-wave .q-waveform {
  width: min(100%, 220px);
  margin-top: 0;
}
.voice-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.voice-card-actions .btn {
  min-height: 52px;
  padding: 0 24px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 720;
}
.voice-card-actions .btn .inline {
  margin-right: 8px;
}
.voice-panel-note {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
}
.voice-management-table {
  display: grid;
  gap: 8px;
}
.voice-table-head,
.voice-row-card {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(160px, .8fr) minmax(150px, .72fr) 96px minmax(210px, auto);
  gap: 12px;
  align-items: center;
}
.voice-table-head {
  min-height: 34px;
  padding: 0 14px;
  color: #77849a;
  font-size: 12px;
  line-height: 18px;
}
.voice-row-card {
  min-height: 78px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(12,17,25,.98), rgba(8,13,20,.99));
  transition:
    background var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}
.voice-row-card:hover {
  border-color: rgba(126,176,255,.20);
  background: #0d1420;
}
.voice-row-main {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.voice-row-card .voice-card-avatar {
  width: 44px;
  height: 44px;
}
.voice-row-card .voice-card-meta {
  gap: 6px;
}
.voice-row-card .voice-card-meta strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #f3f7ff;
  font-size: 15px;
  line-height: 20px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.voice-row-card .voice-card-meta p {
  gap: 6px;
  font-size: 12px;
  line-height: 18px;
}
.voice-name-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 5px;
  max-width: 100%;
}
.voice-rename-btn {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #7f8ca0;
  background: transparent;
  transition:
    color var(--duration-base) var(--ease-out),
    background var(--duration-base) var(--ease-out);
}
.voice-rename-btn:hover {
  color: #dce8ff;
  background: rgba(255,255,255,.055);
}
.voice-rename-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}
.voice-rename-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px 44px;
  gap: 8px;
}
.voice-rename-form .input {
  height: 44px;
  min-height: 44px;
  padding: 0 10px;
}
.voice-rename-form .btn.icon {
  width: 44px;
  min-height: 44px;
  border-radius: 10px;
}
.voice-rename-form .btn.icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.25;
}
.voice-preview-status {
  display: grid;
  grid-template-columns: minmax(72px, 112px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  color: #8996ab;
  font-size: 12px;
}
.voice-preview-status .q-waveform {
  height: 22px;
  margin: 0;
  opacity: .78;
}
.voice-preview-status .q-live-waveform {
  width: 112px;
  gap: 4px;
  justify-content: flex-start;
}
.voice-preview-status .q-live-waveform i {
  height: calc(var(--bar-h, 18px) * .72);
}
.voice-preview-status span,
.voice-row-date {
  overflow: hidden;
  color: #8996ab;
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.voice-original-action .btn,
.voice-row-card .voice-card-actions .btn {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}
.voice-row-card .voice-card-actions {
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}
.voice-row-card .voice-card-actions .btn .inline,
.voice-original-action .btn .inline {
  margin-right: 6px;
}
.voice-row-card .voice-card-actions .voice-delete-icon {
  width: 36px;
  min-width: 36px;
  padding: 0;
  border-color: rgba(255,255,255,.08);
  background: rgba(255,255,255,.025);
  color: #a8b3c4;
  box-shadow: none;
}
.voice-row-card .voice-card-actions .voice-delete-icon:hover {
  border-color: rgba(255,128,148,.34);
  background: rgba(255,92,115,.11);
  color: #ffc0cc;
}
.voice-row-card .voice-card-actions .voice-delete-icon .inline {
  margin-right: 0;
}
@media (max-width: 960px) {
  .voice-card-preview {
    grid-template-columns: 1fr;
  }
  .voice-table-head {
    display: none;
  }
  .voice-row-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .voice-preview-status {
    grid-template-columns: minmax(96px, 140px) minmax(0, 1fr);
  }
  .voice-row-card .voice-card-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 360px));
  justify-content: start;
  gap: 14px;
}
.plan-card {
  min-height: 300px;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255,255,255,.034), rgba(255,255,255,.012)), #0c1119;
  border: 1px solid rgba(255,255,255,.075);
}
.plan-card.hot {
  border-color: rgba(251,191,36,.34);
  box-shadow: inset 0 0 0 1px rgba(251,191,36,.08);
}
.plan-card h2 {
  margin: 8px 0 0;
  color: #f6f8fc;
  -webkit-text-fill-color: #f6f8fc;
  font-size: 24px;
}
.plan-card > strong { font-size: 36px; line-height: 42px; }
.plan-card p { color: var(--text-muted); }
.qr-box {
  width: 180px;
  height: 180px;
  display: grid;
  place-items: center;
  margin: 12px auto;
  border-radius: 14px;
  background: rgba(7, 12, 20, .78);
  border: 1px solid rgba(132, 155, 194, .16);
  color: #d0d8e8;
  font-weight: 900;
  font-size: 32px;
}
.unread {
  background: rgba(47,115,255,.04);
  border-color: rgba(47,115,255,.16);
}
.platform-card { min-height: 82px; border-radius: 8px; }
.template-list {
  grid-template-columns: repeat(auto-fill, minmax(140px, 156px)) !important;
  justify-content: start;
  gap: 10px !important;
}
.template-tile .btn {
  width: max-content;
}
.avatar-list {
  grid-template-columns: repeat(auto-fill, minmax(140px, 156px)) !important;
  justify-content: start;
  gap: 10px !important;
}
.avatar-list .thumb-info {
  min-height: 78px;
}
.asset-list {
  grid-template-columns: repeat(auto-fill, minmax(140px, 156px)) !important;
  justify-content: start;
  gap: 10px !important;
}
.table th,
.table td {
  height: 46px;
}

.core-page .avatar-list,
.core-page .template-list,
.core-page .asset-list {
  grid-template-columns: repeat(auto-fill, minmax(140px, 156px)) !important;
  justify-content: start;
}
.core-page .avatar-list .thumb-card,
.core-page .template-list .template-tile,
.core-page .asset-list .thumb-card {
  width: 100%;
  border-radius: 8px;
  background: #080d14;
  border-color: rgba(255,255,255,.05);
  box-shadow: none;
}
.core-page .avatar-list .thumb-card img,
.core-page .template-list .template-tile img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center top;
}
.core-page .asset-list .thumb-card img {
  height: 94px;
  object-fit: cover;
}
.core-page .thumb-info,
.core-page .template-tile .template-meta {
  min-height: 78px;
  padding: 8px 9px;
  gap: 3px;
  background: #070b12;
}
.core-page .thumb-info strong,
.core-page .template-tile strong {
  font-size: 13px;
  line-height: 18px;
}
.core-page .thumb-info span,
.core-page .template-tile span {
  font-size: 11px;
  line-height: 17px;
  color: #7f8b9d;
}
.core-page .thumb-info .row,
.core-page .template-meta .row {
  gap: 5px;
}
.core-page .thumb-info .btn,
.core-page .template-meta .btn {
  min-height: 26px;
  padding: 0 8px;
  font-size: 11px;
}
.core-page .template-tile.active,
.core-page .thumb-card.active {
  border-color: rgba(79,141,255,.52);
  box-shadow: inset 0 0 0 1px rgba(79,141,255,.13);
}
.core-page .template-tile:hover,
.core-page .thumb-card:hover,
.voice-tile:hover,
.media-dashboard a:hover {
  transform: translateY(-1px);
  border-color: rgba(111,168,255,.22);
  background: #0a1018;
}
.core-page .table th {
  height: 36px;
}
.core-page .table td {
  height: 44px;
  font-size: 13px;
}

.template-market-layout,
.task-center-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 14px;
  align-items: start;
}

.template-market-layout .panel[data-state="tpl"] {
  min-width: 0;
}

.template-market-layout .template-list {
  grid-template-columns: repeat(auto-fill, minmax(150px, 172px)) !important;
}

.template-market-layout .template-tile {
  min-height: 0;
}

.template-market-layout .template-tile > img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center top;
  background: #050608;
}

.template-market-layout .template-inspector {
  width: 310px;
}

.template-inspector,
.task-inspector {
  top: 18px;
}
.template-inspector {
  position: sticky;
}
.task-inspector {
  position: static;
}
.template-inspector .compact-preview {
  width: min(100%, 220px);
  margin: 0 auto;
  border-radius: 10px;
}
.template-inspector .compact-preview img,
.task-inspector .compact-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 392px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center top;
  background: #050608;
}
.template-inspector .compact-preview .video-controls {
  position: static;
  padding: 10px 0 0;
  background: transparent;
}
.template-spec-list {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}
.template-spec-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 9px;
  border-radius: 8px;
  background: #080d14;
  border: 1px solid rgba(255,255,255,.045);
}
.template-spec-list span {
  color: var(--text-muted);
}
.template-spec-list strong {
  font-size: 12px;
}
.task-center-layout .task-row {
  min-height: 122px;
  padding: 10px 12px;
  border-radius: 9px;
}
.task-center-layout .task-row .progress {
  width: min(640px, 100%);
  margin-top: 8px;
}
.task-center-layout .task-row .btn {
  min-height: 30px;
  padding: 0 11px;
}
.step-timeline.compact {
  margin-top: 10px;
  gap: 6px;
}
.step-timeline.compact > div {
  min-height: 44px;
  padding: 7px 8px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
}
.step-timeline.compact b {
  width: 24px;
  height: 24px;
  font-size: 12px;
}
.step-timeline.compact strong,
.step-timeline.compact span {
  font-size: 12px;
}
.core-page .panel:has([data-state="tpl"]) {
  min-height: 0;
}
.core-page .panel:has([data-state="tpl"]) .template-list {
  min-height: 0;
}
.core-page .panel[data-state="works"] .split-layout {
  grid-template-columns: minmax(0, 1fr) 290px;
}
.core-page .panel[data-state="works"] .work-card {
  min-height: 78px;
  grid-template-columns: 50px minmax(0, 1fr) 168px;
  padding: 7px 9px;
}
.core-page .panel[data-state="works"] .work-cover {
  width: 50px;
  height: 58px;
}
.core-page .panel[data-state="works"] .quality-score {
  width: 32px;
  height: 32px;
}
.core-page .panel[data-state="works"] .work-card .btn {
  min-height: 36px;
  padding: 0 8px;
  font-size: 12px;
}
.core-page .panel[data-state="works"] aside.panel {
  padding: 10px;
}
.core-page .panel[data-state="works"] aside.panel .video-preview img {
  max-height: 360px;
}

/* Final works-list refinement: dense desktop management rows, not stretched cards. */
.core-page .panel[data-state="works"] {
  padding: 14px 16px;
}
.core-page .panel[data-state="works"] > .panel-header {
  padding-bottom: 10px;
  margin-bottom: 8px;
}
.core-page .panel[data-state="works"] .split-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}
.core-page .panel[data-state="works"] .sample-stack {
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(5, 9, 15, .38);
}
.core-page .panel[data-state="works"] .sample-stack.is-short-list {
  align-self: start;
  height: fit-content;
}
.core-page .panel[data-state="works"] .sample-stack .work-card {
  min-height: 88px;
  grid-template-columns: 56px minmax(0, 1fr) 218px;
  gap: 14px;
  padding: 12px 12px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.045);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.core-page .panel[data-state="works"] .sample-stack .work-card:last-child {
  border-bottom: 0;
}
.core-page .panel[data-state="works"] .sample-stack .work-card::before {
  display: none;
}
.core-page .panel[data-state="works"] .sample-stack .work-card:hover {
  background: rgba(14, 22, 34, .82);
  transform: none;
}
.core-page .panel[data-state="works"] .work-cover {
  width: 56px;
  height: 64px;
  border-radius: 8px;
}
.core-page .panel[data-state="works"] .work-card strong {
  font-size: 13px;
  line-height: 18px;
}
.core-page .panel[data-state="works"] .work-card .muted {
  margin-top: 3px;
  font-size: 12px;
  line-height: 17px;
}
.core-page .panel[data-state="works"] .sample-stack .work-card > .row:last-child {
  display: grid;
  grid-template-columns: 74px minmax(48px, auto) minmax(48px, auto);
  justify-content: end;
  align-items: center;
  gap: 7px;
}
.core-page .panel[data-state="works"] .quality-score {
  width: 74px;
  height: 34px;
  display: grid;
  align-content: center;
  gap: 1px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(63, 127, 255, .11);
  border: 1px solid rgba(63, 127, 255, .22);
  color: #cfe0ff;
  font-size: 11px;
  box-shadow: none;
}
.core-page .panel[data-state="works"] .quality-score b {
  font-size: 14px;
  line-height: 14px;
  color: #f4f7ff;
}
.core-page .panel[data-state="works"] .quality-score small {
  font-size: 10px;
  line-height: 12px;
  color: var(--text-muted);
}
.core-page .panel[data-state="works"] .quality-score.muted-score {
  background: rgba(125, 138, 157, .08);
  border-color: rgba(125, 138, 157, .18);
}
.core-page .panel[data-state="works"] .work-card .btn {
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 7px;
  white-space: nowrap;
}
.core-page .panel[data-state="works"] aside.panel {
  padding: 10px;
  min-height: 0;
}
.core-page .panel[data-state="works"] .preview-panel {
  position: static;
  align-self: start;
  height: fit-content;
  max-height: calc(100vh - 32px);
  overflow: visible;
}
.core-page .panel[data-state="works"] .preview-panel.is-stuck {
  position: fixed;
  top: 16px;
  right: 24px;
  width: 300px;
  z-index: 20;
  box-shadow: 0 18px 36px rgba(0,0,0,.24);
}
.core-page .panel[data-state="works"] aside.panel .video-preview img {
  display: block;
  max-height: 338px;
}

/* shadcn-inspired component baseline: one stable language for all generated product pages. */
.core-page {
  --surface-0: #05070b;
  --surface-1: #090d14;
  --surface-2: #0c111a;
  --surface-3: #101722;
  --line-1: rgba(255,255,255,.055);
  --line-2: rgba(255,255,255,.085);
  --ring: rgba(79,141,255,.18);
}
.core-page .main {
  background: var(--surface-0);
}
.core-page .topbar {
  border-bottom: 1px solid var(--line-1);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.core-page .title-block h1 {
  color: #f6f8fc;
  -webkit-text-fill-color: #f6f8fc;
  font-size: 28px;
  line-height: 34px;
  font-weight: 760;
}
.core-page .subtitle {
  font-size: 13px;
  line-height: 20px;
  color: #8a95a6;
}
.core-page .panel,
.core-page .card,
.core-page .metric,
.core-page .modal,
.core-page .toast,
.core-page .alert {
  background: linear-gradient(180deg, rgba(13,18,27,.98), rgba(8,12,18,.98));
  border: 1px solid var(--line-1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.026), 0 8px 24px rgba(0,0,0,.14);
}
.core-page .panel {
  border-radius: 10px;
  padding: 14px;
}
.core-page .panel-header {
  border-bottom-color: var(--line-1);
}
.core-page .panel-title {
  color: #f1f5fb;
  font-weight: 720;
}
.core-page .metric {
  height: 42px;
  min-width: 108px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #0b111a;
}
.core-page .metric small {
  color: #778294;
}
.core-page .metric strong {
  font-size: 14px;
}
.core-page .btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  border-color: var(--line-1);
  background: #0d1420;
  color: #e7edf7;
  box-shadow: none;
  font-weight: 660;
}
.core-page .btn:hover {
  background: #121b2a;
  border-color: rgba(126,176,255,.22);
}
.core-page .btn.primary {
  background: linear-gradient(180deg, #4f86f7, #2f6de9);
  border-color: rgba(126,176,255,.35);
  box-shadow: 0 8px 18px rgba(32,86,196,.18);
}
.core-page .btn.secondary {
  background: rgba(79,141,255,.10);
  border-color: rgba(79,141,255,.18);
  color: #d9e7ff;
}
.core-page .btn.ghost {
  background: transparent;
  border-color: transparent;
  color: #a8b3c4;
}
.core-page .btn.danger {
  background: rgba(255,92,115,.09);
  border-color: rgba(255,92,115,.18);
  color: #ffc2cb;
}
.core-page .input,
.core-page .select,
.core-page .textarea {
  min-height: 34px;
  border-radius: 8px;
  border-color: var(--line-1);
  background: #070b12;
  color: #e7edf7;
}
.core-page .input::placeholder,
.core-page .textarea::placeholder {
  color: #667285;
}
.core-page .input:hover,
.core-page .select:hover,
.core-page .textarea:hover {
  border-color: rgba(126,176,255,.18);
}
.core-page .input:focus,
.core-page .select:focus,
.core-page .textarea:focus {
  border-color: rgba(79,141,255,.58);
  box-shadow: 0 0 0 3px var(--ring);
}
.core-page .segmented,
.core-page .state-switcher:not(.compact) {
  padding: 3px;
  gap: 3px;
  border-radius: 9px;
  border-color: var(--line-1);
  background: #070b12;
}
.core-page .segmented .seg {
  height: 28px;
  border-radius: 7px;
  color: #8792a3;
}
.core-page .segmented .seg.active {
  background: rgba(79,141,255,.14);
  color: #dce9ff;
  box-shadow: inset 0 0 0 1px rgba(79,141,255,.30);
}
.core-page .badge {
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #121a26;
  color: #9ba7b8;
  font-size: 11px;
  font-weight: 680;
}
.core-page .badge.primary { background: rgba(79,141,255,.13); color: #93bbff; }
.core-page .badge.success { background: rgba(33,201,149,.12); color: #77dfbd; }
.core-page .badge.warning { background: rgba(245,184,75,.12); color: #ffd27d; }
.core-page .badge.danger { background: rgba(255,92,115,.12); color: #ff9aaa; }
.core-page .table th,
.core-page .table td {
  border-bottom-color: rgba(255,255,255,.045);
}
.core-page .table th {
  height: 34px;
  color: #778294;
  font-size: 11px;
}
.core-page .table td {
  height: 42px;
  color: #a8b3c4;
}
.core-page .table tr:hover td {
  background: rgba(79,141,255,.035);
}
.core-page .template-tile,
.core-page .thumb-card,
.core-page .voice-tile,
.core-page .work-card,
.core-page .task-row,
.core-page .core-row,
.core-page .platform-card,
.core-page .plan-card,
.core-page .formula-card {
  border-color: var(--line-1);
  background: linear-gradient(180deg, rgba(13,18,27,.96), rgba(7,11,17,.98));
  box-shadow: none;
}
.core-page .template-tile:hover,
.core-page .thumb-card:hover,
.core-page .voice-tile:hover,
.core-page .work-card:hover,
.core-page .task-row:hover,
.core-page .core-row:hover,
.core-page .platform-card:hover {
  border-color: rgba(126,176,255,.20);
  background: #0d1420;
}
.core-page .template-tile.active,
.core-page .thumb-card.active {
  border-color: rgba(79,141,255,.48);
  box-shadow: inset 0 0 0 1px rgba(79,141,255,.12);
}
.core-page .modal-backdrop {
  background: rgba(2,6,12,.72);
  backdrop-filter: blur(8px);
}
.core-page .modal {
  border-radius: 12px;
  padding: 16px;
}
.core-page .toast {
  border-radius: 10px;
}

/* Page state switcher, shared by all static deliverable pages. */
.page-state-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--line-1, rgba(255,255,255,.055));
  border-radius: 10px;
  background: rgba(8, 12, 18, .72);
}
.page-state-switcher > span {
  flex: 0 0 auto;
  color: #7f8b9d;
  font-size: 12px;
  font-weight: 680;
  white-space: nowrap;
}
.page-state-switcher .segmented {
  flex: 1;
  min-width: 0;
}
.page-state-switcher .segmented .seg {
  flex: 1;
  white-space: nowrap;
}
.page-state-panel {
  display: none;
  margin-bottom: 14px;
}
.page-state-panel.open {
  display: block;
}
.page-state-panel .state-card {
  min-height: 360px;
}
.core-page .state-card.empty {
  background: linear-gradient(180deg, rgba(9,14,22,.72), rgba(6,10,16,.92));
  border-color: rgba(255,255,255,.055);
}
.core-page .state-card.empty .btn.primary,
.core-page .state-card.empty.compact .btn.primary {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(54,103,205,.92), rgba(36,78,165,.94));
  border-color: rgba(111,159,255,.28);
  color: #edf4ff;
  font-size: 14px;
  font-weight: 760;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.core-page .state-card.empty .btn.primary:hover,
.core-page .state-card.empty.compact .btn.primary:hover {
  background: linear-gradient(180deg, rgba(69,122,224,.96), rgba(45,91,188,.98));
  border-color: rgba(132,180,255,.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
}
.core-page .state-card.empty .btn.primary::after,
.core-page .state-card.empty.compact .btn.primary::after {
  content: "→";
  margin-left: 2px;
  color: rgba(237,244,255,.78);
  font-weight: 780;
}
body[data-page-state="loading"] .page-state-content,
body[data-page-state="empty"] .page-state-content,
body[data-page-state="error"] .page-state-content {
  display: none;
}
body[data-page-state="loading"] [data-state-view="loading"],
body[data-page-state="empty"] [data-state-view="empty"],
body[data-page-state="error"] [data-state-view="error"] {
  display: block;
}
body:not([data-page-state]),
body[data-page-state="default"] {
  --state-active: default;
}

/* Smart edit page */
.smart-edit-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 310px;
  gap: 14px;
  align-items: start;
}
.edit-template-market {
  position: sticky;
  top: 18px;
}
.edit-template-list {
  display: grid;
  gap: 9px;
}
.edit-template-list .template-tile {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 86px;
}
.edit-template-list .template-tile img {
  height: 100%;
  min-height: 86px;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}
.edit-template-list .template-meta {
  padding: 9px;
}
.edit-player-grid {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(280px, 1fr);
  gap: 14px;
  align-items: start;
}
.edit-player-grid .video-preview img {
  aspect-ratio: 9 / 13;
  max-height: 470px;
}
.edit-playhead {
  position: absolute;
  left: 12px;
  top: 12px;
  height: 26px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(0,0,0,.58);
  color: #dce7f7;
  font-size: 12px;
}
.edit-inspector {
  margin: 0;
}
.edit-timeline {
  position: relative;
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: #070b12;
  border: 1px solid rgba(255,255,255,.055);
}
.timeline-ruler {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  color: #6f7b8e;
  font-size: 11px;
}
.timeline-track {
  position: relative;
  height: 34px;
  padding-left: 54px;
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  overflow: hidden;
}
.timeline-track b {
  position: absolute;
  left: 10px;
  top: 7px;
  color: #8995a8;
  font-size: 12px;
}
.clip {
  position: absolute;
  left: calc(54px + var(--x));
  width: calc(var(--w) - 8px);
  top: 6px;
  height: 22px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(79,141,255,.22);
  color: #dce9ff;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clip-b { background: rgba(33,201,149,.20); color: #a9efd8; }
.clip-c { background: rgba(245,184,75,.18); color: #ffe0a3; }
.clip.subtitle { background: rgba(168,85,247,.20); color: #dfc6ff; }
.clip.asset { background: rgba(79,195,215,.18); color: #b7f3fb; }
.timeline-cursor {
  position: absolute;
  top: 30px;
  bottom: 10px;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79,141,255,.18);
}
.ai-suggest-panel {
  position: sticky;
  top: 18px;
}
.ai-suggestion {
  display: grid;
  gap: 7px;
  padding: 10px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.055);
  background: #080d14;
  margin-bottom: 8px;
}
.ai-suggestion.active {
  border-color: rgba(79,141,255,.36);
  background: rgba(79,141,255,.08);
}
.ai-suggestion p {
  margin: 0;
  color: #8792a3;
  font-size: 12px;
  line-height: 18px;
}
.edit-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  margin-top: 14px;
}
.subtitle-editor {
  display: grid;
  gap: 8px;
}
.subtitle-mini-timeline {
  position: relative;
  height: 36px;
  margin-bottom: 12px;
  border-radius: 9px;
  background: rgba(7, 12, 20, .7);
  border: 1px solid rgba(47, 62, 82, .48);
  overflow: hidden;
}
.subtitle-mini-timeline span {
  position: absolute;
  left: var(--x);
  width: var(--w);
  top: 6px;
  bottom: 6px;
  display: flex;
  align-items: center;
  padding-left: 9px;
  border-radius: 7px;
  background: rgba(63, 127, 255, .2);
  color: #cfe0ff;
  font-size: 12px;
  font-weight: 700;
}
.subtitle-editor > div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.subtitle-editor span {
  color: #7f8b9d;
  font-size: 12px;
}
.subtitle-editor .active {
  padding: 8px;
  margin: -8px;
  border-radius: 8px;
  background: rgba(79,141,255,.07);
}
.wide-modal {
  width: min(880px, 100%);
}
.modal-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ai-template-entry {
  min-height: 224px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  background:
    radial-gradient(circle at 20% 10%, rgba(63,127,255,.24), transparent 30%),
    rgba(7, 12, 20, .72);
}
.ai-template-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(63,127,255,.18);
  border: 1px solid rgba(63,127,255,.35);
  color: #a9c9ff;
  font-weight: 900;
}
.render-progress-overview {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.render-ring {
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, #07101a 58%, transparent 59%),
    conic-gradient(var(--primary) var(--progress), rgba(47,62,82,.7) 0);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 12px 28px rgba(0,0,0,.22);
}
.render-ring strong {
  font-size: 24px;
}
.render-ring span {
  color: var(--text-muted);
  font-size: 12px;
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

/* Publish page */
.publish-main {
  display: grid;
  gap: 14px;
}
.publish-platforms {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.publish-form {
  margin-top: 0;
}
.publish-form .span-full {
  grid-column: span 2;
}
.ai-title-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.publish-schedule {
  display: grid;
  grid-template-columns: 150px 180px 150px auto;
  gap: 10px;
  align-items: end;
}
.publish-preview {
  align-self: start;
}
.confirm-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.confirm-summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #080d14;
}
.confirm-summary span {
  color: #8792a3;
}

/* Template market additions */
.template-tabs .seg {
  min-width: 82px;
}
.market-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 156px)) !important;
}
.fav-btn {
  position: absolute;
  right: 7px;
  top: 7px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(0,0,0,.48);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
}
.fav-btn.active {
  color: #ffd17a;
}

/* P0 precise additions */
.mode-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 10px;
  color: var(--text-muted);
}
.mode-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.mode-entry {
  min-height: 52px;
  display: grid;
  align-content: center;
  gap: 2px;
  text-align: left;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(47, 62, 82, .78);
  background: rgba(13, 20, 31, .78);
  color: var(--text-secondary);
  transition: border-color var(--duration-base), background var(--duration-base), box-shadow var(--duration-base);
}
.mode-entry strong {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mode-entry span {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mode-entry.active {
  border-color: rgba(79, 141, 255, .9);
  background: linear-gradient(180deg, rgba(27, 48, 86, .84), rgba(16, 27, 45, .84));
  box-shadow: inset 0 0 0 1px rgba(79, 141, 255, .22), 0 10px 24px rgba(0, 0, 0, .18);
}
.script-mode-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 7px 10px;
  margin-bottom: 10px;
  border-radius: var(--radius-md);
  background: rgba(7, 12, 20, .5);
  border: 1px solid rgba(47, 62, 82, .42);
  color: var(--text-muted);
  font-size: 12px;
}
.script-mode-summary strong {
  color: #bcd5ff;
  font-size: 13px;
}
.mode-drawer {
  display: none;
  margin: 10px 0 12px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(79, 141, 255, .28);
  background: linear-gradient(180deg, rgba(22, 34, 53, .96), rgba(13, 20, 31, .96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 14px 30px rgba(0, 0, 0, .2);
}
.mode-drawer.open {
  display: block;
  animation: drawer-down var(--duration-slow) var(--ease-spring);
}
.mode-drawer-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.mode-drawer-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
}
.mode-drawer-head p {
  margin: 4px 0 0;
  color: var(--text-muted);
}
.mode-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(7, 12, 20, .46);
}
.mode-drawer-footer span {
  color: var(--text-muted);
}
.chip-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.chip-field > span {
  width: 44px;
  color: var(--text-secondary);
  font-weight: 650;
}
.script-editor-wrap {
  position: relative;
  margin-top: 2px;
}
.script-main-textarea {
  min-height: 142px;
  padding-bottom: 34px;
}
.script-count {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
  pointer-events: none;
}
.creator-type-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}
.mode-form-grid { margin: 10px 0; }
.mode-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(47, 62, 82, .58);
  background: rgba(7, 12, 20, .52);
}
.mode-panel[hidden] { display: none; }
.mode-panel .span-full { grid-column: 1 / -1; }
.textarea.small { min-height: 72px; }
.q-bgm-control {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(47, 62, 82, .55);
  background: rgba(6, 10, 17, .48);
}
.q-bgm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 120px;
  gap: 10px;
  margin-top: 10px;
  align-items: end;
}
.q-tune-panel .q-bgm-control {
  padding: 10px;
  display: grid;
  gap: 8px;
}
.q-tune-panel .q-bgm-control .field {
  margin: 0;
}
.q-mix-switches {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.q-mix-switches .q-compact-row {
  min-width: 128px;
  padding: 0 10px;
  border: 1px solid rgba(47, 62, 82, .55);
  border-radius: var(--radius-full);
  background: rgba(7, 12, 20, .45);
}
.titlebar-control {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(47, 62, 82, .55);
}
.media-tabs .media-tab-panel { min-height: 0; }
.media-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.media-workspace {
  display: block;
  width: 100%;
}
.media-workspace .media-tabs {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.media-workspace .panel-header {
  min-height: 58px;
  align-items: center;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: 12px;
}
.media-workspace .media-toolbar {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(42, 54, 72, .55);
  border-radius: 10px;
  background: rgba(7, 11, 18, .58);
}
.media-workspace .media-toolbar > div {
  display: grid;
  gap: 3px;
}
.media-workspace .media-toolbar strong {
  color: #f5f8ff;
  font-size: 15px;
  font-weight: 780;
}
.media-workspace .media-toolbar span {
  color: #8d99ab;
  font-size: 12px;
  line-height: 18px;
}
.media-workspace .segmented {
  min-height: 40px;
  padding: 5px;
  gap: 5px;
  background: rgba(5, 8, 14, .58);
  border-color: rgba(36, 47, 64, .62);
}
.media-workspace .segmented .seg {
  min-width: 96px;
  height: 34px;
  font-weight: 740;
}
.media-workspace .state-card.empty.compact {
  min-height: 260px;
  border: 1px dashed rgba(84, 137, 255, .24);
  background: rgba(7, 11, 18, .46);
}
.media-workspace .state-card.empty.compact .btn {
  margin-top: 12px;
}
.media-workspace .center-actions {
  justify-content: center;
  margin-top: 12px;
}
.media-workspace .media-works-list {
  gap: 10px;
  min-height: 0;
}
.media-toolbar .input { max-width: 420px; }
.media-works-list .core-row {
  min-height: 82px;
}
.media-workspace .asset-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
  min-width: 208px;
}
.media-workspace .asset-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
}
.media-workspace .media-voice-actions {
  display: flex;
  justify-content: flex-end;
}
.core-page .media-workspace .asset-primary-action,
.media-workspace .asset-primary-action {
  min-width: 92px;
  min-height: 40px;
  padding: 0 20px;
  border-radius: 10px;
  border-color: rgba(79,141,255,.30);
  background: linear-gradient(180deg, rgba(25,45,75,.94), rgba(12,26,48,.96));
  color: #e7f0ff;
  font-size: 13px;
  font-weight: 760;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.core-page .media-workspace .asset-primary-action:hover,
.media-workspace .asset-primary-action:hover {
  border-color: rgba(99,161,255,.46);
  background: linear-gradient(180deg, rgba(37,70,116,.98), rgba(18,38,70,.98));
}
.core-page .media-workspace .asset-icon-btn,
.media-workspace .asset-icon-btn {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 10px;
  border-color: rgba(255,255,255,.08);
  background: rgba(255,255,255,.025);
  color: #a8b3c4;
  box-shadow: none;
}
.core-page .media-workspace .asset-icon-btn:hover,
.media-workspace .asset-icon-btn:hover {
  border-color: rgba(126,176,255,.26);
  background: rgba(79,141,255,.08);
  color: #dce8ff;
}
.core-page .media-workspace .asset-danger-action,
.media-workspace .asset-danger-action {
  color: #a8b3c4;
}
.core-page .media-workspace .asset-danger-action:hover,
.media-workspace .asset-danger-action:hover {
  border-color: rgba(255,128,148,.34);
  background: rgba(255,92,115,.11);
  color: #ffc0cc;
}
.media-avatar-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 220px));
  align-items: start;
}
.media-workspace .media-avatar-grid .thumb-card {
  min-height: 316px;
}
.media-workspace .media-avatar-grid .thumb-card img {
  height: 220px;
  object-position: center top;
}
.media-workspace .media-avatar-grid .thumb-info {
  display: grid;
  align-items: stretch;
  gap: 7px;
}
.media-workspace .media-avatar-grid .thumb-info > .row {
  justify-content: space-between;
}
.media-workspace .template-list.market-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
}
.media-workspace .template-list.market-grid .template-tile img {
  height: auto;
  aspect-ratio: 9 / 16;
}
.core-page .dashboard-avatar-grid,
.dashboard-avatar-grid {
  grid-template-columns: repeat(auto-fill, minmax(156px, 156px)) !important;
  justify-content: start;
  align-items: start;
  gap: 10px !important;
}
.core-page .dashboard-avatar-grid .thumb-card,
.dashboard-avatar-grid .thumb-card {
  min-height: 0;
}
.core-page .dashboard-avatar-grid .thumb-card img,
.dashboard-avatar-grid .thumb-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 13 !important;
  object-position: center top;
}
.core-page .dashboard-avatar-grid .thumb-info,
.dashboard-avatar-grid .thumb-info {
  display: grid;
  align-items: stretch;
  grid-template-rows: minmax(34px, auto) 20px 34px;
  gap: 6px;
  padding: 9px;
  min-height: 106px;
}
.dashboard-avatar-grid .thumb-info p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
}
.dashboard-avatar-name-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  gap: 6px;
  align-items: start;
  min-width: 0;
}
.dashboard-avatar-name-line strong {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: #f1f5fb;
  font-size: 13px;
  line-height: 17px;
  font-weight: 760;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.avatar-rename-btn {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: transparent;
  color: #8190a5;
  transition:
    background var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out);
}
.avatar-rename-btn:hover {
  background: rgba(255,255,255,.055);
  color: #dce8ff;
}
.avatar-rename-btn svg {
  width: 15px;
  height: 15px;
}
.dashboard-avatar-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  font-size: 12px;
}
.avatar-rename-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px 36px;
  gap: 6px;
  align-items: center;
}
.avatar-rename-form .input {
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
}
.avatar-rename-form .btn.icon {
  width: 36px;
  min-height: 36px;
  border-radius: 9px;
}
.avatar-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
}
.core-page .avatar-card-actions .btn,
.avatar-card-actions .btn {
  width: 100%;
  min-height: 34px !important;
  padding: 0 8px;
  justify-content: center;
  border-radius: 9px;
  font-size: 12px !important;
  white-space: nowrap;
}
.core-page .avatar-card-actions .btn.secondary,
.avatar-card-actions .btn.secondary {
  background: linear-gradient(180deg, rgba(25,45,75,.94), rgba(12,26,48,.96));
  border-color: rgba(79,141,255,.30);
  color: #e7f0ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.core-page .avatar-card-actions .btn.secondary:hover,
.avatar-card-actions .btn.secondary:hover {
  background: linear-gradient(180deg, rgba(37,70,116,.98), rgba(18,38,70,.98));
  border-color: rgba(99,161,255,.46);
}
.core-page .avatar-card-actions .avatar-delete-icon,
.avatar-card-actions .avatar-delete-icon {
  width: 36px;
  min-width: 36px;
  padding: 0;
  background: rgba(255,255,255,.025);
  border-color: rgba(255,255,255,.08);
  color: #a8b3c4;
  box-shadow: none;
}
.core-page .avatar-card-actions .avatar-delete-icon:hover,
.avatar-card-actions .avatar-delete-icon:hover {
  background: rgba(255,92,115,.11);
  border-color: rgba(255,128,148,.34);
  color: #ffc0cc;
}
.avatar-card-actions .btn .inline {
  margin-right: 0;
}
.avatar-card-actions .btn svg {
  width: 14px;
  height: 14px;
}
.compact-voice-grid {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
}
.ip-analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}
.ip-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ip-summary-grid article {
  min-height: 124px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(7, 12, 20, .58);
  border: 1px solid rgba(47, 62, 82, .55);
}
.ip-summary-grid span,
.template-spec-list span {
  color: var(--text-muted);
  font-size: 12px;
}
.ip-summary-grid strong {
  display: block;
  margin: 4px 0 6px;
  font-size: 16px;
}
.ip-summary-grid p { margin: 0; color: var(--text-secondary); }
.ip-analysis-detail {
  margin-bottom: 14px;
}
.analysis-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.analysis-detail-grid article {
  min-height: 126px;
  padding: 13px;
  border-radius: var(--radius-md);
  background: rgba(7, 12, 20, .56);
  border: 1px solid rgba(255,255,255,.052);
}
.analysis-detail-grid span {
  color: var(--text-muted);
  font-size: 12px;
}
.analysis-detail-grid strong {
  display: block;
  margin: 5px 0 7px;
  font-size: 15px;
}
.analysis-detail-grid p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 18px;
}
.analysis-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr);
  gap: 12px;
  margin: 14px 0;
}
.analysis-split h4 {
  margin: 0 0 10px;
  font-size: 14px;
}
.analysis-loading {
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(245, 184, 75, .08);
  border: 1px solid rgba(245, 184, 75, .22);
}
.analysis-loading p {
  margin: 4px 0 10px;
  color: var(--text-muted);
  font-size: 12px;
}
.topic-table {
  margin-top: 8px;
}
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--radius-full);
  background: rgba(63, 127, 255, .1);
  color: #bfd7ff;
}
.render-modal { width: min(680px, 100%); }
.render-progress {
  margin: 14px 0;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(7, 12, 20, .58);
  border: 1px solid rgba(63, 127, 255, .2);
}
.render-progress-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.render-step-list { display: grid; gap: 8px; margin-bottom: 14px; }
.render-step {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 64px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius-md);
  background: rgba(9, 14, 22, .72);
  border: 1px solid rgba(47, 62, 82, .5);
}
.render-step > span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: #121b29;
}
.render-step strong { display: block; }
.render-step p { margin: 2px 0 0; color: var(--text-muted); font-size: 12px; }
.render-step em { font-style: normal; color: var(--text-muted); font-size: 12px; text-align: right; }
.render-step.done > span { background: var(--success); border-color: rgba(112, 229, 189, .45); }
.render-step.done > span::before { content: "✓"; display: grid; place-items: center; height: 100%; font-size: 12px; color: #05261b; font-weight: 900; }
.render-step.running { border-color: rgba(63, 127, 255, .45); background: rgba(63, 127, 255, .1); }
.render-step.running > span { background: var(--primary); border-color: rgba(142, 186, 255, .55); box-shadow: 0 0 0 4px rgba(63, 127, 255, .12); }

/* Final /dashboard/works/[id]/edit polish: lighter editing workspace. */
.core-page .work-edit-page,
.pro-admin .work-edit-page {
  gap: 12px;
}
.core-page .work-edit-layout,
.pro-admin .work-edit-layout {
  grid-template-columns: 210px minmax(0, 1fr) 286px;
  gap: 12px;
}
.core-page .work-edit-page .panel,
.pro-admin .work-edit-page .panel {
  border-color: rgba(255,255,255,.055) !important;
  border-radius: 10px;
  background: rgba(8,12,18,.58) !important;
  box-shadow: none !important;
}
.core-page .work-edit-page .panel-header,
.pro-admin .work-edit-page .panel-header {
  min-height: 36px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.055);
}
.core-page .work-edit-page .panel-title,
.pro-admin .work-edit-page .panel-title {
  color: #e8edf6;
  font-size: 15px;
  font-weight: 760;
}
.core-page .work-edit-page .btn,
.pro-admin .work-edit-page .btn {
  min-height: 34px;
  border-radius: 8px;
  box-shadow: none;
}
.core-page .work-edit-page .btn.primary,
.pro-admin .work-edit-page .btn.primary {
  background: rgba(79,141,255,.16);
  border-color: rgba(79,141,255,.28);
  color: #dbe8ff;
}
.core-page .work-edit-page .btn.secondary,
.core-page .work-edit-page .btn.ghost,
.pro-admin .work-edit-page .btn.secondary,
.pro-admin .work-edit-page .btn.ghost {
  background: rgba(255,255,255,.025);
  border-color: rgba(255,255,255,.065);
  color: #c6cfdd;
}
.core-page .work-edit-template-panel,
.core-page .work-edit-config-panel,
.pro-admin .work-edit-template-panel,
.pro-admin .work-edit-config-panel {
  top: 16px;
  padding: 12px !important;
}
.core-page .work-edit-template-panel .panel-header .btn,
.pro-admin .work-edit-template-panel .panel-header .btn {
  min-height: 30px;
  padding: 0 10px;
}
.core-page .work-edit-template-panel .edit-template-list,
.pro-admin .work-edit-template-panel .edit-template-list {
  gap: 7px;
}
.core-page .work-edit-template-panel .edit-template-list .template-tile,
.pro-admin .work-edit-template-panel .edit-template-list .template-tile {
  min-height: 70px;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  padding: 7px;
  border-color: rgba(255,255,255,.055);
  border-radius: 9px;
  background: rgba(6,10,16,.38);
  box-shadow: none;
}
.core-page .work-edit-template-panel .edit-template-list .template-tile.active,
.pro-admin .work-edit-template-panel .edit-template-list .template-tile.active {
  border-color: rgba(79,141,255,.32);
  background: rgba(79,141,255,.08);
  box-shadow: inset 2px 0 0 rgba(79,141,255,.72);
}
.core-page .work-edit-template-panel .edit-template-list .template-thumb,
.pro-admin .work-edit-template-panel .edit-template-list .template-thumb {
  width: 48px;
  border-radius: 8px;
}
.core-page .work-edit-template-panel .template-meta,
.pro-admin .work-edit-template-panel .template-meta {
  padding: 0;
  gap: 4px;
}
.core-page .work-edit-template-panel .template-meta strong,
.pro-admin .work-edit-template-panel .template-meta strong {
  color: #eef3fb;
  font-size: 12px;
  line-height: 16px;
}
.core-page .work-edit-template-panel .template-meta span,
.pro-admin .work-edit-template-panel .template-meta span {
  color: #7f8b9d;
  font-size: 11px;
  line-height: 15px;
}
.core-page .work-edit-stage-panel,
.pro-admin .work-edit-stage-panel {
  padding: 14px !important;
}
.core-page .work-edit-stage-panel .spec-actions,
.pro-admin .work-edit-stage-panel .spec-actions {
  gap: 7px;
}
.core-page .work-edit-stage-panel .edit-player-grid,
.pro-admin .work-edit-stage-panel .edit-player-grid {
  grid-template-columns: minmax(0, 300px) minmax(240px, 1fr);
  gap: 12px;
}
.core-page .work-edit-stage-panel .video-preview.positioned,
.pro-admin .work-edit-stage-panel .video-preview.positioned {
  width: 100%;
  max-width: 300px;
  min-height: 0;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  border-color: rgba(255,255,255,.06);
  border-radius: 10px;
  background: rgba(3,5,8,.92) !important;
  box-shadow: none;
}
.core-page .work-edit-stage-panel .edit-play-btn,
.pro-admin .work-edit-stage-panel .edit-play-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(10,14,22,.62);
  box-shadow: none;
  backdrop-filter: blur(10px);
}
.core-page .work-edit-inspector-panel,
.pro-admin .work-edit-inspector-panel {
  padding: 12px !important;
}
.core-page .work-edit-inspector-panel .field,
.pro-admin .work-edit-inspector-panel .field {
  gap: 6px;
}
.core-page .work-edit-page .select,
.core-page .work-edit-page .input,
.pro-admin .work-edit-page .select,
.pro-admin .work-edit-page .input {
  min-height: 34px;
  border-color: rgba(255,255,255,.055);
  border-radius: 8px;
  background: rgba(5,8,13,.54);
}
.core-page .work-edit-inspector-panel .density-row,
.pro-admin .work-edit-inspector-panel .density-row {
  min-height: 34px;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,.045);
}
.core-page .work-edit-stage-panel .edit-timeline,
.pro-admin .work-edit-stage-panel .edit-timeline {
  margin-top: 12px;
  padding: 10px;
  border-color: rgba(255,255,255,.055);
  border-radius: 9px;
  background: rgba(6,10,16,.38);
}
.core-page .work-edit-stage-panel .timeline-track,
.pro-admin .work-edit-stage-panel .timeline-track {
  height: 30px;
  background: rgba(255,255,255,.022);
}
.core-page .work-edit-stage-panel .timeline-track b,
.pro-admin .work-edit-stage-panel .timeline-track b {
  top: 6px;
  color: #8793a6;
}
.core-page .work-edit-stage-panel .clip,
.pro-admin .work-edit-stage-panel .clip {
  top: 5px;
  height: 20px;
  border-radius: 6px;
  box-shadow: none;
}
.core-page .work-edit-config-panel,
.pro-admin .work-edit-config-panel {
  padding: 12px !important;
}
.core-page .work-edit-config-panel .suggestion-stack,
.pro-admin .work-edit-config-panel .suggestion-stack {
  display: grid;
  gap: 7px;
}
.core-page .work-edit-config-panel .ai-suggestion,
.pro-admin .work-edit-config-panel .ai-suggestion {
  margin: 0;
  padding: 9px;
  border-color: rgba(255,255,255,.055);
  border-radius: 9px;
  background: rgba(6,10,16,.38);
}
.core-page .work-edit-config-panel .ai-suggestion.active,
.pro-admin .work-edit-config-panel .ai-suggestion.active {
  border-color: rgba(79,141,255,.28);
  background: rgba(79,141,255,.08);
}
.core-page .work-edit-config-panel .inline-tab-row,
.pro-admin .work-edit-config-panel .inline-tab-row {
  gap: 6px;
  padding-bottom: 2px;
}
.core-page .work-edit-config-panel .inline-tab,
.pro-admin .work-edit-config-panel .inline-tab {
  height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  background: rgba(255,255,255,.025);
}
.core-page .work-edit-config-panel .bgm-option,
.pro-admin .work-edit-config-panel .bgm-option {
  min-height: 48px;
  padding: 8px;
  border-color: rgba(255,255,255,.055);
  border-radius: 8px;
  background: rgba(6,10,16,.34);
}
.core-page .work-edit-bottom-grid,
.pro-admin .work-edit-bottom-grid {
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 12px;
  margin-top: 12px;
}
.core-page .work-edit-subtitle-panel,
.core-page .work-edit-assets-panel,
.pro-admin .work-edit-subtitle-panel,
.pro-admin .work-edit-assets-panel {
  padding: 14px !important;
}
.core-page .work-edit-subtitle-panel .subtitle-mini-timeline,
.pro-admin .work-edit-subtitle-panel .subtitle-mini-timeline {
  height: 32px;
  border-color: rgba(255,255,255,.055);
  background: rgba(6,10,16,.38);
}
.core-page .work-edit-subtitle-panel .subtitle-editor,
.pro-admin .work-edit-subtitle-panel .subtitle-editor {
  gap: 7px;
}
.core-page .work-edit-subtitle-panel .subtitle-editor .active,
.pro-admin .work-edit-subtitle-panel .subtitle-editor .active {
  background: rgba(79,141,255,.06);
}
.core-page .work-edit-assets-panel .q-assets,
.pro-admin .work-edit-assets-panel .q-assets {
  gap: 8px;
}
.core-page .work-edit-assets-panel .q-asset,
.pro-admin .work-edit-assets-panel .q-asset {
  border-color: rgba(255,255,255,.055);
  border-radius: 9px;
  background: rgba(6,10,16,.38);
}
@media (max-width: 1080px) {
  .core-page .work-edit-layout,
  .pro-admin .work-edit-layout {
    grid-template-columns: 1fr;
  }
  .core-page .work-edit-template-panel,
  .core-page .work-edit-config-panel,
  .pro-admin .work-edit-template-panel,
  .pro-admin .work-edit-config-panel {
    position: static;
  }
}

@media (max-width: 1200px) {
  .q-bgm-grid,
  .mode-entry-grid,
  .creator-type-row,
  .mode-panel,
  .smart-edit-layout,
  .render-progress-overview,
  .ip-analysis-layout,
  .ip-summary-grid,
  .analysis-detail-grid,
  .analysis-split { grid-template-columns: 1fr; }
}
@media (min-width: 1081px) {
  .core-page .work-edit-layout,
  .pro-admin .work-edit-layout {
    grid-template-columns: 210px minmax(0, 1fr) 286px;
  }
}

@keyframes drawer-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Plans page additions */
.plan-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: #fff;
}
.plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: left;
}
.plan-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #aeb6c4;
  min-height: 24px;
}

/* Profile page additions */
.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-avatar-btn {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #2f73ff;
  border: 0;
  cursor: pointer;
  transition: opacity 180ms ease;
}
.profile-avatar-btn:hover {
  opacity: 0.85;
}
.profile-name {
  font-size: 14px;
  font-weight: 500;
  color: #d0d8e8;
}
.profile-email {
  font-size: 12px;
  color: #6b7585;
  margin-top: 2px;
}

/* Final /dashboard/profile polish: lightweight account settings. */
.core-page .profile-settings-page,
.pro-admin .profile-settings-page {
  gap: 12px;
}
.core-page .profile-overview-layout,
.pro-admin .profile-overview-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  margin-bottom: 12px;
}
.core-page .profile-settings-page .panel,
.pro-admin .profile-settings-page .panel {
  border-color: rgba(255,255,255,.055) !important;
  border-radius: 10px;
  background: rgba(8,12,18,.58) !important;
  box-shadow: none !important;
}
.core-page .profile-account-panel,
.pro-admin .profile-account-panel {
  padding: 16px !important;
}
.core-page .profile-settings-page .panel-header,
.pro-admin .profile-settings-page .panel-header {
  min-height: 34px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.055);
}
.core-page .profile-settings-page .panel-title,
.pro-admin .profile-settings-page .panel-title {
  color: #e8edf6;
  font-size: 15px;
  font-weight: 760;
}
.core-page .profile-avatar-row,
.pro-admin .profile-avatar-row {
  align-items: center;
  gap: 13px;
  min-height: 78px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
}
.core-page .profile-avatar,
.pro-admin .profile-avatar {
  width: 58px;
  height: 58px;
  border-color: rgba(96,139,220,.18);
  background: rgba(13,24,42,.74);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.core-page .profile-avatar-btn,
.pro-admin .profile-avatar-btn {
  right: -3px;
  bottom: -3px;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(122,168,255,.28);
  background: rgba(52,102,205,.92);
  box-shadow: none;
}
.core-page .profile-name,
.pro-admin .profile-name {
  color: #f1f5fb;
  font-size: 15px;
  font-weight: 760;
}
.core-page .profile-email,
.pro-admin .profile-email {
  color: #8793a6;
  font-size: 12px;
}
.core-page .profile-account-panel .core-grid.cols-2,
.pro-admin .profile-account-panel .core-grid.cols-2 {
  gap: 10px;
}
.core-page .profile-settings-page .field span,
.pro-admin .profile-settings-page .field span {
  color: #8b97aa;
  font-size: 12px;
}
.core-page .profile-settings-page .input,
.pro-admin .profile-settings-page .input {
  min-height: 36px;
  border-color: rgba(255,255,255,.055);
  border-radius: 8px;
  background: rgba(5,8,13,.54);
}
.core-page .profile-settings-page .btn,
.pro-admin .profile-settings-page .btn {
  min-height: 34px;
  border-radius: 8px;
  box-shadow: none;
}
.core-page .profile-settings-page .btn.primary,
.pro-admin .profile-settings-page .btn.primary {
  background: rgba(79,141,255,.16);
  border-color: rgba(79,141,255,.28);
  color: #dbe8ff;
}
.core-page .profile-settings-page .btn.secondary,
.pro-admin .profile-settings-page .btn.secondary {
  background: rgba(255,255,255,.025);
  border-color: rgba(255,255,255,.065);
  color: #c6cfdd;
}
.core-page .profile-settings-page .btn.danger,
.pro-admin .profile-settings-page .btn.danger {
  background: rgba(255,92,115,.08);
  border-color: rgba(255,128,148,.20);
  color: #ffc0cc;
}
.core-page .profile-menu-panel,
.pro-admin .profile-menu-panel {
  padding: 12px !important;
}
.core-page .profile-menu-panel .quick-grid,
.pro-admin .profile-menu-panel .quick-grid {
  grid-template-columns: 1fr;
  gap: 7px;
}
.core-page .profile-menu-panel .quick-grid a,
.pro-admin .profile-menu-panel .quick-grid a {
  min-height: 58px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  padding: 10px;
  border-color: rgba(255,255,255,.055);
  border-radius: 9px;
  background: rgba(6,10,16,.36);
  color: #e8edf6;
  font-size: 13px;
  font-weight: 720;
}
.core-page .profile-menu-panel .quick-grid a:hover,
.pro-admin .profile-menu-panel .quick-grid a:hover {
  border-color: rgba(126,176,255,.18);
  background: rgba(79,141,255,.07);
}
.core-page .profile-menu-panel .quick-grid a svg,
.pro-admin .profile-menu-panel .quick-grid a svg {
  width: 17px;
  height: 17px;
}
.core-page .profile-menu-panel .quick-grid span,
.pro-admin .profile-menu-panel .quick-grid span {
  grid-column: 2;
  margin: 2px 0 0;
  color: #7f8b9d;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
}
.core-page .profile-redeem-panel,
.core-page .profile-security-panel,
.pro-admin .profile-redeem-panel,
.pro-admin .profile-security-panel {
  padding: 14px 16px !important;
}
.core-page .profile-redeem-panel .flex,
.pro-admin .profile-redeem-panel .flex {
  max-width: 520px;
  align-items: center;
}
.core-page .profile-security-panel .core-grid.cols-3,
.pro-admin .profile-security-panel .core-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.core-page .profile-security-panel hr,
.pro-admin .profile-security-panel hr {
  margin: 14px 0 !important;
  border-color: rgba(255,255,255,.055) !important;
}
.core-page .profile-security-panel .security-action-row,
.pro-admin .profile-security-panel .security-action-row {
  gap: 8px;
}
.core-page .profile-security-panel .account-danger-zone,
.pro-admin .profile-security-panel .account-danger-zone {
  margin-top: 12px;
  border-color: rgba(255,128,148,.12);
  background: rgba(255,92,115,.035);
}
.core-page .profile-security-panel .account-danger-zone summary,
.pro-admin .profile-security-panel .account-danger-zone summary {
  min-height: 44px;
  padding: 11px 12px;
  color: #dca6b0;
  font-size: 13px;
}
.core-page .profile-security-panel .account-danger-zone summary small,
.pro-admin .profile-security-panel .account-danger-zone summary small {
  color: #7f8b9d;
}
.core-page .profile-security-panel .danger-zone-content,
.pro-admin .profile-security-panel .danger-zone-content {
  padding: 12px;
}
.core-page .profile-security-panel .danger-zone-content p,
.pro-admin .profile-security-panel .danger-zone-content p {
  color: #b98591;
}
@media (max-width: 980px) {
  .core-page .profile-overview-layout,
  .pro-admin .profile-overview-layout {
    grid-template-columns: 1fr;
  }
  .core-page .profile-menu-panel .quick-grid,
  .pro-admin .profile-menu-panel .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Accounts page additions */
.platform-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #6b7585;
  transition: color 180ms ease;
}
.platform-delete:hover {
  color: #ef4444;
}

/* Final /dashboard/works rail fix: keep preview compact and sticky. */
.core-page .panel[data-state="works"],
.pro-admin .panel[data-state="works"] {
  height: fit-content !important;
  min-height: 0 !important;
  align-self: start !important;
}
.core-page .panel[data-state="works"] .split-layout,
.pro-admin .panel[data-state="works"] .split-layout {
  align-items: start !important;
}
.core-page .panel[data-state="works"] .preview-panel,
.pro-admin .panel[data-state="works"] .preview-panel {
  position: static !important;
  align-self: start !important;
  height: fit-content !important;
  min-height: 0 !important;
  max-height: calc(100vh - 32px) !important;
  overflow: visible !important;
}
.core-page .panel[data-state="works"] .preview-panel.is-stuck,
.pro-admin .panel[data-state="works"] .preview-panel.is-stuck {
  position: fixed !important;
  top: 16px !important;
  right: 24px !important;
  width: 300px !important;
  z-index: 20 !important;
  box-shadow: 0 18px 36px rgba(0,0,0,.24);
}
.core-page .panel[data-state="works"] .preview-panel .video-preview,
.pro-admin .panel[data-state="works"] .preview-panel .video-preview {
  display: grid;
}
.core-page .panel[data-state="works"] .preview-panel .video-preview > img,
.pro-admin .panel[data-state="works"] .preview-panel .video-preview > img {
  display: block;
  max-height: 338px !important;
}

/* Final /dashboard/history inspector fix: keep task preview sticky in the scroll rail. */
.core-page .task-center-layout,
.pro-admin .task-center-layout {
  align-items: start !important;
}
.core-page .task-inspector,
.pro-admin .task-inspector {
  position: static !important;
  top: 16px !important;
  align-self: start !important;
  height: fit-content !important;
  min-height: 0 !important;
  max-height: calc(100vh - 32px) !important;
  overflow: visible !important;
}
.core-page .task-inspector.is-stuck,
.pro-admin .task-inspector.is-stuck {
  position: fixed !important;
  top: 16px !important;
  right: 24px !important;
  width: 310px !important;
  z-index: 20 !important;
  box-shadow: 0 18px 36px rgba(0,0,0,.24);
}
.core-page .task-inspector .compact-preview,
.pro-admin .task-inspector .compact-preview {
  display: grid;
}
.core-page .task-inspector .compact-preview img,
.pro-admin .task-inspector .compact-preview img {
  display: block;
  max-height: 338px !important;
}
.core-page .task-inspector .compact-preview > :first-child,
.pro-admin .task-inspector .compact-preview > :first-child {
  max-height: 338px !important;
}

/* Final /dashboard/history list polish: flatten the heavy nested-card area. */
.core-page .task-list-panel,
.pro-admin .task-list-panel {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.core-page .task-list-panel > .panel-header,
.pro-admin .task-list-panel > .panel-header {
  min-height: 48px;
  padding: 0 0 10px !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid rgba(255,255,255,.055) !important;
}
.core-page .task-list-panel .segmented,
.pro-admin .task-list-panel .segmented {
  flex: 1;
  min-height: 36px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.core-page .task-list-panel .segmented .seg,
.pro-admin .task-list-panel .segmented .seg {
  height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.core-page .task-list-panel .segmented .seg.active,
.pro-admin .task-list-panel .segmented .seg.active {
  border-color: rgba(79,141,255,.28);
  background: rgba(79,141,255,.12);
  box-shadow: none;
}
.core-page .task-list-panel .task-board,
.pro-admin .task-list-panel .task-board {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6, 10, 16, .42);
}
.core-page .task-list-panel .task-row,
.pro-admin .task-list-panel .task-row {
  min-height: 112px;
  grid-template-columns: 64px minmax(0, 1fr) auto auto auto;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.045);
  border-radius: 0;
  background: transparent !important;
}
.core-page .task-list-panel .task-row:last-of-type,
.pro-admin .task-list-panel .task-row:last-of-type {
  border-bottom: 0;
}
.core-page .task-list-panel .task-row:hover,
.pro-admin .task-list-panel .task-row:hover {
  background: rgba(13, 21, 32, .62) !important;
}
.core-page .task-list-panel .task-row-thumb,
.pro-admin .task-list-panel .task-row-thumb {
  width: 64px;
  height: 88px;
  border-radius: 8px;
  background: rgba(47,115,255,.055);
}
.core-page .task-list-panel .task-row .progress,
.pro-admin .task-list-panel .task-row .progress {
  max-width: 620px;
  background: rgba(105, 120, 145, .26);
}
/* Final /dashboard/media shell fix: remove the oversized legacy container. */
.core-page .media-workspace .media-tabs,
.pro-admin .media-workspace .media-tabs {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.core-page .media-workspace .media-tab-panel,
.pro-admin .media-workspace .media-tab-panel {
  min-height: 0 !important;
}
.core-page .media-workspace .media-tabs > .panel-header,
.pro-admin .media-workspace .media-tabs > .panel-header {
  padding: 0 0 12px !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid rgba(255,255,255,.06) !important;
}
.core-page .media-workspace .media-toolbar,
.pro-admin .media-workspace .media-toolbar {
  margin-bottom: 12px !important;
  background: rgba(7, 11, 18, .58) !important;
  border-color: rgba(42, 54, 72, .55) !important;
  box-shadow: none !important;
}
.core-page .media-workspace .media-works-list,
.pro-admin .media-workspace .media-works-list {
  min-height: 0 !important;
}

/* Final /dashboard/media polish: refined asset library density. */
.core-page .media-workspace,
.pro-admin .media-workspace {
  gap: 0;
}
.core-page .media-workspace .media-tabs > .panel-header,
.pro-admin .media-workspace .media-tabs > .panel-header {
  min-height: 48px !important;
  align-items: center;
}
.core-page .media-workspace .media-tabs > .panel-header .panel-title,
.pro-admin .media-workspace .media-tabs > .panel-header .panel-title {
  min-width: 86px;
  white-space: nowrap;
}
.core-page .media-workspace .segmented,
.pro-admin .media-workspace .segmented {
  flex: 1;
  min-height: 38px;
  padding: 3px;
  border-color: rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(5,8,14,.42);
}
.core-page .media-workspace .segmented .seg,
.pro-admin .media-workspace .segmented .seg {
  min-width: 0;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #8e9aab;
  box-shadow: none;
}
.core-page .media-workspace .segmented .seg.active,
.pro-admin .media-workspace .segmented .seg.active {
  border-color: rgba(79,141,255,.28);
  background: rgba(79,141,255,.12);
  color: #dbe8ff;
  box-shadow: none;
}
.core-page .media-workspace .media-toolbar,
.pro-admin .media-workspace .media-toolbar {
  min-height: 52px;
  padding: 9px 10px;
  border-radius: 9px;
  background: rgba(6,10,16,.42) !important;
  border-color: rgba(255,255,255,.055) !important;
}
.core-page .media-workspace .media-toolbar strong,
.pro-admin .media-workspace .media-toolbar strong {
  font-size: 14px;
}
.core-page .media-workspace .media-toolbar .input,
.pro-admin .media-workspace .media-toolbar .input {
  min-height: 34px;
  border-radius: 8px;
  background: rgba(5,8,13,.48);
}
.core-page .media-workspace .core-list,
.pro-admin .media-workspace .core-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.36);
}
.core-page .media-workspace .core-list .core-row,
.pro-admin .media-workspace .core-list .core-row {
  min-height: 76px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.core-page .media-workspace .core-list .core-row + .core-row,
.pro-admin .media-workspace .core-list .core-row + .core-row {
  border-top: 1px solid rgba(255,255,255,.045);
}
.core-page .media-workspace .core-row > img,
.pro-admin .media-workspace .core-row > img {
  width: 54px;
  height: 58px;
  border-radius: 8px;
}
.core-page .media-workspace .asset-row-actions,
.pro-admin .media-workspace .asset-row-actions {
  min-width: 180px;
  gap: 8px;
}
.core-page .media-workspace .asset-primary-action,
.pro-admin .media-workspace .asset-primary-action,
.media-workspace .asset-primary-action {
  min-width: 78px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border-color: rgba(79,141,255,.24);
  background: rgba(79,141,255,.13);
  color: #dbe8ff;
  box-shadow: none;
}
.core-page .media-workspace .asset-primary-action:hover,
.pro-admin .media-workspace .asset-primary-action:hover,
.media-workspace .asset-primary-action:hover {
  border-color: rgba(126,176,255,.34);
  background: rgba(79,141,255,.18);
}
.core-page .media-workspace .asset-icon-btn,
.pro-admin .media-workspace .asset-icon-btn,
.media-workspace .asset-icon-btn {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 8px;
}
.core-page .media-workspace .media-avatar-grid,
.pro-admin .media-workspace .media-avatar-grid {
  grid-template-columns: repeat(auto-fill, minmax(156px, 156px));
  gap: 10px;
  justify-content: start;
}
.core-page .media-workspace .media-avatar-grid .thumb-card,
.pro-admin .media-workspace .media-avatar-grid .thumb-card {
  min-height: 0;
  border-color: rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
  box-shadow: none;
}
.core-page .media-workspace .media-avatar-grid .thumb-card img,
.pro-admin .media-workspace .media-avatar-grid .thumb-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 13;
  object-fit: cover;
}
.core-page .media-workspace .media-avatar-grid .thumb-info,
.pro-admin .media-workspace .media-avatar-grid .thumb-info {
  padding: 9px;
  min-height: 106px;
  gap: 6px;
}
.core-page .media-workspace .media-avatar-grid .thumb-info strong,
.pro-admin .media-workspace .media-avatar-grid .thumb-info strong {
  font-size: 13px;
  line-height: 17px;
}
.core-page .media-workspace .asset-card-actions,
.pro-admin .media-workspace .asset-card-actions {
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 7px;
}
.core-page .media-workspace .template-list.market-grid,
.pro-admin .media-workspace .template-list.market-grid {
  grid-template-columns: repeat(auto-fill, minmax(156px, 156px));
  gap: 10px;
  justify-content: start;
}
.core-page .media-workspace .template-list.market-grid .template-tile,
.pro-admin .media-workspace .template-list.market-grid .template-tile {
  border-color: rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
  box-shadow: none;
}
.core-page .media-workspace .template-list.market-grid .template-tile img,
.pro-admin .media-workspace .template-list.market-grid .template-tile img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 13;
  object-fit: cover;
}
.core-page .media-workspace .compact-voice-grid,
.pro-admin .media-workspace .compact-voice-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}
.core-page .media-workspace .compact-voice-grid .voice-tile,
.pro-admin .media-workspace .compact-voice-grid .voice-tile {
  border-color: rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
  box-shadow: none;
}

/* Final admin-wide polish: list/grid management panels should feel light, not boxed-in. */
.core-page .page-state-content > .panel:has(.core-list),
.core-page .page-state-content > .panel:has(.asset-list),
.core-page .page-state-content > .panel:has(.platform-grid),
.core-page .page-state-content > .panel:has(.table),
.pro-admin .page-state-content > .panel:has(.core-list),
.pro-admin .page-state-content > .panel:has(.asset-list),
.pro-admin .page-state-content > .panel:has(.platform-grid),
.pro-admin .page-state-content > .panel:has(.table) {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.core-page .page-state-content > .panel:has(.core-list) > .panel-header,
.core-page .page-state-content > .panel:has(.asset-list) > .panel-header,
.core-page .page-state-content > .panel:has(.platform-grid) > .panel-header,
.core-page .page-state-content > .panel:has(.table) > .panel-header,
.pro-admin .page-state-content > .panel:has(.core-list) > .panel-header,
.pro-admin .page-state-content > .panel:has(.asset-list) > .panel-header,
.pro-admin .page-state-content > .panel:has(.platform-grid) > .panel-header,
.pro-admin .page-state-content > .panel:has(.table) > .panel-header {
  min-height: 48px;
  padding: 0 0 10px !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid rgba(255,255,255,.055) !important;
}
.core-page .page-state-content > .panel:has(.asset-list) .segmented,
.pro-admin .page-state-content > .panel:has(.asset-list) .segmented {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.core-page .page-state-content > .panel:has(.asset-list) .segmented .seg,
.pro-admin .page-state-content > .panel:has(.asset-list) .segmented .seg {
  height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
}
.core-page .page-state-content > .panel:has(.asset-list) .segmented .seg.active,
.pro-admin .page-state-content > .panel:has(.asset-list) .segmented .seg.active {
  border-color: rgba(79,141,255,.28);
  background: rgba(79,141,255,.12);
  box-shadow: none;
}
.core-page .page-state-content > .panel:has(.core-list) .core-list,
.pro-admin .page-state-content > .panel:has(.core-list) .core-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
}
.core-page .page-state-content > .panel:has(.core-list) .core-row,
.pro-admin .page-state-content > .panel:has(.core-list) .core-row {
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.045);
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}
.core-page .page-state-content > .panel:has(.core-list) .core-row:last-child,
.pro-admin .page-state-content > .panel:has(.core-list) .core-row:last-child {
  border-bottom: 0;
}
.core-page .page-state-content > .panel:has(.core-list) .core-row:hover,
.pro-admin .page-state-content > .panel:has(.core-list) .core-row:hover {
  background: rgba(13,21,32,.62) !important;
}
.core-page .page-state-content > .panel:has(.platform-grid) .platform-card,
.pro-admin .page-state-content > .panel:has(.platform-grid) .platform-card {
  min-height: 96px;
  background: rgba(6,10,16,.42);
  border-color: rgba(255,255,255,.055);
  box-shadow: none;
}
.core-page .page-state-content > .panel:has(.platform-grid) .platform-card:hover,
.pro-admin .page-state-content > .panel:has(.platform-grid) .platform-card:hover {
  background: rgba(13,21,32,.62);
}
.core-page .page-state-content > .panel:has(.table) .table,
.pro-admin .page-state-content > .panel:has(.table) .table {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
}

/* Final /dashboard/voices polish: same lightweight management-list language. */
.core-page .voices-list-panel,
.pro-admin .voices-list-panel {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.core-page .voices-list-panel > .panel-header,
.pro-admin .voices-list-panel > .panel-header {
  min-height: 48px;
  padding: 0 0 10px !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid rgba(255,255,255,.055) !important;
}
.core-page .voices-list-panel .voice-panel-note,
.pro-admin .voices-list-panel .voice-panel-note {
  margin-top: 2px;
  color: #778294;
}
.core-page .voices-list-panel .voice-management-table,
.pro-admin .voices-list-panel .voice-management-table {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
}
.core-page .voices-list-panel .voice-table-head,
.pro-admin .voices-list-panel .voice-table-head {
  min-height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255,255,255,.045);
  background: rgba(255,255,255,.018);
  color: #6f7b8f;
}
.core-page .voices-list-panel .voice-row-card,
.pro-admin .voices-list-panel .voice-row-card {
  min-height: 74px;
  padding: 11px 14px;
  border: 0 !important;
  border-bottom: 1px solid rgba(255,255,255,.045) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.core-page .voices-list-panel .voice-row-card:last-child,
.pro-admin .voices-list-panel .voice-row-card:last-child {
  border-bottom: 0 !important;
}
.core-page .voices-list-panel .voice-row-card:hover,
.pro-admin .voices-list-panel .voice-row-card:hover {
  background: rgba(13,21,32,.62) !important;
}
.core-page .voices-list-panel .voice-card-avatar,
.pro-admin .voices-list-panel .voice-card-avatar {
  width: 40px !important;
  height: 40px !important;
  border-color: rgba(79,141,255,.18);
  background: rgba(79,141,255,.10) !important;
  box-shadow: none;
}
.core-page .voices-list-panel .voice-card-meta strong,
.pro-admin .voices-list-panel .voice-card-meta strong {
  font-size: 14px;
  line-height: 19px;
}
.core-page .voices-list-panel .voice-preview-status,
.pro-admin .voices-list-panel .voice-preview-status {
  grid-template-columns: 100px minmax(0, 1fr);
  color: #7f8ca0;
}
.core-page .voices-list-panel .voice-preview-status .q-live-waveform,
.pro-admin .voices-list-panel .voice-preview-status .q-live-waveform {
  width: 100px;
  opacity: .72;
}
.core-page .voices-list-panel .voice-original-action .btn,
.core-page .voices-list-panel .voice-card-actions .btn,
.pro-admin .voices-list-panel .voice-original-action .btn,
.pro-admin .voices-list-panel .voice-card-actions .btn {
  min-height: 32px;
  border-radius: 8px;
  box-shadow: none;
}
.core-page .voices-list-panel .voice-card-actions .btn.primary,
.pro-admin .voices-list-panel .voice-card-actions .btn.primary {
  background: rgba(79,141,255,.14);
  border-color: rgba(79,141,255,.22);
  color: #dbe8ff;
}
.core-page .voices-list-panel .voice-card-actions .voice-delete-icon,
.pro-admin .voices-list-panel .voice-card-actions .voice-delete-icon {
  min-height: 32px;
  width: 34px;
  min-width: 34px;
}

/* Final /dashboard/works polish: match the lightweight management-list language. */
.core-page .works-panel,
.pro-admin .works-panel {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.core-page .works-panel > .panel-header,
.pro-admin .works-panel > .panel-header {
  min-height: 48px;
  padding: 0 0 10px !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid rgba(255,255,255,.055) !important;
}
.core-page .works-panel > .panel-header .row,
.pro-admin .works-panel > .panel-header .row {
  gap: 8px;
}
.core-page .works-panel > .panel-header .input,
.core-page .works-panel > .panel-header .select,
.pro-admin .works-panel > .panel-header .input,
.pro-admin .works-panel > .panel-header .select {
  min-height: 34px;
  background: rgba(6,10,16,.48);
}
.core-page .works-panel .split-layout,
.pro-admin .works-panel .split-layout {
  grid-template-columns: minmax(0, 1fr) 300px !important;
  gap: 16px !important;
}
.core-page .works-panel .sample-stack,
.pro-admin .works-panel .sample-stack {
  gap: 0 !important;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42) !important;
}
.core-page .works-panel .sample-stack .work-card,
.pro-admin .works-panel .sample-stack .work-card {
  min-height: 86px;
  grid-template-columns: 54px minmax(0, 1fr) 166px !important;
  gap: 12px !important;
  padding: 11px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255,255,255,.045) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.core-page .works-panel .sample-stack .work-card:last-of-type,
.pro-admin .works-panel .sample-stack .work-card:last-of-type {
  border-bottom: 0 !important;
}
.core-page .works-panel .sample-stack .work-card:hover,
.pro-admin .works-panel .sample-stack .work-card:hover {
  background: rgba(13,21,32,.62) !important;
}
.core-page .works-panel .sample-stack .work-card.active,
.pro-admin .works-panel .sample-stack .work-card.active {
  background: rgba(79,141,255,.07) !important;
  box-shadow: inset 2px 0 0 rgba(79,141,255,.72) !important;
}
.core-page .works-panel .work-cover,
.pro-admin .works-panel .work-cover {
  width: 54px !important;
  height: 62px !important;
  border-radius: 8px;
}
.core-page .works-panel .sample-stack .work-card > .row:last-child,
.pro-admin .works-panel .sample-stack .work-card > .row:last-child {
  display: flex !important;
  justify-content: flex-end;
  gap: 8px;
}
.core-page .works-panel .work-card .btn,
.pro-admin .works-panel .work-card .btn {
  min-height: 32px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
.core-page .works-panel .work-card .btn.primary,
.pro-admin .works-panel .work-card .btn.primary {
  background: rgba(79,141,255,.14);
  border-color: rgba(79,141,255,.22);
  color: #dbe8ff;
}
.core-page .works-panel .preview-panel,
.pro-admin .works-panel .preview-panel {
  padding: 10px !important;
  border-color: rgba(255,255,255,.065) !important;
  background: rgba(8,12,18,.70) !important;
  box-shadow: none !important;
}
.core-page .works-panel .preview-panel .panel-header,
.pro-admin .works-panel .preview-panel .panel-header {
  min-height: 36px;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.core-page .works-panel .preview-panel .video-preview,
.pro-admin .works-panel .preview-panel .video-preview {
  border-color: rgba(255,255,255,.06);
  background: #05070a;
}
.core-page .works-panel .panel-action-row,
.pro-admin .works-panel .panel-action-row {
  margin-top: 10px;
  gap: 8px;
}
.core-page .works-panel .panel-action-row .btn,
.pro-admin .works-panel .panel-action-row .btn {
  min-height: 36px;
  border-radius: 8px;
}

/* Final /dashboard home polish: turn the landing-like dashboard into a quiet control desk. */
.core-page .dashboard-command,
.pro-admin .dashboard-command {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  margin-bottom: 12px;
}
.core-page .dashboard-hero-panel,
.pro-admin .dashboard-hero-panel {
  min-height: 220px;
  padding: 18px 20px;
  border-color: rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
  box-shadow: none;
}
.core-page .dashboard-hero-panel h2,
.pro-admin .dashboard-hero-panel h2 {
  margin: 12px 0 6px;
  font-size: 26px;
  line-height: 34px;
  font-weight: 760;
}
.core-page .dashboard-hero-panel p,
.pro-admin .dashboard-hero-panel p {
  max-width: 620px;
  font-size: 13px;
  line-height: 20px;
}
.core-page .dashboard-action-grid,
.pro-admin .dashboard-action-grid {
  grid-template-columns: repeat(4, minmax(0, 132px));
  justify-content: start;
  gap: 8px;
  margin-top: 18px;
}
.core-page .dashboard-action-grid .btn,
.pro-admin .dashboard-action-grid .btn {
  min-height: 36px;
  border-radius: 8px;
  box-shadow: none;
}
.core-page .dashboard-preview-card,
.pro-admin .dashboard-preview-card {
  border-color: rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
  box-shadow: none;
}
.core-page .dashboard-preview-card img,
.pro-admin .dashboard-preview-card img,
.core-page .dashboard-preview-card video,
.pro-admin .dashboard-preview-card video {
  height: 188px !important;
  object-fit: cover;
  object-position: center 22%;
}
.core-page .dashboard-preview-meta,
.pro-admin .dashboard-preview-meta {
  padding: 10px;
  background: transparent;
  border-top: 1px solid rgba(255,255,255,.045);
}
.core-page .dashboard-kpi-grid,
.pro-admin .dashboard-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.core-page .kpi-card,
.pro-admin .kpi-card {
  min-height: 72px;
  padding: 10px 12px;
  border-color: rgba(255,255,255,.055);
  border-radius: 8px;
  background: rgba(6,10,16,.42);
  box-shadow: none;
}
.core-page .kpi-card strong,
.pro-admin .kpi-card strong {
  margin-top: 5px;
  font-size: 21px;
  line-height: 24px;
}
.core-page .kpi-card p,
.pro-admin .kpi-card p {
  margin-top: 4px;
  line-height: 16px;
}
.core-page .dashboard-main-grid,
.pro-admin .dashboard-main-grid {
  gap: 16px;
}
.core-page .dashboard-task-panel,
.core-page .dashboard-formula-panel,
.core-page .dashboard-quick-panel,
.core-page .dashboard-template-panel,
.core-page .dashboard-notice-panel,
.pro-admin .dashboard-task-panel,
.pro-admin .dashboard-formula-panel,
.pro-admin .dashboard-quick-panel,
.pro-admin .dashboard-template-panel,
.pro-admin .dashboard-notice-panel {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.core-page .dashboard-task-panel > .panel-header,
.core-page .dashboard-formula-panel > .panel-header,
.core-page .dashboard-quick-panel > .panel-header,
.core-page .dashboard-template-panel > .panel-header,
.core-page .dashboard-notice-panel > .panel-header,
.pro-admin .dashboard-task-panel > .panel-header,
.pro-admin .dashboard-formula-panel > .panel-header,
.pro-admin .dashboard-quick-panel > .panel-header,
.pro-admin .dashboard-template-panel > .panel-header,
.pro-admin .dashboard-notice-panel > .panel-header {
  min-height: 42px;
  padding: 0 0 9px !important;
  margin-bottom: 10px !important;
  border-bottom: 1px solid rgba(255,255,255,.055) !important;
}
.core-page .dashboard-task-panel .core-list,
.pro-admin .dashboard-task-panel .core-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
}
.core-page .dashboard-task-panel .core-row,
.pro-admin .dashboard-task-panel .core-row {
  min-height: 68px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.045);
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}
.core-page .dashboard-task-panel .core-row:last-child,
.pro-admin .dashboard-task-panel .core-row:last-child {
  border-bottom: 0;
}
.core-page .dashboard-task-panel .core-row:hover,
.pro-admin .dashboard-task-panel .core-row:hover {
  background: rgba(13,21,32,.62) !important;
}
.core-page .dashboard-task-panel .fallback-thumb,
.pro-admin .dashboard-task-panel .fallback-thumb {
  width: 46px;
  height: 52px;
  border-radius: 8px;
  background: rgba(47,115,255,.055);
}
.core-page .dashboard-task-panel .core-row .btn,
.pro-admin .dashboard-task-panel .core-row .btn {
  min-height: 32px;
  border-radius: 8px;
  box-shadow: none;
}
.core-page .formula-grid,
.pro-admin .formula-grid {
  gap: 8px;
}
.core-page .dashboard-formula-panel .formula-card,
.pro-admin .dashboard-formula-panel .formula-card {
  min-height: 96px;
  padding: 12px;
  border-color: rgba(255,255,255,.055) !important;
  border-radius: 10px;
  background: rgba(6,10,16,.42) !important;
  box-shadow: none;
}
.core-page .dashboard-formula-panel .formula-card:hover,
.pro-admin .dashboard-formula-panel .formula-card:hover,
.core-page .quick-grid.compact a:hover,
.pro-admin .quick-grid.compact a:hover,
.core-page .dashboard-template-list article:hover,
.pro-admin .dashboard-template-list article:hover,
.core-page .notification-mini-list article:hover,
.pro-admin .notification-mini-list article:hover {
  background: rgba(13,21,32,.62) !important;
}
.core-page .quick-grid.compact,
.pro-admin .quick-grid.compact {
  gap: 8px;
}
.core-page .quick-grid.compact a,
.pro-admin .quick-grid.compact a {
  min-height: 58px;
  padding: 10px;
  border-color: rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
  box-shadow: none;
}
.core-page .dashboard-template-list,
.core-page .notification-mini-list,
.pro-admin .dashboard-template-list,
.pro-admin .notification-mini-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
}
.core-page .dashboard-template-list article,
.core-page .notification-mini-list article,
.pro-admin .dashboard-template-list article,
.pro-admin .notification-mini-list article {
  min-height: 58px;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.045);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.core-page .dashboard-template-list article:last-child,
.core-page .notification-mini-list article:last-child,
.pro-admin .dashboard-template-list article:last-child,
.pro-admin .notification-mini-list article:last-child {
  border-bottom: 0;
}
.core-page .dashboard-template-list .btn,
.pro-admin .dashboard-template-list .btn {
  min-height: 32px;
  border-radius: 8px;
  box-shadow: none;
}

/* /dashboard strict workbench grid: one rhythm, one rail, no staggered modules. */
.core-page .dashboard-top-actions,
.pro-admin .dashboard-top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.core-page .dashboard-top-actions .btn,
.pro-admin .dashboard-top-actions .btn {
  min-height: 38px;
  border-radius: 8px;
  box-shadow: none;
}
.core-page .dashboard-desk-summary,
.pro-admin .dashboard-desk-summary,
.core-page .dashboard-workbench-grid,
.pro-admin .dashboard-workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(320px, 4fr) !important;
  gap: 16px !important;
  align-items: start;
}
.core-page .dashboard-desk-summary,
.pro-admin .dashboard-desk-summary {
  margin-bottom: 16px;
}
.core-page .dashboard-focus-card,
.pro-admin .dashboard-focus-card {
  min-height: 138px;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
  box-shadow: none;
}
.core-page .dashboard-focus-card .eyebrow,
.pro-admin .dashboard-focus-card .eyebrow {
  display: block;
  color: #7f8ca0;
  font-size: 13px;
  line-height: 18px;
}
.core-page .dashboard-focus-card h2,
.pro-admin .dashboard-focus-card h2 {
  margin: 8px 0 6px;
  color: #f4f7fb;
  font-size: 24px;
  line-height: 32px;
  font-weight: 760;
  letter-spacing: 0;
}
.core-page .dashboard-focus-card p,
.pro-admin .dashboard-focus-card p {
  max-width: 680px;
  margin: 0;
  color: #8c98aa;
  font-size: 13px;
  line-height: 20px;
}
.core-page .dashboard-focus-actions,
.pro-admin .dashboard-focus-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.core-page .dashboard-focus-actions .btn,
.pro-admin .dashboard-focus-actions .btn {
  min-height: 34px;
  border-radius: 8px;
  box-shadow: none;
}
.core-page .dashboard-status-strip,
.pro-admin .dashboard-status-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.core-page .dashboard-status-strip article,
.pro-admin .dashboard-status-strip article {
  min-height: 65px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
  box-shadow: none;
}
.core-page .dashboard-status-strip span,
.pro-admin .dashboard-status-strip span {
  display: block;
  color: #7f8ca0;
  font-size: 12px;
  line-height: 16px;
}
.core-page .dashboard-status-strip strong,
.pro-admin .dashboard-status-strip strong {
  display: block;
  margin-top: 2px;
  color: #f3f6fb;
  font-size: 20px;
  line-height: 24px;
}
.core-page .dashboard-status-strip p,
.pro-admin .dashboard-status-strip p {
  margin: 2px 0 0;
  color: #667386;
  font-size: 12px;
  line-height: 16px;
}
.core-page .dashboard-right,
.pro-admin .dashboard-right {
  display: grid;
  gap: 22px;
  align-content: start;
}
.core-page .dashboard-attention-panel,
.core-page .dashboard-latest-panel,
.pro-admin .dashboard-attention-panel,
.pro-admin .dashboard-latest-panel {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.core-page .dashboard-attention-panel > .panel-header,
.core-page .dashboard-latest-panel > .panel-header,
.pro-admin .dashboard-attention-panel > .panel-header,
.pro-admin .dashboard-latest-panel > .panel-header {
  min-height: 50px;
  padding: 0 0 9px !important;
  margin-bottom: 10px !important;
  border-bottom: 1px solid rgba(255,255,255,.055) !important;
}
.core-page .attention-list,
.pro-admin .attention-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
}
.core-page .attention-list article,
.core-page .attention-list a,
.pro-admin .attention-list article,
.pro-admin .attention-list a {
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,.045);
}
.core-page .attention-list article:last-child,
.core-page .attention-list a:last-child,
.pro-admin .attention-list article:last-child,
.pro-admin .attention-list a:last-child {
  border-bottom: 0;
}
.core-page .attention-list a:hover,
.pro-admin .attention-list a:hover {
  background: rgba(13,21,32,.62);
}
.core-page .attention-icon,
.pro-admin .attention-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #9aa8bc;
  background: rgba(255,255,255,.035);
}
.core-page .attention-icon.blue,
.pro-admin .attention-icon.blue {
  color: #86aaff;
  background: rgba(79,141,255,.10);
}
.core-page .attention-icon.danger,
.pro-admin .attention-icon.danger {
  color: #ffabb9;
  background: rgba(244,63,94,.10);
}
.core-page .attention-icon.ok,
.pro-admin .attention-icon.ok {
  color: #69ddb9;
  background: rgba(45,212,191,.09);
}
.core-page .attention-list strong,
.pro-admin .attention-list strong {
  display: block;
  overflow: hidden;
  color: #edf3fb;
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.core-page .attention-list p,
.pro-admin .attention-list p {
  margin: 2px 0 0;
  color: #778397;
  font-size: 12px;
  line-height: 16px;
}
.core-page .dashboard-tool-grid,
.pro-admin .dashboard-tool-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.core-page .dashboard-tool-grid a,
.pro-admin .dashboard-tool-grid a {
  min-height: 68px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  grid-template-rows: 19px 17px;
  column-gap: 8px;
  align-content: center;
}
.core-page .dashboard-tool-grid a svg,
.pro-admin .dashboard-tool-grid a svg {
  grid-row: 1 / span 2;
  align-self: start;
  margin-top: 1px;
  color: #8ea0b8;
}
.core-page .dashboard-tool-grid a strong,
.pro-admin .dashboard-tool-grid a strong {
  overflow: hidden;
  color: #e8eef8;
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.core-page .dashboard-tool-grid a span,
.pro-admin .dashboard-tool-grid a span {
  overflow: hidden;
  font-size: 12px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.core-page .latest-work-card,
.pro-admin .latest-work-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
}
.core-page .latest-work-card:hover,
.pro-admin .latest-work-card:hover {
  background: rgba(13,21,32,.62);
}
.core-page .latest-work-card video,
.pro-admin .latest-work-card video {
  width: 58px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
  background: #05070a;
}
.core-page .latest-work-card strong,
.pro-admin .latest-work-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: #edf3fb;
  font-size: 13px;
  line-height: 18px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.core-page .latest-work-card p,
.pro-admin .latest-work-card p {
  margin: 5px 0 0;
  color: #7d899c;
  font-size: 12px;
  line-height: 16px;
}
@media (max-width: 1180px) {
  .core-page .dashboard-desk-summary,
  .pro-admin .dashboard-desk-summary,
  .core-page .dashboard-workbench-grid,
  .pro-admin .dashboard-workbench-grid {
    grid-template-columns: 1fr !important;
  }
  .core-page .dashboard-status-strip,
  .pro-admin .dashboard-status-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .core-page .dashboard-status-strip,
  .pro-admin .dashboard-status-strip,
  .core-page .dashboard-tool-grid,
  .pro-admin .dashboard-tool-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .core-page .dashboard-focus-card h2,
  .pro-admin .dashboard-focus-card h2 {
    font-size: 21px;
    line-height: 29px;
  }
}

/* Final /dashboard/avatars polish: lightweight visual asset gallery. */
.core-page .avatars-gallery-panel,
.pro-admin .avatars-gallery-panel {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.core-page .avatars-gallery-panel > .panel-header,
.pro-admin .avatars-gallery-panel > .panel-header {
  min-height: 48px;
  padding: 0 0 10px !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid rgba(255,255,255,.055) !important;
}
.core-page .avatars-gallery-panel .select,
.pro-admin .avatars-gallery-panel .select {
  min-height: 34px;
  background: rgba(6,10,16,.48);
}
.core-page .avatars-gallery-panel .avatar-list,
.pro-admin .avatars-gallery-panel .avatar-list {
  grid-template-columns: repeat(auto-fill, minmax(156px, 156px)) !important;
  gap: 10px !important;
  justify-content: start;
}
.core-page .avatars-gallery-panel .thumb-card,
.pro-admin .avatars-gallery-panel .thumb-card {
  overflow: hidden;
  border-color: rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
  box-shadow: none;
  transform: none;
}
.core-page .avatars-gallery-panel .thumb-card:hover,
.pro-admin .avatars-gallery-panel .thumb-card:hover {
  border-color: rgba(126,176,255,.18);
  background: rgba(13,21,32,.62);
  transform: none;
}
.core-page .avatars-gallery-panel .thumb-card img,
.pro-admin .avatars-gallery-panel .thumb-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 13 !important;
  object-fit: cover;
  object-position: center top;
}
.core-page .avatars-gallery-panel .thumb-info,
.pro-admin .avatars-gallery-panel .thumb-info {
  min-height: 98px;
  padding: 9px;
  background: rgba(6,10,16,.72);
  border-top: 1px solid rgba(255,255,255,.045);
}
.core-page .avatars-system-panel .thumb-info,
.pro-admin .avatars-system-panel .thumb-info {
  display: grid;
  grid-template-rows: 20px 18px 32px;
  align-items: stretch;
  gap: 6px;
}
.core-page .avatars-system-panel .thumb-info strong,
.pro-admin .avatars-system-panel .thumb-info strong,
.core-page .avatars-custom-panel .dashboard-avatar-name-line strong,
.pro-admin .avatars-custom-panel .dashboard-avatar-name-line strong {
  color: #f1f5fb;
  font-size: 13px;
  line-height: 17px;
  font-weight: 740;
}
.core-page .avatars-system-panel .thumb-info span,
.pro-admin .avatars-system-panel .thumb-info span {
  overflow: hidden;
  color: #7f8b9d;
  font-size: 11px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.core-page .avatars-system-panel .thumb-info .row,
.pro-admin .avatars-system-panel .thumb-info .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
}
.core-page .avatars-gallery-panel .thumb-info .btn,
.pro-admin .avatars-gallery-panel .thumb-info .btn,
.core-page .avatars-gallery-panel .avatar-card-actions .btn,
.pro-admin .avatars-gallery-panel .avatar-card-actions .btn {
  min-height: 32px !important;
  border-radius: 8px;
  box-shadow: none;
}
.core-page .avatars-gallery-panel .thumb-info .btn.secondary,
.pro-admin .avatars-gallery-panel .thumb-info .btn.secondary,
.core-page .avatars-gallery-panel .avatar-card-actions .btn.secondary,
.pro-admin .avatars-gallery-panel .avatar-card-actions .btn.secondary {
  background: rgba(79,141,255,.12);
  border-color: rgba(79,141,255,.22);
  color: #dbe8ff;
}
.core-page .avatars-gallery-panel .thumb-info .btn.ghost,
.pro-admin .avatars-gallery-panel .thumb-info .btn.ghost {
  background: transparent;
  border-color: rgba(255,255,255,.055);
  color: #9aa6b8;
}
.core-page .avatars-gallery-panel .avatar-delete-icon,
.pro-admin .avatars-gallery-panel .avatar-delete-icon {
  min-height: 32px !important;
  width: 34px;
  min-width: 34px;
  border-radius: 8px;
}
.core-page .avatars-gallery-panel .avatar-rename-btn,
.pro-admin .avatars-gallery-panel .avatar-rename-btn {
  width: 24px;
  height: 24px;
}
.core-page .avatars-gallery-panel .avatar-rename-form,
.pro-admin .avatars-gallery-panel .avatar-rename-form {
  grid-template-columns: minmax(0, 1fr) 32px 32px;
}
.core-page .avatars-gallery-panel .avatar-rename-form .input,
.pro-admin .avatars-gallery-panel .avatar-rename-form .input,
.core-page .avatars-gallery-panel .avatar-rename-form .btn.icon,
.pro-admin .avatars-gallery-panel .avatar-rename-form .btn.icon {
  height: 32px;
  min-height: 32px;
  border-radius: 8px;
}

/* Final /dashboard/templates polish: lightweight template market gallery. */
.core-page .templates-list-panel,
.pro-admin .templates-list-panel {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.core-page .templates-list-panel > .panel-header,
.pro-admin .templates-list-panel > .panel-header {
  min-height: 48px;
  padding: 0 0 10px !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid rgba(255,255,255,.055) !important;
}
.core-page .templates-list-panel > .panel-header .row,
.pro-admin .templates-list-panel > .panel-header .row {
  gap: 8px;
}
.core-page .templates-list-panel .input,
.pro-admin .templates-list-panel .input {
  min-height: 34px;
  background: rgba(6,10,16,.48);
}
.core-page .templates-list-panel .template-tabs,
.pro-admin .templates-list-panel .template-tabs {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.core-page .templates-list-panel .template-tabs .seg,
.pro-admin .templates-list-panel .template-tabs .seg {
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
}
.core-page .templates-list-panel .template-tabs .seg.active,
.pro-admin .templates-list-panel .template-tabs .seg.active {
  border-color: rgba(79,141,255,.28);
  background: rgba(79,141,255,.12);
  box-shadow: none;
}
.core-page .templates-list-panel .template-list,
.pro-admin .templates-list-panel .template-list {
  grid-template-columns: repeat(auto-fill, minmax(156px, 156px)) !important;
  gap: 10px !important;
  justify-content: start;
}
.core-page .templates-list-panel .template-tile,
.pro-admin .templates-list-panel .template-tile {
  min-height: 0;
  overflow: hidden;
  border-color: rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(6,10,16,.42);
  box-shadow: none;
  transform: none;
}
.core-page .templates-list-panel .template-tile:hover,
.pro-admin .templates-list-panel .template-tile:hover {
  border-color: rgba(126,176,255,.18);
  background: rgba(13,21,32,.62);
  transform: none;
}
.core-page .templates-list-panel .template-tile.active,
.pro-admin .templates-list-panel .template-tile.active {
  border-color: rgba(79,141,255,.34);
  background: rgba(79,141,255,.07);
  box-shadow: inset 2px 0 0 rgba(79,141,255,.72);
}
.core-page .templates-list-panel .template-tile::after,
.pro-admin .templates-list-panel .template-tile::after {
  display: none;
}
.core-page .templates-list-panel .template-tile > img,
.pro-admin .templates-list-panel .template-tile > img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 13;
  object-fit: cover;
  object-position: center top;
}
.core-page .templates-list-panel .template-meta,
.pro-admin .templates-list-panel .template-meta {
  min-height: 150px;
  padding: 9px;
  gap: 6px;
  background: rgba(6,10,16,.72);
  border-top: 1px solid rgba(255,255,255,.045);
}
.core-page .templates-list-panel .template-meta strong,
.pro-admin .templates-list-panel .template-meta strong {
  color: #f1f5fb;
  font-size: 13px;
  line-height: 17px;
  font-weight: 740;
}
.core-page .templates-list-panel .template-meta > span,
.pro-admin .templates-list-panel .template-meta > span {
  display: -webkit-box;
  overflow: hidden;
  min-height: 34px;
  color: #7f8b9d;
  font-size: 11px;
  line-height: 17px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.core-page .templates-list-panel .spec-actions.vertical,
.pro-admin .templates-list-panel .spec-actions.vertical {
  gap: 6px;
}
.core-page .templates-list-panel .template-meta .btn,
.pro-admin .templates-list-panel .template-meta .btn {
  width: 100%;
  min-height: 32px;
  border-radius: 8px;
  box-shadow: none;
}
.core-page .templates-list-panel .template-meta .btn.primary,
.pro-admin .templates-list-panel .template-meta .btn.primary {
  background: rgba(79,141,255,.14);
  border-color: rgba(79,141,255,.24);
  color: #dbe8ff;
}
.core-page .templates-list-panel .template-meta .btn.secondary,
.pro-admin .templates-list-panel .template-meta .btn.secondary {
  background: transparent;
  border-color: rgba(255,255,255,.055);
  color: #9aa6b8;
}
.core-page .templates-list-panel .fav-btn,
.pro-admin .templates-list-panel .fav-btn {
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(5,8,13,.58);
  border: 1px solid rgba(255,255,255,.10);
  color: #c3ccd9;
  backdrop-filter: blur(10px);
}
.core-page .templates-inspector-panel,
.pro-admin .templates-inspector-panel {
  padding: 10px !important;
  border-color: rgba(255,255,255,.065) !important;
  border-radius: 10px;
  background: rgba(8,12,18,.70) !important;
  box-shadow: none !important;
}
.core-page .templates-inspector-panel .panel-header,
.pro-admin .templates-inspector-panel .panel-header {
  min-height: 36px;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.core-page .templates-inspector-panel .compact-preview,
.pro-admin .templates-inspector-panel .compact-preview {
  border-color: rgba(255,255,255,.06);
}
.core-page .templates-inspector-panel .template-spec-list div,
.pro-admin .templates-inspector-panel .template-spec-list div {
  background: rgba(6,10,16,.42);
  border-color: rgba(255,255,255,.055);
}
.core-page .templates-inspector-panel .spec-actions.vertical .btn,
.pro-admin .templates-inspector-panel .spec-actions.vertical .btn {
  min-height: 34px;
  border-radius: 8px;
  box-shadow: none;
}
