/*
 * LinsGeek ERP —— 页面左侧的分类菜单（订单管理、发票、商品……各模块都有的那一栏）：外观和动作
 * ------------------------------------------------------------------
 * 原来：菜单项是贴着左边缘、右侧半圆的长条；数量是右边一串裸数字；分组展开/收起、整栏收起都是瞬间跳变；
 *       收起按钮是一个 50px 的灰色大圆。
 * 现在：菜单项改成两边留白的圆角条，悬停和选中有过渡；数量做成小徽标；
 *       分组展开时子项滑入；整栏收起/展开有 0.25 秒的滑动；收起按钮缩小成白色小圆钮。
 * 纯样式，不改结构和点击。菜单项的缩进原本写在行内（24 / 40 / 60px），这里按原值逐级换算。
 * 窄屏抽屉模式（body.lg-side-drawer，见 30-pages.css）有自己的滑动，这里不叠加。
 * 回滚：删除本文件。
 */

#app aside.fixed.left-0,
#app aside.fixed[class*="left-[-"] { border-right: 1px solid #eef1f4; }

/* ---------- 整栏收起 / 展开：滑动 ---------- */
body:not(.lg-side-drawer) #app aside.fixed.bg-white { transition: left .25s cubic-bezier(.2, .8, .3, 1); }
body:not(.lg-side-drawer) #app aside.fixed.bg-white + section { transition: margin-left .25s cubic-bezier(.2, .8, .3, 1); }

/* ---------- 模块标题 ---------- */
#app aside .el-scrollbar__view > li:first-child > div {
  padding: 4px 22px 0 !important; margin-top: 14px !important;
  font-size: 16px !important; color: #111827 !important; letter-spacing: .01em;
}

/* ---------- 菜单项 ---------- */
#app aside li.min-h-\[40px\] { min-height: 0 !important; }
#app aside li div.cursor-pointer.rounded-r-full {
  position: relative; align-items: center; gap: 6px;
  margin: 2px 8px !important; padding-top: 8px !important; padding-bottom: 8px !important; padding-right: 8px !important;
  border-radius: 9px !important; line-height: 1.35; color: #334155;
  transition: background-color .14s ease, color .14s ease;
}
/* 缩进：原来行内写的是 24 / 40 / 60（普通项）和 4 / 20（带箭头的分组），换算到新的留白里 */
#app aside li div.cursor-pointer.rounded-r-full[style*="padding-left: 24px"] { padding-left: 12px !important; }
#app aside li div.cursor-pointer.rounded-r-full[style*="padding-left: 40px"] { padding-left: 28px !important; }
#app aside li div.cursor-pointer.rounded-r-full[style*="padding-left: 60px"] { padding-left: 38px !important; }
#app aside li div.cursor-pointer.rounded-r-full[style*="padding-left: 4px"]  { padding-left: 6px !important; }
#app aside li div.cursor-pointer.rounded-r-full[style*="padding-left: 20px"] { padding-left: 24px !important; }

#app aside li div.cursor-pointer.rounded-r-full:hover { background-color: #f3f6f7; color: #0d7b6d; }
#app aside li div.cursor-pointer.rounded-r-full:active { background-color: #e9eef0; }
/* 选中（原样式 !bg-[#E8F8F6] + text-main 继续生效，这里只补字重） */
#app aside li div.cursor-pointer.rounded-r-full.text-main.\!bg-\[\#E8F8F6\] { font-weight: 600; }
/* 文字太长时换行，不顶到数量上 */
#app aside li div.cursor-pointer.rounded-r-full > span:first-child { min-width: 0; }

/* 分组行（带箭头，点了展开/收起）：加粗一点，箭头用灰色 */
#app aside li div.cursor-pointer.rounded-r-full:has(> span > i.iconfont) { font-weight: 600; color: #1f2a37; }
#app aside li div.cursor-pointer.rounded-r-full > span > i.iconfont {
  display: inline-block; font-size: 12px; color: #94a0ae; transition: color .14s ease;
}
#app aside li div.cursor-pointer.rounded-r-full:hover > span > i.iconfont { color: #0d7b6d; }

/* 数量：小徽标 */
#app aside li div.cursor-pointer.rounded-r-full > span:last-child:not(:first-child) {
  flex: none; min-width: 24px; padding: 1px 6px; border-radius: 999px;
  background: #f1f4f6; color: #5b6676;
  font-size: 12px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 500;
  transition: background-color .14s ease, color .14s ease;
}
#app aside li div.cursor-pointer.rounded-r-full:hover > span:last-child:not(:first-child) { background: #e3efec; color: #0d7b6d; }
#app aside li div.cursor-pointer.rounded-r-full.\!bg-\[\#E8F8F6\] > span:last-child:not(:first-child) { background: #fff; color: #0d7b6d; }

/* ---------- 分组展开：子项滑入（收起是原逻辑直接隐藏） ---------- */
#app aside li[expanded] > ul { animation: lg-sm-open .2s cubic-bezier(.2, .85, .3, 1); transform-origin: top; }
@keyframes lg-sm-open {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 收起按钮（栏内右下角）和收起后的展开按钮（屏幕左下角） ---------- */
#app aside > ul > .cursor-pointer.rounded-full.shadow-lg,
#app aside .cursor-pointer.absolute.rounded-full.shadow-lg {
  width: 34px !important; height: 34px !important; right: 12px !important; bottom: 12px !important;
  background: #fff !important; color: #5b6676; border: 1px solid #e3e8ee;
  box-shadow: 0 4px 12px rgba(15, 35, 52, .10) !important;
  transition: background-color .14s ease, color .14s ease, border-color .14s ease, transform .14s ease;
}
#app aside .cursor-pointer.absolute.rounded-full.shadow-lg:hover { background: #eef7f5 !important; color: #0d7b6d; border-color: #0d7b6d; }
#app aside .cursor-pointer.absolute.rounded-full.shadow-lg:active { transform: scale(.94); }
#app .cursor-pointer.fixed.rounded-full.shadow-lg[class*="left-[-18px]"] {
  background: #fff !important; color: #5b6676; border: 1px solid #e3e8ee;
  box-shadow: 0 4px 12px rgba(15, 35, 52, .12) !important;
}
#app .cursor-pointer.fixed.rounded-full.shadow-lg[class*="left-[-18px]"]:hover { color: #0d7b6d; border-color: #0d7b6d; }

@media (prefers-reduced-motion: reduce) {
  #app aside li[expanded] > ul { animation: none; }
  body:not(.lg-side-drawer) #app aside.fixed.bg-white,
  body:not(.lg-side-drawer) #app aside.fixed.bg-white + section { transition: none; }
}
