/* =============================================================================
   Auth pages (login, owner 2FA, one-time setup). Builds on galaxy.css.
   ============================================================================= */

.auth-main {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3rem 1.5rem;
}

.auth-wrap {
	position: relative;
	width: 100%;
	max-width: 28rem;
}

.auth-header {
	text-align: center;
	margin-bottom: 2.25rem;
}

.auth-header h1 {
	font-family: var(--font-serif);
	font-weight: 400;
	font-size: 3rem;
	line-height: 1;
	letter-spacing: -0.02em;
	margin: 0;
}

.auth-header h1 em {
	color: var(--primary-2);
	font-style: italic;
}

.auth-header .subtitle {
	margin: 0.75rem 0 0;
	color: var(--muted);
	font-size: 0.9rem;
}

.auth-card {
	position: relative;
	border: 1px solid var(--border);
	background: var(--card);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	padding: 2rem;
	border-radius: var(--radius);
	box-shadow: 0 30px 100px -20px rgba(0, 0, 0, 0.8);
}

.field + .field {
	margin-top: 1.25rem;
}

.field label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
	font-size: 0.7rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--muted);
	font-weight: 500;
}

.field label svg {
	color: var(--primary-2);
}

.input-wrap {
	display: flex;
	align-items: center;
	border: 1px solid var(--border);
	background: var(--input-bg);
	padding: 0.75rem 1rem;
	border-radius: var(--radius-sm);
	transition: border-color 0.2s, background 0.2s;
}

.input-wrap:focus-within {
	border-color: var(--border-strong);
	background: rgba(255, 255, 255, 0.07);
}

.input-wrap input {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: 0;
	outline: none;
	color: var(--fg);
	font-size: 1rem;
	font-family: inherit;
	letter-spacing: inherit;
}

.input-wrap input::placeholder {
	color: rgba(138, 160, 196, 0.6);
}

.input-wrap.code input {
	text-align: center;
	letter-spacing: 0.5em;
	font-size: 1.5rem;
}

.toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: var(--muted);
	padding: 0.35rem;
	border-radius: var(--radius-sm);
	transition: background 0.2s, color 0.2s;
}

.toggle:hover {
	background: rgba(255, 255, 255, 0.06);
	color: var(--fg);
}

.form-error {
	margin: 1rem 0 0;
	padding: 0.65rem 1rem;
	border: 1px solid rgba(255, 99, 99, 0.35);
	background: var(--danger-soft);
	border-radius: var(--radius-sm);
	color: #ff9c9c;
	font-size: 0.8rem;
}

.form-hint {
	margin: 0.6rem 0 0;
	color: var(--muted);
	font-size: 0.78rem;
	line-height: 1.5;
}

.submit {
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	margin-top: 1.75rem;
	padding: 0.875rem 1.5rem;
	border-radius: var(--radius-sm);
	border: 0;
	cursor: pointer;
	background: linear-gradient(135deg, var(--primary), var(--primary-2));
	color: #0a0f1f;
	font-size: 0.9rem;
	font-weight: 600;
	font-family: inherit;
	box-shadow: 0 0 60px -10px var(--glow);
	transition: transform 0.15s;
}

.submit:hover  { transform: scale(1.01); }
.submit:active { transform: scale(0.99); }
.submit:disabled { opacity: 0.7; cursor: progress; }

.submit .shimmer {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
	transform: translateX(-100%);
	transition: transform 0.7s;
}

.submit:hover .shimmer {
	transform: translateX(100%);
}

/* Enrolment QR for owner 2FA setup. */
.totp-enroll {
	text-align: center;
	margin-bottom: 1.5rem;
}

.totp-enroll canvas,
.totp-enroll img {
	width: 180px;
	height: 180px;
	border-radius: var(--radius-sm);
	background: #fff;
	padding: 10px;
}

.totp-secret {
	margin-top: 0.75rem;
	font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
	font-size: 0.8rem;
	color: var(--muted);
	word-break: break-all;
}

.footnote {
	text-align: center;
	margin-top: 2rem;
	font-size: 0.75rem;
	color: var(--muted);
}

.footnote a {
	color: var(--muted);
	text-decoration: none;
}

.footnote a:hover {
	color: var(--fg);
	text-decoration: underline;
	text-underline-offset: 4px;
}
