.ai-user-menu {
	position: relative;
	z-index: 101;
}

.ai-user-menu__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.04);
	color: #eef0f6;
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.ai-user-menu__toggle:hover,
.ai-user-menu__toggle[aria-expanded="true"] {
	border-color: rgba(124, 92, 255, 0.45);
	background: rgba(124, 92, 255, 0.12);
}

.ai-user-menu__chevron {
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.2s ease;
}

.ai-user-menu__toggle[aria-expanded="true"] .ai-user-menu__chevron {
	transform: rotate(-135deg) translateY(1px);
}

.ai-user-menu__dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 180px;
	padding: 6px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 14px;
	background: rgba(14, 16, 28, 0.98);
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
	z-index: 102;
}

.ai-user-menu__dropdown--auth {
	min-width: 320px;
	width: min(360px, calc(100vw - 32px));
	padding: 18px 16px 16px;
}

.ai-user-menu__form {
	margin: 0;
}

.ai-user-menu__item {
	display: block;
	width: 100%;
	padding: 10px 12px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #eef0f6;
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 0.875rem;
	font-weight: 500;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.ai-user-menu__item:hover,
.ai-user-menu__item--link:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
}

.ai-user-menu__item--link {
	text-decoration: none;
}

.ai-user-menu__auth {
	display: block;
}

.ai-user-menu__panel[hidden] {
	display: none !important;
}

.ai-user-menu__lead {
	margin: 0 0 14px;
	color: #8b93a8;
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 0.875rem;
	line-height: 1.5;
}

.ai-user-menu__auth-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
}

.ai-user-menu__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ai-user-menu__label {
	color: #8b93a8;
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 0.75rem;
	font-weight: 600;
}

.ai-user-menu__input {
	display: block;
	width: 100%;
	min-height: 44px;
	padding: 12px 14px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 12px;
	background-color: rgba(7, 8, 15, 0.92);
	color: #eef0f6;
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 16px;
	line-height: 1.4;
	-webkit-appearance: none;
	appearance: none;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-user-menu__input:focus {
	outline: none;
	border-color: rgba(124, 92, 255, 0.65);
	box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}

.ai-user-menu__checkbox {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #8b93a8;
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 0.8125rem;
	cursor: pointer;
}

.ai-user-menu__checkbox input {
	accent-color: #7c5cff;
}

.ai-user-menu__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	margin-top: 2px;
	padding: 12px 18px;
	border: none;
	border-radius: 12px;
	background: linear-gradient(135deg, #7c5cff, #6344e0);
	color: #fff;
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.ai-user-menu__submit:hover {
	opacity: 0.92;
}

.ai-user-menu__submit:disabled {
	opacity: 0.7;
	cursor: default;
}

.ai-user-menu__footer {
	margin: 12px 0 0;
	text-align: center;
	color: #8b93a8;
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 0.8125rem;
	line-height: 1.45;
}

.ai-user-menu__footer + .ai-user-menu__footer {
	margin-top: 8px;
}

.ai-user-menu__link {
	padding: 0;
	border: 0;
	background: none;
	color: #22d3ee;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.ai-user-menu__link:hover {
	text-decoration: underline;
}

.ai-user-menu__notice {
	margin: 0 0 12px;
	padding: 10px 12px;
	border-radius: 10px;
	font-family: 'Manrope', system-ui, sans-serif;
	font-size: 0.8125rem;
	line-height: 1.5;
}

.ai-user-menu__notice--error {
	background: rgba(239, 68, 68, 0.12);
	border: 1px solid rgba(239, 68, 68, 0.35);
	color: #fecaca;
}

.ai-user-menu__notice--success {
	background: rgba(52, 211, 153, 0.12);
	border: 1px solid rgba(52, 211, 153, 0.35);
	color: #bbf7d0;
}
