.log-summary {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}
#log-list th, #log-list td { text-align: center; vertical-align: middle; }
.log-stage { --stage-color: #0284c7; display: inline-flex; width: 300px; max-width: 100%; flex-shrink: 0; flex-direction: column; gap: 7px; vertical-align: middle; }
.log-stage.success { --stage-color: #0d9488; }
.log-stage.failed { --stage-color: #c65b5b; }
.log-stage .log-stage-head { display: flex; align-items: center; gap: 7px; min-width: 0; line-height: 18px; }
.log-stage .log-stage-status { flex-shrink: 0; padding: 1px 5px; border-radius: 3px; background: #f0f9ff; color: #0369a1; font-size: 11px; font-weight: 500; }
.log-stage.success .log-stage-status { background: #f0fdfa; color: #0f766e; }
.log-stage.failed .log-stage-status { background: #fef2f2; color: #b94747; }
.log-stage .log-stage-label { flex: 1; min-width: 0; overflow: hidden; color: #57534e; font-size: 12px; font-weight: 500; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.log-stage .log-stage-code, .log-stage .log-stage-time { flex-shrink: 0; color: #78716c; font-size: 11px; white-space: nowrap; }
.log-stage .log-stage-track { display: block; height: 6px; border-radius: 3px; background: var(--stage-color); }
.log-stage.running .log-stage-track { animation: log-stage-pulse 1.6s ease-in-out infinite; }
.log-detail-meta > div > .log-stage { flex-shrink: 1; min-width: 0; }
@keyframes log-stage-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  .log-stage.running .log-stage-track { animation: none; }
}
.system-log-message {
  min-width: 280px;
  max-width: 720px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.account-detail .log-summary {
  max-width: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.log-detail-json-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 10px;
}
.app-dialog-details .swal2-html-container.log-task-detail {
  height: min(600px, calc(100dvh - 160px));
  padding-top: 0;
}
.log-detail-tabs {
  position: sticky;
  top: 0;
  z-index: 1;
  flex: none;
  margin-bottom: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #e7e5e4;
  background: #fff;
  scrollbar-width: thin;
}
.log-detail-tabs button { flex-shrink: 0; }
.log-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
}
.log-detail-meta div {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f5f5f4;
  font-size: 13px;
}
.log-detail-meta span { color: #a8a29e; }
.log-detail-meta strong { overflow-wrap: anywhere; text-align: right; }
.log-timing-head,
.log-timing-head > div,
.timing-step > div:first-child {
  display: flex;
  align-items: center;
}
.log-timing-head { justify-content: space-between; gap: 14px; }
.log-timing-head h3 { margin: 0; font-size: 14px; }
.log-timing-head > div { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.log-timing-head span {
  padding: 4px 8px;
  border: 1px solid #e7e5e4;
  border-radius: 4px;
  background: #fafaf9;
  font: 600 12px monospace;
}
.log-timing-head .openai-time { border-color: #bae6fd; background: #f0f9ff; color: #0369a1; }
.timeline-bar {
  display: flex;
  height: 12px;
  margin: 16px 0 10px;
  overflow: hidden;
  border-radius: 6px;
  background: #f5f5f4;
}
.timeline-bar i { min-width: 1px; height: 100%; }
.timing-steps { display: grid; gap: 12px; }
.timing-step > div:first-child { justify-content: space-between; gap: 12px; font-size: 13px; }
.timing-step > div:first-child span { color: #78716c; font-family: monospace; }
.timing-progress { height: 7px; margin-top: 6px; overflow: hidden; border-radius: 4px; background: #f5f5f4; }
.timing-progress i { display: block; height: 100%; border-radius: inherit; }
.timing-step small { display: block; margin-top: 5px; color: #78716c; }
.timing-step .timing-error { color: #dc2626; }
.log-detail-content pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.registration-failure-image { display: block; width: 100%; height: auto; margin: 12px 0; }
.registration-failure-detail > *, #registration-capture-panel > * { margin-bottom: 12px; }

@media (max-width: 520px) {
  .log-detail-meta { grid-template-columns: 1fr; }
  .log-timing-head { align-items: flex-start; flex-direction: column; }
  .log-timing-head > div { justify-content: flex-start; }
}
