.ept-card,
.ept-component-card {
  background: var(--ept-surface);
  border: 1px solid var(--ept-border);
  border-radius: var(--ept-radius);
  box-shadow: var(--ept-shadow);
}

.ept-section-heading {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ept-section-heading h3,
.ept-section-heading h4 {
  font-size: 1.08rem;
  line-height: 1.2;
  margin: 0;
}

.ept-section-heading p {
  color: var(--ept-muted);
  line-height: 1.52;
  margin: 6px 0 0;
}

.ept-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--ept-border-strong);
  border-radius: 999px;
  color: var(--ept-text);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 750;
  gap: 8px;
  justify-content: center;
  min-height: 40px;
  padding: 9px 16px;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, border-color 120ms ease, color 120ms ease;
  user-select: none;
  white-space: nowrap;
}

.ept-button:hover,
.ept-button:focus-visible {
  border-color: var(--ept-primary);
  box-shadow: 0 8px 20px rgba(23, 105, 255, 0.14);
  transform: translateY(-1px);
}

.ept-button:disabled,
.ept-button.is-disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.ept-button--primary {
  background: var(--ept-primary);
  border-color: var(--ept-primary);
  color: #fff;
}

.ept-button--primary:hover,
.ept-button--primary:focus-visible {
  background: var(--ept-primary-dark);
  border-color: var(--ept-primary-dark);
}

.ept-button--soft {
  background: var(--ept-primary-soft);
  border-color: #cfe0ff;
  color: #1d4ed8;
}

.ept-button--danger {
  background: var(--ept-error-bg);
  border-color: var(--ept-error-border);
  color: var(--ept-error-text);
}

.ept-button--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ept-muted-strong);
}

.ept-button--sm {
  font-size: 0.82rem;
  min-height: 34px;
  padding: 7px 12px;
}

.ept-button-group,
.ept-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ept-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ept-chip,
.ept-stage-badge {
  align-items: center;
  background: var(--ept-surface-soft);
  border: 1px solid var(--ept-border);
  border-radius: 999px;
  color: var(--ept-muted-strong);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 6px;
  line-height: 1;
  min-height: 30px;
  padding: 7px 11px;
  white-space: nowrap;
}

.ept-chip--primary,
.ept-stage-badge {
  background: #eef4ff;
  border-color: #cfe0ff;
  color: #1d4ed8;
}

.ept-chip--success {
  background: var(--ept-success-bg);
  border-color: var(--ept-success-border);
  color: var(--ept-success-text);
}

.ept-chip--warning {
  background: var(--ept-warning-bg);
  border-color: var(--ept-warning-border);
  color: var(--ept-warning-text);
}

.ept-chip--error {
  background: var(--ept-error-bg);
  border-color: var(--ept-error-border);
  color: var(--ept-error-text);
}

.ept-notice {
  background: var(--ept-surface-soft);
  border: 1px solid var(--ept-border);
  border-radius: var(--ept-radius-sm);
  color: var(--ept-muted-strong);
  margin-top: 14px;
  padding: 12px 14px;
}

.ept-notice.is-success {
  background: var(--ept-success-bg);
  border-color: var(--ept-success-border);
  color: var(--ept-success-text);
}

.ept-notice.is-error {
  background: var(--ept-error-bg);
  border-color: var(--ept-error-border);
  color: var(--ept-error-text);
}

.ept-notice.is-warning {
  background: var(--ept-warning-bg);
  border-color: var(--ept-warning-border);
  color: var(--ept-warning-text);
}

.ept-notice.is-info {
  background: var(--ept-info-bg);
  border-color: var(--ept-info-border);
  color: var(--ept-info-text);
}

.ept-field-grid {
  display: grid;
  gap: 12px;
}

.ept-field-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ept-field {
  display: grid;
  gap: 7px;
}

.ept-field label,
.ept-field__label {
  color: var(--ept-text);
  font-size: 0.86rem;
  font-weight: 800;
}

.ept-field input,
.ept-field select,
.ept-field textarea,
.ept-input,
.ept-select,
.ept-textarea {
  background: #fff;
  border: 1px solid var(--ept-border-strong);
  border-radius: 12px;
  color: var(--ept-text);
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}

.ept-field textarea,
.ept-textarea {
  min-height: 92px;
  resize: vertical;
}

.ept-field__hint {
  color: var(--ept-muted);
  font-size: 0.78rem;
}

.ept-segmented {
  background: var(--ept-surface-soft);
  border: 1px solid var(--ept-border);
  border-radius: 999px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
}

.ept-segmented button {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--ept-muted-strong);
  cursor: pointer;
  font-weight: 800;
  min-height: 32px;
  padding: 7px 12px;
}

.ept-segmented button[aria-pressed="true"],
.ept-segmented button.is-active {
  background: #fff;
  box-shadow: var(--ept-shadow-soft);
  color: var(--ept-primary);
}

.ept-switch {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.ept-switch input {
  appearance: none;
  background: var(--ept-border-strong);
  border-radius: 999px;
  cursor: pointer;
  height: 24px;
  position: relative;
  transition: background 120ms ease;
  width: 44px;
}

.ept-switch input::after {
  background: #fff;
  border-radius: 50%;
  content: '';
  height: 18px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: transform 120ms ease;
  width: 18px;
}

.ept-switch input:checked {
  background: var(--ept-primary);
}

.ept-switch input:checked::after {
  transform: translateX(20px);
}

.ept-progress {
  background: var(--ept-surface-soft);
  border: 1px solid var(--ept-border);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.ept-progress__bar {
  background: var(--ept-primary);
  border-radius: inherit;
  height: 100%;
  transition: width 160ms ease;
  width: 0%;
}

.ept-empty-state {
  align-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px dashed var(--ept-border-strong);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  min-height: 160px;
  padding: 24px;
  text-align: center;
}

.ept-empty-state h4 {
  margin: 0;
}

.ept-empty-state p {
  color: var(--ept-muted);
  margin: 0;
}

.ept-kbd {
  background: #fff;
  border: 1px solid var(--ept-border-strong);
  border-bottom-width: 2px;
  border-radius: 7px;
  color: var(--ept-muted-strong);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 6px;
}

.ept-component-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ept-component-card {
  box-shadow: none;
  padding: 14px;
}

.ept-component-card h4 {
  font-size: 0.92rem;
  margin: 0 0 10px;
}

@media (max-width: 720px) {
  .ept-field-grid--2,
  .ept-component-grid {
    grid-template-columns: 1fr;
  }

  .ept-segmented {
    border-radius: 16px;
    display: grid;
    width: 100%;
  }

  .ept-segmented button {
    width: 100%;
  }
}
