:root {
  --bg: #081613;
  --bg-strong: #050d0b;
  --card: rgba(13, 34, 29, 0.84);
  --card-border: rgba(93, 207, 171, 0.18);
  --text: #effbf5;
  --muted: #9fc7bb;
  --accent: #37d39d;
  --accent-strong: #18a775;
  --danger: #ff7e73;
  --warning: #ffcb70;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --radius: 24px;
  --radius-sm: 16px;
  --font-display: "Bahnschrift", "Segoe UI Variable Display", "Trebuchet MS", sans-serif;
  --font-body: "Aptos", "Segoe UI Variable Text", "Verdana", sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(34, 163, 127, 0.25), transparent 32%),
    radial-gradient(circle at bottom right, rgba(255, 203, 112, 0.12), transparent 20%),
    linear-gradient(160deg, #05110e 0%, #081613 55%, #040908 100%);
  color: var(--text);
  font-family: var(--font-body);
}

body {
  position: relative;
  overflow-x: hidden;
}

.background-glow {
  position: fixed;
  width: 36rem;
  height: 36rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  pointer-events: none;
}

.background-glow-a {
  top: -8rem;
  left: -10rem;
  background: #1fbd8a;
}

.background-glow-b {
  right: -10rem;
  bottom: -12rem;
  background: #0f7fce;
}

.layout {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 72px;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  padding: 32px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.hero h1,
.panel h2,
.stat strong,
#detailTitle {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.98;
  max-width: 15ch;
}

.subtitle {
  margin: 0;
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
}

.hero-badges {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 220px;
}

.badge {
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(55, 211, 157, 0.14);
  border: 1px solid rgba(55, 211, 157, 0.24);
  color: var(--text);
  font-size: 0.92rem;
}

.badge-outline {
  background: transparent;
}

.stats-grid,
.grid-two {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat span {
  color: var(--muted);
  font-size: 0.92rem;
}

.stat strong {
  font-size: clamp(1.9rem, 3vw, 2.8rem);
}

.panel {
  padding: 24px;
}

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

.panel h2 {
  margin: 0;
  font-size: 1.45rem;
}

form,
label {
  display: block;
}

label {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  margin-top: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 11, 9, 0.7);
  color: var(--text);
  padding: 14px 16px;
  outline: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

input:focus,
textarea:focus {
  border-color: rgba(55, 211, 157, 0.55);
  transform: translateY(-1px);
}

textarea {
  resize: vertical;
}

.inline-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.panel-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 18px;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), #25b8ff);
  color: #04231a;
  font-weight: 700;
}

.button-secondary,
.button-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.button-inline {
  padding: 8px 12px;
  font-size: 0.88rem;
  margin-right: 8px;
  margin-bottom: 8px;
}

.button-danger {
  background: rgba(255, 126, 115, 0.14);
  color: var(--danger);
}

.hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.table-shell {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  text-transform: capitalize;
  background: rgba(255, 255, 255, 0.06);
}

.status-running {
  color: var(--accent);
}

.status-completed {
  color: #87f8cd;
}

.status-failed {
  color: var(--danger);
}

.status-paused,
.status-draft {
  color: var(--warning);
}

.detail-empty {
  color: var(--muted);
}

.detail-grid {
  display: grid;
  gap: 18px;
}

.detail-grid p {
  margin: 0 0 8px;
}

.message-list {
  display: grid;
  gap: 12px;
}

.message-card {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.message-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  font-size: 0.88rem;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  min-width: 280px;
  max-width: 420px;
  background: rgba(5, 19, 15, 0.95);
  color: var(--text);
  border: 1px solid rgba(55, 211, 157, 0.3);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.hidden {
  display: none;
}

code {
  font-family: "Cascadia Code", "Consolas", monospace;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 8px;
}

@media (max-width: 980px) {
  .stats-grid,
  .grid-two,
  .inline-fields {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
  }

  .hero-badges {
    min-width: 0;
    width: 100%;
  }
}
