:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f4f6fa;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(93, 95, 239, 0.12), transparent 34rem),
    #f4f6fa;
}

button, input { font: inherit; }

.container {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 28px;
}

header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 8px;
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 6px;
  font-size: 20px;
}

.subtitle, .section-title p, .hint, footer {
  color: #69738a;
}

.eyebrow {
  margin-bottom: 8px;
  color: #5d5fef;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card {
  padding: 24px;
  margin-bottom: 18px;
  border: 1px solid #e2e6ef;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 40px rgba(40, 51, 78, 0.07);
}

.access-card {
  padding-top: 18px;
  padding-bottom: 18px;
}

.access-card label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.access-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cfd5e2;
  border-radius: 11px;
  outline: none;
}

input:focus {
  border-color: #5d5fef;
  box-shadow: 0 0 0 3px rgba(93, 95, 239, 0.12);
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

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

button {
  border: 1px solid #d4d9e4;
  border-radius: 11px;
  padding: 11px 15px;
  background: #fff;
  color: #26324a;
  cursor: pointer;
  font-weight: 700;
  transition: transform 120ms ease, opacity 120ms ease, border-color 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: #aab2c2;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

button.primary {
  border-color: #5d5fef;
  background: #5d5fef;
  color: #fff;
}

button.secondary {
  background: #f7f8fb;
}

.badge {
  padding: 9px 13px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.badge.neutral { background: #e9edf4; color: #586279; }
.badge.running { background: #e9e9ff; color: #484ad6; }
.badge.success { background: #dff7e7; color: #15723b; }
.badge.failure { background: #ffe3e3; color: #a42626; }
.badge.queued { background: #fff1cc; color: #895c00; }

.message {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #eef0ff;
  color: #3f43bd;
}

.message.error {
  background: #ffe8e8;
  color: #9b2525;
}

.hidden { display: none; }

.progress-track {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf4;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5d5fef, #8b5cf6);
  transition: width 350ms ease;
}

.progress-text {
  margin: 8px 0 18px;
  color: #69738a;
  font-size: 13px;
}

.steps {
  display: grid;
  gap: 9px;
}

.step {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e5e8f0;
  border-radius: 10px;
}

.step-icon {
  width: 22px;
  text-align: center;
}

.step-status {
  color: #69738a;
  font-size: 12px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.stat {
  padding: 14px;
  border-radius: 12px;
  background: #f7f8fb;
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

details {
  margin-top: 12px;
  border: 1px solid #e3e7ef;
  border-radius: 12px;
  padding: 12px 14px;
}

summary {
  cursor: pointer;
  font-weight: 750;
}

pre {
  max-height: 520px;
  overflow: auto;
  margin: 14px 0 0;
  padding: 14px;
  border-radius: 10px;
  background: #111827;
  color: #e5e7eb;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.55;
}

footer {
  padding: 8px 4px 24px;
  text-align: center;
  font-size: 13px;
}

@media (max-width: 720px) {
  header, .section-title {
    flex-direction: column;
  }

  .access-row {
    grid-template-columns: 1fr;
  }

  .actions button {
    width: 100%;
  }
}
