.saas-device-passcodes {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 24px;
  overflow: hidden;
  background: #f5f6f8;

  &__header {
    flex: 0 0 auto;
    margin-bottom: 14px;

    h1 {
      margin: 0;
      font-size: 24px;
      font-weight: 600;
      line-height: 32px;
      color: rgba(0, 0, 0, 0.88);
    }

    p {
      margin: 4px 0 0;
      color: rgba(0, 0, 0, 0.45);
    }
  }

  &__load-error {
    flex: 0 0 auto;
    margin-bottom: 16px;
  }

  &__retry-link {
    padding: 0;
    color: #1677ff;
    cursor: pointer;
    background: transparent;
    border: 0;
  }

  &__tabs {
    flex: 0 0 auto;
  }

  &__tabs > [class*='-tabs-nav'] {
    margin-bottom: 0;
  }

  &__table-card {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
  }

  &__toolbar {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
  }

  &__filters {
    display: flex;
    flex: 1 1 720px;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
  }

  &__search {
    flex: 1 1 240px;
    min-width: 200px;
    width: 280px;
  }

  &__filter {
    flex: 1 1 140px;
    min-width: 140px;
    width: 170px;
  }

  &__table {
    min-height: 0;
  }

  &__bulk-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 12px;
    align-items: center;
    max-width: 100%;
    margin-left: auto;
  }

  &__selected-count {
    white-space: nowrap;
    color: rgba(0, 0, 0, 0.45);
  }

  &__table-row {
    cursor: pointer;
  }

  &__selection-cell {
    cursor: pointer;
  }

  &__selection-cell--disabled {
    cursor: not-allowed;
  }

  &__device-cell {
    display: flex;
    gap: 10px;
    align-items: center;
  }

  &__device-name {
    overflow: hidden;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__device-subtitle,
  &__secondary-text {
    margin-top: 2px;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.45);
  }

  &__code-cell {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
      monospace;
    letter-spacing: 0.04em;
  }

  &__code-cell--unavailable {
    color: #98a2b3;
    text-decoration: line-through;
  }

  &__expired-text {
    color: #ff4d4f;
  }

  &__no-uses-text {
    color: #ff4d4f;
  }

  &__confirmation-copy {
    padding: 12px 0;
    color: #000;
    font-size: 16px;
  }

  &__confirmation-alert {
    margin: 12px 0;
  }

  &__progress-copy {
    margin-bottom: 12px;
  }

  &__progress-body {
    padding: 12px 0;
  }

  &__progress-summary {
    display: flex;
    gap: 24px;
    margin-top: 14px;
    color: rgba(0, 0, 0, 0.65);
  }
}

@media (max-width: 1000px) {
  .saas-device-passcodes {
    padding: 16px;

    &__toolbar,
    &__filters {
      align-items: stretch;
      flex-direction: column;
    }

    &__filters {
      flex: 0 0 auto;
      width: 100%;
    }

    &__search,
    &__filter {
      flex: 0 0 auto;
      width: 100%;
    }

    &__bulk-actions {
      flex-wrap: wrap;
      justify-content: space-between;
      width: 100%;
    }
  }
}
