.debt-webhook-dialog {
  border: 0;
  border-radius: 18px;
  padding: 0;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
  box-shadow: 0 24px 80px #0f29424d;
}
.debt-webhook-dialog::backdrop { background: #102c3e99; backdrop-filter: blur(2px); }
.debt-webhook-card { display: flex; flex-direction: column; max-height: calc(100vh - 32px); background: #fff; }
.debt-webhook-card > header,
.debt-webhook-card > footer { display: flex; align-items: center; gap: 12px; padding: 18px 22px; }
.debt-webhook-card > header { justify-content: space-between; border-bottom: 1px solid #dfe9ee; }
.debt-webhook-card h3,
.debt-webhook-card h4 { margin: 0; }
.debt-webhook-card header p { margin: 5px 0 0; color: #657b87; }
.debt-webhook-card .close { border: 0; border-radius: 9px; background: #eef3f5; width: 34px; height: 34px; font-size: 21px; }
.debt-webhook-form { display: grid; gap: 15px; padding: 20px 22px; }
.debt-webhook-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.debt-webhook-fields label { display: grid; align-content: start; gap: 7px; font-weight: 700; }
.debt-webhook-fields label.is-wide { grid-column: 1 / -1; }
.debt-webhook-fields small { font-weight: 400; color: #657b87; }
.debt-webhook-fields input { width: 100%; box-sizing: border-box; border: 1px solid #cddce3; border-radius: 10px; padding: 12px 13px; font: inherit; background: #fff; }
.debt-webhook-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.debt-webhook-switch input { position: absolute; opacity: 0; }
.debt-webhook-switch span { width: 44px; height: 24px; border-radius: 99px; background: #b9c8cf; position: relative; transition: .2s; }
.debt-webhook-switch span::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.debt-webhook-switch input:checked + span { background: #0874c9; }
.debt-webhook-switch input:checked + span::after { transform: translateX(20px); }
.debt-webhook-security { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: #f2f7fa; border: 1px solid #dce9ef; border-radius: 12px; padding: 13px; }
.debt-webhook-security b { width: 100%; }
.debt-webhook-security span { background: #fff; border-radius: 8px; padding: 6px 9px; }
.debt-webhook-security .is-ready { color: #087c53; }
.debt-webhook-security .is-missing { color: #c53131; background: #fff1f1; }
.debt-webhook-security small { width: 100%; color: #657b87; }
.debt-webhook-history { min-height: 0; overflow: auto; padding: 0 22px 18px; }
.debt-webhook-history > div:first-child { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.debt-webhook-history table { font-size: 12px; }
.debt-webhook-history td:last-child { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.debt-webhook-status { display: inline-flex; border-radius: 99px; padding: 4px 8px; background: #eef3f5; }
.debt-webhook-status.is-succeeded { color: #087c53; background: #e6f7ef; }
.debt-webhook-status.is-failed { color: #c53131; background: #fff0f0; }
.debt-webhook-status.is-pending,
.debt-webhook-status.is-sending { color: #a05b00; background: #fff5dc; }
.debt-webhook-card > footer { border-top: 1px solid #dfe9ee; }
.debt-webhook-card > footer span { flex: 1; }

@media (max-width: 640px) {
  .debt-webhook-fields { grid-template-columns: 1fr; }
  .debt-webhook-fields label.is-wide { grid-column: auto; }
  .debt-webhook-card > footer { flex-wrap: wrap; }
  .debt-webhook-card > footer span { display: none; }
  .debt-webhook-card > footer button { flex: 1; }
  .debt-webhook-history { padding-inline: 14px; }
  .debt-webhook-form,
  .debt-webhook-card > header { padding-inline: 16px; }
}
