.task-panel-page-stack {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.task-panel-page {
  flex: 1;
  min-height: 0;
  padding: 22px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--ui-color-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 251, 0.96));
  box-shadow: var(--ui-shadow-panel);
}

.task-panel-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  height: 100%;
  padding: 0;
}

.task-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.task-panel-title-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.task-panel-title-group h1 {
  margin: 0;
  color: #1d344f;
  font-size: 28px;
  line-height: 1.2;
}

.task-panel-title-group p {
  margin: 0;
  color: #61758f;
  font-size: 14px;
  line-height: 1.6;
}

.task-panel-date-field {
  display: grid;
  gap: 6px;
  flex: 0 0 auto;
  color: #53637f;
  font-size: 12px;
  font-weight: 700;
}

.task-panel-date-field input {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid #d8e1ef;
  background: #ffffff;
  color: #1f2f49;
  font: inherit;
  font-size: 13px;
}

.task-panel-scroll {
  min-height: 0;
  padding-right: 4px;
}

.task-panel-state {
  padding: 20px;
}

.task-panel-table {
  display: grid;
  gap: 10px;
}

.task-panel-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) minmax(220px, 1.15fr);
  gap: 16px;
  align-items: start;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(215, 216, 229, 0.96);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.04);
}

.task-panel-row-head {
  min-height: 44px;
  align-items: center;
  padding: 10px 16px;
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.78);
  color: #53637f;
  font-size: 12px;
  font-weight: 800;
}

.task-panel-expert-cell,
.task-panel-status {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.task-panel-expert-cell strong {
  color: #1c324d;
  font-size: 15px;
  line-height: 1.4;
}

.task-panel-expert-cell span,
.task-panel-status > span:not(.status-chip),
.task-panel-muted {
  color: #61758f;
  font-size: 13px;
  line-height: 1.6;
}

.task-panel-status .status-chip {
  width: fit-content;
  gap: 6px;
}

.task-panel-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.task-panel-status-dot-running {
  animation: task-status-pulse 1.2s ease-in-out infinite;
}

.task-panel-status-dot-failed {
  color: #b42318;
}

.task-panel-artifact-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-panel-artifact-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f8fbff;
  border: 1px solid #e3ebf5;
}

.task-panel-artifact-name {
  min-width: 0;
  color: #1f2f49;
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-panel-artifact-kind {
  flex: 0 0 auto;
  color: #60728c;
  font-size: 12px;
  font-weight: 700;
}

@keyframes task-status-pulse {
  0%, 100% { opacity: 0.42; }
  50% { opacity: 1; }
}

@media (max-width: 980px) {
  .task-panel-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .task-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .task-panel-date-field {
    width: 100%;
  }
}
