:root { --clean:#1a9850; --susp:#f08c00; --mal:#d7191c; --gray:#888; --blue:#2563eb; }
* { box-sizing: border-box; }
body { font-family:-apple-system,Segoe UI,Roboto,sans-serif; margin:0; background:#f0f2f5; color:#222; }

/* Nav */
.nav { background:#1f2937; color:#fff; padding:0 20px; display:flex; align-items:center;
       gap:18px; height:54px; }
.nav .brand { font-weight:700; font-size:1.1em; margin-right:8px; }
.nav a { color:#cbd5e1; text-decoration:none; padding:6px 12px; border-radius:6px; font-size:0.95em; }
.nav a:hover { background:#374151; color:#fff; }
.nav a.active { background:var(--blue); color:#fff; }
.nav .spacer { flex:1; }
.nav .who { color:#9ca3af; font-size:0.85em; }

.wrap { padding:20px; max-width:1300px; margin:0 auto; }
h1 { font-size:1.4em; margin:0 0 16px; }
.tz-info { font-size:0.85em; color:#64748b; margin-bottom:12px; }

/* Flash messages */
.flash { padding:10px 14px; border-radius:8px; margin-bottom:14px; font-size:0.9em; }
.flash.info { background:#e0f2fe; color:#075985; border:1px solid #bae6fd; }
.flash.error { background:#fee2e2; color:#991b1b; border:1px solid #fecaca; }

/* Tables */
table { width:100%; border-collapse:collapse; background:#fff; border-radius:8px;
        overflow:hidden; box-shadow:0 1px 3px rgba(0,0,0,.08); table-layout:fixed; }
th, td { padding:10px 12px; text-align:left; border-bottom:1px solid #eee; font-size:0.88em;
         vertical-align:top; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
th { background:#f8fafc; font-weight:600; }

.feed-table td:nth-child(7) { white-space:normal; }
.CLEAN { color:var(--clean); font-weight:700; }
.SUSPICIOUS { color:var(--susp); font-weight:700; }
.MALICIOUS { color:var(--mal); font-weight:700; }
.ERROR,.TIMEOUT { color:var(--gray); font-weight:700; }
.meta { font-size:0.92em; color:#666; }

/* Cards & charts */
.cards { display:flex; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
.card { background:#fff; border-radius:10px; padding:16px 20px; flex:1; min-width:150px;
        box-shadow:0 1px 3px rgba(0,0,0,.08); }
.card .num { font-size:2em; font-weight:700; }
.card .lbl { color:#666; font-size:0.85em; text-transform:uppercase; letter-spacing:.4px; }
.grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.chartbox { background:#fff; border-radius:10px; padding:16px 20px; box-shadow:0 1px 3px rgba(0,0,0,.08); }
.chartbox h3 { margin:0 0 12px; font-size:1em; }
.chartbox.full { grid-column:1 / -1; }
canvas { max-height:300px; }
@media (max-width:800px){ .grid{grid-template-columns:1fr;} }

/* Controls / filters */
.controls { margin-bottom:16px; display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.controls input[type=text], .controls select { padding:7px 10px; border:1px solid #cbd5e1;
        border-radius:6px; font-size:0.9em; }
.btn { display:inline-block; padding:8px 14px; border-radius:6px; border:none; cursor:pointer;
       font-size:0.9em; text-decoration:none; }
.btn-primary { background:var(--blue); color:#fff; }
.btn-secondary { background:#e2e8f0; color:#1f2937; }
.btn-danger { background:var(--mal); color:#fff; }
.btn-small { padding:5px 10px; font-size:0.82em; }

/* Domain filter panel */
.domain-filter { background:#fff; border:1px solid #e2e8f0; border-radius:8px; padding:12px 14px;
        margin-bottom:16px; }
.domain-filter summary { cursor:pointer; font-weight:600; font-size:0.9em; }
.domain-grid { display:flex; flex-wrap:wrap; gap:8px 18px; margin-top:10px; max-height:180px;
        overflow:auto; }
.domain-grid label { font-size:0.85em; display:flex; align-items:center; gap:5px; min-width:200px; }

/* Forms */
.form-box { background:#fff; border-radius:10px; padding:24px; max-width:560px;
        box-shadow:0 1px 3px rgba(0,0,0,.08); }
.form-box.login { max-width:380px; margin:8vh auto 0; }
.form-row { margin-bottom:14px; }
.form-row label { display:block; font-size:0.85em; color:#374151; margin-bottom:5px; font-weight:600; }
.form-row input, .form-row select { width:100%; padding:9px 11px; border:1px solid #cbd5e1;
        border-radius:6px; font-size:0.95em; }
.badge { padding:2px 8px; border-radius:10px; font-size:0.75em; font-weight:600; }
.badge.admin { background:#ede9fe; color:#6d28d9; }
.badge.user { background:#e0f2fe; color:#075985; }
.badge.off { background:#fee2e2; color:#991b1b; }
.inline { display:inline; }
