/* ============================================================
   Orion Control Panel — styling.
   Design tokens mirror OrionPayment/donate.css so the two
   surfaces read as the same product line.
   ============================================================ */

:root {
	--primary: #e74c3c;
	--primary-soft: #c46e62;
	--primary-bg-soft: rgba(231, 76, 60, 0.10);
	--primary-bg-strong: rgba(231, 76, 60, 0.22);
	--primary-border: rgba(231, 76, 60, 0.45);

	--accent: rgba(255, 255, 255, 0.9);
	--text: rgba(255, 255, 255, 1);
	--text-mid: rgba(255, 255, 255, 0.78);
	--text-dim: rgba(255, 255, 255, 0.55);
	--text-faint: rgba(255, 255, 255, 0.50);

	--border: rgba(255, 255, 255, 0.10);
	--border-strong: rgba(255, 255, 255, 0.16);

	--glass-row: rgba(255, 255, 255, 0.03);
	--surface-deep: rgba(0, 0, 0, 0.45);
	--surface-row: rgba(0, 0, 0, 0.25);

	--green: #2ecc71;
	--green-bg: rgba(46, 204, 113, 0.10);
	--green-border: rgba(46, 204, 113, 0.35);

	--amber: #f5b041;
	--amber-bg: rgba(245, 176, 65, 0.10);
	--amber-border: rgba(245, 176, 65, 0.35);

	--blue: #5dade2;
	--blue-bg: rgba(93, 173, 226, 0.10);
	--blue-border: rgba(93, 173, 226, 0.35);

	--shell-window: #121413;
	--shell-header: #060608;

	--radius: 6px;
	--font-title: "Montserrat", system-ui, sans-serif;
	--font-ui: "Montserrat", system-ui, sans-serif;
	--font-mono: "Roboto Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

	--surface-1: rgba(255, 255, 255, 0.04);
	--surface-2: rgba(0, 0, 0, 0.28);
	--surface-3: rgba(0, 0, 0, 0.50);

	--shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 1px 2px rgba(0, 0, 0, 0.4);
	--shadow-2: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 4px 12px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.4);
	--shadow-primary-glow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 6px 16px rgba(231, 76, 60, 0.30), 0 1px 2px rgba(0, 0, 0, 0.5);

	--ring: 0 0 0 2px var(--shell-window), 0 0 0 4px var(--primary);

	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
	--ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
	--dur-fast: 120ms;
	--dur-med: 220ms;
	--dur-slow: 360ms;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
	background: var(--shell-window);
	color: var(--text);
	font-family: var(--font-ui);
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
	text-decoration: none;
}

button, input, select, textarea { font-family: inherit; }

/* ── Backdrop ──────────────────────────────────────────────── */

.bg-grid {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-color: var(--shell-window);
	background-image:
		radial-gradient(ellipse at 50% -10%, rgba(231, 76, 60, 0.14), transparent 65%),
		radial-gradient(ellipse at 50% 110%, rgba(231, 76, 60, 0.04), transparent 55%),
		linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px),
		linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.45) 100%);
	background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px, 100% 100%;
}

/* ── Page shell ────────────────────────────────────────────── */

.page {
	position: relative;
	z-index: 1;
	max-width: 1100px;
	margin: 0 auto;
	padding: 24px 24px 64px;
}

/* ── Top bar ───────────────────────────────────────────────── */

.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--border);
	margin-bottom: 8px;
	gap: 16px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.brand__logo {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1px solid var(--border);
	background: var(--shell-header);
}

.brand__name {
	font-family: var(--font-title);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 2.5px;
	color: var(--text);
}

.brand__name span {
	color: var(--text-dim);
	font-weight: 500;
	margin-left: 1px;
}

.topbar__meta {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 1.6px;
	color: var(--text-dim);
	text-transform: uppercase;
	text-align: right;
}

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

.user-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	background: var(--surface-1);
	border: 1px solid var(--border);
	border-radius: 999px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 1.2px;
	color: var(--text-mid);
}

.user-chip::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--green);
	filter: drop-shadow(0 0 4px rgba(46, 204, 113, 0.7));
}

.btn--link {
	background: transparent;
	border: none;
	color: var(--text-dim);
	font-weight: 500;
	font-size: 11px;
	letter-spacing: 1.5px;
	padding: 6px 8px;
	text-transform: uppercase;
	cursor: pointer;
}

.btn--link:hover { color: var(--text); }

/* ── Hero ──────────────────────────────────────────────────── */

.hero {
	display: flex;
	flex-direction: column;
	padding: 28px 0 20px;
	gap: 10px;
}

.hero__title {
	font-family: var(--font-title);
	font-size: 36px;
	letter-spacing: 3px;
	line-height: 1.0;
	color: var(--accent);
	margin: 0;
	text-transform: uppercase;
	font-weight: 700;
	transform: translateX(-2px);
}

.hero__subtitle {
	font-size: 13px;
	color: var(--text-mid);
	letter-spacing: 0.6px;
	margin: 0;
	max-width: 60ch;
	line-height: 1.55;
}

.hero__meta {
	margin: 6px 0 0;
	font-family: var(--font-mono);
	font-size: 11px;
	color: var(--text-dim);
	letter-spacing: 1.4px;
	text-transform: uppercase;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.hero__sep { color: var(--text-faint); opacity: 0.6; }

.hero__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--green);
	filter: drop-shadow(0 0 4px rgba(46, 204, 113, 0.7));
	display: inline-block;
	margin-right: 6px;
	flex-shrink: 0;
}

/* ── Section pattern ───────────────────────────────────────── */

.section { margin-top: 14px; }

.section__header {
	display: flex;
	align-items: center;
	padding: 10px 14px;
	background: var(--surface-1);
	border: 1px solid var(--border);
	border-bottom: none;
	border-radius: var(--radius) var(--radius) 0 0;
	gap: 10px;
	box-shadow: var(--shadow-1);
}

.section__icon {
	font-size: 13px;
	color: var(--primary);
	width: 14px;
	text-align: center;
	flex-shrink: 0;
	line-height: 1;
}

.section__title {
	font-family: var(--font-ui);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 2.2px;
	color: var(--text);
}

.section__spacer { flex: 1; }

.section__count {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 1.6px;
	color: var(--text-dim);
	text-transform: uppercase;
}

.section__body {
	background:
		radial-gradient(ellipse at 50% -20%, rgba(255, 255, 255, 0.04), transparent 60%),
		var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 0 0 var(--radius) var(--radius);
	padding: 18px;
}

.section__body--flush { padding: 0; }

/* ── Hero CTA (sign-in card) ───────────────────────────────── */

.hero-cta {
	margin: 28px auto;
	max-width: 520px;
	padding: 32px 28px;
	text-align: center;
	background:
		radial-gradient(ellipse at 50% -20%, rgba(231, 76, 60, 0.14), transparent 60%),
		var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-2);
}

.hero-cta h1 {
	font-family: var(--font-title);
	font-size: 24px;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	margin: 0 0 12px;
}

.hero-cta p {
	color: var(--text-mid);
	font-size: 13px;
	line-height: 1.55;
	margin: 0 0 20px;
}

/* ── Buttons ───────────────────────────────────────────────── */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 13px 18px;
	border-radius: 4px;
	border: 1px solid transparent;
	font-family: var(--font-ui);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 2.2px;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition:
		background 120ms ease,
		border-color 120ms ease,
		color 120ms ease,
		transform 60ms ease;
}

.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

.btn--primary {
	background: linear-gradient(180deg, #f06556 0%, #e74c3c 50%, #d44232 100%);
	color: #fff;
	border-color: var(--primary);
	box-shadow: var(--shadow-primary-glow);
}

.btn--primary:hover {
	transform: translateY(-1px);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.25) inset,
		0 10px 24px rgba(231, 76, 60, 0.40),
		0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn--secondary {
	background: var(--surface-1);
	border-color: var(--border-strong);
	color: var(--text);
	box-shadow: var(--shadow-1);
}

.btn--secondary:hover {
	border-color: rgba(255, 255, 255, 0.35);
	transform: translateY(-1px);
	box-shadow: var(--shadow-2);
}

/* ── Tier pills ────────────────────────────────────────────── */

.tier {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	padding: 4px 8px;
	border: 1px solid var(--border);
	border-radius: 3px;
	color: var(--text-mid);
	background: var(--surface-1);
}

.tier::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	filter: drop-shadow(0 0 4px currentColor);
	flex-shrink: 0;
}

.tier-official     { color: var(--green);   border-color: var(--green-border);   background: var(--green-bg); }
.tier-partnered    { color: var(--blue);    border-color: var(--blue-border);    background: var(--blue-bg); }
.tier-community    { color: var(--amber);   border-color: var(--amber-border);   background: var(--amber-bg); }
.tier-unauthorized { color: var(--primary); border-color: var(--primary-border); background: var(--primary-bg-soft); }

/* ── Server picker cards ───────────────────────────────────── */

.server-card {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 18px;
	background: var(--surface-1);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-1);
	color: inherit;
	transition:
		border-color var(--dur-med) var(--ease-out),
		transform var(--dur-med) var(--ease-out),
		box-shadow var(--dur-med) var(--ease-out);
	position: relative;
	overflow: hidden;
}

.server-card + .server-card { margin-top: 10px; }

.server-card::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 2px;
	background: linear-gradient(180deg, var(--primary) 0%, rgba(231, 76, 60, 0.35) 100%);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform var(--dur-med) var(--ease-spring);
}

.server-card:hover {
	border-color: var(--primary-border);
	transform: translateY(-1px);
	box-shadow: var(--shadow-2);
}

.server-card:hover::before { transform: scaleY(1); }

.server-card__name {
	flex: 1;
	font-family: var(--font-title);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.4px;
	color: var(--text);
}

.server-card__meta {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 1.4px;
	color: var(--text-dim);
	text-transform: uppercase;
}

.server-card__chev {
	color: var(--text-dim);
	font-family: var(--font-mono);
	font-size: 14px;
}

.server-card:hover .server-card__chev { color: var(--primary); }

.other-servers {
	margin-top: 18px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 1.2px;
	color: var(--text-dim);
}

.other-servers summary { cursor: pointer; padding: 8px 0; }
.other-servers ul { list-style: none; padding: 0; margin: 8px 0 0; }
.other-servers li { padding: 6px 0; display: flex; gap: 10px; align-items: center; }

.empty {
	color: var(--text-dim);
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	text-align: center;
	padding: 18px;
}

/* ── Stat cards ────────────────────────────────────────────── */

.stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 10px;
	margin-top: 14px;
}

.stat {
	padding: 16px 18px;
	background: var(--surface-1);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-1);
}

.stat__value {
	font-family: var(--font-title);
	font-size: 28px;
	font-weight: 700;
	color: var(--text);
	line-height: 1;
}

.stat__label {
	margin-top: 6px;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 1.6px;
	color: var(--text-dim);
	text-transform: uppercase;
}

/* ── Tables ────────────────────────────────────────────────── */

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

th, td {
	padding: 10px 14px;
	text-align: left;
	border-bottom: 1px solid var(--border);
	font-size: 13px;
}

th {
	background: var(--surface-1);
	color: var(--text-dim);
	font-family: var(--font-mono);
	font-weight: 500;
	text-transform: uppercase;
	font-size: 10px;
	letter-spacing: 1.4px;
}

tbody tr:hover { background: var(--glass-row); }
tbody tr:last-child td { border-bottom: none; }

.mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-mid); }

code {
	font-family: var(--font-mono);
	font-size: 12px;
	color: var(--text-mid);
	background: var(--surface-3);
	padding: 2px 6px;
	border-radius: 3px;
	border: 1px solid var(--border);
}

.t-output {
	color: var(--text-dim);
	font-size: 12px;
	max-width: 360px;
	overflow-wrap: anywhere;
}

/* ── Status chips ──────────────────────────────────────────── */

.status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	padding: 3px 8px;
	border: 1px solid var(--border);
	border-radius: 3px;
}

.status-pending { color: var(--amber);   border-color: var(--amber-border);   background: var(--amber-bg); }
.status-leased  { color: var(--blue);    border-color: var(--blue-border);    background: var(--blue-bg); }
.status-done    { color: var(--green);   border-color: var(--green-border);   background: var(--green-bg); }
.status-error   { color: var(--primary); border-color: var(--primary-border); background: var(--primary-bg-soft); }

/* ── Action forms ──────────────────────────────────────────── */

.action-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 12px;
}

.action-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px;
	background: var(--surface-1);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-1);
	transition: border-color var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}

.action-card:focus-within {
	border-color: var(--primary-border);
	box-shadow: var(--shadow-2);
}

.action-card h3 {
	margin: 0 0 4px;
	font-family: var(--font-title);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 2.2px;
	text-transform: uppercase;
	color: var(--text);
	padding-bottom: 8px;
	border-bottom: 1px solid var(--border);
}

.action-card label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: var(--text-dim);
}

.action-card input,
.action-card select {
	background: var(--surface-3);
	border: 1px solid var(--border);
	color: var(--text);
	padding: 9px 10px;
	border-radius: 4px;
	font-family: var(--font-mono);
	font-size: 12px;
	letter-spacing: 0.3px;
	outline: none;
	transition: border-color var(--dur-med) var(--ease-out);
}

.action-card input:focus,
.action-card select:focus { border-color: var(--primary-border); }

.action-card button {
	margin-top: 4px;
	background: linear-gradient(180deg, #f06556 0%, #e74c3c 50%, #d44232 100%);
	color: #fff;
	border: 1px solid var(--primary);
	border-radius: 4px;
	padding: 10px 14px;
	font-family: var(--font-ui);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 2.2px;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: var(--shadow-primary-glow);
	transition: transform 60ms ease, box-shadow 120ms ease;
}

.action-card button:hover {
	transform: translateY(-1px);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.25) inset,
		0 10px 24px rgba(231, 76, 60, 0.40),
		0 1px 2px rgba(0, 0, 0, 0.5);
}

.action-card button:active { transform: translateY(1px); }

/* ── Flash banners ─────────────────────────────────────────── */

.banner {
	padding: 10px 14px;
	border-radius: 4px;
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 1.4px;
	text-align: center;
	border: 1px solid;
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.banner::before {
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

.banner--ok {
	background: var(--green-bg);
	border-color: var(--green-border);
	color: #9ee5b8;
}

.banner--ok::before { content: "✓"; color: var(--green); }

.banner--warn {
	background: var(--primary-bg-soft);
	border-color: var(--primary-border);
	color: #ffb0a3;
}

.banner--warn::before { content: "!"; color: var(--primary); }

/* ── Server head (per-server page) ─────────────────────────── */

.server-head {
	margin: 8px 0 4px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.server-head h1 {
	font-family: var(--font-title);
	font-size: 28px;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	margin: 0;
	color: var(--accent);
}

.server-head .meta {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: var(--text-dim);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

.back {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	color: var(--text-dim);
	margin-bottom: 8px;
	display: inline-block;
}

.back:hover { color: var(--primary); }

/* ── Meta detail ───────────────────────────────────────────── */

.meta-detail { margin-top: 18px; }

.meta-detail summary {
	cursor: pointer;
	color: var(--text-dim);
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	padding: 6px 0;
}

.meta-detail summary:hover { color: var(--primary); }

.meta-detail dl {
	margin: 12px 0 0;
	display: grid;
	grid-template-columns: 160px 1fr;
	gap: 6px 16px;
}

.meta-detail dt {
	color: var(--text-dim);
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 1.4px;
	text-transform: uppercase;
}

.meta-detail dd {
	margin: 0;
	color: var(--text-mid);
	font-size: 12px;
}

/* ── Footer ────────────────────────────────────────────────── */

.foot {
	margin-top: 40px;
	padding-top: 16px;
	border-top: 1px solid var(--border);
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 12px;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 1.4px;
	color: var(--text-faint);
	text-transform: uppercase;
}

.foot__sep { color: var(--text-faint); opacity: 0.5; }

/* ── Access-denied page ────────────────────────────────────── */

.denied {
	margin: 40px auto;
	max-width: 520px;
	padding: 32px;
	background:
		radial-gradient(ellipse at 50% -20%, rgba(231, 76, 60, 0.14), transparent 60%),
		var(--surface-2);
	border: 1px solid var(--primary-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-2);
	text-align: center;
}

.denied h1 {
	font-family: var(--font-title);
	font-size: 20px;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: var(--primary);
	margin: 0 0 16px;
}

.denied p {
	color: var(--text-mid);
	font-size: 13px;
	line-height: 1.55;
	margin: 0 0 12px;
}

.denied strong { color: var(--text); }

/* ── Quick link chip (e.g. "CAMERAS →") ────────────────────── */

.quick-link {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	padding: 4px 10px;
	border: 1px solid var(--primary-border);
	border-radius: 3px;
	color: var(--primary);
	background: var(--primary-bg-soft);
	transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.quick-link:hover {
	background: var(--primary-bg-strong);
	color: #fff;
	text-decoration: none;
}

/* ── Camera grid ───────────────────────────────────────────── */

.camera-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 14px;
	margin-top: 16px;
}

.camera {
	display: flex;
	flex-direction: column;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-1);
	overflow: hidden;
	transition: border-color var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}

.camera:hover {
	border-color: var(--primary-border);
	transform: translateY(-1px);
	box-shadow: var(--shadow-2);
}

.camera__feed {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--shell-header);
	overflow: hidden;
}

.camera__feed img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: contrast(1.05) saturate(0.9);
}

/* Subtle CRT scanline overlay over the camera image */
.camera__feed::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: repeating-linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.18) 0px,
		rgba(0, 0, 0, 0.18) 1px,
		transparent 1px,
		transparent 3px
	);
	mix-blend-mode: multiply;
	opacity: 0.5;
}

.camera__badge {
	position: absolute;
	top: 8px;
	left: 8px;
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: 1.6px;
	font-weight: 700;
	padding: 3px 7px;
	border-radius: 3px;
	border: 1px solid currentColor;
	background: rgba(0, 0, 0, 0.55);
	z-index: 1;
}

.camera__zone {
	position: absolute;
	top: 8px;
	right: 8px;
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.85);
	background: rgba(0, 0, 0, 0.55);
	padding: 3px 7px;
	border-radius: 3px;
	z-index: 1;
}

.camera.cam-live    .camera__badge { color: var(--green);   border-color: var(--green-border); }
.camera.cam-stale   .camera__badge { color: var(--amber);   border-color: var(--amber-border); }
.camera.cam-offline .camera__badge { color: var(--primary); border-color: var(--primary-border); }

.camera.cam-offline .camera__feed img { filter: grayscale(0.85) brightness(0.5); }
.camera.cam-stale   .camera__feed img { filter: brightness(0.8); }

.camera__meta {
	padding: 10px 12px;
	background: var(--surface-1);
	border-top: 1px solid var(--border);
}

.camera__name {
	font-family: var(--font-title);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.4px;
	color: var(--text);
	margin-bottom: 4px;
}

.camera__sub {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 1.2px;
	color: var(--text-dim);
	text-transform: uppercase;
}

.camera__age { color: var(--text-mid); }

.cameras-hint {
	margin: 8px 0 0;
	font-size: 12px;
	color: var(--text-mid);
	line-height: 1.5;
	max-width: 64ch;
}

.cameras-hint code {
	font-size: 10px;
}

/* ── Search bar ────────────────────────────────────────────── */

.search-wrap {
	position: relative;
	margin: 12px 0 8px;
}

.search-wrap input {
	width: 100%;
	padding: 14px 18px 14px 44px;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--text);
	font-family: var(--font-mono);
	font-size: 13px;
	letter-spacing: 0.3px;
	outline: none;
	transition: border-color var(--dur-med) var(--ease-out);
}

.search-wrap input:focus {
	border-color: var(--primary-border);
	box-shadow: var(--shadow-2);
}

.search-wrap::before {
	content: "⌕";
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-dim);
	font-size: 16px;
	font-family: var(--font-mono);
	pointer-events: none;
}

.search-wrap .kbd {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: 1.4px;
	color: var(--text-dim);
	padding: 3px 6px;
	border: 1px solid var(--border);
	border-radius: 3px;
	background: var(--surface-3);
	pointer-events: none;
}

body[data-search-active="1"] [data-category][data-empty="1"] {
	display: none;
}

body[data-search-empty="1"]::after {
	content: "No commands match.";
	display: block;
	text-align: center;
	color: var(--text-dim);
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	padding: 32px;
}

/* ── Category headers (collapsible) ────────────────────────── */

[data-collapse] {
	margin-left: auto;
	background: transparent;
	border: 1px solid var(--border);
	color: var(--text-dim);
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: 1.4px;
	padding: 4px 8px;
	border-radius: 3px;
	cursor: pointer;
	transition: color var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out);
}

[data-collapse]:hover { color: var(--primary); border-color: var(--primary-border); }

[data-category][data-collapsed="1"] .section__body { display: none; }
[data-category][data-collapsed="1"] .section__header {
	border-radius: var(--radius);
	border-bottom: 1px solid var(--border);
}

/* ── Command card additions: favorite star, flash, destructive tag ── */

.action-card { position: relative; }

.action-card[data-flash="1"] {
	border-color: var(--primary);
	box-shadow: var(--shadow-primary-glow);
}

.action-card__head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--border);
	margin: 0 0 4px;
}

.action-card__icon {
	font-size: 14px;
	color: var(--primary);
	flex-shrink: 0;
	line-height: 1;
}

.action-card__title {
	flex: 1;
	font-family: var(--font-title);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 2.2px;
	text-transform: uppercase;
	color: var(--text);
}

.action-card__min-rank {
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: 1.4px;
	color: var(--text-dim);
	text-transform: uppercase;
}

.action-card__desc {
	margin: 0 0 6px;
	font-size: 11px;
	color: var(--text-dim);
	line-height: 1.5;
}

.action-card[data-destructive="1"] {
	border-left: 2px solid var(--primary);
}

.fav-star {
	background: transparent;
	border: none;
	color: var(--text-dim);
	font-size: 14px;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
	line-height: 1;
	transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-spring);
}

.fav-star:hover {
	color: var(--amber);
	transform: scale(1.15);
}

.fav-star--on {
	color: var(--amber);
}

/* ── Quick-action chips on player rows ─────────────────────── */

.player-actions {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
}

.player-action {
	font-family: var(--font-mono);
	font-size: 9px;
	letter-spacing: 1.2px;
	padding: 4px 8px;
	border: 1px solid var(--border);
	background: var(--surface-3);
	color: var(--text-dim);
	border-radius: 3px;
	cursor: pointer;
	text-transform: uppercase;
	transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.player-action:hover {
	color: var(--primary);
	border-color: var(--primary-border);
	background: var(--primary-bg-soft);
}

/* ── Datalist-styled steamid hint ──────────────────────────── */

.action-card input[list]::-webkit-calendar-picker-indicator {
	filter: invert(0.6);
	cursor: pointer;
}

/* ── Favorites pinned section ──────────────────────────────── */

[data-category="favorites"] .section__header { background: var(--primary-bg-soft); border-color: var(--primary-border); }
[data-category="favorites"] .section__icon  { color: var(--amber); }

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 760px) {
	.page { padding: 16px 14px 48px; }
	.topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
	.hero__title { font-size: 28px; letter-spacing: 2px; }
	.server-head h1 { font-size: 22px; letter-spacing: 1.8px; }
	.meta-detail dl { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0ms !important;
	}
}
