@font-face {
	font-family: 'B612';
	src: url('../../common/fonts/b612/b612-regular.ttf') format('truetype');
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: 'B612';
	src: url('../../common/fonts/b612/b612-bold.ttf') format('truetype');
	font-style: normal;
	font-weight: 700;
	font-display: swap;
}
@font-face {
	font-family: 'B612 Mono';
	src: url('../../common/fonts/b612/b612-mono-regular.ttf') format('truetype');
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: 'B612 Mono';
	src: url('../../common/fonts/b612/b612-mono-bold.ttf') format('truetype');
	font-style: normal;
	font-weight: 700;
	font-display: swap;
}

@keyframes pulse-glow {
	0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--accent), 0 0 16px rgba(255,107,26,0.28); }
	50% { opacity: 0.6; box-shadow: 0 0 4px var(--accent), 0 0 8px rgba(255,107,26,0.16); }
}

:root {
	--brand-cyan: #00b7f9;
	--brand-cyan-soft: #58d2ff;
	--brand-cyan-bright: #b6eeff;
	--brand-cyan-deep: #0088bb;
	--brand-orange: #ff6b1a;
	--brand-orange-soft: #ff9f6a;
	--brand-orange-bright: #ffd0b3;
	--bg-color: #020913;
	--bg-secondary: #07131f;
	--surface: rgba(7, 19, 31, 0.9);
	--surface-elevated: rgba(10, 28, 43, 0.96);
	--surface-hover: rgba(0, 183, 249, 0.08);
	--card: rgba(7, 19, 31, 0.84);
	--text-primary: var(--brand-cyan-soft);
	--text-secondary: rgba(139, 222, 255, 0.82);
	--text-muted: rgba(101, 161, 188, 0.78);
	--primary: var(--brand-cyan);
	--primary-light: rgba(0, 183, 249, 0.18);
	--primary-dark: var(--brand-cyan-deep);
	--secondary: var(--brand-cyan-soft);
	--accent: var(--brand-orange);
	--success: #34d399;
	--success-bg: rgba(52, 211, 153, 0.1);
	--success-border: rgba(52, 211, 153, 0.3);
	--success-text: #7ef0bb;
	--warning: var(--brand-orange);
	--warning-bg: rgba(255, 107, 26, 0.12);
	--warning-border: rgba(255, 107, 26, 0.32);
	--warning-text: #ffc29f;
	--error: #fb7185;
	--error-bg: rgba(251, 113, 133, 0.12);
	--error-border: rgba(251, 113, 133, 0.3);
	--error-text: #fecdd3;
	--info: var(--brand-cyan);
	--info-bg: rgba(0, 183, 249, 0.1);
	--info-border: rgba(0, 183, 249, 0.28);
	--info-text: var(--brand-cyan-bright);
	--border: rgba(67, 149, 182, 0.22);
	--border-hover: rgba(98, 205, 246, 0.36);
	--shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.18);
	--shadow-md: 0 14px 32px rgba(0, 0, 0, 0.24);
	--shadow-lg: 0 18px 38px rgba(0, 0, 0, 0.28);
	--shadow-xl: 0 22px 48px rgba(0, 0, 0, 0.34);
	--radius: 10px;
	--radius-sm: 6px;
	--radius-md: 10px;
	--radius-lg: 16px;
	--radius-xl: 20px;
	--font-sans: 'B612', 'Segoe UI', sans-serif;
	--font-mono: 'B612 Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
	font-family: var(--font-sans);
	font-size: 14px;
	background: var(--bg-color);
	color: var(--text-primary);
	min-height: 100vh;
}
body::before {
	content: '';
	position: fixed;
	inset: 0;
	background:
		radial-gradient(ellipse 80% 60% at 10% 0%, rgba(0,183,249,0.12) 0%, transparent 60%),
		radial-gradient(ellipse 60% 50% at 90% 100%, rgba(255,107,26,0.08) 0%, transparent 60%);
	pointer-events: none;
	z-index: 0;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

body.admin-page { overflow: hidden; height: 100vh; }
.admin-shell { display: flex; height: 100vh; overflow: hidden; position: relative; z-index: 1; }
.admin-nav {
	width: 210px;
	flex-shrink: 0;
	background:
		linear-gradient(180deg, rgba(5, 16, 26, 0.98), rgba(2, 10, 18, 0.98)),
		linear-gradient(180deg, rgba(0, 174, 240, 0.06), rgba(255, 107, 26, 0.04));
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	padding: 0 0 16px;
}
.admin-nav-header {
	border-bottom: 1px solid var(--border);
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 10px 10px 12px;
}
.admin-nav-title { display: block; width: 100%; }
.admin-nav-logo-img { display: block; width: 100%; height: auto; }
.admin-nav-item {
	display: block;
	padding: 9px 16px 9px 14px;
	text-decoration: none;
	color: var(--text-secondary);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 600;
	transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
	border-left: 3px solid transparent;
}
.admin-nav-item:hover {
	color: var(--brand-cyan-bright);
	background: linear-gradient(90deg, rgba(0, 174, 240, 0.12), rgba(255, 107, 26, 0.03));
	text-decoration: none;
}
.admin-nav-item.active {
	color: var(--accent);
	border-left-color: var(--accent);
	background: linear-gradient(90deg, rgba(255, 107, 26, 0.16), rgba(255, 107, 26, 0.04));
	box-shadow: inset 0 0 0 1px rgba(255, 107, 26, 0.08);
}

.admin-main {
	flex: 1;
	min-width: 0;
	position: relative;
	display: flex;
	flex-direction: column;
}

.admin-toolbar {
	position: fixed;
	top: 16px;
	right: 20px;
	z-index: 40;
	display: flex;
	justify-content: flex-end;
	pointer-events: none;
}

.admin-account-card {
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: rgba(7, 19, 31, 0.78);
	box-shadow: var(--shadow-sm);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.admin-account-name {
	color: var(--brand-cyan-bright);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.admin-account-links {
	display: inline-flex;
	gap: 10px;
	align-items: center;
}
.admin-account-links a {
	color: var(--accent);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
}

.admin-content {
	flex: 1;
	overflow-y: auto;
	padding: 16px 20px 28px;
	position: relative;
	min-width: 0;
}

h1 {
	font-size: 18px;
	font-weight: 600;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: var(--brand-cyan-bright);
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
}
h1::before {
	content: '';
	display: inline-block;
	width: 8px;
	height: 8px;
	background: var(--accent);
	border-radius: 2px;
	box-shadow: 0 0 8px var(--accent), 0 0 16px rgba(255,107,26,0.24);
	animation: pulse-glow 2.5s ease-in-out infinite;
}
h2, h3, h4, h5, h6 {
	color: var(--brand-cyan-bright);
	margin: 0 0 10px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
p { margin: 0 0 12px; color: var(--text-secondary); }

.card,
.block,
.dashboard-panel,
#content > div:not(.ws-app):not(.demo-section) {
	background: var(--card);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 14px;
	position: relative;
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
	margin-bottom: 14px;
}
.card::before,
.block::before,
.dashboard-panel::before,
#content > div:not(.ws-app):not(.demo-section)::before {
	content: '';
	position: absolute;
	top: 0;
	left: 12px;
	right: 12px;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
	opacity: 0.55;
}
.card:hover,
.block:hover,
.dashboard-panel:hover,
#content > div:not(.ws-app):not(.demo-section):hover {
	border-color: var(--border-hover);
	box-shadow: var(--shadow-md);
}

form { max-width: 760px; }
form > div { display: grid; gap: 6px; margin-bottom: 12px; }
label {
	color: var(--text-muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
}
input, select, textarea {
	width: 100%;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: rgba(3, 7, 18, 0.55);
	color: var(--brand-cyan-bright);
	padding: 10px 12px;
	font: inherit;
}
textarea { min-height: 120px; }
input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: var(--border-hover);
	box-shadow: 0 0 0 3px rgba(0, 183, 249, 0.12);
}
button, .btn, input[type="submit"] {
	border: 1px solid var(--border);
	background: rgba(255, 107, 26, 0.12);
	color: var(--brand-orange-bright);
	border-radius: var(--radius);
	padding: 10px 14px;
	font: inherit;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
button:hover, .btn:hover, input[type="submit"]:hover {
	background: rgba(255, 107, 26, 0.18);
	border-color: rgba(255, 107, 26, 0.42);
	text-decoration: none;
}
button:active, .btn:active { transform: translateY(1px); }

.banner {
	border-radius: var(--radius);
	padding: 10px 12px;
	border: 1px solid var(--border);
	background: rgba(0, 183, 249, 0.08);
	color: var(--text-secondary);
	margin-bottom: 12px;
}
.banner.success { background: var(--success-bg); border-color: var(--success-border); color: var(--success-text); }
.banner.warning { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning-text); }
.banner.error, .error { background: var(--error-bg); border-color: var(--error-border); color: var(--error-text); }

table {
	width: 100%;
	border-collapse: collapse;
	background: rgba(3, 7, 18, 0.42);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
}
th, td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--border);
	text-align: left;
	vertical-align: top;
}
th {
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-muted);
	background: rgba(0, 183, 249, 0.08);
}
tr:last-child td { border-bottom: none; }

code, pre { font-family: var(--font-mono); }
pre {
	padding: 12px;
	background: rgba(3, 7, 18, 0.55);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	overflow: auto;
}

@media (max-width: 980px) {
	.admin-shell { flex-direction: column; height: auto; min-height: 100vh; }
	.admin-nav {
		width: 100%;
		flex-direction: row;
		overflow-x: auto;
		padding-bottom: 0;
	}
	.admin-nav-header { min-width: 180px; margin-bottom: 0; border-bottom: 0; border-right: 1px solid var(--border); }
	.admin-nav-item { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
	.admin-nav-item.active { border-bottom-color: var(--accent); border-left-color: transparent; }
	.admin-toolbar { position: static; justify-content: flex-start; margin: 16px 20px 0; }
	.admin-content { padding-top: 12px; }
}