.np-view {
  position: fixed;
  inset: 60px 0 0 260px;
  overflow-y: auto;
  background: #0a0a0f;
  z-index: 10;
  display: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #e2e8f0;
}
.np-view.visible { display: block; }
.np-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}
.np-title { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.np-subtitle { font-size: 13px; color: #64748b; margin-bottom: 28px; }
.np-section-label {
  font-size: 11px; font-weight: 700; color: #475569;
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px;
}
.np-list { display: flex; flex-direction: column; gap: 10px; }
.np-note {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  padding: 14px 16px;
  transition: background .15s;
}
.np-note:hover { background: rgba(255,255,255,.05); }
.np-note-header { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.np-note-content {
  flex: 1; font-size: 14px; color: #e2e8f0; line-height: 1.55;
  word-break: break-word; white-space: pre-wrap;
}
.np-note-actions { display: flex; gap: 4px; flex-shrink: 0; }
.np-btn {
  background: none; border: none; padding: 4px; border-radius: 6px;
  cursor: pointer; color: #475569; transition: color .15s; line-height: 1;
  display: flex; align-items: center;
}
.np-btn:hover { color: #e2e8f0; }
.np-btn.share:hover { color: rgba(var(--primary-rgb),1); }
.np-btn.delete:hover { color: #ef4444; }
.np-note-footer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.np-note-date { font-size: 11px; color: #475569; }
.np-tag {
  font-size: 10px; background: rgba(255,255,255,.06);
  border-radius: 6px; padding: 2px 6px; color: #64748b;
}
.np-share-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.np-share-chip {
  display: flex; align-items: center; gap: 4px;
  background: rgba(var(--primary-rgb),.1);
  border: 1px solid rgba(var(--primary-rgb),.2);
  border-radius: 20px; padding: 2px 7px 2px 3px;
  font-size: 11px; color: rgba(var(--primary-rgb),1);
}
.np-share-chip-avatar {
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(var(--primary-rgb),.25);
  font-size: 8px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.np-empty {
  text-align: center; color: #475569; font-size: 14px; padding: 48px 16px;
}
.np-empty-icon { font-size: 40px; margin-bottom: 12px; }
.np-empty-text { color: #64748b; line-height: 1.5; }
.np-section { margin-bottom: 32px; }
.np-shared-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: rgba(var(--primary-rgb),1);
  background: rgba(var(--primary-rgb),.08); border-radius: 6px; padding: 2px 6px;
}
/* Share modal */
.np-share-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 400; display: flex; align-items: center; justify-content: center;
}
.np-share-modal {
  background: #1a1f2e; border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px; padding: 20px;
  min-width: 260px; max-width: 320px; width: 90%;
  box-shadow: 0 16px 48px rgba(0,0,0,.6);
}
.np-share-modal-title { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.np-share-modal-preview {
  font-size: 12px; color: #64748b; margin-bottom: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.np-picker-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px; cursor: pointer;
  transition: background .12s; user-select: none;
}
.np-picker-item:hover { background: rgba(255,255,255,.06); }
.np-picker-item.selected { background: rgba(var(--primary-rgb),.12); }
.np-picker-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(var(--primary-rgb),.3); color: rgba(var(--primary-rgb),1);
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.np-picker-name { font-size: 13px; color: #e2e8f0; flex: 1; }
.np-picker-check {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center; font-size: 9px;
}
.np-picker-item.selected .np-picker-check {
  background: rgba(var(--primary-rgb),1); border-color: rgba(var(--primary-rgb),1); color: #fff;
}
.np-share-modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.np-share-save {
  background: rgba(var(--primary-rgb),.9); color: #fff; border: none;
  border-radius: 10px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.np-share-cancel {
  background: rgba(255,255,255,.06); color: #94a3b8;
  border: 1px solid rgba(255,255,255,.1); border-radius: 10px;
  padding: 8px 16px; font-size: 13px; cursor: pointer;
}
.np-picker-empty { font-size: 12px; color: #475569; text-align: center; padding: 12px 0; }

/* ── TOOLBAR: search + create ── */
.np-toolbar { display: flex; gap: 10px; margin-bottom: 20px; align-items: stretch; }
.np-search-wrap {
  flex: 1; position: relative;
}
.np-search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: #475569; font-size: 18px; pointer-events: none;
}
.np-search {
  width: 100%; padding: 10px 12px 10px 38px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04);
  color: #e2e8f0; font-size: 13px; outline: none; transition: border-color .2s, background .2s;
}
.np-search:focus { border-color: rgba(var(--primary-rgb),.4); background: rgba(255,255,255,.06); }
.np-search::placeholder { color: #475569; }
.np-create-btn {
  display: flex; align-items: center; gap: 6px; padding: 10px 18px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.85), rgba(var(--primary-rgb),.65));
  color: #fff; border: none; border-radius: 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: transform .15s, box-shadow .2s;
}
.np-create-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(var(--primary-rgb),.3); }
.np-create-btn .material-symbols-outlined { font-size: 18px; }

/* ── CREATE FORM ── */
.np-create-form {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px; padding: 16px; margin-bottom: 20px;
  display: none; animation: npSlideDown .25s ease;
}
.np-create-form.visible { display: block; }
@keyframes npSlideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.np-create-textarea {
  width: 100%; min-height: 80px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03);
  color: #e2e8f0; font-size: 14px; line-height: 1.5; resize: vertical;
  font-family: inherit; outline: none; transition: border-color .2s;
}
.np-create-textarea:focus { border-color: rgba(var(--primary-rgb),.4); }
.np-create-textarea::placeholder { color: #475569; }
.np-create-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.np-color-picker { display: flex; gap: 6px; }
.np-color-dot {
  width: 20px; height: 20px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s, border-color .15s;
}
.np-color-dot:hover { transform: scale(1.2); }
.np-color-dot.active { border-color: #fff; transform: scale(1.15); }
.np-color-dot[data-color="default"] { background: #334155; }
.np-color-dot[data-color="rose"] { background: #f43f5e; }
.np-color-dot[data-color="amber"] { background: #f59e0b; }
.np-color-dot[data-color="emerald"] { background: #10b981; }
.np-color-dot[data-color="sky"] { background: #0ea5e9; }
.np-color-dot[data-color="violet"] { background: #8b5cf6; }
.np-create-actions { display: flex; gap: 8px; }
.np-create-save {
  padding: 8px 20px; border-radius: 10px; border: none; font-size: 13px; font-weight: 600;
  background: rgba(var(--primary-rgb),.85); color: #fff; cursor: pointer;
}
.np-create-cancel {
  padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1);
  background: transparent; color: #94a3b8; font-size: 13px; cursor: pointer;
}
.np-create-hint { font-size: 11px; color: #475569; margin-top: 6px; }

/* ── NOTE COLOR ACCENTS ── */
.np-note[data-color="rose"] { border-left: 3px solid #f43f5e; background: rgba(244,63,94,.06); }
.np-note[data-color="amber"] { border-left: 3px solid #f59e0b; background: rgba(245,158,11,.06); }
.np-note[data-color="emerald"] { border-left: 3px solid #10b981; background: rgba(16,185,129,.06); }
.np-note[data-color="sky"] { border-left: 3px solid #0ea5e9; background: rgba(14,165,233,.06); }
.np-note[data-color="violet"] { border-left: 3px solid #8b5cf6; background: rgba(139,92,246,.06); }

/* ── PIN ── */
.np-btn.pin { color: #475569; }
.np-btn.pin.pinned { color: #f59e0b; }
.np-pinned-label {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; color: #f59e0b; margin-left: 4px;
}

/* ── INLINE EDIT ── */
.np-note-content.editing {
  background: rgba(255,255,255,.04); border-radius: 8px; padding: 8px;
  border: 1px solid rgba(var(--primary-rgb),.3); outline: none;
}
.np-save-indicator {
  font-size: 10px; color: #10b981; opacity: 0; transition: opacity .3s; margin-left: 6px;
}
.np-save-indicator.show { opacity: 1; }

/* ── STATS BAR ── */
.np-stats {
  display: flex; gap: 16px; margin-bottom: 20px; font-size: 12px; color: #64748b;
}
.np-stats span { display: flex; align-items: center; gap: 4px; }
.np-stats .material-symbols-outlined { font-size: 14px; }

/* ── NOTE APPEAR ANIMATION ── */
@keyframes npNoteIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.np-note { animation: npNoteIn .3s ease both; }
.np-note:nth-child(2) { animation-delay: .04s; }
.np-note:nth-child(3) { animation-delay: .08s; }
.np-note:nth-child(4) { animation-delay: .12s; }
.np-note:nth-child(5) { animation-delay: .16s; }

/* ── MARKDOWN ── */
.np-note-content strong { font-weight: 700; }
.np-note-content em { font-style: italic; }
.np-note-content code { background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

@media (max-width: 768px) {
  .np-view { inset: 60px 0 60px 0; }
  .np-wrap { padding: 16px 12px 32px; }
  .np-toolbar { flex-direction: column; }
}

/* ── LIGHT THEME — NotesPage ── */
[data-mode="light"] .np-view { background: transparent !important; color: #1e293b !important; }
[data-mode="light"] .np-title { color: #0f172a !important; }
[data-mode="light"] .np-subtitle { color: #64748b !important; }
[data-mode="light"] .np-section-label { color: #475569 !important; }
[data-mode="light"] .np-note {
  background: rgba(255,255,255,.70) !important; border-color: rgba(0,0,0,.06) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
}
[data-mode="light"] .np-note:hover { background: rgba(255,255,255,.82) !important; }
[data-mode="light"] .np-note[data-color="rose"] { background: rgba(244,63,94,.08) !important; }
[data-mode="light"] .np-note[data-color="amber"] { background: rgba(245,158,11,.08) !important; }
[data-mode="light"] .np-note[data-color="emerald"] { background: rgba(16,185,129,.08) !important; }
[data-mode="light"] .np-note[data-color="sky"] { background: rgba(14,165,233,.08) !important; }
[data-mode="light"] .np-note[data-color="violet"] { background: rgba(139,92,246,.08) !important; }
[data-mode="light"] .np-note-content { color: #1e293b !important; }
[data-mode="light"] .np-btn { color: #94a3b8 !important; }
[data-mode="light"] .np-btn:hover { color: #334155 !important; }
[data-mode="light"] .np-btn.share:hover { color: var(--primary-color) !important; }
[data-mode="light"] .np-btn.delete:hover { color: #ef4444 !important; }
[data-mode="light"] .np-note-date { color: #94a3b8 !important; }
[data-mode="light"] .np-tag { background: rgba(0,0,0,.04) !important; color: #64748b !important; }
[data-mode="light"] .np-empty { color: #94a3b8 !important; }
[data-mode="light"] .np-search { background: rgba(0,0,0,.03) !important; border-color: rgba(0,0,0,.08) !important; color: #1e293b !important; }
[data-mode="light"] .np-create-form { background: rgba(255,255,255,.6) !important; border-color: rgba(0,0,0,.08) !important; }
[data-mode="light"] .np-create-textarea { background: rgba(0,0,0,.02) !important; border-color: rgba(0,0,0,.08) !important; color: #1e293b !important; }
[data-mode="light"] .np-stats { color: #94a3b8 !important; }
[data-mode="light"] .np-picker-name { color: #1e293b !important; }
[data-mode="light"] .np-picker-item:hover { background: rgba(0,0,0,.04) !important; }
[data-mode="light"] .np-picker-check { border-color: rgba(0,0,0,.15) !important; }
[data-mode="light"] .np-share-overlay { background: rgba(0,0,0,.20) !important; }
[data-mode="light"] .np-share-modal {
  background: rgba(255,255,255,.92) !important; border-color: rgba(0,0,0,.10) !important;
  box-shadow: 0 16px 48px rgba(0,0,0,.10) !important;
}
[data-mode="light"] .np-share-modal-title { color: #0f172a !important; }
[data-mode="light"] .np-share-modal-preview { color: #64748b !important; }
[data-mode="light"] .np-share-cancel {
  background: rgba(0,0,0,.04) !important; border-color: rgba(0,0,0,.10) !important; color: #475569 !important;
}
