/* Graph View Styles */

/* ===== GRAPH PANEL OVERLAY ===== */
.graph-panel {
    position: fixed;
    top: 36px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 900;
    display: none;
    flex-direction: column;
}

.graph-panel.active {
    display: flex;
}

/* ===== GRAPH HEADER ===== */
.graph-header {
    height: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border-bottom: 1px solid var(--ui-chrome);
    background: var(--bg);
    gap: 8px;
}

.graph-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.graph-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--fg);
    cursor: pointer;
    border-radius: 6px;
    transition: background var(--transition-fast);
}

.graph-close-btn:hover {
    background: var(--ui-chrome);
}

.graph-title {
    font-family: var(--font-family-sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--fg);
}

.graph-header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.graph-mode-toggle {
    display: flex;
    background: var(--ui-chrome);
    border-radius: 6px;
    padding: 2px;
}

.graph-mode-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--fg-secondary);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family-sans);
}

.graph-mode-btn.active {
    background: var(--bg);
    color: var(--fg);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.graph-mode-btn:hover:not(.active) {
    color: var(--fg);
}

.graph-header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.graph-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--fg-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.graph-btn:hover {
    background: var(--ui-chrome);
    color: var(--fg);
}

.graph-btn.active {
    background: var(--accent);
    color: var(--accent-fg);
}

/* ===== BREADCRUMBS ===== */
.graph-breadcrumbs {
    display: none;
    align-items: center;
    padding: 6px 12px;
    background: var(--ui-chrome);
    border-bottom: 1px solid var(--ui-chrome);
    font-family: var(--font-family-sans);
    font-size: 12px;
    color: var(--fg-secondary);
    overflow-x: auto;
    white-space: nowrap;
}

.graph-breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.graph-breadcrumb-item.current {
    color: var(--fg);
    font-weight: 500;
}

.graph-breadcrumb-separator {
    color: var(--fg-tertiary);
    margin: 0 4px;
}

.graph-breadcrumb-icon {
    font-size: 10px;
}

/* ===== GRAPH SEARCH ===== */
.graph-search-container {
    position: relative;
    width: 200px;
}

.graph-search {
    width: 100%;
    height: 32px;
    padding: 0 12px 0 32px;
    font-size: 13px;
    font-family: var(--font-family-sans);
    background: var(--ui-chrome);
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--fg);
    outline: none;
    transition: all var(--transition-fast);
}

.graph-search:focus {
    background: var(--bg);
    border-color: var(--accent);
}

.graph-search::placeholder {
    color: var(--fg-tertiary);
}

.graph-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--fg-tertiary);
    pointer-events: none;
}

/* ===== CANVAS CONTAINER ===== */
.graph-canvas-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.graph-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
}

.graph-canvas:active {
    cursor: grabbing;
}

.graph-canvas.dragging-node {
    cursor: grabbing;
}

/* ===== TOOLTIP ===== */
.graph-tooltip {
    position: fixed;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--ui-chrome);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s, transform 0.15s;
    max-width: 250px;
}

.graph-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.graph-tooltip-title {
    font-family: var(--font-family-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.graph-tooltip-meta {
    font-family: var(--font-family-sans);
    font-size: 11px;
    color: var(--fg-secondary);
}

.graph-tooltip-metrics {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--ui-chrome);
    font-family: var(--font-family-sans);
    font-size: 10px;
    color: var(--fg-tertiary);
}

.graph-tooltip-metrics div {
    margin-bottom: 2px;
}

/* ===== CONTEXT MENU ===== */
.graph-context-menu {
    position: fixed;
    min-width: 180px;
    background: var(--bg);
    border: 1px solid var(--ui-chrome);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 1001;
    display: none;
    padding: 4px;
}

.graph-context-menu.visible {
    display: block;
}

.graph-context-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-family: var(--font-family-sans);
    font-size: 13px;
    color: var(--fg);
    cursor: pointer;
    border-radius: 4px;
    transition: background var(--transition-fast);
}

.graph-context-item:hover {
    background: var(--ui-chrome);
}

.graph-context-item svg {
    color: var(--fg-secondary);
    flex-shrink: 0;
}

.graph-context-separator {
    height: 1px;
    background: var(--ui-chrome);
    margin: 4px 8px;
}

/* ===== SETTINGS PANEL ===== */
.graph-settings {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 280px;
    max-height: calc(100% - 16px);
    background: var(--bg);
    border: 1px solid var(--ui-chrome);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    display: none;
    z-index: 10;
    overflow: hidden;
}

.graph-settings.active {
    display: flex;
    flex-direction: column;
}

.graph-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--ui-chrome);
    flex-shrink: 0;
}

.graph-settings-title {
    font-family: var(--font-family-sans);
    font-size: 12px;
    font-weight: 600;
    color: var(--fg);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.graph-settings-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--fg-secondary);
    cursor: pointer;
    border-radius: 4px;
}

.graph-settings-close:hover {
    background: var(--ui-chrome);
    color: var(--fg);
}

.graph-settings-body {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
}

.graph-settings-section {
    margin-bottom: 16px;
}

.graph-settings-section:last-child {
    margin-bottom: 0;
}

.graph-settings-section-title {
    font-family: var(--font-family-sans);
    font-size: 11px;
    font-weight: 600;
    color: var(--fg-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.graph-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.graph-setting-row:last-child {
    margin-bottom: 0;
}

.graph-setting-label {
    font-family: var(--font-family-sans);
    font-size: 12px;
    color: var(--fg);
}

.graph-setting-slider {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--ui-chrome);
    border-radius: 2px;
    outline: none;
}

.graph-setting-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
}

.graph-setting-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.graph-setting-toggle {
    position: relative;
    width: 36px;
    height: 20px;
    background: var(--ui-chrome);
    border-radius: 10px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.graph-setting-toggle.active {
    background: var(--accent);
}

.graph-setting-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition-fast);
}

.graph-setting-toggle.active::after {
    transform: translateX(16px);
}

/* ===== CUSTOM GROUPS ===== */
.custom-groups-list {
    margin-bottom: 8px;
}

.custom-group-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--ui-chrome);
    border-radius: 4px;
    margin-bottom: 4px;
}

.custom-group-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.custom-group-name {
    flex: 1;
    font-family: var(--font-family-sans);
    font-size: 12px;
    color: var(--fg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-group-delete {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--fg-tertiary);
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
}

.custom-group-delete:hover {
    background: var(--bg);
    color: var(--fg);
}

.graph-add-group-btn {
    width: 100%;
    padding: 8px;
    font-family: var(--font-family-sans);
    font-size: 12px;
    color: var(--fg-secondary);
    background: none;
    border: 1px dashed var(--ui-chrome);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.graph-add-group-btn:hover {
    background: var(--ui-chrome);
    color: var(--fg);
}

/* ===== EXCLUDE PATTERNS ===== */
.exclude-patterns-list {
    margin-bottom: 8px;
}

.exclude-pattern-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--ui-chrome);
    border-radius: 4px;
    margin-bottom: 4px;
}

.exclude-pattern-text {
    flex: 1;
    font-family: var(--font-family-sans);
    font-size: 12px;
    color: var(--fg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exclude-pattern-delete {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--fg-tertiary);
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
}

.exclude-pattern-delete:hover {
    background: var(--bg);
    color: var(--fg);
}

.graph-exclude-input-row {
    display: flex;
    gap: 4px;
}

.graph-exclude-input {
    flex: 1;
    padding: 6px 8px;
    font-family: var(--font-family-sans);
    font-size: 12px;
    background: var(--bg);
    border: 1px solid var(--ui-chrome);
    border-radius: 4px;
    color: var(--fg);
    outline: none;
}

.graph-exclude-input:focus {
    border-color: var(--accent);
}

.graph-exclude-add-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: var(--accent-fg);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.graph-exclude-add-btn:hover {
    opacity: 0.9;
}

/* ===== SAVED STATES ===== */
.saved-states-list {
    margin-bottom: 8px;
    max-height: 120px;
    overflow-y: auto;
}

.saved-state-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    background: var(--ui-chrome);
    border-radius: 4px;
    margin-bottom: 4px;
}

.saved-state-name {
    flex: 1;
    font-family: var(--font-family-sans);
    font-size: 12px;
    color: var(--fg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saved-state-load {
    padding: 4px 8px;
    font-family: var(--font-family-sans);
    font-size: 10px;
    background: var(--bg);
    color: var(--fg-secondary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.saved-state-load:hover {
    color: var(--fg);
}

.graph-save-state-btn {
    width: 100%;
    padding: 8px;
    font-family: var(--font-family-sans);
    font-size: 12px;
    color: var(--accent-fg);
    background: var(--accent);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.graph-save-state-btn:hover {
    opacity: 0.9;
}

/* ===== METRICS PANEL ===== */
.graph-metrics-panel {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 200px;
    background: var(--bg);
    border: 1px solid var(--ui-chrome);
    border-radius: 8px;
    padding: 12px;
    display: none;
    z-index: 10;
}

.graph-metrics-panel.active {
    display: block;
}

.graph-metrics-title {
    font-family: var(--font-family-sans);
    font-size: 11px;
    font-weight: 600;
    color: var(--fg-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.graph-metrics-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-family-sans);
    font-size: 12px;
    color: var(--fg);
    margin-bottom: 6px;
}

.graph-metrics-list {
    margin: 8px 0;
}

.graph-metrics-item {
    padding: 4px 8px;
    font-family: var(--font-family-sans);
    font-size: 11px;
    color: var(--fg-secondary);
    background: var(--ui-chrome);
    border-radius: 4px;
    margin-bottom: 2px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.graph-metrics-item:hover {
    color: var(--fg);
}

/* ===== LEGEND ===== */
.graph-legend {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: var(--bg);
    border: 1px solid var(--ui-chrome);
    border-radius: 8px;
    padding: 10px 12px;
    max-width: 200px;
    max-height: 200px;
    overflow-y: auto;
}

.graph-legend-title {
    font-family: var(--font-family-sans);
    font-size: 11px;
    font-weight: 600;
    color: var(--fg-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.graph-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-family: var(--font-family-sans);
    font-size: 12px;
    color: var(--fg);
}

.graph-legend-item:last-child {
    margin-bottom: 0;
}

.graph-legend-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===== STATS DISPLAY ===== */
.graph-stats {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-family: var(--font-family-sans);
    font-size: 11px;
    color: var(--fg-tertiary);
    background: var(--bg);
    border: 1px solid var(--ui-chrome);
    border-radius: 6px;
    padding: 6px 10px;
}

/* ===== EMPTY STATE ===== */
.graph-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--fg-secondary);
    font-family: var(--font-family-sans);
}

.graph-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    opacity: 0.5;
}

.graph-empty-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--fg);
}

.graph-empty-text {
    font-size: 13px;
}

/* ===== LOADING STATE ===== */
.graph-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.graph-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--ui-chrome);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: graph-spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes graph-spin {
    to { transform: rotate(360deg); }
}

.graph-loading-text {
    font-family: var(--font-family-sans);
    font-size: 13px;
    color: var(--fg-secondary);
}

/* ===== DEPTH SLIDER (Local Graph) ===== */
.graph-depth-control {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--ui-chrome);
    border-radius: 6px;
}

.graph-depth-control.visible {
    display: flex;
}

.graph-depth-label {
    font-family: var(--font-family-sans);
    font-size: 12px;
    color: var(--fg-secondary);
    white-space: nowrap;
}

.graph-depth-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg);
    border-radius: 2px;
    outline: none;
}

.graph-depth-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
}

.graph-depth-value {
    font-family: var(--font-family-sans);
    font-size: 12px;
    font-weight: 600;
    color: var(--fg);
    min-width: 16px;
    text-align: center;
}

/* ===== MODAL ===== */
.graph-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

.graph-modal-content {
    background: var(--bg);
    border: 1px solid var(--ui-chrome);
    border-radius: 12px;
    width: 320px;
    max-width: 90%;
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.graph-modal-header {
    padding: 16px;
    font-family: var(--font-family-sans);
    font-size: 16px;
    font-weight: 600;
    color: var(--fg);
    border-bottom: 1px solid var(--ui-chrome);
}

.graph-modal-body {
    padding: 16px;
}

.graph-modal-row {
    margin-bottom: 12px;
}

.graph-modal-row:last-child {
    margin-bottom: 0;
}

.graph-modal-row label {
    display: block;
    font-family: var(--font-family-sans);
    font-size: 12px;
    color: var(--fg-secondary);
    margin-bottom: 4px;
}

.graph-modal-row input,
.graph-modal-row select {
    width: 100%;
    padding: 8px 12px;
    font-family: var(--font-family-sans);
    font-size: 13px;
    background: var(--ui-chrome);
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--fg);
    outline: none;
}

.graph-modal-row input:focus,
.graph-modal-row select:focus {
    background: var(--bg);
    border-color: var(--accent);
}

.graph-modal-row input[type="color"] {
    height: 36px;
    padding: 4px;
    cursor: pointer;
}

.graph-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid var(--ui-chrome);
}

.graph-modal-btn {
    padding: 8px 16px;
    font-family: var(--font-family-sans);
    font-size: 13px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.graph-modal-btn.cancel {
    background: var(--ui-chrome);
    color: var(--fg);
}

.graph-modal-btn.confirm {
    background: var(--accent);
    color: var(--accent-fg);
}

.graph-modal-btn:hover {
    opacity: 0.9;
}

/* ===== FILTER CONTROLS ===== */
.graph-filters {
    display: flex;
    align-items: center;
    gap: 8px;
}

.graph-filter-btn {
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 500;
    color: var(--fg-secondary);
    background: var(--ui-chrome);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-family-sans);
    transition: all var(--transition-fast);
}

.graph-filter-btn:hover {
    color: var(--fg);
}

.graph-filter-btn.active {
    background: var(--accent);
    color: var(--accent-fg);
}

/* ===== LINK WIZARD ===== */
.graph-wizard-btn {
    position: relative;
}

.graph-wizard-btn::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.graph-wizard-btn.has-suggestions::after {
    opacity: 1;
}

.graph-link-wizard {
    position: absolute;
    top: 44px;
    right: 8px;
    width: 320px;
    max-height: calc(100% - 60px);
    background: var(--bg);
    border: 1px solid var(--ui-chrome);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 50;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.graph-link-wizard.active {
    display: flex;
}

.graph-wizard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--ui-chrome);
    background: var(--ui-chrome);
}

.graph-wizard-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-family-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--fg);
}

.graph-wizard-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--fg-secondary);
    cursor: pointer;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.graph-wizard-close:hover {
    background: var(--bg);
    color: var(--fg);
}

.graph-wizard-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.graph-wizard-section {
    margin-bottom: 16px;
}

.graph-wizard-section:last-child {
    margin-bottom: 0;
}

.graph-wizard-section-title {
    font-family: var(--font-family-sans);
    font-size: 12px;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 4px;
}

.graph-wizard-section-desc {
    font-family: var(--font-family-sans);
    font-size: 11px;
    color: var(--fg-tertiary);
    margin-bottom: 8px;
}

.graph-wizard-orphans,
.graph-wizard-suggestions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.graph-wizard-note-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: var(--ui-chrome);
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.graph-wizard-note-item:hover {
    background: var(--accent);
}

.graph-wizard-note-item:hover .graph-wizard-note-title {
    color: var(--accent-fg);
}

.graph-wizard-note-title {
    font-family: var(--font-family-sans);
    font-size: 12px;
    color: var(--fg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.graph-wizard-link-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: none;
    color: var(--accent);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.graph-wizard-link-btn:hover {
    background: var(--accent);
    color: var(--accent-fg);
}

.graph-wizard-empty {
    padding: 16px;
    text-align: center;
    font-family: var(--font-family-sans);
    font-size: 12px;
    color: var(--fg-tertiary);
    background: var(--ui-chrome);
    border-radius: 6px;
}

.graph-wizard-loading {
    padding: 16px;
    text-align: center;
    font-family: var(--font-family-sans);
    font-size: 12px;
    color: var(--fg-secondary);
}

.graph-wizard-tip {
    padding: 12px;
    margin-top: 8px;
    background: var(--accent);
    background: rgba(99, 102, 241, 0.1);
    border-radius: 6px;
    font-family: var(--font-family-sans);
    font-size: 11px;
    color: var(--accent);
}

.graph-wizard-source {
    padding: 8px 12px;
    background: var(--ui-chrome);
    border-radius: 6px;
    font-family: var(--font-family-sans);
    font-size: 11px;
    color: var(--fg-secondary);
    margin-bottom: 8px;
}

.graph-wizard-suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    background: var(--ui-chrome);
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.graph-wizard-suggestion:hover {
    background: var(--accent);
}

.graph-wizard-suggestion:hover .graph-wizard-note-title,
.graph-wizard-suggestion:hover .graph-wizard-match {
    color: var(--accent-fg);
}

.graph-wizard-suggestion-info {
    flex: 1;
    min-width: 0;
}

.graph-wizard-match {
    font-family: var(--font-family-sans);
    font-size: 10px;
    color: var(--fg-tertiary);
    margin-top: 2px;
}

.graph-wizard-copy-btn {
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: var(--bg);
    border: none;
    color: var(--accent);
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-family-sans);
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.graph-wizard-copy-btn:hover {
    background: var(--accent);
    color: var(--accent-fg);
}

.graph-wizard-pair {
    padding: 12px;
    background: var(--ui-chrome);
    border-radius: 6px;
}

.graph-wizard-pair-notes {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.graph-wizard-pair-note {
    font-family: var(--font-family-sans);
    font-size: 12px;
    color: var(--accent);
    cursor: pointer;
}

.graph-wizard-pair-note:hover {
    text-decoration: underline;
}

.graph-wizard-pair-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.graph-wizard-toast {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    padding: 10px 16px;
    background: var(--fg);
    color: var(--bg);
    font-family: var(--font-family-sans);
    font-size: 12px;
    border-radius: 6px;
    text-align: center;
    z-index: 100;
    animation: slideUp 0.2s ease-out;
}

.graph-wizard-toast.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== GETTING STARTED OVERLAY ===== */
.graph-getting-started {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    z-index: 40;
}

.graph-getting-started-content {
    max-width: 400px;
    padding: 32px;
    background: var(--bg);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.graph-getting-started-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--accent);
    border-radius: 50%;
    color: var(--accent-fg);
}

.graph-getting-started-title {
    font-family: var(--font-family-sans);
    font-size: 20px;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 12px;
}

.graph-getting-started-text {
    font-family: var(--font-family-sans);
    font-size: 14px;
    color: var(--fg-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.graph-getting-started-tips {
    text-align: left;
    margin-bottom: 24px;
}

.graph-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--ui-chrome);
    border-radius: 8px;
    margin-bottom: 8px;
}

.graph-tip:last-child {
    margin-bottom: 0;
}

.graph-tip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--accent);
    color: var(--accent-fg);
    font-family: var(--font-family-sans);
    font-size: 12px;
    font-weight: 600;
    border-radius: 50%;
    flex-shrink: 0;
}

.graph-tip span:last-child {
    font-family: var(--font-family-sans);
    font-size: 13px;
    color: var(--fg);
    line-height: 1.5;
}

.graph-tip code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 12px;
    color: var(--accent);
}

.graph-getting-started-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--accent);
    color: var(--accent-fg);
    border: none;
    border-radius: 8px;
    font-family: var(--font-family-sans);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.graph-getting-started-btn:hover {
    opacity: 0.9;
}

.graph-getting-started-dismiss {
    display: block;
    margin-top: 16px;
    background: none;
    border: none;
    color: var(--fg-tertiary);
    font-family: var(--font-family-sans);
    font-size: 13px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.graph-getting-started-dismiss:hover {
    color: var(--fg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .graph-search-container {
        display: none;
    }
    
    .graph-mode-toggle {
        display: none;
    }
    
    .graph-settings {
        width: calc(100% - 16px);
        left: 8px;
        right: 8px;
    }
    
    .graph-legend {
        max-width: 150px;
        font-size: 11px;
    }
    
    .graph-metrics-panel {
        width: calc(100% - 16px);
        left: 8px;
        right: 8px;
    }
    
    .graph-breadcrumbs {
        font-size: 11px;
    }
    
    .graph-link-wizard {
        width: calc(100% - 16px);
        left: 8px;
        right: 8px;
    }
    
    .graph-getting-started-content {
        margin: 16px;
        padding: 24px;
    }
}
