.pie-page {
  padding: 16px;

  &__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
  }

  &__title { font-size: 1.125rem; font-weight: 600; margin: 0; }

  &__filters {
    display: flex;
    gap: 8px;

    button {
      padding: 4px 12px;
      border: 1px solid #d1d5db;
      border-radius: 4px;
      cursor: pointer;
      background: #fff;

      &.active { background: #3b82f6; color: #fff; border-color: #3b82f6; }
    }
  }

  &__loading, &__empty { padding: 32px; text-align: center; color: #6b7280; }
  &__table-wrap { overflow-x: auto; margin-top: 16px; }
}

.aeo-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;

  &__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    min-width: 100px;

    &--green { border-color: #bbf7d0; background: #f0fdf4; }
    &--amber { border-color: #fde68a; background: #fffbeb; }
    &--red   { border-color: #fecaca; background: #fef2f2; }
  }

  &__count {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
  }

  &__label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 4px;
    text-align: center;
  }
}

.pie-table {
  width: 100%;
  border-collapse: collapse;

  th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
  }

  th { font-weight: 600; background: #f9fafb; }
}

.score {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;

  &--green   { color: #166534; background: #dcfce7; }
  &--amber   { color: #854d0e; background: #fef9c3; }
  &--red     { color: #991b1b; background: #fee2e2; }
  &--unknown { color: #6b7280; }
}
