/* ============================================================
 * shell-redesign.css — 时光云控制台外壳重设计（huiyuan_clientatea2）
 * 风格：silly-panda 白卡片浮动风
 * 原则：只做视觉覆盖，不改 DOM 结构和 JS 逻辑
 * 2026-10-26 侧边栏统一规范：面板圆角 16px / 行圆角 12px；
 *   字号统一 菜单文字14px、图标14px（视觉略小于文字）、分组标题12px；
 *   间距标尺 4/8/12/16，组内行间隙 2px，组间 16px，分隔线上下 12px；
 *   图文间距统一 10px，行内边距左右对称 12px，二级行文字与父级对齐。
 *   仅调整字号/圆角/间距，内容、配色与交互不变。
 * ============================================================ */

/* ---- 隐藏 Vue 未编译的模板（防止 {{}} 闪现） ---- */
[v-cloak] { display: none !important; }

/* ---- 全局背景 ---- */
html, body {
  background: #f3f5f9 !important;
}

/* ---- 侧边栏：白色圆角浮动卡片 ---- */
.el-aside {
  width: 220px !important;
  background: #ffffff !important;
  margin: 12px 0 12px 12px;
  padding: 12px 10px !important;
  height: calc(100vh - 24px) !important;
  border-radius: 16px;
  border: 1px solid #eef0f4 !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04) !important;
  overflow-y: auto;
  overflow-x: hidden;
  position: sticky;
  top: 12px;
}
.el-aside::-webkit-scrollbar { width: 4px; }
.el-aside::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); border-radius: 4px; }
.el-aside::-webkit-scrollbar-track { background: transparent; }

/* Logo */
.ali-logo {
  height: 30px !important;
  max-width: 140px !important;
  margin: 4px auto 12px !important;
}

/* 菜单组 */
.menu-top {
  margin-top: 4px !important;
}

/* 分隔线（此模板类名是 shiwai-line）：组间间隔，比组内更松 */
.shiwai-line, .line {
  width: auto !important;
  height: 1px !important;
  background: #f0f1f4 !important;
  border: none !important;
  opacity: 1 !important;
  margin: 12px 8px !important;
}

/* ---- 菜单项 ---- */
.menu-top .el-menu-item,
.menu-top .el-submenu__title {
  height: 42px !important;
  line-height: 42px !important;
  border-radius: 12px !important;
  margin-bottom: 2px;
  padding: 0 12px !important;
  border: 1px solid transparent !important;
  color: #374151 !important;
  transition: all .3s cubic-bezier(.4,0,.2,1) !important;
}
.menu-top .el-menu-item i,
.menu-top .el-submenu__title i {
  color: #6b7280 !important;
  font-size: 14px !important;
  transition: all .3s ease !important;
}
.menu-top .aside-menu-text {
  margin-left: 10px !important;
  font-size: 14px;
  font-weight: 500;
}

/* hover：与选中态完全一致的包裹感（2026-10-26 按需求调整，原为透明底仅文字变蓝） */
.menu-top .el-menu-item:hover,
.menu-top .el-submenu__title:hover {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
  color: #3b82f6 !important;
  box-shadow: 0 6px 16px -4px rgba(59, 130, 246, 0.18), 0 2px 6px -2px rgba(15, 23, 42, 0.06) !important;
}
.menu-top .el-menu-item:hover i,
.menu-top .el-submenu__title:hover i {
  color: #3b82f6 !important;
  transform: scale(1.18);
}

/* 选中态 */
.menu-top .el-menu-item.is-active {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
  color: #3b82f6 !important;
  box-shadow: 0 6px 16px -4px rgba(59, 130, 246, 0.18), 0 2px 6px -2px rgba(15, 23, 42, 0.06) !important;
}
.menu-top .el-menu-item.is-active i {
  color: #3b82f6 !important;
  transform: scale(1.18);
}
.menu-top .el-menu-item.is-active .aside-menu-text {
  font-weight: 600;
}

/* 分组标题（无链接的菜单项，如"产品与服务""账号管理"）：组间间隔 16px，标题到首行 4px */
.menu-top .el-menu-item.menu-group-title {
  height: 28px !important;
  line-height: 28px !important;
  margin-top: 16px !important;
  margin-bottom: 4px !important;
  padding: 0 12px !important;
  cursor: default !important;
  pointer-events: none;
  color: #9ca3af !important;
  font-size: 12px !important;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: transparent !important;
  box-shadow: none !important;
  border-color: transparent !important;
}
.menu-top .el-menu-item.menu-group-title i { display: none !important; }
.menu-top .el-menu-item.menu-group-title .aside-menu-text {
  margin-left: 0 !important;
  font-size: 12px !important;
}

/* 二级菜单：文字与父级菜单文字左对齐（10 aside + 12 padding + 14 icon + 10 gap = 46px） */
.menu-top .el-submenu .el-menu-item {
  min-width: auto !important;
  height: 38px !important;
  line-height: 38px !important;
  padding-left: 36px !important;
  padding-right: 12px !important;
}
/* 子菜单展开箭头与行内边距对齐 */
.menu-top .el-submenu__title .el-submenu__icon-arrow {
  right: 12px !important;
}

/* ---- 顶栏：自适应宽度，靠右对齐 ---- */
.el-header {
  top: 12px !important;
  left: auto !important;
  right: 12px !important;
  width: fit-content !important;
  max-width: calc(100vw - 260px) !important;
  height: 56px !important;
  background: #ffffff !important;
  border-radius: 16px;
  border: 1px solid #eef0f4;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  backdrop-filter: none !important;
  padding: 0 18px !important;
  z-index: 900;
}

/* 顶栏图标 hover */
.header-right .right-item,
.header-right .header-right-item {
  transition: all .3s ease;
}
.header-right .right-item:hover img,
.header-right .right-item:hover svg {
  transform: scale(1.18);
}
.header-right .right-item img,
.header-right .right-item svg {
  transition: transform .3s ease;
}

/* ---- 内容区 ---- */
.el-main {
  background: transparent !important;
  padding-top: 76px !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  padding-bottom: 24px !important;
}

.main-card, .el-card {
  border-radius: 16px !important;
}

/* ---- 响应式 ≤750px ---- */
@media screen and (max-width: 750px) {
  .el-aside { display: none !important; }
  .el-header {
    top: 12px !important; left: auto !important; right: 12px !important;
    width: fit-content !important; max-width: calc(100vw - 24px) !important; height: 52px !important;
  }
  .el-main {
    padding-top: 72px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .drawer-menu { background: #ffffff !important; }
  .drawer-menu-list-top .menu-top .el-menu-item,
  .drawer-menu-list-top .menu-top .el-submenu__title { color: #374151 !important; }
  .drawer-menu-list-top .menu-top .el-menu-item i,
  .drawer-menu-list-top .menu-top .el-submenu__title i { color: #6b7280 !important; }
  .drawer-menu-list-top .menu-top .el-menu-item.is-active {
    background: #f0f5ff !important; color: #3b82f6 !important;
  }
  /* 移动端抽屉：右侧大圆角浮动卡片 */
  /* 抽屉改为浮动卡片：上下各镂空 12px，与 PC 端侧栏浮卡一致 */
  .el-drawer {
    top: 12px !important;
    bottom: 12px !important;
    height: auto !important;
    border-radius: 0 16px 16px 0 !important;
    box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.35) !important;
    overflow: hidden !important;
  }
  .el-drawer__body {
    background: #ffffff !important;
    padding: 8px 12px 12px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  .el-drawer__wrapper {
    background: rgba(15,23,42,0.45) !important;
  }
  /* 修复抽屉横向可拖动：logo 行宽度跟随 body，不要再写死 3.8rem */
  .drawer-menu .drawer-menu-top {
    width: 100% !important;
  }
  /* 移动端菜单左对齐收紧：去掉多余层叠 padding，图标靠左 */
  .drawer-menu-list-top {
    padding: 0 4px !important;
    margin-top: 6px !important;
  }
  /* 移动端分组标题上方间距收紧（原 16px，缩小标题后显得空隙过大） */
  .drawer-menu-list-top .menu-top .el-menu-item.menu-group-title {
    margin-top: 10px !important;
  }
  /* 分组标题保持浅灰（上面的通用规则会把菜单文字统一成深灰，分隔符需要更弱） */
  .drawer-menu-list-top .menu-top .el-menu-item.menu-group-title {
    color: #9ca3af !important;
  }
  .drawer-menu-list-top .menu-top .el-menu-item,
  .drawer-menu-list-top .menu-top .el-submenu__title {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  .drawer-menu-list-top .menu-top .el-menu-item .aside-menu-text {
    margin-left: 12px !important;
  }
}

/* ---- 移动端抽屉"收起"把手：玫红色，贴抽屉右边缘 ---- */
.drawer-close-tab {
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 88px;
  background: linear-gradient(135deg, #fb7185, #f43f5e);
  border: none;
  border-radius: 12px 0 0 12px;
  cursor: pointer;
  z-index: 20;
  color: #ffffff;
  box-shadow: -2px 4px 10px rgba(244,63,94,0.4);
  transition: all .25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drawer-close-tab .drawer-tab-text {
  writing-mode: vertical-rl;
  font-size: 11px;
  letter-spacing: 2px;
  line-height: 1.2;
  white-space: nowrap;
}
.drawer-close-tab:hover {
  width: 30px;
  box-shadow: -3px 6px 14px rgba(244,63,94,0.55);
}

/* 浮动展开把手：翠绿色，吸附屏幕左边缘，抽屉关闭时显示（仅移动端） */
.drawer-open-tab {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 88px;
  background: linear-gradient(135deg, #34d399, #10b981);
  border: none;
  border-radius: 0 12px 12px 0;
  cursor: pointer;
  z-index: 100;
  color: #ffffff;
  box-shadow: 2px 4px 10px rgba(16,185,129,0.4);
  transition: all .25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drawer-open-tab .drawer-tab-text {
  writing-mode: vertical-rl;
  font-size: 11px;
  letter-spacing: 2px;
  line-height: 1.2;
  white-space: nowrap;
}
.drawer-open-tab:hover {
  width: 30px;
  box-shadow: 3px 6px 14px rgba(16,185,129,0.55);
}
/* 桌面端隐藏浮动展开按钮（PC 侧栏常驻） */
@media screen and (min-width: 751px) {
  .drawer-open-tab { display: none !important; }
}
