/* The look follows Dokploy's (shadcn, neutral palette); system fonts only, no web fonts. */
:root {
	color-scheme: light;
	--background: #ffffff;
	--foreground: #0a0a0a;
	--popover: #ffffff;
	--primary: #171717;
	--primary-hover: #454545;
	--primary-foreground: #fafafa;
	--secondary: #f5f5f5;
	--secondary-hover: #ebebeb;
	--muted: #f5f5f5;
	--muted-foreground: #737373;
	--destructive: #e7000b;
	--destructive-soft: rgb(231 0 11 / 0.1);
	--destructive-softer: rgb(231 0 11 / 0.2);
	--border: #e5e5e5;
	--input: #e5e5e5;
	--input-bg: transparent;
	--ring: #a1a1a1;
	--ring-soft: rgb(161 161 161 / 0.5);
	--track: #d4d4d4;
	--hairline: rgb(10 10 10 / 0.1);
	--sidebar: #fafafa;
	--sidebar-accent: #f5f5f5;
	--sidebar-border: #e5e5e5;
	--log-bg: #fafafa;
	--overlay: rgb(0 0 0 / 0.1);

	--green: #059669;
	--green-soft: rgb(5 150 105 / 0.15);
	--yellow: #ca8a04;
	--yellow-soft: rgb(202 138 4 / 0.15);
	--red: #dc2626;
	--red-soft: rgb(220 38 38 / 0.12);
	--blue: #2563eb;
	--blue-soft: rgb(37 99 235 / 0.12);
	--dot-green: #22c55e;
	--dot-yellow: #eab308;
	--dot-idle: #a3a3a3;

	--alert-error-bg: #fef2f2;
	--alert-error-fg: #dc2626;
	--alert-ok-bg: #f0fdf4;
	--alert-ok-fg: #16a34a;
	--alert-info-bg: #eff6ff;
	--alert-info-fg: #2563eb;
	--alert-warn-bg: #fff7ed;
	--alert-warn-fg: #ea580c;

	--chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	--check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fafafa' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");

	--radius: 0.625rem;
	--radius-sm: 0.375rem;
	--radius-md: 0.5rem;
	--radius-xl: 0.875rem;
	--shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
	--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
	--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
	--sidebar-width: 18rem;
	--font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
	:root {
		color-scheme: dark;
		--background: #0a0a0a;
		--foreground: #fafafa;
		--popover: #171717;
		--primary: #e5e5e5;
		--primary-hover: #b8b8b8;
		--primary-foreground: #171717;
		--secondary: #262626;
		--secondary-hover: #2f2f2f;
		--muted: #262626;
		--muted-foreground: #a1a1a1;
		--destructive: #ff6467;
		--destructive-soft: rgb(255 100 103 / 0.2);
		--destructive-softer: rgb(255 100 103 / 0.3);
		--border: rgb(255 255 255 / 0.1);
		--input: rgb(255 255 255 / 0.15);
		--input-bg: rgb(255 255 255 / 0.045);
		--ring: #737373;
		--ring-soft: rgb(115 115 115 / 0.5);
		--track: rgb(255 255 255 / 0.2);
		--hairline: rgb(250 250 250 / 0.1);
		--sidebar: #171717;
		--sidebar-accent: #262626;
		--sidebar-border: rgb(255 255 255 / 0.1);
		--log-bg: #050506;
		--overlay: rgb(0 0 0 / 0.5);

		--green: #10b981;
		--green-soft: rgb(16 185 129 / 0.15);
		--yellow: #eab308;
		--yellow-soft: rgb(234 179 8 / 0.15);
		--red: #ff6467;
		--red-soft: rgb(239 68 68 / 0.15);
		--blue: #3b82f6;
		--blue-soft: rgb(59 130 246 / 0.15);
		--dot-idle: #525252;

		--alert-error-bg: #450a0a;
		--alert-error-fg: #f87171;
		--alert-ok-bg: #052e16;
		--alert-ok-fg: #4ade80;
		--alert-info-bg: #172554;
		--alert-info-fg: #60a5fa;
		--alert-warn-bg: #431407;
		--alert-warn-fg: #fb923c;

		--chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1a1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
		--check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171717' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
	}
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
	margin: 0;
	background: var(--background);
	color: var(--foreground);
	font-family: var(--font);
	font-size: 0.875rem;
	line-height: 1.43;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
code, .mono { font-family: var(--mono); }
code { font-size: 0.8125rem; }
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
::-webkit-scrollbar { width: 0.3125rem; height: 0.3125rem; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 0.3125rem; }

.icon { width: 1rem; height: 1rem; flex: none; }
.sr-only {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted-foreground); }
.small { font-size: 0.75rem; }
.strong { font-weight: 500; }
.nowrap { white-space: nowrap; }
.wrap-any { overflow-wrap: anywhere; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-sm { display: flex; flex-direction: column; gap: 0.5rem; }
.row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.search { display: flex; gap: 0.5rem; }
.search .input { flex: 1; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.link { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--foreground); }
.link-plain { color: inherit; text-decoration: none; }
.link-plain:hover { text-decoration: underline; text-underline-offset: 3px; }
form.inline { display: inline-flex; margin: 0; }

.app { display: flex; min-height: 100vh; }
.sidebar {
	position: sticky; top: 0; align-self: flex-start;
	width: var(--sidebar-width); height: 100vh; flex: none;
	padding: 0.5rem; z-index: 30;
}
.sidebar-inner {
	display: flex; flex-direction: column; height: 100%;
	background: var(--sidebar);
	border-radius: var(--radius);
	box-shadow: 0 0 0 1px var(--sidebar-border), var(--shadow-sm);
	overflow: hidden;
}
.sb-head { padding: 0.5rem; }
.sb-brand {
	display: flex; align-items: center; gap: 0.5rem;
	height: 3rem; padding: 0.5rem;
	border-radius: var(--radius-md);
	color: inherit; text-decoration: none;
}
.sb-brand:hover { background: var(--sidebar-accent); }
.sb-logo {
	display: grid; place-items: center;
	width: 1.75rem; height: 1.75rem; flex: none;
	border: 1px solid var(--border); border-radius: var(--radius-sm);
	background: var(--background);
}
.sb-logo .icon { width: 1.125rem; height: 1.125rem; }
.sb-brand-text { display: grid; line-height: 1.25; min-width: 0; }
.sb-brand-name { font-weight: 600; font-size: 0.875rem; }
.sb-brand-sub { font-size: 0.75rem; color: var(--muted-foreground); }
.sb-content {
	flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
	display: flex; flex-direction: column; gap: 0.25rem;
	scrollbar-width: none;
}
.sb-content::-webkit-scrollbar { display: none; }
.sb-group { padding: 0.5rem; }
.sb-label {
	display: flex; align-items: center; height: 2rem; padding: 0 0.5rem;
	font-size: 0.75rem; font-weight: 500;
	color: color-mix(in srgb, var(--foreground) 70%, transparent);
}
.sb-menu { display: grid; gap: 0.25rem; }
.sb-link {
	display: flex; align-items: center; gap: 0.5rem;
	height: 2rem; padding: 0.5rem;
	border-radius: var(--radius-md);
	color: var(--foreground); text-decoration: none; white-space: nowrap;
	overflow: hidden; text-overflow: ellipsis;
}
.sb-link:hover { background: var(--sidebar-accent); }
.sb-link.active { background: var(--border); font-weight: 500; }
.sb-link .icon { color: var(--muted-foreground); }
.sb-link.active .icon, .sb-link:hover .icon { color: var(--foreground); }
.sb-foot { padding: 0.5rem; border-top: 1px solid var(--sidebar-border); }

.user-menu { display: block; }
.user-button {
	display: flex; align-items: center; gap: 0.5rem; width: 100%;
	height: 3rem; padding: 0.5rem;
	font: inherit; color: inherit; text-align: left;
	background: none; border: 0; border-radius: var(--radius-md);
	cursor: pointer;
}
.user-button:hover, .user-menu:focus-within > .user-button { background: var(--sidebar-accent); }
.avatar {
	display: grid; place-items: center;
	width: 2rem; height: 2rem; flex: none;
	border-radius: var(--radius-md);
	background: var(--muted); color: var(--foreground);
	font-weight: 600; font-size: 0.875rem; text-transform: uppercase;
}
.user-text { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.user-text strong { font-weight: 600; }
.user-text span { font-size: 0.75rem; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu .menu { bottom: calc(100% + 0.25rem); left: 0; right: 0; top: auto; }

.inset { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
	display: flex; align-items: center; gap: 0.5rem;
	height: 4rem; padding: 0 1rem; flex: none;
}
.topbar-sep { width: 1px; height: 1rem; margin-right: 0.5rem; background: var(--border); }
.nav-open {
	display: none;
	place-items: center; width: 1.75rem; height: 1.75rem; margin-left: -0.25rem;
	border-radius: var(--radius-md); cursor: pointer;
}
.nav-open:hover { background: var(--muted); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.625rem; color: var(--muted-foreground); }
.crumbs li { display: inline-flex; align-items: center; gap: 0.375rem; min-width: 0; }
.crumbs a { text-decoration: none; transition: color 0.15s; }
.crumbs a:hover { color: var(--foreground); }
.crumbs [aria-current] { color: var(--foreground); }
.crumbs .icon { width: 0.875rem; height: 0.875rem; }
.content { display: flex; flex-direction: column; gap: 1rem; padding: 0 1rem 2.5rem; min-width: 0; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-scrim { display: none; }
@media (min-width: 768px) { .nav-toggle { display: none; } }

.frame {
	width: 100%;
	padding: 0.625rem;
	background: var(--sidebar);
	border-radius: var(--radius-xl);
	box-shadow: 0 0 0 1px var(--hairline);
}
.frame.narrow { max-width: 64rem; margin: 0 auto; }
.frame-panel { background: var(--background); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }
.frame-head {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 1rem; padding: 1.5rem;
}
.frame-heading { display: grid; gap: 0.375rem; flex: 1 1 18rem; min-width: 0; }
.frame-title {
	display: flex; align-items: center; gap: 0.5rem; min-width: 0;
	font-size: 1.25rem; font-weight: 500; line-height: 1.375;
}
.frame-title > .icon { width: 1.5rem; height: 1.5rem; color: var(--muted-foreground); }
.frame-title-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame-desc { color: var(--muted-foreground); }
.frame-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.frame-body {
	display: flex; flex-direction: column; gap: 1rem;
	padding: 2rem 1.5rem; border-top: 1px solid var(--border);
	min-width: 0;
}
.frame-body.tall { min-height: 60vh; }
.badge-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.svc-mark {
	position: relative; display: grid; place-items: center; flex: none;
	width: 2.5rem; height: 2.5rem; margin-right: 0.5rem;
	border: 1px solid var(--border); border-radius: var(--radius-md);
	color: var(--muted-foreground);
}
.svc-mark .icon { width: 1.25rem; height: 1.25rem; }
.svc-mark .dot { position: absolute; top: -0.4375rem; right: -0.4375rem; }

.card {
	display: flex; flex-direction: column; min-width: 0;
	background: var(--background);
	border-radius: var(--radius-xl);
	box-shadow: 0 0 0 1px var(--hairline);
}
.card-head {
	display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
	gap: 1rem; padding: 1.5rem;
}
.card-heading { display: grid; gap: 0.375rem; flex: 1; min-width: 12rem; }
.card-title { display: flex; align-items: center; gap: 0.5rem; font-size: 1.25rem; font-weight: 500; line-height: 1.375; }
.card-title.sm { font-size: 1rem; }
.card-desc { color: var(--muted-foreground); }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.card-body { display: flex; flex-direction: column; gap: 1rem; padding: 0 1.5rem 1.5rem; min-width: 0; }
.card-body:first-child { padding-top: 1.5rem; }
.card-foot {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem;
	padding: 1rem 1.5rem; border-top: 1px solid var(--border);
}
.card-foot.between { justify-content: space-between; }
.card.danger { box-shadow: 0 0 0 1px var(--destructive-softer); }
.card.danger .card-title { color: var(--destructive); }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
	height: 2.5rem; padding: 0 1rem; flex: none;
	font: inherit; font-size: 0.875rem; font-weight: 500; line-height: 1; white-space: nowrap;
	color: var(--primary-foreground); background: var(--primary);
	border: 1px solid transparent; border-radius: var(--radius);
	cursor: pointer; text-decoration: none; user-select: none; list-style: none;
	transition: background-color 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn::-webkit-details-marker { display: none; }
.btn:hover { background: var(--primary-hover); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .input:focus-visible, .tab:focus-visible, .sb-link:focus-visible, .tile:focus-visible, .checkbox:focus-visible, .switch:focus-visible {
	outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px var(--ring-soft);
}
.btn-secondary { color: var(--foreground); background: var(--secondary); }
.btn-secondary:hover { background: var(--secondary-hover); }
.btn-outline { color: var(--foreground); background: var(--background); border-color: var(--border); }
.btn-outline:hover { background: var(--muted); }
.btn-ghost { color: var(--foreground); background: transparent; }
.btn-ghost:hover { background: var(--muted); }
.btn-destructive { color: var(--destructive); background: var(--destructive-soft); }
.btn-destructive:hover { background: var(--destructive-softer); }
.btn-sm { height: 2.25rem; padding: 0 0.75rem; }
.btn-xs { height: 1.75rem; padding: 0 0.625rem; gap: 0.25rem; font-size: 0.75rem; border-radius: var(--radius-md); }
.btn-xs .icon { width: 0.875rem; height: 0.875rem; }
.btn-icon { width: 2.5rem; padding: 0; }
.btn-icon.btn-sm { width: 2.25rem; }
.btn-icon.btn-xs { width: 1.75rem; }
.btn-block { width: 100%; }
.btn-ghost.danger:hover { color: var(--destructive); background: var(--destructive-soft); }
@media (prefers-color-scheme: dark) {
	.btn-outline { border-color: var(--input); background: var(--input-bg); }
	.btn-outline:hover { background: rgb(255 255 255 / 0.075); }
	.btn-ghost:hover { background: rgb(38 38 38 / 0.5); }
}

.field { display: grid; gap: 0.5rem; min-width: 0; align-content: start; }
.label { font-size: 0.875rem; font-weight: 500; line-height: 1; }
.hint { font-size: 0.8125rem; color: var(--muted-foreground); }
.input {
	display: block; width: 100%; min-width: 0; height: 2.5rem;
	padding: 0.5rem 0.75rem;
	font: inherit; font-size: 0.875rem; color: var(--foreground);
	background-color: var(--input-bg);
	border: 1px solid var(--input); border-radius: var(--radius);
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--muted-foreground); }
.input.mono { font-family: var(--mono); font-size: 0.8125rem; }
textarea.input { height: auto; min-height: 5rem; resize: vertical; line-height: 1.5; }
select.input {
	appearance: none; padding-right: 2.25rem; cursor: pointer;
	background-image: var(--chevron); background-repeat: no-repeat;
	background-position: right 0.75rem center; background-size: 1rem;
}
select.input option { background: var(--popover); color: var(--foreground); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem 1.25rem; }
.form-section { display: flex; flex-direction: column; gap: 1rem; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.inline-form .field { flex: 1 1 14rem; }
.form-section + .form-section { padding-top: 1.25rem; border-top: 1px solid var(--border); }
.form-section-title { font-size: 1rem; font-weight: 500; }

.checkbox {
	appearance: none; display: inline-grid; place-content: center;
	width: 1rem; height: 1rem; margin: 0.125rem 0 0; flex: none;
	border: 1px solid var(--input); border-radius: 4px;
	background: var(--input-bg); cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
}
@media (prefers-color-scheme: light) { .checkbox { border-color: #d4d4d4; } }
.checkbox:checked { background: var(--primary) var(--check) center / 0.75rem no-repeat; border-color: var(--primary); }
.check { display: flex; align-items: flex-start; gap: 0.75rem; cursor: pointer; }
.check-text { display: grid; gap: 0.25rem; }
.check-text .label { line-height: 1.25; }
.switch {
	appearance: none; position: relative; flex: none;
	width: 2.25rem; height: 1.25rem; margin: 0;
	border: 1px solid transparent; border-radius: 999px;
	background: var(--input); cursor: pointer;
	transition: background-color 0.15s;
}
.switch::before {
	content: ""; position: absolute; top: 1px; left: 1px;
	width: 1rem; height: 1rem; border-radius: 50%;
	background: var(--background); transition: transform 0.15s;
}
.switch:checked { background: var(--primary); }
.switch:checked::before { transform: translateX(1rem); }
@media (prefers-color-scheme: dark) {
	.switch { background: rgb(255 255 255 / 0.12); }
	.switch::before { background: var(--foreground); }
	.switch:checked::before { background: var(--primary-foreground); }
}
.toggle-row {
	display: flex; align-items: center; justify-content: space-between; gap: 1rem;
	padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius);
	cursor: pointer;
}
.toggle-row .check-text { flex: 1; }

/* The file input is the drop target: a browser fills it on a drop, so the
   page needs no script. It spans the whole zone, with the browser's own row
   (button and chosen files) in the middle; the caption lies over its padding
   and lets clicks and drops through. */
.dropzone {
	position: relative; display: block; overflow: hidden;
	background: var(--input-bg);
	border: 2px dashed var(--input); border-radius: var(--radius-xl);
	cursor: pointer;
	transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.dropzone:hover { border-color: var(--ring); background-color: var(--muted); }
.dropzone:has(input:focus-visible) { border-color: var(--ring); box-shadow: 0 0 0 3px var(--ring-soft); }
.dropzone:has(input:valid) { border-style: solid; border-color: var(--ring); }
.dropzone input {
	display: block; box-sizing: content-box; width: 16rem;
	padding: 6.75rem calc(50% - 8rem) 2.25rem;
	font: inherit; font-size: 0.875rem; color: var(--muted-foreground);
	outline: none; cursor: pointer;
}
.dropzone input:valid { color: var(--foreground); }
/* Firefox takes the padding off the room for the file names, and centers the
   row by text-align, which other browsers pin to the start. */
@supports (-moz-appearance: none) {
	.dropzone input { box-sizing: border-box; width: 100%; padding-inline: 0; text-align: center; }
}
.dropzone input::file-selector-button {
	height: 2.25rem; margin-right: 0.75rem; padding: 0 0.75rem;
	font: inherit; font-weight: 500; color: var(--foreground);
	background: var(--secondary); border: 0; border-radius: var(--radius);
	cursor: pointer;
}
.dropzone-text {
	position: absolute; top: 2.25rem; left: 1.5rem; right: 1.5rem;
	display: flex; flex-direction: column; align-items: center; gap: 0.625rem;
	font-weight: 500; text-align: center;
	pointer-events: none;
}
.dropzone-text .icon { width: 1.75rem; height: 1.75rem; color: var(--muted-foreground); }

fieldset.choices {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.75rem;
	margin: 0; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius);
}
fieldset.choices legend { padding: 0 0.375rem; font-weight: 500; }

/* Steps: radio buttons drawn as a slider. Each step draws the stretch of track
   from the step before it; the stretches and dots up to the chosen one fill. */
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding-top: 0.25rem; }
.step {
	position: relative; display: grid; justify-items: center; align-content: start; gap: 0.5rem;
	font-size: 0.75rem; line-height: 1.25; text-align: center;
	color: var(--muted-foreground); cursor: pointer;
}
.step:hover { color: var(--foreground); }
.step + .step::before {
	content: ""; position: absolute; top: calc(0.5rem - 1px); right: 50%;
	width: 100%; height: 2px; background: var(--track);
}
.step input {
	appearance: none; position: relative; z-index: 1; display: block;
	width: 1rem; height: 1rem; margin: 0;
	border: 2px solid var(--track); border-radius: 50%; background: var(--background);
	cursor: pointer; transition: transform 0.15s, border-color 0.15s, background-color 0.15s;
}
.step:has(~ .step input:checked) input { border-color: var(--primary); background: var(--primary); }
.step + .step:has(input:checked)::before,
.step + .step:has(~ .step input:checked)::before { background: var(--primary); }
.step input:checked { border: 4px solid var(--primary); transform: scale(1.25); }
.step:has(input:checked) { color: var(--foreground); font-weight: 500; }
.step input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring-soft); }

/* The schedule picker shows the controls the chosen frequency uses. */
.when-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.when-row > .input { flex: 1 1 9rem; width: auto; }
.when-row > .when-cron { flex-basis: 100%; }
.when:not(:has(.when-every [value="weekly"]:checked)) .when-weekday,
.when:not(:has(.when-every [value="monthly"]:checked)) .when-day,
.when:has(.when-every :is([value="never"], [value="hourly"], [value="custom"]):checked) .when-at,
.when:not(:has(.when-every [value="custom"]:checked)) .when-cron { display: none; }

/* Fields that only apply to one choice made elsewhere in the same form.
   Without :has() they all show, as they used to. */
form:not(:has(select[name="kind"] [value="telegram"]:checked)) .if-telegram,
form:not(:has(select[name="kind"] [value="webhook"]:checked)) .if-webhook,
form:not(:has(select[name="kind"] [value="github-app"]:checked)) .if-app,
form:has(select[name="kind"] [value="github-app"]:checked) .if-token,
form:not(:has(select[name="kind"] :is([value="gitea"], [value="bitbucket"]):checked)) .if-username,
form:not(:has(select[name="kind"] [value="github"]:checked)) .if-github,
form:not(:has(select[name="kind"] [value="gitlab"]:checked)) .if-gitlab,
form:not(:has(select[name="kind"] [value="gitea"]:checked)) .if-gitea,
form:not(:has(select[name="kind"] [value="bitbucket"]:checked)) .if-bitbucket,
form:not(:has(select[name="build"] [value="railpack"]:checked)) .if-railpack,
form:has(select[name="build"] [value="railpack"]:checked) .if-dockerfile,
form:has(select[name="engine"] :is([value="redis"], [value="mongo"]):checked) .if-db-name,
form:has(select[name="engine"] [value="redis"]:checked) .if-db-user,
form:not(:has(input[name="https"]:checked)) .if-https,
form:not(:has(select[name="cert"] [value="custom"]:checked)) .if-custom-cert,
form:not(:has(select[name="target"] [value$=":"]:checked)) .if-other,
form:has(select[name="target"] [value="panel"]:checked) .if-not-panel { display: none; }

.badge {
	display: inline-flex; align-items: center; gap: 0.25rem; width: fit-content;
	padding: 0.125rem 0.625rem;
	font-size: 0.75rem; font-weight: 500; line-height: 1rem; white-space: nowrap;
	color: var(--primary-foreground); background: var(--primary);
	border: 1px solid transparent; border-radius: 999px;
}
.badge .icon { width: 0.75rem; height: 0.75rem; }
.badge-secondary { color: var(--foreground); background: var(--secondary); }
.badge-outline { color: var(--foreground); background: transparent; border-color: var(--border); }
.badge-green { color: var(--green); background: var(--green-soft); }
.badge-yellow { color: var(--yellow); background: var(--yellow-soft); }
.badge-red { color: var(--red); background: var(--red-soft); }
.badge-blue { color: var(--blue); background: var(--blue-soft); }
.badge-gray { color: var(--muted-foreground); background: var(--muted); }
.badge.mono { font-family: var(--mono); font-weight: 400; }
.dot { display: inline-block; width: 0.875rem; height: 0.875rem; flex: none; border-radius: 50%; background: var(--dot-idle); }
.dot.sm { width: 0.625rem; height: 0.625rem; }
.dot-green { background: var(--dot-green); }
.dot-yellow { background: var(--dot-yellow); }
.dot-red { background: var(--destructive); }

.tabs {
	display: inline-flex; align-items: center; gap: 2rem; align-self: flex-start; width: fit-content;
	max-width: 100%; height: 2.5rem; padding: 0.25rem;
	border-radius: var(--radius); background: var(--muted); color: var(--muted-foreground);
	overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
	height: 100%; padding: 0.375rem 0.75rem;
	border: 1px solid transparent; border-radius: var(--radius-md);
	font-weight: 500; white-space: nowrap; text-decoration: none;
	color: color-mix(in srgb, var(--foreground) 60%, transparent);
	transition: color 0.15s, background-color 0.15s;
}
.tab:hover { color: var(--foreground); }
.tab.active { color: var(--foreground); background: var(--background); box-shadow: var(--shadow-sm); }
@media (prefers-color-scheme: dark) {
	.tab { color: var(--muted-foreground); }
	.tab.active { border-color: var(--input); background: var(--input-bg); }
}
.tab-panel { display: flex; flex-direction: column; gap: 1rem; padding-top: 0.625rem; }

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
.table { width: 100%; border-collapse: collapse; }
.table th {
	height: 3rem; padding: 0 1rem;
	text-align: left; font-weight: 500; white-space: nowrap;
	border-bottom: 1px solid var(--border);
}
.table td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color 0.15s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--muted) 50%, transparent); }
.table td.actions { text-align: right; white-space: nowrap; }
.table td.actions .btn + .btn { margin-left: 0.375rem; }
.table .cell-link { font-weight: 500; text-decoration: none; }
.table .cell-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(18.75rem, 1fr)); gap: 1.25rem; }
.tile {
	position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 8.5rem;
	border-radius: var(--radius-xl); box-shadow: 0 0 0 1px var(--hairline);
	color: inherit; text-decoration: none;
	transition: background-color 0.15s;
}
a.tile:hover { background: var(--border); }
.tile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: 1.5rem; }
.tile-text { display: grid; gap: 0.5rem; min-width: 0; }
.tile-title { display: flex; align-items: center; gap: 0.5rem; font-size: 1rem; font-weight: 500; line-height: 1.2; overflow-wrap: anywhere; }
.tile-title .icon { color: var(--muted-foreground); }
.tile-desc { color: var(--muted-foreground); font-weight: 500; overflow-wrap: anywhere; }
.tile-kind { color: var(--muted-foreground); }
.tile-kind .icon { width: 1.5rem; height: 1.5rem; }
.tile-body { display: grid; gap: 1rem; padding: 0 1.5rem 1.25rem; min-width: 0; }
.tile-lines { display: grid; gap: 0.5rem; font-size: 0.8125rem; }
.tile-lines .tile-meta .icon { width: 0.875rem; height: 0.875rem; }
.usage { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.375rem 0.75rem; font-size: 0.8125rem; }
.usage-label { display: inline-flex; align-items: center; gap: 0.375rem; color: var(--muted-foreground); font-weight: 500; }
.usage-label .icon { width: 0.875rem; height: 0.875rem; }
.usage-val { justify-self: end; font-variant-numeric: tabular-nums; }
.usage .bar { grid-column: 1 / -1; height: 0.375rem; margin-bottom: 0.25rem; }
a.tile:hover .bar .track { fill: var(--background); }
.tile-foot {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem;
	margin-top: auto; padding: 0 1.5rem 1.5rem; font-size: 0.75rem;
}
.tile-meta { display: inline-flex; align-items: center; gap: 0.375rem; color: var(--muted-foreground); }
.tile-meta .icon { width: 0.75rem; height: 0.75rem; }
.tile > .dot { position: absolute; top: -0.5rem; right: -0.25rem; }
.tile-new {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
	box-shadow: none; border: 1px dashed var(--border); color: var(--muted-foreground);
}
.tile-new:hover { color: var(--foreground); background: var(--muted); }

.rows { display: flex; flex-direction: column; gap: 0.75rem; }
.row-item {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
	padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius);
}
.row-main { display: grid; gap: 0.25rem; flex: 1; min-width: 14rem; }
.row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.625rem; font-weight: 500; }
.row-title .icon { color: var(--muted-foreground); }
.row-sub { color: var(--muted-foreground); overflow-wrap: anywhere; }
.row-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem; }

/* A host's checks: a tile per item, its icon in the color of the verdict. The
   detail opens under the tile the pointer is on and lets the pointer through,
   so the tiles of the next row stay in reach; a click or the keyboard's focus
   keeps it open, to select from. No script. The box is a stacking context of
   its own, so a detail lies over the cards that follow. */
.checks-box { container-type: inline-size; position: relative; z-index: 1; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 0.25rem; }
.check-tile { position: relative; outline: none; }
.check-btn {
	display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
	width: 100%; height: 100%; padding: 0.625rem 0.25rem;
	font: inherit; color: inherit; background: none;
	border: 1px solid transparent; border-radius: var(--radius); cursor: pointer;
	transition: background-color 0.15s;
}
.check-tile:hover > .check-btn, .check-tile:focus-within > .check-btn { background: var(--sidebar); }
.check-btn:focus-visible { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px var(--ring-soft); }
.check-icon {
	display: grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none;
	border-radius: var(--radius-md); color: var(--muted-foreground); background: var(--muted);
}
.check-icon .icon { width: 1.25rem; height: 1.25rem; }
.check-green .check-icon { color: var(--green); background: var(--green-soft); }
.check-yellow .check-icon { color: var(--yellow); background: var(--yellow-soft); }
.check-red .check-icon { color: var(--red); background: var(--red-soft); }
.check-name {
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
	font-size: 0.75rem; line-height: 1.25; text-align: center; overflow-wrap: anywhere;
	color: var(--muted-foreground);
}
.check-pop {
	display: none; position: absolute; top: 100%; left: 50%; z-index: 1;
	width: max-content; max-width: 18rem; max-width: min(18rem, 100cqw); padding-top: 0.25rem;
	translate: -50% 0; pointer-events: none;
}
.check-tile:hover > .check-pop, .check-tile:focus-within > .check-pop { display: block; }
/* A detail with buttons catches the pointer, or a click on one would land on
   the tile under it. */
.check-tile:focus-within > .check-pop, .check-tile:hover > .check-pop:has(.check-actions) { pointer-events: auto; }
.checks:has(.check-tile:hover) .check-tile:focus-within:not(:hover) > .check-pop { display: none; }
.check-card {
	display: grid; gap: 0.375rem; padding: 0.75rem;
	background: var(--popover); border-radius: var(--radius);
	box-shadow: var(--shadow-md), 0 0 0 1px var(--hairline);
}
.check-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.check-detail { color: var(--muted-foreground); overflow-wrap: anywhere; }
.check-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.25rem; }
/* A detail in the first or last column opens along the tile's edge, or it
   would stick out of the card and widen the page. That takes a column count
   known here, hence a fixed one for each width of the box. */
@container (max-width: 29.99rem) {
	.checks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.check-tile:nth-child(3n+1) > .check-pop { left: 0; translate: none; }
	.check-tile:nth-child(3n) > .check-pop { left: auto; right: 0; translate: none; }
}
@container (min-width: 30rem) and (max-width: 47.99rem) {
	.checks { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.check-tile:nth-child(5n+1) > .check-pop { left: 0; translate: none; }
	.check-tile:nth-child(5n) > .check-pop { left: auto; right: 0; translate: none; }
}
@container (min-width: 48rem) {
	.checks { grid-template-columns: repeat(8, minmax(0, 1fr)); }
	.check-tile:nth-child(8n+1) > .check-pop { left: 0; translate: none; }
	.check-tile:nth-child(8n) > .check-pop { left: auto; right: 0; translate: none; }
}

.empty {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem;
	min-height: 14rem; padding: 2rem 1rem; text-align: center;
	color: var(--muted-foreground);
}
.empty > .icon { width: 2rem; height: 2rem; }
.empty-title { font-size: 1rem; font-weight: 500; }
.empty.dashed { border: 2px dashed var(--border); border-radius: var(--radius-xl); }

/* A page that waits for a server goes out up to these words, and they show
   until the rest follows them: after a moment, so that an answer that comes
   at once doesn't flash them. :last-child wouldn't do: Chrome and Safari
   match it only once the parent is closed, which is when the wait is over.
   Without :has() the words never show. */
.late { display: none; align-items: center; gap: 0.5rem; color: var(--muted-foreground); }
.late:not(:has(~ *)) { display: flex; animation: late-in 0.3s step-end both; }
.late::before { content: ""; width: 1rem; height: 1rem; flex: none; }
@keyframes late-in { from { visibility: hidden; } }

/* Something is on its way: a ring that turns. It stands before the words of
   a page that waits, in the badge of a job that runs and after the last line
   of its log, and on the button of a form that went out. */
.late::before, .badge-busy::before, .log pre::after, button[aria-busy="true"]::after, button[aria-busy="true"] > .icon:first-of-type {
	border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
	animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }
.badge-busy::before { content: ""; width: 0.625rem; height: 0.625rem; flex: none; border-width: 1.5px; }
/* A job may write nothing for seconds; the ring in its log goes with the
   badge, which job.js swaps once the job has ended. */
.frame-panel:has(.badge-busy) .log pre::after {
	content: ""; display: inline-block; width: 0.75rem; height: 0.75rem; vertical-align: -0.0625rem;
	color: var(--muted-foreground);
}

/* busy.js marks the button that sent a form until the answer arrives. Its
   icon becomes the ring; a button without one shows the ring in place of its
   label, which keeps the width. The text fill hides the label and leaves
   currentColor to the ring. Without :has() such a button only dims. */
button[aria-busy="true"] { pointer-events: none; opacity: 0.7; }
button[aria-busy="true"] > .icon:first-of-type > * { display: none; }
button[aria-busy="true"]:not(:has(> .icon)) { position: relative; -webkit-text-fill-color: transparent; }
button[aria-busy="true"]:not(:has(> .icon))::after {
	content: ""; position: absolute; inset: 0; margin: auto; width: 1rem; height: 1rem;
}

.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.625rem 1.5rem; }
.facts dt { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted-foreground); }
.facts dd { font-weight: 500; overflow-wrap: anywhere; }
.facts .icon { color: var(--muted-foreground); }

code.block {
	display: block; padding: 0.625rem 0.75rem;
	white-space: pre-wrap; overflow-wrap: anywhere;
	background: var(--muted); border-radius: var(--radius-md);
	font-size: 0.8125rem; line-height: 1.5;
}
details.reveal > summary { cursor: pointer; color: var(--muted-foreground); width: fit-content; }
details.reveal > summary:hover { color: var(--foreground); }
details.reveal[open] > summary { margin-bottom: 0.5rem; }
/* A card that opens from its head: what most visits don't need. */
details.fold > summary { cursor: pointer; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary:hover .card-title { text-decoration: underline; text-underline-offset: 0.2em; }
details.fold .fold-icon { display: inline-flex; color: var(--muted-foreground); transition: transform 0.15s; }
details.fold[open] .fold-icon { transform: rotate(180deg); }
details.fold .card-body:first-child { padding-top: 0; }
.guide ol { list-style: decimal; padding-left: 1.25rem; }
.guide li + li { margin-top: 0.25rem; }
.guide .link { display: inline-flex; align-items: center; gap: 0.375rem; width: fit-content; }

.alert {
	display: flex; align-items: flex-start; gap: 0.75rem;
	padding: 0.625rem 0.75rem; border-radius: var(--radius);
	white-space: pre-wrap; overflow-wrap: anywhere;
}
.alert .icon { margin-top: 0.125rem; }
.alert-error { background: var(--alert-error-bg); color: var(--alert-error-fg); }
.alert-ok { background: var(--alert-ok-bg); color: var(--alert-ok-fg); }
.alert-info { background: var(--alert-info-bg); color: var(--alert-info-fg); }
.alert-warn { background: var(--alert-warn-bg); color: var(--alert-warn-fg); }
/* An alert that lists what it is about and ends with a button. */
.alert-body { display: grid; gap: 0.5rem; min-width: 0; justify-items: start; }
.alert-list { display: grid; gap: 0.25rem; font-family: var(--mono); font-size: 0.8125rem; }
.dev-banner {
	margin: 0 1rem 1rem; padding: 0.625rem 0.75rem; border-radius: var(--radius);
	background: var(--alert-error-bg); color: var(--alert-error-fg); font-weight: 500;
}

/* Menus open while focus is inside them, so they need no script. */
.dropdown { position: relative; display: inline-block; outline: none; }
.dropdown > .menu { display: none; }
.dropdown:focus-within > .menu { display: block; }
.menu {
	position: absolute; top: calc(100% + 0.25rem); right: 0; z-index: 40;
	min-width: 13rem; padding: 0.25rem;
	background: var(--popover); color: var(--foreground);
	border-radius: var(--radius); box-shadow: var(--shadow-md), 0 0 0 1px var(--hairline);
}
.menu-label { padding: 0.375rem 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); }
.menu-sep { height: 1px; margin: 0.25rem -0.25rem; background: var(--border); }
.menu-item {
	display: flex; align-items: center; gap: 0.5rem; width: 100%;
	padding: 0.4375rem 0.5rem; border: 0; border-radius: var(--radius-sm);
	font: inherit; font-size: 0.875rem; text-align: left; text-decoration: none;
	color: inherit; background: none; cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { outline: none; background: var(--muted); }
.menu-item .icon { color: var(--muted-foreground); }
.menu-item.danger { color: var(--destructive); }
.menu-item.danger .icon { color: currentColor; }
.menu form { display: block; margin: 0; }
.menu-item-text { display: grid; gap: 0.125rem; }
.menu-item-text small { color: var(--muted-foreground); font-size: 0.75rem; }

/* Dialogs are popovers opened by their button; after a failed submit the page
   comes back with the dialog drawn open in .modal-layer instead. */
.modal {
	width: min(32rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem);
	margin: auto; padding: 1.5rem; overflow-y: auto; overscroll-behavior: contain;
	color: var(--foreground); background: var(--popover);
	border: 0; border-radius: var(--radius-xl);
	box-shadow: var(--shadow-lg), 0 0 0 1px var(--hairline);
}
.modal.wide { width: min(42rem, calc(100vw - 2rem)); }
.modal::backdrop { background: var(--overlay); backdrop-filter: blur(4px); }
.modal-form { display: flex; flex-direction: column; gap: 1rem; margin: 0; }
.modal-head { display: grid; gap: 0.5rem; padding-right: 2rem; }
.modal-title { font-size: 1rem; font-weight: 500; line-height: 1.25; }
.modal-desc { color: var(--muted-foreground); }
.modal-x {
	position: absolute; top: 0.75rem; right: 0.75rem;
	display: grid; place-items: center; width: 2rem; height: 2rem;
	color: var(--muted-foreground); background: none; border: 0; border-radius: var(--radius-md);
	cursor: pointer;
}
.modal-x:hover { color: var(--foreground); background: var(--muted); }
.modal-body { display: flex; flex-direction: column; gap: 1rem; }
.modal-body:empty { display: none; }
.modal-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; padding-top: 0.5rem; }
.modal-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; overflow-y: auto; }
.modal-scrim { position: fixed; inset: 0; background: var(--overlay); backdrop-filter: blur(4px); }
.modal-layer .modal { position: relative; }
.modal { position: fixed; }

/* column-reverse keeps the scroll pinned to the newest line while the log grows. */
.log {
	display: flex; flex-direction: column-reverse;
	height: 70vh; min-height: 20rem; overflow: auto;
	background: var(--log-bg);
	border: 1px solid var(--border); border-radius: var(--radius-md);
}
.log pre {
	margin: 0; padding: 1rem;
	font: 0.8125rem/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
}
/* A log in a dialog (logs.js): wider than a form, and the log takes the
   height. Display only while open, or it would override the popover's hiding. */
.log-popup { width: min(72rem, calc(100vw - 2rem)); }
.log-popup:popover-open { display: flex; flex-direction: column; gap: 1rem; }
.log-popup .log { height: calc(100vh - 9rem); min-height: 12rem; }
.log-picker { margin-bottom: 0.75rem; }
/* Not .terminal: xterm.js puts that class on its own element inside. */
.term-frame {
	height: 70vh; padding: 0.5rem;
	background: #0b0b0e; border: 1px solid var(--border); border-radius: var(--radius-xl);
	overflow: hidden;
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.stat { display: grid; gap: 0.5rem; padding: 1.5rem; }
.stat-label { display: flex; align-items: center; gap: 0.5rem; color: var(--muted-foreground); font-weight: 500; }
.stat-value { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; }
.bar { height: 0.5rem; width: 100%; display: block; border-radius: 999px; overflow: hidden; }
.bar .track { fill: var(--muted); }
.bar .fill { fill: var(--foreground); }
.spark { display: block; width: 100%; height: 2.5rem; color: var(--foreground); }
.spark.sm { max-width: 8rem; height: 1.5rem; }
.spark polyline { fill: none; stroke: currentColor; stroke-width: 1.5; vector-effect: non-scaling-stroke; opacity: 0.8; }

.auth { display: grid; min-height: 100vh; }
.auth-side {
	display: none; flex-direction: column; justify-content: space-between;
	padding: 2.5rem; background: var(--muted); border-right: 1px solid var(--border);
}
.auth-brand { display: flex; align-items: center; gap: 1rem; font-size: 1.125rem; font-weight: 500; }
.auth-brand .sb-logo { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-md); }
.auth-brand .sb-logo .icon { width: 1.5rem; height: 1.5rem; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-box { width: 100%; max-width: 24rem; display: flex; flex-direction: column; gap: 1.5rem; }
.auth-head { display: grid; gap: 0.5rem; text-align: center; justify-items: center; }
.auth-head h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.025em; }
.auth-head .sb-logo { width: 3rem; height: 3rem; border-radius: var(--radius); margin-bottom: 0.5rem; }
.auth-head .sb-logo .icon { width: 1.75rem; height: 1.75rem; }
@media (min-width: 1024px) {
	.auth { grid-template-columns: 1fr 1fr; }
	.auth-side { display: flex; }
}

.center { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.error-box { width: 100%; max-width: 26rem; }

@media (max-width: 767px) {
	.sidebar {
		position: fixed; inset: 0 auto 0 0; height: 100%;
		width: min(var(--sidebar-width), 85vw);
		transform: translateX(-100%); transition: transform 0.2s ease;
		z-index: 60;
	}
	.nav-toggle:checked ~ .app .sidebar { transform: none; }
	.nav-toggle:checked ~ .app .nav-scrim { display: block; position: fixed; inset: 0; z-index: 50; background: var(--overlay); }
	.nav-open { display: grid; }
	.nav-toggle:focus-visible ~ .app .nav-open { box-shadow: 0 0 0 3px var(--ring-soft); }
	.topbar { height: 3.5rem; }
	.frame-head, .card-head { padding: 1.25rem; }
	.frame-body { padding: 1.25rem; }
	.card-body { padding: 0 1.25rem 1.25rem; }
	.card-body:first-child { padding-top: 1.25rem; }
	.tabs { gap: 1rem; }
	.facts { grid-template-columns: 1fr; gap: 0.25rem; }
	.facts dd { margin-bottom: 0.5rem; }
	.badge-stack { flex-direction: row; flex-wrap: wrap; align-items: center; }
}

.code {
	margin: 0; padding: 0.75rem 1rem; max-height: 70vh; overflow: auto;
	background: var(--log-bg); border: 1px solid var(--border); border-radius: var(--radius-md);
	font-size: 0.8125rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere;
}
.files { display: grid; grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.file-list { display: grid; gap: 0.125rem; }
.file-link {
	display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.5rem;
	border-radius: var(--radius-md); color: var(--muted-foreground); font-size: 0.8125rem;
	overflow-wrap: anywhere;
}
.file-link .mono { flex: 1; min-width: 0; }
.file-link:hover { background: var(--muted); color: var(--foreground); }
.file-link.active { background: var(--muted); color: var(--foreground); font-weight: 500; }
@media (max-width: 1023px) {
	.files { grid-template-columns: minmax(0, 1fr); }
}
