:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f8fafc;
  background: #0b1120;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #111827 0%, #0b1120 45%); }
header {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px max(16px, env(safe-area-inset-left));
  background: rgba(11,17,32,.92); backdrop-filter: blur(12px); border-bottom: 1px solid #243047;
}
h1 { margin: 0; font-size: clamp(1.25rem, 5vw, 1.8rem); }
header p { margin: 4px 0 0; color: #94a3b8; font-size: .9rem; }
main { max-width: 920px; margin: auto; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); }
button, a.action {
  border: 0; border-radius: 12px; padding: 12px 14px; font: inherit; font-weight: 700;
  background: #22c55e; color: #052e16; cursor: pointer; text-decoration: none; text-align: center;
}
button.secondary { background: #334155; color: #f8fafc; }
button.ghost { background: transparent; color: #cbd5e1; border: 1px solid #334155; }
button.danger { background: #7f1d1d; color: #fee2e2; }
button:disabled { opacity: .55; cursor: wait; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { padding: 14px 10px; border-radius: 16px; background: #182235; border: 1px solid #26344d; }
.stat b { display: block; font-size: 1.45rem; }
.stat span { color: #94a3b8; font-size: .75rem; }
.toolbar { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 4px 0 14px; padding-bottom: 4px; }
.tab { white-space: nowrap; background: #1e293b; color: #cbd5e1; }
.tab.active { background: #3b82f6; color: white; }
.card {
  display: grid; gap: 10px; margin: 10px 0; padding: 14px;
  background: #121c2e; border: 1px solid #26344d; border-radius: 16px;
}
.card h2 { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { padding: 4px 8px; border-radius: 999px; background: #26344d; color: #cbd5e1; font-size: .75rem; }
.badge.warn { background: #713f12; color: #fef3c7; }
.badge.good { background: #14532d; color: #dcfce7; }
.badge.bad { background: #7f1d1d; color: #fee2e2; }
.reason { color: #fbbf24; margin: 0; }
.muted { color: #94a3b8; font-size: .85rem; overflow-wrap: anywhere; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.message { margin: 10px 0; padding: 12px; border-radius: 12px; background: #1e3a8a; }
.hidden { display: none; }
.empty { display: grid; gap: 4px; padding: 30px 16px; text-align: center; color: #94a3b8; }
.empty strong { color: #e2e8f0; font-size: 1.1rem; }
@media (max-width: 600px) {
  .toolbar { grid-template-columns: 1fr 1fr; }
  .toolbar #refresh { grid-column: 1 / -1; }
  .stats { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .stat { padding: 12px 8px; }
}
