main {
    max-width: none;
    padding: 0 !important;
    overflow: hidden;
}

.nodes-page {
    position: relative;
    height: 100vh;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    overflow: hidden;
    z-index: 0;
}

.nodes-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.nodes-shell {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 12px;
    width: min(420px, calc(100vw - 32px));
    margin: 24px auto 80px 16px;
    padding-bottom: 24px;
}

.nodes-hero-panel,
.nodes-inspector,
.inspector-body,
.inspector-actions {
    display: grid;
}

.nodes-hero-panel {
    gap: 14px;
}

.nodes-hero .eyebrow {
    font-family: "Space Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--text);
}

.nodes-hero h2,
.nodes-inspector h3 {
    margin: 0;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.nodes-hero h2 {
    font-size: 34px;
    letter-spacing: 0.4px;
}

.nodes-inspector h3 {
    font-size: 20px;
}

.nodes-hero p {
    margin: 0;
    color: var(--muted);
    max-width: 780px;
    font-size: 15px;
    line-height: 1.6;
}

.nodes-controls,
.nodes-legend,
.canvas-toolbar,
.canvas-actions {
    display: flex;
    flex-wrap: wrap;
}

.nodes-controls {
    gap: 12px;
    align-items: center;
    margin-top: 6px;
}

.nodes-control {
    display: grid;
    gap: 6px;
    min-width: 160px;
}

.nodes-control label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
}

.nodes-control select {
    width: 100%;
}

.nodes-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel-alt);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text);
    cursor: pointer;
}

.nodes-toggle.active {
    border-color: rgba(47, 129, 247, 0.6);
    box-shadow: 0 0 0 2px rgba(47, 129, 247, 0.2);
    color: #dbeafe;
}

.nodes-legend {
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
}

.nodes-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--panel-alt);
    border: 1px solid var(--border);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
}

.legend-system {
    background: #3b82f6;
}

.legend-talkgroup {
    background: #14b8a6;
}

.legend-radio {
    background: #f97316;
}

.canvas-toolbar {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.canvas-status,
.inspector-hint {
    font-size: 12px;
    color: var(--muted);
}

.canvas-status {
    font-size: 13px;
}

.canvas-actions {
    gap: 8px;
}

.canvas-body {
    position: absolute;
    inset: 0;
    border-radius: 0;
    border: none;
    background:
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.18), transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(20, 184, 166, 0.14), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(249, 115, 22, 0.15), transparent 45%),
        linear-gradient(160deg, rgba(10, 14, 20, 0.95), rgba(16, 22, 32, 0.95));
    overflow: hidden;
}

body.theme-light .canvas-body {
    background:
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.18), transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(20, 184, 166, 0.16), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(249, 115, 22, 0.18), transparent 45%),
        linear-gradient(160deg, rgba(248, 250, 252, 0.98), rgba(226, 232, 240, 0.95));
}

#nodesGraph {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.canvas-empty {
    position: absolute;
    left: 18px;
    top: 16px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.35);
    font-size: 12px;
    color: #e2e8f0;
    backdrop-filter: blur(calc(var(--liquid-glass-blur) * 0.3));
}

body.theme-light .canvas-empty {
    background: rgba(255, 255, 255, 0.85);
    color: #1e293b;
    border-color: rgba(148, 163, 184, 0.5);
}

.link-line {
    stroke: rgba(148, 163, 184, 0.55);
    stroke-width: 1px;
    opacity: 0.65;
}

.link-line.is-strong {
    opacity: 0.85;
}

.node-circle {
    stroke: rgba(255, 255, 255, 0.55);
    stroke-width: 1px;
    cursor: pointer;
    filter: drop-shadow(0 6px 16px rgba(15, 23, 42, 0.35));
}

.node-circle.is-selected {
    stroke: #f8fafc;
    stroke-width: 2px;
    filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.35));
}

.node-label {
    font-family: "Space Mono", monospace;
    font-size: 11px;
    fill: #f8fafc;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    pointer-events: none;
    text-anchor: middle;
    dominant-baseline: middle;
    text-rendering: geometricPrecision;
}

body.theme-light .node-label {
    fill: #0f172a;
}

.nodes-inspector {
    gap: 16px;
    align-content: start;
}

.inspector-body {
    gap: 12px;
    font-size: 14px;
    color: var(--text);
}

.inspector-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
    margin-bottom: 4px;
}

.inspector-value {
    font-weight: 600;
}

.inspector-actions {
    gap: 8px;
}

.inspector-hint {
    line-height: 1.4;
}

@media (max-width: 720px) {
    .nodes-hero h2 {
        font-size: 28px;
    }

    .nodes-shell {
        margin: 16px auto 40px;
    }

    .nodes-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .nodes-toggle {
        justify-content: space-between;
    }
}
