:root { --bg:#f4f7fb; --ink:#17202a; --muted:#667085; --line:#e2e8f0; --brand:#1f6feb; --card:#fff; --ok:#146c43; --warn:#8a5a00; --bad:#b42318; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif; line-height:1.6; }
[hidden] { display:none !important; }
.muted { color:var(--muted); font-size:13px; }
.error { color:var(--bad); font-size:14px; margin:8px 0; }
.grow { flex:1; }
.center { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:16px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:22px; margin-bottom:16px; box-shadow:0 4px 14px rgba(15,23,42,.05); }
.card.narrow { width:100%; max-width:380px; }
.card h1 { margin:0 0 4px; font-size:22px; }
.card h2 { margin:0 0 14px; font-size:18px; }
label { display:block; margin-top:14px; font-weight:600; font-size:14px; }
input { display:block; width:100%; margin-top:6px; padding:10px 12px; border:1px solid #cbd5e1; border-radius:8px; font:inherit; background:#fff; }
input:focus { outline:2px solid var(--brand); outline-offset:1px; }
.btn { border:1px solid #cbd5e1; background:#fff; color:var(--ink); padding:8px 14px; border-radius:8px; cursor:pointer; font:inherit; }
.btn:hover { background:#f1f5f9; }
.btn.primary { background:var(--brand); border-color:var(--brand); color:#fff; width:100%; margin-top:16px; padding:11px; }
.btn.primary:hover { filter:brightness(.95); }
.btn.sm { padding:5px 10px; font-size:13px; width:auto; margin:0; }
.btn.ok { background:var(--ok); border-color:var(--ok); color:#fff; }
.btn.danger { color:var(--bad); }
.topbar { display:flex; align-items:center; gap:12px; background:#fff; border-bottom:1px solid var(--line); padding:12px 20px; position:sticky; top:0; z-index:5; }
.container { max-width:1100px; margin:20px auto; padding:0 16px; }
table { width:100%; border-collapse:collapse; }
table.kv td { padding:9px 6px; border-bottom:1px solid #eef1f5; vertical-align:top; }
table.kv td:first-child { width:38%; font-weight:600; }
table.kv td:last-child { direction:ltr; text-align:right; word-break:break-all; }
.table-wrap { overflow-x:auto; }
table.grid th { text-align:right; font-size:13px; color:var(--muted); padding:8px 6px; border-bottom:2px solid var(--line); white-space:nowrap; }
table.grid td { padding:10px 6px; border-bottom:1px solid #eef1f5; vertical-align:middle; }
.mail { direction:ltr; text-align:right; color:var(--muted); font-size:12px; }
.stats { display:flex; flex-wrap:wrap; gap:12px; }
.stats > div { flex:1 1 130px; background:#f6f8fb; border-radius:10px; padding:14px; text-align:center; }
.stats strong { display:block; font-size:24px; }
.stats span { color:var(--muted); font-size:13px; }
.search { max-width:340px; margin:0 0 12px; }
.meter { min-width:110px; font-size:12px; }
.meter > div:first-child { text-align:right; }
code { background:#eef2f7; padding:1px 6px; border-radius:6px; }
.meter .bar { height:6px; background:#e8edf3; border-radius:3px; overflow:hidden; margin-top:4px; }
.meter .bar i { display:block; height:100%; background:var(--brand); }
.meter.hot .bar i { background:var(--bad); }
.pill { display:inline-block; padding:2px 10px; border-radius:999px; font-size:12px; background:#eef2f7; }
.pill.APPROVED { background:#e6f7ee; color:var(--ok); }
.pill.PENDING { background:#fff4e0; color:var(--warn); }
.pill.REJECTED { background:#fde8e6; color:var(--bad); }
.row-actions { display:flex; gap:6px; flex-wrap:wrap; }
dialog { border:none; border-radius:14px; padding:22px; width:440px; max-width:94vw; box-shadow:0 20px 50px rgba(15,23,42,.3); }
dialog::backdrop { background:rgba(15,23,42,.45); }
dialog h3 { margin:0 0 4px; }
.actions { display:flex; gap:8px; justify-content:flex-end; margin-top:18px; }
.actions .btn.primary { width:auto; margin:0; }
.toast { position:fixed; bottom:18px; inset-inline-start:18px; background:#17202a; color:#fff; padding:10px 16px; border-radius:10px; z-index:50; max-width:90vw; }
.toast.bad { background:var(--bad); }
