.pp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.pp-tab {
  border: 1px solid var(--border, #c8ccd2);
  border-radius: 6px;
  background: #f6f7f9;
  color: inherit;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pp-tab:focus-visible {
  outline: 3px solid rgba(0, 102, 204, 0.45);
  outline-offset: 2px;
}

.pp-tab[aria-selected='true'] {
  background: var(--accent, #0d47a1);
  border-color: var(--accent, #0d47a1);
  color: #fff;
}

.pp-panel {
  display: none;
}

.pp-panel.is-active {
  display: block;
}

.pp-field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.pp-field {
  min-width: 180px;
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pp-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pp-inline .input {
  flex: 1 1 auto;
}

.pp-inline select.input {
  max-width: 120px;
}

.pp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 0;
}

.pp-error {
  margin-top: 12px;
  color: #b3261e;
  font-size: 0.95rem;
}

.pp-components-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.pp-components-table th,
.pp-components-table td {
  border: 1px solid var(--border, #d4d7dc);
  padding: 8px;
  text-align: left;
  vertical-align: middle;
}

.pp-components-table th {
  background: #f1f3f5;
  font-weight: 600;
}

.pp-remove {
  min-width: 0;
  padding: 6px 10px;
}

.pp-remove[data-hidden='true'] {
  visibility: hidden;
}

.pp-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.pp-summary {
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pp-summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.pp-summary-table th,
.pp-summary-table td {
  border: 1px solid var(--border, #d4d7dc);
  padding: 6px 8px;
}

.pp-summary-table th {
  background: #f6f7f9;
  font-weight: 600;
}

.pp-steps {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pp-controls-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.pp-note {
  font-size: 0.9rem;
  color: #4a5568;
}

@media (max-width: 640px) {
  .pp-inline {
    flex-direction: column;
    align-items: flex-start;
  }

  .pp-inline select.input {
    max-width: 100%;
  }

  .pp-components-table {
    display: block;
    overflow-x: auto;
  }
}
