/**
 * FundSys App Styles
 * Konsolidierte App-spezifische Styles für Auth-Seiten, Settings und wiederverwendbare UI-Elemente
 * 
 * Hinweis: Die Brand-Farbe wird dynamisch via --fs-brand-primary gesetzt (White-Labeling)
 */

/* ========== GLASS PANEL ========== */
.glass-panel {
	background: rgba(var(--fs-bg-secondary-rgb, 242, 244, 246), 0.85);
	backdrop-filter: blur(20px);
	box-shadow: var(--fs-shadow-lg);
	border-radius: var(--fs-radius-sm);
}

.dark .glass-panel {
	background: rgba(var(--fs-brand-primary-rgb, 19, 27, 46), 0.85);
	box-shadow: var(--fs-shadow-lg);
}

/* ========== BACKGROUND ORBS ========== */
.orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(80px);
	z-index: -1;
	opacity: 0.4;
}

.orb-1 {
	width: 500px;
	height: 500px;
	background: var(--fs-brand-primary, #131b2e);
	top: -100px;
	left: -100px;
	animation: orb-float 10s ease-in-out infinite alternate;
}

.orb-2 {
	width: 600px;
	height: 600px;
	background: var(--fs-brand-primary, #131b2e);
	bottom: -200px;
	right: -100px;
	animation: orb-float 12s ease-in-out infinite alternate-reverse;
}

.orb-3 {
	width: 300px;
	height: 300px;
	background: var(--fs-gold, #e9c176);
	top: 40%;
	left: 60%;
	opacity: 0.12;
	animation: orb-float 8s ease-in-out infinite alternate;
}

@keyframes orb-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-10px); }
}

/* #57 — Hide orbs when user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
	.orb { display: none; }
}

/* #57 — Hide orbs on small screens */
@media (max-width: 639px) {
	.orb { display: none; }
}

/* #56 — Smooth theme transition */
html.fs-theme-transition,
html.fs-theme-transition *,
html.fs-theme-transition *::before,
html.fs-theme-transition *::after {
	transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease !important;
}

@media (prefers-reduced-motion: reduce) {
	html.fs-theme-transition,
	html.fs-theme-transition *,
	html.fs-theme-transition *::before,
	html.fs-theme-transition *::after {
		transition: none !important;
	}
}

/* ========== MESSAGE BOXES ========== */
@keyframes shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-6px); }
	75% { transform: translateX(6px); }
}

/* ========== SPINNER ========== */
.spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: white;
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* ========== SUCCESS OVERLAY ========== */
.success-overlay {
	position: fixed;
	inset: 0;
	background: rgba(11, 28, 45, 0.95);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
}

.success-overlay.visible {
	opacity: 1;
	pointer-events: all;
}

.checkmark {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--fs-brand-primary, #131b2e), #10b981);
	display: flex;
	align-items: center;
	justify-content: center;
	animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
	from { transform: scale(0); }
	to { transform: scale(1); }
}

/* ========== SETTINGS TABS ========== */
.settings-tab[aria-selected="true"] {
	background: var(--fs-bg-card);
	color: var(--fs-brand-primary, #131b2e);
	box-shadow: var(--fs-shadow-sm);
}

.dark .settings-tab[aria-selected="true"] {
	background: rgba(var(--fs-brand-primary-rgb, 19, 27, 46), 0.15);
	color: var(--fs-brand-primary, #131b2e);
	border-color: rgba(var(--fs-brand-primary-rgb, 19, 27, 46), 0.3);
}

/* ========== UTILITY: FundSys-SELECT (Custom Select Dropdown) ========== */
.fs-select {
	background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%239CA3AF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
	background-repeat: no-repeat;
	background-position: right 1rem center;
	background-size: 0.65em auto;
	appearance: none;
}

/* ========== INPUT ERROR STATE ========== */
.fs-input-error[class] {
	border-color: var(--fs-error, #ba1a1a);
	background: rgba(186, 26, 26, 0.05);
}

.fs-input-error[class]:focus {
	box-shadow: 0 0 0 3px rgba(186, 26, 26, 0.15);
}

/* ========== PASSWORD STRENGTH INDICATOR ========== */
.password-strength {
	height: 4px;
	background: var(--fs-bg-surface-high, #e2e8f0);
	border-radius: 2px;
	margin-top: 0.5rem;
	overflow: hidden;
}

.dark .password-strength {
	background: rgba(255, 255, 255, 0.1);
}

.password-strength-bar {
	height: 100%;
	width: 0;
	transition: all 0.3s ease;
	border-radius: 2px;
}

.password-strength-text {
	font-size: 0.75rem;
	margin-top: 0.25rem;
	color: var(--fs-text-muted);
}

/* ========== MESSAGE BOX (ALTERNATIVE NAMING) ========== */
.message-box {
	display: none;
	border-radius: var(--fs-radius-sm);
	padding: 0.75rem 1rem;
	font-size: 0.875rem;
	animation: shake 0.35s ease;
}

.message-box.error {
	background: rgba(186, 26, 26, 0.08);
	color: var(--fs-error);
}

.message-box.success {
	background: rgba(46, 125, 50, 0.08);
	color: var(--fs-success);
}

.dark .message-box.error {
	background: rgba(239, 83, 80, 0.12);
	color: var(--fs-error);
}

.dark .message-box.success {
	background: rgba(102, 187, 106, 0.12);
	color: var(--fs-success);
}


/* ========== FORGOT PASSWORD BOX ========== */
#login-forgot-box {
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
	            opacity 0.25s ease,
	            margin-top 0.3s ease;
	margin-top: 0;
}

#login-forgot-box.open {
	max-height: 120px;
	opacity: 1;
	margin-top: 0.25rem;
}

/* ========== SETTINGS TABS: MOBILE SCROLL-INDIKATOR ========== */
@media (max-width: 1023px) {
	#settings-tabs-nav-wrapper {
		position: relative;
	}

	/* Fade-out am rechten Rand zeigt an, dass noch mehr Tabs vorhanden sind */
	#settings-tabs-nav-wrapper::after {
		content: '';
		position: absolute;
		top: 0;
		right: 0;
		bottom: 4px; /* pb-1 ausgleichen */
		width: 3rem;
		background: linear-gradient(to right, transparent, var(--fs-bg-primary, #ffffff));
		pointer-events: none;
		z-index: 1;
		border-radius: 0 0.75rem 0.75rem 0;
	}

	.dark #settings-tabs-nav-wrapper::after {
		background: linear-gradient(to right, transparent, var(--fs-bg-primary, #0B1C2D));
	}

	/* Gradient ausblenden, wenn komplett nach rechts gescrollt */
	#settings-tabs-nav-wrapper.scroll-end::after {
		display: none;
	}
}

/* ========== SETTINGS PANELS ========== */
.settings-panel {
	display: none;
	animation: settings-fadeIn 0.2s ease;
}

.settings-panel.active {
	display: block;
}

@keyframes settings-fadeIn {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ========== PAGE PRIMARY ACTION (extends .fs-button-primary pattern) ========== */
.page-primary-action {
	display: inline-flex;
	align-items: center;
	gap: var(--fs-space-2);
	padding: var(--fs-space-3) var(--fs-space-4);
	border-radius: var(--fs-radius-sm);
	font-size: var(--fs-text-sm);
	font-weight: 600;
	color: var(--fs-on-brand-primary);
	background: var(--fs-brand-primary);
	box-shadow: 0 4px 16px rgba(var(--fs-brand-primary-rgb, 19, 27, 46), 0.2);
	border: none;
	cursor: pointer;
	transition: all var(--fs-transition-base);
	min-height: 44px;
}
.page-primary-action:hover { filter: brightness(1.15); }

/* ========== ACTION BUTTON ========== */
.action-btn {
	background: var(--fs-bg-secondary);
	border-radius: var(--fs-radius-sm);
	transition: all var(--fs-transition-slow);
}
.dark .action-btn { background: rgba(255, 255, 255, 0.05); }
.action-btn:hover { background: var(--fs-bg-tertiary); }
.dark .action-btn:hover { background: rgba(255, 255, 255, 0.08); }

/* ========== BRAND UTILITY CLASSES (moved from header.php inline) ========== */
.fs-brand-gradient { background-image: linear-gradient(135deg, var(--fs-brand-primary), var(--fs-brand-secondary)) !important; }
.fs-brand-bg { background-color: var(--fs-brand-primary) !important; }
.fs-brand-text { color: var(--fs-brand-primary) !important; }
.fs-nav-active { background-color: var(--fs-bg-tertiary) !important; color: var(--fs-brand-primary) !important; }
.dark .fs-nav-active { background-color: rgba(255, 255, 255, 0.08) !important; color: var(--fs-text-primary) !important; }
.group:hover .fs-brand-group-hover { color: var(--fs-brand-primary) !important; }
.group:hover .fs-brand-hover-bg { background-color: var(--fs-brand-primary) !important; }
.fs-brand-border { border-color: rgba(var(--fs-brand-primary-rgb), 0.45) !important; }
.fs-brand-shadow { box-shadow: 0 0 20px rgba(var(--fs-brand-primary-rgb), 0.35) !important; }

/* ========== BODY & SCROLLBAR ========== */
body { overflow-x: hidden; transition: background-color 0.3s ease, color 0.3s ease; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.45); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* ========== GLASS CARD ========== */
.glass-card { background: var(--fs-bg-card); border-radius: 0.125rem; box-shadow: var(--fs-shadow-lg); transition: box-shadow 0.25s ease, background-color 0.25s ease; }
.dark .glass-card { background: rgba(var(--fs-brand-primary-rgb, 19, 27, 46), 0.95); box-shadow: var(--fs-shadow-lg); }
.glass-card:hover { box-shadow: var(--fs-shadow-xl); }

/* ========== ANIMATION DELAYS ========== */
.delay-100 { animation-delay: 100ms; opacity: 0; }
.delay-200 { animation-delay: 200ms; opacity: 0; }

/* ========== NAV ITEM ========== */
.nav-item { position: relative; }

/* ========== FADE-IN ANIMATION ========== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.animate-fade-in { animation: fadeIn 0.6s ease-out forwards; }

/* ========== PAGE SHELL & HEADER ========== */
.page-shell { width: 100%; max-width: 1400px; margin: 0 auto; padding: var(--fs-page-padding); background: var(--fs-bg-primary); }
.dark .page-shell { background: var(--fs-bg-primary); }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.5rem; background: rgba(var(--fs-bg-secondary-rgb), 0.95); position: sticky; top: 5rem; z-index: 10; backdrop-filter: blur(12px); }
.dark .page-header { background: rgba(var(--fs-bg-secondary-rgb), 0.95); }
.page-title { font-size: 1.75rem; line-height: 2rem; font-weight: 400; letter-spacing: -0.02em; font-family: 'Noto Serif', serif; color: var(--fs-text-primary); }
.page-kicker { margin-top: 0.35rem; font-size: 0.95rem; font-weight: 500; letter-spacing: 0.01em; color: var(--fs-text-secondary); }

/* ========== UI CHIPS ========== */
.ui-chip { display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 0.125rem; padding: 0.35rem 0.7rem; font-size: 0.75rem; font-weight: 500; line-height: 1; white-space: nowrap; }
.ui-chip-primary { background: var(--fs-info-bg, #d0e1fb); color: var(--fs-brand-secondary); }
.dark .ui-chip-primary { background: rgba(144, 202, 249, 0.15); color: #90caf9; }
.ui-chip-success { background: var(--fs-brand-accent-light); color: var(--fs-text-primary, #131b2e); }
.dark .ui-chip-success { background: rgba(var(--fs-brand-accent-rgb, 233, 193, 118), 0.2); color: var(--fs-brand-accent-light); }
.ui-chip-muted { background: var(--fs-bg-tertiary); color: var(--fs-text-secondary); }
.dark .ui-chip-muted { background: rgba(255, 255, 255, 0.08); color: rgb(203 213 225); }

/* ========== UI BUTTON SECONDARY ========== */
.ui-button-secondary { background: var(--fs-bg-tertiary); color: var(--fs-text-primary); border-radius: 0.125rem; transition: background-color 0.2s ease, color 0.2s ease; }
.ui-button-secondary:hover { background: var(--fs-bg-surface-high); }
.dark .ui-button-secondary { background: rgba(255, 255, 255, 0.08); color: var(--fs-text-primary); }
.dark .ui-button-secondary:hover { background: rgba(255, 255, 255, 0.1); }

/* ========== UI ICON BUTTON ========== */
.ui-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 0.125rem; }

/* ========== UI LABELS ========== */
.ui-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; color: var(--fs-text-secondary); }
.dark .ui-label { color: var(--fs-text-muted); }
.ui-subtle-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em; color: var(--fs-text-muted); }
.dark .ui-subtle-label { color: var(--fs-text-muted); }

/* ========== DARK: MATERIAL DESIGN TOKEN OVERRIDES (onboarding) ========== */
.dark .bg-surface-container-lowest { background-color: #1a2540; }
.dark .bg-surface-container-low { background-color: rgba(255, 255, 255, 0.06); }
.dark .bg-surface-container { background-color: rgba(255, 255, 255, 0.10); }
.dark .bg-surface { background-color: #131b2e; }
.dark .text-on-primary-fixed { color: var(--fs-text-primary); }
.dark .text-on-secondary-container { color: #9ab0cc; }
.dark .text-on-surface-variant { color: #9ab0cc; }
.dark .text-on-surface { color: var(--fs-text-primary); }
.dark .text-outline { color: #6b859e; }
.dark .border-outline-variant\/15 { border-color: rgba(255, 255, 255, 0.08); }
.dark .border-outline-variant\/20 { border-color: rgba(255, 255, 255, 0.1); }
.dark .hover\:bg-surface-container:hover { background-color: rgba(255, 255, 255, 0.14); }
.dark .hover\:bg-primary-container:hover { background-color: rgba(var(--fs-brand-accent-rgb, 233, 193, 118), 0.2); }
.dark .hover\:text-on-primary:hover { color: var(--fs-brand-accent-light); }
.dark .hover\:text-on-primary-fixed:hover { color: #ffffff; }
.dark .bg-surface-container-low\/90 { background-color: rgba(26, 37, 64, 0.9); }
.dark .bg-tertiary-fixed .text-on-primary-fixed { color: #131b2e; }
.dark .bg-surface-container-highest { background-color: rgba(255, 255, 255, 0.12); }
.dark .bg-surface-container-high { background-color: rgba(255, 255, 255, 0.08); }
.dark .placeholder-outline::placeholder { color: #6b859e; }
.dark .border-outline-variant { border-color: rgba(255, 255, 255, 0.1); }
.dark .border-primary-container { border-color: var(--fs-brand-accent); }
.dark .shadow-\[0_12px_40px_rgba\(15\,23\,42\,0\.06\)\] { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25); }

/* ========== MATERIAL SYMBOLS ========== */
.material-symbols-outlined { font-variation-settings: "FILL" 0, "wght" 250, "GRAD" 0, "opsz" 24; font-size: 18px; }

/* ========== PAGE LOADING & TRANSITIONS ========== */
.page-loading-dim { opacity: 0.18 !important; transform: translateY(6px) scale(0.992) !important; filter: blur(7px) saturate(0.85); pointer-events: none; transition: opacity 0.22s ease, transform 0.22s ease, filter 0.22s ease; }
.dark .page-loading-dim { opacity: 0.12 !important; filter: blur(7px) saturate(0.7) brightness(0.6); }

.page-transition-overlay {
	position: absolute;
	inset: 0;
	z-index: 35;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.22s ease;
}
.page-transition-overlay.is-visible { opacity: 1; }

.page-transition-atelier {
	position: relative;
	width: 100%;
	height: 100%;
	background: var(--fs-bg-primary);
	overflow: hidden;
}
.dark .page-transition-atelier { background: var(--fs-bg-primary); }

.page-transition-atelier-skeleton {
	padding: 2rem 2rem 3rem;
	max-width: 1536px;
	margin: 0 auto;
}

.page-transition-atelier-glass {
	position: absolute;
	inset: 0;
	background: rgba(var(--fs-bg-secondary-rgb, 247, 249, 251), 0.4);
	backdrop-filter: blur(2px);
	z-index: 20;
	pointer-events: none;
}
.dark .page-transition-atelier-glass { background: rgba(var(--fs-brand-primary-rgb, 19, 27, 46), 0.4); }

.page-transition-atelier-loader {
	position: absolute;
	inset: 0;
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

/* ========== SIDEBAR ========== */
#fs-sidebar { transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, box-shadow 0.3s ease; width: 256px; padding: 1.5rem; }
#fs-sidebar .sidebar-text, #fs-sidebar .sidebar-section-title, #fs-sidebar .sidebar-badge, #fs-sidebar .sidebar-logo-text, #fs-sidebar .ai-console-text { transition: opacity 0.3s ease, width 0.3s ease, height 0.3s ease, margin 0.3s ease; white-space: nowrap; }
#fs-sidebar.collapsed:not(:hover) { width: 72px; padding: 1.5rem 0.75rem; }
#fs-sidebar.collapsed:not(:hover) .sidebar-text, #fs-sidebar.collapsed:not(:hover) .sidebar-section-title, #fs-sidebar.collapsed:not(:hover) .sidebar-badge { opacity: 0; width: 0; overflow: hidden; margin: 0; }
#fs-sidebar.collapsed:not(:hover) .sidebar-logo-text { opacity: 0; width: 0; overflow: hidden; margin: 0; }
#fs-sidebar.collapsed:not(:hover) .sidebar-logo-container { align-items: center; gap: 0.5rem; }
#fs-sidebar.collapsed:not(:hover) .ai-console-text { opacity: 0; width: 0; overflow: hidden; margin: 0; }
#fs-sidebar.collapsed:not(:hover) .space-x-3 > :not([hidden]) ~ :not([hidden]) { margin-left: 0; }
#fs-sidebar.collapsed:not(:hover) nav .js-nav-container > div, #fs-sidebar.collapsed:not(:hover) nav .js-nav-container > a { justify-content: center; padding-left: 0.5rem; padding-right: 0.5rem; }
#fs-sidebar.collapsed:not(:hover) nav .flex.items-center { justify-content: center; }
#fs-sidebar.collapsed:not(:hover) .nav-item.active::before { left: 0; }
#fs-sidebar.collapsed:not(:hover) [data-action="toggle-ai-panel"] { justify-content: center; padding: 0.75rem 0; }
#fs-sidebar.collapsed:not(:hover) [data-action="toggle-ai-panel"] > span { flex: none; justify-content: center; gap: 0; }
#fs-sidebar.collapsed:not(:hover) .mt-auto { padding-left: 0; padding-right: 0; }
#sidebar-toggle { transition: transform 0.3s ease; }
#fs-sidebar.collapsed + main #sidebar-toggle { transform: rotate(180deg); }

/* ========== TOP NAV ========== */
#fs-topnav { z-index: 60; isolation: isolate; transition: background-color 0.3s ease, border-color 0.3s ease; }
#fs-user-dropdown, #fs-notif-dropdown, #fs-lang-dropdown {
	z-index: 70;
	background: rgba(255, 255, 255, 0.995);
	transform-origin: top right;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.dark #fs-user-dropdown, .dark #fs-notif-dropdown, .dark #fs-lang-dropdown { background: rgba(31, 41, 55, 0.98); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4); }
#fs-user-dropdown .js-topnav-link.fs-nav-active {
	background:
		linear-gradient(rgba(var(--fs-brand-primary-rgb), 0.16), rgba(var(--fs-brand-primary-rgb), 0.16)),
		linear-gradient(rgba(255, 255, 255, 0.995), rgba(255, 255, 255, 0.995)) !important;
	color: var(--fs-brand-primary) !important;
}
.dark #fs-user-dropdown .js-topnav-link.fs-nav-active {
	background:
		linear-gradient(rgba(var(--fs-brand-primary-rgb), 0.2), rgba(var(--fs-brand-primary-rgb), 0.2)),
		linear-gradient(rgba(31, 41, 55, 0.98), rgba(31, 41, 55, 0.98)) !important;
}
#fs-user-dropdown .js-topnav-link.fs-nav-active svg { color: var(--fs-brand-primary) !important; }
#fs-user-dropdown.hidden, #fs-notif-dropdown.hidden, #fs-lang-dropdown.hidden { opacity: 0; transform: scale(0.95) translateY(-4px); pointer-events: none; }
#fs-notif-badge { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* ========== THEME TOGGLE ========== */
#theme-toggle { position: relative; }
#theme-toggle .theme-icon { transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.dark #theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.dark #theme-toggle .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }
#theme-toggle .icon-sun { opacity: 1; transform: rotate(0deg) scale(1); }
#theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.5); }

/* ========== AI PANEL (pre-hydration) ========== */
#aiPanel[aria-hidden="true"] { transform: translateX(100%); }
#aiPanel[aria-hidden="false"] { transform: translateX(0); }

/* ========== PAGE HEADER RESPONSIVE ========== */
@media (max-width: 639px) {
	.page-primary-action {
		width: 100%;
		justify-content: center;
	}
	#fs-topnav {
		padding-left: 1rem;
		padding-right: 1rem;
	}
	#fs-lang-dropdown,
	#fs-notif-dropdown,
	#fs-user-dropdown {
		max-width: calc(100vw - 2rem);
	}
}

/* ========== SCROLLABLE TABS: edge fade as scroll-hint (mobile only) ========== */
@media (max-width: 1023px) {
	.settings-tabs-scroll {
		-webkit-mask-image: linear-gradient(to right, transparent 0, #000 1.25rem, #000 calc(100% - 1.25rem), transparent 100%);
		mask-image: linear-gradient(to right, transparent 0, #000 1.25rem, #000 calc(100% - 1.25rem), transparent 100%);
	}
}

/* ========== TOPNAV TOUCH TARGETS (touch devices only; desktop untouched) ========== */
@media (hover: none) and (pointer: coarse) {
	#fs-topnav button {
		position: relative;
	}
	#fs-topnav button::after {
		content: '';
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		min-width: 44px;
		min-height: 44px;
		width: 100%;
		height: 100%;
	}
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 1024px) {
	#fs-sidebar {
		position: fixed;
		inset: 0 auto 0 0;
		z-index: 70;
		width: min(320px, calc(100vw - 2rem));
		max-width: 100%;
		box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
		transform: translateX(-110%);
	}
	#fs-sidebar.mobile-open {
		transform: translateX(0);
	}
	#fs-mobile-backdrop {
		z-index: 60;
	}
	#fs-topnav {
		z-index: 20;
	}
	.page-header {
		top: 3.5rem;
		padding: 1rem;
		flex-direction: column;
		align-items: stretch;
	}
	.page-title {
		font-size: 1.5rem;
		line-height: 1.8rem;
	}
	.page-transition-overlay {
		padding: 0.85rem;
	}
	.page-transition-card {
		padding: 1rem;
		border-radius: 0.125rem;
	}
	.page-transition-grid {
		grid-template-columns: 1fr;
	}
}

.quiz-btn.is-selected,
.quiz-btn.is-selected:hover {
	background-color: rgb(var(--fs-brand-secondary-rgb) / 0.12);
	color: var(--fs-brand-secondary);
	box-shadow: inset 0 0 0 1px var(--fs-brand-secondary);
}
.dark .quiz-btn.is-selected,
.dark .quiz-btn.is-selected:hover {
	background-color: rgb(var(--fs-brand-secondary-rgb) / 0.22);
}

#btn-amex-apply {
	background-color: var(--fs-brand-secondary) !important;
	color: #ffffff !important;
	border: 0 !important;
}
#btn-amex-apply:hover {
	background-color: var(--fs-brand-primary) !important;
	color: #ffffff !important;
}
#btn-amex-apply svg {
	color: #ffffff !important;
}