/* Light, neutral UI for bv-static tools — does not affect your root SPA/CSS. */
:root {
	color-scheme: light;
	--bg: #f4f4f5;
	--surface: #ffffff;
	--text: #18181b;
	--muted: #71717a;
	--border: #e4e4e7;
	--accent: #ea580c;
	--accent-hover: #c2410c;
	--accent-soft: #fff7ed;
	--danger: #dc2626;
	--danger-bg: #fef2f2;
	--ok: #16a34a;
	--ok-bg: #f0fdf4;
	--warn: #ca8a04;
	--warn-bg: #fefce8;
	--shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
	--radius: 10px;
	--font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		color-scheme: dark;
		--bg: #09090b;
		--surface: #18181b;
		--text: #fafafa;
		--muted: #a1a1aa;
		--border: #27272a;
		--accent: #fb923c;
		--accent-hover: #fdba74;
		--accent-soft: #431407;
		--danger-bg: #450a0a;
		--ok-bg: #052e16;
		--warn-bg: #422006;
		--shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
		--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
	}
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.55;
	background: var(--bg);
	color: var(--text);
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--accent);
	text-underline-offset: 3px;
}
a:hover {
	color: var(--accent-hover);
}

.site-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.75rem;
	padding: 0.65rem 1.25rem;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	box-shadow: var(--shadow);
}
.site-nav a {
	text-decoration: none;
	font-weight: 600;
	font-size: 0.875rem;
	color: var(--text);
	padding: 0.4rem 0.65rem;
	border-radius: 8px;
}
.site-nav a:hover {
	background: var(--bg);
	color: var(--accent);
}
.site-nav .spacer {
	flex: 1;
	min-width: 0.5rem;
}
.site-nav #nav-logout {
	font: inherit;
	font-weight: 600;
	font-size: 0.875rem;
	padding: 0.4rem 0.75rem;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--muted);
	cursor: pointer;
}
.site-nav #nav-logout:hover {
	border-color: var(--danger);
	color: var(--danger);
	background: var(--danger-bg);
}

.site-main {
	max-width: 48rem;
	margin: 0 auto;
	padding: 1.75rem 1.25rem 3rem;
}
.site-main.wide {
	max-width: 72rem;
}

h1 {
	font-size: 1.625rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 0.5rem;
	color: var(--text);
}

.lead {
	margin: 0 0 1.5rem;
	color: var(--muted);
	font-size: 0.975rem;
	max-width: 42rem;
}

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.25rem 1.35rem;
	margin-bottom: 1rem;
	box-shadow: var(--shadow);
}
.card p:last-child {
	margin-bottom: 0;
}

.banner {
	border-radius: var(--radius);
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
	font-size: 0.9rem;
	border: 1px solid var(--border);
}
.banner.warn {
	background: var(--warn-bg);
	border-color: rgba(202, 138, 4, 0.35);
	color: var(--warn);
}
.banner.err {
	background: var(--danger-bg);
	border-color: rgba(220, 38, 38, 0.35);
	color: var(--danger);
}
.banner.ok {
	background: var(--ok-bg);
	border-color: rgba(22, 163, 74, 0.35);
	color: var(--ok);
}

label {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--muted);
	margin: 0.75rem 0 0.35rem;
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
select,
textarea {
	width: 100%;
	max-width: 28rem;
	padding: 0.55rem 0.75rem;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	font: inherit;
	font-size: 0.95rem;
	transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea {
	min-height: 6.5rem;
	max-width: 100%;
	resize: vertical;
}

.row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	margin-top: 0.75rem;
}

button,
.btn {
	cursor: pointer;
	padding: 0.55rem 1.1rem;
	border-radius: 8px;
	border: none;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	display: inline-block;
	background: var(--accent);
	color: #fff;
	box-shadow: var(--shadow);
	transition: background 0.15s, transform 0.05s;
}
button:hover,
.btn:hover {
	background: var(--accent-hover);
	color: #fff;
}
button:active,
.btn:active {
	transform: translateY(1px);
}
button.secondary,
.btn.secondary {
	background: var(--surface);
	color: var(--text);
	border: 1px solid var(--border);
	box-shadow: none;
}
button.secondary:hover,
.btn.secondary:hover {
	background: var(--bg);
	border-color: var(--muted);
	color: var(--text);
}
a.btn:hover {
	color: #fff;
}
a.btn.secondary:hover {
	color: var(--text);
}
button:disabled,
.btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}

button.link-ghost,
.btn.link-ghost {
	background: transparent;
	color: var(--danger);
	border: 1px solid var(--border);
	box-shadow: none;
}
button.link-ghost:hover,
.btn.link-ghost:hover {
	background: var(--danger-bg);
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
	background: var(--surface);
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--border);
}
th,
td {
	text-align: left;
	padding: 0.6rem 0.75rem;
	border-bottom: 1px solid var(--border);
}
th {
	background: var(--bg);
	color: var(--muted);
	font-weight: 600;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
tr:last-child td {
	border-bottom: none;
}
tbody tr:hover td {
	background: var(--accent-soft);
}

.mono {
	font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', monospace;
	font-size: 0.8125rem;
}

.section-title {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 1.25rem 0 0.5rem;
}
.empty {
	color: var(--muted);
	padding: 1rem 0;
	margin: 0;
}

.rcon-grid {
	display: grid;
	gap: 1.25rem;
}
@media (min-width: 768px) {
	.rcon-grid {
		grid-template-columns: 1fr 1fr;
	}
}
fieldset.rcon-fs {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1rem 1.15rem;
	margin: 0;
	background: var(--bg);
}
fieldset.rcon-fs legend {
	font-weight: 700;
	padding: 0 0.35rem;
	color: var(--text);
}
.rcon-fs .row input[type='checkbox'] {
	width: auto;
	max-width: none;
	margin: 0;
}
.rcon-fs label[for$='chpwd'] {
	margin: 0;
	font-weight: 500;
}
.rcon-actions {
	margin-top: 1.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}
.hint {
	font-size: 0.8rem;
	color: var(--muted);
	margin-top: 0.35rem;
}

.rcon-highlight {
	border-color: rgba(234, 88, 12, 0.35);
	background: linear-gradient(135deg, var(--surface) 0%, var(--accent-soft) 100%);
	box-shadow: var(--shadow-md);
}

.rcon-divider {
	border: none;
	border-top: 1px solid var(--border);
	margin: 1rem 0;
}
.rcon-fs .key-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin-top: 0.35rem;
}
.rcon-fs .key-row input.mono {
	flex: 1 1 12rem;
	min-width: 0;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.8rem;
}
.rcon-fs input.mono {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.8rem;
}
