/* ── Table header cells ─────────────────────────────────────────── */
.th-cell {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  white-space: nowrap;
  user-select: none;
  transition: color 0.15s;
}
.th-cell:hover { color: #e2e8f0; }
.th-cell.sort-active { color: #e2e8f0; }

/* ── Table body rows ────────────────────────────────────────────── */
.tr-data {
  border-bottom: 1px solid rgba(51,65,85,0.4);
  cursor: pointer;
  transition: background 0.1s;
}
.tr-data:hover { background: rgba(30,41,59,0.5); }

.td-cell { padding: 0.7rem 1rem; }

/* ── Signal bar ─────────────────────────────────────────────────── */
.signal-bar-track {
  width: 3.5rem;
  height: 6px;
  border-radius: 9999px;
  background: #1e293b;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}
.signal-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s ease;
}

/* ── Rule dot ───────────────────────────────────────────────────── */
.rule-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
}
.rule-dot.pass { background: rgba(16,185,129,0.15); color: #34d399; }
.rule-dot.fail { background: #1e293b; color: #475569; }

/* ── Modal animation ────────────────────────────────────────────── */
#modal.open { display: flex; }

/* ── Spinning refresh icon ──────────────────────────────────────── */
.spin { animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Skeleton pulse ─────────────────────────────────────────────── */
.skeleton { background: #1e293b; border-radius: 4px; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ── Sidebar layout ──────────────────────────────────────────────── */
#sidebar { transition: width 0.25s ease; }
body.sb-collapsed #sidebar { width: 60px !important; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  transition: color 0.15s, background-color 0.15s;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
.nav-link:hover { color: #e2e8f0; background: rgba(30,41,59,0.8); }
.nav-link.nav-active { color: #fff !important; background: rgba(99,102,241,0.15); }
.nav-link.nav-active:hover { background: rgba(99,102,241,0.25); }
.nav-link.nav-danger { color: #f87171 !important; }
.nav-link.nav-danger:hover { background: rgba(127,29,29,0.25); }
body.sb-collapsed .nav-link { justify-content: center; gap: 0; padding: 0.625rem; }

.sb-label, .sb-logo-text {
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.15s ease, max-width 0.2s ease;
  max-width: 160px;
  opacity: 1;
}
body.sb-collapsed .sb-label,
body.sb-collapsed .sb-logo-text { opacity: 0; max-width: 0; }

#sidebarToggle svg { transition: transform 0.25s; }
body.sb-collapsed #sidebarToggle svg { transform: rotate(180deg); }
