:root {
  --bg: #f7f7f5;
  --surface: #fcfcfb;
  --surface-soft: #f3f2ef;
  --surface-glass: rgba(247, 247, 245, 0.82);
  --ink: #111111;
  --ink-soft: #3f3f3d;
  --muted: #6b6b67;
  --muted-2: #9a9993;
  --line: #e7e7e4;
  --line-strong: #d8d8d2;
  --primary: #111111;
  --primary-hover: #2a2a28;
  --accent: #6366f1;
  --accent-soft: #f0f0ff;
  --creator-blue: #6e9db3;
  --click-blue: #62a9c5;
  --click-blue-hover: #438fac;
  --success: #168653;
  --success-soft: #eaf7ef;
  --warning: #a35f00;
  --warning-soft: #fff6e5;
  --danger: #c2332b;
  --danger-soft: #fff0ee;
  --info-soft: #eef6ff;
  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 8px;
  --nav-height: 72px;
  --container: 1280px;
  --shadow: 0 28px 80px rgba(17, 17, 17, 0.045);
  --shadow-tight: 0 12px 30px rgba(17, 17, 17, 0.04);
  font-family: Geist, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.52;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.modal-locked {
  overflow: hidden;
  overscroll-behavior: none;
}

body,
button,
input,
select,
textarea {
  font: inherit;
}

button,
input,
select,
textarea {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  display: block;
  max-width: 100%;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled,
.disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

svg {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: currentColor;
}

.sidebar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--nav-height);
  padding: 0 max(24px, calc((100vw - var(--container)) / 2 + 32px));
  border-bottom: 1px solid rgba(216, 216, 210, 0.72);
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: max-content;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.nav a:hover {
  color: var(--ink);
  background: rgba(17, 17, 17, 0.04);
}

.nav a.active {
  background: var(--ink);
  color: #ffffff;
}

.source-box {
  margin-left: auto;
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.source-box::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--muted-2);
}

.source-box.logged-in {
  border-color: rgba(22, 134, 83, 0.22);
  background: var(--success-soft);
  cursor: pointer;
}

.source-box.logged-in::before {
  background: var(--success);
}

.source-box.logged-out {
  border-color: rgba(194, 51, 43, 0.26);
  background: var(--danger-soft);
  cursor: pointer;
}

.source-box.logged-out::before {
  background: var(--danger);
}

.source-box.checking {
  border-color: rgba(163, 95, 0, 0.24);
  background: var(--warning-soft);
}

.source-box.checking::before {
  background: var(--warning);
}

.source-box.neutral::before {
  background: var(--ink);
}

.source-box span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.source-box strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.source-box.logged-in strong {
  color: var(--success);
}

.source-box.logged-out strong {
  color: var(--danger);
}

.source-box.checking strong {
  color: var(--warning);
}

.source-box form {
  margin: 0;
}

.source-box button {
  min-height: 26px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--danger);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.source-box button:hover {
  background: #9f201a;
}

.source-box.logged-in button {
  background: #111111;
}

.source-box.logged-in button:hover {
  background: #2f3f46;
}

.source-box button:disabled {
  cursor: default;
  opacity: 0.72;
}

.main {
  width: min(var(--container), calc(100vw - 64px));
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 48px) 0 64px;
}

.page-head,
.topics-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.page-head > div:first-child,
.topics-head > div:first-child {
  min-width: 0;
}

.page-head h1,
.topics-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: 40px;
  line-height: 1.05;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.page-head p,
.topics-head p {
  margin: 8px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 14px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.back-link::before {
  content: "‹";
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.head-actions,
.actions,
.form-actions,
.douyin-actions,
.script-row-actions,
.toolbar-left,
.table-toolbar,
.pagination,
.douyin-preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.head-actions {
  justify-content: flex-end;
}

.head-actions .source-box {
  margin-left: 0;
}

.page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  margin-bottom: 18px;
}

.page-actions.only-actions {
  justify-content: flex-end;
}

.page-actions .back-link {
  margin-bottom: 0;
}

.head-actions form,
.actions form,
.script-row-actions form {
  margin: 0;
}

.notice {
  margin: 0 0 18px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  font-weight: 600;
}

.notice.success {
  border-color: rgba(22, 134, 83, 0.18);
  background: var(--success-soft);
  color: #0f6f43;
}

.notice.danger {
  border-color: rgba(194, 51, 43, 0.2);
  background: var(--danger-soft);
  color: var(--danger);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.metric {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.metric strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.panel,
.topics-board,
.topics-toolbar {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: none;
}

.panel {
  margin-bottom: 22px;
  min-width: 0;
  overflow: hidden;
}

.panel-title,
.topics-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.panel-title h2,
.topics-board-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.panel-title span,
.topics-board-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.panel-title-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title-actions form {
  margin: 0;
}

.layout-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 22px;
  align-items: start;
}

.layout-two.narrow-right {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.pack-detail-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 356px);
  gap: 24px;
}

.main-stack,
.side-stack,
.stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.side-stack {
  position: sticky;
  top: calc(var(--nav-height) + 22px);
}

.video-subtitle-test-page {
  display: grid;
  gap: 18px;
}

.video-subtitle-hero {
  background:
    radial-gradient(circle at top right, rgba(66, 216, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 252, 0.94));
}

.video-subtitle-hero .panel-title {
  border-bottom: 0;
  padding-bottom: 10px;
}

.video-subtitle-hero-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 0 22px 20px;
}

.video-subtitle-hero-note span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.video-subtitle-hero-note strong {
  color: var(--ink);
  font-size: 14px;
}

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

.video-subtitle-form {
  display: grid;
  gap: 16px;
  padding: 18px 22px 22px;
}

.video-subtitle-setting-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 221, 221, 0.72), rgba(186, 194, 197, 0.9));
}

.video-subtitle-setting-head {
  display: grid;
  gap: 4px;
}

.video-subtitle-setting-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.video-subtitle-setting-head span {
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.5;
}

.video-subtitle-file {
  display: grid;
  gap: 8px;
  color: var(--ink);
}

.video-subtitle-file > span {
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 650;
}

.video-subtitle-file input,
.video-subtitle-file select {
  width: 100%;
}

.video-subtitle-file select {
  min-height: 44px;
}

.video-subtitle-file input[type="range"] {
  accent-color: #42d8ff;
  cursor: pointer;
}

.video-subtitle-position-value {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  justify-content: center;
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid rgba(66, 216, 255, 0.28);
  border-radius: 999px;
  color: #42d8ff;
  background: rgba(66, 216, 255, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.video-subtitle-position-scale {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.video-subtitle-position-scale small {
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.video-subtitle-position-value[data-position-value] {
  min-width: 76px;
}

.video-subtitle-hint strong {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px dashed rgba(17, 17, 17, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.video-subtitle-artifacts,
.video-subtitle-result {
  display: grid;
  gap: 12px;
  padding: 0 22px 22px;
}

.video-subtitle-artifact {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.video-subtitle-artifact span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.video-subtitle-artifact strong {
  color: var(--ink);
  font-size: 14px;
  word-break: break-all;
}

.video-subtitle-result video {
  width: 100%;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 18px;
  background: #000;
  aspect-ratio: 16 / 9;
}

@media (max-width: 920px) {
  .video-subtitle-grid {
    grid-template-columns: 1fr;
  }

  .video-subtitle-form {
    padding: 18px 16px 20px;
  }

  .video-subtitle-setting-card {
    padding: 16px;
  }
}

.pack-detail-main {
  gap: 24px;
}

.keyword-panel,
.pack-task-panel,
.pack-filter-panel {
  border-color: rgba(17, 17, 17, 0.08);
}

.keyword-panel .panel-title,
.pack-task-panel .panel-title,
.pack-filter-panel .panel-title {
  min-height: 66px;
}

.pack-filter-panel {
  overflow: hidden;
}

.pack-filter-panel .panel-title {
  padding: 20px 22px 14px;
  border-bottom-color: rgba(17, 17, 17, 0.06);
}

.douyin-filter-form {
  gap: 14px;
  padding: 18px 22px 22px;
}

.filter-field {
  gap: 8px;
}

.filter-field > span {
  padding-left: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.1;
}

.douyin-filter-form input,
.douyin-filter-form select {
  min-height: 44px;
  border-color: rgba(17, 17, 17, 0.15);
  border-radius: 12px;
  background-color: #ffffff;
  font-size: 14px;
  font-weight: 650;
}

.douyin-filter-form input {
  padding-inline: 14px;
}

.douyin-filter-form select {
  padding-left: 14px;
  padding-right: 42px;
  background-position: calc(100% - 22px) 20px, calc(100% - 16px) 20px;
}

.douyin-filter-form .filter-save-button {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  border-radius: 999px;
}

.table-toolbar {
  justify-content: space-between;
  min-height: 58px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

td {
  color: var(--ink-soft);
}

tbody tr:hover {
  background: rgba(17, 17, 17, 0.018);
}

tbody tr:last-child td {
  border-bottom: 0;
}

td a,
td strong {
  color: var(--ink);
  font-weight: 650;
}

td a:hover,
.ghost-link:hover,
.link-button:hover {
  color: var(--ink);
}

td.actions {
  min-width: 218px;
}

td.actions > * {
  margin: 3px 4px 3px 0;
  vertical-align: middle;
}

.keyword-table td:first-child {
  min-width: 250px;
}

.empty {
  padding: 24px 18px;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}

.error-text {
  display: block;
  margin-top: 6px;
  color: var(--danger);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.status,
.script-badge,
.api-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  white-space: nowrap;
}

.status,
.script-badge {
  background: var(--warning-soft);
  color: var(--warning);
}

.status.done,
.status.success,
.status.hit,
.status.found,
.status.completed,
.status.generated,
.status.finished,
.status.published,
.script-badge.generated {
  background: var(--success-soft);
  color: var(--success);
}

.status.running,
.status.pending,
.status.searching,
.status.waiting_api,
.status.script_running,
.status.queued,
.status.training,
.status.tts_running,
.status.video_running,
.status.ready,
.script-badge.running {
  background: var(--accent-soft);
  color: #8e8edf;
}

.status.trained,
.status.tts_done {
  background: var(--success-soft);
  color: var(--success);
}

.status.failed,
.status.error,
.status.missed,
.script-badge.failed {
  background: var(--danger-soft);
  color: var(--danger);
}

.api-type-badge {
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.muted-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.primary,
.secondary,
.ghost,
.button-link,
.douyin-button,
.link-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease,
    transform 0.16s ease, box-shadow 0.16s ease;
}

.primary,
.button-link.solid,
.douyin-button {
  background: var(--primary);
  color: #ffffff;
}

.primary:hover,
.button-link.solid:hover,
.douyin-button:hover {
  background: var(--primary-hover);
  color: #ffffff;
}

.confirm-danger {
  background: var(--danger);
  color: #ffffff;
}

.confirm-danger:hover {
  background: #a92b25;
  color: #ffffff;
}

.secondary {
  background: var(--primary);
  color: #ffffff;
}

.secondary:hover {
  background: var(--primary-hover);
  color: #ffffff;
}

.ghost,
.button-link,
.ghost-link {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
}

.ghost:hover,
.button-link:hover,
.ghost-link:hover {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
}

.ghost.danger,
.ghost-danger {
  border-color: rgba(194, 51, 43, 0.24);
  background: transparent;
  color: var(--danger);
}

.ghost.danger:hover,
.ghost-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.small {
  min-height: 32px;
  padding: 0 11px;
  font-size: 12px;
}

.link-button {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--click-blue);
}

.link-button:hover,
.link-button:focus-visible {
  color: var(--click-blue-hover);
}

.icon-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 999px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 25px;
  line-height: 1;
}

.icon-button:hover {
  background: rgba(17, 17, 17, 0.05);
  color: var(--ink);
}

form {
  margin: 0;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--ink-soft);
  font-weight: 650;
}

label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
  outline: none;
  padding: 8px 11px;
  font-size: 13px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

select {
  appearance: none;
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-panel {
  padding: 22px;
}

.checkbox-row,
.switch-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--ink);
}

.switch-form {
  display: inline-flex;
}

.switch-control input {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  min-height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-soft);
  transition: background 0.16s ease, border-color 0.16s ease;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(17, 17, 17, 0.12);
  transition: transform 0.16s ease;
}

.switch-control input:checked + .switch-track {
  border-color: var(--ink);
  background: var(--ink);
}

.switch-control input:checked + .switch-track .switch-thumb {
  transform: translateX(20px);
}

.modal {
  width: min(920px, calc(100vw - 40px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 32px 90px rgba(17, 17, 17, 0.16);
  overflow: hidden;
  overscroll-behavior: contain;
}

dialog.modal:not([open]) {
  display: none;
}

.modal::backdrop {
  background: rgba(17, 17, 17, 0.42);
  backdrop-filter: blur(8px);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.18;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.modal-head span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.modal-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.modal-body {
  max-height: calc(100vh - 148px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 22px 24px 24px;
}

.pack-form-modal,
.api-config-modal {
  width: min(760px, calc(100vw - 40px));
}

.director-select-modal {
  width: min(760px, calc(100vw - 40px));
}

.director-select-modal .modal-head {
  padding: 15px 22px 14px;
}

.director-select-modal .modal-head h2 {
  font-size: 22px;
}

.director-select-form {
  display: grid;
  gap: 16px;
  padding: 18px 22px 22px;
}

.director-select-field {
  margin: 0;
}

.director-select-form .form-actions {
  justify-content: flex-end;
}

.script-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.script-context-section {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.script-context-section legend {
  padding: 0 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

.script-context-options {
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow: auto;
  padding-right: 2px;
}

.script-context-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
}

.script-context-option input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 1px;
  accent-color: var(--ink);
}

.script-context-option span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.script-context-option strong,
.script-context-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-context-option strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 720;
}

.script-context-option small,
.script-context-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.confirm-modal {
  width: min(420px, calc(100vw - 32px));
  max-height: none;
}

.confirm-modal .modal-head {
  padding: 22px 22px 12px;
  border-bottom: 0;
}

.confirm-modal .modal-head h2 {
  font-size: 22px;
}

.confirm-modal .modal-head p {
  max-width: 320px;
  margin-top: 8px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.confirm-modal-body {
  padding: 8px 22px 22px;
  overflow: visible;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.douyin-login-dialog {
  width: min(1240px, calc(100vw - 48px));
  max-height: calc(100vh - 32px);
}

.douyin-login-panel {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 132px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px;
  background: var(--surface-soft);
}

.douyin-login-panel img {
  display: block;
  width: min(100%, 1180px);
  height: auto;
  max-height: calc(100vh - 214px);
  aspect-ratio: 59 / 38;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #e9e9e4;
  object-fit: contain;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.douyin-login-panel img.is-dragging {
  cursor: grabbing;
}

.douyin-login-complete {
  min-height: min(48vh, 420px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid rgba(22, 134, 83, 0.18);
  border-radius: 18px;
  background: var(--success-soft);
  color: var(--success);
  text-align: center;
}

.douyin-login-complete strong {
  font-size: 24px;
  font-weight: 700;
}

.douyin-login-complete span {
  color: var(--muted);
  font-size: 14px;
}

.douyin-login-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.douyin-login-tools input {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
}

.pack-dialog-form textarea {
  min-height: 300px;
}

.compact-account-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
}

.account-list {
  display: grid;
  gap: 10px;
}

.account-row,
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.account-row strong,
.list-row strong {
  display: block;
  color: var(--ink);
  font-weight: 650;
}

.account-row span,
.list-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.list {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.list-row.static {
  pointer-events: none;
}

.task-panel .list,
.job-list-scroll {
  max-height: 470px;
  overflow: auto;
}

.topics-page {
  display: grid;
  gap: 16px;
}

.topics-head {
  align-items: stretch;
  margin-bottom: 0;
}

.topics-head.compact {
  justify-content: flex-end;
}

.topics-head.compact .topics-summary {
  margin-left: auto;
}

.topics-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(96px, 1fr));
  gap: 10px;
  min-width: min(500px, 100%);
}

.topics-summary > div {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.topics-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.topics-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.topics-toolbar {
  display: grid;
  grid-template-columns:
    minmax(170px, 220px) minmax(140px, 170px) minmax(170px, 1fr)
    minmax(140px, 170px);
  gap: 12px;
  align-items: end;
  padding: 14px;
}

.topic-date-field {
  position: relative;
}

.date-picker-trigger {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}

.date-picker-trigger:hover {
  border-color: var(--ink);
}

.date-picker-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: 312px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.date-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.date-picker-head button,
.date-picker-actions button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-weight: 650;
}

.date-picker-head strong {
  color: var(--ink);
  font-weight: 650;
}

.date-picker-weekdays,
.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.date-picker-weekdays {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}

.date-picker-grid button {
  min-width: 0;
  min-height: 34px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.date-picker-grid button:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.date-picker-grid button:disabled {
  color: var(--muted-2);
  opacity: 0.5;
}

.date-picker-grid button.active,
.date-picker-grid button.selected {
  background: var(--ink);
  color: #ffffff;
}

.date-picker-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.topics-board {
  overflow: hidden;
}

.topics-board-head {
  padding: 17px 20px;
}

.topic-bulk-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.topic-bulk-actions > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.topics-board-head > div span {
  display: block;
  margin-top: 3px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 14px;
  padding: 14px;
}

.video-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.topics-grid {
  align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
}

.keyword-masonry-grid {
  align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
}

.topic-masonry-column {
  display: grid;
  gap: 14px;
  align-content: start;
}

.topics-grid .douyin-card,
.keyword-masonry-grid .douyin-card {
  width: 100%;
  align-self: start;
}

.keyword-masonry-empty {
  grid-column: 1 / -1;
}

.topic-card-select {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.12);
  backdrop-filter: blur(10px);
}

.topic-card-select input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--ink);
}

.topic-empty {
  grid-column: 1 / -1;
}

.topic-load-status {
  margin: 0 14px 14px;
  padding: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

.douyin-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.douyin-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.douyin-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 3.9;
  overflow: hidden;
  border: 0;
  background: var(--ink);
  color: #ffffff;
}

.douyin-cover.has-cover {
  aspect-ratio: auto;
}

.douyin-cover-button {
  padding: 0;
  text-align: left;
}

.douyin-cover img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.douyin-preview-stage video,
.douyin-preview-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.douyin-cover-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  background: #1d1d1b;
  color: rgba(255, 255, 255, 0.84);
}

.douyin-cover-placeholder strong {
  color: #ffffff;
  font-size: 22px;
}

.douyin-platform,
.douyin-like-overlay,
.douyin-duration {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.74);
  color: #ffffff;
  font-size: 11px;
  font-weight: 650;
  backdrop-filter: blur(8px);
}

.douyin-platform {
  top: 10px;
  left: 10px;
  padding: 5px 8px;
}

.douyin-like-overlay {
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
}

.douyin-duration {
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
}

.douyin-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.douyin-title {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.48;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

[data-hover-preview] {
  cursor: help;
}

.douyin-meta {
  display: block;
  min-height: 18px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.douyin-meta-context {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.douyin-author-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.douyin-author-line .creator-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creator-name,
.douyin-preview-modal [data-preview-meta],
.script-author-cell {
  color: var(--creator-blue);
  font-weight: 650;
}

.douyin-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.douyin-stats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hover-preview-tooltip {
  position: fixed;
  z-index: 10000;
  width: min(360px, calc(100vw - 28px));
  max-height: 240px;
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(17, 17, 17, 0.12);
  color: var(--ink);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.55;
  white-space: pre-wrap;
  pointer-events: none;
}

.hover-preview-tooltip[hidden] {
  display: none;
}

.topic-note {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #d9e8f8;
  border-radius: var(--radius-sm);
  background: var(--info-soft);
  color: #28536b;
  font-size: 12px;
  font-weight: 500;
}

.douyin-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.douyin-actions form {
  min-width: 0;
}

.douyin-button {
  width: 100%;
  min-height: 34px;
  padding: 0 9px;
}

.douyin-button.muted {
  border-color: transparent;
  background: var(--surface-soft);
  color: var(--muted);
}

.douyin-button.ghost-danger {
  border-color: rgba(194, 51, 43, 0.24);
  background: transparent;
  color: var(--danger);
}

.modal.douyin-preview-modal {
  width: min(720px, calc(100vw - 40px));
  height: min(860px, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
}

.modal.douyin-preview-modal[open] {
  display: flex;
}

.douyin-preview-modal .modal-head {
  flex: 0 0 auto;
  padding: 18px 22px;
  border-radius: 24px 24px 0 0;
}

.douyin-preview-modal .modal-head > div {
  flex: 1;
  min-width: 0;
  max-height: 132px;
  overflow: auto;
  padding-right: 4px;
}

.douyin-preview-modal .modal-head h2 {
  font-size: 16px;
  line-height: 1.28;
  letter-spacing: 0;
}

.douyin-preview-modal .modal-body {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
  background: #000000;
}

.douyin-preview-body {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 20px 24px 22px;
}

.douyin-preview-stage {
  position: relative;
  overflow: hidden;
  width: auto;
  height: min(100%, 560px);
  max-width: min(100%, 420px);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  border-radius: 18px;
  background: #000000;
}

.douyin-preview-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 24px;
  color: #ffffff;
  text-align: center;
}

.douyin-preview-fallback::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.58);
}

.douyin-preview-fallback > * {
  position: relative;
  z-index: 1;
}

.douyin-preview-fallback img {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.52;
}

.douyin-preview-fallback strong {
  font-size: 20px;
  font-weight: 650;
}

.douyin-preview-actions {
  justify-content: center;
}

.douyin-preview-actions .button-link.solid {
  border-color: #ffffff;
  background: #ffffff;
  color: #111111;
}

.douyin-preview-actions .button-link.solid:hover {
  border-color: #f3f3f0;
  background: #f3f3f0;
  color: #111111;
}

.script-table {
  min-width: 1080px;
  table-layout: fixed;
}

.script-table th,
.script-table td {
  padding: 13px;
}

.script-table th:nth-child(1),
.script-table td:nth-child(1) {
  width: 52px;
}

.script-table th:nth-child(2),
.script-table td:nth-child(2) {
  width: 230px;
}

.script-table th:nth-child(3),
.script-table td:nth-child(3) {
  width: 160px;
}

.script-table th:nth-child(4),
.script-table td:nth-child(4) {
  width: auto;
}

.script-table th:nth-child(5),
.script-table td:nth-child(5) {
  width: 150px;
}

.script-table th:nth-child(6),
.script-table td:nth-child(6) {
  width: 170px;
  text-align: center;
}

.script-table th:nth-child(7),
.script-table td:nth-child(7) {
  width: 270px;
  text-align: center;
}

.script-table td.actions {
  display: table-cell;
  min-width: 0;
  padding-left: 12px;
  padding-right: 12px;
  vertical-align: middle;
}

.script-table td.actions > * {
  margin: 0;
}

.module-table {
  min-width: 1120px;
  table-layout: fixed;
}

.module-table th,
.module-table td {
  padding: 13px;
}

.module-table th:nth-child(1),
.module-table td:nth-child(1) {
  width: 210px;
}

.module-table th:nth-child(2),
.module-table td:nth-child(2) {
  width: 150px;
}

.module-table th:nth-child(4),
.module-table td:nth-child(4) {
  width: 126px;
}

.module-table th:nth-child(5),
.module-table td:nth-child(5) {
  width: 150px;
}

.module-table th:nth-child(6),
.module-table td:nth-child(6) {
  width: 150px;
}

.module-table td.actions {
  display: table-cell;
  min-width: 0;
  vertical-align: middle;
}

.digital-job-table th:nth-child(7),
.digital-job-table td:nth-child(7) {
  width: 178px;
}

.finished-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  white-space: nowrap;
}

.finished-row-actions form {
  margin: 0;
}

.final-video-table {
  min-width: 1280px;
}

.final-video-table th:nth-child(2),
.final-video-table td:nth-child(2) {
  width: 260px;
}

.final-video-table th:nth-child(3),
.final-video-table td:nth-child(3) {
  width: 220px;
}

.final-video-table th:nth-child(7),
.final-video-table td:nth-child(7) {
  width: 150px;
}

.module-title-cell,
.module-copy-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.module-title-cell strong,
.module-title-cell span,
.module-copy-cell span,
.topic-chip-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-title-cell span,
.module-copy-cell span {
  color: var(--muted);
  font-size: 13px;
}

.inline-link {
  margin-top: 4px;
}

.production-modal {
  width: min(760px, calc(100vw - 40px));
}

.finished-preview-modal {
  width: min(820px, calc(100vw - 32px));
}

.finished-preview-body {
  display: grid;
  gap: 14px;
  padding: 18px 22px 22px;
}

.finished-preview-modal .modal-head {
  padding: 18px 22px;
}

.finished-preview-modal .modal-head h2 {
  font-size: 22px;
}

.finished-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  justify-content: center;
  gap: 22px;
  align-items: start;
}

.finished-asset-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.finished-asset-card h3,
.finished-publish-panel h3 {
  margin: 0;
}

.finished-asset-card h3 {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.finished-cover-stage,
.finished-video-stage {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  min-height: 0;
  aspect-ratio: 9 / 16;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
}

.finished-cover-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.finished-video-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  background: transparent;
}

.finished-download-button {
  justify-content: center;
  width: 100%;
}

.finished-publish-panel {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.finished-publish-panel pre {
  margin: 0;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.finished-video-placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 18px;
  color: var(--muted);
  background: var(--surface-soft);
  text-align: center;
}

.finished-video-placeholder strong {
  font-size: 18px;
  font-weight: 750;
}

@media (max-width: 820px) {
  .finished-preview-grid {
    grid-template-columns: 1fr;
  }

  .finished-cover-stage,
  .finished-video-stage {
    justify-self: center;
    width: min(100%, 210px);
  }
}

.finished-video-placeholder span {
  max-width: 360px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.7;
}

.avatar-consent-modal {
  position: relative;
  width: min(820px, calc(100vw - 40px));
}

.avatar-consent-modal .modal-head {
  justify-content: center;
  padding: 34px 42px 22px;
  text-align: center;
}

.avatar-consent-modal .modal-head > div {
  max-width: 600px;
}

.avatar-consent-modal .modal-head h2 {
  font-size: 34px;
  letter-spacing: 0;
}

.avatar-consent-modal .dialog-close-icon {
  position: absolute;
  top: 20px;
  right: 22px;
}

.avatar-consent-body {
  display: grid;
  gap: 22px;
  padding: 0 42px 38px;
}

.consent-section {
  display: grid;
  gap: 10px;
}

.consent-section h3 {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 750;
}

.consent-section p,
.consent-section li {
  color: #8aa0ad;
  font-size: 15px;
  line-height: 1.75;
}

.consent-section p {
  margin: 0;
  color: var(--ink-soft);
}

.consent-section ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 22px;
}

.consent-check {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
  color: var(--click-blue);
  font-size: 15px;
  font-weight: 700;
}

.consent-check input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.consent-check label {
  cursor: pointer;
}

.consent-inline-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--click-blue);
  font-weight: 750;
  line-height: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: normal;
}

.consent-inline-link:hover {
  color: var(--primary);
}

.consent-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border-radius: 6px;
  background: var(--accent);
}

.protocol-modal {
  width: min(980px, calc(100vw - 40px));
}

.protocol-modal-body {
  display: grid;
  gap: 18px;
}

.protocol-summary {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid rgba(94, 168, 202, 0.26);
  border-radius: 12px;
  background: #f4fbff;
}

.protocol-summary strong {
  color: var(--ink);
  font-size: 15px;
}

.protocol-summary ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.protocol-detail {
  display: grid;
  gap: 12px;
  padding: 2px;
}

.protocol-block {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.protocol-block h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
}

.protocol-block p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.78;
}

.avatar-upload-modal {
  width: min(980px, calc(100vw - 40px));
}

.avatar-upload-modal .modal-body {
  gap: 20px;
}

.required-star {
  color: var(--danger);
  font-weight: 800;
}

.video-requirements {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 8px;
  background: #f4f5fb;
  color: #8aa0ad;
}

.video-requirements strong {
  color: var(--ink-soft);
  font-size: 15px;
}

.video-requirements div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 26px;
}

.video-requirements span {
  font-size: 14px;
  line-height: 1.45;
}

.video-requirements .requirements-title {
  grid-column: 1 / -1;
}

.avatar-upload-dropzone {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.avatar-upload-dropzone:hover,
.avatar-upload-dropzone.dragging,
.avatar-upload-dropzone.has-file {
  border-color: var(--click-blue);
  background: #f7fbff;
  color: var(--ink);
}

.avatar-upload-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.avatar-upload-dropzone .upload-cloud {
  color: #b8bdc5;
  font-size: 48px;
  line-height: 1;
}

.avatar-upload-dropzone strong {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
}

.avatar-upload-dropzone em {
  margin-top: 4px;
  color: var(--click-blue);
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
}

.production-form {
  display: grid;
  gap: 14px;
}

.audio-parameter-panel {
  display: grid;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 10px;
  background: #f5f6f8;
}

.audio-parameter-panel > strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
}

.audio-slider {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.audio-slider span {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 750;
}

.audio-slider input[type="range"] {
  width: 100%;
  min-height: 26px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  accent-color: var(--click-blue);
  cursor: pointer;
}

.audio-slider input[type="range"]:focus {
  box-shadow: none;
}

.template-board {
  display: grid;
  gap: 22px;
}

.template-board-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 4px 4px;
}

.template-board-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.12;
  font-weight: 720;
  letter-spacing: -0.04em;
}

.template-board-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.template-management-grid {
  gap: 24px;
}

.template-panel {
  margin-bottom: 0;
}

.template-panel .panel-title {
  min-height: 70px;
  background: rgba(255, 255, 255, 0.72);
}

.template-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 16px;
  padding: 18px;
  align-items: start;
}

.template-card {
  position: relative;
  min-width: 0;
  border-radius: 18px;
  background: #ffffff;
}

.template-card-preview {
  width: 100%;
}

.template-card.is-inactive .template-card-preview {
  filter: grayscale(0.45);
  opacity: 0.76;
}

.template-preview {
  --template-bg: linear-gradient(160deg, #f5f7fb 0%, #cfe8ff 45%, #1f2937 100%);
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 14px;
  background-color: #eef2f7;
  background-image: var(--template-preview-image, var(--template-bg));
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.template-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--template-bg);
  opacity: var(--generated-preview-opacity, 1);
}

.template-preview[style*="--template-preview-image"]::before {
  opacity: 0;
}

.template-preview-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.5));
}

.template-preview-tag,
.template-preview-title,
.template-preview-caption,
.template-preview-line,
.template-preview-timeline,
.template-preview-state,
.template-card-manage {
  position: absolute;
  z-index: 1;
}

.template-preview-tag {
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.78);
  color: #ffffff;
  font-size: 11px;
  font-weight: 760;
}

.template-preview-title {
  right: 12px;
  bottom: 56px;
  left: 12px;
  display: -webkit-box;
  overflow: hidden;
  color: #ffffff;
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.08;
  font-weight: 820;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.template-preview-state {
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: 11px;
  font-weight: 760;
}

.template-preview-caption {
  right: 12px;
  bottom: 16px;
  left: 12px;
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.template-preview-line {
  right: 12px;
  bottom: 46px;
  left: 12px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
}

.template-preview-timeline {
  right: 12px;
  bottom: 48px;
  left: 12px;
  display: grid;
  gap: 5px;
}

.template-preview-timeline i {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
}

.template-preview-timeline i:nth-child(2) {
  width: 72%;
}

.template-preview-timeline i:nth-child(3) {
  width: 46%;
}

.template-preview-tone-0 {
  --template-bg: linear-gradient(160deg, #e9f7ff 0%, #80c8ff 42%, #121826 100%);
}

.template-preview-tone-1 {
  --template-bg: linear-gradient(155deg, #fff6e8 0%, #ffcf6d 46%, #0f172a 100%);
}

.template-preview-tone-2 {
  --template-bg: linear-gradient(155deg, #eefdf4 0%, #6ee7b7 48%, #10201b 100%);
}

.template-preview-tone-3 {
  --template-bg: linear-gradient(155deg, #f6f3ff 0%, #b8a6ff 44%, #1b1734 100%);
}

.template-preview-tone-4 {
  --template-bg: linear-gradient(155deg, #f7f8fa 0%, #b9c1cc 46%, #111111 100%);
}

.template-preview-tone-5 {
  --template-bg: linear-gradient(155deg, #fff1f2 0%, #fb7185 44%, #1f2937 100%);
}

.template-card-manage {
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: flex;
  gap: 8px;
}

.template-card-manage button,
.template-card-manage form {
  flex: 1 1 0;
  min-width: 0;
}

.template-card-manage form {
  margin: 0;
}

.template-card-manage button {
  width: 100%;
  min-height: 30px;
  padding-inline: 10px;
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.template-card-manage .ghost.danger {
  background: rgba(255, 255, 255, 0.88);
}

.template-modal {
  width: min(760px, calc(100vw - 40px));
}

.template-form {
  display: grid;
  gap: 14px;
}

.production-template-grid {
  margin-top: 2px;
}

.workflow-page,
.workflow-form {
  display: grid;
  gap: 18px;
}

.workflow-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 4px 4px;
}

.workflow-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.12;
  font-weight: 720;
  letter-spacing: -0.04em;
}

.workflow-head p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.workflow-panel {
  margin-bottom: 0;
}

.workflow-table th:nth-child(1),
.workflow-table td:nth-child(1) {
  min-width: 180px;
}

.workflow-table th:nth-child(3),
.workflow-table td:nth-child(3),
.workflow-table th:nth-child(4),
.workflow-table td:nth-child(4) {
  min-width: 190px;
}

.task-queue-table {
  min-width: 1500px;
}

.task-queue-table-wrap {
  cursor: grab;
  overscroll-behavior-x: contain;
}

.task-queue-table-wrap.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.task-queue-table th:nth-child(2),
.task-queue-table td:nth-child(2) {
  min-width: 180px;
}

.task-queue-table th:nth-child(5),
.task-queue-table td:nth-child(5) {
  min-width: 420px;
}

.task-queue-table th:nth-child(6),
.task-queue-table td:nth-child(6) {
  min-width: 220px;
  white-space: nowrap;
}

.task-queue-table th:nth-child(7),
.task-queue-table td:nth-child(7) {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 150px;
  background:
    linear-gradient(90deg, rgba(45, 212, 191, 0.14), transparent 24px),
    #081221;
  border-left: 1px solid rgba(94, 234, 212, 0.28);
  box-shadow: -18px 0 26px rgba(3, 7, 18, 0.48);
}

.task-queue-table th:nth-child(7) {
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(45, 212, 191, 0.18), transparent 26px),
    #081221;
}

.task-queue-table td:nth-child(7) .workflow-row-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.task-queue-node-progress {
  --node-progress-track: rgba(94, 234, 212, 0.18);
  --node-progress-done: #2dd4bf;
  --node-progress-running: #38bdf8;
  --node-progress-idle: rgba(148, 163, 184, 0.56);
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-width: 380px;
  overflow-x: auto;
  padding: 14px 12px 12px;
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(45, 212, 191, 0.08), rgba(56, 189, 248, 0.05)),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.06) 0 1px, transparent 1px 18px),
    rgba(8, 18, 34, 0.56);
  box-shadow: inset 0 0 24px rgba(56, 189, 248, 0.07);
  scrollbar-width: thin;
}

.task-queue-node-progress::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at 18% 0%, rgba(45, 212, 191, 0.18), transparent 32%);
}

.task-queue-node-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 9px;
  min-width: 98px;
  flex: 1 0 98px;
  text-align: center;
  padding-top: 4px;
}

.task-queue-node-step::after {
  content: "";
  position: absolute;
  top: 18px;
  left: calc(50% + 17px);
  width: calc(100% - 32px);
  height: 3px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--node-progress-track), rgba(148, 163, 184, 0.08)),
    rgba(148, 163, 184, 0.18);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.08);
}

.task-queue-node-step:last-child::after {
  display: none;
}

.task-queue-node-step-dot {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--node-progress-idle);
  background:
    radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.98) 0 42%, rgba(148, 163, 184, 0.16) 43% 100%),
    rgba(15, 23, 42, 0.9);
  box-shadow:
    0 0 0 5px rgba(15, 23, 42, 0.78),
    inset 0 0 10px rgba(148, 163, 184, 0.16);
}

.task-queue-node-step-dot::before,
.task-queue-node-step-dot::after {
  content: "";
  position: absolute;
  opacity: 0;
}

.task-queue-node-step strong {
  color: #d7e3f7;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.45;
  max-width: 94px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.task-queue-node-step-pending strong {
  color: #8ea2c2;
}

.task-queue-node-step-success::after {
  background: linear-gradient(90deg, var(--node-progress-done), rgba(45, 212, 191, 0.28));
  box-shadow: 0 0 16px rgba(45, 212, 191, 0.32);
}

.task-queue-node-step-success .task-queue-node-step-dot {
  border-color: rgba(45, 212, 191, 0.9);
  background:
    radial-gradient(circle at 50% 50%, #2dd4bf 0 42%, rgba(20, 184, 166, 0.32) 43% 100%),
    #042f2e;
  box-shadow:
    0 0 0 5px rgba(45, 212, 191, 0.12),
    0 0 22px rgba(45, 212, 191, 0.42),
    inset 0 0 9px rgba(255, 255, 255, 0.18);
}

.task-queue-node-step-success .task-queue-node-step-dot::before {
  left: 9px;
  top: 6px;
  width: 7px;
  height: 12px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(40deg);
  opacity: 1;
}

.task-queue-node-step-running::after {
  background: linear-gradient(90deg, var(--node-progress-running), rgba(56, 189, 248, 0.12));
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.38);
}

.task-queue-node-step-running .task-queue-node-step-dot {
  border-color: rgba(56, 189, 248, 0.94);
  background:
    radial-gradient(circle at 50% 50%, #e0f2fe 0 20%, #38bdf8 21% 42%, rgba(14, 116, 144, 0.48) 43% 100%),
    #082f49;
  box-shadow:
    0 0 0 5px rgba(56, 189, 248, 0.14),
    0 0 26px rgba(56, 189, 248, 0.55),
    inset 0 0 10px rgba(255, 255, 255, 0.24);
  animation: task-queue-node-pulse 1.5s ease-in-out infinite;
}

.task-queue-node-step-running .task-queue-node-step-dot::before {
  left: 13px;
  top: 7px;
  width: 3px;
  height: 10px;
  background: #083344;
  border-radius: 999px;
  opacity: 1;
}

.task-queue-node-step-running .task-queue-node-step-dot::after {
  left: 13px;
  bottom: 6px;
  width: 3px;
  height: 3px;
  background: #083344;
  border-radius: 50%;
  opacity: 1;
}

.task-queue-node-step-running strong {
  color: #bae6fd;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.32);
}

@keyframes task-queue-node-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 5px rgba(56, 189, 248, 0.14),
      0 0 22px rgba(56, 189, 248, 0.42),
      inset 0 0 10px rgba(255, 255, 255, 0.24);
  }
  50% {
    transform: scale(1.08);
    box-shadow:
      0 0 0 8px rgba(56, 189, 248, 0.08),
      0 0 34px rgba(56, 189, 248, 0.62),
      inset 0 0 12px rgba(255, 255, 255, 0.28);
  }
}

.workflow-empty-inline {
  color: #8ea2c2;
  font-size: 13px;
}

.workflow-builder-shell {
  display: grid;
  gap: 18px;
}

.workflow-builder-form {
  display: grid;
  gap: 18px;
}

.workflow-builder-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 20px 22px;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(66, 216, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(12, 19, 36, 0.96), rgba(8, 13, 26, 0.96));
  box-shadow: var(--shadow-tight);
}

.workflow-builder-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.workflow-builder-title-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.workflow-builder-title-copy strong {
  color: #eff8ff;
  font-size: 20px;
  font-weight: 780;
}

.workflow-builder-title-copy span {
  color: #8ea2c2;
  font-size: 13px;
}

.workflow-builder-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.workflow-inline-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 999px;
  background: rgba(5, 11, 22, 0.45);
  color: #cbd8ef;
  font-size: 13px;
  font-weight: 650;
}

.workflow-inline-switch input {
  accent-color: #42d8ff;
}

.workflow-builder-meta {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 14px;
}

.workflow-builder-field {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(12, 19, 36, 0.94), rgba(8, 13, 26, 0.94));
}

.workflow-builder-field span,
.workflow-builder-section-head span,
.workflow-template-group-head span,
.workflow-inspector-json-head span {
  color: #8ea2c2;
  font-size: 12px;
  font-weight: 650;
}

.workflow-builder-field input,
.workflow-builder-field textarea,
.workflow-builder-field select,
.workflow-inspector-field input,
.workflow-inspector-field textarea {
  width: 100%;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 12px;
  background: rgba(5, 11, 22, 0.62);
  color: #eff8ff;
}

.workflow-builder-field input,
.workflow-builder-field select {
  min-height: 42px;
  padding: 0 14px;
}

.workflow-builder-field textarea,
.workflow-inspector-field textarea {
  min-height: 92px;
  padding: 12px 14px;
  resize: vertical;
}

.workflow-builder-field-wide {
  grid-column: 1 / -1;
}

.workflow-builder-section {
  display: grid;
  gap: 14px;
}

.workflow-builder-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 4px;
}

.workflow-builder-section-head strong {
  display: block;
  color: #eff8ff;
  font-size: 18px;
  font-weight: 780;
}

.workflow-builder-source-grid,
.workflow-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.workflow-source-card,
.workflow-template-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(14, 22, 42, 0.96), rgba(9, 15, 29, 0.96));
  box-shadow: var(--shadow-tight);
  cursor: grab;
  user-select: none;
}

.workflow-source-card:active,
.workflow-template-card:active {
  cursor: grabbing;
}

.workflow-source-card:hover,
.workflow-template-card:hover {
  border-color: rgba(66, 216, 255, 0.35);
  transform: translateY(-1px);
}

.workflow-source-card strong,
.workflow-template-card strong {
  color: #eff8ff;
  font-size: 15px;
  font-weight: 760;
}

.workflow-source-card span,
.workflow-template-card span,
.workflow-source-card p,
.workflow-template-card p {
  color: #8ea2c2;
}

.workflow-source-card p,
.workflow-template-card p {
  margin: 0;
  line-height: 1.55;
}

.workflow-source-icon,
.workflow-template-marker,
.workflow-inspector-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(66, 216, 255, 0.25), rgba(124, 92, 255, 0.24));
  color: #eff8ff;
  font-weight: 800;
}

.workflow-source-copy,
.workflow-template-copy {
  display: grid;
  gap: 6px;
}

.workflow-source-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.workflow-source-tags em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(130, 171, 236, 0.12);
  background: rgba(5, 11, 22, 0.52);
  color: #cbd8ef;
  font-size: 12px;
  font-style: normal;
}

.workflow-source-foot,
.workflow-template-foot {
  display: flex;
  justify-content: flex-end;
  color: #6d82a8;
  font-size: 12px;
}

.workflow-builder-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.workflow-builder-canvas-column,
.workflow-builder-inspector {
  display: grid;
  gap: 12px;
}

.workflow-canvas-shell,
.workflow-builder-inspector {
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(12, 19, 36, 0.96), rgba(8, 13, 26, 0.96));
  box-shadow: var(--shadow-tight);
}

.workflow-canvas-shell {
  overflow: hidden;
}

.workflow-canvas {
  position: relative;
  min-height: 620px;
  padding: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(66, 216, 255, 0.09), transparent 30%),
    radial-gradient(circle at bottom right, rgba(124, 92, 255, 0.1), transparent 26%),
    linear-gradient(180deg, rgba(6, 11, 21, 0.96), rgba(9, 14, 28, 0.98));
}

.workflow-canvas-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(130, 171, 236, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 171, 236, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.workflow-edge-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.workflow-edge {
  fill: none;
  stroke: rgba(224, 235, 255, 0.58);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(156, 190, 255, 0.34));
  vector-effect: non-scaling-stroke;
}

.workflow-edge.preview {
  stroke: rgba(66, 216, 255, 0.86);
}

.workflow-node-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.workflow-canvas-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 8px;
  min-width: 220px;
  color: rgba(142, 162, 194, 0.74);
  font-size: 13px;
  text-align: center;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.workflow-canvas-hint svg {
  width: 58px;
  height: 58px;
  color: rgba(130, 146, 184, 0.34);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workflow-canvas-hint strong {
  color: rgba(166, 184, 218, 0.8);
  font-size: 14px;
  font-weight: 650;
}

.workflow-canvas-hint span {
  color: rgba(112, 130, 166, 0.72);
  font-size: 12px;
}

.workflow-canvas-tools {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(130, 171, 236, 0.16);
  border-radius: 13px;
  background: rgba(13, 20, 45, 0.84);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}

.workflow-canvas-tools button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #aebde1;
  cursor: pointer;
}

.workflow-canvas-tools button:hover {
  background: rgba(130, 171, 236, 0.11);
  color: #eff8ff;
}

.workflow-canvas-tools svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workflow-canvas-tools span {
  min-width: 44px;
  color: #7182a6;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.workflow-node {
  position: absolute;
  width: 220px;
  min-height: 108px;
  padding: 12px 14px;
  border: 1.5px solid currentColor;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(17, 24, 55, 0.98), rgba(11, 17, 40, 0.98));
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  color: #eff8ff;
  cursor: grab;
  pointer-events: auto;
}

.workflow-node:active {
  cursor: grabbing;
}

.workflow-node::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 100%, var(--node-glow, rgba(66, 216, 255, 0.34)), transparent 68%);
  opacity: 0;
  filter: blur(10px);
  pointer-events: none;
  transition: opacity 0.16s ease;
  z-index: -1;
}

.workflow-node.is-selected {
  box-shadow:
    0 0 0 2px currentColor,
    0 0 22px var(--node-glow, rgba(66, 216, 255, 0.42)),
    0 18px 42px rgba(0, 0, 0, 0.38);
}

.workflow-node.is-selected::after {
  opacity: 1;
}

.workflow-node-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.workflow-node-header-copy {
  display: grid;
  min-width: 0;
}

.workflow-node-header-copy strong {
  color: #eff8ff;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-node-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.workflow-node-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: currentColor;
  flex: 0 0 auto;
}

.workflow-node-icon svg {
  width: 19px;
  height: 19px;
  color: #ffffff;
}

.workflow-node-body {
  display: grid;
  gap: 8px;
  margin-top: 15px;
}

.workflow-node-role {
  color: #61708d;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.1;
}

.workflow-node-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: currentColor;
  font-size: 12px;
  font-weight: 800;
}

.workflow-node-status i {
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  background: rgba(5, 11, 22, 0.82);
}

.workflow-node-remove {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: rgba(130, 171, 236, 0.08);
  color: #6f7fa0;
  font-size: 16px;
  line-height: 1;
  flex: 0 0 auto;
}

.workflow-node-remove:hover {
  background: rgba(130, 171, 236, 0.16);
  color: #eff8ff;
}

.workflow-node-handle {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 2px solid currentColor;
  border-radius: 999px;
  background: #071020;
  transform: translateY(-50%);
  cursor: crosshair;
  z-index: 2;
}

.workflow-node-handle.in {
  left: -7px;
}

.workflow-node-handle.out {
  right: -7px;
}

.workflow-node.node-accent-purple,
.workflow-source-card.accent-purple .workflow-source-icon,
.workflow-inspector-badge.accent-purple {
  color: #bc7dff;
}

.workflow-node.node-accent-purple {
  --node-glow: rgba(188, 125, 255, 0.46);
}

.workflow-node.node-accent-cyan,
.workflow-source-card.accent-cyan .workflow-source-icon,
.workflow-inspector-badge.accent-cyan {
  color: #42d8ff;
}

.workflow-node.node-accent-cyan {
  --node-glow: rgba(66, 216, 255, 0.46);
}

.workflow-node.node-accent-orange,
.workflow-source-card.accent-orange .workflow-source-icon,
.workflow-inspector-badge.accent-orange {
  color: #ff9a3c;
}

.workflow-node.node-accent-orange {
  --node-glow: rgba(255, 154, 60, 0.46);
}

.workflow-node.node-accent-green,
.workflow-source-card.accent-green .workflow-source-icon,
.workflow-inspector-badge.accent-green {
  color: #34d399;
}

.workflow-node.node-accent-green {
  --node-glow: rgba(52, 211, 153, 0.44);
}

.workflow-node.node-accent-pink,
.workflow-source-card.accent-pink .workflow-source-icon,
.workflow-inspector-badge.accent-pink {
  color: #ff5fa3;
}

.workflow-node.node-accent-pink {
  --node-glow: rgba(255, 95, 163, 0.46);
}

.workflow-node.node-accent-blue,
.workflow-source-card.accent-blue .workflow-source-icon,
.workflow-inspector-badge.accent-blue {
  color: #5b8cff;
}

.workflow-node.node-accent-blue {
  --node-glow: rgba(91, 140, 255, 0.5);
}

.workflow-builder-inspector {
  overflow: hidden;
  padding: 16px;
  position: sticky;
  top: 18px;
  background:
    radial-gradient(circle at bottom right, rgba(124, 92, 255, 0.2), transparent 54%),
    linear-gradient(180deg, rgba(18, 20, 40, 0.98), rgba(24, 19, 48, 0.98));
}

.workflow-inspector-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 260px;
  padding: 24px;
  border: 1px dashed rgba(130, 171, 236, 0.16);
  border-radius: 18px;
  color: #7f91b2;
  text-align: center;
  background: rgba(5, 11, 22, 0.18);
}

.workflow-inspector-empty svg {
  width: 42px;
  height: 42px;
  color: rgba(142, 162, 194, 0.42);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workflow-inspector-empty strong {
  color: #cbd8ef;
  font-size: 14px;
  font-weight: 760;
}

.workflow-inspector-empty span {
  color: #7f91b2;
  font-size: 12px;
}

.workflow-inspector-body {
  display: grid;
  gap: 16px;
}

.workflow-inspector-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(130, 171, 236, 0.12);
}

.workflow-inspector-summary strong {
  display: block;
  color: #eff8ff;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 780;
}

.workflow-inspector-summary span {
  color: #8ea2c2;
  font-size: 13px;
}

.workflow-inspector-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-weight: 800;
  background: currentColor;
}

.workflow-inspector-badge svg {
  width: 22px;
  height: 22px;
  color: #ffffff;
}

.workflow-inspector-field {
  display: grid;
  gap: 8px;
}

.workflow-inspector-field span {
  color: #a9b8d3;
  font-size: 12px;
  font-weight: 700;
}

.workflow-inspector-field input,
.workflow-inspector-field textarea,
.workflow-inspector-field select {
  display: block;
  width: 100%;
  border: 1px solid rgba(130, 171, 236, 0.14);
  border-radius: 12px;
  background: rgba(8, 8, 24, 0.72);
  color: #eff8ff;
  font-weight: 700;
}

.workflow-inspector-field input,
.workflow-inspector-field select {
  min-height: 38px;
  padding: 0 12px;
}

.workflow-inspector-field textarea {
  min-height: 58px;
  line-height: 1.55;
}

.workflow-inspector-field-group {
  padding-top: 4px;
  border-top: 1px solid rgba(130, 171, 236, 0.12);
}

.workflow-inspector-field-group strong {
  color: #eff8ff;
  font-size: 13px;
  font-weight: 780;
}

.workflow-inspector-field-group-sub {
  color: #8ea2c2;
  font-size: 12px;
  font-weight: 750;
}

.workflow-inspector-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-inspector-tags span,
.workflow-inspector-tags em {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(130, 171, 236, 0.14);
  border-radius: 7px;
  background: rgba(130, 171, 236, 0.08);
  color: #aebde1;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.workflow-inspector-tags span.is-primary {
  border-color: currentColor;
  color: #bc7dff;
  background: rgba(188, 125, 255, 0.12);
}

.workflow-inspector-tags.accent-cyan span.is-primary {
  color: #42d8ff;
  background: rgba(66, 216, 255, 0.1);
}

.workflow-inspector-tags.accent-orange span.is-primary {
  color: #ff9a3c;
  background: rgba(255, 154, 60, 0.1);
}

.workflow-inspector-tags.accent-green span.is-primary {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
}

.workflow-inspector-tags.accent-pink span.is-primary {
  color: #ff5fa3;
  background: rgba(255, 95, 163, 0.1);
}

.workflow-inspector-tags.accent-blue span.is-primary {
  color: #5b8cff;
  background: rgba(91, 140, 255, 0.1);
}

.workflow-inspector-actions {
  display: flex;
  justify-content: flex-end;
}

.workflow-inspector-json {
  display: grid;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(130, 171, 236, 0.12);
}

.workflow-inspector-json-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.workflow-inspector-json pre {
  margin: 0;
  max-height: 240px;
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 14px;
  background: rgba(5, 11, 22, 0.72);
  color: #cbd8ef;
  font-size: 12px;
  line-height: 1.55;
}

.workflow-builder-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.workflow-builder-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 999px;
  background: rgba(5, 11, 22, 0.48);
  color: #cbd8ef;
  font-size: 12px;
}

.workflow-builder-stat i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #42d8ff;
}

.workflow-builder-stat b {
  color: #eff8ff;
  font-weight: 760;
}

.workflow-builder-empty {
  min-height: 104px;
  display: grid;
  place-items: center;
}

.workflow-template-groups {
  display: grid;
  gap: 16px;
}

.workflow-template-group {
  display: grid;
  gap: 12px;
}

.workflow-template-group-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.workflow-template-group-head strong {
  color: #eff8ff;
  font-size: 16px;
  font-weight: 760;
}

.workflow-template-card .workflow-template-marker {
  width: 38px;
  height: 38px;
}

.workflow-template-card .workflow-template-copy {
  gap: 5px;
}

.workflow-template-card .workflow-template-copy span {
  line-height: 1.45;
}

.workflow-template-card .workflow-template-copy p {
  min-height: 42px;
}

@media (max-width: 1100px) {
  .workflow-builder-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .workflow-builder-meta,
  .workflow-builder-main {
    grid-template-columns: 1fr;
  }

  .workflow-builder-inspector {
    position: static;
  }

  .workflow-canvas {
    min-height: 520px;
  }
}

@media (max-width: 720px) {
  .workflow-builder-source-grid,
  .workflow-template-grid {
    grid-template-columns: 1fr;
  }

  .workflow-node {
    width: calc(100% - 48px);
  }
}

.workflow-name-cell,
.workflow-stack-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.workflow-name-cell {
  grid-template-columns: minmax(0, max-content) max-content;
  align-items: center;
}

.workflow-name-cell strong,
.workflow-stack-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-name-cell em {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #3838b7;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.workflow-stack-cell span + span {
  color: var(--muted);
  font-size: 13px;
}

.workflow-switches {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
}

.workflow-modal {
  width: min(1080px, calc(100vw - 40px));
}

.workflow-shell {
  display: grid;
  gap: 20px;
}

.workflow-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(66, 216, 255, 0.10), transparent 38%),
    linear-gradient(180deg, rgba(12, 19, 36, 0.96), rgba(8, 13, 26, 0.96));
  box-shadow: var(--shadow-tight);
}

.workflow-hero-copy {
  display: grid;
  gap: 0;
  min-width: 0;
}

.workflow-hero h1 {
  margin: 0;
  color: #eff8ff;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 720;
}

.workflow-hero p {
  margin: 10px 0 0;
  color: #8ea2c2;
  font-size: 14px;
  line-height: 1.6;
}

.workflow-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.workflow-metrics {
  display: grid;
  gap: 12px;
}

.workflow-metric-card {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 16px;
  background: rgba(5, 11, 22, 0.66);
}

.workflow-metric-card span {
  color: #8ea2c2;
  font-size: 12px;
  font-weight: 700;
}

.workflow-metric-card strong {
  color: #eff8ff;
  font-size: 28px;
  line-height: 1;
  font-weight: 780;
}

.workflow-metric-card small {
  color: #7285a5;
  font-size: 12px;
}

.workflow-panel,
.workflow-task-panel {
  overflow: hidden;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(12, 19, 36, 0.94), rgba(8, 13, 26, 0.94));
  box-shadow: var(--shadow-tight);
}

.workflow-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(130, 171, 236, 0.1);
}

.workflow-panel-head span {
  color: #7f91b2;
  font-size: 12px;
  font-weight: 700;
}

.workflow-panel-head strong {
  display: block;
  margin-top: 4px;
  color: #eff8ff;
  font-size: 17px;
  font-weight: 760;
}

.workflow-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workflow-table-wrap {
  overflow: auto;
}

.workflow-table-dark {
  width: 100%;
  border-collapse: collapse;
}

.workflow-table-dark th,
.workflow-table-dark td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(130, 171, 236, 0.08);
  vertical-align: top;
}

.workflow-table-dark th {
  color: #8ea2c2;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.workflow-table-dark td {
  color: #cbd8ef;
  font-size: 13px;
  word-break: break-word;
}

.workflow-name-cell-dark,
.workflow-config-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}

.workflow-name-cell-dark strong {
  color: #eff8ff;
  font-size: 14px;
  font-weight: 760;
}

.workflow-name-cell-dark span,
.workflow-config-cell span,
.workflow-config-cell small,
.workflow-description-cell {
  color: #8ea2c2;
}

.workflow-config-cell span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.workflow-config-cell small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.workflow-description-cell {
  max-width: 300px;
  line-height: 1.55;
}

.skill-table {
  min-width: 1380px;
  table-layout: fixed;
}

.skill-table th:nth-child(1),
.skill-table td:nth-child(1) {
  width: 6%;
  white-space: nowrap;
}

.skill-table th:nth-child(2),
.skill-table td:nth-child(2) {
  width: 16%;
}

.skill-table th:nth-child(3),
.skill-table td:nth-child(3) {
  width: 15%;
}

.skill-table th:nth-child(4),
.skill-table td:nth-child(4) {
  width: 14%;
  white-space: nowrap;
}

.skill-table th:nth-child(5),
.skill-table td:nth-child(5) {
  width: 16%;
}

.skill-table th:nth-child(6),
.skill-table td:nth-child(6) {
  width: 8%;
  white-space: nowrap;
}

.skill-table td:nth-child(5),
.skill-table td:nth-child(6) {
  vertical-align: top;
}

.skill-table th:nth-child(7),
.skill-table td:nth-child(7) {
  width: 8%;
  white-space: nowrap;
}

.skill-table th:nth-child(8),
.skill-table td:nth-child(8) {
  width: 10%;
  white-space: nowrap;
}

.skill-table th:nth-child(9),
.skill-table td:nth-child(9) {
  width: 8%;
  white-space: nowrap;
}

.workflow-empty {
  padding: 24px;
  border: 1px dashed rgba(130, 171, 236, 0.18);
  border-radius: 16px;
  color: #7f91b2;
  text-align: center;
}

.task-detail-shell {
  gap: 18px;
}

.task-detail-hero {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
}

.task-detail-back {
  width: fit-content;
  margin-bottom: 12px;
}

.task-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.task-detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid rgba(130, 171, 236, 0.12);
  border-radius: 999px;
  background: rgba(5, 11, 22, 0.5);
  color: #8ea2c2;
  font-size: 12px;
  font-weight: 700;
}

.task-detail-panel {
  overflow: visible;
}

.task-detail-input-form {
  display: grid;
  gap: 16px;
  padding: 18px 20px 22px;
}

.task-detail-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.task-detail-input-item {
  display: grid;
  gap: 8px;
  padding: 14px 16px 16px;
  border: 1px solid rgba(130, 171, 236, 0.1);
  border-radius: 14px;
  background: rgba(5, 11, 22, 0.46);
}

.task-detail-input-item span {
  color: #a8b8d6;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.task-detail-input-item input,
.task-detail-input-item select {
  min-height: 42px;
  width: 100%;
  font-family: var(--mono-font, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 12px;
  line-height: 1.65;
}

.task-detail-reference-image-input {
  min-height: 0;
  padding: 10px 12px;
  border: 1px dashed rgba(130, 171, 236, 0.28);
  border-radius: 10px;
  color: #dce9ff;
  background: rgba(3, 8, 18, 0.72);
}

.task-detail-reference-image-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, 100px);
  gap: 8px;
  align-items: start;
  width: 100%;
  min-height: 116px;
  padding: 8px;
  overflow: auto;
  border: 1px solid rgba(130, 171, 236, 0.16);
  border-radius: 12px;
  background: rgba(3, 8, 18, 0.6);
}

.task-detail-reference-image-card {
  position: relative;
  width: 100px;
  height: 100px;
}

.task-detail-reference-image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
}

.task-detail-reference-image-preview span {
  grid-column: 1 / -1;
  place-self: center;
  color: #7f91b2;
  font-size: 12px;
  text-align: center;
}

.task-detail-reference-image-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
  background: rgba(8, 15, 30, 0.78);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.26);
  cursor: pointer;
}

.task-detail-reference-image-remove:hover {
  border-color: rgba(255, 112, 112, 0.8);
  background: rgba(176, 38, 38, 0.88);
}

.task-detail-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-detail-result-head h2 {
  margin: 0;
}

.task-detail-result-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.task-detail-result-reexecute-form {
  margin: 0;
}

.task-detail-content-result-form {
  display: grid;
  gap: 12px;
}

.task-detail-content-result-field {
  display: grid;
  gap: 8px;
}

.task-detail-content-result-field span {
  color: #a8b8d6;
  font-size: 12px;
  font-weight: 700;
}

.task-detail-content-result-form textarea {
  width: 100%;
  min-height: 220px;
  padding: 12px 14px;
  border: 1px solid rgba(130, 171, 236, 0.18);
  border-radius: 12px;
  color: #dce9ff;
  font-family: var(--mono-font, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 12px;
  line-height: 1.7;
  background: rgba(3, 8, 18, 0.82);
  resize: vertical;
}

.task-detail-content-result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.task-detail-image-zoom[hidden] {
  display: none;
}

.task-detail-image-zoom {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(3, 8, 18, 0.82);
  backdrop-filter: blur(10px);
}

.task-detail-image-zoom img {
  max-width: min(920px, 92vw);
  max-height: 86vh;
  border: 1px solid rgba(130, 171, 236, 0.24);
  border-radius: 14px;
  background: rgba(3, 8, 18, 0.92);
  object-fit: contain;
}

.task-detail-image-zoom-close {
  position: fixed;
  top: 20px;
  right: 22px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(130, 171, 236, 0.24);
  border-radius: 999px;
  color: #eff8ff;
  font-size: 26px;
  line-height: 1;
  background: rgba(5, 11, 22, 0.88);
  cursor: pointer;
}

.task-detail-async-overlay[hidden] {
  display: none;
}

.task-detail-async-overlay {
  position: fixed;
  inset: 0;
  z-index: 1150;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 8, 18, 0.46);
  backdrop-filter: blur(8px);
}

.task-detail-async-loading {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 188px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 20px 52px 20px 28px;
  border: 1px solid rgba(102, 126, 234, 0.42);
  border-radius: 14px;
  color: #f8fbff;
  background: rgba(10, 18, 34, 0.88);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.task-detail-async-close {
  position: absolute;
  top: 8px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: rgba(248, 251, 255, 0.7);
  font-size: 18px;
  line-height: 1;
  background: transparent;
  cursor: pointer;
}

.task-detail-async-close:hover {
  color: #ffffff;
  background: rgba(148, 163, 255, 0.16);
}

.task-detail-async-loading strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.task-detail-async-spinner {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(148, 163, 255, 0.32);
  border-top-color: #8b5cf6;
  border-radius: 999px;
  animation: task-detail-spin 0.72s linear infinite;
}

.task-detail-input-item select {
  color: #dce9ff;
  border: 1px solid rgba(130, 171, 236, 0.24);
  border-radius: 10px;
  background: rgba(3, 8, 18, 0.92);
}

.task-detail-range-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
}

.task-detail-range-control input[type="range"] {
  min-height: 30px;
  padding: 0;
  accent-color: #7dd3fc;
}

.task-detail-range-control output {
  display: grid;
  place-items: center;
  min-height: 34px;
  color: #eff8ff;
  font-family: var(--mono-font, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(130, 171, 236, 0.18);
  border-radius: 10px;
  background: rgba(3, 8, 18, 0.82);
}

@media (max-width: 860px) {
  .task-detail-input-grid {
    grid-template-columns: 1fr;
  }
}

.task-detail-input-actions {
  display: flex;
  gap: 10px;
  justify-content: stretch;
  align-items: center;
  flex-wrap: wrap;
}

.task-detail-execute-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.task-detail-primary-execute {
  isolation: isolate;
  flex: 1 0 100%;
  justify-content: center;
  min-height: 58px;
  width: 100%;
  overflow: hidden;
  border-color: rgba(94, 234, 212, 0.86);
  color: #ffffff;
  font-size: 15px;
  font-weight: 880;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 16% 0%, rgba(240, 253, 250, 0.36), transparent 30%),
    linear-gradient(135deg, rgba(20, 184, 166, 0.92), rgba(14, 165, 233, 0.86)),
    linear-gradient(180deg, #0f2f3d, #071827);
  box-shadow:
    0 0 0 1px rgba(125, 211, 252, 0.22),
    0 16px 38px rgba(8, 145, 178, 0.38),
    0 0 30px rgba(45, 212, 191, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 0 -18px 36px rgba(3, 7, 18, 0.22);
  text-shadow: 0 1px 10px rgba(3, 7, 18, 0.45);
}

.task-detail-primary-execute::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent),
    repeating-linear-gradient(90deg, rgba(240, 253, 250, 0.16) 0 1px, transparent 1px 18px);
  opacity: 0.78;
}

.task-detail-primary-execute:hover:not(:disabled) {
  border-color: rgba(240, 253, 250, 0.96);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(240, 253, 250, 0.34),
    0 20px 48px rgba(8, 145, 178, 0.46),
    0 0 42px rgba(45, 212, 191, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    inset 0 -18px 36px rgba(3, 7, 18, 0.18);
}

.task-detail-primary-execute .task-detail-button-spinner,
.task-detail-primary-execute .task-detail-button-text {
  position: relative;
  z-index: 1;
}

.task-detail-button-spinner {
  display: none;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(239, 248, 255, 0.34);
  border-top-color: #eff8ff;
  border-radius: 999px;
  animation: task-detail-spin 0.72s linear infinite;
}

.task-detail-execute-button.is-loading .task-detail-button-spinner {
  display: inline-block;
}

@keyframes task-detail-spin {
  to {
    transform: rotate(360deg);
  }
}

.task-detail-input-empty {
  margin: 0;
}

.task-detail-node-fields {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-top: 1px solid rgba(130, 171, 236, 0.08);
}

.task-detail-node-field-form {
  display: grid;
  gap: 12px;
}

.task-detail-custom-field {
  padding: 12px;
  border-radius: 10px;
}

.task-detail-script-view {
  display: grid;
  gap: 8px;
}

.task-detail-script-view span {
  color: #a8b8d6;
  font-size: 12px;
  font-weight: 700;
}

.task-detail-script-view textarea {
  width: 100%;
  min-height: 320px;
  resize: vertical;
  font-family: var(--mono-font, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 12px;
  line-height: 1.65;
}

.task-detail-json {
  margin: 0;
  min-height: 320px;
  max-height: 520px;
  overflow: auto;
  padding: 16px 18px;
  border-top: 1px solid rgba(130, 171, 236, 0.08);
  background: rgba(5, 11, 22, 0.54);
  color: #cbd8ef;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-color: rgba(66, 216, 255, 0.7) rgba(7, 16, 32, 0.86);
  scrollbar-width: thin;
}

.task-detail-json::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.task-detail-json::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(7, 16, 32, 0.96), rgba(10, 26, 48, 0.78));
  border-left: 1px solid rgba(130, 171, 236, 0.08);
}

.task-detail-json::-webkit-scrollbar-thumb {
  border: 2px solid rgba(7, 16, 32, 0.92);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(66, 216, 255, 0.9), rgba(16, 185, 129, 0.72));
  box-shadow: 0 0 12px rgba(66, 216, 255, 0.36);
}

.task-detail-json::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(125, 232, 255, 0.98), rgba(52, 211, 153, 0.9));
}

.task-detail-timeline {
  display: grid;
  gap: 0;
  padding: 18px 20px 22px;
}

.task-detail-node {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 18px;
}

.task-detail-node:last-child {
  padding-bottom: 0;
}

.task-detail-node::before {
  content: "";
  position: absolute;
  top: 42px;
  bottom: 0;
  left: 31px;
  width: 1px;
  background: linear-gradient(180deg, rgba(66, 216, 255, 0.42), rgba(130, 171, 236, 0.08));
}

.task-detail-node:last-child::before {
  display: none;
}

.task-detail-node-progress {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 7px;
}

.task-detail-node-progress span {
  max-width: 64px;
  color: #7185a8;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.task-detail-node-index {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(66, 216, 255, 0.32);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(14, 29, 54, 0.98), rgba(8, 16, 33, 0.98));
  color: #eff8ff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 0 18px rgba(66, 216, 255, 0.14);
}

.task-detail-node-index--running {
  border-color: rgba(250, 204, 21, 0.48);
  background: linear-gradient(180deg, rgba(84, 64, 15, 0.98), rgba(31, 25, 9, 0.98));
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.2);
}

.task-detail-node-index--success {
  border-color: rgba(16, 185, 129, 0.54);
  background: linear-gradient(180deg, rgba(14, 85, 63, 0.98), rgba(8, 39, 32, 0.98));
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.22);
}

.task-detail-node-index--failed {
  border-color: rgba(248, 113, 113, 0.54);
  background: linear-gradient(180deg, rgba(89, 24, 34, 0.98), rgba(43, 12, 18, 0.98));
  box-shadow: 0 0 18px rgba(248, 113, 113, 0.2);
}

.task-detail-node--success::before {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.5), rgba(130, 171, 236, 0.08));
}

.task-detail-node--success .task-detail-node-progress span {
  color: #7ee7bf;
}

.task-detail-node--running .task-detail-node-progress span {
  color: #fde68a;
}

.task-detail-node--failed .task-detail-node-progress span {
  color: #fca5a5;
}

.task-detail-node-card {
  overflow: hidden;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(13, 21, 42, 0.96), rgba(8, 14, 28, 0.96));
}

.task-detail-node-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(130, 171, 236, 0.08);
}

.task-detail-node-head div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.task-detail-node-head span:not(.status) {
  color: #1a1008;
  font-size: 12px;
  font-weight: 700;
}

.task-detail-node-head strong {
  color: #eff8ff;
  font-size: 16px;
  line-height: 1.25;
}

.task-detail-node-head small {
  color: #8ea2c2;
  font-size: 12px;
  line-height: 1.45;
}

.task-detail-node-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid rgba(130, 171, 236, 0.08);
}

.task-detail-node-grid div {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border-right: 1px solid rgba(130, 171, 236, 0.08);
}

.task-detail-node-grid div:last-child {
  border-right: 0;
}

.task-detail-node-grid dt {
  color: #7185a8;
  font-size: 12px;
  font-weight: 700;
}

.task-detail-node-grid dd {
  margin: 0;
  color: #cbd8ef;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.task-detail-node-sections {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
}

.task-detail-node-sections section {
  min-width: 0;
  border-right: 1px solid rgba(130, 171, 236, 0.08);
}

.task-detail-node-sections section:last-child {
  border-right: 0;
}

.task-detail-node-sections h2 {
  margin: 0;
  padding: 12px 16px;
  color: #eff8ff;
  font-size: 13px;
  font-weight: 760;
}

.task-detail-node-sections .task-detail-json {
  min-height: 100%;
  max-height: 640px;
  border-top: 1px solid rgba(130, 171, 236, 0.08);
}

.task-detail-page .back-link {
  color: #d7cec0;
}

.task-detail-page .workflow-empty {
  border-color: #3a322b;
  background: #100e0d;
  color: #b9aea0;
}

.task-detail-page .auto-flow-progress {
  justify-content: flex-start;
}

.task-detail-page .auto-flow-progress span.task-detail-progress-step {
  min-height: 30px;
  border-color: #302923;
  background: #171514;
  color: #b9aea0;
}

.task-detail-page .auto-flow-progress span.task-detail-progress-step.is-active {
  border-color: #f2932e;
  background: #1d1711;
  color: #ffb45e;
  box-shadow: inset 0 0 0 1px rgba(242, 147, 46, 0.18);
}

.task-detail-page .auto-flow-hero h1 {
  overflow-wrap: anywhere;
}

.task-detail-grid {
  grid-template-columns: 1fr;
  align-items: start;
}

.task-detail-panel {
  overflow: hidden;
}

.task-detail-node-panel {
  grid-column: 1 / -1;
}

.task-detail-input-panel {
  min-height: 0;
}

.task-detail-input-panel.success,
.task-detail-node.success {
  border-color: rgba(57, 186, 125, 0.42);
}

.task-detail-input-panel.success .auto-flow-card-head span {
  background: #39ba7d;
}

.task-detail-input-panel.success .auto-flow-card-head em {
  color: #75d79f;
}

.task-detail-input-panel.failed,
.task-detail-node.failed {
  border-color: rgba(255, 105, 91, 0.52);
}

.task-detail-input-panel.failed .auto-flow-card-head span {
  background: #ff6b5d;
}

.task-detail-input-panel.failed .auto-flow-card-head em {
  color: #ff8b7f;
}

.task-detail-input-form {
  padding: 0;
}

.task-detail-page .task-detail-input-item {
  border-color: #302923;
  background: #110f0e;
}

.task-detail-page .task-detail-input-item span,
.task-detail-page .task-detail-script-view span {
  color: #c8beb0;
  letter-spacing: 0;
}

.task-detail-page .task-detail-input-item input,
.task-detail-page .task-detail-input-item select,
.task-detail-page .task-detail-script-view textarea {
  border-color: #3a322b;
  background: #151312;
  color: #fff8ec;
}

.task-detail-page .task-detail-input-item select option {
  background: #151312;
  color: #fff8ec;
}

.task-detail-term-group {
  display: grid;
  gap: 10px;
}

.task-detail-term-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-detail-term-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #3a322b;
  border-radius: 999px;
  background: #201c19;
  color: #fff8ec;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.task-detail-term-option input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  accent-color: #f2932e;
}

.task-detail-term-option input:focus {
  box-shadow: none;
}

.task-detail-term-option:has(input:checked) {
  border-color: #f2932e;
  background: rgba(242, 147, 46, 0.16);
  color: #ffddb2;
}

.task-detail-term-hint {
  margin: 0;
  min-height: 1.4em;
  color: #d8cdbd;
  font-size: 12px;
  line-height: 1.4;
}

.task-detail-page .task-detail-range-control output {
  border-color: #3a322b;
  background: #201c19;
  color: #ffb45e;
}

.task-detail-page .task-detail-input-actions .ghost,
.task-detail-page .task-detail-input-actions .secondary {
  border-color: #3a322b;
  background: #24201c;
  color: #f7f3ea;
}

.task-detail-page .task-detail-input-actions .secondary {
  background: #f2932e;
  color: #1a1008;
}

.task-detail-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 0;
}

.task-detail-node {
  display: block;
  min-height: 0;
  padding-bottom: 0;
}

.task-detail-node::before,
.task-detail-node-progress {
  display: none;
}

.task-detail-node-card {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.task-detail-node-head {
  flex-wrap: nowrap;
  align-items: center;
  padding: 0;
  border-bottom: 0;
}

.task-detail-node-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.task-detail-node-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.task-detail-node-title-row h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.task-detail-node-status-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.task-detail-save-button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 10px;
  border-color: rgba(125, 211, 252, 0.26);
  color: #dff7ff;
  background: rgba(8, 18, 34, 0.76);
  box-shadow: inset 0 0 16px rgba(56, 189, 248, 0.08);
}

.task-detail-save-button:hover:not(:disabled) {
  border-color: rgba(125, 211, 252, 0.56);
  color: #ffffff;
  background: rgba(12, 31, 54, 0.92);
}

.task-detail-node-head strong,
.task-detail-node-head h2 {
  color: #fff8ec;
}

.task-detail-node.success .task-detail-node-head span {
  background: #39ba7d;
}

.task-detail-node.failed .task-detail-node-head span {
  background: #ff6b5d;
}

.task-detail-node.success .task-detail-node-head em {
  color: #75d79f;
}

.task-detail-node.failed .task-detail-node-head em {
  color: #ff8b7f;
}

.task-detail-node-sections {
  grid-template-columns: 1fr;
  overflow: hidden;
  border: 1px solid #2f2924;
  border-radius: 14px;
  background: #151312;
}

.task-detail-node-sections section {
  border-right: 0;
  border-bottom: 1px solid #2f2924;
}

.task-detail-node-sections section:last-child {
  border-bottom: 0;
}

.task-detail-node-sections h2 {
  color: #fff8ec;
}

.task-detail-node-fields {
  border-top-color: #2f2924;
}

.task-detail-json,
.task-detail-node-sections .task-detail-json {
  border-top-color: #2f2924;
  background: #100e0d;
  color: #d7cec0;
  scrollbar-color: rgba(242, 147, 46, 0.8) #171514;
}

.task-detail-json::-webkit-scrollbar-track {
  background: #171514;
  border-left-color: #2f2924;
}

.task-detail-json::-webkit-scrollbar-thumb {
  border-color: #171514;
  background: #f2932e;
  box-shadow: none;
}

.task-detail-json::-webkit-scrollbar-thumb:hover {
  background: #ffad4f;
}

.task-detail-image-result {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.task-detail-image-preview {
  width: 100%;
  max-width: 100%;
  border: 1px solid #2f2924;
  border-radius: 14px;
  background: #100e0d;
  object-fit: contain;
}

.task-detail-image-download {
  justify-self: start;
}

.task-detail-avatar-result {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.task-detail-result-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid #2f2924;
  border-radius: 12px;
  background: #100e0d;
}

.task-detail-result-item span {
  color: #fff8ec;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.task-detail-result-item a {
  overflow-wrap: anywhere;
}

.task-detail-media-block {
  display: grid;
  gap: 10px;
}

.task-detail-audio-player,
.task-detail-video-player {
  width: 100%;
  border-radius: 12px;
  background: #000000;
}

.task-detail-audio-player {
  width: min(360px, 100%);
  max-width: 100%;
  min-height: 32px;
  padding: 4px 0;
  border: 1px solid rgba(255, 248, 236, 0.12);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  accent-color: #f3c26f;
}

.task-detail-video-player {
  max-height: 360px;
}

.task-detail-result-download {
  justify-self: start;
}

.task-detail-result-item em {
  color: #9b8d7d;
  font-style: normal;
  font-size: 14px;
}

.task-detail-result-pending {
  padding: 16px;
  color: #f3c26f;
  font-weight: 700;
  letter-spacing: 0.02em;
}

@media (max-width: 1180px) {
  .task-detail-flow {
    grid-template-columns: 1fr;
  }
}

.skill-field-editor {
  display: grid;
  gap: 10px;
}

.skill-builder-meta {
  grid-template-columns: minmax(220px, 1.15fr) minmax(220px, 1.15fr) minmax(160px, 0.7fr);
}

.skill-builder-section {
  gap: 12px;
}

.skill-builder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.skill-script-tip {
  margin-left: 10px;
  color: #ff8b8b;
  font-size: 12px;
  font-weight: 700;
}

.skill-script-textarea {
  min-height: 280px;
}

@media (max-width: 720px) {
  .skill-builder-meta,
  .skill-builder-grid {
    grid-template-columns: 1fr;
  }
}

.skill-field-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.skill-field-editor-head > span {
  color: #a9b8d3;
  font-size: 13px;
  font-weight: 750;
}

.skill-field-list {
  display: grid;
  gap: 10px;
}

.skill-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 12px;
  background: rgba(9, 16, 31, 0.72);
}

.skill-field-row.has-type {
  grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr) auto;
}

.skill-field-row.has-text {
  grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
}

.skill-field-row.has-sort.has-text {
  grid-template-columns: 40px 34px 96px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
}

.skill-field-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 10px;
  border: 1px solid rgba(130, 171, 236, 0.13);
  background: rgba(5, 11, 22, 0.78);
  color: #9eb3d0;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
  user-select: none;
}

.skill-field-drag {
  width: 34px;
  min-height: 40px;
  padding: 0;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 10px;
  background: rgba(5, 11, 22, 0.78);
  color: #9eb3d0;
  cursor: grab;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.skill-field-drag:active,
.skill-field-row.is-dragging .skill-field-drag {
  cursor: grabbing;
}

.skill-field-row.is-dragging {
  opacity: 0.55;
  border-color: rgba(66, 216, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(66, 216, 255, 0.18) inset;
}

.skill-field-type,
.skill-field-input {
  width: 100%;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 10px;
  background: rgba(5, 11, 22, 0.92);
  color: #edf5ff;
}

.skill-field-type {
  min-width: 0;
}

.skill-field-input::placeholder {
  color: #6781a6;
}

.skill-field-remove {
  justify-self: end;
}

@media (max-width: 720px) {
  .skill-field-row.has-sort.has-text {
    grid-template-columns: 40px 34px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  }
}

.workflow-task-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.workflow-task-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 16px;
  background: rgba(5, 11, 22, 0.66);
}

.workflow-task-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.workflow-row-actions,
.workflow-task-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.workflow-task-top > div {
  display: grid;
  gap: 4px;
}

.workflow-task-top strong {
  color: #eff8ff;
  font-size: 15px;
  font-weight: 760;
}

.workflow-task-top span,
.workflow-task-card p,
.workflow-task-card small {
  color: #8ea2c2;
}

.workflow-task-card p {
  margin: 0;
  line-height: 1.6;
}

.workflow-modal-dark {
  position: relative;
  width: min(980px, calc(100vw - 40px));
  border: 1px solid rgba(66, 216, 255, 0.42);
  background:
    radial-gradient(circle at 18% 0%, rgba(66, 216, 255, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(12, 20, 38, 0.98), rgba(5, 10, 22, 0.98));
  box-shadow:
    0 34px 110px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(130, 171, 236, 0.12),
    0 0 42px rgba(66, 216, 255, 0.18);
}

.workflow-modal-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent, rgba(66, 216, 255, 0.55), transparent) top / 100% 1px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%);
}

.workflow-modal-dark::backdrop {
  background: rgba(2, 6, 14, 0.66);
  backdrop-filter: blur(10px);
}

.workflow-modal-dark .modal-head {
  border-bottom: 1px solid rgba(130, 171, 236, 0.26);
  background: rgba(8, 15, 30, 0.82);
}

.workflow-modal-dark .modal-head h2 {
  color: #eff8ff;
  letter-spacing: 0;
}

.workflow-modal-dark .modal-head p {
  color: #8ea2c2;
}

.workflow-modal-dark .modal-body {
  background: rgba(5, 10, 22, 0.72);
  scrollbar-width: thin;
  scrollbar-color: rgba(66, 216, 255, 0.62) rgba(6, 13, 27, 0.72);
}

.workflow-modal-dark .modal-body::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.workflow-modal-dark .modal-body::-webkit-scrollbar-track {
  border: 1px solid rgba(130, 171, 236, 0.14);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(3, 8, 18, 0.92), rgba(10, 20, 38, 0.82));
}

.workflow-modal-dark .modal-body::-webkit-scrollbar-thumb {
  border: 2px solid rgba(3, 8, 18, 0.92);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(66, 216, 255, 0.95), rgba(91, 122, 255, 0.82));
  box-shadow: 0 0 14px rgba(66, 216, 255, 0.34);
}

.workflow-modal-dark .modal-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(116, 235, 255, 1), rgba(130, 151, 255, 0.95));
  box-shadow: 0 0 18px rgba(66, 216, 255, 0.52);
}

.workflow-modal-dark .modal-body::-webkit-scrollbar-corner {
  background: transparent;
}

.workflow-form-dark {
  display: grid;
  gap: 14px;
}

.workflow-form-dark label {
  display: grid;
  gap: 8px;
}

.workflow-form-dark span {
  color: #a9b8d3;
  font-size: 13px;
  font-weight: 750;
}

.workflow-form-dark input,
.workflow-form-dark textarea,
.workflow-form-dark select {
  width: 100%;
  border: 1px solid rgba(130, 171, 236, 0.28);
  border-radius: 12px;
  background: rgba(3, 8, 18, 0.9);
  color: var(--ink);
}

.workflow-form-dark input,
.workflow-form-dark select {
  min-height: 42px;
  padding: 0 13px;
}

.workflow-form-dark textarea {
  min-height: 120px;
  padding: 13px;
  resize: vertical;
}

.workflow-form-dark .checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.workflow-task-context {
  display: grid;
  gap: 6px;
  padding: 14px 15px;
  border: 1px solid rgba(130, 171, 236, 0.34);
  border-radius: 14px;
  background: rgba(6, 13, 27, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.workflow-task-context span {
  color: #a9b8d3;
  font-size: 13px;
  font-weight: 750;
}

.workflow-task-context strong {
  color: #eff8ff;
  font-size: 14px;
  font-weight: 760;
}

.workflow-task-fields {
  display: grid;
  gap: 14px;
  padding-top: 4px;
}

.workflow-task-skill-context {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 13px 15px;
  border: 1px solid rgba(130, 171, 236, 0.42);
  border-radius: 12px;
  background: rgba(5, 11, 22, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.workflow-task-skill-context span {
  color: #8ea2c2;
  font-size: 12px;
}

.workflow-task-skill-context strong {
  color: #eff8ff;
}

.workflow-task-field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

.workflow-task-field-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(130, 171, 236, 0.46);
  border-radius: 14px;
  background: rgba(8, 15, 30, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 28px rgba(0, 0, 0, 0.18);
}

.workflow-task-field-group strong {
  color: #eff8ff;
  font-size: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(130, 171, 236, 0.18);
}

.workflow-task-field-group label {
  padding: 10px;
  border: 1px solid rgba(130, 171, 236, 0.28);
  border-radius: 12px;
  background: rgba(5, 11, 22, 0.58);
}

.workflow-task-field-group input {
  border-color: rgba(130, 171, 236, 0.28);
  background: rgba(3, 8, 18, 0.92);
}

.workflow-task-field-group em,
.workflow-task-field-empty {
  color: #8ea2c2;
}

@media (max-width: 720px) {
  .workflow-task-field-grid {
    grid-template-columns: 1fr;
  }
}

.workflow-template-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.template-picker {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.template-picker-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.template-picker-head > div {
  display: grid;
  gap: 3px;
}

.template-picker-head strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 780;
}

.template-picker-head span,
.template-picker-head em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
}

.template-picker-head em {
  max-width: 48%;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 12px;
  max-height: 430px;
  overflow: auto;
  padding-right: 2px;
}

.template-option {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.template-option:hover,
.template-option.is-selected {
  border-color: rgba(17, 17, 17, 0.72);
}

.template-option:hover {
  transform: translateY(-1px);
}

.template-option.is-selected {
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.template-option input {
  position: absolute;
  inset: 10px auto auto 10px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  opacity: 0;
}

.template-option .template-preview {
  width: 100%;
  min-height: 190px;
}

.template-option-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.template-option-meta strong,
.template-option-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-option-meta strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 760;
}

.template-option-meta span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
}

.knowledge-page {
  display: grid;
  gap: 18px;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.knowledge-groups-panel,
.knowledge-files-panel {
  margin-bottom: 0;
}

.knowledge-group-list {
  display: grid;
  gap: 0;
}

.knowledge-group-card {
  display: grid;
  gap: 10px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.knowledge-group-card:last-child {
  border-bottom: 0;
}

.knowledge-group-card.active {
  background: #f3f8fb;
}

.knowledge-group-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.knowledge-group-main strong,
.knowledge-file-cell strong {
  overflow: hidden;
  color: var(--ink);
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-group-main span,
.knowledge-file-cell span,
.knowledge-file-input small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.knowledge-group-main p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.knowledge-group-actions,
.knowledge-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.knowledge-group-actions form,
.knowledge-row-actions form {
  margin: 0;
}

.knowledge-file-table {
  min-width: 980px;
  table-layout: fixed;
}

.knowledge-file-table th:nth-child(1),
.knowledge-file-table td:nth-child(1) {
  width: 260px;
}

.knowledge-file-table th:nth-child(2),
.knowledge-file-table td:nth-child(2),
.knowledge-file-table th:nth-child(3),
.knowledge-file-table td:nth-child(3) {
  width: 110px;
  text-align: center;
}

.knowledge-file-table th:nth-child(5),
.knowledge-file-table td:nth-child(5) {
  width: 170px;
  text-align: center;
}

.knowledge-file-table th:nth-child(6),
.knowledge-file-table td:nth-child(6) {
  width: 170px;
  text-align: center;
}

.knowledge-file-table td.actions {
  min-width: 0;
  vertical-align: middle;
}

.knowledge-file-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.knowledge-note-cell {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-modal {
  width: min(640px, calc(100vw - 40px));
}

.role-modal {
  width: min(920px, calc(100vw - 40px));
}

.role-permission-field {
  display: grid;
  gap: 10px;
}

.role-permission-field > span {
  color: #162033;
  font-size: 13px;
  font-weight: 700;
}

.role-priv-tree {
  display: grid;
  gap: 12px;
  max-height: 420px;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(247, 250, 252, 0.94), rgba(255, 255, 255, 1));
}

.role-priv-group {
  display: grid;
  gap: 10px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.04);
}

.role-priv-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.role-priv-top,
.role-priv-child {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.role-priv-top {
  color: #162033;
}

.role-priv-top input,
.role-priv-child input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #345dff;
}

.role-priv-group-meta {
  color: #8ea2c2;
  font-size: 12px;
  white-space: nowrap;
}

.role-priv-children {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.role-priv-child {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid rgba(130, 171, 236, 0.14);
  border-radius: 10px;
  background: rgba(248, 250, 253, 0.9);
}

.menu-child-name {
  padding-left: 18px;
}

.knowledge-file-input input[type="file"] {
  padding-top: 10px;
  padding-bottom: 10px;
}

.knowledge-summary-card {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.knowledge-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.knowledge-summary-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.knowledge-summary-head strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 760;
}

.knowledge-summary-head span,
.knowledge-summary-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 620;
}

.knowledge-summary-card pre {
  max-height: 220px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.65;
}

.knowledge-summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
}

.promotion-term-table {
  min-width: 820px;
  table-layout: fixed;
}

.promotion-term-table th:nth-child(1),
.promotion-term-table td:nth-child(1) {
  width: 280px;
}

.promotion-term-table th:nth-child(3),
.promotion-term-table td:nth-child(3),
.promotion-term-table th:nth-child(4),
.promotion-term-table td:nth-child(4) {
  width: 170px;
  text-align: center;
}

.promotion-page .table-wrap {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.promotion-page .table-wrap::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.promotion-page .knowledge-groups-panel {
  border-color: rgba(17, 17, 17, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.promotion-page .knowledge-files-panel {
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.promotion-page .panel-title {
  padding-block: 16px;
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.9), rgba(255, 255, 255, 0));
}

.promotion-page .panel-title h2 {
  color: #0f172a;
  font-size: 21px;
  font-weight: 760;
}

.promotion-page .panel-title span {
  color: #64748b;
  font-weight: 700;
}

.promotion-page .knowledge-group-card {
  gap: 8px;
  padding: 16px 16px 17px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(250, 252, 255, 1));
}

.promotion-page .knowledge-group-card.active {
  background: linear-gradient(180deg, rgba(240, 247, 255, 1), rgba(232, 242, 255, 1));
  box-shadow: inset 3px 0 0 #345dff;
}

.promotion-page .knowledge-group-main strong {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.25;
}

.promotion-page .knowledge-group-main span {
  color: #475569;
  font-size: 12px;
  font-weight: 680;
}

.promotion-page .knowledge-group-main p {
  color: #64748b;
  font-size: 12px;
}

.promotion-page .promotion-term-table {
  min-width: 100%;
}

.promotion-page .promotion-term-table th:nth-child(1),
.promotion-page .promotion-term-table td:nth-child(1) {
  width: 28%;
}

.promotion-page .promotion-term-table td:nth-child(1) {
  line-height: 1.45;
}

.promotion-page .promotion-term-table td:nth-child(1) strong {
  display: inline-block;
  max-width: 100%;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.promotion-page .promotion-term-table th:nth-child(2),
.promotion-page .promotion-term-table td:nth-child(2) {
  width: auto;
}

.promotion-page .promotion-term-table th:nth-child(3),
.promotion-page .promotion-term-table td:nth-child(3) {
  width: 220px;
}

.promotion-page .promotion-term-table th:nth-child(4),
.promotion-page .promotion-term-table td:nth-child(4) {
  width: 120px;
}

.promotion-page .promotion-term-table td:nth-child(3),
.promotion-page .promotion-term-table td:nth-child(4),
.promotion-page .promotion-term-table th:nth-child(3),
.promotion-page .promotion-term-table th:nth-child(4) {
  white-space: nowrap;
}

.promotion-page .promotion-term-table td:nth-child(3),
.promotion-page .promotion-term-table th:nth-child(3) {
  text-align: center;
}

.persona-page .persona-table {
  min-width: 1980px;
  table-layout: fixed;
}

.persona-page .persona-table-wrap {
  cursor: grab;
  overscroll-behavior-x: contain;
}

.persona-page .persona-table-wrap.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.persona-page .persona-table th:nth-child(1),
.persona-page .persona-table td:nth-child(1) {
  width: 220px;
}

.persona-page .persona-table th:nth-child(2),
.persona-page .persona-table td:nth-child(2) {
  width: 200px;
}

.persona-page .persona-table th:nth-child(3),
.persona-page .persona-table td:nth-child(3) {
  width: 180px;
}

.persona-page .persona-table th:nth-child(4),
.persona-page .persona-table td:nth-child(4) {
  width: 180px;
}

.persona-page .persona-table th:nth-child(5),
.persona-page .persona-table td:nth-child(5) {
  width: 200px;
}

.persona-page .persona-table th:nth-child(6),
.persona-page .persona-table td:nth-child(6) {
  width: 220px;
}

.persona-page .persona-table th:nth-child(7),
.persona-page .persona-table td:nth-child(7) {
  width: 220px;
}

.persona-page .persona-table th:nth-child(8),
.persona-page .persona-table td:nth-child(8) {
  width: 220px;
}

.persona-page .persona-table th:nth-child(9),
.persona-page .persona-table td:nth-child(9) {
  width: 220px;
}

.persona-page .persona-table th:nth-child(10),
.persona-page .persona-table td:nth-child(10) {
  width: 160px;
  white-space: nowrap;
}

.persona-page .persona-table th:last-child,
.persona-page .persona-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  width: 160px;
  min-width: 160px;
  white-space: nowrap;
  background:
    linear-gradient(90deg, rgba(45, 212, 191, 0.14), transparent 24px),
    #081221;
  border-left: 1px solid rgba(94, 234, 212, 0.28);
  box-shadow: -18px 0 26px rgba(3, 7, 18, 0.48);
}

.persona-page .persona-table th:last-child {
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(45, 212, 191, 0.18), transparent 26px),
    #081221;
}

.persona-page .persona-table th,
.persona-page .persona-table td {
  vertical-align: middle;
}

.persona-page .persona-text-cell {
  display: -webkit-box;
  color: #cbd8ef;
  font-size: 13px;
  line-height: 1.55;
  overflow: hidden;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.persona-page .workflow-config-cell strong {
  color: #eff8ff;
  font-size: 13px;
}

.persona-page .workflow-config-cell small {
  color: #cbd8ef;
  font-size: 13px;
  line-height: 1.55;
}

.persona-page .persona-time-cell {
  color: #cbd8ef;
  white-space: nowrap;
}

.persona-page .workflow-row-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
  min-width: 124px;
}

.persona-page .persona-modal {
  width: min(920px, calc(100vw - 40px));
}

.audio-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--click-blue) 0,
    var(--click-blue) var(--range-progress, 33%),
    #d9dde5 var(--range-progress, 33%),
    #d9dde5 100%
  );
}

.audio-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: var(--click-blue);
  box-shadow: 0 2px 8px rgba(94, 168, 202, 0.38);
}

.audio-slider input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: #d9dde5;
}

.audio-slider input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--click-blue);
}

.audio-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: var(--click-blue);
  box-shadow: 0 2px 8px rgba(94, 168, 202, 0.38);
}

.digital-human-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 22px;
}

.digital-human-shell {
  display: grid;
  gap: 20px;
}

.digital-human-hero {
  padding: 24px;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(66, 216, 255, 0.10), transparent 38%),
    linear-gradient(180deg, rgba(12, 19, 36, 0.96), rgba(8, 13, 26, 0.96));
  box-shadow: var(--shadow-tight);
}

.digital-human-hero > div:first-child {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.digital-human-hero-copy {
  min-width: 0;
  display: grid;
  align-content: start;
}

.digital-human-hero p,
.digital-human-hero h1 {
  margin: 0;
}

.digital-human-hero p {
  color: #8ea2c2;
  font-size: 14px;
  font-weight: 650;
}

.digital-human-hero h1 {
  margin-top: 7px;
  color: #eff8ff;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0;
}

.digital-human-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.worker-hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(66, 216, 255, 0.24);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(66, 216, 255, 0.18), rgba(124, 92, 255, 0.18));
  color: #eff8ff;
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}

.worker-hero-button.secondary {
  border-color: rgba(130, 171, 236, 0.14);
  background: rgba(5, 11, 22, 0.56);
  color: #cbd8ef;
}

.digital-human-metrics {
  display: grid;
  gap: 12px;
}

.digital-human-metric-card {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 16px;
  background: rgba(5, 11, 22, 0.66);
}

.digital-human-metric-card span {
  color: #8ea2c2;
  font-size: 12px;
  font-weight: 700;
}

.digital-human-metric-card strong {
  color: #eff8ff;
  font-size: 28px;
  line-height: 1;
  font-weight: 780;
}

.digital-human-metric-card small {
  color: #7285a5;
  font-size: 12px;
}

.digital-human-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.digital-human-panel {
  overflow: hidden;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(12, 19, 36, 0.94), rgba(8, 13, 26, 0.94));
  box-shadow: var(--shadow-tight);
}

.digital-human-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(130, 171, 236, 0.1);
}

.digital-human-panel-head span,
.digital-human-panel-count {
  color: #7f91b2;
  font-size: 12px;
  font-weight: 700;
}

.digital-human-panel-head strong {
  display: block;
  margin-top: 4px;
  color: #eff8ff;
  font-size: 17px;
  font-weight: 760;
}

.digital-human-panel-count {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(66, 216, 255, 0.08);
  color: #42d8ff;
}

.digital-human-avatar-grid,
.digital-human-voice-grid {
  padding: 18px;
}

.digital-human-avatar-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.digital-human-voice-grid {
  grid-template-columns: 1fr;
}

.digital-human-panel .avatar-card,
.digital-human-panel .voice-clone-card {
  border-color: rgba(130, 171, 236, 0.13);
  background: rgba(5, 11, 22, 0.7);
  box-shadow: none;
}

.digital-human-panel .avatar-card:hover,
.digital-human-panel .voice-clone-card:hover {
  border-color: rgba(66, 216, 255, 0.24);
  box-shadow: var(--shadow-tight);
}

.digital-human-panel .avatar-card-body strong,
.digital-human-panel .voice-card-copy strong,
.digital-human-job-title strong {
  color: #eff8ff;
}

.digital-human-panel .avatar-card-body span,
.digital-human-panel .voice-card-copy span,
.digital-human-panel .voice-card-copy small,
.digital-human-job-title span,
.digital-human-job-desc,
.digital-human-job-meta {
  color: #8ea2c2;
}

.digital-human-jobs-panel {
  min-height: 0;
}

.digital-human-job-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.digital-human-job-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 16px;
  background: rgba(5, 11, 22, 0.66);
}

.digital-human-job-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.digital-human-job-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.digital-human-job-title strong {
  font-size: 15px;
  font-weight: 760;
}

.digital-human-job-title span {
  font-size: 12px;
  font-weight: 650;
}

.digital-human-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
}

.digital-human-job-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.digital-human-job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.digital-human-empty {
  padding: 24px;
  border: 1px dashed rgba(130, 171, 236, 0.18);
  border-radius: 16px;
  color: #7f91b2;
  text-align: center;
}

.digital-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.digital-list-grid {
  margin-top: 0;
  gap: 24px;
}

.digital-list-grid .module-table-panel {
  min-height: 420px;
  overflow: hidden;
  border-color: rgba(17, 17, 17, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfa 100%);
}

.digital-list-grid .table-toolbar {
  min-height: 68px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.72);
}

.digital-create-action {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
}

.digital-list-grid .toolbar-left strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.digital-list-grid .muted-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.avatar-library-panel {
  overflow: hidden;
}

.avatar-library-grid,
.voice-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  align-items: start;
  padding: 18px;
}

.avatar-create-card,
.voice-create-card,
.avatar-card,
.voice-clone-card {
  min-width: 0;
  border-radius: 14px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease,
    background 0.18s ease;
}

.avatar-create-card,
.voice-create-card {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 12px;
  min-height: 244px;
  padding: 24px;
  border: 1px dashed rgba(98, 169, 197, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 251, 253, 0.86));
  color: var(--muted);
  text-align: left;
}

.avatar-create-card:hover,
.voice-create-card:hover {
  transform: translateY(-2px);
  border-color: rgba(17, 17, 17, 0.22);
  background: #ffffff;
  color: var(--ink);
  box-shadow: var(--shadow-tight);
}

.avatar-create-card strong,
.voice-create-card strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.avatar-create-card span,
.voice-create-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.avatar-create-card em,
.voice-create-card em {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--click-blue);
  color: #ffffff;
  font-style: normal;
  font-weight: 750;
}

.avatar-create-icon,
.voice-create-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--click-blue);
  color: #ffffff !important;
  font-size: 18px;
  font-weight: 800;
}

.avatar-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 0 0 14px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: #ffffff;
  box-shadow: none;
}

.avatar-card:hover,
.voice-clone-card:hover {
  transform: translateY(-2px);
  border-color: rgba(17, 17, 17, 0.14);
  box-shadow: var(--shadow-tight);
}

.avatar-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 8px 8px 0 0;
  background: #090b12;
}

.avatar-card-media img,
.avatar-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-card-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.avatar-card-status {
  position: absolute;
  top: 10px;
  left: 10px;
  box-shadow: 0 8px 20px rgba(17, 17, 17, 0.12);
}

.avatar-card-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  margin: 0;
}

.avatar-delete-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 24px;
  font-weight: 650;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(17, 17, 17, 0.12);
}

.avatar-delete-button:hover {
  border-color: rgba(194, 51, 43, 0.24);
  background: #ffffff;
  color: var(--danger);
}

.avatar-card-body {
  display: grid;
  min-width: 0;
  padding: 0 14px;
}

.avatar-card-body strong,
.avatar-card-body span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-card-body strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
}

.avatar-card-body span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.voice-create-card strong,
.voice-create-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.voice-clone-card {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: start;
  gap: 13px;
  min-height: 148px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: #ffffff;
  color: var(--ink);
}

.voice-wave-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(98, 169, 197, 0.14);
  color: var(--click-blue);
  font-weight: 850;
}

.voice-wave-icon span {
  width: 4px;
  height: 24px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: -14px 6px 0 -1px currentColor, -7px -2px 0 0 currentColor,
    7px -5px 0 0 currentColor, 14px 4px 0 -1px currentColor;
  content: "";
}

.voice-card-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.voice-card-copy strong,
.voice-card-copy span,
.voice-card-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-card-copy strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
}

.voice-card-copy span,
.voice-card-copy small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.voice-card-copy small {
  color: var(--muted-2);
  font-size: 12px;
}

.voice-status-text {
  color: var(--click-blue);
  font-weight: 700;
}

.danger-text {
  color: #f27566;
  font-weight: 700;
}

.voice-card-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding-top: 4px;
}

.voice-card-actions .icon-button {
  width: 28px;
  height: 22px;
  color: var(--muted);
}

.voice-card-actions form {
  margin: 0;
}

.ghost.tiny {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border-color: var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 11px;
}

.ghost.danger.tiny {
  border-color: rgba(194, 51, 43, 0.22);
  color: var(--danger);
}

.digital-setup-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.section-head.compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head.compact > div {
  display: grid;
  gap: 3px;
}

.section-head.compact strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
  font-weight: 700;
}

.section-head.compact span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.digital-asset-form {
  display: grid;
  gap: 10px;
}

.digital-asset-form .primary {
  width: 100%;
}

.digital-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.digital-list-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.digital-list-item > div:nth-child(2) {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.digital-list-item strong,
.digital-list-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.digital-list-item strong {
  color: var(--ink);
  font-weight: 700;
}

.digital-list-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.asset-thumb,
.voice-badge {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.voice-badge {
  background: var(--accent-soft);
  color: #3838b7;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.row-actions form {
  margin: 0;
}

.empty.tight {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: left;
}

.digital-job-table {
  min-width: 1160px;
}

.digital-job-table th:nth-child(2),
.digital-job-table td:nth-child(2) {
  width: 190px;
}

.digital-job-table th:nth-child(4),
.digital-job-table td:nth-child(4) {
  width: 170px;
}

.digital-job-table td.actions {
  min-width: 190px;
}

.digital-asset-table {
  min-width: 720px;
}

.digital-asset-table th:nth-child(1),
.digital-asset-table td:nth-child(1) {
  width: 170px;
}

.digital-asset-table th:nth-child(3),
.digital-asset-table td:nth-child(3) {
  width: 110px;
}

.digital-asset-table th:nth-child(4),
.digital-asset-table td:nth-child(4) {
  width: 150px;
}

.digital-asset-table th:nth-child(5),
.digital-asset-table td:nth-child(5) {
  width: 170px;
}

.digital-asset-table td.actions {
  min-width: 170px;
}

.checkbox-cell {
  width: 44px;
  text-align: center;
}

.checkbox-cell input,
.script-row-check {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--ink);
}

.script-keyword-cell,
.script-content-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.script-keyword-cell strong,
.script-title-line,
.script-author-cell,
.script-director-cell {
  display: block;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-keyword-cell strong,
.script-title-line,
.script-director-cell {
  color: var(--ink);
}

.script-keyword-cell span {
  display: block;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-created-cell {
  display: grid;
  gap: 2px;
  justify-items: center;
  min-width: 0;
  color: var(--ink-soft);
  font-weight: 600;
  line-height: 1.25;
}

.script-created-cell span {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-created-cell span + span,
.script-created-empty {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.script-inline-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.script-row-actions {
  width: 100%;
  justify-content: center;
  flex-wrap: nowrap;
}

.script-row-actions .secondary.small {
  min-width: 80px;
}

.script-row-actions .ghost.danger.small {
  min-width: 56px;
}

.script-detail-modal {
  width: min(980px, calc(100vw - 40px));
  max-height: calc(100vh - 32px);
}

.script-edit-modal {
  width: min(900px, calc(100vw - 40px));
}

.script-edit-form {
  display: grid;
  gap: 16px;
}

.script-edit-form textarea {
  min-height: 380px;
  line-height: 1.72;
}

.script-detail-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-height: calc(100vh - 148px);
  overflow: auto;
  overscroll-behavior: contain;
}

.script-detail-modal .script-detail-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.script-detail-modal .script-detail-meta .creator-name {
  display: inline;
  margin-top: 0;
  color: var(--creator-blue);
  font-weight: 650;
}

.script-detail-modal .script-detail-time {
  display: inline;
  margin-top: 0;
  color: var(--muted);
  font-weight: 500;
}

.script-detail-body section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  min-width: 0;
}

.script-detail-body h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.script-detail-body p,
.script-detail-body pre {
  margin: 0;
  color: var(--ink);
}

.script-detail-body pre {
  max-height: none;
  overflow: visible;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  line-height: 1.64;
}

.pagination {
  justify-content: flex-end;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
}

.api-config-table {
  min-width: 980px;
}

.director-table {
  min-width: 680px;
  table-layout: fixed;
}

.director-table th:nth-child(1),
.director-table td:nth-child(1) {
  width: 34%;
  text-align: left;
}

.director-table th:nth-child(2),
.director-table td:nth-child(2) {
  width: 18%;
  text-align: center;
}

.director-table th:nth-child(3),
.director-table td:nth-child(3) {
  width: 28%;
  text-align: center;
}

.director-table th:nth-child(4),
.director-table td:nth-child(4) {
  width: 20%;
  text-align: right;
}

.director-table td.actions {
  display: table-cell;
  min-width: 0;
  vertical-align: middle;
}

.director-table td.actions > * {
  display: inline-flex;
  margin: 0 0 0 10px;
  vertical-align: middle;
}

.auto-flow-page {
  color: #f7f3ea;
}

.auto-flow-page .page-actions {
  margin-bottom: 14px;
}

.auto-flow-shell {
  overflow: hidden;
  border: 1px solid #2c2620;
  border-radius: 24px;
  background: #11100f;
}

.auto-flow-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  padding: 26px 28px 22px;
  border-bottom: 1px solid #2a251f;
}

.auto-flow-hero span {
  color: #f2932e;
  font-size: 13px;
  font-weight: 750;
}

.auto-flow-hero h1 {
  margin: 5px 0 0;
  color: #fff8ec;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 750;
  letter-spacing: 0;
}

.auto-flow-progress {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 720px;
}

.auto-flow-progress span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #302923;
  border-radius: 999px;
  color: #b9aea0;
  background: #171514;
  font-size: 12px;
  font-weight: 700;
}

.auto-flow-progress span.ready,
.auto-flow-progress span.running {
  border-color: rgba(242, 147, 46, 0.54);
  color: #ffb45e;
}

.auto-flow-progress span.done {
  border-color: rgba(57, 186, 125, 0.42);
  color: #75d79f;
}

.auto-flow-progress span.failed {
  border-color: rgba(255, 105, 91, 0.5);
  color: #ff8b7f;
}

.auto-flow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
}

.auto-flow-card {
  min-width: 0;
  min-height: 245px;
  padding: 18px;
  border: 1px solid #2f2924;
  border-radius: 18px;
  background: #1a1715;
  color: #efe8dc;
}

.auto-flow-card-large {
  min-height: 430px;
}

.auto-flow-card-wide {
  grid-column: 1 / -1;
}

.auto-flow-card.running,
.auto-flow-card.ready {
  border-color: rgba(242, 147, 46, 0.68);
  box-shadow: inset 0 0 0 1px rgba(242, 147, 46, 0.2);
}

.auto-flow-card.done {
  border-color: rgba(57, 186, 125, 0.42);
}

.auto-flow-card.failed {
  border-color: rgba(255, 105, 91, 0.52);
}

.auto-flow-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.auto-flow-card-head > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auto-flow-card-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #f2932e;
  color: #1a1008;
  font-size: 12px;
  font-weight: 800;
}

.auto-flow-card.done .auto-flow-card-head span {
  background: #39ba7d;
}

.auto-flow-card.failed .auto-flow-card-head span {
  background: #ff6b5d;
}

.auto-flow-card-head h2 {
  margin: 0;
  color: #fff8ec;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: 0;
}

.auto-flow-card-head em {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: #24201c;
  color: #ffb45e;
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.auto-flow-card.done .auto-flow-card-head em {
  color: #75d79f;
}

.auto-flow-card.failed .auto-flow-card-head em,
.auto-flow-error {
  color: #ff8b7f;
}

.task-detail-page .task-detail-node-head > .task-detail-node-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.task-detail-page .task-detail-node-head {
  align-items: center;
  flex-wrap: nowrap;
}

.task-detail-page .task-detail-node-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.task-detail-page .task-detail-node-title-row h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.task-detail-page .task-detail-node-status-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.auto-flow-card p {
  margin: 0 0 16px;
  color: #c8beb0;
  line-height: 1.65;
}

.auto-link-form {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.auto-link-form textarea {
  min-height: 74px;
  resize: vertical;
  border-color: #3a322b;
  background: #110f0e;
  color: #fff8ec;
}

.auto-link-actions,
.auto-start-row,
.auto-chip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.auto-link-actions .ghost,
.auto-link-actions .secondary {
  border-color: #3a322b;
  background: #24201c;
  color: #f7f3ea;
}

.auto-link-actions .secondary {
  background: #f2932e;
  color: #1a1008;
}

.auto-source-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
  padding: 14px 0;
  border-top: 1px solid #2f2924;
  border-bottom: 1px solid #2f2924;
}

.auto-source-card img {
  width: 96px;
  height: 128px;
  border-radius: 12px;
  object-fit: cover;
  background: #0b0a09;
}

.auto-source-card > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.auto-source-card strong,
.auto-source-empty strong,
.auto-final-placeholder strong {
  color: #fff8ec;
  font-size: 16px;
  line-height: 1.35;
}

.auto-source-card span,
.auto-source-card small,
.auto-source-empty span,
.auto-final-placeholder span,
.auto-start-row span {
  color: #c8beb0;
  font-size: 13px;
}

.auto-source-card a,
.auto-flow-link {
  color: #7cc5de;
  font-weight: 750;
}

.auto-source-empty {
  display: grid;
  gap: 6px;
  margin: 16px 0;
  padding: 14px 0;
  border-top: 1px solid #2f2924;
  border-bottom: 1px solid #2f2924;
}

.auto-primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  background: #f2932e;
  color: #170e07;
  font-weight: 800;
}

.auto-primary-button:hover {
  background: #ffad4f;
}

.auto-chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #3a322b;
  border-radius: 999px;
  background: #201c19;
  color: #d7cec0;
  font-size: 12px;
  font-weight: 700;
}

.auto-avatar-preview {
  display: grid;
  gap: 9px;
  align-items: start;
}

.auto-avatar-preview img,
.auto-avatar-preview video {
  width: 132px;
  max-height: 176px;
  border-radius: 12px;
  object-fit: cover;
  background: #0b0a09;
}

.auto-avatar-preview strong {
  color: #fff8ec;
}

.auto-final-video {
  width: min(380px, 100%);
  max-height: 520px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: #000000;
}

.auto-final-placeholder {
  display: grid;
  gap: 8px;
  min-height: 180px;
  place-content: center;
  padding: 22px;
  border: 1px dashed #3a322b;
  border-radius: 14px;
  background: #100e0d;
  text-align: center;
}

.api-url-cell {
  display: inline-block;
  max-width: 300px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-config-form {
  display: grid;
  gap: 15px;
}

.floating-toast {
  position: fixed;
  top: calc(var(--nav-height) + 28px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  width: max-content;
  max-width: min(640px, calc(100vw - 96px));
  padding: 13px 16px;
  border: 1px solid rgba(22, 134, 83, 0.2);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--success);
  box-shadow: var(--shadow);
  font-weight: 650;
  text-align: center;
}

.floating-toast.danger {
  border-color: rgba(194, 51, 43, 0.24);
  color: var(--danger);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .main {
    width: min(var(--container), calc(100vw - 40px));
  }

  .layout-two,
  .layout-two.narrow-right {
    grid-template-columns: 1fr;
  }

	  .digital-human-hero,
	  .digital-grid,
	  .knowledge-layout,
	  .script-context-grid,
	  .auto-flow-grid,
	  .workflow-head,
	  .workflow-template-section,
	  .form-grid.four {
	    grid-template-columns: 1fr;
	  }

  .auto-flow-card-wide {
    grid-column: auto;
  }

  .workflow-head {
    display: grid;
    align-items: start;
  }

  .side-stack {
    position: static;
  }

  .topics-head {
    display: grid;
  }

  .topics-summary {
    min-width: 0;
  }

  .topics-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  :root {
    --nav-height: auto;
  }

  .sidebar {
    position: sticky;
    height: auto;
    min-height: 64px;
    padding: 10px 14px;
    gap: 12px;
    overflow-x: auto;
  }

  .brand {
    font-size: 18px;
  }

  .nav {
    gap: 4px;
  }

  .nav a {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .main {
    width: calc(100vw - 28px);
    padding: 24px 0 40px;
  }

  .page-head,
  .topics-head,
  .auto-flow-hero {
    display: grid;
    align-items: start;
  }

  .page-head h1,
  .topics-head h1 {
    font-size: 32px;
  }

  .head-actions {
    justify-content: flex-start;
  }

  .auto-flow-hero {
    padding: 20px;
  }

  .auto-flow-hero h1 {
    font-size: 28px;
  }

  .auto-flow-grid {
    padding: 14px;
  }

  .metric-grid,
  .topics-summary,
  .topics-toolbar,
  .form-grid.two,
  .compact-account-form {
    grid-template-columns: 1fr;
  }

  .panel-title,
  .topics-board-head,
  .table-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  th,
  td {
    padding: 12px;
  }

  .video-grid,
  .topics-grid {
    grid-template-columns: 1fr !important;
    padding: 12px;
  }

  .douyin-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .modal,
  .pack-form-modal,
  .api-config-modal,
  .douyin-preview-modal,
  .script-detail-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    border-radius: 22px;
  }

  .modal-head {
    padding: 18px;
  }

  .modal-body {
    max-height: calc(100vh - 124px);
    padding: 18px;
  }

  .douyin-preview-modal .modal-body {
    max-height: none;
    overflow: hidden;
  }

  .douyin-preview-stage {
    height: min(100%, 500px);
  }

  .script-detail-body {
    max-height: calc(100vh - 124px);
  }

	  .video-requirements div,
	  .avatar-library-grid,
	  .voice-library-grid {
	    grid-template-columns: 1fr;
	  }

	  .template-card-preview {
	    width: 100%;
	    max-height: none;
	  }
}

@media (max-width: 520px) {
  .primary,
  .secondary,
  .ghost,
  .button-link,
  .douyin-button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 12px;
  }

  .douyin-actions {
    grid-template-columns: 1fr;
  }

  .topics-summary strong,
  .metric strong {
    font-size: 26px;
  }

  .floating-toast {
    top: calc(var(--nav-height) + 12px);
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100vw - 32px);
  }
}

/* ======== 数字员工 (ai-worker) ======== */
.ai-worker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin: 20px;
  width: calc(100% - 40px);
}

.ai-worker-card {
  display: grid;
  gap: 10px;
  padding: 28px 18px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.ai-worker-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-tight);
  transform: translateY(-2px);
}

.ai-worker-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: var(--radius);
}

.ai-worker-icon svg {
  width: 36px;
  height: 36px;
}

.ai-worker-card strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.ai-worker-card span {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

@media (max-width: 1024px) {
  .ai-worker-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .ai-worker-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  .ai-worker-grid {
    grid-template-columns: 1fr;
  }
}

/* ======== Tech shell overhaul ======== */
:root {
  --bg: #050816;
  --surface: rgba(9, 15, 30, 0.88);
  --surface-soft: rgba(13, 22, 42, 0.96);
  --surface-glass: rgba(7, 12, 24, 0.78);
  --ink: #eaf2ff;
  --ink-soft: #b3c0da;
  --muted: #7b8bab;
  --muted-2: #53647f;
  --line: rgba(122, 158, 214, 0.16);
  --line-strong: rgba(122, 158, 214, 0.26);
  --primary: #42d8ff;
  --primary-hover: #1fc1ea;
  --accent: #7c5cff;
  --accent-soft: rgba(124, 92, 255, 0.16);
  --creator-blue: #6e9db3;
  --click-blue: #31b8e6;
  --click-blue-hover: #18a1d0;
  --success: #23d3a4;
  --success-soft: rgba(35, 211, 164, 0.12);
  --warning: #ffb245;
  --warning-soft: rgba(255, 178, 69, 0.14);
  --danger: #ff647c;
  --danger-soft: rgba(255, 100, 124, 0.14);
  --info-soft: rgba(42, 142, 255, 0.12);
  --shadow: 0 28px 80px rgba(2, 8, 20, 0.45);
  --shadow-tight: 0 18px 38px rgba(2, 8, 20, 0.32);
}

html {
  background:
    radial-gradient(circle at top left, rgba(61, 147, 255, 0.14), transparent 32%),
    radial-gradient(circle at top right, rgba(124, 92, 255, 0.15), transparent 24%),
    linear-gradient(180deg, #050816 0%, #07101e 100%);
}

body.tech-shell {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 12%, rgba(58, 188, 255, 0.16), transparent 24%),
    radial-gradient(circle at 86% 18%, rgba(124, 92, 255, 0.16), transparent 22%),
    linear-gradient(180deg, #050816 0%, #07101a 56%, #050916 100%);
  color: var(--ink);
  overflow-x: hidden;
}

body.tech-shell::before,
body.tech-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body.tech-shell::before {
  background:
    linear-gradient(90deg, rgba(69, 209, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(69, 209, 255, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.12;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 92%);
  animation: grid-drift 32s linear infinite;
}

body.tech-shell::after {
  background:
    linear-gradient(180deg, rgba(69, 209, 255, 0.12), transparent 20%, transparent 80%, rgba(124, 92, 255, 0.12)),
    repeating-linear-gradient(180deg, transparent 0, transparent 11px, rgba(255, 255, 255, 0.02) 12px);
  opacity: 0.22;
  mix-blend-mode: screen;
  animation: scan-flow 11s linear infinite;
}

body.tech-shell > .app-shell,
body.tech-shell > .modal,
body.tech-shell > .floating-toast,
body.tech-shell > .hover-preview-tooltip {
  position: relative;
  z-index: 1;
}

@keyframes grid-drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(64px, 64px, 0);
  }
}

@keyframes scan-flow {
  0% {
    transform: translateY(-12%);
  }
  100% {
    transform: translateY(12%);
  }
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 308px;
  height: 100vh;
  padding: 18px 16px 16px;
  border-right: 1px solid rgba(120, 160, 230, 0.18);
  background:
    linear-gradient(180deg, rgba(9, 16, 33, 0.96), rgba(7, 12, 25, 0.9)),
    rgba(7, 12, 25, 0.92);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 18px 0 50px rgba(2, 8, 20, 0.28);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 12px 12px auto 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(66, 216, 255, 0.72), rgba(124, 92, 255, 0.72), transparent);
  opacity: 0.55;
}

.brand-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 14px;
  border: 1px solid rgba(130, 171, 236, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(27, 40, 69, 0.9), rgba(9, 15, 30, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  color: #04111f;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.45), transparent 34%),
    linear-gradient(135deg, #4ef0cf 0%, #4db0ff 42%, #865dff 100%);
  box-shadow:
    0 10px 28px rgba(65, 191, 255, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  animation: brand-glow 5s ease-in-out infinite;
}

.brand-mark svg {
  width: 28px;
  height: 28px;
}

@keyframes brand-glow {
  0%, 100% {
    transform: translateY(0);
    box-shadow:
      0 10px 28px rgba(65, 191, 255, 0.25),
      0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  }
  50% {
    transform: translateY(-1px);
    box-shadow:
      0 14px 34px rgba(65, 191, 255, 0.36),
      0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  }
}

.brand-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.brand-copy strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-copy span {
  color: #80a0c6;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 18px;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav-group {
  display: grid;
  gap: 8px;
}

.nav-group-label {
  padding: 10px 12px 2px;
  color: rgba(140, 169, 214, 0.68);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px 0 12px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: #b8c7e0;
  font-size: 14px;
  font-weight: 650;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 20px;
  border-radius: 999px;
  transform: translateY(-50%) scaleY(0.28);
  background: linear-gradient(180deg, #42d8ff, #7c5cff);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav a:hover {
  color: #edf5ff;
  border-color: rgba(66, 216, 255, 0.14);
  background: rgba(15, 24, 45, 0.9);
  transform: translateX(2px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.nav a.active {
  color: #f6fbff;
  border-color: rgba(66, 216, 255, 0.22);
  background:
    linear-gradient(90deg, rgba(66, 216, 255, 0.22), rgba(124, 92, 255, 0.18)),
    rgba(20, 30, 53, 0.95);
  box-shadow:
    0 14px 32px rgba(10, 19, 38, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.nav a.active::before {
  opacity: 1;
  transform: translateY(-50%) scaleY(1);
}

.nav-item-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #8fb7e7;
  flex: 0 0 auto;
}

.nav-item-icon svg {
  width: 20px;
  height: 20px;
}

.nav a.active .nav-item-icon {
  color: #42d8ff;
}

.nav-badge {
  margin-left: auto;
  min-width: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(66, 216, 255, 0.3);
  background: rgba(8, 127, 171, 0.2);
  color: #42d8ff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(130, 171, 236, 0.16);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(11, 18, 35, 0.98), rgba(16, 24, 44, 0.92));
}

.sidebar-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f05ad6, #7c5cff);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(124, 92, 255, 0.22);
}

.sidebar-profile-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sidebar-profile-copy strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.sidebar-profile-copy span {
  color: #89a1c4;
  font-size: 11px;
}

.sidebar-arrow {
  margin-left: auto;
  color: #6381b4;
  font-size: 24px;
  line-height: 1;
}

.main {
  width: calc(100vw - 308px);
  min-height: 100vh;
  margin: 0 0 0 308px;
  padding: 24px 24px 56px;
}

.notice {
  border-color: rgba(124, 92, 255, 0.16);
  background: rgba(10, 18, 35, 0.82);
  color: var(--ink);
  box-shadow: var(--shadow-tight);
}

.notice.success {
  border-color: rgba(35, 211, 164, 0.22);
  background: rgba(8, 25, 23, 0.88);
  color: #9ff3de;
}

.notice.danger {
  border-color: rgba(255, 100, 124, 0.22);
  background: rgba(35, 11, 17, 0.88);
  color: #ffbfca;
}

.panel,
.topics-board,
.topics-toolbar {
  border-color: rgba(130, 171, 236, 0.12);
  background: linear-gradient(180deg, rgba(12, 19, 36, 0.9), rgba(8, 13, 26, 0.9));
  box-shadow: var(--shadow);
}

.metric {
  border-color: rgba(130, 171, 236, 0.12);
  background: linear-gradient(180deg, rgba(12, 19, 36, 0.92), rgba(8, 13, 26, 0.9));
}

.metric strong {
  color: #fff;
}

.page-head h1,
.topics-head h1,
.panel-title h2,
.topics-board-head h2,
.table-toolbar strong,
.modal-head h2 {
  color: var(--ink);
}

.page-head p,
.topics-head p,
.panel-title span,
.topics-board-head span {
  color: var(--muted);
}

.back-link {
  color: #8aa4cc;
}

.back-link::before {
  color: #f3f8ff;
}

.table-toolbar {
  border-bottom-color: rgba(130, 171, 236, 0.12);
}

table {
  color: var(--ink);
}

th {
  background: rgba(10, 16, 31, 0.96);
  color: #8ea6cb;
}

td {
  color: #c9d5ea;
}

tbody tr:hover {
  background: rgba(58, 118, 177, 0.08);
}

td a,
td strong {
  color: #f0f6ff;
}

.ghost,
.secondary,
.button-link,
.douyin-button,
.icon-button {
  border-color: rgba(130, 171, 236, 0.16);
  background: rgba(14, 21, 39, 0.92);
  color: #d4e0f3;
}

.ghost:hover,
.secondary:hover,
.button-link:hover,
.douyin-button:hover,
.icon-button:hover {
  background: rgba(20, 31, 54, 0.96);
  color: #fff;
}

.primary {
  background: linear-gradient(135deg, #42d8ff, #7c5cff);
  color: #06111f;
  box-shadow: 0 12px 28px rgba(66, 216, 255, 0.18);
}

.primary:hover {
  background: linear-gradient(135deg, #62e3ff, #8d72ff);
  color: #04101b;
}

.source-box {
  border-color: rgba(130, 171, 236, 0.16);
  background: rgba(9, 16, 31, 0.86);
}

.source-box span {
  color: var(--muted);
}

.source-box strong {
  color: var(--ink);
}

.source-box.logged-in {
  background: rgba(7, 30, 24, 0.95);
}

.source-box.logged-out {
  background: rgba(34, 12, 19, 0.95);
}

.source-box.checking {
  background: rgba(38, 24, 6, 0.95);
}

.main input,
.main select,
.main textarea,
.modal input,
.modal select,
.modal textarea {
  border-color: rgba(130, 171, 236, 0.16);
  background: rgba(8, 14, 27, 0.92);
  color: var(--ink);
}

.main input::placeholder,
.main textarea::placeholder,
.modal input::placeholder,
.modal textarea::placeholder {
  color: #6f83a6;
}

.main input:focus,
.main select:focus,
.main textarea:focus,
.modal input:focus,
.modal select:focus,
.modal textarea:focus {
  border-color: rgba(66, 216, 255, 0.48);
  box-shadow: 0 0 0 3px rgba(66, 216, 255, 0.12);
}

.modal,
.pack-form-modal,
.api-config-modal,
.douyin-preview-modal,
.script-detail-modal {
  border-color: rgba(130, 171, 236, 0.14);
  background: linear-gradient(180deg, rgba(9, 15, 30, 0.98), rgba(6, 10, 20, 0.98));
  color: var(--ink);
  box-shadow: 0 32px 100px rgba(233, 218, 218, 0.62);
}

.modal-head,
.panel-title,
.topics-board-head {
  border-bottom-color: rgba(130, 171, 236, 0.12);
}

.floating-toast {
  background: rgba(10, 17, 33, 0.96);
  color: var(--ink);
  border: 1px solid rgba(130, 171, 236, 0.16);
  box-shadow: var(--shadow);
}

.floating-toast.danger {
  background: rgba(35, 11, 17, 0.96);
  color: #ffd0d8;
}

.hover-preview-tooltip {
  background: rgba(6, 12, 24, 0.96);
  color: #edf4ff;
  border: 1px solid rgba(130, 171, 236, 0.18);
  box-shadow: var(--shadow-tight);
}

@media (max-width: 820px) {
  .sidebar {
    position: sticky;
    inset: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(120, 160, 230, 0.16);
    box-shadow: 0 12px 36px rgba(2, 8, 20, 0.24);
  }

  .sidebar::before,
  .sidebar-footer {
    display: none;
  }

  .brand-card {
    flex: 0 0 auto;
  }

  .nav {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 0;
  }

  .nav-group {
    display: contents;
  }

  .nav-group-label {
    display: none;
  }

  .nav a {
    min-height: 42px;
    white-space: nowrap;
  }

  .nav a span:last-child {
    white-space: nowrap;
  }

  .main {
    width: 100%;
    margin-left: 0;
    padding: 18px 12px 40px;
  }
}

/* Sidebar fidelity pass */
.sidebar {
  width: 240px;
  padding: 20px 12px 14px;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(22, 52, 70, 0.92) 0%, rgba(16, 24, 43, 0.96) 44%, rgba(18, 22, 35, 0.98) 100%),
    rgba(12, 20, 36, 0.96);
}

.brand-card {
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 68px;
  padding: 10px 8px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  box-shadow:
    0 10px 24px rgba(65, 191, 255, 0.32),
    0 0 18px rgba(124, 92, 255, 0.26);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.brand-copy strong {
  font-size: 15px;
  letter-spacing: 0;
}

.brand-copy span {
  font-size: 10px;
  letter-spacing: 0;
}

.nav {
  gap: 12px;
  width: 100%;
  align-items: stretch;
  padding: 0;
}

.nav-group {
  width: 100%;
  gap: 6px;
}

.nav-group-label {
  padding: 8px 12px 4px;
  color: rgba(137, 157, 194, 0.72);
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
}

.nav-subgroup {
  display: grid;
  gap: 6px;
  padding-left: 14px;
  margin-left: 10px;
  border-left: 1px solid rgba(95, 129, 210, 0.16);
}

.nav-subgroup a {
  min-height: 44px;
  padding-left: 12px;
  border-radius: 12px;
  font-size: 13px;
}

.nav-subgroup .nav-item-icon {
  width: 18px;
  height: 18px;
}

.nav-subgroup .nav-item-icon svg {
  width: 16px;
  height: 16px;
}

.nav a {
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  gap: 10px;
  padding: 0 12px;
  border-radius: 10px;
  color: #a9b8d3;
  font-size: 13px;
  text-align: left;
}

.nav a > span:not(.nav-item-icon):not(.nav-badge) {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.nav a::before {
  left: 0;
  width: 3px;
  height: 20px;
}

.nav a:hover {
  transform: translateX(1px);
}

.nav a.active {
  background:
    linear-gradient(90deg, rgba(33, 201, 255, 0.22), rgba(82, 96, 162, 0.34)),
    rgba(38, 56, 92, 0.82);
  border-color: rgba(95, 129, 210, 0.3);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 12px 28px rgba(7, 15, 32, 0.22);
}

.nav-item-icon {
  width: 20px;
  height: 20px;
}

.nav-item-icon svg {
  width: 18px;
  height: 18px;
}

.nav-badge {
  flex: 0 0 auto;
  margin-left: 4px;
  min-width: 22px;
  padding: 2px 6px;
  font-size: 10px;
}

.sidebar-footer {
  padding-top: 8px;
  width: 100%;
}

.sidebar-profile {
  width: 100%;
  min-width: 0;
  min-height: 64px;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(24, 30, 49, 0.82);
}

.sidebar-avatar {
  width: 38px;
  height: 38px;
}

.sidebar-profile-copy strong {
  font-size: 13px;
}

.sidebar-profile-copy span {
  font-size: 10px;
}

.login-status-card {
  align-items: center;
}

.sidebar-profile-copy span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sidebar-profile-copy span i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #23d3a4;
  box-shadow: 0 0 10px rgba(35, 211, 164, 0.7);
}

.sidebar-logout {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(130, 171, 236, 0.18);
  border-radius: 8px;
  background: rgba(12, 20, 38, 0.82);
  color: #9fb3d2;
  font-size: 11px;
  font-weight: 700;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.sidebar-logout:hover {
  border-color: rgba(66, 216, 255, 0.36);
  background: rgba(22, 36, 62, 0.92);
  color: #f3f8ff;
}

.main {
  width: calc(100vw - 240px);
  margin-left: 240px;
  padding-left: 24px;
}

@media (max-width: 820px) {
  .sidebar {
    width: 100%;
  }

  .brand-card {
    min-height: 48px;
  }

  .nav a {
    justify-content: flex-start;
  }

  .main {
    width: 100%;
    margin-left: 0;
  }
}

/* ======== AI worker detail page ======== */
.worker-detail-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.worker-back-link {
  margin-bottom: 14px;
}

.worker-hero {
  margin-bottom: 22px;
}

.worker-hero-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(180px, 220px);
  gap: 18px;
  align-items: center;
  padding: 22px;
  border: 1px solid rgba(130, 171, 236, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(15, 29, 52, 0.92), rgba(8, 13, 27, 0.94)),
    rgba(8, 13, 27, 0.92);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.worker-avatar-ring {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.26), transparent 30%),
    linear-gradient(135deg, rgba(66, 216, 255, 0.22), rgba(124, 92, 255, 0.26));
  box-shadow: 0 0 34px rgba(66, 216, 255, 0.16);
}

.worker-avatar-core {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  color: #eff8ff;
  background: linear-gradient(135deg, #24caff, #8a5cff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 14px 28px rgba(36, 202, 255, 0.18);
}

.worker-avatar-core svg {
  width: 38px;
  height: 38px;
}

.worker-hero-copy {
  min-width: 0;
}

.worker-eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: #42d8ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.worker-hero-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: 0;
}

.worker-hero-copy p {
  margin: 10px 0 0;
  max-width: 720px;
  color: #8ea2c2;
  font-size: 14px;
}

.worker-status-card {
  display: grid;
  gap: 8px;
  min-height: 86px;
  padding: 16px;
  border: 1px solid rgba(66, 216, 255, 0.18);
  border-radius: 14px;
  background: rgba(8, 18, 31, 0.72);
}

.worker-status-card span {
  color: #7f91b2;
  font-size: 12px;
  font-weight: 700;
}

.worker-status-card strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #dffbf5;
  font-size: 15px;
}

.worker-status-card i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #23d3a4;
  box-shadow: 0 0 12px rgba(35, 211, 164, 0.78);
}

.worker-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 22px;
  align-items: start;
}

.worker-console,
.worker-side-panel > *,
.worker-capability-card {
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(12, 19, 36, 0.94), rgba(8, 13, 26, 0.94));
  box-shadow: var(--shadow-tight);
}

.worker-console {
  overflow: hidden;
}

.worker-console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(130, 171, 236, 0.12);
}

.worker-console-head div {
  display: grid;
  gap: 3px;
}

.worker-console-head span {
  color: #7f91b2;
  font-size: 12px;
  font-weight: 700;
}

.worker-console-head strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 750;
}

.worker-console-chip {
  padding: 5px 9px;
  border: 1px solid rgba(66, 216, 255, 0.2);
  border-radius: 999px;
  background: rgba(66, 216, 255, 0.08);
  color: #42d8ff !important;
}

.worker-field,
.worker-textarea-field {
  display: grid;
  gap: 9px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(130, 171, 236, 0.1);
}

.worker-field span,
.worker-textarea-field span,
.worker-keyword-label {
  color: #a9b8d3;
  font-size: 13px;
  font-weight: 750;
}

.worker-field input,
.worker-field select,
.worker-textarea-field textarea {
  width: 100%;
  border: 1px solid rgba(130, 171, 236, 0.13);
  border-radius: 12px;
  background: rgba(5, 11, 22, 0.62);
  color: var(--ink);
}

.worker-field input,
.worker-field select {
  min-height: 42px;
  padding: 0 13px;
}

.worker-field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #8aa4d6 50%),
    linear-gradient(135deg, #8aa4d6 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.worker-textarea-field textarea {
  min-height: 260px;
  padding: 13px;
  resize: vertical;
}

.worker-keywords {
  display: grid;
  gap: 0;
  border-bottom: 1px solid rgba(130, 171, 236, 0.1);
}

.worker-keyword-section {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 20px;
}

.worker-keyword-section + .worker-keyword-section {
  border-top: 1px solid rgba(130, 171, 236, 0.08);
}

.worker-keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-tag {
  position: relative;
}

.keyword-tag input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.keyword-tag span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(130, 171, 236, 0.16);
  border-radius: 999px;
  background: rgba(10, 18, 34, 0.76);
  color: #9fb0ce;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.keyword-tag span:hover {
  border-color: rgba(66, 216, 255, 0.28);
  color: #edf7ff;
}

.keyword-tag input:checked + span {
  border-color: rgba(66, 216, 255, 0.42);
  background: rgba(66, 216, 255, 0.14);
  color: #73e4ff;
  box-shadow: 0 0 0 1px rgba(66, 216, 255, 0.08) inset;
}

.worker-keyword-hint {
  margin: 8px 0 0;
  color: #6f82a4;
  font-size: 12px;
}

.worker-console-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 18px;
}

.worker-reference-button,
.worker-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(130, 171, 236, 0.16);
  border-radius: 12px;
  background: rgba(14, 22, 42, 0.86);
  color: #a9b8d3;
  font-weight: 750;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.worker-reference-button {
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
}

.worker-reference-button svg {
  width: 16px;
  height: 16px;
}

.worker-submit-button {
  width: 44px;
  height: 44px;
  color: #04111f;
  border-color: rgba(66, 216, 255, 0.42);
  background: linear-gradient(135deg, #42d8ff, #7c5cff);
  box-shadow: 0 12px 28px rgba(66, 216, 255, 0.16);
}

.worker-submit-button svg {
  width: 20px;
  height: 20px;
  transform: rotate(-45deg);
}

.worker-reference-button:hover,
.worker-submit-button:hover {
  transform: translateY(-1px);
  color: #fff;
  border-color: rgba(66, 216, 255, 0.36);
  background: rgba(24, 38, 65, 0.92);
}

.worker-submit-button:hover {
  color: #04111f;
  background: linear-gradient(135deg, #62e3ff, #8d72ff);
}

.worker-submit-button.is-loading {
  opacity: 0.68;
  cursor: progress;
}

.worker-side-panel {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 24px;
}

.worker-response-panel {
  padding: 18px;
}

.worker-response-panel.hidden {
  display: none;
}

.worker-response-panel.is-error {
  border-color: rgba(255, 100, 124, 0.26);
  background: linear-gradient(180deg, rgba(39, 13, 22, 0.94), rgba(17, 9, 17, 0.94));
}

.worker-response-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.worker-response-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.worker-response-head p {
  margin: 3px 0 0;
  color: #7f91b2;
  font-size: 12px;
}

.worker-response-head span {
  padding: 4px 8px;
  border: 1px solid rgba(35, 211, 164, 0.22);
  border-radius: 999px;
  background: rgba(35, 211, 164, 0.09);
  color: #89efd8;
  font-size: 11px;
  font-weight: 800;
}

.response-pre {
  max-height: 420px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #c8d7ef;
  font-size: 13px;
  line-height: 1.65;
}

.worker-capability-grid {
  display: grid;
  gap: 14px;
}

.worker-capability-card {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.worker-capability-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #42d8ff;
  background: rgba(66, 216, 255, 0.1);
}

.worker-capability-icon.purple {
  color: #ad8cff;
  background: rgba(124, 92, 255, 0.12);
}

.worker-capability-icon svg {
  width: 20px;
  height: 20px;
}

.worker-capability-card strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 15px;
}

.worker-capability-card strong span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.14);
  color: #bfaaff;
  font-size: 11px;
}

.worker-capability-card p {
  margin: 0;
  color: #8396b7;
  font-size: 13px;
}

@media (max-width: 1040px) {
  .worker-hero-grid,
  .worker-layout {
    grid-template-columns: 1fr;
  }

  .worker-status-card,
  .worker-side-panel {
    position: static;
  }

  .worker-hero-grid {
    align-items: start;
  }
}

@media (max-width: 640px) {
  .worker-hero-grid {
    padding: 18px;
  }

  .worker-avatar-ring {
    width: 76px;
    height: 76px;
  }

  .worker-avatar-core {
    width: 56px;
    height: 56px;
  }

  .worker-hero-copy h1 {
    font-size: 23px;
  }

  .worker-keyword-section {
    grid-template-columns: 1fr;
  }

  .worker-console-head,
  .worker-console-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .worker-submit-button {
    width: 100%;
  }
}

/* ======== AI worker matrix page ======== */
.worker-matrix-shell {
  width: 100%;
}

.worker-matrix-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.worker-matrix-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
}

.worker-matrix-head p {
  margin: 7px 0 0;
  color: #647391;
  font-size: 12px;
}

.worker-recruit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(130, 171, 236, 0.15);
  border-radius: 10px;
  background: rgba(18, 24, 42, 0.82);
  color: #f0f6ff;
  font-size: 13px;
  font-weight: 750;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.worker-recruit-button span {
  color: #fff;
  font-size: 16px;
  line-height: 1;
}

.worker-recruit-button:hover {
  border-color: rgba(66, 216, 255, 0.28);
  background: rgba(28, 38, 64, 0.92);
  transform: translateY(-1px);
}

.worker-matrix-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.worker-matrix-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 184px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(130, 171, 236, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(19, 24, 42, 0.96), rgba(16, 20, 35, 0.96)),
    rgba(16, 20, 35, 0.96);
  box-shadow: 0 18px 42px rgba(2, 8, 20, 0.22);
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.worker-matrix-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 20% 0%, rgba(124, 92, 255, 0.2), transparent 42%);
  transition: opacity 0.18s ease;
}

.worker-matrix-card:hover,
.worker-matrix-card.is-featured {
  border-color: rgba(173, 92, 255, 0.78);
  background:
    radial-gradient(circle at 0% 0%, rgba(124, 92, 255, 0.16), transparent 44%),
    linear-gradient(180deg, rgba(20, 24, 43, 0.98), rgba(17, 20, 34, 0.98));
  box-shadow: 0 22px 48px rgba(2, 8, 20, 0.32);
}

.worker-matrix-card:hover {
  transform: translateY(-3px);
}

.worker-matrix-card:hover::before,
.worker-matrix-card.is-featured::before {
  opacity: 1;
}

.worker-matrix-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.worker-matrix-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 13px;
  color: #fff;
  flex: 0 0 auto;
  box-shadow: 0 14px 28px rgba(2, 8, 20, 0.24);
}

.worker-matrix-icon svg {
  width: 27px;
  height: 27px;
}

.accent-purple,
.accent-image {
  background: linear-gradient(135deg, #7b3dff, #af54ff);
}

.accent-cyan,
.accent-content {
  background: linear-gradient(135deg, #18d6ef, #1da7ff);
}

.accent-orange,
.accent-video {
  background: linear-gradient(135deg, #ff9a38, #ff6f22);
}

.accent-green,
.accent-seo {
  background: linear-gradient(135deg, #2ed8a5, #23c98d);
}

.accent-pink,
.accent-avatar {
  background: linear-gradient(135deg, #f53ca5, #f04f82);
}

.accent-blue,
.accent-editor {
  background: linear-gradient(135deg, #2f7dff, #3d62f2);
}

.worker-matrix-title {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.worker-matrix-title strong {
  color: #f4f7ff;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.worker-matrix-title span {
  color: #59677f;
  font-size: 11px;
  font-weight: 700;
}

.worker-matrix-task {
  position: relative;
  margin: 24px 0 10px;
  min-height: 18px;
  color: #a6b3ca;
  font-size: 12px;
  line-height: 1.45;
}

.worker-matrix-tags {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.worker-matrix-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 10px;
  border: 1px solid rgba(130, 171, 236, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #9da9bf;
  font-size: 12px;
  font-weight: 700;
}

.worker-matrix-foot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.worker-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(35, 211, 164, 0.24);
  border-radius: 999px;
  background: rgba(35, 211, 164, 0.12);
  color: #55f0cd;
  font-size: 12px;
  font-weight: 800;
}

.worker-online i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #23d3a4;
  box-shadow: 0 0 10px rgba(35, 211, 164, 0.78);
}

.worker-drag-hint {
  color: #5d6b86;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 1380px) {
  .worker-matrix-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .worker-matrix-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .worker-matrix-head {
    display: grid;
  }

  .worker-recruit-button {
    width: 100%;
  }

  .worker-matrix-grid {
    grid-template-columns: 1fr;
  }
}

.login-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(112, 81, 255, 0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgba(35, 211, 164, 0.14), transparent 30%),
    linear-gradient(180deg, #0a1220 0%, #0f1729 100%);
  color: #eaf1ff;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid rgba(130, 171, 236, 0.16);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(12, 20, 38, 0.98), rgba(9, 15, 28, 0.96));
  box-shadow: 0 28px 90px rgba(4, 10, 20, 0.46);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.login-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(240, 90, 214, 0.16), rgba(124, 92, 255, 0.24));
  color: #f4f7ff;
}

.login-mark svg {
  width: 30px;
  height: 30px;
}

.login-brand strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
}

.login-brand span {
  display: block;
  margin-top: 3px;
  color: #89a1c4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.login-card h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

.login-copy {
  margin: 10px 0 22px;
  color: #9cb0d0;
  line-height: 1.7;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: #c7d4eb;
  font-size: 13px;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(130, 171, 236, 0.18);
  border-radius: 14px;
  background: rgba(8, 13, 24, 0.94);
  color: #eef4ff;
  font-size: 14px;
  outline: none;
}

.login-form input:focus {
  border-color: rgba(66, 216, 255, 0.56);
  box-shadow: 0 0 0 3px rgba(66, 216, 255, 0.08);
}

.login-submit {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #42d8ff, #7c5cff);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.login-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.6;
}

.login-alert.success {
  border: 1px solid rgba(35, 211, 164, 0.26);
  background: rgba(35, 211, 164, 0.08);
  color: #7cebc9;
}

.login-alert.danger {
  border: 1px solid rgba(244, 111, 124, 0.26);
  background: rgba(244, 111, 124, 0.08);
  color: #ffb1bb;
}
