/* ===== 法眼手机端适配（针对 Ant Design 布局） ===== */
@media (max-width: 768px) {
  /* 1. 隐藏左侧 Ant Design Sider */
  .ant-layout-sider {
    display: none !important;
  }

  /* 2. 手机顶部导航条 */
  .mobile-nav {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    height: 48px;
    background: #1a1a2e;
    color: #fff;
    align-items: center;
    justify-content: space-around;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }
  .mobile-nav a {
    color: #ccc;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
  }
  .mobile-nav a.active {
    color: #fff;
    background: rgba(255,255,255,0.15);
    font-weight: bold;
  }

  /* 3. 主内容区域给导航条让位 */
  .ant-layout-content {
    padding: 8px !important;
    padding-top: 56px !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* 4. RiskScan 页面: Row/Col 纵向堆叠 */
  .ant-row {
    flex-direction: column !important;
  }
  .ant-col {
    max-width: 100% !important;
    flex: 0 0 100% !important;
    width: 100% !important;
  }

  /* 5. Card 间距缩小 */
  .ant-card {
    margin-bottom: 8px !important;
  }
  .ant-card-body {
    padding: 10px !important;
  }

  /* 6. 表格横向滚动 */
  .ant-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ant-table {
    min-width: 600px;
  }

  /* 7. 上传区域适配 */
  .ant-upload-drag {
    padding: 12px !important;
  }

  /* 8. 按钮组换行 */
  .ant-space {
    flex-wrap: wrap;
    gap: 4px !important;
  }

  /* 9. 折叠面板 */
  .ant-collapse-header {
    padding: 10px 12px !important;
  }

  /* 10. 字体适配 */
  body {
    font-size: 14px;
  }
  h1, .ant-typography h1 { font-size: 18px !important; }
  h2, .ant-typography h2 { font-size: 16px !important; }
  h3, h4, .ant-typography h3 { font-size: 15px !important; }

  /* 11. Dashboard 卡片 */
  .ant-statistic-title { font-size: 12px !important; }
  .ant-statistic-content { font-size: 20px !important; }

  /* 12. Diff 对比器容器 */
  .diff-viewer-container,
  [class*="diff"] {
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  /* 13. Tag/标签换行 */
  .ant-tag {
    margin-bottom: 4px;
  }

  /* 14. 进度条区域 */
  .scan-progress-area {
    padding: 8px !important;
  }

  /* 15. 意见框全宽 */
  .advisor-panel, [class*="advisor"] {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* 桌面端隐藏手机导航 */
@media (min-width: 769px) {
  .mobile-nav {
    display: none !important;
  }
}

/* 手机端：登录页隐藏手机导航 */
@media (max-width: 768px) {
  /* 登录页不显示顶部 mobile-nav */
  .login-page .mobile-nav {
    display: none !important;
  }
  /* 登录页不用给 content 让位 */
  .login-page .ant-layout-content {
    padding-top: 8px !important;
  }
}
