.xsis-profile-menu {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.xsis-profile-menu__trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.04);
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.xsis-profile-menu__trigger:hover,
.xsis-profile-menu__trigger[aria-expanded="true"] {
	border-color: rgba(255, 255, 255, 0.28);
	background: rgba(255, 255, 255, 0.08);
	box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.18);
}

.xsis-profile-avatar,
.xsis-profile-menu__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #ffffff;
	background: linear-gradient(145deg, #2f6fed 0%, #1f4eb0 100%);
	overflow: hidden;
}

.xsis-profile-menu__avatar--lg,
.xsis-profile-menu__head .xsis-profile-menu__avatar {
	width: 42px;
	height: 42px;
	flex-shrink: 0;
	font-size: 0.82rem;
}

.xsis-profile-avatar--img,
.xsis-profile-menu__avatar--img {
	object-fit: cover;
	background: transparent;
}

.xsis-profile-menu__panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 1200;
	width: min(280px, calc(100vw - 24px));
	padding: 8px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 14px;
	background: #17181d;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.xsis-profile-menu__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 10px 12px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.xsis-profile-menu__identity {
	min-width: 0;
}

.xsis-profile-menu__name {
	display: block;
	font-size: 0.92rem;
	font-weight: 600;
	color: #f3f4f6;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.xsis-profile-menu__email {
	display: block;
	margin-top: 2px;
	font-size: 0.76rem;
	color: rgba(255, 255, 255, 0.55);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.xsis-profile-menu__plan,
.xsis-profile-menu__remaining {
	margin: 4px 0 0;
	font-size: 0.72rem;
	line-height: 1.35;
}

.xsis-profile-menu__plan {
	color: rgba(255, 255, 255, 0.72);
}

.xsis-profile-menu__remaining {
	color: #8eb4ff;
	font-size: 0.88rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
}

.xsis-profile-menu__nav,
.xsis-profile-menu__footer {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-top: 6px;
}

.xsis-profile-menu__footer {
	padding-top: 8px;
	margin-top: 4px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.xsis-profile-menu__item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 10px 12px;
	border: none;
	border-radius: 10px;
	background: transparent;
	color: #eceff3;
	font: inherit;
	font-size: 0.86rem;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.12s ease, color 0.12s ease;
}

.xsis-profile-menu__item svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	opacity: 0.82;
}

.xsis-profile-menu__item:hover,
.xsis-profile-menu__item:focus-visible {
	background: rgba(255, 255, 255, 0.06);
	color: #ffffff;
	outline: none;
}

.xsis-profile-menu__item--button {
	color: #ffb4b4;
}

.xsis-profile-menu__item--button:hover,
.xsis-profile-menu__item--button:focus-visible {
	background: rgba(255, 96, 96, 0.1);
	color: #ffc8c8;
}

.xsis-plan-remaining {
	font-size: 0.92rem;
	font-weight: 600;
	color: #f3f4f6;
}

.xsis-plan-remaining--warn {
	color: #ffc460;
}

.xsis-plan-remaining--expired {
	color: #ff8080;
}

.it-nav__actions .xsis-profile-menu__trigger {
	width: 38px;
	height: 38px;
}

.it-nav__actions .xsis-profile-menu__panel {
	top: calc(100% + 12px);
}

html.xfp-web .xfp-header-auth {
	display: flex;
	align-items: center;
	gap: 8px;
}

html.xfp-web .xfp-header-auth .xsis-profile-menu__trigger {
	width: 32px;
	height: 32px;
}

html.xfp-web .xfp-header-auth .xsis-profile-menu__avatar {
	font-size: 0.68rem;
}

[data-ls-theme="light"] .xsis-profile-menu__trigger {
	border-color: rgba(0, 0, 0, 0.12);
	background: rgba(0, 0, 0, 0.03);
}

[data-ls-theme="light"] .xsis-profile-menu__panel {
	background: #ffffff;
	border-color: rgba(0, 0, 0, 0.08);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

[data-ls-theme="light"] .xsis-profile-menu__name {
	color: #111827;
}

[data-ls-theme="light"] .xsis-profile-menu__email,
[data-ls-theme="light"] .xsis-profile-menu__plan {
	color: rgba(17, 24, 39, 0.62);
}

[data-ls-theme="light"] .xsis-profile-menu__item {
	color: #1f2937;
}

[data-ls-theme="light"] .xsis-profile-menu__item:hover {
	background: rgba(0, 0, 0, 0.04);
}
