/* ===== 移动端响应式适配 ===== */
@media screen and (max-width: 768px) {
  /* 强制禁止桌面端缩放，让移动端正确渲染 */
  * { max-width: 100% !important; }

  /* 侧边栏收起为0宽度，隐藏 */
  .sidebar,
  .el-aside,
  aside,
  .layout-aside,
  .el-container > aside,
  .app-wrapper .el-aside {
    position: fixed !important;
    left: -220px !important;
    top: 0 !important;
    height: 100vh !important;
    width: 220px !important;
    z-index: 2000 !important;
    transition: left 0.3s ease !important;
    overflow-x: hidden !important;
  }

  /* 侧边栏展开状态 */
  .sidebar.is-opened,
  .sidebar.mobile-opened,
  body.sidebar-opened .sidebar,
  .sidebar.show {
    left: 0 !important;
  }

  /* 遮罩层 */
  .sidebar-overlay,
  .mobile-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
  }
  .sidebar-overlay.active,
  .sidebar-overlay.show,
  body.sidebar-opened ~ .sidebar-overlay,
  .mobile-sidebar-overlay.active {
    display: block;
  }

  /* 汉堡菜单按钮 */
  .hamburger-btn,
  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 2001;
    background: none;
    border: none;
    padding: 0;
    margin-right: 12px;
  }

  /* 主内容区 */
  .el-container > .el-main,
  .main-content,
  .el-main,
  .app-main,
  .page-content {
    margin-left: 0 !important;
    padding: 12px !important;
    width: 100% !important;
  }

  /* 头部 */
  .el-header,
  .app-header,
  .header {
    padding: 0 12px !important;
    flex-wrap: wrap;
    height: auto !important;
    min-height: 56px !important;
  }

  /* 页面标题 */
  .page-title {
    font-size: 15px !important;
  }

  /* 表格横向滚动 */
  .el-table,
  .el-table__body-wrapper {
    overflow-x: auto !important;
  }
  .el-table__header-wrapper,
  .el-table__body-wrapper {
    min-width: 600px !important;
  }

  /* 表单 */
  .el-form,
  .el-form-item {
    width: 100% !important;
  }
  .el-form-item__content {
    width: 100% !important;
  }

  /* 搜索区域 */
  .search-bar,
  .filter-bar,
  .toolbar {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  /* 卡片网格 */
  .card-grid,
  .el-row {
    flex-direction: column !important;
  }
  .el-col,
  .stat-card,
  .info-card {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 12px !important;
  }

  /* 按钮缩小 */
  .el-button {
    font-size: 13px !important;
    padding: 8px 12px !important;
  }

  /* 输入框 */
  .el-input,
  .el-select {
    width: 100% !important;
  }

  /* 分页 */
  .el-pagination {
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: center !important;
  }

  /* 对话框 */
  .el-dialog {
    width: 92% !important;
    margin: 0 auto !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }

  /* 抽屉 */
  .el-drawer {
    width: 90% !important;
  }

  /* 徽章/标签 */
  .el-tag,
  .el-badge {
    font-size: 11px !important;
  }

  /* 隐藏部分非必要元素 */
  .user-name,
  .user-avatar-text {
    display: none !important;
  }
}

/* 桌面端隐藏汉堡按钮 */
@media screen and (min-width: 769px) {
  .hamburger-btn,
  .mobile-menu-btn {
    display: none !important;
  }
}
