* { box-sizing: border-box; }
html,body { margin:0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
            background:#0f1115; color:#e4e6eb; }
a { color:#7ab8ff; }
a:hover { color:#aed1ff; }

header.top { display:flex; align-items:center; justify-content:space-between;
             padding:10px 20px; background:#1a1d24; border-bottom:1px solid #2a2f3a;}
.brand { font-weight:700; color:#fff; text-decoration:none; font-size:18px; }
header nav { display:flex; gap:14px; align-items:center; }
header .user { color:#9aa0aa; font-size:14px; }

main { padding:20px; max-width:1500px; margin:0 auto; }

.login-box { max-width:340px; margin:80px auto; background:#1a1d24; padding:24px; border-radius:8px; }
.login-box h1 { margin-top:0; }
.login-box form { display:grid; gap:12px; }
.login-box label { display:flex; flex-direction:column; gap:4px; font-size:14px; color:#9aa0aa;}
.login-box input { padding:8px 10px; background:#0f1115; color:#fff;
                   border:1px solid #2a2f3a; border-radius:4px; }
.login-box button { padding:10px; background:#3b82f6; border:0; color:#fff;
                    border-radius:4px; cursor:pointer; font-weight:600;}
.error { background:#3a1c1c; color:#fca5a5; padding:8px 10px; border-radius:4px; }

.stats { display:flex; gap:18px; align-items:center; flex-wrap:wrap; margin-bottom:14px;
         background:#1a1d24; padding:10px 14px; border-radius:6px;}
.stats b { color:#fff; }
.btn, .btn-secondary { padding:6px 12px; background:#3b82f6; color:#fff; text-decoration:none;
                       border-radius:4px; border:0; cursor:pointer; font-size:13px;}
.btn-secondary { background:#2a2f3a; }
.btn:hover { background:#5996f6; }

.filters form { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px; }
.filters input, .filters select { padding:6px 8px; background:#1a1d24; color:#e4e6eb;
                                  border:1px solid #2a2f3a; border-radius:4px; font-size:13px;}

.actions { display:flex; gap:16px; margin-bottom:18px; flex-wrap:wrap; }
.actions details { background:#1a1d24; padding:10px 14px; border-radius:6px; min-width:300px; }
.actions summary { cursor:pointer; font-weight:600; }
.actions form { display:grid; gap:6px; margin-top:8px; }
.actions input, .actions textarea { padding:6px 8px; background:#0f1115; color:#fff;
                                    border:1px solid #2a2f3a; border-radius:4px;}
.actions button { padding:8px; background:#10b981; color:#fff; border:0; border-radius:4px;
                  cursor:pointer; font-weight:600; }
#scrape-status { background:#0f1115; padding:8px; border-radius:4px; font-size:12px;
                 white-space:pre-wrap; max-height:200px; overflow:auto;}

table.registry { width:100%; border-collapse:collapse; background:#1a1d24; border-radius:6px;
                 overflow:hidden; font-size:13px;}
table.registry th, table.registry td { padding:6px 8px; text-align:left;
                                       border-bottom:1px solid #2a2f3a; vertical-align:top;}
table.registry th { background:#252a33; color:#9aa0aa; font-weight:600;
                    position:sticky; top:0; }
tr.t-factory { background:rgba(59,130,246,0.05); }
tr.t-workshop { background:rgba(245,158,11,0.05); }
tr.t-collection { background:rgba(120,120,120,0.05); }
tr.t-noise { opacity:0.4; }
.v-verified { color:#34d399; font-weight:600; }
.v-rejected { color:#f87171; }
.v-needs_verification { color:#fbbf24; }
.empty { text-align:center; padding:30px; color:#9aa0aa; }

dl.entity { display:grid; grid-template-columns:160px 1fr; gap:6px 16px;
            background:#1a1d24; padding:14px; border-radius:6px; }
dl.entity dt { color:#9aa0aa; }
dl.entity dd { margin:0; }

ul.events { list-style:none; padding:0; }
ul.events li { padding:4px 0; border-bottom:1px solid #2a2f3a; font-size:13px; }
ul.events time { color:#9aa0aa; margin-right:8px; }
ul.events code { background:#252a33; padding:2px 6px; border-radius:3px; }
