/* 이미지 번역 (1장씩 / 일괄) 애니메이션 프로그레스 바 + 경과 시간 + 완료 예정 타임 (라이트/다크 모드) */
.itp-card {
  margin: 12px 0 16px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid #c7d2fe;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.08);
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.itp-card.is-complete {
  border-color: #a7f3d0;
  background: linear-gradient(135deg, #ecfdf5 0%, #f8fafc 100%);
}
.itp-card.is-error {
  border-color: #fecaca;
  background: linear-gradient(135deg, #fef2f2 0%, #f8fafc 100%);
}

.itp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.itp-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 800;
  color: #1e1b4b;
}
.itp-card.is-complete .itp-title { color: #065f46; }
.itp-card.is-error .itp-title { color: #991b1b; }

.itp-pulse {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #4f46e5;
  box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.55);
  animation: itpPulse 1.35s infinite;
  flex-shrink: 0;
}
.itp-card.is-complete .itp-pulse {
  background: #059669;
  animation: none;
}
.itp-card.is-error .itp-pulse {
  background: #dc2626;
  animation: none;
}

@keyframes itpPulse {
  0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(79, 70, 229, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

.itp-metrics {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-variant-numeric: tabular-nums;
}
.itp-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #c7d2fe;
  font-size: 12px;
  color: #334155;
  font-weight: 700;
}
.itp-pill strong {
  color: #4338ca;
  font-weight: 900;
}
.itp-card.is-complete .itp-pill {
  border-color: #a7f3d0;
}
.itp-card.is-complete .itp-pill strong {
  color: #059669;
}
.itp-pct {
  font-size: 15px;
  font-weight: 900;
  color: #4f46e5;
  min-width: 42px;
  text-align: right;
}
.itp-card.is-complete .itp-pct { color: #059669; }
.itp-card.is-error .itp-pct { color: #dc2626; }

.itp-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.itp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4f46e5 0%, #6366f1 50%, #818cf8 100%);
  transition: width 0.25s ease;
  position: relative;
  overflow: hidden;
}
.itp-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.42) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: itpShimmer 1.4s infinite;
}
.itp-card.is-complete .itp-fill {
  background: linear-gradient(90deg, #059669 0%, #10b981 100%);
}
.itp-card.is-complete .itp-fill::after,
.itp-card.is-error .itp-fill::after {
  animation: none;
}
.itp-card.is-error .itp-fill {
  background: #dc2626;
}

@keyframes itpShimmer {
  100% { transform: translateX(100%); }
}

.itp-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 720px) {
  .itp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.itp-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #e2e8f0;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
}
.itp-step-num {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 10.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.itp-step.is-active {
  border-color: #818cf8;
  background: #ffffff;
  color: #312e81;
}
.itp-step.is-active .itp-step-num {
  background: #4f46e5;
  color: #ffffff;
}
.itp-step.is-done {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}
.itp-step.is-done .itp-step-num {
  background: #059669;
  color: #ffffff;
}

/* 다크 모드 */
[data-theme="dark"] .itp-card,
body.dark-mode .itp-card {
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.36) 0%, #0f172a 100%);
  border-color: #4338ca;
}
[data-theme="dark"] .itp-card.is-complete,
body.dark-mode .itp-card.is-complete {
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.34) 0%, #0f172a 100%);
  border-color: #059669;
}
[data-theme="dark"] .itp-title,
body.dark-mode .itp-title { color: #e0e7ff; }
[data-theme="dark"] .itp-card.is-complete .itp-title,
body.dark-mode .itp-card.is-complete .itp-title { color: #a7f3d0; }
[data-theme="dark"] .itp-pill,
body.dark-mode .itp-pill {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}
[data-theme="dark"] .itp-pill strong,
body.dark-mode .itp-pill strong { color: #a5b4fc; }
[data-theme="dark"] .itp-track,
body.dark-mode .itp-track { background: #1e293b; }
[data-theme="dark"] .itp-step,
body.dark-mode .itp-step {
  background: rgba(15, 23, 42, 0.72);
  border-color: #334155;
  color: #94a3b8;
}
[data-theme="dark"] .itp-step.is-active,
body.dark-mode .itp-step.is-active {
  background: #1e293b;
  border-color: #6366f1;
  color: #e0e7ff;
}
[data-theme="dark"] .itp-step.is-done,
body.dark-mode .itp-step.is-done {
  background: rgba(6, 78, 59, 0.45);
  border-color: #059669;
  color: #6ee7b7;
}
