:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #1c2430;
  --muted: #647084;
  --line: #d9dee7;
  --accent: #185ddc;
  --accent-dark: #1248ad;
  --success: #16794c;
  --warn: #a46000;
  --error: #b42318;
  --info: #2457a6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

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

a:hover {
  text-decoration: underline;
}

.topbar {
  align-items: center;
  background: #111827;
  color: #fff;
  display: flex;
  gap: 18px;
  min-height: 56px;
  padding: 0 24px;
}

.brand {
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.nav {
  display: flex;
  flex: 1;
  gap: 14px;
  min-width: 0;
}

.nav a {
  color: #d8dfeb;
}

.page {
  margin: 0 auto;
  max-width: 1280px;
  padding: 24px;
}

.page-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

h1 {
  font-size: 28px;
}

h2 {
  font-size: 17px;
}

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

.panel,
.auth-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 18px;
}

.auth-panel {
  margin: 80px auto;
  max-width: 420px;
}

.panel-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

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

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

.stack {
  display: grid;
  gap: 14px;
}

label {
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input,
select,
textarea,
button {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
}

input,
select,
textarea {
  background: #fff;
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.code-area,
code {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
}

button {
  background: #fff;
  cursor: pointer;
  min-height: 34px;
  padding: 7px 12px;
}

button:hover {
  border-color: var(--accent);
}

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

.primary:hover {
  background: var(--accent-dark);
}

.icon-button {
  background: #1f2937;
  border-color: #344054;
  color: #fff;
  min-width: 38px;
}

.check-row {
  align-content: center;
  align-items: center;
  color: var(--text);
  display: flex;
  gap: 8px;
}

.check-row input {
  min-height: auto;
  width: auto;
}

.actions,
.inline-filter,
.run-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.standalone-action {
  margin-top: 16px;
}

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

table {
  border-collapse: collapse;
  width: 100%;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.truncate {
  max-width: 460px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status,
.level {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
}

.status-succeeded,
.level-INFO {
  background: #e9f7ef;
  color: var(--success);
}

.status-running,
.status-queued,
.level-WARN {
  background: #fff4df;
  color: var(--warn);
}

.status-failed,
.status-blocked,
.status-site_down,
.level-ERROR {
  background: #fdecec;
  color: var(--error);
}

.status-skipped {
  background: #eef2f7;
  color: var(--muted);
}

.alert {
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 10px 12px;
}

.alert.success {
  background: #e9f7ef;
  color: var(--success);
}

.alert.error {
  background: #fdecec;
  color: var(--error);
}

.log-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.log-list li {
  display: grid;
  gap: 2px;
}

.log-meta {
  color: var(--muted);
  font-size: 12px;
}

.profile-list {
  display: grid;
  gap: 14px;
}

.edit-row,
.proxy-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.edit-row {
  grid-template-columns: 1.2fr 140px 1.4fr 1.2fr 1fr auto;
}

.compact {
  padding: 12px 18px;
}

@media (max-width: 900px) {
  .topbar,
  .page-header,
  .grid-two,
  .form-grid,
  .edit-row {
    display: grid;
  }

  .grid-two,
  .form-grid,
  .edit-row {
    grid-template-columns: 1fr;
  }

  .nav {
    flex-wrap: wrap;
  }
}

