:root {
  --bg: #f3efe6;
  --bg-deep: #e2d8c7;
  --panel: rgba(255, 251, 244, 0.86);
  --panel-strong: rgba(252, 247, 239, 0.96);
  --text: #1d1b18;
  --muted: #6d665d;
  --line: rgba(52, 40, 24, 0.12);
  --primary: #b4472a;
  --primary-soft: #f0b88d;
  --danger: #8d2f1f;
  --success: #1d6d50;
  --warning: #8d631f;
  --shadow: 0 18px 50px rgba(65, 42, 14, 0.13);
  --radius: 24px;
  --font: "Segoe UI Variable", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 195, 132, 0.5), transparent 30%),
    radial-gradient(circle at right center, rgba(176, 79, 52, 0.18), transparent 28%),
    linear-gradient(145deg, var(--bg), var(--bg-deep));
  color: var(--text);
  font-family: var(--font);
}

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

.background-glow-left {
  top: -100px;
  left: -80px;
  background: rgba(255, 182, 114, 0.52);
}

.background-glow-right {
  bottom: -120px;
  right: -80px;
  background: rgba(188, 77, 44, 0.26);
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  position: relative;
}

.hero,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 24px;
  padding: 28px;
  margin-bottom: 22px;
  background:
    linear-gradient(135deg, rgba(255, 250, 244, 0.92), rgba(251, 241, 226, 0.76)),
    var(--panel);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.02;
}

.hero-text {
  margin: 12px 0 0;
  max-width: 640px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}

.action {
  border: 0;
  border-radius: 18px;
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
}

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

.action:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.action-primary {
  color: #fffaf5;
  background: linear-gradient(135deg, #cf5f35, var(--primary));
  box-shadow: 0 16px 30px rgba(180, 71, 42, 0.24);
}

.action-secondary {
  color: #3f3428;
  background: linear-gradient(135deg, #f3dcc1, #e7c79f);
  box-shadow: 0 14px 26px rgba(130, 86, 42, 0.14);
}

.action-danger {
  color: #fff8f5;
  background: linear-gradient(135deg, #9e4131, var(--danger));
  box-shadow: 0 16px 30px rgba(141, 47, 31, 0.22);
}

.status-grid,
.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.panel {
  padding: 22px;
}

.panel-highlight {
  background:
    linear-gradient(120deg, rgba(255, 242, 228, 0.98), rgba(255, 248, 241, 0.9)),
    var(--panel-strong);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  font-weight: 700;
}

.subtle {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.metric {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.status-message {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.badge-small {
  min-width: 0;
  padding: 6px 10px;
  font-size: 12px;
}

.badge-idle {
  color: #6a645a;
  background: rgba(106, 100, 90, 0.14);
}

.badge-queued,
.badge-starting {
  color: #6f4f1f;
  background: rgba(182, 141, 58, 0.18);
}

.badge-running {
  color: #92401f;
  background: rgba(207, 95, 53, 0.18);
}

.badge-waiting_login,
.badge-cancelling {
  color: #7b4f18;
  background: rgba(234, 182, 87, 0.2);
}

.badge-success {
  color: #19523d;
  background: rgba(29, 109, 80, 0.16);
}

.badge-failed,
.badge-cancelled {
  color: #6d2317;
  background: rgba(157, 55, 37, 0.15);
}

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

.facts div {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
}

.facts dt {
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.log-output {
  min-height: 360px;
  max-height: 520px;
  margin: 0;
  overflow: auto;
  padding: 16px;
  border-radius: 18px;
  background: #201d1a;
  color: #f4eee2;
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.7;
}

.list-block,
.history-grid {
  display: grid;
  gap: 12px;
}

.queue-item,
.history-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.48);
}

.queue-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.queue-meta,
.history-top,
.history-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

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

.history-card {
  padding: 14px 16px;
}

.history-message {
  margin: 14px 0 18px;
  line-height: 1.6;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  color: var(--muted);
  border: 1px dashed rgba(52, 40, 24, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 920px) {
  .hero,
  .status-grid,
  .content-grid,
  .history-grid,
  .facts {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: row;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 18px 14px 30px;
  }

  .hero,
  .panel {
    padding: 18px;
    border-radius: 20px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .queue-item,
  .history-top,
  .history-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}
