/* WooSpeed - same design language as the Meta Launcher UI: shadcn-style tokens,
   one accent colour, bordered cards, muted labels, mono numbers. */
:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 9%;
  --card: 0 0% 100%;
  --primary: 214 89% 52%;
  --primary-foreground: 0 0% 100%;
  --success: 135 61% 35%;
  --warning: 32 95% 44%;
  --danger: 0 72% 51%;
  --muted: 210 17% 96%;
  --muted-foreground: 215 14% 45%;
  --border: 214 16% 91%;
  --radius: 0.7rem;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
}
html[data-theme="dark"] {
  --background: 216 10% 10%;
  --foreground: 0 0% 96%;
  --card: 216 10% 13%;
  --primary: 214 89% 60%;
  --success: 135 57% 48%;
  --warning: 32 95% 55%;
  --danger: 0 72% 60%;
  --muted: 216 9% 18%;
  --muted-foreground: 215 12% 62%;
  --border: 216 9% 22%;
  --shadow: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.shell { display: flex; min-height: 100vh; }

/* ---------------- sidebar ---------------- */
.sidebar {
  width: 240px; flex-shrink: 0; border-right: 1px solid hsl(var(--border));
  background: hsl(var(--card)); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 16px; }
.brand-tile {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: hsl(var(--primary)); color: #fff; font-size: 17px;
}
.brand-name { font-weight: 650; font-size: 14px; }
.brand-sub { font-size: 11px; color: hsl(var(--muted-foreground)); }
.site-card {
  margin: 0 12px 14px; padding: 12px; border: 1px solid hsl(var(--border));
  border-radius: var(--radius); background: hsl(var(--background));
}
.site-card-head { display: flex; justify-content: space-between; align-items: center; }
.eyebrow {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--muted-foreground)); }
.dot.good { background: hsl(var(--success)); }
.dot.warn { background: hsl(var(--warning)); }
.dot.bad { background: hsl(var(--danger)); }
.site-domain { font-weight: 600; margin-top: 6px; font-size: 13px; }
.site-meta { font-size: 11px; color: hsl(var(--muted-foreground)); margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.nav-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  color: hsl(var(--muted-foreground)); font: inherit; text-align: left;
}
.nav-item:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.nav-item.is-active { background: hsl(var(--muted)); color: hsl(var(--foreground)); font-weight: 600; }
.ni { width: 16px; text-align: center; font-size: 12px; }
.pill {
  margin-left: auto; font-size: 10px; padding: 1px 6px; border-radius: 999px;
  background: hsl(var(--border)); color: hsl(var(--muted-foreground));
}
.sidebar-foot { margin-top: auto; padding: 14px 16px; border-top: 1px solid hsl(var(--border)); }
.foot-row {
  display: flex; justify-content: space-between; font-size: 11px;
  color: hsl(var(--muted-foreground)); padding: 2px 0;
}
.ghost-btn {
  margin-top: 10px; width: 100%; padding: 7px; border-radius: 8px; cursor: pointer;
  border: 1px solid hsl(var(--border)); background: transparent; color: inherit; font: inherit;
}

/* ---------------- main ---------------- */
.main { flex: 1; min-width: 0; padding: 0 28px 56px; }
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0 18px; border-bottom: 1px solid hsl(var(--border)); margin-bottom: 20px;
}
.topbar h1 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.topbar-sub { margin: 3px 0 0; font-size: 12px; color: hsl(var(--muted-foreground)); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.stamp { font-size: 11px; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }
.btn {
  padding: 8px 14px; border-radius: 8px; border: 1px solid transparent; cursor: pointer;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); font: inherit; font-weight: 600;
}
.btn:active { transform: translateY(1px); }

.verdict {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  border: 1px solid hsl(var(--border)); border-left: 4px solid hsl(var(--muted-foreground));
  border-radius: var(--radius); padding: 14px 16px; background: hsl(var(--card));
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.verdict.bad { border-left-color: hsl(var(--danger)); }
.verdict.warn { border-left-color: hsl(var(--warning)); }
.verdict.good { border-left-color: hsl(var(--success)); }
.verdict-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.verdict-state {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; background: hsl(var(--muted));
}
.verdict.bad .verdict-state { background: hsl(var(--danger)); color: #fff; }
.verdict.warn .verdict-state { background: hsl(var(--warning)); color: #fff; }
.verdict.good .verdict-state { background: hsl(var(--success)); color: #fff; }
.verdict-headline { font-weight: 600; }
.verdict-right { font-size: 12px; color: hsl(var(--muted-foreground)); }

.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat {
  border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: hsl(var(--card));
  padding: 12px 14px; box-shadow: var(--shadow);
}
.stat-label { font-size: 11px; color: hsl(var(--muted-foreground)); }
.stat-value {
  font-size: 21px; font-weight: 650; letter-spacing: -.02em; margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.stat-sub { font-size: 11px; color: hsl(var(--muted-foreground)); margin-top: 2px; }
.stat.good .stat-value { color: hsl(var(--success)); }
.stat.warn .stat-value { color: hsl(var(--warning)); }
.stat.bad .stat-value { color: hsl(var(--danger)); }

.card {
  border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: hsl(var(--card));
  box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden;
}
.card-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid hsl(var(--border));
}
.card-head h2 { margin: 0; font-size: 13px; font-weight: 650; }
.card-head .count { font-size: 11px; color: hsl(var(--muted-foreground)); }
.legend { display: flex; gap: 14px; font-size: 11px; color: hsl(var(--muted-foreground)); }
.sw { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.sw-a { background: hsl(var(--danger)); }
.sw-b { background: hsl(var(--success)); }
.sw-c { background: hsl(var(--primary)); }
.chart-wrap { padding: 10px 16px 0; }
#chart { width: 100%; height: 170px; display: block; }
.chart-x {
  display: flex; justify-content: space-between; padding: 0 16px 12px;
  font-size: 10px; color: hsl(var(--muted-foreground));
}

.rows { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: 1fr 260px; gap: 12px; align-items: baseline;
  padding: 9px 16px; border-bottom: 1px solid hsl(var(--border));
}
.row:last-child { border-bottom: 0; }
.row-label { font-size: 12.5px; }
.row-note { font-size: 11px; color: hsl(var(--muted-foreground)); margin-top: 2px; }
.row-value {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  font-size: 12.5px; font-variant-numeric: tabular-nums; text-align: right;
  word-break: break-word;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: hsl(var(--muted-foreground)); }
.status-dot.good { background: hsl(var(--success)); }
.status-dot.warn { background: hsl(var(--warning)); }
.status-dot.bad { background: hsl(var(--danger)); }
.row.bad .row-value { color: hsl(var(--danger)); }
.row.warn .row-value { color: hsl(var(--warning)); }

.empty { padding: 22px; }
.empty h2 { margin: 0 0 8px; font-size: 15px; }
.empty p { margin: 0 0 10px; font-size: 13px; }
.todo-list { margin: 0 0 12px; padding-left: 18px; font-size: 13px; line-height: 1.7; }
.muted { color: hsl(var(--muted-foreground)); font-size: 12px; }
.is-hidden { display: none; }

@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { grid-template-columns: 1fr; }
  .row-value { justify-content: flex-start; text-align: left; }
  .sidebar { width: 200px; }
}
@media (max-width: 720px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .brand { padding: 12px; }
  .site-card { margin: 0 8px; flex: 1; }
  .nav { flex-direction: row; padding: 0 8px 8px; width: 100%; }
  .nav-item { width: auto; }
  .sidebar-foot { display: none; }
  .main { padding: 0 14px 40px; }
  .topbar { flex-wrap: wrap; }
}
