*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f3f4f7; color: #1d1d1f; }
a { color: #c2185b; }
code { background: #eef0f4; padding: 1px 6px; border-radius: 4px; font-size: 12.5px; word-break: break-all; }
h1 { font-size: 22px; margin: 6px 0 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
h3 { margin: 0 0 12px; font-size: 15px; }
.ad-top { display: flex; align-items: center; gap: 24px; background: #fff; border-bottom: 1px solid #e5e7eb; padding: 0 20px; height: 56px; position: sticky; top: 0; z-index: 5; }
.ad-brand { font-weight: 700; white-space: nowrap; }
.ad-top nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.ad-top nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: #444; white-space: nowrap; }
.ad-top nav a.on, .ad-top nav a:hover { background: #fdf0f4; color: #c2185b; }
.ad-count { background: #e2136e; color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; margin-left: 4px; }
.ad-logout { margin: 0; }
.ad-main { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }
.ad-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; }
.ad-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ad-grid2 > .ad-card { margin-bottom: 18px; }
.ad-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.ad-stat { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; }
.ad-stat b { display: block; font-size: 22px; }
.ad-stat span { color: #777; font-size: 12px; }
.ad-stat.warn b { color: #d68910; } .ad-stat.ok b { color: #1e8449; } .ad-stat.bad b { color: #c0392b; }
.ad-kv { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 7px 0; border-bottom: 1px solid #f1f1f1; }
.ad-kv span { color: #777; }
.ad-small { color: #777; font-size: 12.5px; margin: 8px 0 0; }
.ad-muted { color: #999; } .ad-green { color: #1e8449; } .ad-red { color: #c0392b; }
.ad-btn { display: inline-block; border: 1px solid #d0d4dc; background: #fff; color: #333; padding: 8px 14px; border-radius: 8px; font: inherit; cursor: pointer; text-decoration: none; }
.ad-btn:hover { border-color: #999; }
.ad-sm { padding: 5px 10px; font-size: 13px; }
.ad-primary { background: #e2136e; border-color: #e2136e; color: #fff; }
.ad-success { background: #27ae60; border-color: #27ae60; color: #fff; }
.ad-danger { background: #c0392b; border-color: #c0392b; color: #fff; }
.ad-primary:hover, .ad-success:hover, .ad-danger:hover { filter: brightness(1.08); border-color: transparent; }
.ad-alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; border: 1px solid; }
.ad-success, .ad-alert.ad-success { }
.ad-alert.ad-success { background: #e8f6ee; border-color: #b7e1c6; color: #155724; }
.ad-alert.ad-warning { background: #fff7e0; border-color: #f3dc94; color: #7a5b00; }
.ad-alert.ad-error { background: #fdecea; border-color: #f5c2c0; color: #8a1f17; }
.ad-alert.ad-info { background: #e7f3f8; border-color: #b9dce9; color: #0c5460; }
.ad-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
input, select, textarea { font: inherit; padding: 7px 10px; border: 1px solid #d0d4dc; border-radius: 8px; background: #fff; }
.ad-table-wrap { padding: 0; overflow-x: auto; }
.ad-table { width: 100%; border-collapse: collapse; }
.ad-table th, .ad-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.ad-table thead th { background: #fafbfc; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #666; }
.ad-table tr:last-child td { border-bottom: 0; }
.ad-empty { text-align: center; color: #999; padding: 30px !important; }
.ad-raw td { background: #fcfcfd; color: #666; }
.ad-compare th { width: 80px; }
.ad-pager { display: flex; gap: 4px; flex-wrap: wrap; }
.ad-pager a, .ad-pager span { padding: 4px 10px; border-radius: 6px; border: 1px solid #ddd; text-decoration: none; background: #fff; }
.ad-pager span { background: #e2136e; color: #fff; border-color: #e2136e; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot.bk { background: #e2136e; } .dot.ng { background: #f26522; }
.bn-badge { display: inline-block; padding: 2px 10px; border-radius: 100px; font-size: 11.5px; font-weight: 600; }
.bn-status-warning { background: #fef3cd; color: #856404; }
.bn-status-success { background: #d4edda; color: #155724; }
.bn-status-error { background: #f8d7da; color: #721c24; }
.bn-status-info { background: #d1ecf1; color: #0c5460; }
.ad-inline { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ad-test { background: #fffdf3; border-color: #f3e3a6; }
.ad-actions { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.ad-actions textarea { width: 100%; }
.ad-actions div { display: flex; gap: 8px; }
.ad-note { background: #fff7e0; padding: 8px 12px; border-radius: 8px; margin: 12px 0 0; }
.ad-form { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.ad-form h3 { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #f0f0f0; }
.ad-form h3:first-of-type { border: 0; padding-top: 0; margin-top: 0; }
.ad-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
.ad-form label.ad-check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.ad-form button[type=submit] { align-self: flex-start; margin-top: 12px; }
.ad-hook { background: #f0f6fc; border-color: #c3d4e6; }
.ad-keyrow { margin-bottom: 14px; }
.ad-keyrow label { display: block; font-weight: 600; margin-bottom: 4px; }
.ad-keyrow form { display: inline; margin-left: 6px; }
.ad-copy { user-select: all; background: #fff; padding: 6px 10px; display: inline-block; }
.ad-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ad-login .ad-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; }
.ad-login h1 { font-size: 18px; margin: 0 0 4px; }
.ad-login label { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 900px) {
  .ad-grid2 { grid-template-columns: 1fr; }
  .ad-stats { grid-template-columns: repeat(2, 1fr); }
  .ad-top { gap: 10px; padding: 0 12px; }
  .ad-brand { display: none; }
  .ad-main { padding: 16px 16px 40px; }
}

/* ---- buttons & integrations ---- */
.ad-code { position: relative; }
.ad-code pre { margin: 0; background: #1d1f24; color: #e6e6e6; border-radius: 10px; padding: 14px 16px; font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-x: auto; white-space: pre; }
.ad-code .ad-copybtn { position: absolute; top: 8px; right: 8px; background: #2d3038; color: #fff; border-color: #444; }
.ad-code .ad-copybtn:hover { border-color: #888; }
.ad-lbl { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 6px; color: #555; }
.ad-btnhead { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.ad-btnactions { display: flex; gap: 6px; flex-wrap: wrap; }
.ad-btnactions form { margin: 0; }
.ad-off { opacity: .65; }
.ad-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.ad-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ad-tabs a { padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid #e5e7eb; text-decoration: none; color: #444; }
.ad-tabs a.on { background: #e2136e; color: #fff; border-color: #e2136e; }
.ad-kv code { max-width: 70%; }
