/* 顶栏补充（来自 zx.css 的 topbar 片段） */

body.hide-user-panel .topbar-right .auth-inline {
display:none !important;
}

.topbar-right {
margin-left:auto;
}

/* ============================================================
   【2026-11-03】顶栏三枚图标统一尺寸与中心线
   【2026-11-04】按视觉稿收紧：logo 28、日夜按钮 26（图标 24）、头像 26
   ------------------------------------------------------------
   改之前实测：logo 容器 32，但 .topbar-left > * 带着 layui-embed.css
   的 margin-bottom:12px，整个 logo 被顶高 6px；日夜按钮 36、头像 38，
   三者中心线分别落在 24.5 / 31.5 / 30.5。这里：
   1) 清掉顶栏左侧子项的 margin-bottom，logo 回到行中心；
   2) logo 容器 28×28；日夜按钮 / 头像容器 26×26；
   3) logo 图形 28×28，日夜图形 24×24（外圆 24，按钮外圈 26），
      默认头像图形 26×26（上传头像图片仍铺满 26×26 圆形）；
   4) 右侧由 flex-end 改为 center，三枚图标中心线一致。
   ============================================================ */

.topbar-left > * {
	margin-bottom: 0 !important;
}

.topbar-right {
	-webkit-box-align: center;
	-webkit-align-items: center;
	-ms-flex-align: center;
	align-items: center !important;
}

.logo-mark {
	width: 28px !important;
	height: 28px !important;
}

.theme-toggle,
#userAvatarArea .user-avatar,
.user-chip .user-avatar {
	width: 26px !important;
	height: 26px !important;
}

.logo-mark > svg,
.logo-mark > img {
	width: 28px !important;
	height: 28px !important;
}

.theme-toggle > svg {
	width: 24px !important;
	height: 24px !important;
}

#userAvatarArea .user-avatar > svg,
.user-chip .user-avatar > svg {
	width: 26px !important;
	height: 26px !important;
}

/* ============================================================
   【2026-10-18】顶栏右侧：头像透明 + 子项底边留白清零
   【2026-11-03】对齐方式改为 center（见上方「三枚图标统一」），
   三枚图标现在同高，底边与中心线同时对齐。
   1) 原 .topbar-right > * 与 .user-chip > * 的 margin-bottom:8px
      在 flex 行里会把日夜按钮/头像整体顶高；
   2) 头像内联样式里写了蓝色渐变底，必须用 !important 覆盖；
   3) 兼容老内核写法：不用 CSS 变量 / :has / gap，保留 -webkit-、-ms- 前缀。
   ============================================================ */

.topbar-right > * {
	margin-bottom: 0 !important;
}

.user-chip {
	padding-bottom: 0 !important;
}

.user-chip > * {
	margin-bottom: 0 !important;
}

/* 头像：去掉蓝色渐变底；默认人像图标用 currentColor，底色透明后改为品牌蓝，
   避免原来的白图标看不见。 */
#userArea .user-avatar {
	background: transparent !important;
	background-image: none !important;
	/* 去掉头像 2px 的蓝色描边：既满足"透明头像"，也让头像可见底边
	   与日夜按钮底边真正落在同一条线上（描边会让头像内容内缩 2px）。 */
	border: 0 !important;
	box-shadow: none !important;
	color: #1677ff !important;
}

@media screen and (max-width: 860px) {
	/* 小屏只显示头像，外层的淡蓝胶囊底也一并去掉 */
	.user-chip {
		background: transparent !important;
		border-color: transparent !important;
		/* 底边不再留 1px 边框，避免头像底边比日夜按钮高 1px */
		border-bottom-width: 0 !important;
	}
}

/* ============================================================
   【2026-11-01】工具页头像：只有图标，不再显示昵称/剩余时长，
   也不再随鼠标悬停伸缩；悬停只弹出一行掩码卡号/账号。
   首页仍用原来的 user-chip（不受影响）。
   ============================================================ */
.zx-user-avatar-wrap {
	position: relative;
	display: -webkit-box;
	display: -webkit-flex;
	display: flex;
	-webkit-box-align: center;
	-webkit-align-items: center;
	align-items: center;
	-webkit-box-pack: center;
	-webkit-justify-content: center;
	justify-content: center;
	cursor: pointer;
	outline: none;
}

.zx-user-avatar-wrap .zx-user-tip {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 1200;
	padding: 6px 10px;
	border-radius: 8px;
	border: 1px solid rgba(0, 0, 0, .08);
	background: #fff;
	background: var(--card, #fff);
	color: #1d2129;
	color: var(--text-1, #1d2129);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .14);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	-webkit-transform: translateY(-2px);
	transform: translateY(-2px);
	-webkit-transition: opacity .15s ease, transform .15s ease, visibility .15s;
	transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

.zx-user-avatar-wrap:hover .zx-user-tip,
.zx-user-avatar-wrap:focus .zx-user-tip,
.zx-user-avatar-wrap:focus-within .zx-user-tip {
	opacity: 1;
	visibility: visible;
	-webkit-transform: none;
	transform: none;
}

body.dark .zx-user-avatar-wrap .zx-user-tip,
[data-theme="dark"] .zx-user-avatar-wrap .zx-user-tip {
	border-color: rgba(255, 255, 255, .12);
	background: #1e293b;
	background: var(--card, #1e293b);
	color: #f1f5f9;
	color: var(--text-1, #f1f5f9);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
}
