/* Sign-in / register / approval pages (light, matches the site)
   and the webhook console (dark, admin only). */

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - 260px); display: grid; place-items: center; padding: 72px 16px; background: var(--surface-2); }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 36px; }
.auth-title { font-size: 1.9rem; margin: 10px 0 6px; }
.auth-sub { color: var(--muted); margin-bottom: 24px; }
.auth-form { display: grid; gap: 6px; }
.auth-label { font-weight: 600; font-size: 0.88rem; color: var(--ink); margin-top: 10px; }
.auth-input { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px; font: inherit; background: var(--surface); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.auth-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.auth-hint { color: var(--muted); font-size: 0.82rem; }
.auth-error { color: #d0314c; font-size: 0.85rem; }
.auth-error:empty { display: none; }
.auth-submit { margin-top: 18px; width: 100%; }
.auth-alert { border-radius: var(--radius-sm); padding: 10px 14px; font-size: 0.92rem; margin-bottom: 12px; }
.auth-alert ul { margin: 0; padding-left: 1rem; }
.auth-alert--ok { background: rgba(40, 200, 64, .1); color: #16702a; }
.auth-alert--error { background: rgba(208, 49, 76, .08); color: #a5203a; }
.auth-alert.validation-summary-valid { display: none; }

.pending-icon { width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.pending-icon svg { width: 32px; height: 32px; }
.is-final .pending-icon { background: rgba(208, 49, 76, .08); color: #d0314c; }
.pending-timer { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 0.9rem; color: var(--muted); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.approval-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 20px 0 24px; font-size: 0.93rem; }
.approval-facts dt { color: var(--muted); font-weight: 500; }
.approval-facts dd { margin: 0; color: var(--ink); word-break: break-word; }
.approval-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-x--danger { background: #d0314c; color: #fff; }
.btn-x--danger:hover { color: #fff; background: #b4243d; }

.nav-user { color: var(--muted); font-size: 0.9rem; }
.nav-link-btn { background: none; border: 0; }

/* ---------- Webhook console ---------- */
.wh {
  --wh-bg: #0a0a0b; --wh-panel: #0f0f11; --wh-line: rgba(255,255,255,.08); --wh-line-2: rgba(255,255,255,.14);
  --wh-text: #f4f4f5; --wh-muted: #8b8b93; --wh-field: #141417;
  background: var(--wh-bg); color: var(--wh-text); padding: 40px 0 72px; min-height: calc(100vh - 70px);
}
.wh h1, .wh h2, .wh h3 { color: var(--wh-text); }
.wh code { color: #d4d4d8; background: rgba(255,255,255,.06); padding: 1px 6px; border-radius: 6px; font-size: 0.85em; }
.wh-head { display: flex; align-items: center; gap: 18px; margin-bottom: 32px; flex-wrap: wrap; }
.wh-back { color: var(--wh-muted); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; }
.wh-back:hover { color: var(--wh-text); background: rgba(255,255,255,.06); }
.wh-back svg { width: 20px; height: 20px; }
.wh-titles h1 { font-size: 1.6rem; letter-spacing: -0.02em; margin: 0; }
.wh-titles p { margin: 0; color: var(--wh-muted); }
.wh-head-actions { margin-left: auto; display: flex; gap: 10px; }
.wh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 0.95rem; border: 1px solid var(--wh-line-2); background: transparent; color: var(--wh-text); text-decoration: none; }
.wh-btn svg { width: 18px; height: 18px; }
.wh-btn--light { background: #fff; color: #0a0a0b; border-color: #fff; }
.wh-btn--light:hover { color: #0a0a0b; background: #e9e9ec; }
.wh-btn--ghost:hover { color: var(--wh-text); background: rgba(255,255,255,.05); }
.wh-flash { border-radius: 12px; padding: 12px 16px; margin-bottom: 20px; font-size: 0.93rem; }
.wh-flash--ok { background: rgba(34,197,94,.1); color: #86efac; border: 1px solid rgba(34,197,94,.25); }
.wh-flash--err { background: rgba(239,68,68,.1); color: #fca5a5; border: 1px solid rgba(239,68,68,.25); }

.wh-grid { display: grid; grid-template-columns: minmax(300px, 1fr) 2fr; gap: 16px; align-items: start; }
@media (max-width: 991px) { .wh-grid { grid-template-columns: 1fr; } }
.wh-panel { background: var(--wh-panel); border: 1px solid var(--wh-line); border-radius: 18px; overflow: hidden; }
.wh-panel-head { display: flex; align-items: center; gap: 16px; padding: 22px 28px; border-bottom: 1px solid var(--wh-line); }
.wh-panel-head h2 { font-size: 1.15rem; margin: 0; letter-spacing: -0.01em; }
.wh-panel-head p { margin: 0; color: var(--wh-muted); font-size: 0.9rem; }
.wh-panel-body { padding: 28px; }
.wh-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.06); border: 1px solid var(--wh-line); flex: none; }
.wh-ic svg { width: 22px; height: 22px; }
.wh-count { margin-left: auto; font-family: var(--mono); font-size: 0.85rem; background: rgba(255,255,255,.08); border-radius: 8px; padding: 4px 10px; }

.wh-switch { margin-left: auto; position: relative; width: 56px; height: 32px; flex: none; cursor: pointer; }
.wh-switch input { position: absolute; opacity: 0; inset: 0; }
.wh-switch span { position: absolute; inset: 0; border-radius: 999px; background: #27272a; border: 2px solid #3f3f46; transition: background .2s; }
.wh-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #a1a1aa; transition: transform .2s, background .2s; }
.wh-switch input:checked + span { background: #fff; border-color: #fff; }
.wh-switch input:checked + span::after { transform: translateX(24px); background: #0a0a0b; }
.wh-switch input:focus-visible + span { outline: 2px solid #7c5cff; outline-offset: 2px; }

.wh-label { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #a1a1aa; margin-bottom: 10px; }
.wh-label-row { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; }
.wh-label-row .wh-label { margin-bottom: 10px; }
.wh-link { background: none; border: 0; color: #a1a1aa; display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; padding: 0 0 10px; }
.wh-link:hover { color: #fff; }
.wh-link svg { width: 16px; height: 16px; }
.wh-field { display: flex; align-items: center; gap: 10px; background: var(--wh-field); border: 1px solid var(--wh-line-2); border-radius: 12px; padding: 0 12px; }
.wh-field:focus-within { border-color: #71717a; }
.wh-field > svg { width: 18px; height: 18px; color: #a1a1aa; flex: none; }
.wh-field input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--wh-text); font-family: var(--mono); font-size: 0.92rem; padding: 13px 0; outline: none; }
.wh-icon-btn { background: none; border: 0; color: #a1a1aa; padding: 6px; border-radius: 8px; }
.wh-icon-btn:hover { color: #fff; background: rgba(255,255,255,.06); }
.wh-icon-btn.is-done { color: #86efac; }
.wh-icon-btn svg { width: 18px; height: 18px; display: block; }

.wh-box { margin-top: 24px; border: 1px dashed var(--wh-line-2); border-radius: 14px; padding: 20px; }
.wh-box h3 { font-size: 1rem; margin: 0 0 6px; }
.wh-box p { color: var(--wh-muted); font-size: 0.9rem; margin: 0; line-height: 1.55; }
.wh-box-status { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 0.86rem; color: var(--wh-muted); }
.wh-box-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #52525b; }
.wh-box-status.is-on { color: #fde68a; }
.wh-box-status.is-on .dot { background: #facc15; box-shadow: 0 0 0 4px rgba(250,204,21,.15); }

.wh-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.wh-event { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 18px; border: 1px solid var(--wh-line); border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.wh-event:hover { border-color: var(--wh-line-2); }
.wh-event input { position: absolute; opacity: 0; }
.wh-check { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #52525b; flex: none; display: grid; place-items: center; margin-top: 1px; }
.wh-event input:checked ~ .wh-check { background: #fff; border-color: #fff; }
.wh-event input:checked ~ .wh-check::after { content: ""; width: 10px; height: 6px; border-left: 2px solid #0a0a0b; border-bottom: 2px solid #0a0a0b; transform: rotate(-45deg) translate(1px, -1px); }
.wh-event:has(input:checked) { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.03); }
.wh-event input:focus-visible ~ .wh-check { outline: 2px solid #7c5cff; outline-offset: 2px; }
.wh-event-text { display: grid; gap: 2px; min-width: 0; }
.wh-event-name { font-weight: 600; font-size: 1rem; }
.wh-event-desc { color: var(--wh-muted); font-size: 0.83rem; line-height: 1.45; }
.wh-bolt { color: #facc15; }

.wh-docs { margin-top: 24px; border-top: 1px solid var(--wh-line); padding-top: 18px; color: var(--wh-muted); font-size: 0.9rem; }
.wh-docs summary { color: var(--wh-text); font-weight: 600; cursor: pointer; }
.wh-docs p, .wh-docs ol { margin: 12px 0 0; }
.wh-docs pre { margin: 12px 0 0; background: #000; border: 1px solid var(--wh-line); border-radius: 12px; padding: 14px 16px; color: #d4d4d8; font-family: var(--mono); font-size: 0.8rem; overflow-x: auto; }

.wh-empty { color: var(--wh-muted); padding: 24px 28px; margin: 0; }
.wh-table { width: 100%; font-size: 0.88rem; border-collapse: collapse; }
.wh-table th { color: #a1a1aa; font-weight: 600; text-transform: uppercase; font-size: 0.72rem; letter-spacing: .08em; padding: 12px 28px; border-bottom: 1px solid var(--wh-line); }
.wh-table td { padding: 12px 28px; border-bottom: 1px solid var(--wh-line); color: #d4d4d8; white-space: nowrap; }
.wh-table tr:last-child td { border-bottom: 0; }
.wh-pill { font-family: var(--mono); font-size: 0.78rem; border-radius: 6px; padding: 2px 8px; }
.wh-pill.ok { background: rgba(34,197,94,.12); color: #86efac; }
.wh-pill.err { background: rgba(239,68,68,.12); color: #fca5a5; }
.wh-err { color: var(--wh-muted); font-size: 0.8rem; white-space: normal; }
