:root {
  color-scheme: light;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #18202a;
  --muted: #66717f;
  --line: #d9dee6;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --danger: #b42318;
  --danger-bg: #fff0ee;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 650;
}

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

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

button.ghost {
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
}

button.ghost:hover {
  background: #eef2f6;
}

button.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

button.danger:hover {
  background: #ffe0dc;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: white;
  color: var(--text);
}

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

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

.topbar,
.panelHeader,
.session,
.inlineForm,
.switchRow {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.15;
}

h2 {
  font-size: 20px;
  line-height: 1.25;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.session {
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

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

.narrow {
  width: min(420px, 100%);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: 20px;
}

.panelHeader {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

.inlineForm {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 0.8fr) auto;
  gap: 12px;
  margin-bottom: 18px;
}

.switchRow {
  grid-template-columns: auto 1fr;
  gap: 10px;
  color: var(--text);
}

.switchRow input {
  width: 18px;
  min-height: 18px;
}

.tableWrap {
  overflow-x: auto;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 8px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

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

td:last-child,
th:last-child {
  text-align: right;
}

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

.status {
  min-height: 22px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

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

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .shell {
    width: min(100vw - 24px, 640px);
    padding: 20px 0;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .session {
    justify-content: space-between;
    width: 100%;
  }

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