* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: #f5f7f9;
	color: #1c2733;
	font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
	color: #175cd3;
	text-decoration: none;
}

.topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	padding: 14px 24px;
	background: #182230;
	color: white;
}

.topbar span {
	margin-left: 10px;
	color: #cbd5e1;
}

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

.nav a,
.nav button {
	color: white;
	background: transparent;
	border: 0;
	cursor: pointer;
	font: inherit;
	padding: 4px 0;
}

.page {
	padding: 24px;
}

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
	gap: 18px;
}

.panel,
.login-panel {
	background: white;
	border: 1px solid #d7dde5;
	border-radius: 8px;
	padding: 18px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

.login-panel {
	max-width: 380px;
	margin: 60px auto;
}

h1,
h2 {
	margin: 0 0 14px;
	font-size: 20px;
}

h2 {
	font-size: 16px;
}

label {
	display: block;
	margin-bottom: 12px;
	font-weight: 600;
}

input {
	display: block;
	width: 100%;
	margin-top: 6px;
	padding: 9px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font: inherit;
}

textarea {
	display: block;
	width: 100%;
	min-height: 90px;
	margin-top: 6px;
	padding: 9px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font: 13px/1.45 Menlo, Monaco, Consolas, "Liberation Mono", monospace;
	resize: vertical;
}

input[type="checkbox"] {
	display: inline-block;
	width: auto;
	margin: 0 8px 0 0;
}

button {
	padding: 8px 12px;
	border: 1px solid #175cd3;
	border-radius: 6px;
	background: #175cd3;
	color: white;
	cursor: pointer;
	font: inherit;
}

a.button {
	display: inline-block;
	padding: 8px 12px;
	border: 1px solid #175cd3;
	border-radius: 6px;
	background: #175cd3;
	color: white;
	font: inherit;
}

button.secondary,
a.button.secondary {
	border-color: #cbd5e1;
	background: white;
	color: #344054;
}

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

th,
td {
	padding: 9px 10px;
	border-bottom: 1px solid #e5eaf0;
	text-align: left;
	vertical-align: top;
}

th {
	background: #f8fafc;
	color: #475467;
	font-weight: 600;
}

table.sortable th {
	cursor: pointer;
	user-select: none;
}

table.sortable th[data-sort="asc"]::after {
	content: " ▲";
	font-size: 11px;
}

table.sortable th[data-sort="desc"]::after {
	content: " ▼";
	font-size: 11px;
}

.error {
	color: #b42318;
	background: #fffbfa;
	border: 1px solid #fecdca;
	border-radius: 6px;
	padding: 10px;
}

.muted {
	color: #667085;
}

.actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
}

.config-form .actions {
	margin: 14px 0 0;
}

.panel-heading {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 14px;
}

.panel-heading h1,
.panel-heading p {
	margin-bottom: 0;
}

.panel-heading .actions {
	margin: 0;
}

.config-panel {
	padding-bottom: 14px;
}

.config-panel .CodeMirror {
	height: calc(100vh - 280px);
	min-height: 420px;
	border: 1px solid #d7dde5;
	border-radius: 6px;
	font: 13px/1.45 Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.notice {
	color: #027a48;
	background: #ecfdf3;
	border: 1px solid #abefc6;
	border-radius: 6px;
	padding: 10px;
}

.test-result {
	margin-left: 8px;
	color: #667085;
	white-space: nowrap;
}

.test-result.ok {
	color: #027a48;
}

.test-result.bad {
	color: #b42318;
}

.test-result.testing {
	color: #175cd3;
}

.badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
}

.badge.ok {
	background: #ecfdf3;
	color: #027a48;
}

.badge.bad {
	background: #fef3f2;
	color: #b42318;
}

.code {
	overflow: auto;
	background: #101828;
	color: #f8fafc;
	border-radius: 6px;
	padding: 14px;
}

@media (max-width: 720px) {
	.topbar {
		display: block;
	}

	.nav {
		flex-wrap: wrap;
		margin-top: 12px;
	}

	.page {
		padding: 14px;
	}

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

	.panel-heading {
		display: block;
	}

	.panel-heading form {
		margin-top: 12px;
	}

	.config-panel .CodeMirror {
		height: 60vh;
		min-height: 320px;
	}

}
