.webhook-page { --wh-surface: #fff; --wh-soft: #f6f8fa; --wh-border: #dce4eb; --wh-text: #183044; --wh-muted: #63788a; max-width: 1180px; margin-inline: auto; }
.webhook-page .portal-dev-panel { margin-bottom: 20px; }
.webhook-page .portal-dev-panel-header { gap: 20px; flex-wrap: wrap; }
.webhook-page .portal-webhook-url-row { grid-template-columns: minmax(0, 1fr); padding-bottom: 18px; }
.wh-status, .wh-count { font-size: 12px; font-weight: 600; color: var(--wh-muted); background: var(--wh-soft); padding: 6px 10px; border: 1px solid var(--wh-border); border-radius: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wh-status.is-live { color: #187045; background: #eef9f2; border-color: #c9e7d4; }
.wh-delivery-toggle { display: flex; align-items: flex-start; gap: 12px; margin: 0 22px 22px; cursor: pointer; }
.wh-delivery-toggle input { width: 17px; height: 17px; margin-top: 3px; accent-color: #2876cf; flex: 0 0 auto; }
.wh-delivery-toggle strong { display: block; font-size: 14px; color: var(--wh-text); }
.wh-delivery-toggle small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.6; color: var(--wh-muted); }
.wh-signing-content { padding: 18px 22px 22px; color: var(--wh-muted); font-size: 13px; line-height: 1.7; }
.wh-signing-content p { margin: 0 0 8px; }
.wh-signing-content strong { color: var(--wh-text); }
.wh-signature-help { margin-top: 16px !important; font-size: 12px; }
.wh-signature-help code { font-size: 11px; overflow-wrap: anywhere; }
.wh-secret-warning { color: var(--wh-text); font-weight: 600; }
.wh-secret-value { display: flex; align-items: center; gap: 8px; padding: 12px; background: var(--wh-soft); border: 1px solid var(--wh-border); border-radius: 8px; }
.wh-secret-value code { flex: 1; min-width: 0; overflow-wrap: anywhere; user-select: all; font-size: 12px; color: var(--wh-text); }
.wh-secret-value .button { flex-shrink: 0; }
.wh-group { border-top: 1px solid var(--wh-border); }
.wh-group:first-child { border-top: 0; }
.wh-group summary { list-style: none; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; gap: 14px; color: var(--wh-muted); font-size: 12px; }
.wh-group summary::-webkit-details-marker { display: none; }
.wh-group summary > span { display: flex; align-items: center; gap: 12px; }
.wh-group summary svg { width: 17px; height: 17px; }
.wh-group summary strong { color: var(--wh-text); font-size: 14px; font-weight: 600; }
.wh-group[open] summary > span:last-child svg { transform: rotate(180deg); }
.wh-group-description { display: flex; justify-content: space-between; gap: 14px; margin: 0 22px 14px; align-items: center; }
.wh-group-description p { margin: 0; color: var(--wh-muted); font-size: 12px; }
.wh-text-button { border: 0; background: transparent; color: #2876cf; padding: 5px; cursor: pointer; font: inherit; font-size: 12px; white-space: nowrap; }
.wh-group .portal-event-options { margin: 0 22px 22px; padding: 0; }
.wh-savebar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0 24px; color: var(--wh-muted); font-size: 13px; }
.wh-savebar > div, .wh-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wh-test-hint { margin: 14px 22px; color: var(--wh-muted); font-size: 12px; line-height: 1.6; }
.wh-empty { padding: 30px 22px 38px; display: grid; justify-items: center; text-align: center; gap: 10px; color: var(--wh-muted); font-size: 13px; }
.wh-empty svg { width: 24px; height: 24px; }
.wh-empty strong { color: var(--wh-text); font-weight: 600; }
.wh-empty p { margin: 0; max-width: 440px; line-height: 1.65; }
.wh-table-scroll { overflow-x: auto; }
.wh-history { border-collapse: collapse; width: 100%; text-align: left; font-size: 12px; color: var(--wh-text); }
.wh-history th { font-weight: 500; color: var(--wh-muted); background: var(--wh-soft); }
.wh-history th, .wh-history td { padding: 14px 22px; border-top: 1px solid var(--wh-border); white-space: nowrap; }
.wh-history code { font-size: 11px; }
.wh-history time { font-variant-numeric: tabular-nums; color: var(--wh-muted); }
.wh-test-tag { font-size: 10px; border: 1px solid var(--wh-border); padding: 2px 5px; border-radius: 4px; }
.wh-result.is-success { color: #187045; }
.wh-result.is-failure { color: #b42318; }
.wh-error, .wh-notice { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin: 0 0 16px; line-height: 1.6; }
.wh-error { background: #fff1f0; color: #a42620; border: 1px solid #f3d1cd; }
.wh-notice { background: #eef9f2; color: #187045; border: 1px solid #c9e7d4; }
.wh-rotate-dialog { color: var(--wh-text); background: var(--wh-surface); border: 1px solid var(--wh-border); border-radius: 12px; padding: 26px; max-width: 460px; width: calc(100% - 32px); margin: auto; box-shadow: 0 20px 60px #102b4430; }
.wh-rotate-dialog::backdrop { background: #102b4470; }
.wh-rotate-dialog h2 { font-size: 20px; margin: 0 0 14px; letter-spacing: -.4px; }
.wh-rotate-dialog p { color: var(--wh-muted); font-size: 14px; line-height: 1.65; margin: 0 0 16px; }
.wh-rotate-dialog .wh-actions { justify-content: flex-end; margin-top: 24px; }
.webhook-page :is(button, input, summary):focus-visible { outline: 2px solid #438bdf; outline-offset: 3px; }
.webhook-page button:disabled { opacity: .5; cursor: not-allowed; }
html[data-dashboard-theme="dark"] .webhook-page { --wh-surface: #17202a; --wh-soft: #1e2935; --wh-border: #334251; --wh-text: #e4ebf2; --wh-muted: #a5b5c6; }
html[data-dashboard-theme="dark"] .webhook-page :is(.wh-status.is-live, .wh-notice) { background: #173729; color: #8cdbaf; border-color: #2c5640; }
html[data-dashboard-theme="dark"] .webhook-page .wh-result.is-success { color: #8cdbaf; }
html[data-dashboard-theme="dark"] .webhook-page .wh-result.is-failure { color: #ffafa7; }
html[data-dashboard-theme="dark"] .webhook-page .wh-error { color: #ffafa7; background: #3d2528; border-color: #64383d; }
@media (max-width: 640px) {
  .wh-savebar { flex-direction: column; align-items: stretch; }
  .wh-savebar > div { justify-content: flex-end; }
  .wh-secret-value { flex-wrap: wrap; }
  .wh-secret-value code { flex-basis: 100%; margin-bottom: 6px; }
  .wh-group .portal-event-options { grid-template-columns: minmax(0, 1fr); }
  .wh-group .portal-event-option code { overflow-wrap: anywhere; }
  .wh-group-description { align-items: flex-start; }
}
