/* ================================================================
   AUTH – Login/Register Overlay
   ================================================================ */

#auth-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.85);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

#auth-overlay.active {
	display: flex;
}

.auth-panel {
	background: var(--bg-panel, #1a1a2e);
	border: 1px solid var(--border-color, #333);
	border-radius: 16px;
	padding: 2.5rem 2rem 2rem;
	width: 100%;
	max-width: 380px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

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

.auth-header h2 {
	margin: 0 0 0.25rem;
	font-size: 1.5rem;
	color: var(--accent-color, #A1B1BA);
	font-weight: 600;
}

.auth-header p {
	margin: 0;
	font-size: 0.85rem;
	color: var(--text-muted, #888);
}

/* ---------- Formular ---------- */

.auth-form {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.auth-field {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.auth-field label {
	font-size: 0.8rem;
	color: var(--text-muted, #888);
	font-weight: 500;
}

.auth-field input {
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--border-color, #333);
	border-radius: 8px;
	background: var(--bg-input, #111);
	color: var(--text-color, #ccc);
	font-size: 0.95rem;
	outline: none;
	transition: border-color 0.2s;
}

.auth-field input:focus {
	outline: 2px solid var(--accent-color, #0af);
	outline-offset: 1px;
	border-color: var(--accent-color, #0af);
}

.auth-remember-field label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.auth-remember-field input[type="checkbox"] {
	width: auto;
	padding: 0;
	margin: 0;
}

/* ---------- Buttons ---------- */

.auth-submit-btn {
	padding: 0.7rem;
	border: none;
	border-radius: 8px;
	background: var(--accent-color, #A1B1BA);
	color: var(--bg-page, #000);
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s, transform 0.1s;
	margin-top: 0.25rem;
}

.auth-submit-btn:hover {
	opacity: 0.9;
}

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

.auth-submit-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ---------- Fehler-Meldung ---------- */

#auth-error {
	display: none;
	padding: 0.5rem 0.75rem;
	border-radius: 6px;
	background: rgba(220, 53, 69, 0.15);
	border: 1px solid rgba(220, 53, 69, 0.3);
	color: #e8606a;
	font-size: 0.85rem;
	text-align: center;
}

/* ---------- Link-Zeile ---------- */

.auth-switch {
	text-align: center;
	margin-top: 1rem;
	font-size: 0.85rem;
	color: var(--text-muted, #888);
}

.auth-switch a {
	color: var(--accent-color, #A1B1BA);
	text-decoration: none;
	font-weight: 500;
}

.auth-switch a:hover {
	text-decoration: underline;
}

/* ---------- User-Info (in der Top-Bar) ---------- */

#auth-user-info {
	display: none;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.8rem;
	color: var(--text-muted, #888);
}

#auth-user-info.show,
#auth-user-info:not([style*="display: none"]) {
	/* visibility via JS .show() */
}

#auth-user-display {
	color: var(--text-color, #ccc);
	font-weight: 500;
}

#auth-logout-btn {
	font-size: 0.75rem;
	padding: 0.2rem 0.5rem;
	cursor: pointer;
}

/* ---------- Erfolgs-Meldung ---------- */

#auth-success {
	display: none;
	padding: 0.5rem 0.75rem;
	border-radius: 6px;
	background: rgba(40, 167, 69, 0.15);
	border: 1px solid rgba(40, 167, 69, 0.3);
	color: #5cb85c;
	font-size: 0.85rem;
	text-align: center;
	margin-bottom: 0.5rem;
}

/* ---------- Forgot-Password ---------- */

.auth-forgot-link {
	text-align: right;
	margin-top: 0.5rem;
	margin-bottom: -0.25rem;
}

.auth-forgot-link a {
	color: var(--text-muted, #888);
	text-decoration: none;
	font-size: 0.8rem;
}

.auth-forgot-link a:hover {
	color: var(--accent-color, #A1B1BA);
	text-decoration: underline;
}

.auth-hint {
	margin: 0;
	font-size: 0.85rem;
	color: var(--text-muted, #888);
	text-align: center;
	line-height: 1.4;
}

/* ---------- Responsive ---------- */

@media (max-width: 500px) {
	.auth-panel {
		margin: 1rem;
		padding: 1.5rem 1.25rem 1.25rem;
	}
}
