:root {
  --bg: #f5f0e8;
  --panel: rgba(255, 252, 248, 0.92);
  --panel-strong: rgba(255, 248, 240, 0.98);
  --line: rgba(53, 41, 31, 0.14);
  --ink: #211b16;
  --muted: #66594d;
  --accent: #9e3d22;
  --accent-soft: #e9c7b2;
  --queued: #8f5c0d;
  --processing: #165a78;
  --completed: #27664a;
  --failed: #8a2d27;
  --shadow: 0 24px 60px rgba(66, 45, 20, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(233, 199, 178, 0.72), transparent 34%),
    radial-gradient(circle at bottom right, rgba(158, 61, 34, 0.16), transparent 30%),
    linear-gradient(180deg, #f9f4ee 0%, var(--bg) 100%);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

body {
  padding: 32px;
}

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

h1,
h2,
h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
}

code,
pre {
  font-family: "SFMono-Regular", "Menlo", monospace;
}

pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  border-radius: 16px;
  background: #1d1713;
  color: #f6eee5;
  font-size: 13px;
  line-height: 1.5;
}

.shell {
  max-width: 1480px;
  margin: 0 auto;
}

.topbar,
.docs-hero,
.split-panel,
.endpoint-heading,
.task-title,
.topbar-actions,
.lane-header,
.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-main {
  display: grid;
  gap: 18px;
}

.docs-layout,
.stack {
  display: grid;
  gap: 18px;
}

.rows {
  gap: 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.lane {
  min-height: 360px;
}

.tasks-panel,
.tasks-heading,
.task-list {
  display: grid;
  gap: 16px;
}

.tasks-heading,
.task-summary,
.task-actions,
.task-id-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-id-block {
  min-width: 0;
  justify-content: flex-start;
}

.task-id-block strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 13px;
}

.task-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.task-row-wide {
  padding: 18px;
}

.login-shell {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
}

.login-panel {
  width: min(100%, 420px);
  background: var(--panel-strong);
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.muted,
dt {
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  font: inherit;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.button-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #bf5b38 0%, var(--accent) 100%);
  color: #fff9f4;
}

.button-danger {
  border-color: rgba(138, 45, 39, 0.32);
  background: rgba(138, 45, 39, 0.1);
  color: var(--failed);
}

.notice {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
}

.notice-error {
  background: rgba(138, 45, 39, 0.1);
  color: var(--failed);
}

.task-row {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0;
}

.meta-grid-wide {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(53, 41, 31, 0.12);
}

.progress-fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  transition: width 180ms ease;
}

.status-fill-queued {
  background: var(--queued);
}

.status-fill-processing {
  background: var(--processing);
}

.status-fill-completed {
  background: var(--completed);
}

.status-fill-failed {
  background: var(--failed);
}

.meta-grid dt,
.meta-grid dd {
  margin: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-queued {
  background: rgba(143, 92, 13, 0.12);
  color: var(--queued);
}

.status-processing {
  background: rgba(22, 90, 120, 0.12);
  color: var(--processing);
}

.status-completed {
  background: rgba(39, 102, 74, 0.12);
  color: var(--completed);
}

.status-failed {
  background: rgba(138, 45, 39, 0.12);
  color: var(--failed);
}

.error-text {
  margin: 0;
  color: var(--failed);
  font-size: 14px;
}

.empty-state {
  min-height: 120px;
  display: grid;
  place-items: center;
}

.method {
  color: var(--accent);
}

@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meta-grid-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  body {
    padding: 18px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .split-panel,
  .endpoint-heading,
  .docs-hero,
  .topbar-actions,
  .task-title,
  .task-summary,
  .task-actions,
  .task-id-block,
  .tasks-heading,
  .lane-header,
  .key-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }
}
