:root, [data-theme="light"] {
	--color-bg: #f7f6f2;
	--color-surface: #ffffff;
	--color-border: #d4d1ca;
	--color-text: #28251d;
	--color-text-muted: #7a7974;
	--color-primary: #01696f;
	--color-primary-hover: #0c4e54;
	--color-error: #c0392b;
	--color-error-bg: #fdf3f3;
	--color-error-border: #e8b4b4;
	--color-warning-bg: #fffbea;
	--color-warning-border: #f0c040;
	--color-warning-text: #7a5c00;
	--color-overlay: rgba(0,0,0,0.45);
	--shadow-md: 0 4px 24px rgba(0,0,0,0.10);
	--shadow-lg: 0 12px 40px rgba(0,0,0,0.14);
	--radius-md: 0.5rem;
	--radius-lg: 0.75rem;
	--font-body: 'Segoe UI', system-ui, sans-serif;
	--transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="dark"] {
	--color-bg: #171614;
	--color-surface: #1c1b19;
	--color-border: #393836;
	--color-text: #cdccca;
	--color-text-muted: #797876;
	--color-primary: #4f98a3;
	--color-primary-hover: #227f8b;
	--color-error: #e05c4e;
	--color-error-bg: #2a1a18;
	--color-error-border: #7a3030;
	--color-warning-bg: #2a2510;
	--color-warning-border: #a08020;
	--color-warning-text: #e8c870;
	--color-overlay: rgba(0,0,0,0.65);
	--shadow-md: 0 4px 24px rgba(0,0,0,0.35);
	--shadow-lg: 0 12px 40px rgba(0,0,0,0.45);
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme]) {
--color-bg: #171614;
--color-surface: #1c1b19;
--color-border: #393836;
--color-text: #cdccca;
--color-text-muted: #797876;
--color-primary: #4f98a3;
--color-primary-hover: #227f8b;
--color-error: #e05c4e;
--color-error-bg: #2a1a18;
--color-error-border: #7a3030;
--color-warning-bg: #2a2510;
--color-warning-border: #a08020;
--color-warning-text: #e8c870;
--color-overlay: rgba(0,0,0,0.65);
--shadow-md: 0 4px 24px rgba(0,0,0,0.35);
--shadow-lg: 0 12px 40px rgba(0,0,0,0.45);
	}
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
	min-height: 100dvh;
	font-family: var(--font-body);
	font-size: 1rem;
	color: var(--color-text);
	background-color: var(--color-bg);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color var(--transition), color var(--transition);
}
input, button { font: inherit; color: inherit; }

/* Theme toggle */
.theme-toggle {
	position: fixed;
	top: 1.25rem;
	right: 1.25rem;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 9999px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: var(--shadow-md);
	transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
	z-index: 100;
}
.theme-toggle:hover { box-shadow: var(--shadow-lg); }
.theme-toggle svg { display: block; }

/* Card */
.login-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	padding: 2.5rem 2rem;
	width: 100%;
	max-width: 400px;
	position: relative;
	transition: background var(--transition), border-color var(--transition);
}

/* Logo */
.logo {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	margin-bottom: 1.75rem;
}
.logo svg { color: var(--color-primary); }
.logo-name {
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--color-text);
}

h1 {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
	margin-bottom: 0.375rem;
	color: var(--color-text);
	text-align: center;
}
.subtitle {
	font-size: 0.875rem;
	color: var(--color-text-muted);
	margin-bottom: 1.75rem;
}

/* Alert boxes */
.alert {
	border-radius: var(--radius-md);
	padding: 0.75rem 1rem;
	font-size: 0.875rem;
	line-height: 1.5;
	margin-bottom: 1.25rem;
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	animation: slideDown 0.25s cubic-bezier(0.16,1,0.3,1);
}
@keyframes slideDown {
	from { opacity: 0; transform: translateY(-8px); }
	to	 { opacity: 1; transform: translateY(0); }
}
.alert-error {
	background: var(--color-error-bg);
	border: 1px solid var(--color-error-border);
	color: var(--color-error);
}
.alert svg { flex-shrink: 0; margin-top: 1px; }

/* Form */
.form-group { margin-bottom: 1rem; }
label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--color-text-muted);
	margin-bottom: 0.375rem;
	letter-spacing: 0.01em;
}
.input-wrap { position: relative; }
.input-wrap svg {
	position: absolute;
	left: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--color-text-muted);
	pointer-events: none;
}
input[type="text"],
input[type="password"] {
	width: 100%;
	padding: 0.625rem 0.75rem 0.625rem 2.5rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	background: var(--color-bg);
	color: var(--color-text);
	font-size: 0.9375rem;
	transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
	outline: none;
}
input[type="text"]:focus,
input[type="password"]:focus {
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 18%, transparent);
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: center;
  justify-content: center;  /* ← neu */
  gap: 0.5rem;
  margin-top: 1rem;
}
.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.checkbox-group label {
  display: inline;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
  cursor: pointer;
  user-select: none;
}

/* Submit */
.btn-primary {
	width: 100%;
	padding: 0.6875rem 1rem;
	background: var(--color-primary);
	color: #fff;
	border: none;
	border-radius: var(--radius-md);
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	margin-top: 1.5rem;
	letter-spacing: 0.01em;
	transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover { background: var(--color-primary-hover); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: scale(0.99); }

/* Overlay / Popup */
.overlay {
	position: fixed;
	inset: 0;
	background: var(--color-overlay);
	z-index: 200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	backdrop-filter: blur(3px);
	animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.popup {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	padding: 2rem;
	max-width: 380px;
	width: 100%;
	animation: popIn 0.3s cubic-bezier(0.16,1,0.3,1);
}
@keyframes popIn {
	from { opacity:0; transform: scale(0.95) translateY(12px); }
	to	 { opacity:1; transform: scale(1) translateY(0); }
}
.popup-icon {
	width: 48px; height: 48px;
	background: var(--color-warning-bg);
	border: 1px solid var(--color-warning-border);
	border-radius: 9999px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1.25rem;
	color: var(--color-warning-text);
}
.popup h2 {
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin-bottom: 0.5rem;
	color: var(--color-text);
}
.popup p {
	font-size: 0.875rem;
	color: var(--color-text-muted);
	line-height: 1.6;
	margin-bottom: 1.5rem;
	max-width: 100%;
}
.popup-actions { display: flex; gap: 0.75rem; }
.btn-accept {
	flex: 1;
	padding: 0.625rem 1rem;
	background: var(--color-primary);
	color: #fff;
	border: none;
	border-radius: var(--radius-md);
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: background var(--transition);
}
.btn-accept:hover { background: var(--color-primary-hover); }
.btn-decline {
	flex: 1;
	padding: 0.625rem 1rem;
	background: transparent;
	color: var(--color-text-muted);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: border-color var(--transition), color var(--transition);
}
.btn-decline:hover { border-color: var(--color-text-muted); color: var(--color-text); }

.hidden { display: none !important; }

/* Footer */
.card-footer {
	margin-top: 1.5rem;
	font-size: 0.75rem;
	color: var(--color-text-muted);
	text-align: center;
}
