* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
    'Noto Color Emoji';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#root {
  min-height: 100vh;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 状态标签颜色 */
.status-normal {
  background-color: #52c41a;
  color: white;
}

.status-repair {
  background-color: #faad14;
  color: white;
}

.status-scrapped {
  background-color: #ff4d4f;
  color: white;
}

.status-idle {
  background-color: #d9d9d9;
  color: #666;
}

/* ===== 移动端适配 ===== */

/* 移动端隐藏桌面端滚动条 */
@media (max-width: 768px) {
  ::-webkit-scrollbar {
    display: none;
  }

  /* Ant Design 移动端微调 */
  .ant-card-head-title {
    font-size: 15px !important;
    padding: 12px 0 !important;
  }

  .ant-card-head {
    min-height: auto !important;
    padding: 0 12px !important;
  }

  .ant-card-body {
    padding: 12px !important;
  }

  /* 表格行紧凑 */
  .ant-table-cell {
    padding: 8px 8px !important;
    font-size: 13px !important;
  }

  /* 统计卡片标题缩小 */
  .ant-statistic-title {
    font-size: 12px !important;
  }

  .ant-statistic-content-value {
    font-size: 20px !important;
  }

  /* 抽屉菜单字体 */
  .ant-drawer-body .ant-menu-item {
    margin: 4px 8px !important;
  }

  /* 防止移动端选择文字拖拽 */
  * {
    -webkit-tap-highlight-color: transparent;
  }

  /* 表单在移动端更紧凑 */
  .ant-form-item {
    margin-bottom: 16px !important;
  }

  .ant-form-item-label > label {
    font-size: 13px !important;
  }
}

/* 超小屏幕（< 400px，如 iPhone SE） */
@media (max-width: 400px) {
  .ant-card-head-title {
    font-size: 14px !important;
  }

  .ant-table-cell {
    padding: 6px 4px !important;
    font-size: 12px !important;
  }

  .ant-statistic-title {
    font-size: 11px !important;
  }

  .ant-statistic-content-value {
    font-size: 18px !important;
  }
}
