:host {
  display: block;
  padding: 24px 28px;
  max-width: 900px;
  margin: 0 auto;
}

header {
  margin: 20px 0 26px;
}

h1,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: clamp(2rem, 4vw, 3rem);
  margin-bottom: 8px;
}

.eyebrow {
  color: var(--mat-sys-primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.create-card {
  padding: 20px;
  border-radius: 18px;
  margin-bottom: 22px;
}

.create-card form,
.edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px auto;
  gap: 12px;
  align-items: start;
}

.create-card button,
.edit-actions button {
  min-height: 48px;
}

.create-card button mat-spinner,
.edit-actions button mat-spinner {
  display: inline-block;
  margin-right: 8px;
}

.search {
  width: 100%;
}

.error-message {
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--mat-sys-error);
  background: var(--mat-sys-error-container);
}

.catalog {
  display: grid;
  gap: 10px;
}

.penalty-card {
  padding: 16px 18px;
  border-radius: 16px;
}

.penalty-content {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.penalty-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 8px;
}

.edit-form {
  grid-template-columns: minmax(0, 1fr) 150px;
}

.edit-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.state {
  min-height: 180px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 10px;
  color: var(--mat-sys-on-surface-variant);
}

@media (max-width: 700px) {
  :host {
    padding: 20px 16px;
  }

  .create-card form,
  .edit-form {
    grid-template-columns: 1fr;
  }

  .create-card form button,
  .edit-actions,
  .edit-actions button {
    width: 100%;
  }

  .edit-actions {
    grid-column: auto;
    flex-direction: column-reverse;
  }

  .penalty-content {
    align-items: flex-start;
  }

  .penalty-actions {
    justify-content: stretch;
  }

  .penalty-actions button {
    flex: 1;
  }
}
