:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #1d2430;
  --muted: #647084;
  --line: #d8dde6;
  --accent: #216869;
  --accent-dark: #174c4d;
  --danger: #b42318;
  --warning: #9a6700;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 "Segoe UI", Arial, sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.brand {
  font-weight: 700;
  font-size: 17px;
}

.subtitle,
.muted,
.message {
  color: var(--muted);
}

nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

a,
button {
  font: inherit;
}

nav a,
button,
.button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  text-decoration: none;
}

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

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

button.danger {
  background: #fff;
  border-color: #f2b8b5;
  color: var(--danger);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 24px auto 56px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
}

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

.panel h1,
.panel h2,
.panel h3 {
  margin: 0 0 12px;
  line-height: 1.2;
}

.panel h1 {
  font-size: 22px;
}

.panel h2 {
  font-size: 17px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

label {
  display: grid;
  gap: 5px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  min-height: 36px;
  padding: 8px 10px;
}

textarea {
  min-height: 240px;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.checkbox-row {
  align-items: center;
  display: flex;
  gap: 8px;
  font-weight: 500;
}

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

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

.login-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  width: min(420px, 100%);
}

.login-panel h1 {
  font-size: 24px;
  margin: 8px 0 18px;
}

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

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

th {
  color: var(--muted);
  font-weight: 600;
}

.pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  padding: 3px 8px;
  background: #eef6f6;
  color: var(--accent-dark);
}

.pill.warning {
  background: #fff4d6;
  color: var(--warning);
}

.pill.danger {
  background: #fde8e7;
  color: var(--danger);
}

.json-output {
  white-space: pre-wrap;
}

@media (max-width: 840px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }
}


.admin-notice {
  align-items: center;
  background: #eef6f6;
  border: 1px solid #b7dcda;
  border-radius: 8px;
  color: var(--text);
  display: flex;
  gap: 14px;
  margin-top: 12px;
  padding: 12px;
  flex-wrap: wrap;
}

.admin-notice p {
  margin: 3px 0;
}

.admin-notice code {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-block;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  padding: 6px 8px;
}

.credential-notice {
  justify-content: space-between;
}
