

.task-add { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.task-add-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; min-width: 36px;
  background: transparent; border: none;
  color: var(--text-faint);
  font-size:20px; font-weight: 700;
  cursor: default;
  animation: arrowBlink 1.2s ease-in-out infinite;
}
@keyframes arrowBlink {
  0%, 100% { opacity: 1; transform: translateX(0); }
  50% { opacity: .35; transform: translateX(3px); }
}
.task-add input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: var(--radius-control);
  border: 1px solid var(--glass-border);
  background: var(--bg-card); color: var(--text-main); font-size:15px;
}
.task-add input:focus { outline: none; border-color: var(--color-primary); }
.task-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.task-actions .task-half { flex: 1; padding: 10px; font-size: 13px; }
.task-section { margin-bottom: 18px; }
.task-sec-title {
  font-size:13px; font-weight: 700; letter-spacing: .06em; opacity: .75;
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.task-count { font-weight: 600; opacity: .6; }
.task-list { display: flex; flex-direction: column; gap: 6px; }


.task-row {
  display: flex; flex-direction: column; gap: 7px;
  padding: 10px 12px; border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--glass-border);
  
  transition: border-color .2s var(--ease-out), background-color .2s var(--ease-out);
}
.task-row.done { opacity: .55; }
.task-row.done .task-title { text-decoration: line-through; }
.task-row.hermes { border-left: 3px solid var(--color-primary); }
.task-main { display: flex; align-items: center; gap: 10px; min-width: 0; }

.task-tick {
  width: 18px; height: 18px; flex: 0 0 auto;
  accent-color: var(--color-primary); cursor: pointer;
  border-radius: 4px; transition: transform .12s var(--ease-out);
}
.task-tick:hover { transform: scale(1.08); }
.task-tick:active { transform: scale(.94); }
.task-tick:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.task-title { flex: 1; min-width: 0; font-size:15px; line-height: 1.4; word-break: break-word; }


.task-badge {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.task-badge.st-pending { color: var(--text-dim); background: transparent; border-color: var(--glass-border); }
.task-badge.st-running {
  color: var(--primary-ink); background: var(--sel-tint); border-color: transparent;
  animation: taskBreathe 1.8s ease-in-out infinite;
}
.task-badge.st-done { color: var(--color-up); background: transparent; border-color: var(--color-up); }
.task-badge.st-failed { color: var(--color-down); background: transparent; border-color: var(--color-down); }
@keyframes taskBreathe {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}


.task-files { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 28px; }
.task-file {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 100%; padding: 4px 9px;
  border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-dim);
  font-size:13px; text-decoration: none; cursor: pointer;
  transition: border-color .2s var(--ease-out), color .2s var(--ease-out);
}
.task-file:hover { border-color: var(--color-primary); color: var(--primary-ink); }
.task-file.out { border-style: solid; }
.task-file.out:hover { border-color: var(--color-up); color: var(--color-up); }
.task-file-ic { flex: 0 0 auto; }
.task-file-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-file-sz { flex: 0 0 auto; color: var(--text-faint); font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 11px; }


.task-result {
  display: flex; flex-direction: column; gap: 6px;
  padding-left: 28px; font-size: 13px;
}
.task-result-txt {
  white-space: pre-wrap; word-break: break-word;
  color: var(--text-dim); line-height: 1.5;
}
.task-result .task-files { padding-left: 0; }

.task-del {
  flex: 0 0 auto; width: 26px; height: 26px; border: none;
  border-radius: var(--radius-sm); cursor: pointer;
  background: transparent; color: var(--text-faint); font-size: 13px; line-height: 1;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out);
}
.task-del:hover { background: transparent; color: var(--color-down); }
.task-empty { font-size: 13px; opacity: .5; padding: 6px 2px; }

.task-hermes-btn {
  background: transparent !important;
  border: 1px solid var(--color-primary) !important;
  color: var(--primary-ink) !important;
}


.agent-bar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; padding: 7px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size:13px; line-height: 1.4;
}
.agent-bar-dot {
  flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
}
.agent-bar-text { flex: 1; min-width: 0; word-break: break-word; }
.agent-bar-time {
  flex: 0 0 auto; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 11px;
  opacity: .75; white-space: nowrap;
}
.agent-bar.busy {
  color: var(--primary-ink);
  background: var(--sel-tint);
}
.agent-bar.busy .agent-bar-dot { animation: taskBreathe 1.8s ease-in-out infinite; }
.agent-bar.wait { color: var(--text-faint); border-color: var(--glass-border); }
.agent-bar.wait .agent-bar-dot { opacity: .45; }
.agent-bar.error {
  color: var(--color-down);
  border-color: var(--color-down);
}
.agent-bar.error .agent-bar-dot { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .agent-bar.busy .agent-bar-dot { animation: none; }
}


.task-up.done .task-up-nm { color: var(--text-faint); }
.task-up.done .task-up-bar { opacity: .4; }
.task-up.done .task-up-pc { color: var(--color-up); font-weight: 600; }


.task-clear-files {
  flex: 0 0 auto; width: 22px; height: 22px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: var(--radius-control);
  background: transparent; color: var(--text-faint);
  font-size:13px; line-height: 1; cursor: pointer;
  transition: color .12s, background .12s, border-color .12s;
}
.task-clear-files:hover {
  color: var(--color-down);
  border-color: var(--color-down);
  background: var(--color-down-soft);
}
.task-clear-files:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }


.task-uploads { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.task-up { display: flex; align-items: center; gap: 8px; font-size:13px; }
.task-up-nm {
  flex: 0 1 130px; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim);
}
.task-up-bar {
  flex: 1; min-width: 40px; height: 5px; border-radius: 3px;
  background: var(--hairline); overflow: hidden;
}
.task-up-fill {
  display: block; height: 100%; width: 100%; transform-origin: left center; transform: scaleX(0);
  background: var(--color-primary);
      transition: transform .15s linear;
    }
.task-up.queued .task-up-fill { background: var(--text-faint); }
.task-up-pc { flex: 0 0 auto; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 11px; color: var(--text-faint); }


@media (prefers-reduced-motion: reduce) {
  .task-badge.st-running, .task-add-icon, .task-tick { animation: none; }
  .task-up-fill { transition: none; }
}


.task-actions { container-type: inline-size; }
@container (max-width: 400px) {
  .task-actions #task-hermes-btn { flex: 1 1 100%; }
  .task-actions .task-half:not(#task-hermes-btn) { flex: 1 1 30%; }
}
