/* Salsa Notes - Main Styles */

.notes-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Header */
.notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.notes-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notes-title {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.notes-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
}

.notes-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notes-search-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}

.notes-search-wrap .form-input {
    width: 200px;
}

/* Main layout */
.notes-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.notes-sidebar {
    width: 260px;
    min-width: 200px;
    max-width: 400px;
    border-right: 1px solid var(--border-primary);
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notes-tree-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-secondary);
}

.notes-tree-title {
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.notes-tree {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.notes-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    text-align: center;
}

.notes-empty-icon {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.notes-empty-state p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--text-base);
}

.notes-empty-hint {
    font-size: var(--text-sm) !important;
    color: var(--text-muted) !important;
    margin-top: 4px !important;
}

/* Note tree items */
.notes-tree-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: var(--text-base);
    transition: background 0.15s;
}

.notes-tree-item:hover {
    background: var(--bg-hover);
}

.notes-tree-item.active {
    background: var(--accent-blue-subtle);
    color: var(--accent-blue);
}

.notes-tree-item-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-muted);
}

.notes-tree-item.active .notes-tree-item-icon {
    color: var(--accent-blue);
}

.notes-tree-folder-header:hover {
    background: var(--bg-hover);
}

/* Quick actions */
.notes-quick-actions {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border-secondary);
}

.notes-quick-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.notes-quick-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.notes-quick-btn svg {
    width: 14px;
    height: 14px;
}

/* Editor area */
.notes-editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-secondary);
}

.notes-editor-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notes-placeholder-content {
    text-align: center;
    max-width: 320px;
}

.notes-placeholder-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: var(--text-muted);
}

.notes-placeholder-content h2 {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.notes-placeholder-content p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin: 0 0 20px;
}

.notes-placeholder-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Editor */
.notes-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notes-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-secondary);
    background: var(--bg-primary);
}

.notes-breadcrumb {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.notes-editor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notes-view-toggle {
    display: flex;
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 2px;
}

.notes-view-btn {
    padding: 6px 10px;
    border: none;
    background: transparent;
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.notes-view-btn:hover {
    color: var(--text-primary);
}

.notes-view-btn.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.notes-view-btn svg {
    width: 14px;
    height: 14px;
}

/* Properties panel */
.notes-properties-panel {
    padding: 12px 16px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-secondary);
}

/* Properties & Tags panel (NB-009) */
.notes-props-section {
    margin-bottom: 12px;
}

.notes-props-section:last-child {
    margin-bottom: 0;
}

.notes-props-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

/* Tag pills */
.notes-tags-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.notes-tag-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.notes-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--accent-blue-subtle);
    color: var(--accent-blue);
    border-radius: 12px;
    font-size: var(--text-xs);
    font-weight: 500;
}

.notes-tag-remove {
    background: none;
    border: none;
    color: var(--accent-blue);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0 2px;
    opacity: 0.6;
}

.notes-tag-remove:hover {
    opacity: 1;
}

.notes-tag-input {
    margin-top: 4px;
}

/* Properties rows */
.notes-properties-rows {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notes-prop-entry {
    display: flex;
    align-items: center;
    gap: 4px;
}

.notes-prop-entry .notes-prop-key,
.notes-prop-entry .notes-prop-key-new {
    width: 80px;
    flex-shrink: 0;
}

.notes-prop-entry .notes-prop-value,
.notes-prop-entry .notes-prop-value-new {
    flex: 1;
}

.notes-prop-delete {
    padding: 2px 6px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.15s;
}

.notes-prop-entry:hover .notes-prop-delete {
    opacity: 0.6;
}

.notes-prop-delete:hover {
    opacity: 1 !important;
}

/* Editor content */
.notes-editor-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.notes-source-view {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* Line numbers gutter (NB-008) */
.notes-line-gutter {
    width: 48px;
    flex-shrink: 0;
    padding: 24px 8px 24px 0;
    text-align: right;
    font-family: var(--font-mono);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-muted);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-secondary);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.notes-line-number {
    display: block;
    opacity: 0.5;
}

.notes-line-number.current {
    opacity: 1;
    color: var(--text-primary);
}

.notes-textarea {
    flex: 1;
    padding: 24px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: var(--text-base);
    line-height: 1.6;
    resize: none;
    outline: none;
}

.notes-textarea::placeholder {
    color: var(--text-muted);
}

.notes-preview-view {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    color: var(--text-primary);
    font-size: var(--text-lg);
    line-height: 1.7;
}

/* Status bar */
.notes-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    border-top: 1px solid var(--border-secondary);
    background: var(--bg-primary);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.notes-status-saved {
    color: var(--accent-green);
}

.notes-status-right {
    display: flex;
    gap: 16px;
}

.notes-status-line {
    color: var(--text-muted);
}

/* Backlinks panel */
.notes-backlinks-panel {
    width: 280px;
    min-width: 200px;
    max-width: 400px;
    border-left: 1px solid var(--border-primary);
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notes-backlinks-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.notes-backlinks-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.notes-backlinks-empty,
.notes-outlinks-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.notes-outlinks-section {
    border-top: 1px solid var(--border-secondary);
}

.notes-outlinks-header {
    padding: 12px 16px;
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.notes-outlinks-content {
    padding: 12px;
}

/* Link items */
.notes-link-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.notes-link-item:hover {
    background: var(--bg-hover);
}

.notes-link-icon {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-top: 2px;
}

.notes-link-info {
    flex: 1;
    min-width: 0;
}

.notes-link-title {
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notes-link-context {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Wikilink autocomplete dropdown */
.notes-wikilink-autocomplete {
    position: absolute;
    z-index: 100;
    min-width: 200px;
    max-width: 320px;
    max-height: 240px;
    overflow-y: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
}

.notes-autocomplete-item {
    padding: 8px 12px;
    font-size: var(--text-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.1s;
}

.notes-autocomplete-item:hover,
.notes-autocomplete-item.active {
    background: var(--accent-blue-subtle);
    color: var(--accent-blue);
}

.notes-autocomplete-item:first-child {
    border-radius: 7px 7px 0 0;
}

.notes-autocomplete-item:last-child {
    border-radius: 0 0 7px 7px;
}

.notes-autocomplete-item:only-child {
    border-radius: 7px;
}

.notes-autocomplete-empty {
    padding: 12px;
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-align: center;
}

/* Wikilinks in preview */
.wikilink {
    color: var(--accent-blue);
    text-decoration: none;
    border-bottom: 1px dashed var(--accent-blue);
    cursor: pointer;
}

.wikilink:hover {
    color: var(--accent-blue-bright, #60a5fa);
    border-bottom-style: solid;
}

/* Tree folder improvements (NB-007) */
.notes-tree-folder-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.notes-folder-chevron {
    transition: transform 0.15s;
    flex-shrink: 0;
}

.notes-tree-folder.collapsed .notes-folder-chevron {
    transform: rotate(-90deg);
}

.notes-tree-folder.collapsed .notes-tree-folder-children {
    display: none;
}

.notes-folder-count {
    margin-left: auto;
    font-size: var(--text-xs);
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 0 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Quick Switcher (Cmd+K) - NB-007 */
.notes-qs-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}

.notes-qs-modal {
    width: 560px;
    max-width: 90vw;
    max-height: 60vh;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notes-qs-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-secondary);
}

.notes-qs-input-wrap svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.notes-qs-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: var(--text-base);
    color: var(--text-primary);
}

.notes-qs-input::placeholder {
    color: var(--text-muted);
}

.notes-qs-kbd {
    font-size: var(--text-xs);
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    padding: 2px 6px;
}

.notes-qs-results {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
}

.notes-qs-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.1s;
}

.notes-qs-item:hover,
.notes-qs-item.active {
    background: var(--accent-blue-subtle);
}

.notes-qs-item.active .notes-qs-item-title {
    color: var(--accent-blue);
}

.notes-qs-item-title {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.notes-qs-item-path {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-left: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.notes-qs-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* Graph View (NB-012) */
.notes-graph-container {
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-secondary);
}

.notes-graph-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-secondary);
    background: var(--bg-primary);
    height: 44px;
    flex-shrink: 0;
}

.notes-graph-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}

#notes-graph-canvas {
    flex: 1;
    display: block;
}

/* Mobile responsive */
/* =========================================================================
   NB-014: More Menu + Actions (SAL-175)
   ========================================================================= */

.notes-more-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 200px;
    background: var(--bg-primary);
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    padding: 4px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 100;
}

.notes-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    font-size: var(--text-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s;
}

.notes-menu-item:hover {
    background: var(--bg-tertiary);
}

.notes-menu-item.danger {
    color: var(--accent-red);
}

.notes-menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.notes-menu-divider {
    height: 1px;
    margin: 4px 0;
    background: var(--border-secondary);
}

.notes-editor-actions {
    position: relative;
}

.notes-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: var(--text-sm);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 1000;
}

.notes-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Attachments (NB-010 / SAL-171) */

.notes-dragover {
    outline: 2px dashed var(--accent-primary);
    outline-offset: -4px;
    background: rgba(99, 102, 241, 0.04);
}

.notes-attachments-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-top: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    overflow-x: auto;
    flex-wrap: nowrap;
}

.notes-attachments-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.notes-attachment-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-secondary);
    border-radius: 6px;
    font-size: var(--text-xs);
    flex-shrink: 0;
    max-width: 200px;
}

.notes-attachment-thumb {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
}

.notes-attachment-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-secondary);
}

.notes-attachment-insert,
.notes-attachment-remove {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0 2px;
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.notes-attachment-insert:hover {
    color: var(--accent-primary);
}

.notes-attachment-remove:hover {
    color: var(--accent-red);
}

/* Embedded images in preview */
.notes-embed-image {
    max-width: 100%;
    border-radius: 6px;
    margin: 8px 0;
    display: block;
}

.notes-embed-missing {
    color: var(--text-tertiary);
    font-style: italic;
    font-size: var(--text-sm);
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Capture Modal (NB-017 / SAL-178) */

.notes-capture-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    z-index: 2000;
}

.notes-capture-modal {
    background: var(--bg-primary);
    border: 1px solid var(--border-secondary);
    border-radius: 12px;
    width: 480px;
    max-width: 90vw;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.notes-capture-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 10px;
}

.notes-capture-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.notes-capture-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.notes-capture-close:hover {
    color: var(--text-primary);
}

.capture-textarea {
    margin: 0 18px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: var(--text-sm);
    resize: vertical;
    min-height: 100px;
}

.capture-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.notes-capture-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px 14px;
}

.notes-capture-hint {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.notes-capture-save {
    padding: 6px 16px;
    font-size: var(--text-sm);
}

/* Canvas V1 (NB-013 / SAL-174) */

.notes-canvas-panel,
.notes-canvas-viewer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    display: none;
    flex-direction: column;
    z-index: 50;
}

.notes-canvas-header,
.notes-canvas-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-primary);
    font-weight: 600;
    font-size: var(--text-sm);
}

.notes-canvas-close,
.notes-canvas-viewer-header button {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 18px;
    cursor: pointer;
}

.notes-canvas-actions {
    padding: 8px 16px;
}

.notes-canvas-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.notes-canvas-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.notes-canvas-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.notes-canvas-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

.notes-canvas-svg {
    flex: 1;
    width: 100%;
    min-height: 0;
    background: var(--bg-secondary);
}

.canvas-node rect {
    cursor: pointer;
}

.canvas-node:hover rect {
    stroke: var(--accent-primary);
}

@media (max-width: 768px) {
    .notes-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 16px;
    }

    .notes-header-right {
        width: 100%;
    }

    .notes-search-wrap {
        flex: 1;
    }

    .notes-search-wrap .form-input {
        width: 100%;
    }

    .notes-layout {
        flex-direction: column;
    }

    .notes-sidebar {
        width: 100%;
        max-width: none;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--border-primary);
    }

    .notes-backlinks-panel {
        display: none;
    }
}
