:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --panel: #ffffff;
  --ink: #182026;
  --muted: #64717b;
  --line: #dce2e7;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --warn: #a16207;
  --danger: #b42318;
  --good: #047857;
  --shadow: 0 12px 30px rgba(25, 35, 45, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: var(--accent);
}

.shell {
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand strong {
  font-size: 17px;
}

.brand span,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.content {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 360px) 1fr;
  padding: 22px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel-header {
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
}

.panel-header h1,
.panel-header h2 {
  font-size: 18px;
  line-height: 1.25;
  margin: 0;
}

.panel-body {
  padding: 18px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.row {
  display: grid;
  gap: 7px;
}

label {
  color: #26323a;
  font-size: 13px;
  font-weight: 650;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  background: #fff;
  border: 1px solid #cfd7de;
  border-radius: 6px;
  color: var(--ink);
  height: 38px;
  padding: 8px 10px;
  width: 100%;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
  outline: none;
}

.split {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.button-row {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 4px;
}

button,
.button {
  align-items: center;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent-ink);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  gap: 8px;
  height: 38px;
  justify-content: center;
  padding: 0 14px;
  text-decoration: none;
  white-space: nowrap;
}

button.secondary,
.button.secondary {
  background: #fff;
  border-color: #cfd7de;
  color: var(--ink);
}

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

.status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  padding: 6px 9px;
}

.status.ready,
.status.completed {
  background: #dcfce7;
  color: var(--good);
}

.status.running,
.status.created {
  background: #e0f2fe;
  color: #0369a1;
}

.status.demo {
  background: #fef3c7;
  color: var(--warn);
}

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

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

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.metric span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.metric strong {
  display: block;
  font-size: 22px;
  margin-top: 4px;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

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

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

th {
  background: #eef3f5;
  color: #26323a;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
}

td.num,
th.num {
  text-align: right;
}

.login {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}

.login .panel {
  max-width: 420px;
  width: 100%;
}

.error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 6px;
  color: #9f1239;
  margin-bottom: 12px;
  padding: 10px;
}

@media (max-width: 980px) {
  .content {
    grid-template-columns: 1fr;
  }

  .summary {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar,
  .content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .split,
  .summary {
    grid-template-columns: 1fr;
  }

  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  button,
  .button {
    width: 100%;
  }
}
