:root {
	--background-primary: var(--fnc-accent, #7c3aed);
	--background-secondary: rgba(124,58,237,0.2);
	--background-tertiary: var(--fnc-bg-elevated-2, #1a1a1e);
	--background-fourth: rgba(255, 255, 255, 0.08);
	--background-fifth: var(--fnc-bg-elevated, #141416);
	--color-primary: var(--fnc-text, #f2f2f7);
	--fnc-profile-menu-backdrop-duration: 0.35s;
	--fnc-profile-menu-backdrop-opacity: 0.55;
}

/* menu */

#app-profile-component-menu .menu {
	display: flex;
	gap: 0.75rem;
	flex: 1;
	justify-content: center;
	align-items: center;
	padding: 0.45rem 0.65rem;
	border-radius: var(--fnc-radius-sm, 10px);
	color: var(--color-primary);
	cursor: pointer;
	position: relative;
	min-height: 3.25rem;
	overflow: visible;
}

#app-profile-component-menu .menu:hover {
	background: rgba(255, 255, 255, 0.06);
}

#app-profile-component-menu .photo,
#app-profile-component-menu-displayer .lateral .profile .photo {
	--fnc-profile-avatar-size: 2.75rem;
	--fnc-profile-avatar-border: var(--fnc-paws-blue-strong, #1a6fd4);
	background-color: var(--background-fourth);
	flex: 0 0 var(--fnc-profile-avatar-size);
	align-self: center;
	width: var(--fnc-profile-avatar-size);
	height: var(--fnc-profile-avatar-size);
	min-width: var(--fnc-profile-avatar-size);
	min-height: var(--fnc-profile-avatar-size);
	max-width: var(--fnc-profile-avatar-size);
	max-height: var(--fnc-profile-avatar-size);
	aspect-ratio: 1;
	box-sizing: border-box;
	border-radius: 50%;
	background-image: url('../images/default_photo.jpg');
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center center;
	border: 2px solid var(--fnc-profile-avatar-border);
	overflow: hidden;
}

#app-profile-component-menu .photo.premium,
#app-profile-component-menu-displayer .lateral .profile .photo.premium {
	--fnc-profile-avatar-border: #ffcc00;
}

#app-profile-component-menu .username {
	flex: 1;
	min-width: 0;
	font-weight: 700;
	font-size: 0.98rem;
	line-height: 1.25;
}

#app-profile-component-menu .username.premium {
	color: #fff3c2;
}

#app-profile-component-menu .icon {
	flex: 0 0 auto;
	width: 1.25rem;
	opacity: 0.75;
}

#app-profile-component-menu .icon.premium {
	color: #fff3c2;
}

body.fnc-profile-menu-open {
	overflow: hidden;
}

#app-profile-component-menu-displayer {
	position: fixed;
	inset: 0;
	margin: 0;
	z-index: 10000060;
	visibility: hidden;
	pointer-events: none;
	cursor: default;
	transition: visibility 0s linear var(--fnc-profile-menu-backdrop-duration);
}

#app-profile-component-menu-displayer::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgba(0, 0, 0, var(--fnc-profile-menu-backdrop-opacity));
	opacity: 0;
	transition: opacity var(--fnc-profile-menu-backdrop-duration) ease;
}

/* Visible con cortina en 0 antes de .active (fade-in al abrir) */
#app-profile-component-menu-displayer.is-opening {
	visibility: visible;
	pointer-events: auto;
	transition: visibility 0s linear 0s;
}

#app-profile-component-menu-displayer.is-opening:not(.active)::before {
	opacity: 0;
}

#app-profile-component-menu-displayer.active {
	visibility: visible;
	pointer-events: auto;
	transition: visibility 0s linear 0s;
}

#app-profile-component-menu-displayer.active::before {
	opacity: 1;
}

#app-profile-component-menu-displayer .lateral.fnc-profile-menu-panel {
	margin: 0;
	position: fixed;
	top: 0;
	right: 0;
	width: min(92vw, 20rem);
	height: 100dvh;
	max-height: 100dvh;
	display: flex;
	align-items: stretch;
	flex-direction: column;
	gap: 0;
	background: var(--fnc-bg-elevated, #141416);
	border-left: 1px solid var(--fnc-border-strong, rgba(255, 255, 255, 0.14));
	overflow: hidden;
	box-shadow:
		-18px 0 48px rgba(0, 0, 0, 0.48),
		0 0 0 1px rgba(255, 255, 255, 0.04) inset;
	z-index: 1;
	transform: translate3d(100%, 0, 0);
	transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1);
	will-change: transform;
	cursor: default;
}

#app-profile-component-menu-displayer.active-panel .lateral {
	transform: translate3d(0, 0, 0);
}

#app-profile-component-menu-displayer .lateral .profile {
	display: flex;
	flex-shrink: 0;
	padding: 1.35rem 1.15rem 1.2rem;
	gap: 0.85rem;
	width: 100%;
	align-items: center;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.12) 100%);
	border-bottom: 1px solid var(--fnc-border, rgba(255, 255, 255, 0.09));
}

#app-profile-component-menu-displayer .lateral .settings {
	padding: 1rem 0.85rem 1.35rem;
	width: 100%;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	background: rgba(0, 0, 0, 0.14);
}

.fnc-profile-menu-widgets {
	padding: 0 0.35rem 0.65rem;
	margin-bottom: 0.25rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.fnc-origin-filter {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.fnc-origin-filter__stack {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.fnc-origin-filter__heading {
	padding: 0 1rem 0.15rem;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--fnc-text-muted, rgba(235, 235, 245, 0.58));
}

.fnc-origin-pill {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	width: 100%;
	box-sizing: border-box;
	min-height: 0;
	padding: 0.78rem 1rem;
	border-radius: var(--fnc-radius-sm, 10px);
	border: 1px solid transparent;
	background: transparent;
	color: var(--fnc-text-muted, rgba(235, 235, 245, 0.58));
	cursor: pointer;
	user-select: none;
	transition:
		background-color 0.18s ease,
		color 0.18s ease,
		border-color 0.18s ease,
		box-shadow 0.18s ease;
}

.fnc-origin-pill:hover {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.06);
	color: var(--fnc-text, #f2f2f7);
}

.fnc-origin-pill--toggle.is-active,
.fnc-origin-filter.is-open .fnc-origin-pill--toggle {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.06);
	color: var(--fnc-text, #f2f2f7);
}

.fnc-origin-pill--toggle .fnc-origin-pill__label {
	flex: 1;
	min-width: 0;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.25;
}

.fnc-origin-pill__chevron {
	flex: 0 0 auto;
	width: 1.15rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.72rem;
	opacity: 0.55;
	transition: transform 0.24s ease, opacity 0.18s ease;
}

.fnc-origin-filter.is-open .fnc-origin-pill__chevron {
	transform: rotate(180deg);
	opacity: 0.85;
}

.fnc-origin-filter__choices {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	padding-left: 0.35rem;
	transition:
		max-height 0.3s cubic-bezier(0.2, 0, 0, 1),
		opacity 0.22s ease;
}

.fnc-origin-filter.is-open .fnc-origin-filter__choices {
	max-height: 14rem;
	opacity: 1;
	padding-top: 0.1rem;
	padding-bottom: 0.15rem;
}

.fnc-origin-filter__choices[hidden] {
	display: flex;
}

.fnc-origin-pill--choice {
	padding-left: 0.85rem;
}

.fnc-origin-pill--choice .fnc-origin-pill__label {
	flex: 1;
	min-width: 0;
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.25;
}

.fnc-origin-pill--choice.is-selected {
	background: var(--fnc-accent-soft, rgba(124, 58, 237, 0.14));
	border-color: rgba(124, 58, 237, 0.22);
	color: var(--fnc-text, #f2f2f7);
	box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.1) inset;
}

.fnc-origin-pill--choice.is-selected .fnc-origin-pill__icon {
	color: var(--fnc-accent, #7c3aed);
}

.fnc-origin-pill--choice.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

.fnc-origin-pill__icon {
	flex: 0 0 auto;
	width: 1.15rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.92rem;
	color: var(--fnc-text-muted, rgba(235, 235, 245, 0.45));
	transition: color 0.18s ease;
}

.fnc-origin-pill:hover .fnc-origin-pill__icon,
.fnc-origin-pill--choice.is-selected .fnc-origin-pill__icon {
	color: var(--fnc-accent, #7c3aed);
}

.fnc-origin-pill__icon--toggle {
	color: var(--fnc-text-muted, rgba(235, 235, 245, 0.45));
}

.fnc-origin-pill__mark {
	flex: 0 0 auto;
	width: 1.1rem;
	height: 1.1rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.68rem;
	color: transparent;
}

.fnc-origin-pill--choice.is-selected .fnc-origin-pill__mark {
	color: var(--fnc-accent, #7c3aed);
}

.fnc-origin-pill__ring {
	width: 0.85rem;
	height: 0.85rem;
	border-radius: 999px;
	border: 1.5px solid rgba(235, 235, 245, 0.22);
	box-sizing: border-box;
}

.fnc-origin-filter__feedback {
	padding: 0.15rem 1rem 0;
	font-size: 0.74rem;
	line-height: 1.35;
	color: rgba(134, 239, 172, 0.88);
}

.fnc-origin-filter__feedback.is-error {
	color: #fca5a5;
}

/* Audit mode ("ojo de Dios") — admin-only toggle */
.fnc-audit-mode {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	margin-bottom: 0.5rem;
	padding-bottom: 0.55rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.fnc-audit-mode__row {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.5rem 0.85rem;
	border-radius: 0.85rem;
	border: 1px solid rgba(255, 255, 255, 0.06);
	background: rgba(255, 255, 255, 0.02);
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.fnc-audit-mode__row:hover,
.fnc-audit-mode__row:focus-visible {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.12);
	outline: none;
}

.fnc-audit-mode.is-active .fnc-audit-mode__row {
	background: rgba(250, 204, 21, 0.1);
	border-color: rgba(250, 204, 21, 0.4);
}

.fnc-audit-mode__icon {
	flex: 0 0 auto;
	width: 1.9rem;
	height: 1.9rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	font-size: 0.92rem;
	color: var(--fnc-text-muted, rgba(235, 235, 245, 0.6));
	background: rgba(255, 255, 255, 0.05);
	transition: color 0.2s ease, background 0.2s ease;
}

.fnc-audit-mode.is-active .fnc-audit-mode__icon {
	color: #facc15;
	background: rgba(250, 204, 21, 0.16);
}

.fnc-audit-mode__text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

.fnc-audit-mode__title {
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--fnc-text, #f2f2f7);
	line-height: 1.2;
}

.fnc-audit-mode__hint {
	font-size: 0.72rem;
	line-height: 1.3;
	color: var(--fnc-text-muted, rgba(235, 235, 245, 0.55));
}

.fnc-audit-mode__switch {
	flex: 0 0 auto;
	position: relative;
	width: 2.4rem;
	height: 1.35rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	transition: background 0.2s ease;
}

.fnc-audit-mode.is-active .fnc-audit-mode__switch {
	background: #facc15;
}

.fnc-audit-mode__knob {
	position: absolute;
	top: 50%;
	left: 0.18rem;
	width: 1rem;
	height: 1rem;
	border-radius: 50%;
	background: #fff;
	transform: translateY(-50%);
	transition: left 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.fnc-audit-mode.is-active .fnc-audit-mode__knob {
	left: calc(100% - 1.18rem);
}

.fnc-audit-mode.is-loading {
	opacity: 0.6;
	pointer-events: none;
}

.fnc-audit-mode__feedback {
	padding: 0 0.4rem;
	font-size: 0.74rem;
	line-height: 1.35;
	color: rgba(250, 204, 21, 0.9);
}

.fnc-audit-mode__feedback.is-error {
	color: #fca5a5;
}

#app-profile-component-menu-displayer .lateral .profile .photo {
	--fnc-profile-avatar-size: 3.5rem;
	border-width: 3px;
}

#app-profile-component-menu-displayer .lateral .profile .username {
	font-size: 1.12rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--fnc-text, #f2f2f7);
}

#app-profile-component-menu-displayer .lateral .profile .username.premium {
	color: #fff3c2;
}

#app-profile-component-menu-displayer .lateral .profile .back {
	padding: 0.5rem;
	margin-left: auto;
	flex: 0 0 auto;
	width: 2.5rem;
	height: 2.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	cursor: pointer;
	color: var(--fnc-text-muted, rgba(235, 235, 245, 0.58));
	transition: background-color 0.18s ease, color 0.18s ease;
}

#app-profile-component-menu-displayer .lateral .profile .back:hover {
	background: rgba(255, 255, 255, 0.08);
	color: var(--fnc-accent, #7c3aed);
}

#app-profile-component-menu-displayer .lateral ul.items,
#app-profile-component-menu-displayer .lateral ul {
	list-style: none;
	width: 100%;
	margin: 0;
	padding: 0.35rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

#app-profile-component-menu-displayer .lateral ul li {
	list-style: none;
	margin: 0;
	padding: 0;
}

#app-profile-component-menu-displayer .lateral ul li a {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	width: 100%;
	box-sizing: border-box;
	font-size: 0.95rem;
	font-weight: 600;
	padding: 0.78rem 1rem;
	border-radius: var(--fnc-radius-sm, 10px);
	border: 1px solid transparent;
	color: var(--fnc-text-muted, rgba(235, 235, 245, 0.58));
	text-decoration: none;
	transition:
		background-color 0.18s ease,
		color 0.18s ease,
		border-color 0.18s ease,
		box-shadow 0.18s ease;
}

#app-profile-component-menu-displayer .lateral ul li a i {
	width: 1.15rem;
	flex-shrink: 0;
	text-align: center;
	font-size: 0.92rem;
	color: var(--fnc-text-muted, rgba(235, 235, 245, 0.45));
	transition: color 0.18s ease;
}

#app-profile-component-menu-displayer .lateral ul li a:hover {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.06);
	color: var(--fnc-text, #f2f2f7);
}

#app-profile-component-menu-displayer .lateral ul li a:hover i {
	color: var(--fnc-accent, #7c3aed);
}

#app-profile-component-menu-displayer .lateral ul li a:active,
#app-profile-component-menu-displayer .lateral ul li a:focus-visible {
	outline: none;
	background: var(--fnc-accent-soft, rgba(124,58,237,0.14));
	border-color: rgba(124,58,237,0.22);
	color: var(--fnc-accent, #7c3aed);
	box-shadow: 0 0 0 1px rgba(124,58,237,0.12) inset;
}

#app-profile-component-menu-displayer .lateral ul li a:active i,
#app-profile-component-menu-displayer .lateral ul li a:focus-visible i {
	color: var(--fnc-accent, #7c3aed);
}

#app-profile-component-menu-displayer .lateral ul li a[data-app-profile-item="logout"] {
	color: rgba(255, 175, 155, 0.88);
}

#app-profile-component-menu-displayer .lateral ul li a[data-app-profile-item="logout"] i {
	color: rgba(255, 140, 120, 0.75);
}

#app-profile-component-menu-displayer .lateral ul li a[data-app-profile-item="logout"]:hover {
	background: rgba(219, 51, 0, 0.12);
	border-color: rgba(255, 107, 74, 0.22);
	color: #ff7a5c;
}

#app-profile-component-menu-displayer .lateral ul li a[data-app-profile-item="logout"]:hover i {
	color: #ff7a5c;
}

#app-profile-component-menu-displayer .lateral ul li.fnc-profile-menu-divider {
	list-style: none;
	padding: 0.45rem 1rem 0.35rem;
	pointer-events: none;
}

#app-profile-component-menu-displayer .lateral ul li.fnc-profile-menu-divider hr {
	border: none;
	border-top: 1px solid var(--fnc-border, rgba(255, 255, 255, 0.09));
	margin: 0;
}


@media screen and (max-width: 768px) {
	#app-profile-component-menu {
		width: 100%;
	}

	#app-profile-component-menu .menu {
		flex: 1 1 auto;
		justify-content: flex-start;
		width: 100%;
		max-width: none;
		padding: 0.35rem 0.25rem;
		gap: 0.65rem;
	}

	#app-profile-component-menu .username {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	#app-profile-component-menu .icon {
		margin-left: auto;
	}

	#app-profile-component-menu-displayer .lateral.fnc-profile-menu-panel {
		width: min(100vw, 20rem);
	}
}

/* component:report */

#app-profile-component-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 10000010;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	overflow: hidden;
	padding: calc(var(--fnc-header-height, 4.75rem) + 1rem) 1rem 1rem;
	box-sizing: border-box;
}

#app-profile-component-modal.content {
	align-items: flex-start;
}

#app-profile-component-modal .modal {
	position: relative;
	margin-top: 0;
	width: min(40rem, 100%);
	height: auto;
	max-height: calc(100vh - var(--fnc-header-height, 4.75rem) - 2rem);
	padding: 1.35rem 1.25rem 1.15rem;
	background: var(--fnc-bg-elevated, #141416);
	border: 1px solid var(--fnc-border, rgba(255, 255, 255, 0.09));
	border-radius: var(--fnc-radius-md, 14px);
	overflow-y: auto;
	overflow-x: hidden;
	flex: 0 0 auto;
	box-sizing: border-box;
}

#app-profile-component-modal .body {
	padding: 0.35rem 0.15rem 0.15rem;
	width: 100%;
	display: block;
	box-sizing: border-box;
}

#app-profile-component-modal .body:has(> .loader:only-child) {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 5.5rem;
}

#app-profile-component-modal .body .loader {
	display: block;
	flex: 0 0 auto;
	width: 4.5rem;
	height: 1.35rem;
	margin: 0 auto;
	background-position: center center;
}

#app-profile-component-modal .close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
	width: 2.25rem;
	height: 2.25rem;
	display: none;
	align-items: center;
	justify-content: center;
	margin: 0;
	font-size: 1.55rem;
	line-height: 1;
	color: #777;
	cursor: pointer;
}

#app-profile-component-modal .close.visible {
	display: inline-flex;
}

#app-profile-component-modal .close:hover {
	color: #aaa;
}

/* Título del formulario de reporte/moderación: no chocar con la X. */
#app-profile-component-modal .profile-report.box.adaptable {
	padding: 0.35rem 0.25rem 0.15rem;
	gap: 0.85rem;
}

#app-profile-component-modal .profile-report .box-row:first-child {
	padding-right: 2.75rem;
	padding-top: 0.15rem;
}

#app-profile-component-modal .profile-report .box-row:first-child h3 {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 0.55rem;
	font-size: 1.2rem;
	line-height: 1.25;
}

#app-profile-component-modal.locked {
	cursor: wait;
}

#app-profile-component-modal.locked .close {
	opacity: 0.35;
	pointer-events: none;
}
