/* s55 — sidebar view switch (Groups | All | Mine) + "My menu" editor page */

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar-nav-custom { display: none; }
.sidebar[data-nav-mode="custom"] .sidebar-nav-custom { display: flex; }
.sidebar[data-nav-mode="custom"] .sidebar-nav-default { display: none; }
/* The collapsed icon rail is always the flat icon list of the default nav. */
.sidebar.sidebar-hidden .sidebar-nav-custom { display: none !important; }
.sidebar.sidebar-hidden[data-nav-mode="custom"] .sidebar-nav-default { display: flex !important; }
.sidebar.sidebar-hidden .sidebar-view-control { display: none; }

.sidebar-view-control { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.sidebar-view-seg { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; gap: 2px;
                    background: var(--surface-alt, var(--surface)); border: 1px solid var(--border); border-radius: 10px; }
.sidebar-view-seg button { border: 0; background: transparent; font: inherit; font-size: .74rem; font-weight: 600; color: var(--text-muted);
                           padding: 6px 4px; border-radius: 7px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
                           transition: background .15s, color .15s, box-shadow .15s; }
.sidebar-view-seg button:hover { color: var(--text); }
.sidebar-view-seg button.is-active { background: var(--bg); color: var(--primary); box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.sidebar-view-seg button:focus-visible, .sidebar-view-edit:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.sidebar-view-edit { flex: 0 0 auto; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 10px;
                     color: var(--text-muted); border: 1px solid var(--border); background: var(--bg); transition: color .15s, border-color .15s; }
.sidebar-view-edit:hover { color: var(--primary); border-color: var(--primary); }
.sidebar-view-edit svg { width: 16px; height: 16px; }

/* ── Editor page (views/profile/menu.php) ────────────────── */
.nm-wrap { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.nm-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 24px; }
.nm-head h1 { margin: 0 0 4px; font-size: 1.3rem; }
.nm-head p { margin: 0; color: var(--text-muted); font-size: .88rem; line-height: 1.6; max-width: 62ch; }
.nm-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nm-status { font-size: .84rem; color: var(--success); min-height: 1.2em; }
.nm-status.is-error { color: var(--danger); }
.nm-notice { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .86rem; background: color-mix(in srgb, var(--warning) 12%, var(--bg)); border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent); }

.nm-board { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .nm-board { grid-template-columns: minmax(0, 1fr); } }
.nm-col-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; font-size: .95rem; font-weight: 700; }
.nm-groups { display: flex; flex-direction: column; gap: 12px; }

.nm-group { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); overflow: hidden; }
.nm-group-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
.nm-group-name { flex: 1; min-width: 0; font: inherit; font-weight: 600; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); }
.nm-group-name:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.nm-icon-btn { flex: 0 0 auto; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border);
               background: var(--bg); color: var(--text-muted); border-radius: 8px; cursor: pointer; font-size: .9rem; line-height: 1; }
.nm-icon-btn:hover:not(:disabled) { color: var(--primary); border-color: var(--primary); }
.nm-icon-btn.is-danger:hover:not(:disabled) { color: var(--danger); border-color: var(--danger); }
.nm-icon-btn:disabled { opacity: .35; cursor: not-allowed; }

.nm-items { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 56px; }
.nm-items.is-over { background: color-mix(in srgb, var(--primary) 7%, transparent); outline: 2px dashed var(--primary); outline-offset: -4px; border-radius: var(--radius-sm); }
.nm-empty { padding: 14px; text-align: center; color: var(--text-muted); font-size: .82rem; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.nm-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); cursor: grab; }
.nm-item.is-dragging { opacity: .45; }
.nm-item-icon { flex: 0 0 auto; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--primary);
                background: color-mix(in srgb, var(--primary) 11%, var(--bg)); }
.nm-item-icon svg { width: 16px; height: 16px; }
.nm-item-label { flex: 1; min-width: 0; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-item-from { font-size: .7rem; color: var(--text-muted); white-space: nowrap; }
.nm-move { flex: 0 0 auto; max-width: 132px; font: inherit; font-size: .78rem; padding: 5px 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); }
.nm-side { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); padding: 14px; position: sticky; top: calc(var(--hrms-topbar-height, 64px) + 12px); }
@media (max-width: 900px) { .nm-side { position: static; } }
.nm-side .nm-items { padding: 0; }
.nm-pinned-note { margin: 10px 0 0; font-size: .78rem; color: var(--text-muted); line-height: 1.5; }
