:root {
  --bg: #0b0e14;
  --bg-soft: #10151d;
  --bg-panel: rgba(18, 24, 34, 0.92);
  --bg-panel-strong: rgba(12, 17, 25, 0.98);
  --bg-panel-soft: rgba(255, 255, 255, 0.035);
  --grid-dot: rgba(163, 178, 203, 0.18);
  --grid-major: rgba(122, 179, 255, 0.08);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #edf3ff;
  --muted: #93a0b8;
  --muted-strong: #c7d0df;
  --blue: #78adff;
  --blue-strong: #a8cbff;
  --blue-soft: rgba(120, 173, 255, 0.16);
  --yellow: #ffcf69;
  --yellow-soft: rgba(255, 207, 105, 0.18);
  --green: #6fd79f;
  --green-soft: rgba(111, 215, 159, 0.18);
  --red: #ff7c87;
  --red-soft: rgba(255, 124, 135, 0.18);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.38);
  --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.26);
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --topbar-h: 72px;
  --queue-h: 246px;
  --queue-collapsed-h: 52px;
  --rail-w: 88px;
  --props-w: 360px;
  --ruler-size: 28px;
  --font-ui: "Avenir Next", "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB",
    "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow: hidden;
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(120, 173, 255, 0.12), transparent 22%),
    radial-gradient(circle at right top, rgba(69, 95, 140, 0.16), transparent 28%),
    linear-gradient(180deg, #090c11 0%, #0b0f16 40%, #0a0d13 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  outline: none;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(120, 173, 255, 0.54);
  box-shadow: 0 0 0 3px rgba(120, 173, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
}

textarea {
  resize: vertical;
  min-height: 96px;
}

.hidden {
  display: none !important;
}

.app-shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(180deg, rgba(15, 19, 28, 0.95), rgba(11, 15, 22, 0.88));
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 50;
}

.topbar-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-left {
  flex: 1 1 0;
}

.topbar-center {
  justify-content: center;
}

.topbar-right {
  justify-content: flex-end;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 800;
  color: #f3f7ff;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.28), transparent 35%),
    linear-gradient(135deg, #6c8cff 0%, #59b7ff 100%);
  box-shadow: 0 14px 26px rgba(75, 126, 235, 0.34);
}

.project-meta {
  min-width: 0;
}

.topbar-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-title-input {
  width: 260px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.project-title-input:focus {
  background: transparent;
  box-shadow: none;
}

.save-pill,
.zoom-pill {
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.ghost-btn,
.mini-btn,
.tool-btn,
.node-action-btn,
.panel-btn,
.status-btn,
.icon-btn,
.queue-btn,
.asset-badge,
.node-chip,
.create-menu-item {
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.ghost-btn,
.mini-btn,
.queue-btn,
.status-btn,
.panel-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.topbar-link {
  text-decoration: none;
}

.ghost-btn:hover,
.mini-btn:hover,
.queue-btn:hover,
.status-btn:hover,
.panel-btn:hover,
.icon-btn:hover,
.tool-btn:hover,
.node-action-btn:hover,
.create-menu-item:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.065);
}

.ghost-btn.is-active,
.batch-btn.is-active {
  border-color: rgba(120, 173, 255, 0.34);
  background: rgba(120, 173, 255, 0.13);
  color: var(--blue-strong);
}

.mini-btn {
  height: 28px;
  padding: 0 10px;
  font-size: 0.8rem;
}

.credits-pill {
  height: 42px;
  max-width: 360px;
  padding: 0 8px 0 14px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.credits-pill span {
  font-size: 0.85rem;
  color: var(--muted);
}

.credits-pill strong {
  font-size: 1rem;
  color: var(--text);
  max-width: 210px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.api-status-pill strong {
  color: var(--blue-strong);
}

.workspace-shell {
  flex: 1;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) auto;
  min-height: 0;
  position: relative;
}

.workspace-shell.is-batch-mode,
.workspace-shell.is-gpt-image-mode {
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
}

.workspace-shell.is-batch-mode .tool-rail,
.workspace-shell.is-gpt-image-mode .tool-rail {
  opacity: 0.88;
}

.tool-rail {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 10px 12px;
  background: linear-gradient(180deg, rgba(14, 18, 26, 0.96), rgba(9, 13, 19, 0.96));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 20;
}

.tool-rail-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-rail-bottom {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tool-btn {
  width: 100%;
  min-height: 58px;
  padding: 10px 6px;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.tool-btn.is-active {
  background: rgba(120, 173, 255, 0.12);
  color: var(--blue-strong);
  border-color: rgba(120, 173, 255, 0.22);
}

.tool-icon {
  font-size: 1rem;
  line-height: 1;
}

.tool-text {
  font-size: 0.72rem;
}

.stage-shell {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--ruler-size) minmax(0, 1fr);
  grid-template-rows: var(--ruler-size) minmax(0, 1fr);
  position: relative;
  overflow: hidden;
}

.stage-shell.has-properties {
  grid-template-columns: var(--ruler-size) minmax(0, 1fr) var(--props-w);
}

.ruler-corner,
.ruler {
  background: rgba(11, 15, 22, 0.94);
  border-color: rgba(255, 255, 255, 0.07);
}

.ruler-corner {
  grid-column: 1;
  grid-row: 1;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ruler-top {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: var(--ruler-size);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ruler-left {
  grid-column: 1;
  grid-row: 2;
  width: var(--ruler-size);
  height: 100%;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.canvas-viewport {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(120, 173, 255, 0.06), transparent 30%),
    linear-gradient(180deg, #0b0f15 0%, #0b1018 100%);
}

.canvas-viewport.is-space-pan,
.canvas-viewport.is-pan-mode {
  cursor: grab;
}

.canvas-viewport.is-panning {
  cursor: grabbing;
}

.canvas-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    radial-gradient(circle, var(--grid-dot) 1.15px, transparent 1.2px);
  background-size:
    var(--grid-large, 120px) var(--grid-large, 120px),
    var(--grid-large, 120px) var(--grid-large, 120px),
    var(--grid-small, 24px) var(--grid-small, 24px);
  background-position:
    var(--grid-offset-x-large, 0px) var(--grid-offset-y-large, 0px),
    var(--grid-offset-x-large, 0px) var(--grid-offset-y-large, 0px),
    var(--grid-offset-x-small, 0px) var(--grid-offset-y-small, 0px);
}

.canvas-world {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.nodes-layer {
  position: absolute;
  inset: 0;
}

.edges-svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.edge-path {
  fill: none;
  stroke: rgba(140, 186, 255, 0.6);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 4 4;
}

.edge-path.is-active {
  stroke: rgba(168, 203, 255, 0.92);
  stroke-width: 2.5;
}

.canvas-hint,
.connect-hint,
.story-canvas-actions,
.zoom-badge,
.mini-map,
.create-menu,
.mention-menu,
.history-drawer,
.properties-panel,
.task-queue,
.canvas-node,
.node-status,
.queue-status,
.save-pill,
.zoom-pill,
.credits-pill {
  backdrop-filter: blur(16px);
}

.canvas-hint {
  position: absolute;
  top: 76px;
  left: 28px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(16, 21, 30, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  z-index: 6;
}

.canvas-hint strong {
  font-size: 0.98rem;
}

.canvas-hint span {
  font-size: 0.82rem;
  color: var(--muted);
}

.story-canvas-actions {
  position: absolute;
  top: 24px;
  left: 28px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(12, 18, 28, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow-md);
}

.story-action-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.story-action-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(120, 173, 255, 0.26);
}

.story-action-btn.primary {
  background: linear-gradient(135deg, rgba(120, 173, 255, 0.92), rgba(89, 183, 255, 0.86));
  color: #06101d;
  border-color: transparent;
}

.connect-hint {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(12, 18, 28, 0.92);
  border: 1px solid rgba(120, 173, 255, 0.2);
  color: var(--blue-strong);
  z-index: 12;
}

.zoom-badge {
  position: absolute;
  right: 16px;
  bottom: 16px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(12, 18, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.07);
  z-index: 8;
}

.mini-map {
  position: absolute;
  right: 16px;
  bottom: 64px;
  width: 200px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(12, 18, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-md);
  z-index: 8;
}

.mini-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.mini-map-viewport {
  position: relative;
  height: 132px;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(147, 160, 184, 0.28) 1px, transparent 1.1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
  background-size: 22px 22px, auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-map-nodes,
.mini-map-frame {
  position: absolute;
  inset: 0;
}

.mini-node {
  position: absolute;
  border-radius: 5px;
  background: rgba(120, 173, 255, 0.36);
  border: 1px solid rgba(120, 173, 255, 0.55);
}

.mini-node.type-video {
  background: rgba(255, 207, 105, 0.28);
  border-color: rgba(255, 207, 105, 0.52);
}

.mini-node.type-shot {
  background: rgba(111, 215, 159, 0.26);
  border-color: rgba(111, 215, 159, 0.5);
}

.mini-map-frame {
  border: 1.5px solid rgba(168, 203, 255, 0.92);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.create-menu,
.mention-menu,
.history-drawer,
.properties-panel,
.canvas-node,
.task-queue {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.create-menu {
  position: absolute;
  width: 220px;
  padding: 8px;
  border-radius: 18px;
  z-index: 14;
}

.create-menu-item {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
}

.properties-panel {
  grid-column: 3;
  grid-row: 1 / 3;
  width: var(--props-w);
  min-width: var(--props-w);
  padding: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(14, 18, 26, 0.98), rgba(10, 14, 21, 0.96));
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 18;
}

.properties-header,
.history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.properties-header h2,
.history-header h2 {
  margin: 2px 0 0;
  font-size: 1.1rem;
}

.properties-content,
.history-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.history-drawer {
  position: absolute;
  top: calc(var(--topbar-h) + 12px);
  right: 16px;
  width: 360px;
  bottom: 16px;
  padding: 18px;
  border-radius: 24px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.history-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.history-card h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
}

.history-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.history-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.5;
  font-size: 0.88rem;
}

.history-cost {
  margin-top: 8px;
  color: var(--green);
  font-size: 0.78rem;
}

.history-preview {
  margin-top: 12px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.history-preview img,
.history-preview video {
  display: block;
  width: 100%;
  max-height: 210px;
  object-fit: cover;
}

.history-preview audio {
  display: block;
  width: 100%;
}

.canvas-node {
  position: absolute;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 38%),
    rgba(14, 19, 27, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-md);
  user-select: none;
  font-size: 0.85rem;
}

.canvas-node.is-selected {
  border-color: rgba(120, 173, 255, 0.66);
  box-shadow:
    0 0 0 1px rgba(120, 173, 255, 0.22),
    0 22px 48px rgba(0, 0, 0, 0.34);
}

.canvas-node.is-connecting {
  border-color: rgba(255, 207, 105, 0.5);
}

.node-header {
  position: relative;
  padding: 8px 12px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: grab;
}

.node-header:active {
  cursor: grabbing;
}

.node-header-main {
  min-width: 0;
}

.node-type {
  display: block;
  margin-bottom: 2px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.node-title {
  margin: 0;
  font-size: 0.88rem;
}

.node-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.node-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

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

.field-group label,
.field-label {
  font-size: 0.72rem;
  color: var(--muted);
}

.compact-input,
.compact-select,
.compact-textarea {
  padding: 6px 8px;
  font-size: 0.82rem;
  border-radius: 8px;
}

.compact-textarea {
  min-height: 60px;
}

.compact-select {
  appearance: none;
}

.node-status,
.queue-status {
  padding: 6px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-draft {
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted-strong);
}

.status-queued {
  background: var(--yellow-soft);
  color: var(--yellow);
}

.status-running {
  background: var(--blue-soft);
  color: var(--blue-strong);
}

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

.status-fail {
  background: var(--red-soft);
  color: var(--red);
}

.node-dropzone {
  padding: 8px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.025);
  min-height: 64px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.node-dropzone.is-active {
  border-color: rgba(120, 173, 255, 0.56);
  background: rgba(120, 173, 255, 0.08);
}

.canvas-node.is-drop-target {
  border-color: rgba(120, 173, 255, 0.72);
  box-shadow:
    0 0 0 1px rgba(120, 173, 255, 0.34),
    0 20px 60px rgba(44, 119, 255, 0.18);
}

.dropzone-copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
}

.dropzone-copy span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 6px;
}

.asset-thumb,
.result-preview-card {
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.asset-thumb {
  position: relative;
  min-height: 52px;
}

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

.result-preview-card audio {
  width: calc(100% - 24px);
  margin: 24px 12px 12px;
}

.asset-thumb-meta {
  position: absolute;
  inset-inline: 6px;
  bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.asset-badge {
  max-width: calc(100% - 30px);
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(10, 14, 21, 0.82);
  color: #f1f5fb;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-remove {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(10, 14, 21, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

.asset-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.node-chip {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
  font-size: 0.8rem;
}

.node-chip button {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0;
}

.node-action-row,
.result-action-row,
.properties-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.node-action-btn {
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.78rem;
}

.node-action-btn.primary {
  background: linear-gradient(135deg, rgba(120, 173, 255, 0.92), rgba(89, 183, 255, 0.88));
  color: #06101d;
  border-color: rgba(120, 173, 255, 0.32);
  font-weight: 700;
}

.node-action-btn.subtle {
  color: var(--muted-strong);
}

.result-preview {
  min-height: 100px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-preview.empty {
  color: var(--muted);
  font-size: 0.88rem;
}

.result-preview-card {
  width: 100%;
  min-height: 100px;
  position: relative;
}

.canvas-node[data-node-type="image"] {
  border-radius: 16px;
}

.gpt-image-node {
  display: grid;
  gap: 9px;
}

.gpt-image-mode-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.gpt-image-mode-option {
  position: relative;
  min-height: 30px;
  border-radius: 9px;
  cursor: pointer;
}

.gpt-image-mode-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.gpt-image-mode-option span {
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.gpt-image-mode-option input:checked + span {
  color: #06101d;
  background: linear-gradient(135deg, rgba(120, 173, 255, 0.96), rgba(116, 231, 171, 0.9));
}

.gpt-image-settings-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.gpt-image-prompt-field {
  display: grid;
  gap: 6px;
}

.gpt-image-prompt-field > span {
  color: var(--muted-strong);
  font-size: 0.72rem;
}

.gpt-image-rules-input {
  min-height: 72px;
}

.gpt-image-main-input {
  min-height: 92px;
}

.gpt-image-reference-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.gpt-image-reference-panel.is-active {
  border-color: rgba(116, 231, 171, 0.18);
  background: rgba(116, 231, 171, 0.055);
}

.gpt-image-reference-panel .node-dropzone {
  min-height: 78px;
}

.gpt-image-reference-panel .asset-grid {
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
}

.gpt-image-result {
  min-height: 150px;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
    rgba(20, 24, 30, 0.88);
}

.gpt-image-result .result-preview-card {
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
}

.gpt-image-result .result-preview-card img {
  min-height: 0;
}

.gpt-image-result .placeholder-meta {
  display: none;
}

.result-preview-card.video::after {
  content: none;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.44);
}

.canvas-node[data-node-type="video"] {
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 36%),
    rgba(13, 16, 22, 0.96);
}

.canvas-node[data-node-type="video"] .node-header {
  padding: 8px 12px;
}

.canvas-node[data-node-type="video"] .node-body {
  padding: 10px 12px 12px;
}

.video-compose-node {
  display: grid;
  gap: 9px;
}

.seedance-node {
  display: grid;
  gap: 10px;
}

.video-stage {
  position: relative;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 50% 42%, rgba(120, 173, 255, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018)),
    #1a1b1f;
  display: grid;
  place-items: center;
}

.video-stage .result-preview-card {
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
}

.video-stage .result-preview-card img {
  min-height: 0;
}

.video-stage .result-preview-card video {
  min-height: 0;
  background: #05070b;
}

.video-stage .placeholder-meta {
  display: none;
}

.seedance-stage {
  aspect-ratio: 16 / 8.4;
}

.video-stage-empty {
  display: grid;
  place-items: center;
  gap: 7px;
  color: var(--muted-strong);
  text-align: center;
}

.video-stage-empty strong {
  color: var(--text);
  font-size: 0.92rem;
}

.video-stage-empty small {
  max-width: 260px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.72rem;
}

.video-stage-loading {
  width: min(78%, 300px);
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  color: var(--muted-strong);
}

.video-stage-loading strong {
  color: var(--text);
  font-size: 0.88rem;
}

.video-stage-loading small {
  color: var(--muted);
  font-size: 0.78rem;
}

.video-stage-loading .task-progress-bar {
  width: 100%;
}

.video-stage-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.03);
}

.video-reference-strip .node-dropzone {
  min-height: 54px;
  padding: 8px;
  border-radius: 12px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

.video-reference-strip.is-empty .node-dropzone {
  min-height: 38px;
  padding: 6px 10px;
  justify-content: center;
  background: rgba(120, 173, 255, 0.035);
  border-color: rgba(120, 173, 255, 0.18);
}

.video-reference-strip .dropzone-copy {
  width: 100%;
  text-align: center;
}

.video-reference-strip.is-empty .dropzone-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.video-reference-strip.is-empty .dropzone-copy strong {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted-strong);
}

.video-reference-strip.is-empty .dropzone-copy span {
  font-size: 0.68rem;
  color: var(--muted);
}

.video-reference-strip .asset-grid {
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
}

.video-reference-strip .asset-thumb {
  min-height: 46px;
  border-radius: 10px;
}

.video-reference-strip .asset-badge {
  max-width: calc(100% - 28px);
  padding: 4px 6px;
  font-size: 0.68rem;
}

.seedance-reference-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.seedance-panel-head,
.seedance-estimate-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.seedance-panel-head strong,
.seedance-estimate-row strong {
  color: var(--text);
  font-size: 0.82rem;
}

.seedance-panel-head span,
.seedance-estimate-row span {
  color: var(--muted);
  font-size: 0.72rem;
}

.seedance-reference-panel .node-dropzone {
  min-height: 76px;
}

.seedance-reference-panel .asset-grid {
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
}

.video-composer {
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.video-composer-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.seedance-composer {
  display: grid;
  gap: 9px;
}

.video-meta-chip,
.video-meta-select-wrap {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
  font-size: 0.72rem;
}

.video-meta-select-wrap {
  gap: 6px;
  padding-right: 6px;
}

.video-meta-select-wrap span {
  color: var(--muted);
  font-size: 0.64rem;
}

.video-meta-select {
  width: auto;
  max-width: 150px;
  min-width: 58px;
  height: 26px;
  padding: 0 18px 0 2px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 0.72rem;
  appearance: auto;
}

.video-credit-badge {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: rgba(116, 231, 171, 0.12);
  border: 1px solid rgba(116, 231, 171, 0.2);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.video-prompt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.seedance-prompt-field {
  display: grid;
  gap: 6px;
}

.seedance-prompt-field > span {
  color: var(--muted-strong);
  font-size: 0.72rem;
}

.seedance-template-input {
  min-height: 58px;
}

.seedance-scene-row {
  grid-template-columns: minmax(0, 1fr) 74px;
}

.seedance-estimate-row {
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(111, 215, 159, 0.06);
  border: 1px solid rgba(111, 215, 159, 0.12);
}

.video-prompt-input {
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 12px;
  resize: vertical;
  font-size: 0.84rem;
  line-height: 1.45;
}

.video-generate-btn {
  min-width: 68px;
  height: auto;
  border-radius: 12px;
  font-size: 0.84rem;
}

.video-preset-panel {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.video-preset-head {
  color: var(--muted-strong);
  font-size: 0.7rem;
}

.video-preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.video-preset-chip {
  min-height: 26px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-size: 0.7rem;
  line-height: 1.2;
}

.video-preset-chip:hover {
  border-color: rgba(160, 214, 255, 0.34);
  background: rgba(160, 214, 255, 0.12);
}

.video-extend-panel {
  padding: 8px;
  border: 1px solid rgba(255, 207, 105, 0.12);
  border-radius: 14px;
  background: rgba(255, 207, 105, 0.055);
}

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

.video-live-progress {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.video-progress-topline,
.video-progress-footnote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.video-progress-topline span {
  color: var(--muted-strong);
  font-size: 0.8rem;
}

.video-progress-topline strong {
  color: var(--text);
  font-size: 0.82rem;
}

.video-progress-footnote {
  color: var(--muted);
  font-size: 0.72rem;
}

.video-live-progress.status-success {
  border-color: rgba(111, 215, 159, 0.2);
  background: rgba(111, 215, 159, 0.06);
}

.video-live-progress.status-fail {
  border-color: rgba(255, 91, 122, 0.22);
  background: rgba(255, 91, 122, 0.07);
}

.property-task-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.property-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.property-section-head strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.35;
}

.property-task-empty {
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.property-task-panel .video-live-progress {
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

.placeholder-meta {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: var(--muted);
}

.handle {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.14);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.handle-left {
  left: -7px;
}

.handle-right {
  right: -7px;
}

.handle.is-hot,
.handle:hover {
  background: rgba(120, 173, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.3);
}

.node-note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.history-empty,
.properties-empty,
.queue-empty {
  padding: 22px 18px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.task-queue {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 14px;
  height: var(--queue-h);
  border-radius: 24px;
  overflow: hidden;
  z-index: 28;
}

.task-queue.is-collapsed {
  height: var(--queue-collapsed-h);
}

.task-queue-toggle {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(12, 17, 25, 0.94);
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.task-queue-toggle span:last-child {
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(120, 173, 255, 0.14);
  color: var(--blue-strong);
}

.task-queue-body {
  height: calc(100% - 52px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.task-queue-head,
.task-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) 90px 130px 110px 100px minmax(110px, 0.9fr) 100px;
  gap: 10px;
  align-items: center;
}

.task-queue-head {
  padding: 14px 18px 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.task-queue-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 12px 14px;
}

.task-row {
  padding: 12px 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.88rem;
}

.task-row strong {
  display: block;
  margin-bottom: 4px;
}

.task-row small {
  color: var(--muted);
}

.task-row-message {
  grid-column: 1 / -1;
  margin-top: -4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(120, 173, 255, 0.08);
  border: 1px solid rgba(120, 173, 255, 0.16);
  color: var(--muted-strong);
  font-size: 0.78rem;
  line-height: 1.5;
}

.task-row-message.is-error {
  background: rgba(255, 91, 122, 0.1);
  border-color: rgba(255, 91, 122, 0.24);
  color: #ffd4dc;
}

.mention-menu {
  position: fixed;
  min-width: 220px;
  max-width: 280px;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border-radius: 16px;
  z-index: 60;
}

.mention-item {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.mention-item.is-active {
  background: rgba(120, 173, 255, 0.12);
}

.mention-item img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
}

.mention-item-meta strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.86rem;
}

.mention-item-meta span {
  color: var(--muted);
  font-size: 0.76rem;
}

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

.property-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.property-kv span {
  color: var(--muted);
}

.property-kv strong {
  color: var(--text);
}

.inline-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.small-note {
  font-size: 0.78rem;
  color: var(--muted);
}

.empty-canvas {
  display: none;
}

/* ===== Dashboard ===== */

.dashboard-view {
  min-height: 100vh;
  padding: 56px 48px 48px;
  background:
    radial-gradient(circle at 20% 15%, rgba(120, 173, 255, 0.1), transparent 30%),
    radial-gradient(circle at 80% 30%, rgba(89, 183, 255, 0.06), transparent 28%),
    linear-gradient(180deg, #090c11 0%, #0b0f16 40%, #0a0d13 100%);
  font-family: var(--font-ui);
  color: var(--text);
}

.dashboard-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 48px;
}

.brand-mark-lg {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #f3f7ff;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.28), transparent 35%),
    linear-gradient(135deg, #6c8cff 0%, #59b7ff 100%);
  box-shadow: 0 14px 26px rgba(75, 126, 235, 0.34);
}

.dashboard-brand h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
}

.dashboard-brand p {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.dashboard-toolbar {
  margin-bottom: 32px;
}

.new-project-btn {
  height: 48px;
  padding: 0 28px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, rgba(120, 173, 255, 0.92), rgba(89, 183, 255, 0.88));
  color: #06101d;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.new-project-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(89, 183, 255, 0.28);
}

.new-project-icon {
  font-size: 1.2rem;
  font-weight: 400;
  margin-right: 4px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.project-card {
  padding: 24px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
    rgba(14, 19, 27, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(120, 173, 255, 0.4);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}

.project-card-title {
  margin: 0 0 10px;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
}

.project-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
  font-size: 0.78rem;
  color: var(--muted);
}

.project-card-actions {
  display: flex;
  gap: 8px;
}

.project-card-actions .ghost-btn {
  height: 32px;
  padding: 0 12px;
  font-size: 0.78rem;
  border-radius: 8px;
}

.empty-dashboard {
  padding: 64px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.empty-dashboard-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
  opacity: 0.3;
}

.empty-dashboard strong {
  font-size: 1.1rem;
  color: var(--muted-strong);
}

.empty-dashboard span {
  font-size: 0.88rem;
}

.back-btn {
  font-size: 0.85rem;
  color: var(--muted-strong);
  margin-right: 4px;
}

@media (max-width: 1320px) {
  :root {
    --props-w: 330px;
  }

  .topbar-right .ghost-btn:first-child {
    display: none;
  }
}

/* ===== Progress Bar ===== */

.task-progress-wrap {
  grid-column: 1 / -1;
  padding: 0 2px;
}

.task-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.task-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.task-progress-fill.is-indeterminate {
  width: 100% !important;
  background-size: 220% 100%;
  animation: progress-indeterminate 1.35s linear infinite;
}

.task-progress-fill.status-queued {
  background: linear-gradient(90deg, var(--yellow), #e8a832);
}

.task-progress-fill.status-running {
  background: linear-gradient(90deg, var(--blue-strong), #59b7ff);
  animation: progress-pulse 1.8s ease-in-out infinite;
}

.task-progress-fill.is-estimated {
  background-size: 18px 18px;
}

.task-progress-fill.status-queued.is-estimated {
  background-image:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.18) 25%,
      transparent 25%,
      transparent 50%,
      rgba(255, 255, 255, 0.18) 50%,
      rgba(255, 255, 255, 0.18) 75%,
      transparent 75%,
      transparent
    ),
    linear-gradient(90deg, var(--yellow), #e8a832);
}

.task-progress-fill.status-running.is-estimated {
  background-image:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.18) 25%,
      transparent 25%,
      transparent 50%,
      rgba(255, 255, 255, 0.18) 50%,
      rgba(255, 255, 255, 0.18) 75%,
      transparent 75%,
      transparent
    ),
    linear-gradient(90deg, var(--blue-strong), #59b7ff);
}

.task-progress-fill.status-success {
  background: linear-gradient(90deg, var(--green), #4fd1a2);
}

.task-progress-fill.status-fail {
  background: linear-gradient(90deg, var(--red), #ff6b7a);
}

@keyframes progress-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

@keyframes progress-indeterminate {
  0% {
    transform: translateX(-78%);
  }
  100% {
    transform: translateX(78%);
  }
}

.task-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--muted);
}

.task-progress-label .stage-label {
  color: var(--muted-strong);
}

.task-progress-label .elapsed-label {
  font-variant-numeric: tabular-nums;
}

/* ===== Cost Badge ===== */

.cost-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted-strong);
  vertical-align: middle;
}

/* ===== Batch Pipeline ===== */

.batch-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(120, 173, 255, 0.28);
  background: linear-gradient(135deg, rgba(120, 173, 255, 0.16), rgba(89, 183, 255, 0.1));
  color: var(--blue-strong);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.batch-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(120, 173, 255, 0.28), rgba(89, 183, 255, 0.18));
  box-shadow: 0 8px 24px rgba(89, 183, 255, 0.18);
}

.batch-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.batch-view {
  min-width: 0;
  min-height: 0;
  padding: 16px;
  overflow: hidden;
  background:
    linear-gradient(rgba(16, 22, 31, 0.88), rgba(10, 14, 21, 0.94)),
    radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: auto, 32px 32px;
}

.batch-layout {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(420px, 1fr) minmax(260px, 320px);
  gap: 14px;
}

.batch-control-panel,
.batch-list-panel,
.batch-preview-panel {
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 28%),
    rgba(13, 18, 27, 0.94);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.batch-control-panel {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
}

.batch-dropzone {
  min-height: 150px;
  padding: 18px;
  border: 1px dashed rgba(120, 173, 255, 0.34);
  border-radius: 16px;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  background: rgba(120, 173, 255, 0.065);
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.batch-dropzone.is-active {
  border-color: rgba(120, 173, 255, 0.82);
  background: rgba(120, 173, 255, 0.14);
  transform: translateY(-1px);
}

.batch-dropzone strong {
  font-size: 0.96rem;
  color: var(--text);
}

.batch-dropzone span {
  max-width: 220px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.batch-settings {
  display: grid;
  gap: 10px;
}

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

.batch-setting-row label,
.batch-prompt-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.batch-setting-row span,
.batch-prompt-field span {
  font-size: 0.72rem;
  color: var(--muted);
}

.batch-prompt-field textarea {
  min-height: 112px;
  line-height: 1.45;
}

.batch-prompt-map-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.batch-prompt-map-field > span strong {
  flex: 0 0 auto;
  color: var(--blue-strong);
  font-size: 0.72rem;
  font-weight: 700;
}

.batch-prompt-map-field > span strong.is-ready {
  color: var(--green);
}

.batch-prompt-map-field > span strong.is-mismatch {
  color: var(--yellow);
}

.batch-prompt-map-field textarea {
  min-height: 150px;
}

.batch-preset-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

.batch-actions-cleanup,
.batch-actions-primary,
.batch-actions-bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.batch-actions-cleanup .node-action-btn,
.batch-actions-primary .node-action-btn,
.batch-actions-bottom .node-action-btn {
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

.batch-actions-bottom {
  padding-top: 2px;
}

.batch-list-panel,
.batch-preview-panel {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.batch-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
}

.batch-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.batch-section-head span {
  display: block;
  margin-bottom: 2px;
  font-size: 0.72rem;
  color: var(--muted);
}

.batch-section-head strong {
  display: block;
  max-width: 210px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.98rem;
  color: var(--text);
}

.batch-items-list {
  min-height: 0;
  padding-right: 4px;
  display: grid;
  gap: 10px;
  overflow: auto;
}

.batch-empty,
.batch-preview-empty {
  min-height: 160px;
  padding: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
}

.batch-empty strong {
  color: var(--muted-strong);
}

.batch-empty span,
.batch-preview-empty {
  font-size: 0.78rem;
  line-height: 1.45;
}

.batch-item {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  background: rgba(255, 255, 255, 0.032);
  transition:
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease;
}

.batch-item.is-selected {
  border-color: rgba(120, 173, 255, 0.48);
  background: rgba(120, 173, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(120, 173, 255, 0.12);
}

.batch-thumb {
  width: 82px;
  height: 82px;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.batch-item-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.batch-item-head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.batch-item-head strong {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.86rem;
  color: var(--text);
}

.batch-cost {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(111, 215, 159, 0.13);
  border: 1px solid rgba(111, 215, 159, 0.22);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.batch-item-prompt {
  min-height: 50px;
  max-height: 96px;
  padding: 9px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  line-height: 1.45;
}

.batch-row-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.batch-mini-select {
  min-width: 118px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.batch-mini-select span {
  flex: 0 0 auto;
  font-size: 0.66rem;
  color: var(--muted);
}

.batch-mini-select select {
  height: 28px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 0.74rem;
}

.batch-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.72rem;
}

.batch-preview-body {
  min-height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(0, 0, 0, 0.22);
}

.batch-preview-media {
  aspect-ratio: 16 / 9;
  min-height: 180px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
}

.batch-preview-media img,
.batch-preview-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.batch-preview-progress {
  padding: 10px 12px 0;
}

.batch-preview-meta {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.batch-preview-meta strong {
  color: var(--muted-strong);
}

.batch-queue-list {
  min-height: 0;
  display: grid;
  gap: 7px;
  overflow: auto;
}

.batch-queue-row {
  height: 36px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.035);
}

.batch-queue-row.is-selected {
  border-color: rgba(120, 173, 255, 0.36);
  background: rgba(120, 173, 255, 0.08);
}

.batch-queue-row span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.78rem;
}

.batch-queue-row strong {
  flex: 0 0 auto;
  font-size: 0.72rem;
}

.seedance-layout {
  grid-template-columns: minmax(280px, 330px) minmax(520px, 1fr) minmax(300px, 360px);
}

.seedance-dropzone {
  min-height: 190px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  background: rgba(120, 173, 255, 0.055);
  border-color: rgba(120, 173, 255, 0.3);
  overflow: hidden;
}

.seedance-dropzone > strong,
.seedance-dropzone > span {
  text-align: center;
}

.seedance-dropzone.is-active {
  background: rgba(120, 173, 255, 0.13);
  border-color: rgba(120, 173, 255, 0.72);
}

.seedance-ref-empty,
.seedance-ref-count {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
}

.seedance-ref-grid {
  width: 100%;
  max-height: 154px;
  padding: 2px 2px 4px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  overflow: auto;
}

.seedance-ref-card {
  position: relative;
  min-width: 0;
}

.seedance-ref-insert {
  width: 100%;
  min-height: 88px;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  cursor: pointer;
}

.seedance-ref-insert:hover {
  border-color: rgba(120, 173, 255, 0.44);
  background: rgba(120, 173, 255, 0.08);
}

.seedance-ref-insert img {
  width: 100%;
  aspect-ratio: 1.45;
  min-height: 48px;
  display: block;
  object-fit: cover;
}

.seedance-ref-insert strong,
.seedance-ref-insert small {
  min-width: 0;
  padding: 0 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
}

.seedance-ref-insert strong {
  padding-top: 4px;
  color: var(--blue-strong);
  font-size: 0.68rem;
}

.seedance-ref-insert small {
  padding-bottom: 6px;
  color: var(--muted);
  font-size: 0.64rem;
}

.seedance-ref-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(8, 12, 18, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  z-index: 2;
}

.seedance-ref-file {
  width: 100%;
  aspect-ratio: 1.45;
  min-height: 48px;
  display: grid;
  place-items: center;
  color: var(--muted-strong);
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.045);
}

.seedance-items-list .batch-empty {
  min-height: 260px;
}

.seedance-item {
  grid-template-columns: minmax(0, 1fr);
}

.seedance-item-prompt {
  min-height: 78px;
  max-height: 132px;
}

.seedance-item-refs,
.seedance-preview-refs {
  padding: 8px 10px;
  border-radius: 12px;
  display: grid;
  gap: 7px;
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 0.72rem;
}

.seedance-item-refs.is-empty {
  border-style: dashed;
  background: rgba(255, 207, 105, 0.045);
  color: #d7c799;
}

.seedance-ref-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.seedance-ref-chip {
  max-width: 142px;
  height: 30px;
  padding: 3px 8px 3px 3px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(120, 173, 255, 0.1);
  border: 1px solid rgba(120, 173, 255, 0.18);
  color: var(--blue-strong);
}

.seedance-ref-chip img,
.seedance-ref-chip span {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.seedance-ref-chip img {
  object-fit: cover;
}

.seedance-ref-chip span {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
  font-size: 0.6rem;
}

.seedance-ref-chip strong {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.7rem;
}

.seedance-ref-warning {
  color: #ffd38a;
  line-height: 1.4;
}

.seedance-preview-refs {
  margin: 10px 12px 0;
}

.seedance-preview-refs > strong {
  color: var(--muted-strong);
}

.seedance-preview-panel .batch-preview-media {
  min-height: 220px;
}

.gpt-image-batch-layout {
  grid-template-columns: minmax(280px, 330px) minmax(460px, 1fr) minmax(320px, 380px);
}

.gpt-image-dropzone {
  min-height: 168px;
  align-content: center;
  background: rgba(116, 231, 171, 0.055);
  border-color: rgba(116, 231, 171, 0.3);
}

.gpt-image-dropzone.is-active {
  background: rgba(116, 231, 171, 0.13);
  border-color: rgba(116, 231, 171, 0.7);
}

.gpt-image-drop-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.gpt-image-composer-refs {
  width: 100%;
  min-height: 34px;
}

.gpt-image-composer-empty,
.gpt-image-composer-count {
  color: var(--muted);
  font-size: 0.72rem;
}

.gpt-image-composer-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.gpt-image-composer-ref {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.gpt-image-composer-ref img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.gpt-image-composer-ref span {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(8, 12, 18, 0.72);
  font-size: 0.8rem;
}

.gpt-image-items-list .batch-item {
  grid-template-columns: 96px minmax(0, 1fr);
}

.gpt-image-thumb {
  width: 96px;
  height: 96px;
}

.gpt-image-ref-strip {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
}

.gpt-image-ref-strip img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.gpt-image-preview-body {
  overflow: auto;
}

.gpt-image-large-preview {
  aspect-ratio: auto;
  min-height: 420px;
  max-height: 68vh;
}

.gpt-image-large-preview img {
  width: 100%;
  height: 100%;
  max-height: 68vh;
  object-fit: contain;
}

.gpt-image-preview-open {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  padding: 0;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  cursor: zoom-in;
}

.gpt-image-preview-open span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(8, 12, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.72rem;
}

.gpt-image-split-panel {
  margin: 0 12px 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(116, 231, 171, 0.18);
  background: rgba(116, 231, 171, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gpt-image-split-panel strong {
  display: block;
  color: var(--text);
  font-size: 0.84rem;
}

.gpt-image-split-panel span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  padding: 72px 28px 28px;
  display: grid;
  place-items: center;
  background: rgba(4, 7, 12, 0.88);
  backdrop-filter: blur(10px);
  animation: fade-in 160ms ease;
}

.image-lightbox-head {
  position: fixed;
  top: 18px;
  left: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text);
}

.image-lightbox-head strong {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.92rem;
}

.image-lightbox img {
  max-width: 94vw;
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.34);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}

@media (max-width: 1240px) {
  .batch-layout {
    grid-template-columns: minmax(250px, 290px) minmax(0, 1fr);
  }

  .batch-preview-panel {
    display: none;
  }
}

.pipeline-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(6, 10, 18, 0.72);
  backdrop-filter: blur(8px);
  animation: fade-in 200ms ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pipeline-dialog {
  width: 480px;
  max-width: 92vw;
  padding: 28px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 40%),
    rgba(14, 19, 27, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
  animation: slide-up 260ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slide-up {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.pipeline-dialog h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.pipeline-dialog .pipeline-desc {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0 0 18px;
}

.story-bulk-dialog {
  width: 640px;
}

.story-bulk-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.story-bulk-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.84rem;
}

.story-bulk-field strong {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-strong);
  font-size: 0.78rem;
}

.story-bulk-field strong.is-ready {
  background: rgba(111, 215, 159, 0.13);
  color: var(--green);
}

.story-bulk-field textarea {
  min-height: 260px;
}

.pipeline-summary {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 20px;
}

.pipeline-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.88rem;
}

.pipeline-summary-row + .pipeline-summary-row {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pipeline-summary-row span:first-child {
  color: var(--muted);
}

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

.pipeline-summary-row.total {
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid rgba(120, 173, 255, 0.2);
}

.pipeline-summary-row.total strong {
  color: var(--blue-strong);
  font-size: 1rem;
}

.pipeline-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.pipeline-actions button {
  height: 40px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-ui);
  cursor: pointer;
  border: none;
}

.pipeline-cancel-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--muted-strong);
}

.pipeline-confirm-btn {
  background: linear-gradient(135deg, rgba(120, 173, 255, 0.92), rgba(89, 183, 255, 0.88));
  color: #06101d;
  font-weight: 700;
}

.task-cost-spent {
  font-size: 0.76rem;
  color: var(--green);
}

.node-cost-estimate {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(120, 173, 255, 0.07);
  border: 1px solid rgba(120, 173, 255, 0.12);
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: -2px;
  margin-bottom: 2px;
}

.node-cost-estimate strong {
  color: var(--blue-strong);
  font-size: 0.86rem;
}

.node-cost-estimate span {
  line-height: 1.35;
}

.node-cost-estimate.is-missing {
  background: rgba(255, 207, 105, 0.08);
  border-color: rgba(255, 207, 105, 0.18);
}

.node-cost-estimate.is-missing strong {
  color: var(--yellow);
}
