/* Drag-handle affordance for note cards — same contract as .task-drag-handle:
   absolute in the card's left padding gutter (just after the area-colour
   edge), hover-revealed, zero layout cost. The whole card remains draggable;
   the grip only makes that discoverable. */
.note-drag-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 12px; /* the card's left padding gutter (--space-3) */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    opacity: 0;
    cursor: grab;
    transition: opacity var(--transition-fast), color var(--transition-fast);
}

.dashboard-note-item:hover .note-drag-handle {
    opacity: 1;
}

.note-drag-handle:hover {
    color: var(--text-secondary);
}

.note-drag-handle:active {
    cursor: grabbing;
}

body.is-dragging .note-drag-handle {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .note-drag-handle {
        transition: none;
    }
}

.dashboard-note-item.has-area-edge {
    border-left: 3px solid var(--area-color);
}

.dashboard-note-item:hover {
    background: var(--bg-card);
    border-color: #4A90D9;
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px) scale(1.005);
}

.dashboard-note-item.has-area-edge:hover {
    border-left-color: var(--area-color, #4A90D9);
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-note-item:hover {
        transform: none;
    }
}

.dashboard-note-item .note-item-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-1);
}

.dashboard-note-item .note-pinned-icon {
    width: 14px;
    height: 14px;
    color: var(--color-amber-text);
    flex-shrink: 0;
    margin-left: 6px;
}

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

.dashboard-note-item .note-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
}

.dashboard-note-item .note-item-location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.dashboard-note-item .note-item-location svg {
    stroke: currentColor;
    flex-shrink: 0;
}

.dashboard-note-item .note-item-time {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    margin-left: auto;
}

/* Dashboard Empty State */
.dashboard-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-12) var(--space-6);
    text-align: center;
    color: var(--text-tertiary);
}

.dashboard-empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

.dashboard-empty-state p {
    margin: 0;
    font-size: var(--font-size-sm);
}

/* ============================================================================ */
/* NOTES VIEW */
/* ============================================================================ */

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

.notes-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px 16px 32px;
    background: var(--bg-primary);
}

.notes-page-header .page-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin: 0;
}

.notes-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.notes-view-toggle {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-half);
}

.notes-page-content {
    display: flex;
    gap: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.notes-left-panel {
    width: 220px;
    min-width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    overflow: hidden;
    transition: width var(--transition-normal);
    height: 100%;
    padding: 0 8px;
    border-right: 1px solid var(--border-light);
}

.notes-panel-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 8px 12px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    border-radius: var(--radius-md);
    margin: 0 0 8px 0;
}

.notes-panel-header:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.notes-panel-header.active {
    background-color: var(--accent-blue-light);
    color: var(--accent-blue);
}

.notes-panel-title {
    flex: 1;
}

.notes-filter-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-gutter: stable;
    padding: 4px 0;
}

.notes-expand-all {
    background: none;
    border: none;
    padding: var(--space-1);
    cursor: pointer;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.notes-expand-all:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.notes-expand-all svg {
    width: 16px;
    height: 16px;
}

.notes-total-count {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
}
