/* ===========================================================
   B3 OAuth2 Login — mggb3.com Design Language
   Dark theme, primary blue (#0091EE), matching HeroUI/Tailwind
   =========================================================== */

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

:root {
	--bg-page: #000000;
	--bg-card: #111111;
	--bg-card-border: #27272a;
	--bg-input: #18181b;
	--bg-input-hover: #1f1f23;
	--bg-input-focus: #18181b;
	--primary: #0091ee;
	--primary-hover: #0078cc;
	--text-primary: #fafafa;
	--text-secondary: #a1a1aa;
	--text-muted: #71717a;
	--border-color: #27272a;
	--border-focus: #0091ee;
	--shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);
	--radius: 12px;
	--radius-sm: 8px;
	--font-sans:
		-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
		Arial, sans-serif;
}

html {
	height: 100%;
	font-size: 16px;
}

body {
	height: 100%;
	font-family: var(--font-sans);
	background: var(--bg-page);
	color: var(--text-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* ── Card container ── */
.login-card {
	width: 100%;
	max-width: 400px;
	margin: 1.5rem;
}

.login-card-inner {
	background: var(--bg-card);
	border: 1px solid var(--bg-card-border);
	border-radius: var(--radius);
	padding: 2.5rem 2rem 2rem;
	box-shadow: var(--shadow-card);
}

/* ── Branding ── */
.login-brand {
	text-align: center;
	margin-bottom: 2rem;
}

.login-brand-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	background: var(--primary);
	border-radius: 14px;
	font-size: 1.5rem;
	font-weight: 700;
	color: #fff;
	margin-bottom: 0.75rem;
	line-height: 1;
}

.login-brand h1 {
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--text-primary);
	letter-spacing: -0.02em;
}

.login-brand p {
	font-size: 0.875rem;
	color: var(--text-secondary);
	margin-top: 0.25rem;
}

/* ── Error messages ── */
.login-error {
	background: rgba(255, 41, 75, 0.12);
	border: 1px solid rgba(255, 41, 75, 0.3);
	border-radius: var(--radius-sm);
	padding: 0.75rem 1rem;
	margin-bottom: 1.25rem;
	font-size: 0.8125rem;
	color: rgb(255, 90, 95);
	text-align: center;
	line-height: 1.4;
}

/* ── Form fields ── */
.form-group {
	margin-bottom: 1rem;
}

.form-group label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--text-secondary);
	margin-bottom: 0.375rem;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
	width: 100%;
	padding: 0.625rem 0.875rem;
	font-size: 0.9375rem;
	font-family: var(--font-sans);
	color: var(--text-primary);
	background: var(--bg-input);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-sm);
	outline: none;
	transition:
		border-color 0.2s ease,
		background 0.2s ease,
		box-shadow 0.2s ease;
}

.form-group input[type="text"]:hover,
.form-group input[type="password"]:hover,
.form-group input[type="email"]:hover {
	background: var(--bg-input-hover);
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="email"]:focus {
	border-color: var(--border-focus);
	background: var(--bg-input-focus);
	box-shadow: 0 0 0 2px rgba(0, 145, 238, 0.2);
}

.form-group input::placeholder {
	color: var(--text-muted);
}

/* ── Remember me checkbox ── */
.checkbox-group {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
	cursor: pointer;
	user-select: none;
}

.checkbox-group input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	border: 1px solid var(--border-color);
	border-radius: 4px;
	background: var(--bg-input);
	cursor: pointer;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition:
		background 0.15s ease,
		border-color 0.15s ease;
}

.checkbox-group input[type="checkbox"]:checked {
	background: var(--primary);
	border-color: var(--primary);
}

.checkbox-group input[type="checkbox"]:checked::after {
	content: "";
	display: block;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	margin-top: -1px;
}

.checkbox-group input[type="checkbox"]:focus-visible {
	box-shadow: 0 0 0 2px rgba(0, 145, 238, 0.35);
}

.checkbox-group .checkbox-label {
	font-size: 0.8125rem;
	color: var(--text-secondary);
}

/* ── Submit button ── */
.btn-submit {
	width: 100%;
	padding: 0.6875rem 1rem;
	font-size: 0.9375rem;
	font-weight: 600;
	font-family: var(--font-sans);
	color: #fff;
	background: var(--primary);
	border: none;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition:
		background 0.2s ease,
		transform 0.1s ease;
	line-height: 1.5;
}

.btn-submit:hover {
	background: var(--primary-hover);
}

.btn-submit:active {
	transform: scale(0.985);
}

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

/* ── Footer ── */
.login-footer {
	text-align: center;
	margin-top: 1.5rem;
	font-size: 0.75rem;
	color: var(--text-muted);
}

/* ── CSRF hidden field ── */
input[name="_csrf"] {
	display: none;
}
