/* ── Sidebar ── */
.sidebar-link {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 550; color: var(--text-muted); cursor: pointer;
  transition: all .15s; text-decoration: none; border: none; background: none; width: 100%; text-align: left;
  position: relative;
}
.sidebar-link svg { flex-shrink: 0; transition: transform .15s; }
.sidebar-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.sidebar-link:hover svg { transform: scale(1.08); }
.sidebar-link.active { color: var(--text-primary); background: var(--accent-soft); font-weight: 650; }
.sidebar-link.active::before {
  content: ''; position: absolute; left: -3px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.sidebar-link.active svg { color: var(--accent-hover); }

/* ── Theme toggle ── */
.theme-toggle {
  position: relative; width: 52px; height: 28px; border-radius: 99px; border: none; cursor: pointer;
  background: linear-gradient(135deg,#1e293b,#334155); transition: background .3s; padding: 0; flex-shrink: 0;
}
[data-theme="light"] .theme-toggle { background: linear-gradient(135deg,#bfdbfe,#93c5fd); }
.theme-toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: transform .3s cubic-bezier(.4,0,.2,1); box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
[data-theme="light"] .theme-toggle::after { transform: translateX(24px); }
.theme-toggle .t-icon { position: absolute; top: 50%; transform: translateY(-50%); font-size: 13px; transition: opacity .3s; }
.theme-toggle .t-moon { right: 7px; opacity: 1; }
.theme-toggle .t-sun { left: 7px; opacity: 0; }
[data-theme="light"] .theme-toggle .t-moon { opacity: 0; }
[data-theme="light"] .theme-toggle .t-sun { opacity: 1; }

/* ── Stat cards ── */
.stat-card { text-align: left; position: relative; overflow: hidden; }
.stat-card .stat-icon { margin: 0 0 16px; }
.stat-val { font-size: 34px; font-weight: 750; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 7px; font-weight: 500; }
.stat-trend { position: absolute; top: 22px; right: 22px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.stat-icon { width: 46px; height: 46px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; position: relative; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
.stat-icon.si-indigo { background: rgba(99,102,241,.13); }  .stat-icon.si-indigo svg { color: #818cf8; }
.stat-icon.si-emerald { background: rgba(16,185,129,.13); } .stat-icon.si-emerald svg { color: #34d399; }
.stat-icon.si-amber { background: rgba(245,158,11,.13); }   .stat-icon.si-amber svg { color: #fbbf24; }
.stat-icon.si-rose { background: rgba(244,63,94,.13); }     .stat-icon.si-rose svg { color: #fb7185; }

/* ── Activity feed ── */
.activity-item { display: flex; gap: 14px; padding: 12px 14px; border-radius: var(--r-md); transition: background .15s; }
.activity-item:hover { background: var(--bg-hover); }
.activity-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; border: 2px solid var(--bg-card-solid); box-shadow: 0 0 0 3px var(--bg-card-solid); }
.activity-line { position: relative; }
.activity-line::before { content: ''; position: absolute; left: 4px; top: 16px; bottom: -12px; width: 2px; background: var(--border); }
.activity-item:last-child .activity-line::before { display: none; }

/* ── Status rows ── */
.status-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--border); transition: border-color .15s, background .15s; background: var(--bg-subtle); }
.status-row:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.status-icon { width: 36px; height: 36px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; }

/* ── Page header ── */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h2 { font-size: 24px; font-weight: 750; letter-spacing: -.03em; color: var(--text-primary); }
.page-head .page-sub { font-size: 14px; margin-top: 4px; color: var(--text-muted); }

/* Live status pill */
.live-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: rgba(34,197,94,.1); color: #4ade80; border: 1px solid rgba(34,197,94,.18); }
[data-theme="light"] .live-pill { color: #15803d; }
