:root {
  color-scheme: dark;
  font-family: Inter, "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101214;
  color: #eef2f0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(153, 255, 43, 0.08), transparent 280px),
    #101214;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.topbar,
.control,
.metrics,
.grid {
  display: grid;
  gap: 16px;
}

.topbar {
  grid-template-columns: 1fr auto;
  align-items: end;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #9cff2e;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 30px;
}

h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

.auth {
  display: flex;
  gap: 8px;
}

input {
  width: 230px;
  border: 1px solid #30363d;
  border-radius: 6px;
  background: #15191d;
  color: #eef2f0;
  padding: 10px 12px;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 10px 16px;
  background: #2c3238;
  color: #eef2f0;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.1);
}

.control {
  grid-template-columns: auto auto repeat(3, minmax(120px, auto));
  align-items: center;
  justify-content: start;
  margin: 20px 0;
}

.start {
  background: #9cff2e;
  color: #101214;
  font-weight: 700;
}

.stop {
  background: #ff5d5d;
  color: #101214;
  font-weight: 700;
}

.status-pill {
  min-height: 40px;
  display: grid;
  align-items: center;
  border: 1px solid #2d3538;
  border-radius: 6px;
  padding: 0 12px;
  color: #c8d2cf;
  background: #15191d;
}

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

.metrics div,
article {
  border: 1px solid #293136;
  border-radius: 8px;
  background: #15191d;
}

.metrics div {
  padding: 18px;
}

.metrics span {
  display: block;
  margin-bottom: 8px;
  color: #98a39f;
  font-size: 13px;
}

.metrics strong {
  font-size: 22px;
}

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

article {
  padding: 18px;
  min-width: 0;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid #273036;
  text-align: left;
  white-space: nowrap;
}

th {
  color: #9cff2e;
  font-weight: 600;
}

pre,
.log {
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  margin: 0;
  font-size: 13px;
  color: #dce5e2;
  white-space: pre-wrap;
}

.log-row {
  padding: 9px 0;
  border-bottom: 1px solid #273036;
}

.muted {
  color: #98a39f;
}

@media (max-width: 820px) {
  .topbar,
  .metrics,
  .grid {
    grid-template-columns: 1fr;
  }

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

  .auth {
    width: 100%;
  }

  input {
    width: 100%;
  }
}
