/* ============================================================================
   腾龙发科AI元宇宙 · V73 后台左侧导航优化样式层  admin-nav-v73.css
   适用范围：全部后台页面（admin/ 、public/admin/ 及其子目录）
   核心：24 个模块标题常驻可见（每行 30px，默认折叠），当前模块自动展开；
        菜单区内部滚动、侧边栏全高固定；模块下拉 + 搜索 + 展开/折叠一键切换。
   前缀：an73-    严格零内联、零第三方依赖
   ============================================================================ */

/* ---------------- 一、侧边栏：全高固定，仅菜单区内部滚动 ---------------- */
.sidebar,
aside.sidebar {
  display: flex !important;
  flex-direction: column !important;
  height: 100vh !important;
  max-height: 100vh !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  overflow: hidden !important;
  z-index: 120 !important;
}
.an73-menu,
.sidebar-menu,
.sidebar-nav,
nav.menu,
aside.sidebar > nav {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  max-height: none !important;
  padding-bottom: 14px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, .45) transparent;
}
.an73-menu::-webkit-scrollbar,
.sidebar-menu::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar,
nav.menu::-webkit-scrollbar { width: 6px; }
.an73-menu::-webkit-scrollbar-thumb,
.sidebar-menu::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb,
nav.menu::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, .45); border-radius: 6px; }
.an73-menu::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 二、工具区：搜索 + 模块下拉 + 视图切换 ---------------- */
.an73-tools {
  position: sticky; top: 0; z-index: 6;
  padding: 10px 12px 8px;
  background: #1e293b;
  border-bottom: 1px solid rgba(99, 102, 241, .18);
}
.an73-search {
  width: 100%; box-sizing: border-box;
  height: 32px; padding: 0 10px;
  border-radius: 8px; border: 1px solid rgba(99, 102, 241, .28);
  background: rgba(15, 23, 42, .72); color: #e2e8f0; font-size: 12.5px; outline: none;
}
.an73-search::placeholder { color: #64748b; }
.an73-search:focus { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99, 102, 241, .18); }
.an73-select {
  width: 100%; box-sizing: border-box; margin-top: 7px;
  height: 30px; padding: 0 8px;
  border-radius: 8px; border: 1px solid rgba(99, 102, 241, .28);
  background: rgba(15, 23, 42, .72); color: #c7d2fe; font-size: 12px; outline: none;
}
.an73-views { display: flex; gap: 6px; margin-top: 7px; }
.an73-vbtn {
  flex: 1; height: 26px; line-height: 26px; text-align: center;
  border-radius: 7px; border: 1px solid rgba(99, 102, 241, .26);
  background: rgba(15, 23, 42, .6); color: #94a3b8;
  font-size: 11.5px; cursor: pointer; user-select: none;
}
.an73-vbtn:hover { color: #c7d2fe; border-color: rgba(99, 102, 241, .5); }
.an73-vbtn.on { color: #fff; border-color: transparent; background: linear-gradient(120deg, #6366f1, #8b5cf6); }

/* ---------------- 三、分组标题：紧凑 30px 一行，点击折叠 ---------------- */
.an73-menu .menu-group,
.sidebar-menu .menu-group { margin: 0 0 1px !important; }
.an73-menu .menu-group-title,
.an73-menu .menu-title,
.sidebar-menu .menu-group-title,
.sidebar-menu .menu-title {
  display: flex !important; align-items: center !important; gap: 6px !important;
  height: 28px !important; line-height: 28px !important;
  padding: 0 10px !important;
  font-size: 12.5px !important; font-weight: 600 !important;
  color: #93a4c6 !important; letter-spacing: .2px;
  cursor: pointer; user-select: none;
  border-radius: 7px; margin: 0 6px;
}
.an73-menu .menu-group-title:hover,
.sidebar-menu .menu-group-title:hover { background: rgba(99, 102, 241, .12); color: #c7d2fe !important; }
.an73-menu .menu-group-title .an73-caret { font-size: 10px; color: #64748b; transition: transform .16s; }
.an73-menu .menu-group.an73-fold .menu-group-title .an73-caret { transform: rotate(-90deg); }
.an73-menu .menu-group.an73-cur > .menu-group-title { color: #a5f3fc !important; background: rgba(34, 211, 238, .10); }
.an73-cnt {
  margin-left: auto; min-width: 18px; text-align: center;
  font-size: 10.5px; line-height: 16px; padding: 0 5px;
  border-radius: 9px; background: rgba(99, 102, 241, .22); color: #c7d2fe;
}

/* ---------------- 四、折叠态与条目 ---------------- */
.an73-menu .menu-group.an73-fold > .menu-item,
.an73-menu .menu-group.an73-fold > .menu-items,
.an73-menu .menu-group.an73-fold > div:not(.menu-group-title) { display: none !important; }
.an73-menu .menu-item > a,
.sidebar-menu .menu-item > a {
  display: flex; align-items: center; gap: 8px;
  height: 27px !important; padding: 0 10px 0 16px !important;
  font-size: 12.5px !important; border-radius: 7px; margin: 1px 6px;
  color: #94a3b8 !important; text-decoration: none;
}
.an73-menu .menu-item > a:hover { background: rgba(99, 102, 241, .14); color: #e2e8f0 !important; }
.an73-menu .menu-item.active > a,
.an73-menu .menu-item > a.an73-active {
  color: #fff !important; background: linear-gradient(120deg, rgba(99, 102, 241, .9), rgba(139, 92, 246, .85));
}
.an73-menu .menu-item .menu-icon { width: 18px; text-align: center; flex: 0 0 18px; }
.an73-hide { display: none !important; }
.an73-hit > a { color: #a5f3fc !important; background: rgba(34, 211, 238, .12); }

/* ---------------- 五、最近访问 ---------------- */
.an73-recent { margin: 0 6px 6px; padding-bottom: 6px; border-bottom: 1px solid rgba(99, 102, 241, .16); }
.an73-recent-t { font-size: 10.5px; color: #64748b; padding: 6px 6px 3px; letter-spacing: .5px; }
.an73-recent a {
  display: block; height: 27px; line-height: 27px; padding: 0 10px;
  font-size: 12px; color: #94a3b8; border-radius: 6px; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.an73-recent a:hover { background: rgba(99, 102, 241, .14); color: #e2e8f0; }

/* ---------------- 六、空结果与提示 ---------------- */
.an73-empty { font-size: 12px; color: #64748b; padding: 16px 12px; text-align: center; line-height: 1.7; }
.an73-badge-ext {
  margin-left: auto; font-size: 10px; line-height: 15px; padding: 0 5px;
  border-radius: 8px; background: rgba(56, 189, 248, .18); color: #7dd3fc;
}

/* ---------------- 七、主体区：内容不被固定侧边栏遮挡 ---------------- */
.main-wrap { margin-left: 240px !important; min-width: 0 !important; }
.admin-main { max-width: 100%; min-width: 0; }
.topbar { position: sticky !important; top: 0; z-index: 60; }
.table-wrap, .admin-main table { max-width: 100%; }
.admin-main table { overflow-x: auto; display: block; }
@media (min-width: 1200px) { .admin-main table { display: table; } }

/* ---------------- 八、窄屏：侧边栏收成抽屉 ---------------- */
.an73-drawer {
  display: none;
  position: fixed; left: 12px; bottom: 18px; z-index: 300;
  width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, .5);
  background: linear-gradient(120deg, #6366f1, #8b5cf6);
  color: #fff; font-size: 19px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(99, 102, 241, .4);
}
@media (max-width: 1024px) {
  .an73-drawer { display: block; }
  .sidebar, aside.sidebar {
    position: fixed !important; height: 100vh !important; max-height: 100vh !important;
    overflow: hidden !important; transform: translateX(-100%); transition: transform .22s;
  }
  .sidebar.show, .sidebar.an73-open, aside.sidebar.an73-open { transform: translateX(0) !important; }
  .main-wrap { margin-left: 0 !important; }
  .an73-menu, .sidebar-menu, .sidebar-nav, nav.menu { max-height: none !important; }
}
