/* Navigation manager (/admin/navigation): tree + inspector + preview, menu versions. */
.nm { display: flex; flex-direction: column; gap: 12px; }

.nm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.nm-head h1 { margin: 0; font-size: 1.4rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.nm-head .nm-head-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nm-head .nm-head-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.nm-note { font-size: 0.8rem; color: var(--rz-text-secondary-color); }

.nm-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 500; line-height: 1.5; white-space: nowrap;
           background: var(--rz-base-200, #eceff1); color: var(--rz-text-secondary-color); border: 0; font-family: inherit; }
.nm-pill .rzi { font-size: 14px; }
.nm-pill.live { background: #e3f4e6; color: #1b5e20; }
.nm-pill.latest { background: #e8f0fe; color: #0d47a1; }
.nm-pill.draft { background: #fff3e0; color: #8a4b00; }
.nm-pill.never { background: #fde7e9; color: #9b1c1c; }
.nm-pill.dirty { background: #fff3e0; color: #8a4b00; cursor: pointer; }

.nm-changes { border: 1px solid #ffe0b2; background: #fffaf2; border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; }
.nm-changes div { display: flex; align-items: center; gap: 8px; }
.nm-changes .rzi { font-size: 16px; color: #8a4b00; }

.nm-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; border-radius: 8px; background: #fff8e1; border: 1px solid #ffe082; font-size: 0.85rem; }
.nm-banner .rzi { color: #8a4b00; }

.nm-cols { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr) 270px; gap: 14px; align-items: start; }
@media (max-width: 1250px) { .nm-cols { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); } .nm-cols > .nm-preview { grid-column: 1 / -1; } }
@media (max-width: 820px) { .nm-cols { grid-template-columns: minmax(0, 1fr); } }

.nm-card { background: var(--rz-base-background-color, #fff); border: 1px solid var(--rz-border-color); border-radius: 10px; padding: 12px; min-width: 0; }
.nm-card-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 0.95rem; font-weight: 600; }
.nm-card-title .nm-card-tools { margin-left: auto; display: flex; gap: 4px; align-items: center; }

/* Tree */
.nm-tree { display: flex; flex-direction: column; max-height: calc(100vh - 290px); min-height: 200px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.nm-row { position: relative; display: flex; align-items: center; gap: 6px; height: 38px; padding-right: 6px; border-radius: 6px; cursor: pointer; user-select: none; flex: 0 0 auto; }
.nm-row:hover { background: var(--rz-base-100, #f5f7f8); }
.nm-row.sel { background: #e8f0fe; box-shadow: inset 3px 0 0 var(--rz-primary); }
.nm-row.hidden-item .nm-row-text { color: var(--rz-text-disabled-color); text-decoration: line-through; }
.nm-row .nm-grip { color: var(--rz-text-disabled-color); font-size: 18px; cursor: grab; flex: 0 0 auto; }
.nm-row .nm-chev { width: 22px; height: 22px; border: 0; background: none; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--rz-text-secondary-color); cursor: pointer; flex: 0 0 auto; border-radius: 4px; }
.nm-row .nm-chev:hover { background: var(--rz-base-200, #eceff1); }
.nm-row .nm-chev-space { width: 22px; flex: 0 0 auto; }
.nm-row .nm-row-icon { width: 22px; display: inline-flex; justify-content: center; color: #546e7a; flex: 0 0 auto; }
.nm-row .nm-row-icon .rzi, .nm-row .nm-row-icon i { font-size: 20px; }
.nm-row .nm-row-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.nm-row .nm-tags { display: flex; gap: 4px; flex: 0 0 auto; }
.nm-row .nm-tags .nm-pill { padding: 1px 7px; font-size: 0.7rem; }
.nm-tree.dragging .nm-row > * { pointer-events: none; }
.nm-row.drop-before::before, .nm-row.drop-after::after { content: ""; position: absolute; left: 8px; right: 8px; height: 2px; background: var(--rz-primary); border-radius: 2px; }
.nm-row.drop-before::before { top: -1px; }
.nm-row.drop-after::after { bottom: -1px; }
.nm-row.drop-inside { background: #e3f2fd; outline: 2px dashed var(--rz-primary); outline-offset: -2px; }
.nm-row.drag-src { opacity: 0.4; }
.nm-tree-empty { padding: 24px 8px; text-align: center; color: var(--rz-text-secondary-color); font-size: 0.85rem; }

/* Inspector */
.nm-insp-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.nm-insp-head .nm-insp-icon { width: 40px; height: 40px; border-radius: 10px; background: #e8f0fe; color: var(--rz-primary); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.nm-insp-head .nm-insp-icon .rzi, .nm-insp-head .nm-insp-icon i { font-size: 22px; }
.nm-insp-head .nm-insp-name { font-size: 1.05rem; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.nm-insp-head .nm-insp-where { font-size: 0.8rem; color: var(--rz-text-secondary-color); }
.nm-insp-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.nm-sec { border-top: 1px solid var(--rz-border-color); padding: 12px 0 4px; display: flex; flex-direction: column; gap: 10px; }
.nm-sec-h { margin: 0; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rz-text-secondary-color); }
.nm-fields { display: flex; flex-wrap: wrap; gap: 10px; }
.nm-fields > * { flex: 1 1 240px; min-width: 0; }
.nm-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.nm-kind { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid var(--rz-border-color); border-radius: 999px; background: var(--rz-base-background-color, #fff);
           color: var(--rz-text-color); font: inherit; font-size: 0.82rem; cursor: pointer; }
.nm-kind .rzi { font-size: 16px; color: #546e7a; }
.nm-kind:hover { border-color: #90caf9; }
.nm-kind.on { background: var(--rz-primary); border-color: var(--rz-primary); color: #fff; }
.nm-kind.on .rzi { color: #fff; }
.nm-hint { font-size: 0.8rem; color: var(--rz-text-secondary-color); margin: 0; }
.nm-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; border-radius: 8px; background: var(--rz-base-100, #f5f7f8); font-size: 0.85rem; }
.nm-status.draft { background: #fff8e1; }
.nm-status.never { background: #fdecee; }
.nm-status .nm-status-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.nm-danger { border-top: 1px solid var(--rz-border-color); margin-top: 10px; padding-top: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nm-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 260px; color: var(--rz-text-secondary-color); text-align: center; }
.nm-empty .rzi { font-size: 44px; color: var(--rz-text-disabled-color); }

/* History */
.nm-hist { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); gap: 12px; }
@media (max-width: 700px) { .nm-hist { grid-template-columns: minmax(0, 1fr); } }
.nm-ver-list { display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 330px); overflow-y: auto; }
.nm-ver { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 7px 10px; border: 1px solid var(--rz-border-color); border-radius: 8px; background: var(--rz-base-background-color, #fff); color: var(--rz-text-color); font: inherit; cursor: pointer; }
.nm-ver.on { border: 2px solid var(--rz-primary); padding: 6px 9px; }
.nm-ver b { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.9rem; }
.nm-ver small { color: var(--rz-text-secondary-color); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-diff { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; }
.nm-diff div { display: flex; gap: 8px; align-items: center; }
.nm-diff .rzi { font-size: 16px; color: #546e7a; }

/* Preview */
.nm-preview .nm-preview-menu { background: var(--rz-sidebar-background-color); border-radius: 8px; padding: 6px 0; min-height: 120px; }
.nm-preview .nm-preview-note { font-size: 0.78rem; color: var(--rz-text-secondary-color); margin: 6px 0 0; }
.nm-preview .nm-preview-ver { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; margin-bottom: 8px; border-radius: 6px; background: #e8f0fe; font-size: 0.8rem; }
