/* =====================================================================
   Frontend User Management — Frontend styles
   Everything is scoped under .fum-wrapper so it never leaks into the
   active theme. Colors/radius are CSS custom properties, overridden
   inline by the admin's Appearance settings (see FUM_Settings::inline_css_vars()).
   ===================================================================== */

.fum-wrapper {
	--fum-primary: #6d28d9;
	--fum-primary-dark: #5327a6;
	--fum-accent: #ec4899;
	--fum-success: #16a34a;
	--fum-error: #dc2626;
	--fum-text: #201a35;
	--fum-bg: #f6f4fd;
	--fum-radius: 16px;
	--fum-border: #e7e1f7;
	--fum-muted: #6b7280;

	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--fum-text);
}

.fum-wrapper *,
.fum-wrapper *::before,
.fum-wrapper *::after {
	box-sizing: inherit;
}

/* Break the auth/dashboard sections out of a theme's boxed content
   column so they can render truly full-width, edge to edge. */
.fum-wrapper.fum-full-width {
	/*width: 100vw;
	max-width: 100vw;*/
	position: relative;
	/*left: 50%;
	right: 50%;*/
	margin-left: -50vw;
	margin-right: -50vw;
}

/* ---------------------------------------------------------------------
   Auth screens (login / register / lost password / reset password)
   --------------------------------------------------------------------- */

.fum-auth-wrapper {
	padding: 0px 24px;
	display: flex;
	align-items: center;
	justify-content: center;
    min-height: 0px !important;
    width: 100%;
}

.fum-auth-shell {
	width: 100%;
	max-width: 980px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	background: #fff;
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 30px 60px -25px rgba(31, 15, 74, 0.35);
}

.fum-auth-visual {
	background: linear-gradient(150deg, var(--fum-primary), var(--fum-accent));
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px;
	position: relative;
	overflow: hidden;
}

.fum-auth-visual::before,
.fum-auth-visual::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
}

.fum-auth-visual::before {
	width: 260px;
	height: 260px;
	top: -80px;
	right: -80px;
}

.fum-auth-visual::after {
	width: 180px;
	height: 180px;
	bottom: -60px;
	left: -40px;
	background: rgba(255, 255, 255, 0.08);
}

.fum-auth-visual-inner {
	position: relative;
	z-index: 1;
	max-width: 320px;
}

.fum-auth-badge {
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.16);
	margin-bottom: 24px;
}

.fum-auth-badge svg {
	width: 28px;
	height: 28px;
}

.fum-auth-visual-inner h2 {
	font-size: 28px;
	font-weight: 800;
	margin: 0 0 12px;
	line-height: 1.25;
}

.fum-auth-visual-inner p {
	font-size: 15px;
	line-height: 1.6;
	margin: 0;
	color: rgba(255, 255, 255, 0.9);
}

.fum-auth-panel {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 40px;
}

.fum-auth-card {
	width: 100%;
	max-width: 360px;
}

.fum-auth-title {
	font-size: 26px;
	font-weight: 800;
	margin: 0 0 6px;
	letter-spacing: -0.02em;
}

.fum-auth-subtitle {
	font-size: 14px;
	color: var(--fum-muted);
	margin: 0 0 28px;
	line-height: 1.5;
}

@media (max-width: 860px) {
	.fum-auth-shell {
		grid-template-columns: 1fr;
		max-width: 460px;
	}
	.fum-auth-visual {
		display: none;
	}
	.fum-auth-panel {
		padding: 40px 28px;
	}
}

/* ---------------------------------------------------------------------
   Floating-label inputs
   --------------------------------------------------------------------- */

.fum-field {
	margin-bottom: 20px;
}

.fum-input-wrap {
	position: relative;
}

.fum-input-wrap input {
	width: 100%;
	padding: 16px 14px 8px;
	border: 1.5px solid var(--fum-border);
	border-radius: calc(var(--fum-radius) * 0.6);
	font-size: 15px;
	background: #fbfaff;
	color: var(--fum-text);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
	height: 54px;
}

.fum-input-wrap.fum-has-icon input {
	padding-left: 44px;
}

.fum-input-wrap.fum-password-wrap input {
	padding-right: 44px;
}

.fum-input-wrap input:focus {
	outline: none;
	border-color: var(--fum-primary);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.15);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--fum-primary) 15%, transparent);
}

.fum-input-wrap input[disabled] {
	background: #f1f0f5;
	color: var(--fum-muted);
	cursor: not-allowed;
}

.fum-input-wrap label {
	position: absolute;
	left: 14px;
	top: 16px;
	font-size: 15px;
	color: var(--fum-muted);
	pointer-events: none;
	transform-origin: left top;
	transition: transform 0.15s ease, color 0.15s ease, top 0.15s ease;
}

.fum-input-wrap.fum-has-icon label {
	left: 44px;
}

.fum-input-wrap input:focus ~ label,
.fum-input-wrap input:not(:placeholder-shown) ~ label {
	top: 0px;
	transform: scale(0.76);
	color: var(--fum-primary);
}

.fum-input-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	color: var(--fum-muted);
	pointer-events: none;
	display: flex;
}

.fum-input-icon svg {
	width: 100%;
	height: 100%;
}

.fum-input-wrap input:focus ~ .fum-input-icon,
.fum-input-wrap input:focus + .fum-input-icon {
	color: var(--fum-primary);
}

/* Static (non-floating) labels, used for select/textarea fields */
.fum-static-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 8px;
	color: var(--fum-text);
}

.fum-field textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var(--fum-border);
	border-radius: calc(var(--fum-radius) * 0.6);
	font-size: 14px;
	background: #fbfaff;
	color: var(--fum-text);
	resize: vertical;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fum-field textarea:focus {
	outline: none;
	border-color: var(--fum-primary);
	background: #fff;
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--fum-primary) 15%, transparent);
}

.fum-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

@media (max-width: 480px) {
	.fum-field-row {
		grid-template-columns: 1fr;
	}
}

/* Password visibility toggle */

.fum-toggle-password {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: 0;
	cursor: pointer;
	padding: 8px;
	width: 20px;
	height: 20px;
	display: flex;
	color: var(--fum-muted);
	opacity: 0.75;
	transition: opacity 0.15s ease, color 0.15s ease;
}

.fum-toggle-password svg {
	width: 100%;
	height: 100%;
}

.fum-toggle-password:hover {
	opacity: 1;
	color: var(--fum-primary);
}

.fum-hint {
	display: block;
	margin-top: 7px;
	color: var(--fum-muted);
	font-size: 12px;
	line-height: 1.5;
}

.fum-field-status {
	display: block;
	font-size: 12px;
	margin-top: 6px;
	min-height: 14px;
	font-weight: 600;
}

.fum-field-status.is-available { color: var(--fum-success); }
.fum-field-status.is-taken { color: var(--fum-error); }

/* Checkboxes */

.fum-checkbox-field { margin-bottom: 22px; }

.fum-checkbox-label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--fum-text);
	cursor: pointer;
}

.fum-checkbox {
	width: 18px;
	height: 18px;
	accent-color: var(--fum-primary);
	cursor: pointer;
}

/* Buttons */

.fum-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 14px 18px;
	border: 0;
	border-radius: calc(var(--fum-radius) * 0.6);
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	position: relative;
	transition: transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.fum-btn-primary {
	background: linear-gradient(120deg, var(--fum-primary), var(--fum-primary-dark));
	color: #fff;
	box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.35);
	box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--fum-primary) 70%, transparent);
}

.fum-btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 28px -10px rgba(0, 0, 0, 0.4);
	box-shadow: 0 14px 28px -10px color-mix(in srgb, var(--fum-primary) 75%, transparent);
}

.fum-btn-primary:active {
	transform: translateY(0);
}

.fum-btn[disabled] {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}

.fum-btn.is-loading .fum-btn-text {
	visibility: hidden;
}

.fum-btn.is-loading::after {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: fum-spin 0.7s linear infinite;
}

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

.fum-submit-field {
	margin-top: 26px;
}

/* Notices */

.fum-notice {
	padding: 12px 16px;
	border-radius: calc(var(--fum-radius) * 0.5);
	margin-bottom: 18px;
	font-size: 13.5px;
	font-weight: 500;
	animation: fum-fade-slide 0.2s ease;
}

@keyframes fum-fade-slide {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}

.fum-notice.fum-notice-error {
	background: #fef2f2;
	border: 1px solid var(--fum-error);
	color: var(--fum-error);
}

.fum-notice.fum-notice-success {
	background: #ecfdf3;
	border: 1px solid var(--fum-success);
	color: #037a3f;
}

.fum-links {
	margin-top: 22px;
	font-size: 13.5px;
	text-align: center;
	color: var(--fum-muted);
}

.fum-links a {
	color: var(--fum-primary);
	text-decoration: none;
	font-weight: 600;
}

.fum-links a:hover {
	text-decoration: underline;
}

.fum-sep {
	margin: 0 8px;
	color: var(--fum-border);
}

.fum-notice-box {
	max-width: 560px;
	margin: 40px auto;
	padding: 22px 26px;
	border: 1px solid var(--fum-border);
	border-radius: var(--fum-radius);
	background: #fff;
	text-align: center;
	box-shadow: 0 12px 30px -20px rgba(31, 15, 74, 0.3);
}

.fum-notice-box p { margin: 0; font-size: 14px; }
.fum-error { color: var(--fum-error); }

/* "Already logged in" card */

.fum-notice-box-loggedin {
	max-width: 460px;
	padding: 40px 32px 32px;
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--fum-primary) 12%, transparent), transparent 55%),
		radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--fum-accent) 10%, transparent), transparent 55%),
		#fff;
}

.fum-notice-icon {
	width: 52px;
	height: 52px;
	margin: 0 auto 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 16px;
	background: linear-gradient(120deg, var(--fum-primary), var(--fum-primary-dark));
	color: #fff;
	box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--fum-primary) 70%, transparent);
}

.fum-notice-icon svg { width: 26px; height: 26px; }

.fum-notice-avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	margin: 0 auto 18px;
	display: block;
	border: 3px solid #fff;
	box-shadow: 0 0 0 1px var(--fum-border), 0 8px 18px -10px rgba(31, 15, 74, 0.35);
}

.fum-notice-lead {
	font-size: 15px;
	line-height: 1.6;
	color: var(--fum-text);
	margin: 0 0 24px !important;
}

.fum-notice-lead a {
	color: var(--fum-primary);
	font-weight: 700;
	text-decoration: none;
}

.fum-notice-lead a:hover { text-decoration: underline; }

.fum-notice-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
}

.fum-btn-inline {
	width: auto;
	flex: 1 1 auto;
	gap: 8px;
	padding: 12px 20px;
}

.fum-btn-icon {
	display: inline-flex;
	width: 18px;
	height: 18px;
}

.fum-btn-icon svg { width: 100%; height: 100%; }

.fum-btn-outline {
	background: transparent;
	color: var(--fum-primary);
	border: 1.5px solid var(--fum-border);
}

.fum-btn-outline:hover {
	border-color: var(--fum-primary);
	background: color-mix(in srgb, var(--fum-primary) 6%, transparent);
	transform: translateY(-1px);
}

@media (max-width: 480px) {
	.fum-notice-actions { flex-direction: column; }
	.fum-btn-inline { width: 100%; }
}

/* ---------------------------------------------------------------------
   Dashboard app shell
   --------------------------------------------------------------------- */

.fum-dashboard-wrapper {
	padding: 32px 24px 60px;
	background: var(--fum-bg);
}

.fum-app-shell {
	max-width: 1400px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 264px 1fr;
	gap: 24px;
	align-items: start;
}

.fum-app-sidebar {
	background: linear-gradient(165deg, #241a3d, #150f26);
	border-radius: var(--fum-radius);
	padding: 24px 18px;
	position: sticky;
	top: 24px;
	color: #fff;
}

.fum-app-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 8px 20px;
	margin-bottom: 12px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fum-app-brand-avatar {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid rgba(255, 255, 255, 0.25);
}

.fum-app-brand-name {
	font-weight: 700;
	font-size: 14px;
	color: #fff;
}

.fum-app-brand-role {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.55);
}

.fum-dashboard-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.fum-dashboard-nav li a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	text-decoration: none;
	color: rgba(255, 255, 255, 0.72);
	border-radius: 12px;
	font-size: 13.5px;
	font-weight: 600;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.fum-nav-icon {
	width: 18px;
	height: 18px;
	display: flex;
	flex: 0 0 18px;
}

.fum-nav-icon svg { width: 100%; height: 100%; }

.fum-dashboard-nav li.is-active a,
.fum-dashboard-nav li a:hover {
	background: linear-gradient(120deg, var(--fum-primary), var(--fum-accent));
	color: #fff;
}

.fum-app-main {
	min-width: 0;
}

.fum-app-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 12px;
}

.fum-app-topbar h1 {
	font-size: 22px;
	font-weight: 800;
	margin: 0;
	letter-spacing: -0.02em;
}

.fum-app-user {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	border: 1px solid var(--fum-border);
	border-radius: 999px;
	padding: 6px 16px 6px 6px;
	font-size: 13px;
	font-weight: 600;
}

.fum-app-user img {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	object-fit: cover;
}

.fum-dashboard-content {
	background: #fff;
	border-radius: var(--fum-radius);
	padding: 32px;
	border: 1px solid var(--fum-border);
}

@media (max-width: 900px) {
	.fum-app-shell {
		grid-template-columns: 1fr;
	}
	.fum-app-sidebar {
		position: static;
	}
	.fum-dashboard-nav ul {
		flex-direction: row;
		flex-wrap: wrap;
	}
	.fum-dashboard-content {
		padding: 22px;
	}
}

/* Dashboard home */

.fum-welcome-banner {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 24px;
	border-radius: var(--fum-radius);
	background: var(--fum-bg);
	background: linear-gradient(120deg, color-mix(in srgb, var(--fum-primary) 12%, #fff), color-mix(in srgb, var(--fum-accent) 10%, #fff));
	margin-bottom: 24px;
}

.fum-welcome-banner h2 {
	margin: 0 0 4px;
	font-size: 19px;
	font-weight: 800;
}

.fum-welcome-banner p {
	margin: 0;
	color: var(--fum-muted);
	font-size: 13.5px;
}

.fum-avatar {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	flex: 0 0 64px;
	border: 3px solid #fff;
	box-shadow: 0 4px 14px rgba(31, 15, 74, 0.18);
}

.fum-stat-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

@media (max-width: 900px) {
	.fum-stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
	.fum-stat-grid { grid-template-columns: 1fr; }
}

.fum-stat-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px;
	border-radius: calc(var(--fum-radius) * 0.75);
	border: 1px solid var(--fum-border);
	background: #fbfaff;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fum-stat-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px -14px rgba(31, 15, 74, 0.3);
}

.fum-stat-icon {
	width: 40px;
	height: 40px;
	flex: 0 0 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: linear-gradient(120deg, var(--fum-primary), var(--fum-accent));
	color: #fff;
	padding: 9px;
}

.fum-stat-icon svg { width: 100%; height: 100%; }

.fum-stat-label {
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--fum-muted);
	font-weight: 700;
	margin-bottom: 2px;
}

.fum-stat-value {
	font-size: 14px;
	font-weight: 700;
	color: var(--fum-text);
	word-break: break-word;
}

/* Profile view */

.fum-info-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}

@media (max-width: 600px) {
	.fum-info-grid { grid-template-columns: 1fr; }
}

.fum-info-tile {
	padding: 16px 18px;
	border-radius: calc(var(--fum-radius) * 0.6);
	border: 1px solid var(--fum-border);
	background: #fbfaff;
}

.fum-info-tile-wide {
	grid-column: 1 / -1;
}

.fum-info-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--fum-muted);
	font-weight: 700;
	margin-bottom: 4px;
}

.fum-info-value {
	font-size: 14px;
	font-weight: 600;
	color: var(--fum-text);
}

.fum-info-value a {
	color: var(--fum-primary);
	text-decoration: none;
}

/* Edit profile / change password forms rendered inside the dashboard card */

.fum-card-form {
	max-width: 520px;
}

.fum-avatar-field {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	margin-bottom: 26px;
}

.fum-avatar-upload {
	position: relative;
	display: inline-block;
	cursor: pointer;
	border-radius: 50%;
}

.fum-avatar-upload .fum-avatar-preview {
	width: 84px;
	height: 84px;
	flex: 0 0 84px;
}

.fum-avatar-overlay {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: rgba(20, 12, 40, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.fum-avatar-overlay svg {
	width: 22px;
	height: 22px;
}

.fum-avatar-upload:hover .fum-avatar-overlay {
	opacity: 1;
}

.fum-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Small screens: single-column auth (already handled) + tighter paddings */

@media (max-width: 480px) {
	.fum-auth-wrapper { padding: 24px 14px; }
	.fum-dashboard-wrapper { padding: 20px 12px 40px; }
}

.fum-wrapper.fum-full-width {
    width: 100%;
    background: white;
}
.fum-card-form {
    max-width: 100%;
}