/* Header */
.header {
	padding: 16px 20px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(243, 248, 250, 0.92) 100%);
	border-bottom: 1px solid var(--vct-border);
	backdrop-filter: blur(10px);
}

.header-inner {
	max-width: 1070px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 12px;
}

.header-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	text-decoration: none;
}

.header-logo {
	width: 42px;
	height: 42px;
	display: block;
	flex: 0 0 auto;
}

.header-copy {
	min-width: 0;
}

.header-kicker {
	margin: 0 0 2px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--vct-accent);
}

.header h1 {
	margin: 0;
	font-size: 1.45rem;
	line-height: 1.15;
	color: var(--vct-text);
}

.header-nav {
	display: flex;
	gap: 12px;
	justify-self: center;
}

.header-nav a {
	font-size: 1rem;
	text-decoration: none;
	color: var(--vct-text-muted);
	padding: 2px 0;
	border: 0;
	background: transparent;
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.header-nav a:hover {
	color: var(--vct-text);
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 1.5px;
	text-decoration-color: var(--vct-border-strong);
}

.header-nav a:focus-visible {
	outline: none;
	border-radius: 4px;
	box-shadow: 0 0 0 3px var(--vct-accent-ring-soft);
}

.header-nav a.is-active,
.header-nav a[aria-current="page"] {
	color: var(--vct-text);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 2px;
	text-decoration-color: var(--vct-accent);
}

.header-nav a.is-active:hover,
.header-nav a[aria-current="page"]:hover {
	color: var(--vct-text);
	text-decoration-color: var(--vct-accent-strong);
}

/* Header actions */
.vct-auth-button-container {
	justify-self: end;
}

.vct-auth-actions {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
}

.vct-auth-btn {
	flex: 1;
	padding: 8px 20px;
}

.vct-auth-btn:enabled:hover {
	transform: translateY(-1px);
}

.vct-auth-btn.logout:enabled:hover {
	background: var(--vct-danger-soft);
	border-color: #f1bdbd;
	color: var(--vct-danger);
}

.vct-user-indicator {
	position: relative;
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	border-radius: 999px;
	border: 1px solid var(--vct-border);
	background: var(--vct-surface-alt);
}

.vct-user-indicator:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px var(--vct-accent-ring);
}

.vct-user-indicator::after {
	content: attr(data-username);
	position: absolute;
	left: 50%;
	bottom: calc(100% - 70px);
	transform: translateX(-50%) translateY(4px);
	background: var(--vct-text);
	color: #ffffff;
	font-size: 0.75rem;
	line-height: 1.2;
	padding: 6px 8px;
	border-radius: 6px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.vct-user-indicator[data-username]:not([data-username=""]):hover::after,
.vct-user-indicator[data-username]:not([data-username=""]):focus-visible::after {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.vct-user-avatar::before {
	content: "";
	position: absolute;
	top: 5px;
	left: 50%;
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: #5a685f;
	transform: translateX(-50%);
}

.vct-user-avatar::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 6px;
	width: 16px;
	height: 9px;
	border-radius: 9px 9px 6px 6px;
	background: #5a685f;
	transform: translateX(-50%);
}

.vct-login-dialog {
	border: 0;
	border-radius: 12px;
	padding: 0;
	width: min(420px, calc(100vw - 32px));
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.vct-login-dialog::backdrop {
	background: rgba(29, 42, 34, 0.4);
}

.vct-login-form {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
}

.vct-login-form h2 {
	margin: 0 0 4px;
	font-size: 1.1rem;
}

.vct-login-label {
	font-size: 0.85rem;
	color: var(--vct-text-muted);
}

.vct-login-input {
	width: 100%;
	padding: 10px;
	border-radius: 8px;
	border: 1px solid var(--vct-border);
	font-size: 0.9rem;
}

.vct-login-input:focus-visible {
	outline: none;
	border-color: var(--vct-accent);
	box-shadow: 0 0 0 3px var(--vct-accent-ring-soft);
}

.vct-login-error {
	margin: 4px 0 0;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 0.8rem;
	color: var(--vct-danger);
	background: var(--vct-danger-soft);
	border: 1px solid #f1bdbd;
}

.vct-login-actions {
	margin-top: 6px;
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}

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

	.header-inner {
		grid-template-columns: 1fr;
		justify-items: center;
	}

	.header-copy {
		justify-content: center;
	}

	.header-brand {
		justify-content: center;
	}

	.header-logo {
		width: 38px;
		height: 38px;
	}

	.header h1 {
		font-size: 1.2rem;
	}

	.vct-auth-button-container {
		justify-self: center;
	}

	.vct-auth-actions {
		justify-content: center;
	}

	.vct-auth-btn {
		padding: 10px;
	}
}
