@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #050816;
  --bg-soft: #070b14;
  --panel: #0b1020;
  --panel-2: #0d1320;
  --panel-3: #111a2c;
  --border: #1c2740;
  --border-soft: #172033;
  --text: #e2e8f0;
  --text-soft: #cbd5e1;
  --muted: #64748b;
  --muted-2: #7c8aa5;

  --cyan: #00d4ff;
  --cyan-soft: #67c7ff;
  --blue: #38bdf8;
  --blue-2: #3b82f6;
  --violet: #7c3aed;
  --green: #10b981;
  --amber: #f59e0b;
  --pink: #f43f5e;

  --shadow-lg: 0 14px 34px rgba(0, 0, 0, 0.42);
  --shadow-glow-cyan: 0 0 0 1px rgba(0, 212, 255, 0.14), 0 0 18px rgba(0, 212, 255, 0.12);
  --shadow-glow-blue: 0 0 0 1px rgba(59, 130, 246, 0.14), 0 0 18px rgba(59, 130, 246, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-soft);
  color: var(--text);
  overflow: hidden;
}

.page {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* Sidebar */
.sidebar {
  width: 320px;
  background: linear-gradient(180deg, #0d1320 0%, #0b1020 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
}

.sidebar-brand {
  padding: 18px 20px 10px;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.03), rgba(0, 212, 255, 0));
}

.sidebar-brand h1 {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.02em;
}

.muted {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-soft);
  background: #0a0f1c;
}

.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted-2);
  padding: 12px 10px;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.tab-btn:hover {
  color: var(--text-soft);
  background: #0f1628;
}

.tab-btn.active {
  color: var(--cyan-soft);
  border-bottom-color: var(--blue);
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.08), rgba(17, 26, 44, 0.9));
  box-shadow: inset 0 -1px 0 rgba(0, 212, 255, 0.3);
}

/* Section */
.sidebar-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px 14px 10px;
}

.section-label {
  font-size: 0.72rem;
  color: #6b7a96;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  font-family: "Space Mono", monospace;
}

#views {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
}

.view-btn {
  display: block;
  width: 100%;
  padding: 12px 14px;
  background: linear-gradient(180deg, #131c2f 0%, #10182b 100%);
  color: var(--text-soft);
  border: 1px solid #26344f;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.94rem;
  text-align: left;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease;
}

.view-btn:hover {
  background: linear-gradient(180deg, #1a2840 0%, #15233a 100%);
  color: #f8fafc;
  border-color: #39527c;
  box-shadow: var(--shadow-glow-blue);
  transform: translateY(-1px);
}

.view-btn.active {
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.12), rgba(59, 130, 246, 0.10));
  color: #bfe7ff;
  border-color: var(--blue-2);
  font-weight: 600;
  box-shadow: var(--shadow-glow-cyan);
}

/* Detail card */
.detail-card {
  margin: 14px;
  margin-top: 10px;
  background:
    linear-gradient(180deg, rgba(11, 16, 32, 0.98), rgba(9, 14, 28, 0.98));
  border: 1px solid rgba(0, 212, 255, 0.24);
  border-radius: 12px;
  padding: 16px;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(0, 212, 255, 0.08);
  backdrop-filter: blur(4px);
}

.detail-card.hidden {
  display: none;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail-kind {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan-soft);
  margin-bottom: 6px;
  font-family: "Space Mono", monospace;
}

.detail-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.detail-close {
  border: none;
  background: transparent;
  color: var(--muted-2);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s ease, transform 0.15s ease;
}

.detail-close:hover {
  color: #f8fafc;
  transform: scale(1.05);
}

.detail-desc {
  margin-top: 12px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #9aa8bf;
}

.detail-stats {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #1a2740;
}

.detail-stat-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cyan-soft);
  line-height: 1.3;
  word-break: break-word;
  max-width: 100px;
  font-family: "Space Mono", monospace;
}

.detail-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  margin-top: 4px;
  font-family: "Space Mono", monospace;
}

.detail-meta {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  color: #8ea0bd;
}

.detail-row span:first-child {
  color: var(--muted);
  min-width: 64px;
}

.detail-row span:last-child {
  text-align: right;
  color: #d7e1f0;
  word-break: break-word;
}

/* Main content */
.content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(rgba(20, 33, 61, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 33, 61, 0.12) 1px, transparent 1px),
    radial-gradient(circle at top, rgba(0, 212, 255, 0.06), transparent 28%),
    #050816;
  background-size: 40px 40px, 40px 40px, auto, auto;
}

.topbar {
  height: 58px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 15, 28, 0.92);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  backdrop-filter: blur(6px);
}

#view-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.01em;
}

#graph {
  flex: 1;
  width: 100%;
  height: calc(100vh - 58px);
  background: transparent;
}

/* Scrollbar */
#views::-webkit-scrollbar {
  width: 8px;
}

#views::-webkit-scrollbar-track {
  background: transparent;
}

#views::-webkit-scrollbar-thumb {
  background: #24324a;
  border-radius: 8px;
}

#views::-webkit-scrollbar-thumb:hover {
  background: #324667;
}

/* Optional SVG helper classes for D3 / Neo4j graph styling */
.graph-node-glow {
  filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.35));
}

.graph-node-ring {
  fill: none;
  stroke-width: 1.25;
  opacity: 0.25;
}

.graph-node-core {
  stroke-width: 2;
}

.graph-link {
  opacity: 0.4;
  transition: opacity 0.18s ease, stroke-width 0.18s ease;
}

.graph-link.is-dimmed {
  opacity: 0.08;
}

.graph-link.is-active {
  opacity: 0.95;
  stroke-width: 2;
}

.graph-label-mono {
  font-family: "Space Mono", monospace;
  letter-spacing: 0.04em;
}

/* Detail card actions */
.detail-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

.detail-action-btn {
  border: 1px solid #2c4d7a;
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.10), rgba(59, 130, 246, 0.08));
  color: #bfe7ff;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.10);
}

.detail-action-btn:hover {
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.16), rgba(59, 130, 246, 0.12));
  border-color: #4f8fd6;
  transform: translateY(-1px);
}

.hidden {
  display: none !important;
}

.tab-btn.disabled,
.tab-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: rgba(148, 163, 184, 0.18) !important;
  color: #64748b !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.35)) !important;
  box-shadow: none !important;
}

.tab-btn.disabled:hover,
.tab-btn.disabled:focus,
.tab-btn.disabled:active,
.tab-btn:disabled:hover,
.tab-btn:disabled:focus,
.tab-btn:disabled:active {
  border-color: rgba(148, 163, 184, 0.18) !important;
  color: #64748b !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.35)) !important;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
}

.tab-btn.disabled:hover {
  border-color: rgba(148, 163, 184, 0.18);
  color: #64748b;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.35));
  transform: none;
}
.vis-tooltip {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
div.vis-tooltip {
  display: none !important;
}
.vis-tooltip {
  display: none !important;
}
