@use "./tailwind.scss";

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #1e1b4b;
}

#app {
  min-height: 100vh;
}

// ========== 全局 Ant Design 组件风格覆盖 ==========

// 按钮 — 更圆润、更有活力
.ant-btn {
  border-radius: 10px !important;
  font-weight: 600 !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;

  &.ant-btn-primary {
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25) !important;

    &:hover {
      box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35) !important;
      transform: translateY(-1px);
    }

    &:active {
      transform: scale(0.98);
    }
  }
}

// 卡片 — 柔和圆角 + 暖色阴影
.ant-card {
  border-radius: 16px !important;
  border: 1px solid rgba(99, 102, 241, 0.08) !important;
  box-shadow: 0 1px 3px rgba(99, 102, 241, 0.05),
    0 4px 12px rgba(99, 102, 241, 0.03) !important;
  overflow: hidden;

  .ant-card-head {
    border-bottom: 1px solid rgba(99, 102, 241, 0.08) !important;
    font-weight: 600;
  }
}

// 表格 — 更柔和的色调
.ant-table-wrapper {
  .ant-table {
    border-radius: 16px !important;
    overflow: hidden;
  }

  .ant-table-thead > tr > th {
    background: #f5f3ff !important;
    color: #6b7280 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    border-bottom: 1px solid #e5e1f5 !important;
  }

  .ant-table-tbody > tr {
    transition: all 0.2s ease;

    &:hover > td {
      background: #faf9fe !important;
    }

    > td {
      border-bottom: 1px solid #f0ecf9 !important;
    }
  }

  .ant-table-pagination {
    margin: 16px 0 !important;
  }
}

// 标签 — 药丸形状
.ant-tag {
  border-radius: 20px !important;
  border: none !important;
  padding: 2px 12px !important;
  font-weight: 500 !important;
  font-size: 12px !important;
}

// 输入框 / 选择器 — 更圆润
.ant-input,
.ant-input-affix-wrapper,
.ant-select-selector,
.ant-picker {
  border-radius: 10px !important;
  border-color: #e5e1f5 !important;

  &:hover {
    border-color: #818cf8 !important;
  }

  &:focus,
  &.ant-input-affix-wrapper-focused,
  &.ant-select-focused {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08) !important;
  }
}

.ant-select-selector {
  border-color: #e5e1f5 !important;
}

.ant-select-focused .ant-select-selector {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08) !important;
}

// 模态框 — 更大圆角
.ant-modal-content {
  border-radius: 16px !important;
  overflow: hidden;
}

// 抽屉
.ant-drawer-content {
  border-radius: 16px 0 0 16px !important;
}

// 分页器 — 圆润
.ant-pagination {
  .ant-pagination-item {
    border-radius: 8px !important;
    border-color: #e5e1f5 !important;

    &:hover {
      border-color: #6366f1 !important;
    }

    &.ant-pagination-item-active {
      background: #6366f1 !important;
      border-color: #6366f1 !important;

      a {
        color: #fff !important;
      }
    }
  }

  .ant-pagination-prev,
  .ant-pagination-next {
    .ant-pagination-item-link {
      border-radius: 8px !important;
      border-color: #e5e1f5 !important;
    }
  }
}

// 面包屑
.ant-breadcrumb {
  font-size: 14px;
  color: #9ca3af;
}

// 消息提示 — 圆润
.ant-message-notice-content {
  border-radius: 12px !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12),
    0 8px 32px rgba(99, 102, 241, 0.06) !important;
}

// Tooltip
.ant-tooltip-inner {
  border-radius: 10px !important;
}

// 下拉菜单
.ant-dropdown-menu {
  border-radius: 12px !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1),
    0 8px 32px rgba(99, 102, 241, 0.06) !important;
  padding: 6px !important;

  .ant-dropdown-menu-item {
    border-radius: 8px !important;
  }
}

// Tabs
.ant-tabs .ant-tabs-tab {
  border-radius: 10px !important;
}

// 表单
.ant-form-item-label > label {
  font-weight: 500 !important;
  color: #374151 !important;
}
