.stats-dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;

  .chart-container {
    padding: 16px;
    border: 1px solid var(--border);
    height: 350px;

    .chart {
      height: 100%;
    }
  }

  .metrics-tables {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;

    @media (max-width: 768px) {
      grid-template-columns: 1fr;
    }

    .section {
      padding: 0;
      background-color: transparent;
      border: none;
      gap: 8px;
      display: flex;
      flex-direction: column;
      overflow: hidden;

      .text {
        display: flex;
        justify-content: space-between;

        h2 {
          font-size: 14px;
          color: var(--text-secondary);
          font-weight: 600;
          text-transform: uppercase;
        }

        .extend {
          color: var(--text);
          display: flex;
          gap: 8px;
          align-items: center;

          &:hover {
            color: var(--accent);
            cursor: pointer;
          }
        }
      }
    }
  }

  .list {
    display: flex;
    flex-direction: column;
    gap: 4px;

    .item {
      display: grid;
      grid-template-columns: 1fr auto auto;
      gap: 1rem;
      align-items: center;
      padding: 8px 10px;
      position: relative;
      overflow: hidden;
      height: 34px;

      &::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: var(--percentage);
        background: var(--element);
        z-index: 0;
      }

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

      .name {
        font-weight: 500;
        color: var(--text);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        position: relative;
        z-index: 1;
      }

      .time {
        text-align: right;
        color: var(--text);
        font-weight: 500;
        white-space: nowrap;
        position: relative;
        z-index: 1;
        min-width: 64px;
      }

      .percentage {
        text-align: right;
        color: var(--text-secondary);
        font-weight: 600;
        white-space: nowrap;
        position: relative;
        z-index: 1;
      }
    }
  }

  .no-data {
    color: var(--text-secondary);
    padding: 16px;
    padding-left: 0;
    font-style: italic;
  }
}
