:root {
  color-scheme: light;
  --bg: #f4f6f5;
  --panel: #ffffff;
  --line: #d9e2df;
  --text: #17211e;
  --muted: #5b6864;
  --accent: #126656;
  --accent-soft: #e8f2ee;
  --danger: #9b3428;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.topbar a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 5px;
  font-size: 28px;
  line-height: 1.2;
}

button,
.actions a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

#runNow {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

main {
  padding: 20px 30px 42px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.status-grid div,
aside,
.detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.status-grid div {
  min-height: 82px;
  padding: 14px;
}

.status-grid span,
.panel-title,
#detailMeta {
  color: var(--muted);
  font-size: 13px;
}

.status-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
  line-height: 1.25;
}

.layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 16px;
}

aside {
  min-height: 620px;
  overflow: hidden;
}

.panel-title {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.run-list {
  max-height: 720px;
  overflow: auto;
}

.run-item {
  width: 100%;
  min-height: 72px;
  display: block;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
}

.run-item.active {
  background: var(--accent-soft);
}

.run-item b {
  display: block;
  font-size: 14px;
}

.run-item span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.detail {
  min-width: 0;
  padding: 18px;
}

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

h2 {
  margin-top: 4px;
  font-size: 22px;
}

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

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tabs button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.tab-content {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.5;
}

th {
  background: #eef4f1;
  font-weight: 850;
  white-space: nowrap;
}

td a {
  color: var(--accent);
  text-decoration: none;
}

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

.empty {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

@media (max-width: 980px) {
  .topbar,
  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .status-grid,
  .layout {
    grid-template-columns: 1fr;
  }

  aside {
    min-height: 0;
  }
}
