.cp-panel {
  .cp-header {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 20px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgb(15 23 42 / 6%);
  }

  .cp-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%;
  }

  .cp-header-main {
    min-width: 0;
  }

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

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

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

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

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

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

  .cp-kpi {
    padding: 16px 12px;
    text-align: center;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgb(15 23 42 / 6%);
    transition: all 0.2s ease;

    &:hover {
      box-shadow: 0 6px 14px rgb(15 23 42 / 10%);
      transform: translateY(-1px);
    }

    .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%);
    }
  }

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

  .cp-card {
    padding: 20px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgb(15 23 42 / 6%);

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

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

  .cp-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;
    }
  }

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

  .cp-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;
    }
  }

  .cp-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;
    }
  }

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

  .cp-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%);
    }
  }
}
