* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
* {
  -webkit-touch-callout: none;
  /* 禁用iOS Safari的默认菜单 */
  -webkit-user-select: none;
  /* 禁用Webkit内核浏览器的文本选择 */
  -khtml-user-select: none;
  /* 早期KHTML浏览器 */
  -moz-user-select: none;
  /* 禁用Firefox */
  -ms-user-select: none;
  /* 禁用IE10+ */
  user-select: none;
  /* 标准语法 */
}
input,
textarea {
  -webkit-user-select: auto;
  /* 允许Webkit内核浏览器中的输入框正常选择 */
  user-select: auto;
  /* 标准语法 */
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #fff;
  color: #333;
  height: 100vh;
  overflow: hidden;
}
/* 顶部搜索栏 */
.top-bar {
  height: 48px;
  background: #f5f5f5;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.top-bar-left {
  display: flex;
  align-items: center;
}
.top-bar-search-wrap {
  position: relative;
  margin-left: 16px;
}
.top-bar-search-inner {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  padding: 0 10px;
  border: 1px solid #e0e0e0;
  transition: all 0.2s;
  min-width: 220px;
}
.top-bar-search-inner:focus-within {
  border-color: #1890ff;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.15);
}
.top-bar-search-icon {
  font-size: 14px;
  color: #999;
  margin-right: 6px;
}
.top-bar-search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  padding: 6px 0;
  width: 180px;
}
.top-bar-search-clear {
  cursor: pointer;
  color: #bbb;
  font-size: 14px;
}
.top-bar-search-clear:hover {
  color: #666;
}
.top-bar-search-dropdown {
  position: absolute;
  top: 120%;
  left: 0;
  width: 360px;
  max-height: 340px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  z-index: 1200;
}
.top-bar-search-loading {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
}
.top-bar-search-list {
  max-height: 300px;
  overflow-y: auto;
}
.top-bar-search-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
}
.top-bar-search-item:hover {
  background: #f5f5f5;
}
.top-bar-search-item i {
  margin-top: 2px;
  font-size: 16px;
  color: #999;
}
.top-bar-search-item-tie i {
  color: #1890ff;
}
.top-bar-search-item-content {
  flex: 1;
  min-width: 0;
}
.top-bar-search-item-name {
  display: block;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-bar-search-item-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-bar-search-item-path {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-bar-search-empty {
  padding: 10px 16px;
  font-size: 13px;
  color: #999;
}
.top-bar-title {
  font-size: 18px;
  font-weight: 600;
  color: #1d1d1f;
}
.top-bar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.2s;
}
.top-bar-avatar:hover {
  opacity: 0.8;
}
.top-bar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.top-bar-avatar .avatar-placeholder {
  color: #666;
  font-size: 18px;
}
.top-bar-avatar-wrap {
  position: relative;
}
.avatar-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  min-width: 120px;
  width: 240px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 6px 0;
  z-index: 1100;
}
.avatar-dropdown-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
}
.avatar-dropdown-profile:hover {
  background: #f5f5f5;
}
.avatar-dropdown-face {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-dropdown-face-placeholder {
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
}
.avatar-dropdown-profile-info {
  min-width: 0;
  flex: 1;
}
.avatar-dropdown-name {
  font-size: 14px;
  font-weight: 600;
  color: #1d1d1f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avatar-dropdown-sub {
  margin-top: 2px;
  font-size: 12px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avatar-dropdown-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 6px 0;
}
.avatar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: background 0.2s;
}
.avatar-dropdown-item:hover {
  background: #f5f5f5;
}
.avatar-dropdown-item.danger {
  color: #e74c3c;
}
.top-bar-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  cursor: pointer;
  color: #333;
  font-size: 20px;
}
/* 主布局 */
.app-layout {
  display: flex;
  height: calc(100vh - 48px);
}
/* 左侧导航栏 */
.sidebar {
  width: 240px;
  min-width: 200px;
  background: #f7f7f7;
  border-right: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-shrink: 0;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 998;
}
.sidebar-overlay.show {
  display: block;
}
.nav-list {
  padding: 16px 0 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: background 0.2s;
  gap: 10px;
}
.nav-item:hover {
  background: #eee;
}
.nav-item.active {
  background: #e6f4ff;
  color: #1890ff;
}
.nav-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}
.nav-category {
  padding: 8px 20px 4px;
  font-size: 12px;
  color: #999;
}
.nav-category-item {
  display: flex;
  align-items: center;
  padding: 8px 20px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: background 0.2s;
  gap: 10px;
}
.nav-category-item:hover {
  background: #eee;
}
.nav-category-item .expand-icon {
  width: 16px;
  font-size: 12px;
  color: #999;
  transition: transform 0.2s;
}
.nav-category-item.expanded .expand-icon {
  transform: rotate(90deg);
}
.nav-category-wrap {
  position: relative;
}
.nav-common-sublist {
  padding-bottom: 8px;
}
.nav-common-item {
  display: flex;
  align-items: center;
  padding: 6px 20px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  gap: 8px;
  transition: background 0.2s;
}
.nav-common-item:hover {
  background: #eee;
  color: #1890ff;
}
.nav-common-item i {
  color: #fa8c16;
  flex-shrink: 0;
}
.nav-common-item-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
/* 加载动画 */
@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes loading-dot {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}
.loading-animated {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e8e8e8;
  border-top-color: #1890ff;
  border-radius: 50%;
  animation: loading-spin 0.7s linear infinite;
}
.loading-text {
  color: #999;
}
.loading-dots span {
  animation: loading-dot 1.2s ease-in-out infinite;
}
.loading-dots span:nth-child(1) {
  animation-delay: 0s;
}
.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}
.nav-common-empty,
.nav-common-loading {
  padding: 8px 20px;
  font-size: 13px;
  color: #999;
}
.nav-common-loading.loading-animated {
  justify-content: flex-start;
}
.nav-bottom {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #e8e8e8;
}
/* 右侧主内容区 */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.content-header {
  padding: 20px 24px 12px;
  border-bottom: 1px solid #f0f0f0;
}
.content-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #1d1d1f;
}
.content-title .sub {
  font-size: 14px;
  font-weight: 400;
  color: #999;
  margin-left: 4px;
}
.content-header-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 12px;
}
.content-header-btns {
  display: flex;
  gap: 10px;
}
.btn-content-new,
.btn-content-new-folder {
  height: 32px;
  padding: 0 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.btn-content-new {
  background: #1890ff;
  color: #fff;
}
.btn-content-new:hover {
  background: #40a9ff;
}
.btn-content-new-folder {
  background: #fff;
  color: #333;
  border: 1px solid #d9d9d9;
}
.btn-content-new-folder:hover {
  border-color: #1890ff;
  color: #1890ff;
}
.folder-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 14px;
  color: #666;
  padding: 8px 0;
  min-height: 36px;
}
.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: #666;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s;
}
.breadcrumb-item:hover {
  color: #1890ff;
  background: #f0f8ff;
}
.breadcrumb-item.active {
  color: #1890ff;
  font-weight: 500;
}
.breadcrumb-sep {
  color: #bfbfbf;
  font-size: 12px;
}
.filter-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: #666;
}
.filter-dropdown {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 4px;
}
.filter-dropdown:hover {
  color: #1890ff;
}
.filter-dropdown i {
  font-size: 12px;
  transition: transform 0.2s;
}
.filter-bar .spacer {
  flex: 1;
}
.header-actions {
  display: flex;
  gap: 12px;
  color: #999;
  cursor: pointer;
}
.header-actions i {
  font-size: 18px;
}
.header-actions i:hover {
  color: #1890ff;
}
/* 文件列表表头 */
.file-list-header {
  display: grid;
  grid-template-columns: 1fr 120px 100px 100px 200px;
  gap: 16px;
  padding: 12px 24px;
  font-size: 14px;
  color: #999;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}
.file-list-header .sortable {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.file-list-header .sortable:hover {
  color: #1890ff;
}
/* 文件列表 */
.file-list-body {
  flex: 1;
  overflow-y: auto;
}
.file-group-label {
  padding: 12px 24px 8px;
  font-size: 13px;
  color: #999;
}
.file-item {
  display: grid;
  grid-template-columns: 1fr 120px 100px 100px 200px;
  gap: 16px;
  padding: 12px 24px;
  font-size: 14px;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.file-item:hover {
  background: #f5f5f5;
}
.file-item .file-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.file-item .file-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.file-item .file-icon.file {
  background: #f0f4ff;
  color: #1890ff;
}
.file-item .file-icon.folder {
  background: #fff7e6;
  color: #fa8c16;
}
.file-item .file-name {
  font-weight: 500;
  color: #333;
}
.file-item .file-location,
.file-item .file-creator,
.file-item .file-date {
  color: #666;
}
/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}
.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-state.loading-animated {
  flex-direction: column;
}
.empty-state.loading-animated .loading-spinner {
  width: 40px;
  height: 40px;
  border-width: 3px;
}
.empty-state.loading-animated .loading-text {
  font-size: 15px;
}
/* 右键菜单 */
.context-menu {
  position: fixed;
  z-index: 9999;
  min-width: 140px;
  max-height: 70vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 4px 0;
  font-size: 14px;
  color: #333;
}
.context-menu-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  gap: 10px;
  transition: background 0.2s;
}
.context-menu-item:hover {
  background: #f5f5f5;
}
.context-menu-item i {
  width: 18px;
  text-align: center;
  color: #666;
}
.context-menu-item.danger i,
.context-menu-item.danger {
  color: #ff4d4f;
}
.context-menu-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 4px 0;
}
.context-menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9998;
}
/* 移动端适配 */
@media (max-width: 768px) {
  .top-bar {
    padding: 0 8px;
  }
  /* 手机端隐藏 logo，让出空间给搜索和头像 */
  .top-bar-title {
    display: none;
  }
  /* 顶部左侧区域在手机端占满剩余宽度 */
  .top-bar-left {
    flex: 1;
  }
  .top-bar-search-wrap {
    margin-left: 6px;
    flex: 1;
  }
  .top-bar-search-inner {
    min-width: 0;
    width: 100%;
  }
  .top-bar-search-input {
    width: 100%;
  }
  /* 搜索结果下拉在手机端使用整行宽度 */
  .top-bar-search-dropdown {
    width: calc(100vw - 24px);
  }
  .top-bar-menu-btn {
    display: flex;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar .nav-item {
    padding: 12px 20px;
    font-size: 16px;
  }
  .sidebar .nav-item i {
    font-size: 18px;
  }
  .sidebar .nav-category {
    font-size: 14px;
    padding: 10px 20px 6px;
  }
  .sidebar .nav-common-item {
    padding: 10px 20px;
    font-size: 16px;
  }
  .sidebar .nav-common-item i {
    font-size: 18px;
  }
  .sidebar .nav-common-item-label {
    font-size: 16px;
  }
  .sidebar .nav-common-empty,
  .sidebar .nav-common-loading {
    padding: 10px 20px;
    font-size: 15px;
  }
  .main-content {
    width: 100%;
  }
  .file-list-header {
    display: none;
  }
  .file-list-header .hide-on-mobile,
  .file-item .hide-on-mobile {
    display: none !important;
  }
  .file-item {
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 14px 16px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .file-item .file-location,
  .file-item .file-creator {
    display: none;
  }
  .file-item .file-date {
    font-size: 12px;
    color: #999;
  }
  .content-header {
    padding: 12px 16px;
  }
  .content-header-btns {
    flex-wrap: wrap;
  }
  .folder-breadcrumb {
    padding: 6px 0;
  }
  /* 移动端底部弹出菜单 */
  .context-menu.mobile-bottom {
    left: 0 !important;
    right: 0;
    bottom: 0;
    top: auto !important;
    z-index: 9999;
    width: 100%;
    min-width: 100%;
    max-height: 50vh;
    overflow-y: auto;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.25s ease;
  }
  .context-menu-item {
    padding: 14px 20px;
    font-size: 16px;
  }
  @keyframes slideUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }
  .bi-spin {
    animation: spin 1s linear infinite;
  }
  @keyframes spin {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }
}
/* 树形文件夹选择器 */
.move-folder-tree {
  list-style: none;
  padding: 0;
  margin: 0;
}
.move-folder-tree-item {
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}
.move-folder-tree-item:hover {
  background: #f5f5f5;
}
.move-folder-tree-item.selected {
  background: #e6f7ff;
  color: #1890ff;
}
.move-folder-tree-item .tree-expand {
  width: 18px;
  text-align: center;
  color: #999;
  font-size: 12px;
  transition: transform 0.2s;
}
.move-folder-tree-item .tree-expand.expanded {
  transform: rotate(90deg);
}
.move-folder-tree-item .tree-expand.empty {
  visibility: hidden;
}
.move-folder-tree-item .tree-icon {
  color: #fa8c16;
}
.move-folder-tree-children {
  padding-left: 24px;
  border-left: 1px dashed #e8e8e8;
  margin-left: 9px;
}
.vmx-layer-mobile.layui-layer {
  border-radius: 12px 12px 0 0;
}
