/* Vanto serverpanel - Vanto web designsystem (moerkt): baggrund -> kort -> korthoved.
   Tokens kopieret fra Tools/vanto-db/public/style.css. Ingen eksterne skrifttyper eller ikoner (CSP 'self'). */

:root {
	--bg: #080706;
	--paper: #121110;
	--paper-head: #1b1916;
	--divider: rgba(232, 217, 188, 0.10);
	--text: #f3ede2;
	--text-2: rgba(243, 237, 226, 0.7);
	--text-3: rgba(243, 237, 226, 0.5);
	--cream: #e8d9bc;
	--primary: #ff5c1c;
	--primary-light: #ff7a45;
	--primary-border: rgba(255, 92, 28, 0.5);
	--primary-hover: rgba(255, 92, 28, 0.08);
	--primary-active: rgba(255, 92, 28, 0.16);
	--green: #10b981;
	--red: #f44336;
	--orange: #ffa726;
	--radius: 6px;

	--row-line: #34302a;
	--th-bg: rgba(232, 217, 188, 0.06);
	--hover: rgba(232, 217, 188, 0.04);
	--chip-green: #2e7d32;
	--chip-red: #c62828;
	--chip-orange: #ed6c02;
	--chip-neutral: rgba(232, 217, 188, 0.14);
	--series-1: var(--cream);
	--series-track: rgba(232, 217, 188, 0.18);
	--grid: rgba(232, 217, 188, 0.08);
	--font-sans: Roboto, "Segoe UI", Helvetica, Arial, sans-serif;
	--font-mono: ui-monospace, Consolas, "Courier New", monospace;

	color-scheme: dark;
}

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	min-width: 320px;
	background: var(--bg);
	color: var(--text);
	font: 400 14px/20px var(--font-sans);
	-webkit-font-smoothing: antialiased;
}

button {
	font: inherit;
	color: inherit;
	cursor: pointer;
}

h1,
h2,
p,
pre {
	margin: 0;
}

a {
	color: var(--primary);
	text-decoration: none;
}

a:hover {
	color: var(--primary-light);
}

:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 2px;
}

::selection {
	background: rgba(255, 92, 28, 0.35);
}

.skip {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 100;
	padding: 8px 12px;
	border-radius: var(--radius);
	background: var(--paper-head);
	color: var(--text);
}

.skip:focus {
	left: 16px;
}

.muted {
	color: var(--text-3);
}

.mono {
	font-family: var(--font-mono);
	font-size: 13px;
}

.nowrap {
	white-space: nowrap;
}

.note {
	font-size: 13px;
	line-height: 18px;
	color: var(--text-3);
}

/* ---------- header ---------- */

.header {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 16px;
	height: 64px;
	padding: 0 24px;
	background: var(--paper);
	border-bottom: 1px solid var(--divider);
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
}

.brand-logo {
	display: block;
	height: 28px;
	width: auto;
}

.brand-tag {
	padding: 2px 6px;
	border: 1px solid rgba(232, 217, 188, 0.3);
	border-radius: 4px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: var(--cream);
}

.header-info {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
	font-size: 13px;
}

/* ---------- layout ---------- */

.main {
	display: grid;
	gap: 16px;
	max-width: 1440px;
	margin: 0 auto;
	padding: 24px;
}

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

.foot {
	padding: 4px 0 16px;
}

/* ---------- banner ---------- */

.banner {
	display: grid;
	gap: 20px;
	padding: 24px;
	border-radius: var(--radius);
	background:
		radial-gradient(ellipse at 20% 120%, rgba(255, 92, 28, 0.35), transparent 55%),
		radial-gradient(ellipse at 85% -20%, rgba(232, 217, 188, 0.10), transparent 50%),
		linear-gradient(135deg, #1a1410 0%, #0b0908 60%, #15110e 100%);
}

@media (min-width: 1100px) {
	.banner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
		align-items: center;
	}
}

.hero {
	display: grid;
	gap: 8px;
	min-width: 0;
}

.hero-eyebrow {
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: var(--cream);
}

.hero-title {
	font-size: 24px;
	font-weight: 400;
	line-height: 32px;
	overflow-wrap: anywhere;
}

.hero-sub {
	color: var(--text-2);
}

.hero-label {
	font-size: 13px;
	color: var(--text-2);
}

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

.kpi {
	padding: 14px 16px;
	border-radius: var(--radius);
	background: rgba(18, 17, 16, 0.8);
	border: 1px solid var(--divider);
}

.kpi-label {
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: var(--text-3);
}

.kpi-value {
	margin-top: 4px;
	font-size: 24px;
	line-height: 30px;
	font-variant-numeric: tabular-nums;
}

.kpi-sub {
	font-size: 12px;
	color: var(--text-3);
	font-variant-numeric: tabular-nums;
}

.kpis > .skeleton {
	grid-column: 1 / -1;
}

/* ---------- cards ---------- */

.card {
	min-width: 0;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--paper);
}

.card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 48px;
	padding: 12px 16px;
	background: var(--paper-head);
	border-bottom: 2px solid var(--primary);
}

.card-title {
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	letter-spacing: 0.4px;
	text-transform: uppercase;
}

.card-sub {
	font-size: 13px;
	line-height: 18px;
	color: var(--text-3);
	text-transform: none;
}

.card-body {
	display: grid;
	gap: 10px;
	padding: 16px;
}

/* device names, mount points and interfaces keep their case (/dev/md2 is not /DEV/MD2) */
.stat-head {
	margin-top: 6px;
	padding-top: 10px;
	border-top: 1px solid var(--divider);
	font: 500 13px/18px var(--font-mono);
	color: var(--text-2);
	overflow-wrap: anywhere;
}

.stat-head:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.stat-row {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 24px;
}

.stat-label {
	color: var(--text-2);
}

.stat-value {
	margin-left: auto;
	text-align: right;
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

.empty {
	display: grid;
	place-items: center;
	min-height: 72px;
	padding: 16px;
	color: var(--text-3);
	font-size: 13px;
	line-height: 18px;
	text-align: center;
}

/* ---------- meters and graph ---------- */

.meter {
	height: 6px;
	border-radius: 3px;
	background: var(--series-track);
	overflow: hidden;
}

.meter span {
	display: block;
	height: 100%;
	background: var(--series-1);
	border-radius: 3px;
	transition: width 0.4s ease;
}

.meter-orange span {
	background: var(--orange);
}

.meter-red span {
	background: var(--red);
}

.spark {
	display: block;
	width: 100%;
	height: 56px;
	margin: 4px 0;
}

.spark-grid {
	stroke: var(--grid);
	stroke-width: 1;
	vector-effect: non-scaling-stroke;
}

.spark-line {
	fill: none;
	stroke: var(--series-1);
	stroke-width: 2;
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
}

.cores {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 6px 16px;
}

.core {
	display: grid;
	grid-template-columns: 22px 1fr;
	align-items: center;
	gap: 8px;
}

.core-label {
	font-size: 12px;
	color: var(--text-3);
	text-align: right;
	font-variant-numeric: tabular-nums;
}

/* ---------- chips and buttons ---------- */

.chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 24px;
	padding: 0 9px;
	border-radius: 12px;
	font-size: 13px;
	font-weight: 400;
	line-height: 24px;
	letter-spacing: normal;
	text-transform: none;
	color: #fff;
	white-space: nowrap;
}

.chip-green {
	background: var(--chip-green);
}

.chip-red {
	background: var(--chip-red);
}

.chip-orange {
	background: var(--chip-orange);
}

.chip-neutral {
	background: var(--chip-neutral);
	color: var(--text);
}

.chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 16px;
	border: 0;
	border-radius: var(--radius);
	background: var(--primary);
	color: #121110;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	letter-spacing: 0.4px;
	text-transform: uppercase;
}

.btn:hover {
	filter: brightness(1.08);
	color: #121110;
}

.btn-outline {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border: 1px solid var(--primary-border);
	border-radius: var(--radius);
	background: transparent;
	color: var(--primary);
	font-size: 13px;
	font-weight: 500;
	line-height: 18px;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	white-space: nowrap;
}

.btn-outline:hover {
	background: var(--primary-hover);
	border-color: var(--primary);
	color: var(--primary);
}

.btn-outline[aria-pressed="true"] {
	background: var(--primary-active);
}

.btn-outline:disabled {
	opacity: 0.6;
	cursor: default;
}

/* ---------- tables and log ---------- */

.table-wrap,
#services {
	overflow-x: auto;
}

.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.table th {
	padding: 12px 16px;
	background: var(--th-bg);
	font-size: 12px;
	font-weight: 700;
	line-height: 16px;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	color: var(--text-2);
	text-align: left;
	white-space: nowrap;
}

.table td {
	padding: 12px 16px;
	border-bottom: 1px solid var(--row-line);
	vertical-align: middle;
}

.table tbody tr:last-child td {
	border-bottom: 0;
}

.table .num {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.table td.wrap {
	min-width: 240px;
}

.cmd {
	overflow-wrap: anywhere;
	color: var(--text-2);
}

.log {
	max-height: 360px;
	overflow: auto;
	padding: 16px;
	font: 12px/18px var(--font-mono);
	color: var(--text-2);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

/* ---------- skeleton ---------- */

.skeleton {
	display: grid;
	gap: 10px;
	padding: 16px;
}

.card-body > .skeleton {
	padding: 0;
}

.skeleton span {
	display: block;
	height: 12px;
	border-radius: 4px;
	background: var(--paper-head);
	animation: pulse 1.4s ease-in-out infinite;
}

.skeleton span:nth-child(2) {
	width: 80%;
}

.skeleton span:nth-child(3) {
	width: 60%;
}

@keyframes pulse {
	50% {
		opacity: 0.45;
	}
}

@media (prefers-reduced-motion: reduce) {
	.skeleton span {
		animation: none;
	}

	.meter span {
		transition: none;
	}
}

/* ---------- login and message pages ---------- */

.auth-body {
	display: grid;
	min-height: 100vh;
	place-items: center;
	padding: 24px 16px;
	background:
		radial-gradient(ellipse at 15% 110%, rgba(255, 92, 28, 0.22), transparent 55%),
		radial-gradient(ellipse at 90% -10%, rgba(232, 217, 188, 0.07), transparent 50%),
		var(--bg);
}

.auth {
	display: grid;
	justify-items: center;
	gap: 24px;
	width: 100%;
	max-width: 420px;
}

.auth-logo {
	height: 32px;
	width: auto;
}

.auth-card {
	width: 100%;
}

.auth-body-inner {
	display: grid;
	gap: 12px;
	padding: 20px;
}

.auth-actions {
	margin-top: 8px;
}

.notice {
	padding: 10px 12px;
	border-radius: var(--radius);
	background: rgba(232, 217, 188, 0.08);
	color: var(--cream);
	font-size: 13px;
}

/* ---------- small screens ---------- */

@media (max-width: 640px) {
	.header {
		padding: 0 16px;
		gap: 10px;
	}

	.brand-tag,
	#updated {
		display: none;
	}

	.main {
		padding: 16px;
	}

	.banner {
		padding: 16px;
	}

	.grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
