* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
}

.hidden { display: none !important; }

.loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 9999;
  background: linear-gradient(90deg, #38bdf8 0%, #7dd3fc 50%, #38bdf8 100%);
  background-size: 200% 100%;
  animation: loading-slide 1.2s linear infinite;
}

@keyframes loading-slide {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Auth */
.auth-container {
  max-width: 400px;
  margin: 4rem auto;
  padding: 2rem;
  background: #1e293b;
  border-radius: 12px;
  border: 1px solid #334155;
}

.auth-container h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #38bdf8;
  font-size: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: #94a3b8;
}

.form-group input {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 1rem;
}

.form-group input:focus {
  outline: none;
  border-color: #38bdf8;
}

.btn {
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary {
  background: #38bdf8;
  color: #0f172a;
  width: 100%;
  font-weight: 600;
}

.btn-primary:hover { background: #7dd3fc; }

.btn-compact { width: auto; }

.btn-secondary {
  background: #334155;
  color: #e2e8f0;
}

.btn-secondary:hover { background: #475569; }

.unlock-hint {
  color: #94a3b8;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.auth-link {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.auth-link a {
  color: #38bdf8;
  text-decoration: none;
}

.error {
  background: #7f1d1d;
  color: #fca5a5;
  padding: 0.7rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.success {
  background: #14532d;
  color: #86efac;
  padding: 0.7rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Header */
.username {
  color: #64748b;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}

#export-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
#export-btn:disabled:hover {
  background: none;
  color: #64748b;
}

/* Help Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.4rem 0.8rem;
  border-bottom: 1px solid #334155;
}

.modal-header h2 {
  color: #38bdf8;
  font-size: 1.1rem;
}

.modal-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.modal-close:hover { color: #e2e8f0; background: #334155; }

.modal-body {
  padding: 1.2rem 1.4rem 1.4rem;
}

.shortcut-section {
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 1.2rem 0 0.5rem;
}

.shortcut-section:first-child { margin-top: 0; }

.shortcut-table {
  width: 100%;
  border-collapse: collapse;
}

.shortcut-table tr { border-bottom: 1px solid #1e293b; }
.shortcut-table tr:last-child { border-bottom: none; }

.shortcut-table td {
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: #e2e8f0;
  vertical-align: middle;
}

.shortcut-table td:first-child {
  width: 40%;
  white-space: nowrap;
}

kbd {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  background: #0f172a;
  border: 1px solid #475569;
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.shortcut-hint {
  margin-top: 1.2rem;
  font-size: 0.8rem;
  color: #64748b;
  padding-top: 1rem;
  border-top: 1px solid #334155;
}

/* Notes List */
.notes-toolbar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

#search-input {
  flex: 1;
  padding: 0.6rem 0.8rem;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 0.95rem;
}

#search-input:focus {
  outline: none;
  border-color: #38bdf8;
}

#search-input::placeholder {
  color: #475569;
}

.btn-new {
  background: #38bdf8;
  color: #0f172a;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn-new:hover { background: #7dd3fc; }

.note-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 1.2rem;
  margin-bottom: 0.8rem;
  transition: border-color 0.2s;
}

.note-card:hover { border-color: #38bdf8; }

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.note-title {
  font-size: 1.1rem;
  color: #f1f5f9;
  margin-bottom: 0.5rem;
}

.note-actions { display: flex; gap: 0.3rem; }

.btn-icon {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.btn-icon:hover { color: #38bdf8; background: #334155; }

.btn-icon.pending-delete { color: #f97316; font-size: 0.75rem; border: 1px solid #f97316; border-radius: 4px; padding: 0.1rem 0.35rem; }
.btn-icon.pending-delete:hover { color: #fff; background: #f97316; }

.note-preview {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.note-date {
  color: #475569;
  font-size: 0.8rem;
}

.empty {
  text-align: center;
  color: #475569;
  padding: 3rem;
  font-size: 1.1rem;
}

/* Split-pane app layout */
#app-view {
  height: 100vh;
  overflow: hidden;
}

.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.app-sidebar {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #334155;
  overflow: hidden;
}

.sidebar-head {
  padding: 1rem 1rem 0;
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: #38bdf8;
  padding-bottom: 0.8rem;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid #334155;
}

.app-sidebar .notes-toolbar {
  margin-bottom: 0;
  padding-bottom: 1rem;
  flex-direction: column;
}

.app-sidebar .btn-new {
  width: 100%;
}

.sidebar-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-top: 1px solid #334155;
}

.sidebar-actions {
  display: flex;
  gap: 0.2rem;
}

.sidebar-icon-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  line-height: 1;
}

.sidebar-icon-btn:hover {
  background: #334155;
  color: #e2e8f0;
}

.sidebar-icon-logout:hover {
  background: #7f1d1d;
  color: #fca5a5;
}

.sidebar-icon-btn.logout-pending {
  background: #7f1d1d;
  color: #fca5a5;
}

#notes-list {
  overflow-y: auto;
  flex: 1;
  padding: 0 0.8rem 0.8rem;
}

.app-panel {
  flex: 1;
  overflow-y: auto;
  min-width: 0;
}

.panel-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 300px;
  gap: 0.8rem;
}

.placeholder-lock {
  font-size: 3rem;
  opacity: 0.2;
  line-height: 1;
}

.panel-placeholder p {
  font-size: 1rem;
  color: #475569;
}

#panel-viewer {
  padding: 0 1.5rem 1.5rem;
}

#panel-viewer .viewer-toolbar {
  background: #0f172a;
  margin: 0 -1.5rem 1.5rem;
  padding: 0.8rem 1.5rem;
}

/* Viewer */
.viewer-container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.viewer-container h2 {
  margin-bottom: 1.5rem;
  color: #38bdf8;
}

.viewer-content {
  width: 100%;
  min-height: 200px;
  padding: 0.8rem;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.viewer-toolbar {
  display: flex;
  gap: 0.3rem;
  justify-content: flex-end;
  position: sticky;
  top: 0;
  padding: 0.6rem 0;
  z-index: 10;
  background: #0f172a;
}

.viewer-icon-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.viewer-icon-btn:hover { background: #1e293b; color: #e2e8f0; }
.viewer-icon-edit:hover { color: #38bdf8; }
.viewer-icon-delete:hover { background: #7f1d1d; color: #fca5a5; }
.viewer-icon-delete.pending-delete { background: #7f1d1d; color: #fca5a5; }

/* Editor */
.editor-container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
  transition: max-width 0.2s;
}

.editor-container.preview-active {
  max-width: 1400px;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.editor-container h2 {
  color: #38bdf8;
}

.save-status {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
}

.save-status.saved {
  color: #4ade80;
}

.save-status.unsaved {
  color: #fbbf24;
}

.save-status.saving {
  color: #94a3b8;
}

.save-status.error {
  color: #f87171;
}

#note-title {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.editor-toolbar {
  display: flex;
  gap: 0.3rem;
  padding: 0.5rem;
  background: #1e293b;
  border: 1px solid #334155;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.toolbar-btn {
  background: #334155;
  border: none;
  color: #e2e8f0;
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  min-width: 2rem;
  text-align: center;
}

.toolbar-btn:hover { background: #475569; }
.toolbar-btn.active { background: #38bdf8; color: #0f172a; }
.toolbar-btn:disabled { opacity: 0.4; cursor: default; }
.toolbar-btn:disabled:hover { background: #334155; }

.toolbar-separator {
  width: 1px;
  background: #475569;
  margin: 0 0.3rem;
}

.toolbar-select {
  background: #334155;
  border: none;
  color: #e2e8f0;
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}

.toolbar-select:hover { background: #475569; }
.toolbar-select:focus { outline: none; }

.editor-split {
  display: flex;
  gap: 0;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

#note-content {
  width: 100%;
  min-height: 300px;
  padding: 0.8rem;
  border: 1px solid #334155;
  border-top: none;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.5;
  overflow-y: auto;
}

.editor-split.split-active #note-content {
  width: 50%;
  border-radius: 0 0 0 8px;
  border-right: none;
}

#note-content:empty::before {
  content: attr(data-placeholder);
  color: #475569;
  pointer-events: none;
}

#note-title:focus, #note-content:focus {
  outline: none;
  border-color: #38bdf8;
}

.editor-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
}

.note-preview-pane {
  width: 50%;
  min-height: 300px;
  padding: 0.8rem;
  border: 1px solid #334155;
  border-top: none;
  border-left: 1px solid #475569;
  border-radius: 0 0 8px 0;
  background: #162032;
  color: #e2e8f0;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.5;
  overflow-y: auto;
}

/* Rich text content styling */
.viewer-content ul, .viewer-content ol,
#note-content ul, #note-content ol,
.note-preview-pane ul, .note-preview-pane ol {
  margin-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.viewer-content h2, #note-content h2, .note-preview-pane h2 {
  color: #38bdf8;
  margin: 0.5rem 0;
}

.viewer-content pre, #note-content pre, .note-preview-pane pre {
  background: #0f172a;
  padding: 0.8rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0.5rem 0;
}

/* Spellcheck */
mark.misspelled {
  background: none;
  color: inherit;
  text-decoration: underline wavy red;
  text-underline-offset: 3px;
  cursor: pointer;
}

.spellcheck-suggestions {
  position: absolute;
  z-index: 1000;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.3rem 0;
  min-width: 140px;
  max-width: 260px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.suggestion-item {
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.suggestion-item:hover {
  background: #334155;
}

.suggestion-item.disabled {
  color: #64748b;
  cursor: default;
}

.suggestion-item.disabled:hover {
  background: none;
}

/* Layouts */
.viewer-layout, .editor-layout {
  display: flex;
  gap: 1.5rem;
}

.viewer-main, .editor-main {
  flex: 1;
  min-width: 0;
}

/* Todo Panel */
.todo-panel {
  width: 300px;
  flex-shrink: 0;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 1rem;
  align-self: flex-start;
}

.todo-panel h3 {
  color: #38bdf8;
  font-size: 1rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #334155;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #1e293b;
}

.todo-item input[type="checkbox"] {
  accent-color: #38bdf8;
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.todo-item .todo-text {
  flex: 1;
  font-size: 0.9rem;
  color: #e2e8f0;
  word-break: break-word;
}

.todo-item.done .todo-text {
  text-decoration: line-through;
  color: #64748b;
}

.todo-item .todo-grip {
  cursor: grab;
  color: #475569;
  font-size: 0.85rem;
  flex-shrink: 0;
  user-select: none;
  padding: 0.3rem;
  touch-action: none;
}

.todo-item .todo-grip:hover {
  color: #94a3b8;
}

.todo-item.dragging {
  opacity: 0.4;
}

.todo-item .todo-delete {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.3rem;
  flex-shrink: 0;
}

.todo-item .todo-delete:hover {
  color: #ef4444;
}

.todo-add {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.todo-add input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.85rem;
}

.todo-add input:focus {
  outline: none;
  border-color: #38bdf8;
}

.todo-add button {
  background: #38bdf8;
  color: #0f172a;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
}

.todo-add button:hover {
  background: #7dd3fc;
}

.todo-empty {
  color: #64748b;
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem 0;
}

@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
    height: auto;
  }
  #app-view {
    height: auto;
    overflow: visible;
  }
  .app-sidebar {
    width: 100%;
    max-height: 50vh;
    border-right: none;
    border-bottom: 1px solid #334155;
  }
  .app-panel {
    min-height: 300px;
  }
  .viewer-layout, .editor-layout {
    flex-direction: column;
  }
  .todo-panel {
    width: 100%;
  }
}

/* Attachments */
.attachment-section {
  margin-top: 1.2rem;
}

.attachment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.attachment-section-title {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.attach-count {
  font-weight: 400;
  color: #475569;
}

.btn-attach {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid #475569;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-attach:hover { border-color: #38bdf8; color: #38bdf8; }

.btn-attach-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.attach-file-input { display: none; }

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 0.3rem 0.5rem 0.3rem 0.6rem;
  font-size: 0.82rem;
  max-width: 260px;
}

.att-icon { flex-shrink: 0; }

.att-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #cbd5e1;
}

.att-size {
  flex-shrink: 0;
  color: #475569;
  font-size: 0.75rem;
}

.att-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.9rem;
  line-height: 1;
}

.att-download-btn:hover { color: #38bdf8; }
.att-delete-btn:hover   { color: #ef4444; }

/* Search highlight */
mark.search-highlight {
  background: #ca8a04;
  color: #fff;
  border-radius: 2px;
  padding: 0 2px;
}

/* Settings modal */
.settings-divider {
  border: none;
  border-top: 1px solid #334155;
  margin: 1.5rem 0;
}

.danger-heading { color: #ef4444; }

.settings-hint {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.btn-danger {
  background: #991b1b;
  color: #fca5a5;
  border: 1px solid #ef4444;
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn-danger:hover { background: #ef4444; color: #fff; }

/* Inactivity warning banner */
.inactivity-warning {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #92400e;
  color: #fde68a;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 2000;
  font-size: 0.9rem;
}

.btn-stay {
  background: #fde68a;
  color: #92400e;
  border: none;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}
.btn-stay:hover { background: #fef3c7; }

/* Init loader */
.init-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.init-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid #334155;
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Keyboard-focused note card */
.note-card.keyboard-focused {
  border-color: #38bdf8;
  outline: 2px solid rgba(56, 189, 248, 0.25);
  outline-offset: -1px;
}


/* Light mode */
@media (prefers-color-scheme: light) {
  body { background: #f8fafc; color: #0f172a; }

  .auth-container { background: #fff; border-color: #e2e8f0; }
  .auth-container h1 { color: #0284c7; }

  .form-group label { color: #475569; }
  .form-group input { border-color: #e2e8f0; background: #f1f5f9; color: #0f172a; }

  .btn-primary { background: #0284c7; color: #fff; }
  .btn-primary:hover { background: #0369a1; }

  .btn-secondary { background: #e2e8f0; color: #0f172a; }
  .btn-secondary:hover { background: #cbd5e1; }

  .error { background: #fef2f2; color: #991b1b; }
  .success { background: #f0fdf4; color: #166534; }

  .username { color: #94a3b8; }

  .attachment-section-title { color: #94a3b8; }
  .attach-count { color: #64748b; }
  .btn-attach { border-color: #cbd5e1; color: #64748b; }
  .btn-attach:hover { border-color: #0284c7; color: #0284c7; }
  .attachment-chip { background: #f8fafc; border-color: #e2e8f0; }
  .att-name { color: #334155; }
  .att-size { color: #94a3b8; }
  .att-btn { color: #94a3b8; }
  .att-download-btn:hover { color: #0284c7; }

  .modal { background: #fff; border-color: #e2e8f0; }
  .modal-header { border-bottom-color: #e2e8f0; }
  .modal-header h2 { color: #0284c7; }
  .modal-close { color: #94a3b8; }
  .modal-close:hover { color: #0f172a; background: #e2e8f0; }

  .shortcut-section { color: #64748b; }
  .shortcut-table tr { border-bottom-color: #f8fafc; }
  .shortcut-table td { color: #0f172a; }
  kbd { background: #f1f5f9; border-color: #cbd5e1; color: #334155; }
  .shortcut-hint { color: #94a3b8; border-top-color: #e2e8f0; }

  #search-input { border-color: #e2e8f0; background: #fff; color: #0f172a; }
  #search-input::placeholder { color: #94a3b8; }
  .btn-new { background: #0284c7; }
  .btn-new:hover { background: #0369a1; }

  .note-card { background: #fff; border-color: #e2e8f0; }
  .note-card:hover { border-color: #0284c7; }
  .note-card.keyboard-focused { border-color: #0284c7; outline-color: rgba(2, 132, 199, 0.2); }
  .note-title { color: #0f172a; }
  .btn-icon { color: #94a3b8; }
  .btn-icon:hover { color: #0284c7; background: #f1f5f9; }
  .btn-icon.pending-delete { color: #f97316; border-color: #f97316; }
  .btn-icon.pending-delete:hover { background: #f97316; color: #fff; }
  .note-preview { color: #64748b; }
  .note-date { color: #94a3b8; }
  .empty { color: #94a3b8; }

  .viewer-content { border-color: #e2e8f0; background: #fff; color: #0f172a; }

  .editor-container h2 { color: #0284c7; }
  #note-title { border-color: #e2e8f0; background: #fff; color: #0f172a; }
  .editor-toolbar { background: #fff; border-color: #e2e8f0; }
  .toolbar-btn { background: #e2e8f0; color: #0f172a; }
  .toolbar-btn:hover { background: #cbd5e1; }
  .toolbar-btn.active { background: #0284c7; color: #fff; }
  .toolbar-btn:disabled:hover { background: #e2e8f0; }
  .toolbar-separator { background: #cbd5e1; }
  .toolbar-select { background: #e2e8f0; color: #0f172a; }
  .toolbar-select:hover { background: #cbd5e1; }
  #note-content { border-color: #e2e8f0; background: #fff; color: #0f172a; }
  #note-content:empty::before { color: #94a3b8; }
  #note-title:focus, #note-content:focus { border-color: #0284c7; }
  .note-preview-pane { border-color: #e2e8f0; border-left-color: #cbd5e1; background: #f8fafc; color: #0f172a; }

  .viewer-content h2, #note-content h2, .note-preview-pane h2 { color: #0284c7; }
  .viewer-content pre, #note-content pre, .note-preview-pane pre { background: #f1f5f9; }

  .spellcheck-suggestions { background: #fff; border-color: #e2e8f0; }
  .suggestion-item { color: #0f172a; }
  .suggestion-item:hover { background: #f1f5f9; }
  .suggestion-item.disabled { color: #94a3b8; }

  .todo-panel { background: #fff; border-color: #e2e8f0; }
  .todo-panel h3 { color: #0284c7; border-bottom-color: #e2e8f0; }
  .todo-item { border-bottom-color: #f8fafc; }
  .todo-item .todo-text { color: #0f172a; }
  .todo-item.done .todo-text { color: #94a3b8; }
  .todo-item .todo-grip { color: #94a3b8; }
  .todo-item .todo-grip:hover { color: #475569; }
  .todo-item .todo-delete { color: #94a3b8; }
  .todo-item .todo-delete:hover { color: #ef4444; }
  .todo-add input { border-color: #e2e8f0; background: #f1f5f9; color: #0f172a; }
  .todo-add button { background: #0284c7; }
  .todo-add button:hover { background: #0369a1; }
  .todo-empty { color: #94a3b8; }

  .settings-divider { border-top-color: #e2e8f0; }
  .settings-hint { color: #64748b; }

  .init-spinner { border-color: #e2e8f0; border-top-color: #0284c7; }

  .app-sidebar { border-right-color: #e2e8f0; }
  .sidebar-title { color: #0284c7; border-bottom-color: #e2e8f0; }
  .sidebar-footer { border-top-color: #e2e8f0; }
  .sidebar-icon-btn { color: #94a3b8; }
  .sidebar-icon-btn:hover { background: #f1f5f9; color: #0f172a; }
  .sidebar-icon-logout:hover { background: #fef2f2; color: #991b1b; }
  .sidebar-icon-btn.logout-pending { background: #fef2f2; color: #991b1b; }
  #panel-viewer .viewer-toolbar { background: #f8fafc; }
  .viewer-icon-btn { color: #94a3b8; }
  .viewer-icon-btn:hover { background: #e2e8f0; color: #0f172a; }
  .viewer-icon-edit:hover { color: #0284c7; background: #e0f2fe; }
  .viewer-icon-delete:hover { background: #fef2f2; color: #991b1b; }
  .viewer-icon-delete.pending-delete { background: #fef2f2; color: #991b1b; }
  .panel-placeholder p { color: #94a3b8; }

  @media (max-width: 768px) {
    .app-sidebar { border-bottom-color: #e2e8f0; }
  }
}
