:root {
  --bg: #f5efe6;
  --bg-alt: #e3f0ee;
  --ink: #1c2b36;
  --muted: #5b6772;
  --accent: #0f766e;
  --accent-strong: #0b534f;
  --accent-soft: #d4efe9;
  --sun: #f0b45c;
  --panel: #ffffff;
  --panel-warm: #fbf7f0;
  --border: #d7cdc0;
  --shadow: 0 14px 30px rgba(28, 43, 54, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Noto Sans", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg), var(--bg-alt));
  min-height: 100vh;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 20%, rgba(240, 180, 92, 0.26), transparent 55%),
    radial-gradient(circle at 85% 10%, rgba(15, 118, 110, 0.2), transparent 55%),
    radial-gradient(circle at 70% 80%, rgba(15, 118, 110, 0.12), transparent 60%);
}

.hero {
  max-width: 1200px;
  margin: 48px auto 24px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 12px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 3vw, 3.3rem);
}

.subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 560px;
}

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

.grid {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.card-head h2 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.card-head p {
  margin: 0;
  color: var(--muted);
}

.span-2 {
  grid-column: span 2;
}

.form-grid {
  display: grid;
  gap: 12px 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

input,
textarea,
select {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: "Space Grotesk", "Noto Sans", sans-serif;
  background: var(--panel-warm);
}

textarea {
  resize: vertical;
}

.toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}

.toggle input {
  width: 18px;
  height: 18px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: "Space Grotesk", "Noto Sans", sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button-row button,
.button-row .link-button {
  min-height: 44px;
  min-width: 120px;
  justify-content: center;
  white-space: nowrap;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(28, 43, 54, 0.12);
}

button.action {
  background: var(--accent);
  color: #fff;
}

button.ghost,
.link-button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
}

.link-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
}

.progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.2s ease;
}

.progress-bar.indeterminate {
  width: 40%;
  animation: progress-slide 1.2s ease-in-out infinite;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.response {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 0.8rem;
  overflow-x: auto;
}

.split {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.search-results {
  display: grid;
  gap: 10px;
}

.search-item {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel-warm);
  cursor: pointer;
}

.search-item strong {
  display: block;
}

.search-item span {
  font-size: 0.8rem;
  color: var(--muted);
}

.search-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.meta-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.meta-block {
  padding: 10px 12px;
  background: var(--panel-warm);
  border-radius: 14px;
  border: 1px solid var(--border);
}

.meta-block span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.meta-block strong {
  font-size: 0.95rem;
}

.summary {
  background: linear-gradient(140deg, rgba(240, 180, 92, 0.2), rgba(15, 118, 110, 0.12));
  border-radius: 16px;
  padding: 14px 16px;
}

.summary h3 {
  margin: 0 0 8px;
}

.pipeline-meta {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.pipeline-meta span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.pipeline-meta strong {
  font-size: 0.95rem;
}

.pipeline-list {
  display: grid;
  gap: 12px;
  max-height: 360px;
  overflow: auto;
}

.pipeline-empty {
  font-size: 0.85rem;
  color: var(--muted);
}

.pipeline-step {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: var(--panel-warm);
}

.pipeline-step.ok {
  border-color: rgba(15, 118, 110, 0.4);
}

.pipeline-step.failed {
  border-color: #dc2626;
}

.pipeline-step.skipped,
.pipeline-step.disabled,
.pipeline-step.unavailable {
  border-color: #d9a441;
  background: #fff7e6;
}

.pipeline-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
}

.pipeline-head span {
  color: var(--muted);
  font-size: 0.8rem;
}

.pipeline-output {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 0.78rem;
  overflow-x: auto;
}

.text-view {
  min-height: 200px;
  max-height: 320px;
  overflow: auto;
  padding: 14px 16px;
  border-radius: 16px;
  background: #0b1926;
  color: #e2e8f0;
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 0.82rem;
  white-space: pre-wrap;
}

.text-status {
  font-size: 0.82rem;
  color: var(--muted);
}

.log-stream {
  display: grid;
  gap: 12px;
  max-height: 320px;
  overflow: auto;
}

.log-entry {
  background: #0b1926;
  color: #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.footer {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}

@keyframes progress-slide {
  0% { transform: translateX(-80%); }
  50% { transform: translateX(120%); }
  100% { transform: translateX(220%); }
}

@media (max-width: 900px) {
  .span-2 {
    grid-column: span 1;
  }

  .footer {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 640px) {
  .button-row button,
  .button-row .link-button {
    min-width: 0;
    width: 100%;
  }
}
