.nav-link {
    background-color: transparent;
    border: 1px solid #606060;
    color: #ffffff;
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link:hover {
    border-color: #909090;
    background-color: #1a1a1a;
}

.notes-status {
    color: #000000;
    font-size: 0.9rem;
    text-align: right;
}

.auth-section-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.notes-auth-container {
    min-height: 40px;
}

.notes-workspace {
    --notes-main-width: 64%;
    display: grid;
    grid-template-columns: minmax(460px, var(--notes-main-width)) 12px minmax(280px, 1fr);
    gap: 0;
    padding: 18px;
    background-color: #0d0d0d;
    flex: 1;
    min-height: 0;
}

.notes-main {
    --files-panel-height: 30%;
    display: grid;
    grid-template-rows: minmax(160px, var(--files-panel-height)) 12px minmax(360px, 1fr);
    min-height: 0;
}

.notes-panel {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 14px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.files-panel {
    border-right: 0;
    border-bottom: 0;
}

.editor-panel {
    border-right: 0;
}

.graph-panel {
    min-height: 0;
}

.notes-panel h2 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}

.panel-subtitle {
    color: #9c9c9c;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.panel-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.collapse-toggle {
    background: transparent;
    color: #f1f1f1;
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.collapse-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.55);
}

.files-panel-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    margin-top: 10px;
}

.files-panel.collapsed {
    padding-bottom: 10px;
}

.files-panel.collapsed .files-panel-body {
    display: none;
}

.notes-input {
    width: 100%;
    border: 1px solid #3d3d3d;
    background: #171717;
    color: #ffffff;
    padding: 10px;
    margin-bottom: 10px;
}

.file-list {
    flex: 1;
    overflow: auto;
    border: 1px solid #2f2f2f;
    background: #111111;
}

.file-item {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #1f1f1f;
    color: #d5d5d5;
    padding: 10px;
    font-size: 0.9rem;
    cursor: pointer;
}

.file-item:hover {
    background: #1c1c1c;
}

.file-item.active {
    background: #ffffff;
    color: #000000;
}

.note-renderer {
    width: 100%;
    flex: 1;
    min-height: 0;
    background: #101010;
    color: #e0e0e0;
    border: 1px solid #404040;
    font-size: 0.92rem;
    line-height: 1.5;
    overflow: auto;
}

.notes-empty {
    color: #8a8a8a;
    font-style: italic;
    padding: 18px;
}

.rendered-note-meta {
    color: #8b8b8b;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.graph-wrapper {
    flex: 1;
    border: 1px solid #353535;
    background: radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.09), rgba(0, 0, 0, 0.9));
    min-height: 0;
    overflow: hidden;
}

.graph-toolbar {
    border: 1px solid #2c2c2c;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.graph-query-row,
.graph-layout-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.graph-query-input {
    margin: 0;
    flex: 1;
    min-width: 220px;
}

.layout-label {
    font-size: 0.8rem;
    color: #b5b5b5;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-right: 4px;
}

.graph-layout-btn.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.relationship-graph {
    width: 100%;
    height: 100%;
}

.edge-line {
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 1;
}

.edge-line.muted {
    stroke: rgba(255, 255, 255, 0.08);
}

.graph-node {
    fill: #0f0f0f;
    stroke: #d9d9d9;
    stroke-width: 1.2;
    cursor: pointer;
}

.graph-node.active {
    fill: #ffffff;
    stroke: #ffffff;
}

.graph-node.type-node {
    fill: rgba(255, 255, 255, 0.12);
    stroke: #ffffff;
    stroke-width: 1.4;
}

.graph-node.matched {
    fill: #ffffff;
    stroke: #ffffff;
}

.graph-node.muted {
    opacity: 0.35;
}

.node-label {
    fill: #d6d6d6;
    font-size: 11px;
    font-family: Helvetica, Arial, sans-serif;
    pointer-events: none;
}

.node-label.active {
    fill: #000000;
}

.node-label.matched {
    fill: #ffffff;
    font-weight: 700;
}

.node-label.muted {
    opacity: 0.45;
}

.pane-splitter {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
    position: relative;
}

.pane-splitter::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: rgba(255, 255, 255, 0.06);
}

.pane-splitter.vertical {
    cursor: col-resize;
}

.pane-splitter.horizontal {
    cursor: row-resize;
}

.pane-splitter.dragging,
.pane-splitter:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.18));
}

@media (max-width: 1100px) {
    .notes-workspace {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 16px;
    }

    .notes-main {
        grid-template-rows: minmax(140px, auto) 8px minmax(360px, 1fr);
    }

    .notes-panel {
        border-right: 1px solid rgba(255, 255, 255, 0.2);
    }

    .graph-panel {
        min-height: 420px;
    }

    .pane-splitter.vertical {
        display: none;
    }
}

@media (max-width: 900px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .notes-workspace,
    .notes-main {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .pane-splitter {
        display: none;
    }

    .notes-panel,
    .graph-panel,
    .note-renderer,
    .graph-wrapper {
        min-height: 320px;
    }
}