/* =========================================================================
   Lifehub — Tool styles (Todo, Note, JSON, Diff, Password, Bookmark)
   ========================================================================= */

/* ---------- TODO ---------- */
.todo-quickadd {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(127,13,242,0.03);
}
.todo-quickadd > .material-symbols-outlined { color: var(--color-primary); font-size: 22px; }
.todo-quickadd-input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: none;
  font-family: inherit; font-size: 14px; color: var(--text-hi);
}
.todo-quickadd-input::placeholder { color: var(--text-faint); }
.todo-qa-preview { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }

.todo-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
}
.todo-stat {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.todo-stat .material-symbols-outlined {
  font-size: 22px; color: var(--text-lo);
  padding: 8px; background: rgba(255,255,255,0.03); border-radius: 8px;
}
.todo-stat.tone-primary .material-symbols-outlined { color: var(--color-primary); background: rgba(127,13,242,0.1); }
.todo-stat.tone-success .material-symbols-outlined { color: var(--color-success); background: rgba(52,211,153,0.1); }
.todo-stat.tone-danger  .material-symbols-outlined { color: var(--color-error); background: rgba(248,113,113,0.1); }
.todo-stat-meta .v { font-size: 20px; font-weight: 700; color: var(--text-hi); font-variant-numeric: tabular-nums; line-height: 1.1; }
.todo-stat-meta .l { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }

.todo-twopane { grid-template-columns: 360px 1fr; }
.todo-filters { display: flex; gap: 4px; flex-wrap: wrap; }

.todo-projects {
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border);
  display: flex; flex-direction: column; gap: 2px;
}
.todo-proj { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: transparent; border: 0; cursor: pointer; font-family: inherit; font-size: 12px; color: var(--text-lo); text-align: left; width: 100%; }
.todo-proj > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-proj:hover { background: rgba(255,255,255,0.04); color: var(--text-hi); }
.todo-proj.is-active { background: rgba(127,13,242,0.1); color: var(--color-primary); }
.todo-proj.is-active > .material-symbols-outlined { color: var(--color-primary); }
.todo-proj.is-new {
  color: var(--color-primary);
  font-weight: 600;
  border-top: 1px dashed var(--color-border);
  margin-top: 4px;
  padding-top: 8px;
  border-radius: 0 0 8px 8px;
}
.todo-proj.is-new:hover { background: rgba(var(--primary-rgb, 127,13,242), 0.08); }
.todo-proj.is-new > .material-symbols-outlined { color: var(--color-primary); }
.todo-proj .material-symbols-outlined { font-size: 14px; }
html.light .todo-proj:hover { background: rgba(0,0,0,0.04); }

.todo-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px;
  background: transparent; border: 1px solid transparent;
  border-radius: 10px; cursor: pointer;
  font-family: inherit; text-align: left; width: 100%;
  margin-bottom: 2px;
}
.todo-row:hover { background: rgba(255,255,255,0.03); }
.todo-row.is-selected { background: rgba(127,13,242,0.08); border-color: rgba(127,13,242,0.25); }
.todo-row.is-done .todo-row-title { text-decoration: line-through; color: var(--text-muted); }
.todo-row.drop-target { background: rgba(127,13,242,0.15); border-color: rgba(127,13,242,0.5); border-style: dashed; }

.todo-check {
  width: 18px; height: 18px; border-radius: 6px;
  border: 1.5px solid var(--text-faint); background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; margin-top: 1px;
  transition: all 120ms;
}
.todo-check:hover { border-color: var(--color-primary); }
.todo-check.is-on { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.todo-check.is-on .material-symbols-outlined { font-size: 14px; font-variation-settings: "wght" 700; }
.todo-check.lg { width: 24px; height: 24px; border-radius: 7px; }
.todo-check.lg .material-symbols-outlined { font-size: 18px; }
.todo-check.sm { width: 16px; height: 16px; border-radius: 5px; }
.todo-check.sm .material-symbols-outlined { font-size: 11px; }

.todo-row-main { flex: 1; min-width: 0; }
.todo-row-title { font-size: 13px; color: var(--text-hi); line-height: 1.4; word-break: break-word; }
.todo-row-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; font-size: 11px; }
.todo-prio { width: 6px; height: 6px; border-radius: 999px; }
.todo-prio.prio-high { background: #f87171; }
.todo-prio.prio-med  { background: #fbbf24; }
.todo-prio.prio-low  { background: #60a5fa; }
.todo-due { display: inline-flex; align-items: center; gap: 3px; color: var(--text-lo); }
.todo-due .material-symbols-outlined { font-size: 12px; }
.todo-due.is-overdue { color: var(--color-error); }
.todo-sub-count { display: inline-flex; align-items: center; gap: 3px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.todo-sub-count .material-symbols-outlined { font-size: 12px; }
.todo-proj-chip { font-size: 10px; color: var(--text-muted); padding: 1px 6px; border-radius: 4px; background: rgba(255,255,255,0.04); }
.todo-tag { color: #c4a0ff; }
.todo-note-ref { display: inline-flex; align-items: center; gap: 2px; color: var(--color-primary); }
.todo-note-ref .material-symbols-outlined { font-size: 11px; }

.todo-detail-title {
  background: transparent; border: 0; outline: none;
  font-family: inherit;
  font-size: 18px; font-weight: 600; color: var(--text-hi);
  flex: 1; min-width: 0;
}

.todo-meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 24px;
}
.todo-meta-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); margin-bottom: 6px;
}
.todo-prio-pick { display: flex; gap: 4px; }
.todo-prio-btn {
  flex: 1; padding: 7px 10px; border-radius: 7px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer; font-family: inherit;
  font-size: 11px; color: var(--text-lo);
  text-transform: capitalize;
}
.todo-prio-btn:hover { color: #fff; border-color: rgba(127,13,242,0.3); }
.todo-prio-btn.is-active.has-high { background: rgba(248,113,113,0.15); color: #fca5a5; border-color: rgba(248,113,113,0.4); }
.todo-prio-btn.is-active.has-med  { background: rgba(251,191,36,0.15); color: #fcd34d; border-color: rgba(251,191,36,0.4); }
.todo-prio-btn.is-active.has-low  { background: rgba(96,165,250,0.15); color: #93c5fd; border-color: rgba(96,165,250,0.4); }
.todo-prio-btn.is-active:not(.has-high):not(.has-med):not(.has-low) {
  background: rgba(255,255,255,0.06); color: var(--text-md);
}
.todo-due-pick { display: flex; gap: 6px; align-items: center; }
.todo-due-pick input[type="date"] { color-scheme: dark; }

.todo-section { margin-top: 20px; }
.todo-section-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600;
  color: var(--text-lo);
  text-transform: uppercase; letter-spacing: 0.08em;
  padding-bottom: 10px;
}
.todo-section-head .material-symbols-outlined { font-size: 14px; }
.todo-section-head .count { color: var(--color-primary); margin-left: 2px; }
.todo-section-hint { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--text-muted); font-size: 10px; }

.todo-subs { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.todo-sub {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.todo-sub.is-done .todo-sub-title { text-decoration: line-through; color: var(--text-muted); }
.todo-sub-title { flex: 1; font-size: 13px; color: var(--text-md); }

.todo-sub-add {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px dashed var(--color-border);
}
.todo-sub-add .material-symbols-outlined { font-size: 16px; color: var(--text-muted); }
.todo-sub-add input {
  flex: 1; background: transparent; border: 0; outline: none;
  font-family: inherit; font-size: 13px; color: var(--text-hi);
}
.todo-sub-add input::placeholder { color: var(--text-faint); }

.todo-note-drop {
  border: 1px dashed var(--color-border);
  border-radius: 10px; padding: 10px;
  display: flex; flex-wrap: wrap; gap: 8px;
  min-height: 50px;
  background: rgba(255,255,255,0.01);
}
.todo-note-drop.drop-active { border-color: var(--color-primary); background: rgba(127,13,242,0.06); }
.todo-note-drop-empty {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-muted); font-size: 12px;
  padding: 6px;
}
.todo-note-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(127,13,242,0.1);
  border: 1px solid rgba(127,13,242,0.25);
  color: #c4a0ff; font-size: 12px;
}
.todo-note-pill .material-symbols-outlined { font-size: 14px; }

.todo-foot-meta { margin-top: 24px; font-size: 11px; color: var(--text-muted); }

/* ---------- NOTE ---------- */
.note-twopane { grid-template-columns: 280px 1fr; }
.note-folders {
  padding: 6px 12px 8px;
  border-bottom: 1px solid var(--color-border);
  display: flex; flex-direction: column; gap: 2px;
}
.note-folder {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 8px;
  background: transparent; border: 0; cursor: pointer;
  font-family: inherit; font-size: 12px; color: var(--text-lo);
  text-align: left; width: 100%;
}
.note-folder:hover { background: rgba(255,255,255,0.04); color: #fff; }
.note-folder.is-active { background: rgba(127,13,242,0.1); color: var(--color-primary); }
.note-folder .material-symbols-outlined { font-size: 16px; }
.note-folder .count { margin-left: auto; font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.note-row {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px;
  background: transparent; border: 1px solid transparent;
  border-radius: 10px; cursor: pointer;
  font-family: inherit; text-align: left; width: 100%;
  margin-bottom: 2px;
}
.note-row:hover { background: rgba(255,255,255,0.03); }
.note-row.is-selected { background: rgba(127,13,242,0.08); border-color: rgba(127,13,242,0.25); }
.note-row-title { font-size: 13px; font-weight: 600; color: var(--text-hi); }
.note-row-preview {
  font-size: 11px; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.4;
}
.note-row-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 10px; color: var(--text-muted); }
.note-row-time { font-variant-numeric: tabular-nums; }
.note-row-folder { display: inline-flex; align-items: center; gap: 2px; }
.note-row-folder .material-symbols-outlined { font-size: 11px; }
.note-row-tag { color: #c4a0ff; }

.note-title-input {
  background: transparent; border: 0; outline: none;
  font-family: inherit;
  font-size: 18px; font-weight: 600; color: var(--text-hi);
  flex: 1; min-width: 0;
}
.note-meta-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 24px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(0,0,0,0.15);
  font-size: 12px;
}
.note-meta-input {
  background: transparent; border: 0; outline: none;
  font-family: inherit; font-size: 12px; color: var(--text-md);
  width: 90px;
}
.note-meta-input.wide { width: 200px; }
.note-meta-input::placeholder { color: var(--text-faint); }
.note-meta-bar .sep { color: var(--text-faint); }
.note-meta-time { font-size: 11px; color: var(--text-muted); margin-left: 6px; }

.lh-segmented {
  display: inline-flex;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px; padding: 2px;
}
.lh-segmented button {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 9px; font-size: 12px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-lo); font-family: inherit; border-radius: 6px;
}
.lh-segmented button:hover { color: #fff; }
.lh-segmented button.is-active { background: var(--color-primary); color: #fff; }
.lh-segmented button .material-symbols-outlined { font-size: 14px; }

.note-editor { flex: 1; display: grid; min-height: 0; overflow: hidden; }
.note-editor.mode-edit { grid-template-columns: 1fr; }
.note-editor.mode-preview { grid-template-columns: 1fr; }
.note-editor.mode-split { grid-template-columns: 1fr 1fr; }

.note-textarea {
  background: transparent; border: 0; outline: none;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px; line-height: 1.65; color: var(--text-md);
  padding: 24px; resize: none;
  border-right: 1px solid var(--color-border);
}
.note-editor.mode-edit .note-textarea { border-right: 0; }
.note-textarea::placeholder { color: var(--text-faint); }

.note-preview { padding: 24px; overflow-y: auto; min-height: 0; }
.md-view { color: var(--text-md); font-size: 14px; line-height: 1.7; }
.md-view p { margin: 0 0 14px; }
.md-view .md-h1 { font-size: 24px; font-weight: 700; color: var(--text-hi); margin: 0 0 16px; letter-spacing: -0.01em; }
.md-view .md-h2 { font-size: 19px; font-weight: 700; color: var(--text-hi); margin: 24px 0 12px; }
.md-view .md-h3 { font-size: 16px; font-weight: 600; color: var(--text-hi); margin: 20px 0 10px; }
.md-view .md-h4, .md-view .md-h5, .md-view .md-h6 { font-size: 14px; font-weight: 600; color: var(--text-hi); margin: 16px 0 8px; }
.md-view strong { color: var(--text-hi); font-weight: 700; }
.md-view em { color: var(--text-hi); }
.md-view a { color: var(--color-primary); text-decoration: none; }
.md-view a:hover { text-decoration: underline; }
.md-view .md-wiki { color: #c4a0ff; cursor: pointer; padding: 0 2px; border-bottom: 1px dashed rgba(127,13,242,0.4); }
.md-view .md-wiki:hover { background: rgba(127,13,242,0.1); }
.md-view .md-list { padding-left: 22px; margin: 0 0 14px; }
.md-view .md-list li { margin-bottom: 4px; }
.md-view .md-quote {
  border-left: 3px solid var(--color-primary); padding: 4px 14px;
  color: var(--text-lo); margin: 0 0 14px;
  background: rgba(127,13,242,0.04); border-radius: 0 6px 6px 0;
}
.md-view .md-inline-code {
  font-family: ui-monospace, Menlo, monospace; font-size: 12.5px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  padding: 1px 5px; border-radius: 4px; color: #c4a0ff;
}
.md-view .md-code {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 10px; padding: 14px; margin: 0 0 14px;
  overflow-x: auto;
}
.md-view .md-code code {
  font-family: ui-monospace, Menlo, monospace; font-size: 12.5px;
  color: var(--text-hi); line-height: 1.6;
}
.md-view .md-hr { border: 0; border-top: 1px solid var(--color-border); margin: 20px 0; }

.note-backlinks {
  margin-top: 32px; padding-top: 16px;
  border-top: 1px solid var(--color-border);
}
.note-backlinks-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600;
  color: var(--text-lo); text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.note-backlinks-head .material-symbols-outlined { font-size: 14px; }
.note-backlinks-head .count { color: var(--color-primary); }
.note-backlink-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer; font-family: inherit;
  font-size: 13px; color: var(--text-md);
  margin-bottom: 4px; width: 100%; text-align: left;
}
.note-backlink-item:hover { color: #fff; border-color: rgba(127,13,242,0.3); }
.note-backlink-item .material-symbols-outlined { font-size: 14px; color: var(--color-primary); }

/* ---------- JSON ---------- */
.json-twopane { grid-template-columns: 280px 1fr; }
.json-row {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 12px; border-radius: 10px;
  background: transparent; border: 1px solid transparent;
  cursor: pointer; font-family: inherit; text-align: left; width: 100%;
  margin-bottom: 2px;
}
.json-row:hover { background: rgba(255,255,255,0.03); }
.json-row.is-selected { background: rgba(127,13,242,0.08); border-color: rgba(127,13,242,0.25); }
.json-row-title { font-size: 13px; font-weight: 600; color: var(--text-hi); }
.json-row-meta { display: flex; gap: 6px; font-size: 10px; color: var(--text-muted); }

.json-title-input {
  background: transparent; border: 0; outline: none;
  font-family: inherit; font-size: 17px; font-weight: 600;
  color: var(--text-hi); flex: 1; min-width: 0;
}

.json-status {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 24px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(0,0,0,0.15);
  font-size: 11px;
}
.json-status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
}
.json-status-pill.ok { background: rgba(52,211,153,0.1); color: #6ee7b7; border: 1px solid rgba(52,211,153,0.25); }
.json-status-pill.err { background: rgba(248,113,113,0.1); color: #fca5a5; border: 1px solid rgba(248,113,113,0.25); }
.json-status-pill .material-symbols-outlined { font-size: 13px; }
.json-status-meta { color: var(--text-muted); font-variant-numeric: tabular-nums; }

.json-search-bar {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--color-border);
}
.json-search-wrap, .json-path-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.json-search-wrap:focus-within, .json-path-wrap:focus-within {
  border-color: rgba(127,13,242,0.4);
}
.json-search-wrap > .material-symbols-outlined,
.json-path-wrap > .material-symbols-outlined { font-size: 15px; color: var(--text-muted); }
.json-search-wrap input, .json-path-wrap input {
  flex: 1; background: transparent; border: 0; outline: none;
  font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--text-hi);
  min-width: 0;
}
.json-search-wrap input::placeholder, .json-path-wrap input::placeholder { color: var(--text-faint); font-family: inherit; }

.json-error-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 24px;
  background: rgba(248,113,113,0.08);
  border-bottom: 1px solid rgba(248,113,113,0.25);
  color: #fca5a5; font-size: 12px;
}
.json-error-banner .material-symbols-outlined { font-size: 16px; }
.json-error-banner .loc { color: var(--text-muted); margin-left: auto; font-family: ui-monospace, Menlo, monospace; }

.json-path-result {
  padding: 10px 24px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(127,13,242,0.04);
}
.json-path-head { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-lo); }
.json-path-head .material-symbols-outlined { font-size: 14px; color: var(--color-primary); }
.json-path-head .count { color: var(--color-primary); font-weight: 600; }
.json-path-head .err { color: var(--color-error); }
.json-path-pre {
  margin: 8px 0 0; padding: 10px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: 8px; font-family: ui-monospace, Menlo, monospace;
  font-size: 11.5px; color: var(--text-md);
  max-height: 160px; overflow: auto; line-height: 1.5;
}

.json-drop-active {
  outline: 2px dashed var(--color-primary);
  outline-offset: -8px;
  background: rgba(var(--primary-rgb, 127,13,242), 0.04);
}
.json-drop-active::before {
  content: "Drop .json file to import";
  position: absolute;
  inset: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
  color: var(--color-primary);
  background: rgba(var(--primary-rgb, 127,13,242), 0.08);
  border-radius: 12px;
  pointer-events: none;
  z-index: 5;
}

.json-tree {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px; line-height: 1.55;
  padding: 14px 24px; min-height: 100%;
  overflow-x: auto;
  display: flex;
  flex-direction: column;
}
.jv-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  min-height: 22px;
  white-space: nowrap;
}
.jv-row.jv-container { cursor: pointer; }
.jv-row.jv-container:hover { background: rgba(127,13,242,0.04); }
.jv-row[data-matched="yes"] { background: rgba(127,13,242,0.05); }
.jv-indent { flex-shrink: 0; display: inline-block; }
.jv-spacer { width: 16px; flex-shrink: 0; display: inline-block; }
.jv-toggle {
  width: 16px; height: 22px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: transform 120ms;
}
.jv-toggle .material-symbols-outlined { font-size: 16px; }
.jv-toggle.is-open { transform: rotate(90deg); color: var(--color-primary); }
.jv-key { color: #93c5fd; }
.jv-key[data-matched="yes"] { background: rgba(251,191,36,0.2); color: #fcd34d; padding: 0 2px; border-radius: 2px; }
.jv-colon { color: var(--text-muted); margin-right: 6px; }
.jv-bracket { color: var(--text-lo); }
.jv-bracket.close { color: var(--text-lo); }
.jv-stats { color: var(--text-muted); margin: 0 8px; font-style: italic; font-size: 12px; }
.jv-leaf { word-break: break-all; }
.jv-leaf.null { color: var(--text-muted); font-style: italic; }
.jv-leaf.bool { color: #fcd34d; }
.jv-leaf.num { color: #6ee7b7; }
.jv-leaf.str { color: #c4a0ff; }
.jv-hl { background: rgba(251,191,36,0.2); border-radius: 2px; }
.jv-show-more {
  background: transparent;
  border: 1px dashed var(--color-border);
  color: var(--text-lo);
  padding: 4px 10px; border-radius: 6px;
  font-family: inherit; font-size: 11px; cursor: pointer;
  margin: 4px 0;
}
.jv-show-more:hover { color: var(--color-primary); border-color: rgba(127,13,242,0.4); }

.json-raw {
  flex: 1; width: 100%; height: 100%;
  background: transparent; border: 0; outline: none;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px; line-height: 1.65; color: var(--text-md);
  padding: 18px 24px; resize: none;
  tab-size: 2;
}

/* ---------- DIFF ---------- */
.diff-tool { padding: 0; }
.diff-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--color-border);
}
.diff-pair {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--color-border);
  border-bottom: 1px solid var(--color-border);
  height: 220px;
  flex-shrink: 0;
}
.diff-side { display: flex; flex-direction: column; background: var(--color-bg); min-width: 0; }
.diff-side-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid var(--color-border);
  font-size: 11px; color: var(--text-lo);
  text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 600;
}
.diff-side-head .count { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.diff-side-head .material-symbols-outlined { font-size: 14px; }
.diff-input {
  flex: 1; background: transparent; border: 0; outline: none;
  font-family: ui-monospace, Menlo, monospace; font-size: 12.5px;
  color: var(--text-md); padding: 12px 14px; resize: none;
  line-height: 1.6;
}
.diff-input::placeholder { color: var(--text-faint); }

.diff-result { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.diff-result-head {
  padding: 10px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--text-lo);
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
}
.diff-result-head .material-symbols-outlined { font-size: 14px; color: var(--color-primary); }
.diff-rows {
  flex: 1; overflow: auto;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12.5px;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--color-bg);
}
.diff-row { display: contents; }
.diff-cell {
  display: flex; align-items: flex-start;
  padding: 0 12px;
  white-space: pre-wrap; word-break: break-all;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  border-right: 1px solid var(--color-border);
  line-height: 1.6;
  min-height: 22px;
}
.diff-cell:last-child { border-right: 0; }
.diff-cell.del { background: rgba(248,113,113,0.07); }
.diff-cell.add { background: rgba(52,211,153,0.07); }
.diff-cell.pad { background: rgba(255,255,255,0.01); }
.diff-cell.eq  { color: var(--text-md); }
.diff-no {
  width: 32px; flex-shrink: 0;
  color: var(--text-muted); text-align: right;
  margin-right: 10px; font-size: 11px;
  user-select: none;
}
.diff-mark { width: 14px; flex-shrink: 0; color: var(--text-muted); user-select: none; }
.diff-cell.del .diff-mark { color: var(--color-error); }
.diff-cell.add .diff-mark { color: var(--color-success); }
.diff-text { flex: 1; }
.diff-cell.del .diff-text { color: #fca5a5; }
.diff-cell.add .diff-text { color: #6ee7b7; }

/* ---------- PASSWORD ---------- */
.pwd-tool { padding: 0; }
.pwd-grid {
  display: grid; grid-template-columns: 1fr 320px;
  flex: 1; min-height: 0; overflow: hidden;
}
.pwd-main {
  padding: 24px 28px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px;
}
.pwd-output {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 18px;
  background: linear-gradient(135deg, rgba(127,13,242,0.12), rgba(25,16,34,0.6) 60%, rgba(127,13,242,0.05));
  border: 1px solid rgba(127,13,242,0.3);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(127,13,242,0.1);
}
.pwd-output-text {
  flex: 1; font-family: ui-monospace, Menlo, monospace;
  font-size: 22px; color: var(--text-hi);
  word-break: break-all; letter-spacing: 0.02em;
  font-weight: 600;
}
.pwd-output-text[data-empty="yes"] { color: var(--text-faint); font-weight: 400; }
.pwd-output-actions { display: flex; gap: 4px; }

.pwd-strength {
  display: flex; align-items: center; gap: 12px;
}
.pwd-strength-bar {
  flex: 1; height: 6px;
  background: var(--color-border);
  border-radius: 999px; overflow: hidden;
}
.pwd-strength-fill {
  height: 100%; transition: width 200ms, background 200ms;
  border-radius: 999px;
}
.pwd-bits { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.pwd-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
}
.pwd-section-head { display: flex; gap: 6px; }
.pwd-row {
  display: flex; align-items: center; gap: 14px;
}
.pwd-row label {
  font-size: 11px; font-weight: 600; color: var(--text-lo);
  text-transform: uppercase; letter-spacing: 0.06em;
  width: 80px;
}
.pwd-slider { flex: 1; }
.pwd-num {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 14px; color: var(--text-hi); width: 28px; text-align: right;
}
.pwd-seps { display: flex; gap: 4px; flex-wrap: wrap; }

.pwd-toggles {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.pwd-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  cursor: pointer; font-family: inherit;
  text-align: left;
}
.pwd-toggle:hover { border-color: rgba(127,13,242,0.3); }
.pwd-toggle.is-on {
  background: rgba(127,13,242,0.08);
  border-color: rgba(127,13,242,0.4);
}
.pwd-toggle-dot {
  width: 14px; height: 14px; border-radius: 4px;
  border: 1.5px solid var(--text-faint);
  flex-shrink: 0;
}
.pwd-toggle.is-on .pwd-toggle-dot {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(127,13,242,0.2);
}
.pwd-toggle-label { flex: 1; font-size: 13px; color: var(--text-md); }
.pwd-toggle.is-on .pwd-toggle-label { color: var(--text-hi); }
.pwd-toggle-sample {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px; color: var(--text-muted);
}

.pwd-save {
  display: flex; align-items: center; gap: 8px;
}
.pwd-save .lh-input { flex: 1; }

.pwd-vault {
  border-left: 1px solid var(--color-border);
  background: rgba(10,7,14,0.3);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.pwd-vault-head {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 16px 8px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-lo);
}
.pwd-vault-head .material-symbols-outlined { font-size: 14px; color: var(--color-primary); }
.pwd-vault-head .count { color: var(--color-primary); margin-left: auto; }
.pwd-vault-note {
  padding: 0 16px 12px;
  font-size: 11px; color: var(--text-muted);
  border-bottom: 1px solid var(--color-border);
  line-height: 1.5;
}
.pwd-vault-list { flex: 1; overflow-y: auto; padding: 8px; }
.pwd-vault-row {
  display: grid;
  grid-template-columns: 1fr 28px 28px 28px;
  align-items: center; gap: 6px;
  padding: 10px;
  border-radius: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  margin-bottom: 6px;
}
.pwd-vault-meta { grid-column: 1 / -1; }
.pwd-vault-label { font-size: 12px; font-weight: 600; color: var(--text-hi); }
.pwd-vault-time { font-size: 10px; color: var(--text-muted); }
.pwd-vault-value {
  grid-column: 1 / 2;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px; color: var(--text-md);
  word-break: break-all;
  margin-top: 6px;
}
.pwd-vault-row .lh-iconbtn { margin-top: 6px; width: 28px; height: 28px; }

/* ---------- BOOKMARKS ---------- */
.bm-tool { padding: 0; }
.bm-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--color-border);
}
.bm-search {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px; min-width: 280px;
}
.bm-search:focus-within { border-color: rgba(127,13,242,0.4); }
.bm-search input {
  flex: 1; background: transparent; border: 0; outline: none;
  font-family: inherit; font-size: 13px; color: var(--text-hi); min-width: 0;
}
.bm-search .material-symbols-outlined { font-size: 16px; color: var(--text-muted); }
.bm-count { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.bm-add {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 1fr auto auto;
  gap: 8px; padding: 14px 24px;
  background: rgba(127,13,242,0.04);
  border-bottom: 1px solid var(--color-border);
}

.bm-folders-bar {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 12px 24px;
  border-bottom: 1px solid var(--color-border);
}

.bm-grid {
  flex: 1; overflow-y: auto;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  align-content: start;
}
.bm-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: all 150ms;
}
.bm-card:hover {
  border-color: rgba(127,13,242,0.4);
  background: rgba(127,13,242,0.04);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.bm-favicon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative; overflow: hidden;
}
.bm-favicon img { width: 24px; height: 24px; position: relative; z-index: 1; }
.bm-favicon .material-symbols-outlined { position: absolute; font-size: 18px; color: var(--text-muted); }
.bm-card-body { flex: 1; min-width: 0; }
.bm-card-title {
  font-size: 13px; font-weight: 600; color: var(--text-hi);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bm-card-url {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.bm-card-meta {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 8px;
  font-size: 10px;
}
.bm-card-folder {
  display: inline-flex; align-items: center; gap: 3px;
  color: var(--text-lo);
  background: rgba(255,255,255,0.04);
  padding: 1px 6px; border-radius: 4px;
}
.bm-card-folder .material-symbols-outlined { font-size: 11px; }
.bm-card-tag { color: #c4a0ff; }
.bm-card-del {
  position: absolute; top: 8px; right: 8px;
  opacity: 0;
}
.bm-card:hover .bm-card-del { opacity: 1; }

/* Universal search */
.us-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh; z-index: 200;
}
.us-panel {
  width: min(640px, 90vw);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(127,13,242,0.15);
  overflow: hidden;
}
.us-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
}
.us-input-wrap > .material-symbols-outlined { font-size: 20px; color: var(--color-primary); }
.us-input {
  flex: 1; background: transparent; border: 0; outline: none;
  font-family: inherit; font-size: 16px; color: var(--text-hi);
}
.us-input::placeholder { color: var(--text-faint); }
.us-input-wrap kbd {
  font-size: 10px; padding: 2px 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--color-border); border-radius: 4px;
  color: var(--text-muted); font-family: ui-monospace, Menlo, monospace;
}
.us-results { max-height: 60vh; overflow-y: auto; padding: 6px; }
.us-section-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 10px 12px 4px;
}
.us-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  background: transparent; border: 0; cursor: pointer;
  font-family: inherit; text-align: left; width: 100%;
  color: var(--text-md);
}
.us-item:hover, .us-item.is-active { background: rgba(127,13,242,0.1); color: #fff; }
.us-item .material-symbols-outlined { font-size: 16px; color: var(--text-muted); }
.us-item.is-active .material-symbols-outlined { color: var(--color-primary); }
.us-item-title { flex: 1; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.us-item-meta { font-size: 11px; color: var(--text-muted); }
.us-foot {
  padding: 10px 14px; font-size: 11px; color: var(--text-muted);
  border-top: 1px solid var(--color-border);
  display: flex; gap: 14px;
}
.us-foot kbd {
  font-size: 10px; padding: 1px 5px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--color-border); border-radius: 4px;
  font-family: ui-monospace, Menlo, monospace;
}
