/* ============================================================
   用户面板统一左右壳（左菜单 + 右内容）
   适用页面：user / settings / security / orders / member / qrcode
             / recharge / billings / invite / messages
   PC：左侧 230px 粘性菜单 + 右侧主内容区（topbar + panel）
   手机（≤768px，由 mobile.css 实现）：菜单变顶部横滑 chips
   ============================================================ */
/* ===== 侧栏模板锁定 =====
   目标：左侧菜单在任何面板页都像素级一致——点击菜单切换页面时，
   用户卡片与菜单的位置、文字都不发生任何变化。
   做法：① 显式锁定侧栏内所有元素的 line-height，使其不受页面额外加载的
            全局样式影响（如 orders.html 加载 style.css 的 line-height:1.6
            会让菜单整体高出 42px）；
        ② 预留滚动条槽位，避免不同页面高度不同导致居中布局左右抖动 7px。 */
html { scrollbar-gutter: stable; }
.layout { display: flex; min-height: 100vh; max-width: 1280px; margin: 0 auto; }
.sidebar { width: 230px; flex: none; background: #fff; border-radius: 16px; margin: 16px 0 16px 16px; padding: 20px 14px; align-self: flex-start; position: sticky; top: 16px; box-shadow: 0 1px 4px rgba(30,40,60,.06); line-height: 1.35; }
.u-head { display: flex; align-items: center; gap: 12px; padding: 0 8px 18px; border-bottom: 1px solid #f2f3f7; margin-bottom: 12px; }
.u-avatar { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, #ff9f43, #f43f24); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; overflow: hidden; flex: none; }
.u-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.u-name { font-size: 15px; font-weight: 700; max-width: 148px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 20px; }
.u-vip { font-size: 11px; color: #b0b6c3; margin-top: 3px; max-width: 148px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 14px; }
.menu-group { font-size: 12px; color: #a5abba; padding: 10px 10px 4px; line-height: 16px; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; color: #4b5568; cursor: pointer; margin-bottom: 2px; line-height: 20px; }
.menu-item:hover { background: #fff3ec; color: #ff6b35; }
.menu-item.active { background: linear-gradient(135deg, #ff6b35, #f43f24); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(244,63,36,.22); }
.menu-item .icon { width: 20px; text-align: center; flex: none; }
.main { flex: 1; padding: 16px; min-width: 0; }
.topbar { background: #fff; border-radius: 16px; padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; box-shadow: 0 1px 4px rgba(30,40,60,.06); }
.topbar-title { font-size: 16px; font-weight: 700; }
.btn-home { padding: 7px 14px; border: 1px solid #e5e8ef; background: #fff; border-radius: 8px; font-size: 13px; cursor: pointer; color: #4b5568; flex: none; }
.btn-home:hover { border-color: #ff6b35; color: #ff6b35; }
.panel { background: #fff; border-radius: 16px; padding: 20px; box-shadow: 0 1px 4px rgba(30,40,60,.06); margin-bottom: 14px; }
.panel:last-child { margin-bottom: 0; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-header h3, .panel h3 { font-size: 15px; font-weight: 700; }
.pg-desc { font-size: 12.5px; color: #8b96a8; margin: 0 2px 14px; line-height: 1.7; }

/* 兜底：mobile.css 未加载时 ≤760px 纵向堆叠 */
@media (max-width: 760px) {
    .layout { flex-direction: column; }
    .sidebar { width: auto; margin: 12px; position: static; }
    .main { padding: 0 12px 24px; }
}
