/* ── Recon Page Styles ── */

/* ── Animations ── */
.recon-fade-in {
  animation: reconFadeIn 0.4s ease-out both;
}
@keyframes reconFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.recon-stagger-1 { animation-delay: 0.05s; }
.recon-stagger-2 { animation-delay: 0.10s; }
.recon-stagger-3 { animation-delay: 0.15s; }
.recon-stagger-4 { animation-delay: 0.20s; }
.recon-stagger-5 { animation-delay: 0.25s; }
.recon-stagger-6 { animation-delay: 0.30s; }
.recon-stagger-7 { animation-delay: 0.35s; }
.recon-stagger-8 { animation-delay: 0.40s; }

/* ── Scan progress banner ── */
#scan-progress-row .scan-banner {
  background: linear-gradient(135deg, #206bc4 0%, #4299e1 100%) !important;
  border-radius: 8px;
  color: #fff !important;
  padding: 16px 20px;
  box-shadow: 0 4px 12px rgba(32, 107, 196, 0.3);
}
#scan-progress-row .scan-banner .progress {
  height: 6px;
  background: rgba(255,255,255,0.25);
  border-radius: 3px;
}
#scan-progress-row .scan-banner .progress-bar {
  background: #fff !important;
  border-radius: 3px;
  transition: width 0.4s ease;
}
#scan-progress-row .scan-banner.complete {
  background: linear-gradient(135deg, #2fb344 0%, #47d16c 100%) !important;
  box-shadow: 0 4px 12px rgba(47, 179, 68, 0.3);
}

/* ── Stats cards ── */
.stat-card {
  border: none;
  border-radius: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--tblr-muted);
  margin-top: 4px;
}

/* ── Category cards ── */
.cat-card {
  border: 1px solid var(--tblr-border-color);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.cat-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.cat-header {
  padding: 16px 20px;
  background: var(--tblr-bg-surface);
  border-bottom: 1px solid var(--tblr-border-color);
  display: flex;
  align-items: center;
  gap: 14px;
}
.cat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cat-icon img { width: 20px; height: 20px; }
.cat-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--tblr-body-color);
}
.cat-subtitle {
  font-size: 0.8rem;
  color: var(--tblr-muted);
  margin: 0;
}
.cat-actions {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

/* ── Command rows ── */
.cmd-item {
  border-bottom: 1px solid var(--tblr-border-color);
}
.cmd-item:last-child { border-bottom: none; }
.cmd-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.12s;
  user-select: none;
}
.cmd-row:hover { background: rgba(32, 107, 196, 0.04); }
.cmd-chevron {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  opacity: 0.5;
}
.cmd-chevron.open {
  transform: rotate(180deg);
  opacity: 0.8;
}
.cmd-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tblr-body-color);
  line-height: 1.3;
}
.cmd-preview {
  font-size: 0.8rem;
  color: var(--tblr-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 600px;
  margin-top: 2px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Fira Code', monospace;
}
.cmd-badges {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.cmd-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ── Command output — LIGHT readable theme ──
   Override Tabler's pre{background:var(--tblr-bg-surface-dark);color:var(--tblr-light)}
   which makes pre dark-bg + light-text. We need light-bg + dark-text. */
.cmd-output {
  display: none;
  border-top: 1px solid var(--tblr-border-color);
  background: #ffffff !important;
}
.cmd-output.show { display: block; }
.cmd-output pre.cmd-pre,
pre.cmd-pre {
  margin: 0 !important;
  padding: 16px 20px !important;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Fira Code', monospace !important;
  font-size: 0.875rem !important;
  line-height: 1.7 !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  background: #f8fafc !important;
  color: #0f172a !important;
  max-height: 500px;
  overflow-y: auto;
  tab-size: 4;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}
/* Force light background on output wrapper */
#categories-container {
  background: transparent;
}
.cat-card {
  background: #ffffff !important;
}
.cat-header {
  background: #f8fafc !important;
}
.cmd-item {
  background: #ffffff !important;
}
.cmd-label {
  color: #1e293b !important;
  font-weight: 600;
}
.cmd-preview {
  color: #475569 !important;
}
.cat-title {
  color: #0f172a !important;
  font-weight: 700;
}
.cat-subtitle {
  color: #64748b !important;
}
pre.cmd-pre::-webkit-scrollbar { width: 6px; }
pre.cmd-pre::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }
.cmd-no-output {
  padding: 16px 20px;
  color: var(--tblr-muted);
  font-size: 0.875rem;
  font-style: italic;
}

/* ── Empty state ── */
.recon-empty { padding: 5rem 2rem; text-align: center; }
.recon-empty-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: var(--tblr-primary-lt);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.recon-empty-icon img { width: 28px; height: 28px; }

/* ── Responsive ── */
@media (max-width: 767px) {
  .cmd-preview { max-width: 200px; }
  .cmd-row { padding: 10px 14px; gap: 8px; }
  .cat-header { padding: 12px 14px; }
  pre.cmd-pre { padding: 12px 14px; font-size: 0.8rem; }
  .stat-number { font-size: 1.35rem; }
}

/* ── Dark mode compatibility ──
   When Tabler is in dark mode, recon cards should stay light for readability */
.theme-dark .cmd-output pre.cmd-pre,
.theme-dark pre.cmd-pre,
[data-bs-theme="dark"] .cmd-output pre.cmd-pre,
[data-bs-theme="dark"] pre.cmd-pre {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
.theme-dark .cat-card,
[data-bs-theme="dark"] .cat-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}
.theme-dark .cat-header,
[data-bs-theme="dark"] .cat-header {
  background: #0f172a !important;
  border-color: #334155 !important;
}
.theme-dark .cmd-item,
[data-bs-theme="dark"] .cmd-item {
  background: #1e293b !important;
  border-color: #334155 !important;
}
.theme-dark .cat-title,
[data-bs-theme="dark"] .cat-title {
  color: #f1f5f9 !important;
}
.theme-dark .cat-subtitle,
[data-bs-theme="dark"] .cat-subtitle {
  color: #94a3b8 !important;
}
.theme-dark .cmd-label,
[data-bs-theme="dark"] .cmd-label {
  color: #f1f5f9 !important;
}
.theme-dark .cmd-preview,
[data-bs-theme="dark"] .cmd-preview {
  color: #cbd5e1 !important;
}

/* ── Category filter tabs ── */
#category-tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--tblr-body-bg, #f1f5f9);
  padding: 8px 0 12px;
}
#tab-list {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: nowrap !important;
}
#tab-list::-webkit-scrollbar { display: none; }
.recon-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1px solid var(--tblr-border-color);
  border-radius: 20px;
  background: #fff;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1.4;
}
.recon-tab:hover {
  border-color: var(--tblr-primary);
  color: var(--tblr-primary);
  background: var(--tblr-primary-lt);
}
.recon-tab.active {
  background: var(--tblr-primary);
  color: #fff;
  border-color: var(--tblr-primary);
  box-shadow: 0 2px 8px rgba(32,107,196,0.25);
}
.recon-tab img { opacity: 0.7; }
.recon-tab.active img { opacity: 1; filter: brightness(0) invert(1); }
.recon-tab-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(0,0,0,0.08);
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}
.recon-tab.active .recon-tab-badge {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

/* ── Raw output copy button ── */
.raw-wrap { position: relative; }
.raw-copy-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #64748b;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  z-index: 2;
}
.raw-copy-btn:hover {
  opacity: 1;
  border-color: #94a3b8;
  color: #1e293b;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* ── Highlight.js overrides ── */
pre.cmd-pre code {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}
pre.cmd-pre code.hljs {
  background: transparent !important;
  padding: 0 !important;
}

/* ── Dark mode: tabs ── */
.theme-dark #category-tabs,
[data-bs-theme="dark"] #category-tabs {
  background: var(--tblr-body-bg, #1a2234);
}
.theme-dark .recon-tab,
[data-bs-theme="dark"] .recon-tab {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}
.theme-dark .recon-tab:hover,
[data-bs-theme="dark"] .recon-tab:hover {
  border-color: var(--tblr-primary);
  color: var(--tblr-primary);
}
.theme-dark .recon-tab.active,
[data-bs-theme="dark"] .recon-tab.active {
  background: var(--tblr-primary);
  color: #fff;
  border-color: var(--tblr-primary);
}

/* ── Tree View (plist/JSON structured output) ── */
.tv-toolbar {
  display: flex;
  gap: 4px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--tblr-border-color);
  background: #f8fafc;
}
.tv-toggle {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 14px;
  border: 1px solid var(--tblr-border-color);
  border-radius: 6px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: all 0.12s;
}
.tv-toggle:hover {
  border-color: var(--tblr-primary);
  color: var(--tblr-primary);
}
.tv-toggle.active {
  background: var(--tblr-primary);
  color: #fff;
  border-color: var(--tblr-primary);
}
.tv-tree-view {
  padding: 16px 20px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Fira Code', monospace;
  font-size: 0.84rem;
  line-height: 1.8;
  max-height: 500px;
  overflow-y: auto;
  background: #fff;
}
.tv-row { margin: 0; }
.tv-indent {
  padding-left: 20px;
  border-left: 1px solid #e2e8f0;
  margin-left: 4px;
}
.tv-key { font-weight: 700; color: #1e293b; }
.tv-index { color: #6366f1; font-weight: 600; }
.tv-count { font-weight: 400; color: #94a3b8; font-size: 0.78rem; }
.tv-string { color: #16a34a; }
.tv-integer, .tv-real { color: #2563eb; }
.tv-true { color: #16a34a; }
.tv-false { color: #dc2626; }
.tv-date { color: #9333ea; }
.tv-data { color: #94a3b8; font-size: 0.8rem; }
.tv-null { color: #94a3b8; font-style: italic; }
.tv-punctuation { color: #94a3b8; }

/* Disclosure triangles */
.tv-tree-view details > summary {
  cursor: pointer;
  list-style: none;
}
.tv-tree-view details > summary::-webkit-details-marker { display: none; }
.tv-tree-view details > summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 6px;
  font-size: 0.65rem;
  transition: transform 0.15s;
  color: #94a3b8;
}
.tv-tree-view details[open] > summary::before {
  transform: rotate(90deg);
}
.tv-tree-view::-webkit-scrollbar { width: 6px; }
.tv-tree-view::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }

/* ── Dark mode: tree view ── */
.theme-dark .tv-toolbar,
[data-bs-theme="dark"] .tv-toolbar {
  background: #0f172a;
  border-color: #334155;
}
.theme-dark .tv-toggle,
[data-bs-theme="dark"] .tv-toggle {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}
.theme-dark .tv-tree-view,
[data-bs-theme="dark"] .tv-tree-view {
  background: #1e293b;
}
.theme-dark .tv-key,
[data-bs-theme="dark"] .tv-key {
  color: #f1f5f9;
}
.theme-dark .tv-indent,
[data-bs-theme="dark"] .tv-indent {
  border-color: #334155;
}

/* ══════════════════════════════════════════════
   Software View — macOS SPSoftwareDataType
   ══════════════════════════════════════════════ */
.sw-container { max-width: 1200px; margin: 0 auto; }
.sw-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding: 20px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  border-radius: 16px;
  color: #fff;
}
.sw-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3);
}
.sw-header-info h1 { font-size: 24px; font-weight: 600; margin: 0 0 4px; }
.sw-subtitle { font-size: 14px; opacity: 0.8; margin-bottom: 8px; }
.sw-uptime-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.sw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 16px;
}
.sw-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.sw-card-wide { grid-column: 1 / -1; }
.sw-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sw-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.sw-card-icon.user { background: rgba(99, 102, 241, 0.1); }
.sw-card-icon.boot { background: rgba(168, 85, 247, 0.1); }
.sw-card-icon.security { background: rgba(34, 197, 94, 0.1); }
.sw-card-body { padding: 16px; }
.sw-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}
.sw-info-item:last-child { border-bottom: none; }
.sw-info-item span:first-child { color: #64748b; }
.sw-info-item span:last-child { color: #1e293b; font-weight: 500; }
.sw-mono {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
}
.sw-user-name { font-weight: 600 !important; color: #4f46e5 !important; }
.sw-boot-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}
.sw-boot-badge.normal { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.sw-boot-badge.other { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.sw-uptime-num { font-weight: 700; color: #6d28d9; font-size: 15px; }
.sw-security-grid { display: flex; gap: 24px; flex-wrap: wrap; }
.sw-security-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 10px;
}
.sw-security-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.sw-security-icon.enabled { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.sw-security-icon.disabled { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.sw-security-label { font-size: 13px; font-weight: 600; color: #1e293b; flex: 1; }
.sw-security-status { font-size: 12px; font-weight: 600; white-space: nowrap; }
.sw-security-status.enabled { color: #16a34a; }
.sw-security-status.disabled { color: #dc2626; }
@media (max-width: 768px) {
  .sw-grid { grid-template-columns: 1fr; }
  .sw-header { flex-direction: column; text-align: center; }
  .sw-security-grid { flex-direction: column; }
}

/* ══════════════════════════════════════════════
   Pretty View — rich data visualization
   ══════════════════════════════════════════════ */

/* Container */
.pv-container {
  padding: 16px 20px;
  max-height: 600px;
  overflow-y: auto;
  background: #fff;
}
.pv-container::-webkit-scrollbar { width: 6px; }
.pv-container::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* ── KV Grid ── */
.pv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}
.pv-grid-item {
  background: #fff;
  padding: 10px 16px;
}
.pv-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.pv-value {
  font-size: 0.88rem;
  color: #1e293b;
  word-break: break-word;
  line-height: 1.4;
}

/* ── Status indicators ── */
.pv-status { font-weight: 600; font-size: 0.85rem; }
.pv-ok { color: #16a34a; }
.pv-off { color: #dc2626; }

/* ── Badges ── */
.pv-badge-ip {
  display: inline-block;
  background: #eff6ff;
  color: #2563eb;
  padding: 1px 8px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 0.84rem;
  font-weight: 500;
}
.pv-badge-version {
  display: inline-block;
  background: #f0fdf4;
  color: #15803d;
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.84rem;
}
.pv-badge-count {
  display: inline-block;
  background: #f1f5f9;
  color: #64748b;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 600;
}

/* ── Paths & code ── */
.pv-path {
  background: #f5f3ff;
  color: #6d28d9;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.82rem;
  font-weight: 500;
  word-break: break-all;
}
.pv-data {
  color: #94a3b8;
  font-size: 0.78rem;
}

/* ── Numbers, dates, text ── */
.pv-number { color: #2563eb; font-weight: 600; }
.pv-date { color: #9333ea; font-weight: 500; }
.pv-link { color: #2563eb; text-decoration: underline; }
.pv-link:hover { color: #1d4ed8; }
.pv-text { color: #1e293b; }
.pv-empty { color: #94a3b8; }

/* ── Chip/processor info ── */
.pv-chip-info { color: #2563eb; font-weight: 700; font-size: 0.92rem; }
.pv-core-detail {
  display: inline-block;
  background: #eff6ff;
  color: #3b82f6;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-left: 4px;
}
.pv-mono {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 0.82rem;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
  color: #475569;
  word-break: break-all;
}

/* ── Tags (array of strings) ── */
.pv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0;
}
.pv-tag {
  background: #f1f5f9;
  color: #334155;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  transition: background 0.12s;
}
.pv-tag:hover { background: #e2e8f0; }

/* ── Sections (nested containers) ── */
.pv-section {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin: 12px 0;
  overflow: hidden;
}
.pv-section:first-child { margin-top: 0; }
.pv-section-header {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pv-section-count {
  background: #e2e8f0;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
}
.pv-section-body { padding: 12px 16px; }

/* ── Cards (array items) ── */
.pv-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin: 8px 0;
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.pv-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.pv-card:first-child { margin-top: 0; }
.pv-card-header {
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #1e293b;
  border-bottom: 1px solid #e2e8f0;
}
.pv-card-body { padding: 12px 16px; }

/* ── Table ── */
.pv-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.pv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.pv-table th {
  background: #f8fafc;
  padding: 8px 12px;
  text-align: left;
  font-weight: 700;
  color: #64748b;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.pv-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: top;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pv-table tbody tr:hover td { background: #f8fafc; }
.pv-table tbody tr:last-child td { border-bottom: none; }

/* ── List items ── */
.pv-list-item {
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
}
.pv-list-item:last-child { border-bottom: none; }

/* ── Empty state ── */
.pv-empty-state {
  text-align: center;
  padding: 24px;
  color: #94a3b8;
  font-style: italic;
  font-size: 0.88rem;
}

/* ── Responsive ── */
@media (max-width: 767px) {
  .pv-grid { grid-template-columns: 1fr; }
  .pv-grid-item { padding: 8px 12px; }
  .pv-section-body, .pv-card-body { padding: 8px 12px; }
  .pv-container { padding: 12px 14px; }
}

/* ── Dark mode: pretty view ── */
.theme-dark .pv-container,
[data-bs-theme="dark"] .pv-container { background: #1e293b; }

.theme-dark .pv-grid,
[data-bs-theme="dark"] .pv-grid { background: #334155; }

.theme-dark .pv-grid-item,
[data-bs-theme="dark"] .pv-grid-item { background: #1e293b; }

.theme-dark .pv-label,
[data-bs-theme="dark"] .pv-label { color: #94a3b8; }

.theme-dark .pv-value, .theme-dark .pv-text,
[data-bs-theme="dark"] .pv-value, [data-bs-theme="dark"] .pv-text { color: #e2e8f0; }

.theme-dark .pv-section,
[data-bs-theme="dark"] .pv-section { border-color: #334155; }

.theme-dark .pv-section-header,
[data-bs-theme="dark"] .pv-section-header {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border-color: #334155;
  color: #f1f5f9;
}

.theme-dark .pv-card,
[data-bs-theme="dark"] .pv-card { border-color: #334155; }

.theme-dark .pv-card-header,
[data-bs-theme="dark"] .pv-card-header {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border-color: #334155;
  color: #f1f5f9;
}

.theme-dark .pv-card-body,
[data-bs-theme="dark"] .pv-card-body { background: #1e293b; }

.theme-dark .pv-table-wrap,
[data-bs-theme="dark"] .pv-table-wrap { border-color: #334155; }

.theme-dark .pv-table th,
[data-bs-theme="dark"] .pv-table th {
  background: #0f172a;
  border-color: #334155;
  color: #94a3b8;
}

.theme-dark .pv-table td,
[data-bs-theme="dark"] .pv-table td {
  border-color: #334155;
  color: #e2e8f0;
}

.theme-dark .pv-table tbody tr:hover td,
[data-bs-theme="dark"] .pv-table tbody tr:hover td { background: #0f172a; }

.theme-dark .pv-tag,
[data-bs-theme="dark"] .pv-tag {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

.theme-dark .pv-path,
[data-bs-theme="dark"] .pv-path {
  background: #1e1b4b;
  color: #a78bfa;
}

.theme-dark .pv-badge-ip,
[data-bs-theme="dark"] .pv-badge-ip {
  background: #1e3a5f;
  color: #60a5fa;
}

.theme-dark .pv-badge-version,
[data-bs-theme="dark"] .pv-badge-version {
  background: #14532d;
  color: #4ade80;
}

.theme-dark .pv-section-count,
[data-bs-theme="dark"] .pv-section-count {
  background: #334155;
  color: #94a3b8;
}

.theme-dark .pv-badge-count,
[data-bs-theme="dark"] .pv-badge-count {
  background: #334155;
  color: #94a3b8;
}

/* ══════════════════════════════════════════════
   Sysctl View — Kernel Parameters
   ══════════════════════════════════════════════ */
.sc-container { max-width: 1200px; margin: 0 auto; padding: 4px 0; }

.sc-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #0f172a 0%, #134e4a 100%);
  border-radius: 16px;
  color: #fff;
  flex-wrap: wrap;
}
.sc-header-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 8px 32px rgba(20, 184, 166, 0.3);
  flex-shrink: 0;
}
.sc-header-info { flex: 1; min-width: 200px; }
.sc-header-info h1 { font-size: 24px; font-weight: 600; margin: 0 0 4px; }
.sc-header-sub { font-size: 14px; opacity: 0.8; }
.sc-header-search { flex: 0 0 260px; }
.sc-search {
  width: 100%;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.sc-search::placeholder { color: rgba(255, 255, 255, 0.5); }
.sc-search:focus { border-color: rgba(20, 184, 166, 0.6); background: rgba(255, 255, 255, 0.15); }

/* Namespace pills */
.sc-ns-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.sc-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid;
  border-radius: 20px;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.sc-pill:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.sc-pill-count {
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 7px;
  border-radius: 10px;
}

/* Namespace sections */
.sc-ns-section { margin-bottom: 12px; }
.sc-ns-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  list-style: none;
  transition: box-shadow 0.15s;
}
.sc-ns-header:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }
.sc-ns-header::-webkit-details-marker { display: none; }
.sc-ns-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.sc-ns-label { font-weight: 700; font-size: 0.95rem; color: #0f172a; }
.sc-ns-name {
  font-size: 0.78rem;
  color: #94a3b8;
  font-family: 'SF Mono', Monaco, monospace;
}
.sc-ns-count {
  margin-left: auto;
  background: #f1f5f9;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
}
.sc-ns-body { padding: 8px 0 0 16px; }

.sc-ns-section > details > summary::before {
  content: "▶";
  font-size: 0.6rem;
  color: #94a3b8;
  transition: transform 0.15s;
  display: inline-block;
  margin-right: 2px;
}
.sc-ns-section > details[open] > summary::before { transform: rotate(90deg); }

/* Sub-namespace sections */
.sc-sub-section {
  margin: 6px 0;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  overflow: hidden;
}
.sc-sub-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f8fafc;
  cursor: pointer;
  list-style: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}
.sc-sub-header::-webkit-details-marker { display: none; }
.sc-sub-header::before {
  content: "▶";
  font-size: 0.6rem;
  color: #94a3b8;
  transition: transform 0.15s;
}
details.sc-sub-section[open] > .sc-sub-header::before { transform: rotate(90deg); }
.sc-sub-name {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.78rem;
}
.sc-sub-count {
  margin-left: auto;
  background: #e2e8f0;
  padding: 1px 7px;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
}

/* KV grid */
.sc-kv-grid { display: grid; grid-template-columns: 1fr; gap: 0; padding: 4px 0; }
.sc-kv-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 4px 14px;
  font-size: 0.8rem;
  border-bottom: 1px solid #f8fafc;
  transition: background 0.1s;
}
.sc-kv-row:hover { background: #f8fafc; }
.sc-kv-row:last-child { border-bottom: none; }
.sc-key {
  flex: 0 0 auto;
  max-width: 50%;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.76rem;
  color: #64748b;
  word-break: break-all;
}
.sc-value {
  flex: 1;
  text-align: right;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.76rem;
  word-break: break-all;
}
.sc-val { color: #1e293b; }
.sc-val.sc-long { font-size: 0.72rem; color: #475569; }
.sc-num { color: #2563eb; font-weight: 600; }
.sc-raw { color: #94a3b8; font-size: 0.68rem; margin-left: 6px; }
.sc-hex { background: #f5f3ff; color: #7c3aed; padding: 1px 6px; border-radius: 3px; font-size: 0.74rem; }
.sc-bool { font-weight: 600; font-size: 0.78rem; }
.sc-bool.sc-on { color: #16a34a; }
.sc-bool.sc-off { color: #94a3b8; }

@media (max-width: 768px) {
  .sc-header { flex-direction: column; text-align: center; }
  .sc-header-search { flex: 1 1 100%; }
  .sc-ns-body { padding-left: 4px; }
}

/* ── Dark mode: sysctl view ── */
.theme-dark .sc-ns-header,
[data-bs-theme="dark"] .sc-ns-header {
  background: #1e293b;
  border-color: #334155;
}
.theme-dark .sc-ns-label,
[data-bs-theme="dark"] .sc-ns-label { color: #f1f5f9; }
.theme-dark .sc-ns-count,
[data-bs-theme="dark"] .sc-ns-count { background: #334155; color: #94a3b8; }
.theme-dark .sc-sub-section,
[data-bs-theme="dark"] .sc-sub-section { border-color: #334155; }
.theme-dark .sc-sub-header,
[data-bs-theme="dark"] .sc-sub-header { background: #0f172a; color: #94a3b8; }
.theme-dark .sc-kv-row,
[data-bs-theme="dark"] .sc-kv-row { border-color: #1e293b; }
.theme-dark .sc-kv-row:hover,
[data-bs-theme="dark"] .sc-kv-row:hover { background: #0f172a; }
.theme-dark .sc-key,
[data-bs-theme="dark"] .sc-key { color: #94a3b8; }
.theme-dark .sc-val,
[data-bs-theme="dark"] .sc-val { color: #e2e8f0; }
.theme-dark .sc-pill,
[data-bs-theme="dark"] .sc-pill { background: #1e293b; }

/* ══════════════════════════════════════════════
   I/O Kit Registry View
   ══════════════════════════════════════════════ */
.ir-container { max-width: 1200px; margin: 0 auto; padding: 4px 0; }

.ir-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4c1d95 100%);
  border-radius: 16px;
  color: #fff;
  flex-wrap: wrap;
}
.ir-header-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
  flex-shrink: 0;
}
.ir-header-info { flex: 1; min-width: 200px; }
.ir-header-info h1 { font-size: 24px; font-weight: 600; margin: 0 0 4px; }
.ir-header-sub { font-size: 14px; opacity: 0.8; }
.ir-header-search { flex: 0 0 260px; }
.ir-search {
  width: 100%;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.ir-search::placeholder { color: rgba(255, 255, 255, 0.5); }
.ir-search:focus { border-color: rgba(129, 140, 248, 0.6); background: rgba(255, 255, 255, 0.15); }

/* Class summary pills */
.ir-class-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.ir-cpill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  color: #475569;
}
.ir-cpill-count {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.68rem;
}

/* Tree */
.ir-tree {
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.ir-tree::-webkit-scrollbar { width: 6px; }
.ir-tree::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }

/* Rows */
.ir-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  list-style: none;
  transition: background 0.1s;
  border-bottom: 1px solid #f8fafc;
}
.ir-row:hover { background: #f8fafc; }
.ir-row::-webkit-details-marker { display: none; }
.ir-leaf { cursor: default; }

/* Node parts */
.ir-icon { font-size: 14px; flex-shrink: 0; width: 20px; text-align: center; }
.ir-name { font-weight: 600; color: #1e293b; white-space: nowrap; }
.ir-cls {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.7rem;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.ir-id {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.68rem;
  color: #94a3b8;
  white-space: nowrap;
}
.ir-flag {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}
.ir-active { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.ir-child-count {
  margin-left: auto;
  background: #f1f5f9;
  padding: 1px 7px;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
}
.ir-children {
  padding-left: 20px;
  border-left: 1px solid #e2e8f0;
  margin-left: 10px;
}

/* Disclosure triangles */
.ir-node > details > summary.ir-row::before {
  content: "▶";
  font-size: 0.55rem;
  color: #94a3b8;
  transition: transform 0.15s;
  display: inline-block;
  flex-shrink: 0;
  width: 10px;
}
.ir-node > details[open] > summary.ir-row::before { transform: rotate(90deg); }

/* Property display (lazy-loaded) */
.ir-props-slot { padding: 0; }
.ir-props {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 4px 12px 8px 32px;
  background: #fafbff;
  border-top: 1px solid #eef2ff;
}
.ir-prop {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 3px 8px;
  font-size: .76rem;
  border-bottom: 1px solid #f1f5f9;
  transition: background .1s;
}
.ir-prop:last-child { border-bottom: none; }
.ir-prop:hover { background: #eef2ff; }
.ir-prop-key {
  flex: 0 0 auto;
  max-width: 45%;
  font-family: "SF Mono", Monaco, monospace;
  font-size: .72rem;
  color: #6366f1;
  word-break: break-all;
  font-weight: 600;
}
.ir-prop-val {
  flex: 1;
  text-align: right;
  font-family: "SF Mono", Monaco, monospace;
  font-size: .72rem;
  word-break: break-all;
  color: #1e293b;
}
.ir-prop-badge {
  font-size: .62rem;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(99,102,241,.08);
  color: #6366f1;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .ir-header { flex-direction: column; text-align: center; }
  .ir-header-search { flex: 1 1 100%; }
  .ir-children { padding-left: 12px; margin-left: 6px; }
}

/* ── Dark mode: I/O Kit Registry ── */
.theme-dark .ir-tree,
[data-bs-theme="dark"] .ir-tree {
  background: #1e293b;
  border-color: #334155;
}
.theme-dark .ir-row,
[data-bs-theme="dark"] .ir-row { border-color: #1e293b; }
.theme-dark .ir-row:hover,
[data-bs-theme="dark"] .ir-row:hover { background: #0f172a; }
.theme-dark .ir-name,
[data-bs-theme="dark"] .ir-name { color: #f1f5f9; }
.theme-dark .ir-children,
[data-bs-theme="dark"] .ir-children { border-color: #334155; }
.theme-dark .ir-cpill,
[data-bs-theme="dark"] .ir-cpill { background: #1e293b; border-color: #334155; color: #94a3b8; }
.theme-dark .ir-props,
[data-bs-theme="dark"] .ir-props { background: #0f172a; border-color: #1e293b; }
.theme-dark .ir-prop,
[data-bs-theme="dark"] .ir-prop { border-color: #1e293b; }
.theme-dark .ir-prop:hover,
[data-bs-theme="dark"] .ir-prop:hover { background: #1e1b4b; }
.theme-dark .ir-prop-key,
[data-bs-theme="dark"] .ir-prop-key { color: #818cf8; }
.theme-dark .ir-prop-val,
[data-bs-theme="dark"] .ir-prop-val { color: #e2e8f0; }


/* ═══════════════════════════════════════════════════════════════════════
   I/O Kit Registry v2 - 3-Pane Explorer (IOBrowser-inspired)
   ═══════════════════════════════════════════════════════════════════════ */

/* Main container */
.ir-container { 
  max-width: 1400px; 
  margin: 0 auto; 
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* Toolbar */
.ir-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #fff;
  gap: 16px;
}
.ir-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.ir-logo { font-size: 22px; }
.ir-title { 
  font-size: 16px; 
  font-weight: 600;
  white-space: nowrap;
}
.ir-stats { 
  font-size: 12px; 
  opacity: 0.7;
  white-space: nowrap;
}
.ir-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ir-search {
  width: 220px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: all 0.15s;
}
.ir-search::placeholder { color: rgba(255,255,255,0.5); }
.ir-search:focus {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.4);
}
.ir-btn {
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.ir-btn:hover {
  background: rgba(255,255,255,0.2);
}

/* Main 3-pane layout */
.ir-main {
  display: flex;
  height: 600px;
  min-height: 400px;
}

/* Left sidebar - Categories */
.ir-sidebar {
  width: 200px;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
}
.ir-sidebar-header {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}
.ir-categories {
  overflow-y: auto;
  padding: 8px;
}
.ir-cat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 2px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s;
}
.ir-cat:hover {
  background: #f1f5f9;
}
.ir-cat-selected {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 500;
}
.ir-cat-icon { font-size: 14px; }
.ir-cat-count {
  margin-left: auto;
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(0,0,0,0.06);
  border-radius: 10px;
  color: #64748b;
}
.ir-cat-selected .ir-cat-count {
  background: rgba(37,99,235,0.15);
  color: #2563eb;
}

/* Center pane - Tree view */
.ir-tree-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  min-width: 0;
}
.ir-breadcrumb {
  padding: 10px 16px;
  font-size: 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ir-bc-root, .ir-bc-part {
  cursor: pointer;
  color: #3b82f6;
}
.ir-bc-root:hover, .ir-bc-part:hover {
  text-decoration: underline;
}
.ir-bc-sep {
  margin: 0 6px;
  color: #94a3b8;
}
.ir-tree {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  font-size: 13px;
}

/* Tree nodes */
.ir-node {
  position: relative;
}
.ir-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 8px;
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
  border-radius: 0;
}
.ir-row:hover {
  background: #f1f5f9;
}
.ir-row-selected {
  background: #eff6ff !important;
}
.ir-row-selected .ir-name {
  color: #2563eb;
  font-weight: 600;
}
.ir-disclosure {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #94a3b8;
}
.ir-disclosure::before {
  content: "▶";
  transition: transform 0.15s;
}
details[open] > summary .ir-disclosure::before {
  transform: rotate(90deg);
}
.ir-disclosure-empty {
  width: 16px;
}
.ir-icon {
  width: 18px;
  text-align: center;
  font-size: 13px;
  flex-shrink: 0;
}
.ir-name {
  font-weight: 500;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 60px;
}
.ir-cls {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "SF Mono", Monaco, monospace;
}
.ir-status {
  font-size: 10px;
  margin-left: auto;
}
.ir-status-active { color: #22c55e; }
.ir-status-registered { color: #94a3b8; }

.ir-children {
  margin-left: 18px;
  border-left: 1px solid #e2e8f0;
}
.ir-children .ir-row {
  padding-left: 12px;
}

/* Active/Registered indicators */
.ir-node-active > details > summary .ir-name,
.ir-node-active > .ir-row .ir-name {
  color: #16a34a;
}
.ir-node-registered > details > summary .ir-name,
.ir-node-registered > .ir-row .ir-name {
  color: #475569;
}

/* Right pane - Properties */
.ir-props-pane {
  width: 320px;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.ir-props-header {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}
.ir-props-content {
  flex: 1;
  overflow-y: auto;
}
.ir-props-empty {
  padding: 40px 20px;
  text-align: center;
  color: #94a3b8;
  font-style: italic;
}
.ir-props-info {
  padding: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
}
.ir-props-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.ir-props-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  word-break: break-word;
}
.ir-props-subtitle {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  font-family: "SF Mono", Monaco, monospace;
}
.ir-props-flags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ir-props-flags .ir-flag {
  font-size: 10px;
  padding: 2px 8px;
  background: rgba(148,163,184,0.15);
  border-radius: 4px;
  color: #64748b;
}
.ir-props-divider {
  height: 1px;
  background: #e2e8f0;
}

/* Properties list */
.ir-props-list {
  padding: 4px 0;
}
.ir-prop {
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.1s;
}
.ir-prop:hover {
  background: #f8fafc;
}
.ir-prop-selected {
  background: #eff6ff !important;
}
.ir-prop-key {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 3px;
}
.ir-prop-selected .ir-prop-key {
  color: #2563eb;
}
.ir-prop-val-preview {
  display: block;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Search highlight */
.ir-tree mark {
  background: #fef08a;
  color: #854d0e;
  padding: 0 2px;
  border-radius: 2px;
}

/* Dark mode */
.theme-dark .ir-container,
[data-bs-theme="dark"] .ir-container {
  background: #0f172a;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.theme-dark .ir-sidebar,
[data-bs-theme="dark"] .ir-sidebar,
.theme-dark .ir-tree-pane,
[data-bs-theme="dark"] .ir-tree-pane,
.theme-dark .ir-props-pane,
[data-bs-theme="dark"] .ir-props-pane {
  background: #1e293b;
  border-color: #334155;
}
.theme-dark .ir-sidebar-header,
[data-bs-theme="dark"] .ir-sidebar-header,
.theme-dark .ir-props-header,
[data-bs-theme="dark"] .ir-props-header {
  border-color: #334155;
  color: #94a3b8;
}
.theme-dark .ir-breadcrumb,
[data-bs-theme="dark"] .ir-breadcrumb {
  background: #0f172a;
  border-color: #334155;
}
.theme-dark .ir-cat:hover,
[data-bs-theme="dark"] .ir-cat:hover {
  background: #334155;
}
.theme-dark .ir-cat-selected,
[data-bs-theme="dark"] .ir-cat-selected {
  background: rgba(59,130,246,0.2);
}
.theme-dark .ir-row:hover,
[data-bs-theme="dark"] .ir-row:hover {
  background: #334155;
}
.theme-dark .ir-row-selected,
[data-bs-theme="dark"] .ir-row-selected {
  background: rgba(59,130,246,0.2) !important;
}
.theme-dark .ir-name,
[data-bs-theme="dark"] .ir-name {
  color: #f1f5f9;
}
.theme-dark .ir-cls,
[data-bs-theme="dark"] .ir-cls {
  color: #94a3b8;
}
.theme-dark .ir-children,
[data-bs-theme="dark"] .ir-children {
  border-color: #334155;
}
.theme-dark .ir-props-info,
[data-bs-theme="dark"] .ir-props-info {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-color: #334155;
}
.theme-dark .ir-props-title,
[data-bs-theme="dark"] .ir-props-title {
  color: #f1f5f9;
}
.theme-dark .ir-prop,
[data-bs-theme="dark"] .ir-prop {
  border-color: #334155;
}
.theme-dark .ir-prop:hover,
[data-bs-theme="dark"] .ir-prop:hover {
  background: #334155;
}
.theme-dark .ir-prop-key,
[data-bs-theme="dark"] .ir-prop-key {
  color: #f1f5f9;
}
.theme-dark .ir-tree mark,
[data-bs-theme="dark"] .ir-tree mark {
  background: #854d0e;
  color: #fef08a;
}

/* Responsive */
@media (max-width: 1100px) {
  .ir-sidebar { width: 160px; }
  .ir-props-pane { width: 260px; }
}
@media (max-width: 900px) {
  .ir-main {
    flex-direction: column;
    height: auto;
    min-height: 500px;
  }
  .ir-sidebar {
    width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  .ir-tree-pane {
    height: 400px;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  .ir-props-pane {
    width: 100%;
    height: 300px;
  }
}
