.page-customer-list {
  .ant-drawer {
    .ant-drawer-header {
      padding: 14px 18px;
      border-bottom: 1px solid #f0f0f0;
    }

    .ant-drawer-body {
      padding: 16px 20px;
    }

    .ant-drawer-footer {
      padding: 12px 20px;
      border-top: 1px solid #f0f0f0;
    }
  }
}

.cl-detail-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}

.cl-detail-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  background: #1677ff;
  border-radius: 50%;
}

.cl-detail-title-wrap {
  min-width: 0;
}

.cl-detail-name {
  font-size: 16px;
  font-weight: 600;
  color: rgb(0 0 0 / 88%);
}

.cl-detail-meta {
  margin-top: 2px;
  font-size: 13px;
  color: rgb(0 0 0 / 45%);
}

.cl-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;

  .ant-tag {
    margin-inline-end: 0;
  }
}

.cl-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.cl-overview-item {
  padding: 12px;
  text-align: center;
  background: #f8f9fb;
  border-radius: 8px;

  .label {
    font-size: 12px;
    color: rgb(0 0 0 / 45%);
  }

  .value {
    margin-top: 4px;
    font-size: 20px;
    font-weight: 700;
    color: rgb(0 0 0 / 88%);

    &.primary {
      color: #1677ff;
    }

    &.success {
      color: #52c41a;
    }
  }
}

.cl-drawer-section {
  margin-bottom: 22px;
}

.cl-drawer-section-title {
  padding-left: 10px;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
  color: rgb(0 0 0 / 88%);
  border-left: 3px solid #1677ff;
}

.cl-preference-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;

  .ant-tag {
    margin-inline-end: 0;
  }

  .cl-empty-text {
    font-size: 13px;
    color: rgb(0 0 0 / 45%);
  }
}

.cl-preference-list {
  font-size: 13px;
}

.cl-preference-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  color: rgb(0 0 0 / 65%);

  span:last-child {
    max-width: 62%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    color: rgb(0 0 0 / 88%);
    text-align: right;
    white-space: nowrap;
  }
}

.cl-top-product-list {
  min-height: 42px;
}

.cl-top-product-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid #f3f4f6;

  &:last-child {
    border-bottom: none;
  }

  .rank {
    width: 20px;
    color: rgb(0 0 0 / 45%);
    text-align: center;
  }

  .name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgb(0 0 0 / 88%);
    white-space: nowrap;
  }

  .count {
    color: rgb(0 0 0 / 65%);
  }
}

.cl-trend-bar-group {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 116px;
}

.cl-trend-bar-item {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  min-width: 0;

  .amount {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
    color: rgb(0 0 0 / 45%);
    text-align: center;
    white-space: nowrap;
  }

  .bar {
    width: 100%;
    background: #1677ff;
    border-radius: 4px 4px 0 0;
    opacity: 0.78;
  }

  .month {
    font-size: 11px;
    color: rgb(0 0 0 / 45%);
  }
}

.cl-recent-orders {
  font-size: 13px;
}

.cl-recent-order-item {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;

  &:last-child {
    border-bottom: none;
  }

  .left {
    flex: 1;
    min-width: 0;
  }

  .summary {
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    color: rgb(0 0 0 / 88%);
    white-space: nowrap;
  }

  .meta {
    margin-top: 2px;
    font-size: 12px;
    color: rgb(0 0 0 / 45%);
  }

  .amount {
    flex-shrink: 0;
    font-weight: 600;
    color: rgb(0 0 0 / 88%);
    white-space: nowrap;
  }
}

.cl-detail-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.cl-profile-head {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 4px 0 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.cl-profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: #3b82f6;
  border-radius: 50%;
}

.cl-profile-title-wrap {
  min-width: 0;
}

.cl-profile-name {
  font-size: 18px;
  font-weight: 700;
  color: rgb(0 0 0 / 88%);
}

.cl-profile-meta {
  margin-top: 4px;
  font-size: 13px;
  color: rgb(0 0 0 / 45%);
}

.cl-profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;

  .ant-tag {
    margin-inline-end: 0;
  }
}

.cl-profile-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.cl-profile-kpi {
  padding: 14px 10px;
  text-align: center;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 10px;

  .num {
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 20px;
    font-weight: 700;
    color: rgb(0 0 0 / 88%);
    white-space: nowrap;

    &.blue {
      color: #1677ff;
    }

    &.success {
      color: #52c41a;
    }
  }

  .lbl {
    margin-top: 4px;
    font-size: 12px;
    color: rgb(0 0 0 / 45%);
  }
}

.cl-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cl-profile-card {
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 10px;

  &.full {
    grid-column: 1 / -1;
  }
}

.cl-profile-card-title {
  padding-left: 10px;
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 600;
  color: rgb(0 0 0 / 88%);
  border-left: 3px solid #1677ff;
}

.cl-profile-pref-row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px solid #f3f4f6;

  &:last-child {
    border-bottom: none;
  }

  .label {
    color: rgb(0 0 0 / 65%);
  }

  .value {
    max-width: 66%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    color: rgb(0 0 0 / 88%);
    text-align: right;
    white-space: nowrap;
  }
}

.cl-profile-top-list {
  min-height: 48px;
}

.cl-profile-top-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid #f3f4f6;

  &:last-child {
    border-bottom: none;
  }

  .name {
    width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgb(0 0 0 / 88%);
    white-space: nowrap;
  }

  .bar {
    display: inline-flex;
    flex: 1;
    height: 6px;
    overflow: hidden;
    background: #f0f0f0;
    border-radius: 3px;
  }

  .bar-inner {
    display: inline-flex;
    height: 100%;
    background: #1677ff;
    border-radius: 3px;
  }

  .count {
    width: 42px;
    color: rgb(0 0 0 / 65%);
    text-align: right;
  }
}

.cl-profile-top-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;

  &.gold {
    color: #d97706;
    background: #fef3c7;
  }

  &.silver {
    color: #6b7280;
    background: #f3f4f6;
  }
}

.cl-profile-trend-bars {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 126px;
}

.cl-profile-trend-bar-col {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  min-width: 0;

  .bar-val {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
    color: rgb(0 0 0 / 45%);
    text-align: center;
    white-space: nowrap;
  }

  .bar {
    width: 100%;
    background: #1677ff;
    border-radius: 4px 4px 0 0;
    opacity: 0.8;
  }

  .bar-lbl {
    font-size: 11px;
    color: rgb(0 0 0 / 45%);
  }
}

.cl-profile-order-status {
  font-weight: 600;

  &.success {
    color: #52c41a;
  }

  &.danger {
    color: #ff4d4f;
  }

  &.processing {
    color: #1677ff;
  }

  &.default {
    color: rgb(0 0 0 / 65%);
  }
}
