/* PayWicket Admin portal. Builds on pw.css tokens; dark header, light content, dense tables. */
:root { --side: 220px; }
html, body { height: 100%; }
body { background: var(--pw-bg); color: var(--pw-text); }
.hide { display: none !important; }
.muted { color: var(--pw-muted); } .small { font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; word-break: break-all; }
.err { color: #b91c1c; font-size: 13px; min-height: 18px; margin-top: 6px; }
.full { width: 100%; justify-content: center; }
label { display: block; font-size: 12.5px; color: var(--pw-muted); margin: 12px 0 4px; }
input, select, textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--pw-line-2); border-radius: 10px; font: inherit; font-size: 14.5px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pw-brand-500); box-shadow: 0 0 0 3px rgba(124,58,237,.15); }
.brandline { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -.02em; text-decoration: none; color: inherit; }
.brandline .pw-mark { width: 22px; height: 22px; border-radius: 7px; }
.brandline .muted { font-weight: 600; }

/* auth */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 700px at 70% 30%, #2a1f6e 0%, #141235 45%, #0b1220 100%); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 18px; padding: 26px 26px 22px; box-shadow: 0 24px 60px rgba(2,6,23,.35); }
.auth-card h1 { font-size: 22px; margin: 16px 0 6px; letter-spacing: -.02em; }
.auth-links { text-align: center; margin-top: 12px; font-size: 13px; } .auth-links a { color: var(--pw-brand-600); }
.info { font-size: 13px; color: #312e81; background: var(--pw-info-bg); border-radius: 10px; padding: 10px 12px; margin-top: 12px; display: none; } .info.on { display: block; }
.mfa-row { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; } .mfa-row img { border: 1px solid var(--pw-line); border-radius: 12px; }

/* shell */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 10px 18px; background: var(--pw-ink); color: #fff; }
.top .brandline .muted { color: #c7d2fe; }
.search { position: relative; flex: 1; max-width: 640px; margin: 0 auto; }
.search input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #fff; padding: 9px 12px; }
.search input::placeholder { color: #94a3b8; }
.results { position: absolute; top: 44px; left: 0; right: 0; background: #fff; color: var(--pw-text); border: 1px solid var(--pw-line); border-radius: 12px; box-shadow: var(--pw-shadow); max-height: 60vh; overflow: auto; z-index: 40; }
.results .grp { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--pw-muted); padding: 10px 12px 4px; }
.results a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; color: inherit; text-decoration: none; font-size: 13.5px; } .results a:hover { background: #f3f1fc; }
.who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #cbd5e1; white-space: nowrap; } .who a { color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #eef2ff; color: #3730a3; }
.pill.ok { background: #ecfdf5; color: #047857; } .pill.warn { background: #fffbeb; color: #92400e; } .pill.bad { background: #fef2f2; color: #991b1b; } .pill.dim { background: #f1f5f9; color: #475569; }
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: calc(100vh - 52px); }
.side { padding: 14px 10px; border-right: 1px solid var(--pw-line); background: #fff; position: sticky; top: 52px; align-self: start; height: calc(100vh - 52px); }
.side a { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; color: var(--pw-text); text-decoration: none; font-weight: 600; font-size: 14px; }
.side a:hover { background: #f3f1fc; } .side a.active { background: #efeafd; color: var(--pw-brand-600); }
.side .count { background: #fde68a; color: #92400e; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.content { padding: 20px 24px 60px; max-width: 1400px; }
.content h1 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 4px; } .content h2 { font-size: 15px; margin: 22px 0 10px; letter-spacing: -.01em; } .sub { color: var(--pw-muted); margin: 0 0 16px; font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.card { background: #fff; border: 1px solid var(--pw-line); border-radius: 14px; padding: 14px 16px; }
.card .n { font-size: 24px; font-weight: 800; letter-spacing: -.02em; } .card .l { font-size: 12.5px; color: var(--pw-muted); margin-top: 2px; } .card .d { font-size: 12px; color: var(--pw-muted); margin-top: 4px; }
.panel { background: #fff; border: 1px solid var(--pw-line); border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; }
.panel.warn { border-color: #fde68a; background: #fffbeb; } .panel.bad { border-color: #fecaca; background: #fef2f2; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .row.end { justify-content: flex-end; } .grow { flex: 1; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; } .filters label { margin: 0 0 4px; } .filters > div { min-width: 140px; } .filters input, .filters select { padding: 8px 10px; font-size: 13.5px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; } .t th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--pw-muted); padding: 8px 10px; border-bottom: 1px solid var(--pw-line); white-space: nowrap; }
.t td { padding: 9px 10px; border-bottom: 1px solid var(--pw-line); vertical-align: top; } .t tr:hover td { background: #fafafe; } .t a { color: var(--pw-brand-600); text-decoration: none; } .t a:hover { text-decoration: underline; }
.t .num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
.kv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 6px 14px; font-size: 13.5px; } .kv dt { color: var(--pw-muted); } .kv dd { margin: 0; word-break: break-word; }
.timeline { list-style: none; padding: 0; margin: 0; } .timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--pw-line); font-size: 13px; } .timeline time { color: var(--pw-muted); font-variant-numeric: tabular-nums; }
.pw-btn.sm { padding: 6px 10px; font-size: 12.5px; } .pw-btn-soft { background: #fff; border-color: var(--pw-line-2); } .pw-btn-soft:hover { background: #f1f5f9; } .t td select { width: auto; min-width: 130px; padding: 6px 8px; font-size: 13px; } .pw-btn.danger { background: #fef2f2; color: #991b1b; }
.bar { height: 120px; display: flex; align-items: flex-end; gap: 3px; } .bar div { flex: 1; background: linear-gradient(180deg, #7c3aed, #22d3ee); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; } .bar div:hover::after { content: attr(data-t); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #0b1020; color: #fff; font-size: 11px; padding: 3px 6px; border-radius: 6px; white-space: nowrap; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; background: #0b1020; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; transition: .2s; pointer-events: none; z-index: 50; } .toast.show { opacity: 1; transform: translateX(-50%); } .toast.bad { background: #991b1b; }
details.json { margin-top: 8px; } details.json pre { background: #0b1020; color: #e2e8f0; padding: 12px; border-radius: 10px; font-size: 12px; overflow: auto; max-height: 360px; }
dialog { border: 0; border-radius: 16px; padding: 0; max-width: 520px; width: 92vw; box-shadow: 0 24px 60px rgba(2,6,23,.3); } dialog::backdrop { background: rgba(2,6,23,.45); } dialog .dh { font-weight: 800; padding: 16px 20px; border-bottom: 1px solid var(--pw-line); } dialog .db { padding: 6px 20px 16px; } dialog .df { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--pw-line); }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; display: flex; overflow-x: auto; gap: 4px; border-right: 0; border-bottom: 1px solid var(--pw-line); padding: 8px; } .side a { white-space: nowrap; }
  .top { flex-wrap: wrap; } .search { order: 3; flex-basis: 100%; max-width: none; } .who span:not(.pill) { display: none; }
  .content { padding: 14px; } .kv { grid-template-columns: 1fr; } .timeline li { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
