/* ==========================================================================
   Nexos — Editor de item (nota, ideia, tarefa, lista, link, evento, meta)
   Prefixo: .nt-   (usado na página #/nota/:id e dentro de janelas flutuantes)
   ========================================================================== */

.nt-host { position: relative; }
.nt { position: relative; --nt-gutter: 52px; }
.nt-page { padding-top: 22px; }

/* ---- Capa (aparece quando o item tem cor) ---- */
.nt-cover { height: 6px; }
.nt-cover.has-color {
  position: relative; overflow: hidden;
  height: 116px; margin-bottom: -34px;
  border-radius: var(--r-xl);
  background:
    radial-gradient(60% 120% at 92% 10%, color-mix(in srgb, var(--c-s) 30%, transparent), transparent 70%),
    radial-gradient(120% 160% at 0% 0%, var(--c-bg), color-mix(in srgb, var(--c-s) 34%, var(--c-bg)));
  animation: fade .3s var(--ease);
}
.nt-cover.has-color::after {
  content: ""; position: absolute; inset: 0; opacity: .35;
  background-image: radial-gradient(color-mix(in srgb, var(--c-s) 55%, transparent) 1.2px, transparent 1.4px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 85%);
          mask-image: linear-gradient(100deg, transparent 30%, #000 85%);
}
.nt.is-compact .nt-cover { height: 4px; }
.nt.is-compact .nt-cover.has-color { height: 62px; border-radius: 0; margin-bottom: -26px; }

.nt-inner { position: relative; }
.nt.is-compact .nt-inner { padding: 14px 28px 40px 34px; }

/* ---- Cabeçalho ---- */
.nt-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0 0 14px; }
.nt-emoji {
  position: relative; z-index: 1;
  min-width: 60px; height: 60px; padding: 0 6px; border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 40px; line-height: 1;
  transition: background var(--dur), transform .2s var(--spring), box-shadow var(--dur);
}
.nt-emoji:hover { background: var(--hover); transform: scale(1.04); }
.nt.has-cover .nt-emoji { background: var(--surface); box-shadow: var(--shadow); margin-left: 18px; }
.nt.has-cover .nt-emoji:hover { background: var(--surface-2); }
.nt-emoji.is-empty { height: 40px; min-width: 0; padding: 0 12px 0 6px; border-radius: 12px; font-size: 14px; color: var(--text-3); }
.nt.has-cover .nt-emoji.is-empty { height: 46px; }
.nt-emoji-ph { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-3); display: grid; place-items: center; color: var(--text-2); }
.nt-emoji-ph svg.lucide { width: 18px; height: 18px; }
.nt-emoji-add { font-size: 12.5px; font-weight: 560; opacity: 0; transition: opacity var(--dur); }
.nt-emoji:hover .nt-emoji-add, .nt-emoji:focus-visible .nt-emoji-add { opacity: 1; }
.nt-emoji-rm { margin-top: 8px; color: var(--text-2); }
.nt.is-compact .nt-emoji { min-width: 50px; height: 50px; font-size: 32px; border-radius: 15px; }
.nt.is-compact.has-cover .nt-emoji { margin-left: 0; }
.nt.is-compact .nt-emoji.is-empty { height: 38px; font-size: 13px; }

.nt-title {
  width: 100%; outline: none; cursor: text;
  font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: 600;
  letter-spacing: -.02em; line-height: 1.15; color: var(--text);
  white-space: pre-wrap; word-break: break-word; caret-color: var(--accent);
}
.nt-title:empty::before { content: attr(data-ph); color: var(--text-3); pointer-events: none; }
.nt.is-compact .nt-title { font-size: 26px; }

/* ---- Propriedades (pílulas) ---- */
.nt-props { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.nt-pill {
  display: inline-flex; align-items: center; gap: 6px; max-width: 240px;
  height: 30px; padding: 0 11px; border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12.8px; font-weight: 560; color: var(--text-2);
  transition: background var(--dur), border-color var(--dur), color var(--dur), transform .08s;
}
.nt-pill:hover { background: var(--surface-2); border-color: var(--border-2); color: var(--text); }
.nt-pill:active { transform: scale(.97); }
.nt-pill svg.lucide { width: 14px; height: 14px; }
.nt-pill .nt-caret { width: 13px; height: 13px; opacity: .55; margin-left: -2px; }
.nt-pill-emoji { font-size: 14px; line-height: 1; }
.nt-pill-icon { width: 30px; padding: 0; justify-content: center; }
.nt-pill.is-on { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.nt-pill.is-secret { background: var(--text); border-color: var(--text); color: var(--bg); }
.nt-pill.is-secret:hover { background: var(--text-2); border-color: var(--text-2); color: var(--bg); }
.nt-swatch { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-3); box-shadow: inset 0 0 0 1.5px var(--border-2); }
.nt-pill-color[class*="c-"] .nt-swatch { background: var(--c-s); box-shadow: 0 0 0 2px var(--c-bg); }
.nt-pill-color[class*="c-"] { background: var(--c-bg); border-color: transparent; color: var(--c-ink); }
.nt-props-gap { flex: 1; }
.nt-seen { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 4px 0 2px; font-size: 12.3px; color: var(--text-3); white-space: nowrap; }
.nt-seen .avatar-stack .avatar { box-shadow: 0 0 0 2px var(--bg); }

/* ---- Tags ---- */
.nt-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; min-height: 30px; }
.nt-tags-ic { width: 15px; height: 15px; color: var(--text-3); margin-right: 2px; }
.nt-tag {
  display: inline-flex; align-items: center; gap: 2px; height: 26px; padding: 0 4px 0 10px;
  border-radius: var(--r-full); background: var(--surface-3); color: var(--text-2);
  font-size: 12.5px; font-weight: 560; animation: pop .18s var(--ease);
}
.nt-tag button { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); }
.nt-tag button:hover { background: var(--active); color: var(--text); }
.nt-tag button svg.lucide { width: 12px; height: 12px; }
.nt-tag-input {
  height: 26px; min-width: 90px; width: 120px; padding: 0 10px; border-radius: var(--r-full);
  border: 1px dashed var(--border-2); background: transparent; outline: none; font-size: 12.5px; color: var(--text);
  transition: border-color var(--dur), width .2s var(--ease), background var(--dur);
}
.nt-tag-input::placeholder { color: var(--text-3); }
.nt-tag-input:focus { border-style: solid; border-color: var(--accent); background: var(--surface); width: 170px; box-shadow: 0 0 0 3px var(--accent-ring); }
.popover.nt-tag-pop { padding: 6px; min-width: 190px; max-width: 260px; }
.nt-tag-sugg { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 3px 3px; }
.nt-tag-opt { height: 28px; padding: 0 10px; border-radius: var(--r-full); background: var(--surface-3); color: var(--text-2); font-size: 12.5px; font-weight: 560; }
.nt-tag-opt:hover, .nt-tag-opt.hl { background: var(--accent-soft); color: var(--accent-ink); }

/* ---- Cartões de campos por tipo ---- */
.nt-ext { margin-bottom: 18px; }
.nt-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 14px 16px; }
.nt-fields { display: flex; flex-direction: column; gap: 12px; }
.nt-fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.nt-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nt-fields-2 .nt-field { flex-direction: column; align-items: stretch; gap: 6px; }
.nt-flabel { display: inline-flex; align-items: center; gap: 7px; width: 116px; flex-shrink: 0; font-size: 12.8px; font-weight: 600; color: var(--text-2); }
.nt-flabel svg.lucide { width: 15px; height: 15px; color: var(--text-3); }
.nt-fwrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.nt-quick { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.nt-quick .chip { height: 26px; }
.nt-date { width: auto; height: 34px; }
.nt-seg button.on.nt-st-done { color: var(--success); }
.nt-seg button.on.nt-st-doing { color: var(--info); }
.nt-people { display: flex; gap: 6px; flex-wrap: wrap; }
.nt-person {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 5px; border-radius: var(--r-full);
  border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 560; color: var(--text-2);
  transition: border-color var(--dur), background var(--dur), box-shadow var(--dur);
}
.nt-person:hover { border-color: var(--border-2); color: var(--text); }
.nt-person.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); box-shadow: 0 0 0 2px var(--accent-ring); }
.nt-nobody { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); }
.nt-nobody svg.lucide { width: 14px; height: 14px; }

/* link */
.nt-url { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 6px 0 12px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface-2); transition: border-color var(--dur), box-shadow var(--dur); }
.nt-url:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); background: var(--surface); }
.nt-url-ic { color: var(--text-3); display: inline-flex; }
.nt-url input { flex: 1; min-width: 0; font-size: 13.5px; }
.nt-preview { position: relative; display: flex; gap: 14px; align-items: stretch; margin-top: 12px; padding: 12px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface-2); }
.nt-preview-thumb { width: 74px; min-height: 74px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--c-bg), color-mix(in srgb, var(--c-s) 45%, var(--c-bg))); color: var(--c-ink); font-family: var(--font-display); font-size: 30px; font-weight: 700; }
.nt-preview-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nt-preview-dom { display: flex; align-items: center; gap: 5px; font-size: 11.8px; color: var(--text-3); font-weight: 560; }
.nt-preview-dom svg.lucide { width: 12px; height: 12px; }
.nt-preview-title { font-weight: 650; line-height: 1.35; }
.nt-preview-desc { font-size: 12.5px; color: var(--text-2); }


/* evento */
.nt-event { display: flex; align-items: center; gap: 14px; }
.nt-cal { width: 56px; height: 62px; border-radius: 14px; flex-shrink: 0; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; overflow: hidden; }
.nt-cal span { font-size: 10.5px; font-weight: 750; text-transform: uppercase; color: var(--accent); letter-spacing: .04em; }
.nt-cal b { font-size: 24px; color: var(--text); }
.nt-cal.is-empty { color: var(--text-3); border-style: dashed; box-shadow: none; }
.nt-event-day { font-weight: 650; text-transform: capitalize; }
.nt-when { display: inline-block; margin-top: 4px; font-size: 11.8px; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); padding: 1px 8px; border-radius: var(--r-full); }

/* meta */
.nt-goal-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.nt-goal-pct { font-family: var(--font-display); font-size: 34px; font-weight: 650; line-height: 1; letter-spacing: -.02em; color: var(--text); }
.nt-goal-pct b { font-weight: inherit; }
.nt-range {
  --p: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: 12px; border-radius: 999px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--c-s, var(--accent)) var(--p), var(--surface-3) var(--p));
}
.nt-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 3px solid var(--c-s, var(--accent)); box-shadow: var(--shadow); transition: transform .15s var(--spring); }
.nt-range::-webkit-slider-thumb:hover { transform: scale(1.12); }
.nt-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--c-s, var(--accent)); box-shadow: var(--shadow); }
.nt-range:focus-visible { box-shadow: 0 0 0 3px var(--accent-ring); }
.nt-goal-marks { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--text-3); }

/* lista (checklist) */
.nt-cl { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 12px 12px 8px; }
.nt-cl[class*="c-"] { border-color: color-mix(in srgb, var(--c-s) 30%, var(--border)); }
.nt-cl-head { display: flex; align-items: center; gap: 12px; padding: 2px 4px 10px; }
.nt-cl-count { font-size: 12.8px; color: var(--text-2); white-space: nowrap; }
.nt-cl-count b { color: var(--text); }
.nt-cl-head .progress { height: 7px; }
.nt-cl-items { display: flex; flex-direction: column; gap: 1px; border-radius: var(--r); }
.nt-cl-row { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 2px 4px 2px 0; border-radius: 10px; transition: background var(--dur); }
.nt-cl-row:hover, .nt-cl-row:focus-within { background: var(--hover); }
.nt-cl-handle { width: 20px; height: 28px; }
.nt-cl-row .check { width: 21px; height: 21px; }
.nt-cl-row .check.on { background: var(--c-s, var(--accent)); border-color: var(--c-s, var(--accent)); }
.nt-cl-text { flex: 1; min-width: 0; height: 32px; border: 0; background: transparent; outline: none; font-size: 14.5px; color: var(--text); padding: 0 4px; border-radius: 6px; }
.nt-cl-text::placeholder { color: var(--text-3); }
.nt-cl-row.is-done .nt-cl-text { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--border-2); }
.nt-cl-del { opacity: 0; transition: opacity var(--dur); }
.nt-cl-row:hover .nt-cl-del, .nt-cl-row:focus-within .nt-cl-del { opacity: 1; }
.nt-cl-add { display: flex; align-items: center; gap: 10px; min-height: 42px; margin-top: 4px; padding: 0 8px 0 26px; border-radius: 10px; color: var(--text-3); cursor: text; border-top: 1px dashed var(--border); }
.nt-cl-add input { flex: 1; min-width: 0; height: 36px; border: 0; background: transparent; outline: none; font-size: 14px; color: var(--text); }
.nt-cl-add input::placeholder { color: var(--text-3); }
.nt-cl-add:focus-within { color: var(--accent); }

/* propriedades personalizadas */
.nt-cprops { margin-bottom: 18px; }
.nt-ptable { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.nt-ptable:empty { display: none; }
.nt-prow { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 34px; align-items: center; border-bottom: 1px solid var(--border); }
.nt-prow:last-child { border-bottom: 0; }
.nt-prow input { height: 38px; border: 0; background: transparent; outline: none; padding: 0 12px; font-size: 13.5px; color: var(--text); min-width: 0; }
.nt-prow input:focus { background: var(--accent-soft); }
.nt-pkey { color: var(--text-2) !important; font-weight: 600; background: var(--surface-2) !important; border-right: 1px solid var(--border) !important; }
.nt-pkey:focus { background: var(--accent-soft) !important; }
.nt-prow .btn { opacity: .5; }
.nt-prow:hover .btn { opacity: 1; }
.nt-padd { margin-top: 6px; color: var(--text-3); }

/* ---- Títulos de seção ---- */
.nt-sec-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--text-2); margin: 0 0 10px; }
.nt-sec-title svg.lucide { width: 15px; height: 15px; color: var(--text-3); }
.nt-sec-title .btn { margin-left: auto; }
.nt-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-full); background: var(--surface-3); color: var(--text-2); font-size: 11.5px; display: inline-grid; place-items: center; }
/* ---- Tempo real: quem está aqui, quem enviou, o que acabou de mudar ---- */
.nt-live {
  display: inline-flex; align-items: center; gap: 8px; margin: -4px 0 12px;
  padding: 4px 12px 4px 5px; border-radius: var(--r-full);
  background: color-mix(in srgb, var(--success) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--success) 30%, var(--border));
  color: var(--text-2); font-size: 12.5px; font-weight: 560;
  animation: pop .25s var(--spring);
}
.nt-live[hidden] { display: none; }
.nt-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: pulse 1.6s ease-in-out infinite; flex-shrink: 0; }
.nt-from {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 10px 14px 10px 10px;
  border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--border);
}
.nt-from[hidden] { display: none; }
.nt-from > .avatar { flex-shrink: 0; margin-top: 1px; }
.nt-from-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.nt-from-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 13px; color: var(--text-2); }
.nt-from-head svg.lucide { width: 13px; height: 13px; color: var(--text-3); }
.nt-from-head b { color: var(--text); font-weight: 650; }
.nt-from-when { color: var(--text-3); font-size: 12px; }
.nt-from-when::before { content: "·"; margin-right: 6px; }
.nt-from-msg {
  margin: 0; padding: 6px 10px; border-radius: 4px var(--r) var(--r) var(--r);
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere;
}
.nt-remote { animation: ntRemote 1.6s var(--ease); border-radius: 8px; }
@keyframes ntRemote {
  0%, 30% { background: color-mix(in srgb, var(--info) 14%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--info) 14%, transparent); }
  100% { background: transparent; box-shadow: 0 0 0 3px transparent; }
}
@media (prefers-reduced-motion: reduce) { .nt-remote, .nt-live, .nt-live-dot { animation: none; } }

/* ==========================================================================
   Editor de blocos
   ========================================================================== */
.nt-doc { margin-bottom: 8px; }
.nt-doc:not(.is-main) { margin-top: 4px; }
.nt-blocks { position: relative; display: flex; flex-direction: column; }
.nt-blocks-tail { min-height: 26px; cursor: text; }
.nt-doc.is-main .nt-blocks-tail { min-height: 96px; }

.nt-block { position: relative; display: flex; align-items: flex-start; gap: 8px; border-radius: 8px; }
.nt-b-gutter {
  position: absolute; left: calc(var(--nt-gutter) * -1); top: 4px; width: var(--nt-gutter); padding-right: 6px;
  display: flex; justify-content: flex-end; align-items: center; gap: 1px;
  opacity: 0; transition: opacity .15s;
}
.nt-block:hover > .nt-b-gutter, .nt-block:focus-within > .nt-b-gutter { opacity: 1; }
.nt-b-add, .nt-b-gutter .nt-b-handle {
  width: 22px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: var(--text-3);
}
.nt-b-gutter .drag-handle { opacity: 1; }
.nt-b-add:hover, .nt-b-gutter .nt-b-handle:hover { background: var(--hover); color: var(--text); }
.nt-b-add svg.lucide, .nt-b-handle svg.lucide { width: 15px; height: 15px; }

.nt-b-text {
  flex: 1; min-width: 0; outline: none; cursor: text;
  padding: 3px 2px; font-size: 15.5px; line-height: 1.68; color: var(--text);
  white-space: pre-wrap; word-break: break-word; caret-color: var(--accent);
}
.nt.is-compact .nt-b-text { font-size: 14.8px; }
.nt-b-text:empty::before { content: attr(data-ph); color: var(--text-3); pointer-events: none; }
.nt-b-p .nt-b-text:empty:not(:focus)::before { content: none; }
.nt-blocks.is-empty .nt-b-p .nt-b-text:empty::before { content: attr(data-ph-empty); }

/* tipos */
.nt-b-h { margin-top: 16px; }
.nt-b-h:first-child { margin-top: 2px; }
.nt-b-h .nt-b-text { font-size: 21px; font-weight: 700; letter-spacing: -.012em; line-height: 1.35; }
.nt-b-h > .nt-b-gutter { top: 7px; }
.nt.is-compact .nt-b-h .nt-b-text { font-size: 18.5px; }

.nt-b-dot { width: 22px; height: 26px; flex-shrink: 0; display: grid; place-items: center; margin-top: 3px; }
.nt-b-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-2); }

.nt-b-check { margin-top: 6px; width: 19px; height: 19px; margin-left: 1px; margin-right: 1px; }
.nt-b-todo.is-done .nt-b-text { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--border-2); }

.nt-b-quote .nt-b-text { border-left: 3px solid var(--accent); padding-left: 14px; font-family: var(--font-display); font-size: 17px; color: var(--text-2); margin: 4px 0; }

.nt-b-callout {
  padding: 10px 14px 10px 10px; margin: 6px 0; gap: 10px;
  background: var(--accent-soft); border-radius: var(--r);
}
.nt-b-callout > .nt-b-gutter { top: 13px; }
.nt-b-callout .nt-b-text { color: var(--accent-ink); }
.nt-b-emoji { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; font-size: 19px; line-height: 1; display: grid; place-items: center; margin-top: 1px; }
.nt-b-emoji:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }

.nt-b-divider { padding: 10px 0; }
.nt-b-divider > .nt-b-gutter { top: 4px; }
.nt-b-hr { flex: 1; height: 1px; background: var(--border-2); outline: none; border-radius: 2px; }
.nt-b-hr:focus { height: 3px; background: var(--accent-ring); }

/* links [[...]] */
.nt-wl {
  color: var(--accent-ink); background: var(--accent-soft); border-radius: 5px; padding: 1px 2px;
  font-weight: 560; cursor: pointer; transition: background var(--dur);
}
.nt-wl:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.nt-wl.is-missing { background: transparent; color: var(--text-2); text-decoration: underline dashed var(--border-2); text-underline-offset: 3px; }

/* arrastar blocos */
.nt-block.sort-placeholder { outline-offset: 2px; }
.sort-ghost.nt-block { background: var(--surface); padding: 2px 8px; border-radius: 10px; }
.sort-ghost.nt-block .nt-b-gutter { opacity: 0; }

/* ==========================================================================
   Seletores flutuantes (conectar / menu "/")
   ========================================================================== */
.popover.nt-pick-pop { padding: 6px; width: 320px; max-width: calc(100vw - 16px); }
.nt-pick-label { display: flex; align-items: center; gap: 6px; padding: 4px 6px 6px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.nt-pick-label svg.lucide { width: 13px; height: 13px; }
.nt-pick-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; margin-bottom: 4px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-3); }
.nt-pick-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.nt-pick-search input { color: var(--text); font-size: 13.5px; }
.nt-pick-list, .nt-slash-list { display: flex; flex-direction: column; gap: 1px; max-height: 300px; overflow: auto; }
.nt-pick-row {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 9px;
  border-radius: 9px; text-align: left; font-size: 13.5px; color: var(--text);
}
.nt-pick-row:hover, .nt-pick-row.hl { background: var(--hover); }
.nt-pick-row.hl::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent); }
.nt-pick-ic { width: 22px; display: grid; place-items: center; color: var(--text-2); flex-shrink: 0; }
.nt-pick-ic svg.lucide { width: 15px; height: 15px; }
.nt-glyph-emoji { font-size: 15px; line-height: 1; }
.nt-pick-sp { font-size: 13px; opacity: .8; flex-shrink: 0; }
.nt-pick-row.is-create { color: var(--accent-ink); font-weight: 560; }
.nt-pick-row.is-create svg.lucide { color: var(--accent); }
.nt-pick-empty { padding: 14px 10px; font-size: 13px; color: var(--text-3); text-align: center; }
.nt-pick-foot { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding: 8px 6px 2px; margin-top: 4px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-3); }
.nt-pick-foot .kbd { padding: 2px 5px; }

.nt-slash { width: 100%; }
.nt-slash-row { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 9px; text-align: left; }
.nt-slash-row:hover, .nt-slash-row.hl { background: var(--hover); }
.nt-slash-row.hl::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--accent); }
.nt-slash-glyph { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; border: 1px solid var(--border); background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--text-2); }
.nt-g-h { font-family: var(--font-display); font-size: 17px; color: var(--text); }
.nt-g-todo { color: var(--accent); }
.nt-g-quote { font-family: var(--font-display); font-size: 20px; }
.nt-g-callout { background: var(--accent-soft); border-color: transparent; }
.nt-slash-txt { display: flex; flex-direction: column; line-height: 1.25; }
.nt-slash-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.nt-slash-desc { font-size: 11.8px; color: var(--text-3); }

/* ==========================================================================
   Conexões e sugestões do Claude
   ========================================================================== */
.nt-conn { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border); }
.nt-conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; align-items: start; }
.nt.is-compact .nt-conn-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.nt-conn-card { position: relative; }
.nt-conn-card.is-new { animation: pop .3s var(--spring); }
.nt-conn-card .item-card { height: 100%; }
.nt-unlink {
  position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--text-3);
  box-shadow: var(--shadow-sm); opacity: 0; transform: scale(.8); transition: opacity .15s, transform .15s var(--spring), color var(--dur);
}
.nt-unlink svg.lucide { width: 13px; height: 13px; }
.nt-conn-card:hover .nt-unlink, .nt-unlink:focus-visible { opacity: 1; transform: none; }
.nt-unlink:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.nt-conn-empty {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg);
  border: 1.5px dashed var(--border-2); color: var(--text-2); font-size: 13.2px; line-height: 1.5;
}
.nt-conn-empty > svg.lucide { color: var(--text-3); flex-shrink: 0; }

.nt-sugg { margin-top: 14px; }
.nt-sugg-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font-size: 12.5px; font-weight: 650; color: var(--accent-ink); }
.nt-sugg-head svg.lucide { width: 14px; height: 14px; color: var(--accent); }
.nt-sugg-list { display: flex; flex-direction: column; gap: 8px; }
.nt-ghost {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px;
  border-radius: var(--r); border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  animation: fade .25s var(--ease);
  transition: background var(--dur), border-color var(--dur);
}
.nt-ghost:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); border-color: var(--accent); }
.nt-ghost-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; padding: 2px 4px; border-radius: 8px; }
.nt-ghost-ic { width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; background: var(--surface); color: var(--text-2); box-shadow: var(--shadow-sm); }
.nt-ghost-ic svg.lucide { width: 14px; height: 14px; }
.nt-ghost-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.nt-ghost-title { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-ghost-why { font-size: 11.8px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-ghost-by { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; color: var(--accent-ink); font-weight: 650; }
.nt-ghost-by svg.lucide { width: 11px; height: 11px; }
.nt-ghost.is-claude { border-style: solid; border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

/* ---- Rodapé ---- */
.nt-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-3); }
.nt-foot b { color: var(--text-2); font-weight: 600; }
.nt-foot-dot { opacity: .6; }
.nt-foot-link { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); padding: 3px 8px; border-radius: 7px; font-weight: 560; }
.nt-foot-link:hover { background: var(--hover); color: var(--text); }

/* ---- Ações na barra superior ---- */
.topbar-view-actions [data-nt-act] { flex-shrink: 0; }

/* ==========================================================================
   Celular
   ========================================================================== */
@media (max-width: 760px) {
  .nt { --nt-gutter: 0px; }
  .nt-page { padding-top: 12px; }
  .nt-cover.has-color { height: 92px; margin-bottom: -28px; border-radius: var(--r-lg); }
  .nt.has-cover .nt-emoji { margin-left: 12px; }
  .nt-emoji-add { opacity: 1; }
  .nt-title { font-size: 27px; }
  .nt.is-compact .nt-inner { padding: 12px 16px 40px; }

  .nt-pill { height: 38px; padding: 0 13px; font-size: 13px; }
  .nt-pill-icon { width: 38px; padding: 0; }
  .nt-seen { height: 38px; }
  .nt-props-gap { display: none; }
  .nt-tag { height: 32px; }
  .nt-tag button { width: 26px; height: 26px; }
  .nt-tag-input, .nt-tag-input:focus { height: 34px; width: 150px; }

  .nt-field { flex-direction: column; align-items: stretch; gap: 8px; }
  .nt-flabel { width: auto; }
  .nt-fields-2 { grid-template-columns: 1fr; }
  .nt-seg { display: flex; }
  .nt-seg button { flex: 1; height: 36px; }
  .nt-person { height: 40px; }
  .nt-quick .chip { height: 32px; padding: 0 11px; }
  .nt-preview-body { padding-right: 0; }

  .nt-preview { flex-wrap: wrap; }

  /* blocos: alça à direita, só no bloco em edição */
  .nt-block { padding-right: 30px; }
  .nt-b-gutter { left: auto; right: 0; width: 28px; padding: 0; justify-content: center; opacity: 0; }
  .nt-b-gutter .nt-b-add { display: none; }
  .nt-block:hover > .nt-b-gutter { opacity: 0; }
  .nt-block:focus-within > .nt-b-gutter { opacity: .8; }
  .nt-b-gutter .nt-b-handle { width: 28px; height: 30px; }
  .nt-b-callout { padding-right: 34px; }

  .nt-cl-row { min-height: 44px; }
  .nt-cl-del { opacity: .7; }
  .nt-cl-handle { width: 22px; }
  .nt-unlink { opacity: 1; transform: none; width: 28px; height: 28px; }
  .nt-conn-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .nt-ghost { flex-wrap: wrap; }
  .nt-ghost-main { flex-basis: 100%; }
  .nt-ghost .btn-soft { flex: 1; height: 34px; }
  .nt-ghost .btn-icon { width: 34px; height: 34px; }
  .nt-act-label { display: none; }
  .nt-act-send { display: none; } /* no celular, "Enviar para…" fica no menu … da nota */
  .nt-foot-link { margin-left: 0; }
  .popover.nt-pick-pop { width: calc(100vw - 16px); }
}
@media (max-width: 400px) {
  .nt-conn-grid { grid-template-columns: 1fr; }
}
