/* PRD#notes §2.4 (fase F3) — halaman Catatan (sistem token A, consumer; hex dari palet §2).
   Warna kartu = warna pilihan user (bukan brand) dan sengaja TIDAK ada di peta HEX env-theme:
   catatan kuning tetap kuning di staging. Semua animasi dimatikan prefers-reduced-motion. */

body { font-family: 'Inter', sans-serif; }
/* Jangan bergantung pada preflight Tailwind CDN (bisa gagal dimuat): lebar 100% + padding tetap muat. */
.nt-app, .nt-app *, .nt-dlg-ov, .nt-dlg-ov *, .nt-popb, .nt-popb *, .nt-vmenu, .nt-vmenu * { box-sizing: border-box; }

/* ── Tata letak: kolom utama lebar penuh (PRD#notes v0.10 G4 — panel kiri .nt-side dicabut; tampilan
   dipilih lewat pill kanan atas baris cari) ── */
.nt-app { display: block; }
.nt-main { width: 100%; min-width: 0; }

/* ── Kolom cari + pill tampilan + bilah buat ──
   G2 (revisi owner 2026-10-06, design system §4/§7.4): kolom cari = INPUT (r8, border #d1d5db, ≥44px),
   bilah buat = PANEL (r12, tertutup DAN mengembang), datar tanpa drop shadow; cincin fokus design
   system hanya saat :focus-visible. */
.nt-top { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-bottom: 24px; }
.nt-toprow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px) minmax(0, 1fr); align-items: center; column-gap: 16px; width: 100%; }
.nt-toprow > .nt-search { grid-column: 2; }
.nt-toprow > .nt-vpill { grid-column: 3; justify-self: end; max-width: 100%; }
.nt-search { position: relative; width: 100%; max-width: 600px; display: block; }
.nt-search > .nav-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #9ca3af; pointer-events: none; }
.nt-search input { width: 100%; min-height: 44px; padding: 8px 44px 8px 42px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; background: #fff; color: #111827; box-shadow: none; transition: border-color .15s; }
.nt-search input::-webkit-search-cancel-button { display: none; }
.nt-search input:focus { outline: none; }
.nt-search input:focus-visible { border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79,70,229,.1); }
.nt-search-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }

.nt-create { width: 100%; max-width: 600px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; box-shadow: none; overflow: hidden; transition: border-color .15s, background-color .2s; }
.nt-create.is-open { border-color: #d1d5db; }
.nt-create-fake:focus { outline: none; }
.nt-create:has(.nt-create-fake:focus-visible) { border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79,70,229,.1); }
.nt-create-collapsed { display: flex; align-items: center; gap: 4px; padding: 4px 6px 4px 4px; }
.nt-create-fake { flex: 1; text-align: left; border: none; background: none; padding: 10px 12px; font-size: 15px; font-weight: 500; color: #6b7280; cursor: text; min-height: 44px; }
.nt-create-form { padding: 10px 12px 8px; animation: nt-grow .2s ease-out both; }
@keyframes nt-grow { from { opacity: 0; transform: translateY(-4px); } }
.nt-create-head, .nt-dlg-head { display: flex; align-items: flex-start; gap: 6px; }
.nt-title-in { flex: 1; min-width: 0; border: none; background: transparent; font-size: 16px; font-weight: 600; color: #111827; padding: 6px 4px; }
.nt-title-in:focus, .nt-body-in:focus { outline: none; }
.nt-body-in { display: block; width: 100%; border: none; background: transparent; font-size: 14px; line-height: 1.6; color: #1f2937; padding: 6px 4px; resize: none; overflow: hidden; font-family: inherit; min-height: 44px; }
.nt-create-bar, .nt-dlg-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nt-create-bar { padding-top: 6px; }
.nt-tools { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; flex: 1; min-width: 0; }
.nt-close-btn { margin-left: auto; }

/* Tombol ikon = kelas design system .btn-icon (32px, svg 16px, HP 44px — custom.css). .nt-ibtn hanya
   menambah keadaan: tekan/aktif (Sematkan tersemat = bookmark outline indigo #4f46e5, tanpa varian
   solid — G3), fokus keyboard, nonaktif. Ukuran TIDAK ditimpa di halaman ini. */
.nt-ibtn { flex-shrink: 0; color: #6b7280; }
.nt-ibtn:focus-visible { outline: 2px solid #4f46e5; outline-offset: 1px; }
.nt-ibtn[aria-pressed="true"] { color: #4f46e5; }
.nt-ibtn[disabled] { opacity: .4; cursor: default; }

/* ── Bagian + grid masonry (grid-auto-rows 8px + span, §2.4) ── */
/* ── Filter §2.6 (warna · sumber · checklist) ── */
.nt-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; margin: -8px 0 20px; }
.nt-filters:empty { display: none; }
.nt-fchip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border: 1px solid #e5e7eb; background: #fff; border-radius: 9999px; font-size: 13px; font-weight: 500; color: #374151; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.nt-fchip .nav-icon { width: 16px; height: 16px; flex-shrink: 0; color: #6b7280; }
.nt-fchip:hover { background: #f3f4f6; }
.nt-fchip.is-on { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }
.nt-fchip.is-on .nav-icon { color: #4f46e5; }
.nt-fchip:focus-visible, .nt-fclear:focus-visible { outline: 2px solid #4f46e5; outline-offset: 1px; }
.nt-fdot { width: 14px; height: 14px; border-radius: 9999px; background: var(--nt-bg, #fff); border: 1px solid rgba(0,0,0,.15); flex-shrink: 0; }
.nt-fclear { border: none; background: none; padding: 4px 8px; font-size: 13px; font-weight: 500; color: #4f46e5; cursor: pointer; border-radius: 6px; }
.nt-fclear:hover { text-decoration: underline; }
/* §2.2 — daftar dipaginasi di atas batas halaman: pemberitahuan + Muat lagi */
.nt-more { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 24px 0 8px; font-size: 13px; color: #6b7280; }

.nt-view-head:empty { display: none; }
.nt-view-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; font-size: 13px; color: #6b7280; }
.nt-view-title { font-size: 18px; font-weight: 600; color: #111827; margin-right: auto; }
.nt-view-title .nav-icon { display: inline; width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
.nt-sec-label { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #6b7280; margin: 4px 0 10px 4px; }
.nt-sec + .nt-sec { margin-top: 20px; }
.nt-grid { display: grid; grid-template-columns: repeat(auto-fill, 240px); grid-auto-rows: 8px; column-gap: 16px; row-gap: 0; justify-content: center; align-items: start; }
.nt-search-info { font-size: 13px; color: #6b7280; margin: 0 0 12px 4px; min-height: 18px; }

/* ── Kartu ── */
.nt-card { position: relative; align-self: start; background: var(--nt-bg, #fff); border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px 14px 8px; cursor: default; outline: none; transition: box-shadow .15s, border-color .15s; overflow: hidden; overflow-wrap: anywhere; }
.nt-card[data-color]:not([data-color="default"]) { border-color: transparent; }
/* G2 — datar: hover = border lebih tegas + bayangan kartu design system (tanpa bayangan tambahan). */
.nt-card:hover { border-color: #d1d5db; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.nt-card:focus-visible { box-shadow: 0 0 0 2px #4f46e5; }
.nt-card.is-ghost { visibility: hidden; }
.nt-card.is-hidden { display: none; }
.nt-card-title { font-size: 15px; font-weight: 600; color: #111827; line-height: 1.4; padding-right: 26px; margin-bottom: 4px; }
.nt-card-body { font-size: 14px; color: #1f2937; line-height: 1.55; max-height: 360px; overflow: hidden; }
.nt-card-body:empty { display: none; }
.nt-card-match { font-size: 13px; color: #374151; background: rgba(255,255,255,.55); border-radius: 6px; padding: 4px 6px; margin-top: 6px; }
.nt-card-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 8px; min-height: 22px; }
.nt-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 9999px; background: rgba(0,0,0,.06); color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-chip .nav-icon { width: 12px; height: 12px; flex-shrink: 0; }
a.nt-chip { text-decoration: none; }
a.nt-chip:hover { background: rgba(0,0,0,.1); }
.nt-chip-x { border: none; background: none; padding: 0; margin-left: 2px; color: inherit; cursor: pointer; display: inline-flex; }
/* Label yang bisa dilepas: teks dipotong di dalam .nt-chip-t, chip tidak memotong area sentuh × (A8 micro-audit
   2026-10-11: × tampak 12 px, area sentuh 44×44 lewat ::after — ukuran tampak tetap). */
.nt-chip-rm { overflow: visible; }
.nt-chip-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nt-chip-x { position: relative; }
.nt-chip-x::after { content: ''; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
.nt-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; }
.nt-chips:empty { display: none; }
.nt-card-pin { position: absolute; top: 6px; right: 6px; opacity: 0; transition: opacity .15s; }
.nt-card-pin[aria-pressed="true"] { opacity: 1; }
.nt-card-tools { display: flex; align-items: center; gap: 0; margin: 2px -8px -4px; opacity: 0; transition: opacity .15s; }
.nt-card:hover .nt-card-tools, .nt-card:focus-within .nt-card-tools, .nt-card:hover .nt-card-pin, .nt-card:focus-within .nt-card-pin, .nt-card.is-menu .nt-card-tools { opacity: 1; }
.nt-enter { animation: nt-enter .3s cubic-bezier(.2,0,0,1) both; }
@keyframes nt-enter { from { opacity: 0; transform: scale(.96); } }
mark.nt-hl { background: #fde68a; color: inherit; border-radius: 2px; padding: 0 1px; }

/* Markdown di kartu + pratinjau (SBMarkdown; preflight Tailwind mereset list/heading) */
.nt-md p { margin: 0 0 6px; }
.nt-md p:last-child { margin-bottom: 0; }
.nt-md h1, .nt-md h2, .nt-md h3, .nt-md h4 { font-weight: 600; margin: 6px 0 4px; line-height: 1.35; }
.nt-md h1 { font-size: 1.15em; } .nt-md h2 { font-size: 1.08em; } .nt-md h3, .nt-md h4 { font-size: 1em; }
.nt-md ul { list-style: disc; padding-left: 20px; margin: 4px 0; }
.nt-md ol { list-style: decimal; padding-left: 22px; margin: 4px 0; }
.nt-md a { color: #4338ca; text-decoration: underline; }
.nt-md code { font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace; font-size: .88em; background: rgba(0,0,0,.06); padding: 1px 4px; border-radius: 4px; }
.nt-md blockquote { border-left: 3px solid #d1d5db; padding-left: 10px; color: #4b5563; margin: 4px 0; }
.nt-md hr { border: 0; border-top: 1px solid rgba(0,0,0,.12); margin: 8px 0; }
.nt-md pre.sb-code { margin: 6px 0; border-radius: 8px; overflow: hidden; background: #111827; color: #e5e7eb; font-size: 12px; }
.nt-md li.nt-task { list-style: none; margin-left: -18px; display: flex; align-items: flex-start; gap: 8px; }
.nt-md li.nt-task > input { margin-top: 4px; width: 16px; height: 16px; flex-shrink: 0; accent-color: #4f46e5; cursor: pointer; }
.nt-md li.nt-task.is-done { color: #6b7280; text-decoration: line-through; }
.nt-md li.nt-task.is-done > input { text-decoration: none; }
.nt-done-sep { list-style: none; margin: 4px 0 2px -18px; font-size: 12px; color: #6b7280; text-decoration: none; }

/* Warna (Keep): latar kartu, editor, bilah buat */
[data-color="red"] { --nt-bg: #fbd3cf; }
[data-color="orange"] { --nt-bg: #fde2c8; }
[data-color="yellow"] { --nt-bg: #fff8b8; }
[data-color="green"] { --nt-bg: #e2f6d3; }
[data-color="teal"] { --nt-bg: #cdeae3; }
[data-color="blue"] { --nt-bg: #d4e4ed; }
[data-color="purple"] { --nt-bg: #e5d9ec; }
[data-color="gray"] { --nt-bg: #ececef; }
.nt-create[data-color], .nt-dlg[data-color] { background: var(--nt-bg, #fff); }

/* ── Kerangka muat ── */
.nt-skel-card { align-self: start; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; padding: 14px; }
.nt-skel-card .sb-skel { display: block; margin-bottom: 8px; }

/* ── Kosong ── */
.nt-empty { text-align: center; padding: 56px 16px; color: #6b7280; }
.nt-empty p { font-size: 15px; max-width: 420px; margin: 0 auto; line-height: 1.55; }

/* ── Editor dialog (z 45: di atas nav, di bawah modal — design system §6) ── */
.nt-dlg-ov { position: fixed; inset: 0; z-index: 45; background: rgba(17,24,39,.45); display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; }
.nt-dlg-ov[hidden] { display: none; }
.nt-dlg-ov.is-fading { animation: nt-fade .2s ease both; }
@keyframes nt-fade { from { opacity: 0; } }
/* G2 — dialog editor = modal design system (r16), datar di atas scrim (tanpa drop shadow). */
.nt-dlg { width: 100%; max-width: 600px; max-height: 80vh; display: flex; flex-direction: column; background: var(--nt-bg, #fff); border-radius: 16px; box-shadow: none; overflow: hidden; }
.nt-dlg.nt-shake { animation: nt-shake .3s ease; }
@keyframes nt-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.nt-dlg-mtop { display: none; }
.nt-dlg-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 14px 16px 6px; }
.nt-dlg .nt-blocks > .nt-body-in:only-child { min-height: 120px; }

/* ── PRD#notes v0.10 G1 — editor blok: teks + checklist sungguhan (ntBlocks, bilah buat + editor) ── */
.nt-blocks { display: block; }
.nt-blocks > .nt-body-in[hidden] { display: none; }
.nt-blocks > .nt-body-in:not(:only-child) { min-height: 0; }
.nt-blk-list { margin: 2px 0 4px; }
.nt-blk-list.is-drop-end > .nt-li-open { box-shadow: inset 0 -2px 0 #4f46e5; }
.nt-li { display: flex; align-items: center; gap: 4px; min-height: 36px; padding-left: calc(var(--nt-lvl, 0) * 24px); border-radius: 6px; position: relative; }
.nt-li.is-drop { box-shadow: inset 0 2px 0 #4f46e5; }
.nt-li.is-dragging { z-index: 2; background: var(--nt-bg, #fff); box-shadow: 0 4px 12px rgba(0,0,0,.12); opacity: .95; }
.nt-li-grip { width: 20px; height: 32px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: #9ca3af; cursor: grab; touch-action: none; opacity: 0; transition: opacity .15s; }
.nt-li-grip.is-off { cursor: default; }
.nt-li-grip .nav-icon { width: 16px; height: 16px; }
.nt-li:hover .nt-li-grip:not(.is-off), .nt-li:focus-within .nt-li-grip:not(.is-off), .nt-li.is-dragging .nt-li-grip { opacity: 1; }
.nt-li.is-dragging .nt-li-grip { cursor: grabbing; }
.nt-li-hit { width: 28px; height: 32px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; }
.nt-li-check { width: 18px; height: 18px; margin: 0; flex-shrink: 0; accent-color: #4f46e5; cursor: pointer; }
.nt-li-check:disabled { cursor: default; }
.nt-li-text { flex: 1; min-width: 0; border: none; background: transparent; font-size: 14px; line-height: 1.5; color: #1f2937; padding: 6px 2px; font-family: inherit; }
.nt-li-text:focus { outline: none; }
.nt-li-text::placeholder { color: #9ca3af; }
.nt-li.is-done .nt-li-text { color: #6b7280; text-decoration: line-through; }
.nt-li-del { opacity: 0; transition: opacity .15s; }
.nt-li:hover .nt-li-del, .nt-li:focus-within .nt-li-del { opacity: 1; }
.nt-li-add { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 4px 4px 4px 29px; border: none; background: none; color: #6b7280; font-size: 14px; cursor: text; text-align: left; border-radius: 6px; }
.nt-li-add .nav-icon { width: 18px; height: 18px; }
.nt-li-add:hover { color: #374151; }
.nt-li-add:focus-visible, .nt-done-head:focus-visible { outline: 2px solid #4f46e5; outline-offset: 1px; }
.nt-done { margin-top: 4px; border-top: 1px solid rgba(0,0,0,.08); padding-top: 4px; }
.nt-done-head { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 4px 4px 2px; border: none; background: none; color: #6b7280; font-size: 13px; font-weight: 500; cursor: pointer; border-radius: 6px; }
.nt-done-head .nav-icon { width: 16px; height: 16px; transition: transform .15s; }
.nt-done-head[aria-expanded="false"] .nav-icon { transform: rotate(-90deg); }
.nt-li-done[hidden] { display: none; }
@media (max-width: 768px) {
  .nt-li, .nt-li-add, .nt-done-head { min-height: 44px; }
  .nt-li-text { font-size: 16px; }
  .nt-li-hit { width: 44px; height: 44px; }
  .nt-li-check { width: 22px; height: 22px; }
  .nt-li-del { opacity: 1; }
  .nt-li-grip { width: 44px; height: 44px; opacity: 1; }
  .nt-li { gap: 0; padding-left: calc(var(--nt-lvl, 0) * 16px); }
  .nt-li-add { padding-left: 57px; }
}
@media (hover: none) {
  .nt-li-grip:not(.is-off), .nt-li-del { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .nt-li-grip, .nt-li-del, .nt-done-head .nav-icon { transition: none !important; }
}
/* PRD#notes v0.11 §12.9 L1 — blok teks terformat di editor (klik/Enter = textarea blok itu). Metrik =
   .nt-body-in (font/padding sama) supaya peralihan terformat ↔ tulis tidak melompat; tanpa bayangan. */
.nt-blk-md { font-size: 14px; line-height: 1.6; color: #1f2937; padding: 6px 4px; min-height: 34px; border-radius: 6px; cursor: text; overflow-wrap: anywhere; }
.nt-blk-md[hidden] { display: none; }
.nt-blk-md > :first-child { margin-top: 0; }
.nt-blk-md:not([tabindex]) { cursor: default; }
.nt-blk-md:focus { outline: none; }
.nt-blk-md:focus-visible { outline: 2px solid #4f46e5; outline-offset: 1px; }
.nt-blk-md a { cursor: pointer; }
.nt-dlg .nt-blocks > .nt-blk-md:only-child { min-height: 120px; }
.nt-dlg-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; font-size: 12px; color: #6b7280; padding: 6px 4px 2px; }
.nt-dlg-bar { padding: 6px 10px 10px; border-top: 1px solid rgba(0,0,0,.06); }
.nt-status { font-size: 12px; color: #6b7280; white-space: nowrap; }
.nt-status.is-err { color: #dc2626; }
.nt-conflict { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: #fffbeb; border-bottom: 1px solid #fde68a; color: #92400e; font-size: 13px; font-weight: 500; }
.nt-conflict[hidden] { display: none; }
.nt-conflict-text { flex: 1; min-width: 180px; }
.nt-conflict-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.nt-ro { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: #f3f4f6; color: #374151; font-size: 13px; }
.nt-ro[hidden] { display: none; }
.nt-ro-text { flex: 1; min-width: 180px; }
body.nt-editing #sbChatFab, body.nt-editing #sbChatDock { display: none !important; }

/* View Transitions dalam-halaman (kartu ↔ dialog): root tidak cross-fade, elemen bersama menyatu. */
/* v0.11.5 — transisi DALAM halaman (buka/tutup catatan): sidebar TIDAK jadi grup transisi sendiri.
   Sebagai grup `sb-sidebar` (app.js, untuk transisi antar-halaman) ia digambar di atas latar gelap
   dialog → terang selama transisi lalu tiba-tiba redup = berkedip (terbukti di Chromium: grup 200px
   ada tanpa aturan ini, tidak ada dengannya). Kini ikut memudar bersama halaman. */
html[data-nt-vt] .sidebar { view-transition-name: none; }
html[data-nt-vt]::view-transition-old(root) { animation: nt-vt-out .25s ease both; }
html[data-nt-vt]::view-transition-new(root) { animation: nt-vt-in .25s ease both; }
@keyframes nt-vt-out { to { opacity: 0; } }
@keyframes nt-vt-in { from { opacity: 0; } }
html[data-nt-vt]::view-transition-group(nt-shared) { animation-duration: .3s; animation-timing-function: cubic-bezier(.2,0,0,1); }
html[data-nt-vt]::view-transition-old(nt-shared), html[data-nt-vt]::view-transition-new(nt-shared) { height: 100%; object-fit: cover; object-position: top left; }

/* ── Popover bersama ── */
/* z-index 46 = lapis overlay dalam-halaman (45, dialog editor) + 1 — popover dibuka dari editor
   harus di atasnya, tetap di bawah modal (50). Peta: docs/guide/ui-design-system.md. */
/* Isi popover warna/label/AI di wadah sbUI.pop (.sb-pop desktop / sheet HP) — utang D-FE #6 (dulu #ntPop lokal). */
.nt-pop-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border: none; background: none; font-size: 14px; color: #374151; border-radius: 6px; cursor: pointer; min-height: 36px; }
.nt-pop-item:hover, .nt-pop-item:focus-visible { background: #f3f4f6; outline: none; }
.nt-pop-item .nav-icon { width: 17px; height: 17px; color: #6b7280; }
.nt-pop-item.is-danger { color: #dc2626; }
.nt-pop-item.is-danger .nav-icon { color: #dc2626; }
.nt-pop-title { font-size: 12px; font-weight: 600; color: #6b7280; padding: 6px 10px 4px; }
.nt-swatches { display: grid; grid-template-columns: repeat(5, 36px); gap: 6px; padding: 6px; }
.nt-swatch { width: 36px; height: 36px; border-radius: 9999px; border: 2px solid transparent; background: var(--nt-bg, #fff); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #111827; }
.nt-swatch[aria-checked="true"] { border-color: #4f46e5; }
.nt-swatch .nav-icon { width: 16px; height: 16px; }
.nt-popb label.nt-lbl-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; font-size: 14px; color: #374151; border-radius: 6px; cursor: pointer; min-height: 36px; }
.nt-popb label.nt-lbl-row:hover { background: #f3f4f6; }
.nt-popb label.nt-lbl-row input { width: 16px; height: 16px; accent-color: #4f46e5; margin: 0; }
.nt-lbl-new { display: flex; gap: 6px; padding: 6px; border-top: 1px solid #f3f4f6; margin-top: 4px; }
.nt-lbl-new input { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; }
.nt-lbl-new input:focus { outline: none; border-color: #4f46e5; }
.nt-pop-empty { font-size: 13px; color: #9ca3af; padding: 4px 10px 6px; }

/* ── G4 · pill tampilan + menunya (komponen pill .sb-pill/.sb-pill-menu di css/custom.css) ──
   Desktop = menu tarik-turun di bawah pill (top/right dipasang notes.js). z 46/45 = lapis overlay
   dalam-halaman + popover (peta z-index design system §6), di bawah modal (50). */
.nt-vpill .sb-pill-name { max-width: 220px; }
.nt-vmenu-bd { position: fixed; inset: 0; z-index: 45; background: transparent; }
.nt-vmenu-bd[hidden], .nt-vmenu[hidden] { display: none; }
.nt-vmenu { position: fixed; z-index: 46; width: 280px; max-width: calc(100vw - 16px); }
.nt-vmenu-hd { display: none; }
.nt-vmenu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 8px 10px; border: none; background: none; border-radius: 10px; text-align: left; font-family: inherit; font-size: 13.5px; color: #111827; cursor: pointer; transition: background-color .15s; }
.nt-vmenu-item > .nav-icon { width: 18px; height: 18px; flex-shrink: 0; color: #6b7280; }
.nt-vmenu-item:hover { background: #f3f4f6; }
.nt-vmenu-item:focus { outline: none; }
.nt-vmenu-item:focus-visible { background: #f3f4f6; box-shadow: inset 0 0 0 2px #4f46e5; }
.nt-vmenu-item.is-on { background: #eef2ff; color: #3730a3; font-weight: 600; }
.nt-vmenu-item.is-on > .nav-icon { color: #4f46e5; }
.nt-vmenu-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-vmenu-count { font-size: 12px; font-weight: 500; color: #9ca3af; font-variant-numeric: tabular-nums; }
.nt-vmenu-check { width: 16px; height: 16px; flex-shrink: 0; display: inline-flex; color: #4f46e5; }
.nt-vmenu-check .nav-icon { width: 16px; height: 16px; }
.nt-vmenu-sep { height: 1px; background: #f3f4f6; margin: 6px 4px; }
.nt-vmenu-title { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #9ca3af; padding: 6px 10px 4px; }
/* "Kelola label" (modal design system) */
.nt-lm-hint { font-size: 13px; color: #6b7280; margin: 0 0 10px; }
.nt-lm-list { max-height: 50vh; overflow-y: auto; }
.nt-lm-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.nt-lm-row > .nav-icon { width: 18px; height: 18px; flex-shrink: 0; color: #6b7280; }
.modal-body .nt-lm-row input.nt-lm-in { flex: 1 1 auto; min-width: 0; width: auto; }
.nt-lm-progress { font-size: 13px; color: #4b5563; margin: 10px 0 0; font-variant-numeric: tabular-nums; }

/* ── HP (≤768px): grid 2 kolom, chip tampilan, bilah buat menempel, editor layar penuh ── */
@media (max-width: 768px) {
  .nt-toprow { display: flex; gap: 8px; }
  .nt-toprow > .nt-search { flex: 1 1 auto; min-width: 0; }
  .nt-toprow > .nt-vpill { flex: 0 1 auto; max-width: 46%; }
  .nt-top { position: sticky; top: 56px; z-index: 20; background: #f9fafb; margin: 0 -16px 16px; padding: 8px 16px; gap: 10px; }
  .nt-filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: -8px -16px 14px; padding: 0 16px 2px; }
  .nt-filters::-webkit-scrollbar { display: none; }
  .nt-fchip { flex-shrink: 0; min-height: 40px; }
  /* Chip sumber di kartu ("Dari rapat"/"Dari Chat") = tautan: area sentuh 44 px tinggi tanpa mengubah tampak (A10). */
  a.nt-chip.nt-src { position: relative; overflow: visible; }
  a.nt-chip.nt-src::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 48px; transform: translateY(-50%); }
  .nt-fclear { flex-shrink: 0; min-height: 40px; }
  .nt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; justify-content: stretch; }
  .nt-card { padding: 10px 12px 8px; }
  .nt-card-title { font-size: 14px; }
  .nt-card-body { font-size: 13px; max-height: 280px; }
  /* Target sentuh ≥ 44 px + 16 px agar iOS tidak memperbesar halaman saat kolom cari difokus. */
  .nt-search input { min-height: 44px; font-size: 16px; }
  .nt-search-clear { right: 0; }
  .nt-md li.nt-task { min-height: 44px; padding: 10px 0; }
  .nt-md li.nt-task > input { width: 20px; height: 20px; margin-top: 1px; }
  .nt-dlg-ov { padding: 0; background: transparent; }
  .nt-dlg { max-width: none; max-height: none; height: 100%; height: 100dvh; border-radius: 0; box-shadow: none; }
  .nt-dlg-mtop { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(4px + var(--sb-sat)) 8px 4px; border-bottom: 1px solid rgba(0,0,0,.06); }
  .nt-dlg-bar { padding-bottom: calc(10px + var(--sb-sab)); }
  .nt-dlg-bar .nt-status { display: none; }
  .nt-dlg-bar .nt-close-btn { display: none; }
  .nt-pop-item, .nt-popb label.nt-lbl-row { min-height: 44px; }
  /* G4 — HP: menu tampilan = sheet bawah (Back menutup lewat sbScreenPush); FAB chat disembunyikan. */
  .nt-vpill .sb-pill-name { max-width: none; }
  .nt-vmenu-bd { background: rgba(17,24,39,.45); }
  .nt-vmenu { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; max-height: 80dvh; border-radius: 16px 16px 0 0; border-bottom: 0; padding: 0 6px calc(8px + var(--sb-sab)); animation: nt-sheet-in .22s cubic-bezier(.32,.72,0,1) both; }
  .nt-vmenu-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; z-index: 1; background: #fff; padding: 8px 2px 6px 10px; margin-bottom: 2px; border-bottom: 1px solid #f3f4f6; }
  .nt-vmenu-hd-title { font-size: 15px; font-weight: 600; color: #111827; }
  .nt-vmenu-item { min-height: 44px; font-size: 15px; }
  body.nt-vmenu-open #sbChatFab, body.nt-vmenu-open #sbChatDock { display: none !important; }
}
@keyframes nt-sheet-in { from { transform: translateY(100%); } }
/* ── F6 · Improve dengan AI (§2.5): menu di popover + panel usulan di editor ── */
.nt-ai-scope { font-size: 12px; color: #9ca3af; padding: 0 10px 6px; }
.nt-ai-custom { display: flex; gap: 6px; padding: 8px 6px 4px; border-top: 1px solid #f3f4f6; margin-top: 4px; }
.nt-ai-custom input { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; color: #111827; background: #fff; }
.nt-ai-custom input:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79,70,229,.1); }
.nt-ai { margin: 12px 0 4px; border: 1px solid #c7d2fe; background: #f8faff; border-radius: 10px; padding: 10px 12px 12px; animation: nt-grow .2s ease-out both; }
.nt-ai[hidden] { display: none; }
.nt-ai-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: #4f46e5; }
.nt-ai-head > .nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.nt-ai-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: #3730a3; }
.nt-ai-loading { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.nt-ai-line { display: block; height: 10px; border-radius: 9999px; background: linear-gradient(90deg, #e0e7ff 25%, #eef2ff 50%, #e0e7ff 75%); background-size: 200% 100%; animation: nt-ai-shimmer 1.2s linear infinite; }
.nt-ai-line.is-short { width: 60%; }
@keyframes nt-ai-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.nt-ai-wait { font-size: 12px; color: #6b7280; }
.nt-ai-err { font-size: 13px; color: #b91c1c; margin: 0 0 10px; line-height: 1.5; }
.nt-ai-legend { display: flex; gap: 12px; font-size: 11px; color: #6b7280; margin-bottom: 6px; }
.nt-ai-k::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.nt-ai-k.is-del::before { background: #fee2e2; border: 1px solid #fca5a5; }
.nt-ai-k.is-ins::before { background: #dcfce7; border: 1px solid #86efac; }
.nt-ai-diff { font-size: 14px; line-height: 1.6; color: #1f2937; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 10px; }
.nt-ai-diff.is-title { font-weight: 600; }
.nt-ai-diff del { background: #fee2e2; color: #991b1b; text-decoration: line-through; border-radius: 2px; }
.nt-ai-diff ins { background: #dcfce7; color: #166534; text-decoration: none; border-radius: 2px; }
.nt-ai-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.nt-dlg.nt-ai-busy .nt-body-in, .nt-dlg.nt-ai-busy .nt-blk-md, .nt-dlg.nt-ai-busy .nt-title-in, .nt-dlg.nt-ai-busy .nt-blk-list { opacity: .6; }
@media (max-width: 768px) {
  .nt-ai-acts .btn { min-height: 44px; }
  .nt-ai-custom input { min-height: 44px; font-size: 16px; }
}

/* Perangkat sentuh: tanpa hover — alat kartu disembunyikan (aksi lewat editor). */
@media (hover: none) {
  .nt-card-tools, .nt-card-pin:not([aria-pressed="true"]) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nt-create, .nt-create-form, .nt-card, .nt-enter, .nt-dlg-ov.is-fading, .nt-dlg.nt-shake, .nt-vmenu, .nt-vmenu-item, .nt-search input, .nt-fchip, .nt-card-tools, .nt-card-pin, .nt-ai, .nt-ai-line { animation: none !important; transition: none !important; }
  html[data-nt-vt]::view-transition-group(*), html[data-nt-vt]::view-transition-old(*), html[data-nt-vt]::view-transition-new(*) { animation: none !important; }
}
