/* ==========================================================================
   NeumERP — Application shell & dashboard
   Owns: sidebar, top bar, page header (content-header), footer, dashboard.
   Built on tokens.css. Logical properties throughout so RTL (Arabic, primary)
   and LTR (English) both work. Plain CSS — no build step.
   ========================================================================== */

:root {
  --nm-topbar-h: 64px;
  --nm-rail-w: 72px;
  --nm-page-x: 28px;
  --nm-sb-muted: var(--nm-sidebar-muted);
  --nm-sb-faint: #6b72a8;
  --nm-sb-line: rgba(255, 255, 255, .07);
  --nm-sb-active-bg: rgba(255, 255, 255, .08);
  --nm-sb-accent: var(--nm-sidebar-accent);
}

/* --------------------------------------------------------------------------
   Typography — the shell uses the design-system font. (rtl.css forces Tajawal
   on [class*="tw-"] with !important, so we have to be explicit here.)
   -------------------------------------------------------------------------- */
html body.nm-shell .nm-sidebar,
html body.nm-shell .nm-sidebar *:not(i):not([class*="fa-"]):not(.glyphicon),
html body.nm-shell .nm-topbar,
html body.nm-shell .nm-topbar *:not(i):not([class*="fa-"]):not(.glyphicon),
html body.nm-shell .nm-dash,
html body.nm-shell .nm-dash *:not(i):not([class*="fa-"]):not(.glyphicon),
html body.nm-shell .nm-dash-body .nm-panel-head,
html body.nm-shell .nm-dash-body .nm-panel-head *:not(i):not([class*="fa-"]):not(.glyphicon),
html body.nm-shell .content-header,
html body.nm-shell .content-header *:not(i):not([class*="fa-"]):not(.glyphicon),
html body.nm-shell .nm-footer,
html body.nm-shell .nm-footer *,
.popover.tour, .popover.tour *:not(i) {
  font-family: var(--nm-font) !important;
}

/* --------------------------------------------------------------------------
   Frame: fixed-height app with a single scrolling content region
   -------------------------------------------------------------------------- */
body.nm-shell { background: var(--nm-bg) !important; color: var(--nm-text); }
body.nm-shell .nm-app { height: 100vh; height: 100dvh; overflow: hidden; }
body.nm-shell .nm-main { height: 100%; min-height: 0; background: var(--nm-bg) !important; }
body.nm-shell #scrollable-container {
  height: auto !important;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--nm-gray-300) transparent;
}
@media print {
  body.nm-shell .nm-app, body.nm-shell .nm-main { height: auto !important; overflow: visible !important; }
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
body.nm-shell aside.side-bar.nm-sidebar {
  width: var(--nm-sidebar-width);
  height: 100%;
  flex-direction: column;
  color: var(--nm-sidebar-text);
  background:
    radial-gradient(120% 38% at 0% 0%, rgba(60, 73, 192, .32) 0%, rgba(60, 73, 192, 0) 62%),
    linear-gradient(180deg, var(--nm-sidebar-bg-2) 0%, var(--nm-sidebar-bg) 34%, var(--nm-sidebar-bg) 100%) !important;
  border-inline-end: 1px solid rgba(0, 0, 0, .25);
  position: relative;
  z-index: 30;
  transition: width 220ms var(--nm-ease), margin 220ms var(--nm-ease), box-shadow 220ms var(--nm-ease);
}
html[dir="rtl"] body.nm-shell aside.side-bar.nm-sidebar {
  background:
    radial-gradient(120% 38% at 100% 0%, rgba(60, 73, 192, .32) 0%, rgba(60, 73, 192, 0) 62%),
    linear-gradient(180deg, var(--nm-sidebar-bg-2) 0%, var(--nm-sidebar-bg) 34%, var(--nm-sidebar-bg) 100%) !important;
}

/* Brand */
.nm-sb-brand {
  display: flex; align-items: center; gap: 8px;
  height: var(--nm-topbar-h);
  padding: 0 14px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--nm-sb-line);
}
.nm-sb-brand-link {
  display: flex; align-items: center; gap: 11px;
  min-width: 0; flex: 1;
  padding: 6px; margin: 0 -6px;
  border-radius: var(--nm-radius);
  text-decoration: none !important;
  transition: background var(--nm-dur) var(--nm-ease);
}
.nm-sb-brand-link:hover { background: rgba(255, 255, 255, .04); }
.nm-sb-mark {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--nm-brand-400) 0%, var(--nm-brand-600) 55%, var(--nm-brand-800) 100%);
  color: #fff; font-weight: 700; font-size: 15px; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 16px -6px rgba(111, 76, 246, .8);
}
.nm-sb-mark-img { background: #fff; overflow: hidden; }
.nm-sb-mark-img img { width: 100%; height: 100%; object-fit: contain; }
.nm-sb-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.nm-sb-brand-name {
  color: #fff; font-size: 14px; font-weight: 600; letter-spacing: -.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nm-sb-brand-sub {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 2px;
  color: var(--nm-sb-muted); font-size: 11.5px; font-weight: 500;
  white-space: nowrap;
}
.nm-sb-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--nm-success-500);
  box-shadow: 0 0 0 3px rgba(18, 183, 106, .18);
}
.nm-sb-close {
  display: none;
  align-items: center; justify-content: center;
  width: 32px; height: 32px; flex-shrink: 0;
  border: 0; border-radius: 8px;
  background: rgba(255, 255, 255, .06); color: var(--nm-sb-muted);
}
.nm-sb-close:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nm-sb-close svg { width: 18px; height: 18px; }

.nm-sb-section-label {
  flex-shrink: 0;
  padding: 18px 24px 8px;
  color: var(--nm-sb-faint);
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden;
}
html[dir="rtl"] .nm-sb-section-label { letter-spacing: 0; font-size: 12px; text-transform: none; }

/* Menu container (rendered by AdminlteCustomPresenter) */
body.nm-shell #side-bar {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 12px 16px !important;
  border: 0 !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .12) transparent;
}
body.nm-shell #side-bar::-webkit-scrollbar { width: 6px; }
body.nm-shell #side-bar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 6px; }
body.nm-shell #side-bar > * { margin: 0 !important; }
body.nm-shell #side-bar > * + * { margin-top: 2px !important; }

/* Top-level items (plain links + group toggles) */
body.nm-shell #side-bar > a,
body.nm-shell #side-bar > div > a.drop_down {
  position: relative;
  display: flex !important; align-items: center; gap: 11px;
  height: 38px;
  padding: 0 10px !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: var(--nm-sidebar-text) !important;
  font-size: 13.5px !important; font-weight: 500 !important; letter-spacing: 0 !important;
  line-height: 1.2;
  text-decoration: none !important;
  outline: none;
  transition: background var(--nm-dur) var(--nm-ease), color var(--nm-dur) var(--nm-ease);
}
body.nm-shell #side-bar > a:hover,
body.nm-shell #side-bar > div > a.drop_down:hover,
body.nm-shell #side-bar > a:focus-visible,
body.nm-shell #side-bar > div > a.drop_down:focus-visible {
  background: var(--nm-sidebar-hover) !important;
  color: #fff !important;
}
body.nm-shell #side-bar > a:focus-visible,
body.nm-shell #side-bar > div > a.drop_down:focus-visible { box-shadow: 0 0 0 2px rgba(63, 214, 188, .45); }

/* Item icon (first svg / font icon) */
body.nm-shell #side-bar > a > svg:first-child,
body.nm-shell #side-bar > div > a.drop_down > svg:first-child,
body.nm-shell #side-bar > a > i:first-child,
body.nm-shell #side-bar > div > a.drop_down > i:first-child {
  flex-shrink: 0;
  width: 19px !important; height: 19px !important;
  stroke-width: 1.6;
  color: var(--nm-sb-muted);
  transition: color var(--nm-dur) var(--nm-ease);
}
body.nm-shell #side-bar > a > i:first-child,
body.nm-shell #side-bar > div > a.drop_down > i:first-child { font-size: 15px; line-height: 19px; text-align: center; }
body.nm-shell #side-bar > a:hover > :first-child,
body.nm-shell #side-bar > div > a.drop_down:hover > :first-child { color: #e3e6f7; }

body.nm-shell #side-bar > a > .tw-truncate,
body.nm-shell #side-bar > div > a.drop_down > .tw-truncate { flex: 1 1 auto; min-width: 0; }

/* Chevron */
body.nm-shell #side-bar a.drop_down > svg.svg {
  width: 15px !important; height: 15px !important;
  margin: 0 !important; margin-inline-start: auto !important;
  color: var(--nm-sb-faint) !important;
  stroke-width: 2;
  transition: color var(--nm-dur) var(--nm-ease);
}
/* The presenter draws a left-pointing chevron for collapsed groups —
   correct "forward" in RTL; flip it for LTR. */
html[dir="ltr"] body.nm-shell #side-bar a.drop_down > svg.svg path[d^="M15 6"] {
  transform: rotate(180deg); transform-origin: center; transform-box: fill-box;
}
body.nm-shell #side-bar a.drop_down:hover > svg.svg { color: var(--nm-sb-muted) !important; }

/* Active single link */
body.nm-shell #side-bar > a[class*="tw-bg-gray-200"] {
  background: var(--nm-sb-active-bg) !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
body.nm-shell #side-bar > a[class*="tw-bg-gray-200"] > :first-child { color: var(--nm-sb-accent); }
body.nm-shell #side-bar > a[class*="tw-bg-gray-200"]::before,
body.nm-shell #side-bar > div[class*="tw-bg-gray-200"] > a.drop_down::before {
  content: "";
  position: absolute;
  inset-inline-start: -12px; top: 9px; bottom: 9px;
  width: 3px;
  border-start-end-radius: 3px; border-end-end-radius: 3px;
  background: var(--nm-sb-accent);
  box-shadow: 0 0 12px rgba(63, 214, 188, .55);
}

/* Group containing the active page */
body.nm-shell #side-bar > div[class*="tw-bg-gray-200"] {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
body.nm-shell #side-bar > div[class*="tw-bg-gray-200"] > a.drop_down { color: #fff !important; }
body.nm-shell #side-bar > div[class*="tw-bg-gray-200"] > a.drop_down > :first-child { color: var(--nm-sb-accent); }

/* Sub-menu */
body.nm-shell #side-bar .chiled {
  position: relative;
  margin: 2px 0 6px !important;
  padding: 0 !important;
}
body.nm-shell #side-bar .chiled > .tw-absolute {
  left: auto !important; right: auto !important;
  inset-inline-start: 19px;
  top: 4px !important; bottom: 4px !important; height: auto !important;
  width: 1px;
  background: var(--nm-sb-line) !important;
}
body.nm-shell #side-bar .chiled > div:last-child > * { margin: 0 !important; }
body.nm-shell #side-bar .chiled > div:last-child > * + * { margin-top: 1px !important; }
body.nm-shell #side-bar .chiled a {
  position: relative;
  display: flex !important; align-items: center; gap: 8px;
  height: 33px;
  padding: 0 10px !important; padding-inline-start: 41px !important;
  border-radius: 8px;
  color: var(--nm-sb-muted) !important;
  font-size: 13px !important; font-weight: 450 !important; letter-spacing: 0 !important;
  text-decoration: none !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background var(--nm-dur) var(--nm-ease), color var(--nm-dur) var(--nm-ease);
}
body.nm-shell #side-bar .chiled a > span { overflow: hidden; text-overflow: ellipsis; }
body.nm-shell #side-bar .chiled a > i,
body.nm-shell #side-bar .chiled a > svg { width: 14px; height: 14px; font-size: 12px; flex-shrink: 0; opacity: .8; }
body.nm-shell #side-bar .chiled a:hover { color: #fff !important; background: rgba(255, 255, 255, .04); }
body.nm-shell #side-bar .chiled a[class*="tw-text-primary-700"] {
  color: #fff !important;
  font-weight: 550 !important;
  background: rgba(255, 255, 255, .05);
}
body.nm-shell #side-bar .chiled a[class*="tw-text-primary-700"]::before {
  content: "";
  position: absolute;
  inset-inline-start: 16px; top: 50%;
  width: 7px; height: 7px; margin-top: -3.5px;
  border-radius: 50%;
  background: var(--nm-sb-accent);
  box-shadow: 0 0 0 3px var(--nm-sidebar-bg), 0 0 10px rgba(63, 214, 188, .6);
}

/* Footer (user) */
.nm-sb-foot {
  flex-shrink: 0;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--nm-sb-line);
}
.nm-sb-user {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px;
  border-radius: 10px;
  text-decoration: none !important;
  transition: background var(--nm-dur) var(--nm-ease);
}
.nm-sb-user:hover { background: rgba(255, 255, 255, .05); }
.nm-sb-user-avatar {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  color: #eef0fb; font-size: 13px; font-weight: 600;
}
.nm-sb-user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.nm-sb-user-name { color: #eef0fb; font-size: 13px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm-sb-user-sub { color: var(--nm-sb-faint); font-size: 11px; font-variant-numeric: tabular-nums; }

/* ---------- Rail (collapsed) mode — desktop only ---------- */
@media (min-width: 1024px) {
  body.nm-shell.nm-rail aside.side-bar.nm-sidebar { width: var(--nm-rail-w); }
  body.nm-shell.nm-rail aside.side-bar.nm-sidebar:hover {
    width: var(--nm-sidebar-width);
    margin-inline-end: calc(var(--nm-rail-w) - var(--nm-sidebar-width));
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), 24px 0 48px -12px rgba(16, 12, 40, .45);
    transition-delay: 120ms;
  }
  html[dir="rtl"] body.nm-shell.nm-rail aside.side-bar.nm-sidebar:hover {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), -24px 0 48px -12px rgba(16, 12, 40, .45);
  }
  body.nm-shell.nm-rail aside.side-bar:not(:hover) .nm-sb-brand { padding: 0; justify-content: center; }
  body.nm-shell.nm-rail aside.side-bar:not(:hover) .nm-sb-brand-link { flex: 0 0 auto; margin: 0; }
  body.nm-shell.nm-rail aside.side-bar:not(:hover) .nm-sb-brand-text,
  body.nm-shell.nm-rail aside.side-bar:not(:hover) .nm-sb-user-text,
  body.nm-shell.nm-rail aside.side-bar:not(:hover) #side-bar > a > span,
  body.nm-shell.nm-rail aside.side-bar:not(:hover) #side-bar a.drop_down > span,
  body.nm-shell.nm-rail aside.side-bar:not(:hover) #side-bar a.drop_down > svg.svg,
  body.nm-shell.nm-rail aside.side-bar:not(:hover) #side-bar .chiled { display: none !important; }
  body.nm-shell.nm-rail aside.side-bar:not(:hover) .nm-sb-section-label {
    font-size: 0; padding: 14px 0 6px; text-align: center;
  }
  body.nm-shell.nm-rail aside.side-bar:not(:hover) .nm-sb-section-label::after {
    content: ""; display: inline-block; width: 18px; height: 1px; background: var(--nm-sb-line); vertical-align: middle;
  }
  body.nm-shell.nm-rail aside.side-bar:not(:hover) #side-bar > a,
  body.nm-shell.nm-rail aside.side-bar:not(:hover) #side-bar > div > a.drop_down { justify-content: center; padding: 0 !important; }
  body.nm-shell.nm-rail aside.side-bar:not(:hover) .nm-sb-user { justify-content: center; padding: 6px 0; }
  body.nm-shell.nm-rail aside.side-bar:not(:hover) #side-bar { scrollbar-width: none; }
}

/* ---------- Mobile drawer ---------- */
@keyframes nm-drawer-in-ltr { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes nm-drawer-in-rtl { from { transform: translateX(100%); } to { transform: none; } }
body.nm-shell aside.side-bar.nm-sidebar.small-view-side-active {
  display: flex !important;
  flex-direction: column;
  position: fixed !important;
  top: 0; bottom: 0;
  inset-inline-start: 0;
  width: min(300px, 86vw);
  height: 100%;
  z-index: 1040 !important;
  box-shadow: 0 24px 64px -12px rgba(10, 8, 30, .6);
  animation: nm-drawer-in-ltr 240ms var(--nm-ease);
}
html[dir="rtl"] body.nm-shell aside.side-bar.nm-sidebar.small-view-side-active { animation-name: nm-drawer-in-rtl; }
body.nm-shell aside.side-bar.small-view-side-active .nm-sb-close { display: inline-flex; }
body.nm-shell .overlay { z-index: 1035 !important; }

/* ==========================================================================
   TOP BAR
   ========================================================================== */
.nm-topbar {
  position: relative;
  z-index: 25;
  flex-shrink: 0;
  height: var(--nm-topbar-h);
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--nm-border);
}
.nm-topbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 100%;
  padding: 0 20px;
}
.nm-tb-start, .nm-tb-end { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nm-tb-start { flex: 1 1 auto; }
.nm-tb-end { flex: 0 0 auto; }
.nm-tb-group { display: flex; align-items: center; gap: 2px; }

/* Icon button */
.nm-tb-icon,
.nm-topbar .nm-tb-slot > button,
.nm-topbar .nm-dd > summary.nm-tb-icon {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: var(--nm-gray-500) !important;
  box-shadow: none !important;
  cursor: pointer;
  text-decoration: none !important;
  transition: background var(--nm-dur) var(--nm-ease), color var(--nm-dur) var(--nm-ease);
}
.nm-tb-icon:hover, .nm-tb-icon:focus-visible,
.nm-topbar .nm-tb-slot > button:hover,
.nm-dd[open] > summary.nm-tb-icon,
.nm-notif.open > .nm-tb-icon {
  background: var(--nm-gray-100) !important;
  color: var(--nm-gray-900) !important;
}
.nm-tb-icon:focus-visible { outline: none; box-shadow: var(--nm-focus-ring) !important; }
.nm-tb-icon svg,
.nm-topbar .nm-tb-slot > button svg { width: 20px !important; height: 20px !important; stroke-width: 1.75; }
.nm-topbar .nm-tb-slot > button.hide { display: none !important; }
.nm-tb-slot { display: inline-flex; align-items: center; gap: 2px; }

/* Text buttons */
.nm-tb-btn,
.nm-topbar .nm-tb-slot-btn > a {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 8px;
  height: 36px;
  padding: 0 14px !important;
  border-radius: 9px !important;
  font-size: 13.5px !important; font-weight: 600 !important; line-height: 1;
  white-space: nowrap;
  text-decoration: none !important;
  cursor: pointer;
  transition: background var(--nm-dur) var(--nm-ease), border-color var(--nm-dur) var(--nm-ease), box-shadow var(--nm-dur) var(--nm-ease), color var(--nm-dur) var(--nm-ease);
}
.nm-tb-btn svg, .nm-topbar .nm-tb-slot-btn > a svg { width: 18px !important; height: 18px !important; stroke-width: 1.75; flex-shrink: 0; }
.nm-tb-btn-primary {
  background: var(--nm-primary) !important;
  color: #fff !important;
  border: 0;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .1), inset 0 1px 0 rgba(255, 255, 255, .16), 0 4px 12px -4px rgba(42, 54, 177, .5);
}
.nm-tb-btn-primary:hover, .nm-tb-btn-primary:focus { background: var(--nm-primary-hover) !important; color: #fff !important; }
.nm-topbar .nm-tb-slot-btn > a {
  background: var(--nm-surface) !important;
  color: var(--nm-gray-700) !important;
  border: 1px solid var(--nm-border) !important;
  box-shadow: var(--nm-shadow-xs) !important;
}
.nm-topbar .nm-tb-slot-btn > a:hover { background: var(--nm-gray-50) !important; border-color: var(--nm-border-strong) !important; color: var(--nm-gray-900) !important; }
.nm-topbar .nm-tb-slot-btn > a svg { color: var(--nm-gray-500); }
.nm-tb-btn-danger { background: var(--nm-danger-50) !important; color: var(--nm-danger-700) !important; border: 1px solid #f6caca; }
.nm-tb-btn-danger:hover { background: #fbe3e3 !important; }

.nm-tb-divider { width: 1px; height: 24px; background: var(--nm-border); margin: 0 6px; flex-shrink: 0; }

.nm-tb-date {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 10px;
  margin: 0 4px;
  border-radius: 8px;
  background: var(--nm-gray-50);
  border: 1px solid var(--nm-gray-100);
  color: var(--nm-gray-600);
  font-size: 12.5px; font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nm-tb-date svg { width: 15px; height: 15px; color: var(--nm-gray-400); }

/* Breadcrumb */
.nm-crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; margin-inline-start: 4px; }
.nm-crumb-home {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 8px; color: var(--nm-gray-400) !important;
  transition: background var(--nm-dur), color var(--nm-dur);
}
.nm-crumb-home:hover { background: var(--nm-gray-100); color: var(--nm-gray-700) !important; }
.nm-crumb-home svg { width: 18px; height: 18px; }
.nm-crumb-trail { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nm-crumb-sep { color: var(--nm-gray-300); font-size: 14px; flex-shrink: 0; }
.nm-crumb { color: var(--nm-gray-500); font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm-crumb.is-current { color: var(--nm-gray-900); font-weight: 600; }

/* Superadmin subscription info */
.nm-topbar .nm-tb-subscription > i {
  float: none !important;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  margin-inline-start: 4px;
  border-radius: 8px;
  color: var(--nm-gray-400) !important;
  font-size: 15px;
  transition: background var(--nm-dur), color var(--nm-dur);
}
.nm-topbar .nm-tb-subscription > i:hover { background: var(--nm-gray-100); color: var(--nm-primary) !important; }

/* Dropdowns built on <details> */
.nm-dd { position: relative; display: inline-flex; }
.nm-dd > summary { list-style: none; }
.nm-dd > summary::-webkit-details-marker { display: none; }
.nm-dd > summary::marker { content: ""; }
@keyframes nm-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.nm-dd-menu,
.nm-notif > .dropdown-menu.nm-notif-menu {
  position: absolute;
  top: calc(100% + 8px);
  z-index: 1060;
  min-width: 232px;
  padding: 6px;
  margin: 0;
  background: var(--nm-surface);
  border: 1px solid var(--nm-border);
  border-radius: 12px;
  box-shadow: var(--nm-shadow-lg);
  text-align: start;
  animation: nm-pop 140ms var(--nm-ease);
  transform-origin: top;
}
html[dir="ltr"] .nm-dd-menu { right: 0; left: auto; }
html[dir="rtl"] .nm-dd-menu { left: 0; right: auto; }
.nm-dd-label {
  padding: 8px 10px 6px;
  color: var(--nm-gray-400);
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
html[dir="rtl"] .nm-dd-label { letter-spacing: 0; text-transform: none; font-size: 12px; }
.nm-dd-item {
  display: flex; align-items: center; gap: 10px;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--nm-gray-700) !important;
  font-size: 13.5px; font-weight: 500;
  text-decoration: none !important;
  transition: background var(--nm-dur), color var(--nm-dur);
}
.nm-dd-item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--nm-gray-400); stroke-width: 1.75; }
.nm-dd-item:hover, .nm-dd-item:focus-visible { background: var(--nm-gray-50); color: var(--nm-gray-900) !important; outline: none; }
.nm-dd-item:hover svg { color: var(--nm-gray-600); }
.nm-dd-item-danger { color: var(--nm-danger-700) !important; }
.nm-dd-item-danger svg { color: var(--nm-danger-500); }
.nm-dd-item-danger:hover { background: var(--nm-danger-50); color: var(--nm-danger-700) !important; }
.nm-dd-sep { height: 1px; margin: 6px -6px; background: var(--nm-gray-100); }
.nm-dd-menu-user { min-width: 264px; }
.nm-dd-profile { display: flex; align-items: center; gap: 12px; padding: 10px 10px 8px; }
.nm-dd-profile-text { min-width: 0; }
.nm-dd-profile-name { margin: 0; color: var(--nm-gray-900); font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm-dd-profile-mail { margin: 2px 0 0; color: var(--nm-gray-500); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr; text-align: start; }
html[dir="rtl"] .nm-dd-profile-mail { text-align: right; }

/* User trigger */
.nm-user-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  height: 42px;
  padding: 0 8px 0 4px;
  padding-inline-start: 4px; padding-inline-end: 8px;
  border-radius: 11px;
  cursor: pointer;
  transition: background var(--nm-dur) var(--nm-ease);
}
.nm-user-trigger:hover, .nm-user-menu[open] > .nm-user-trigger { background: var(--nm-gray-100); }
.nm-avatar {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--nm-brand-600);
  color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.nm-avatar-lg { width: 40px; height: 40px; font-size: 15px; }
.nm-user-meta { display: flex; flex-direction: column; line-height: 1.25; max-width: 180px; text-align: start; }
.nm-user-name { color: var(--nm-gray-900); font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm-user-role { color: var(--nm-gray-500); font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm-user-caret { width: 15px; height: 15px; color: var(--nm-gray-400); flex-shrink: 0; }

/* Notifications */
.nm-notif { position: relative; list-style: none; display: inline-flex; }
.nm-notif .notifications_count {
  position: absolute !important;
  top: 3px; inset-inline-end: 3px;
  min-width: 17px; height: 17px;
  padding: 0 4px !important;
  border-radius: 999px !important;
  background: var(--nm-danger-500) !important;
  color: #fff !important;
  font-size: 10px !important; font-weight: 700 !important; line-height: 13px !important;
  border: 2px solid #fff;
  text-align: center;
}
html[dir] .nm-notif .notifications_count { left: auto; right: auto; }
html[dir="ltr"] .nm-notif .notifications_count { right: 3px; }
html[dir="rtl"] .nm-notif .notifications_count { left: 3px; }
.nm-notif .notifications_count:empty { display: none; }
.nm-notif > .dropdown-menu.nm-notif-menu {
  width: 380px; max-width: calc(100vw - 24px);
  max-height: min(72vh, 560px);
  overflow-y: auto;
  padding: 0;
  float: none;
}
html[dir="ltr"] .nm-notif > .dropdown-menu.nm-notif-menu { right: 0 !important; left: auto !important; }
html[dir="rtl"] .nm-notif > .dropdown-menu.nm-notif-menu { left: 0 !important; right: auto !important; }
.nm-notif-menu > li { list-style: none; }
.nm-notif-head {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px;
  background: var(--nm-surface);
  border-bottom: 1px solid var(--nm-gray-100);
  color: var(--nm-gray-900); font-size: 14px; font-weight: 600;
}
.nm-notif-menu ul.menu { list-style: none; margin: 0; padding: 6px; max-height: none !important; overflow: visible !important; }
.nm-notif-item > a {
  display: flex !important; align-items: flex-start; gap: 12px;
  padding: 10px !important;
  border-radius: 10px;
  color: var(--nm-gray-700) !important;
  white-space: normal !important;
  text-decoration: none !important;
  border: 0 !important;
}
.nm-notif-item > a:hover { background: var(--nm-gray-50) !important; }
.nm-notif-item.unread > a { background: var(--nm-brand-50); }
.nm-notif-item.unread > a:hover { background: var(--nm-brand-100) !important; }
.nm-notif-icon {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--nm-gray-100); color: var(--nm-gray-600);
  font-size: 13px;
}
.nm-notif-item.unread .nm-notif-icon { background: #fff; color: var(--nm-primary); box-shadow: inset 0 0 0 1px var(--nm-brand-100); }
.nm-notif-icon .notif-icon { width: auto !important; margin: 0 !important; color: inherit !important; font-size: 13px !important; }
.nm-notif-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 13px; line-height: 1.5; }
.nm-notif-text .notif-info { color: var(--nm-gray-700); }
.nm-notif-text .time { color: var(--nm-gray-400); font-size: 11.5px; float: none !important; }
.nm-notif-empty {
  display: flex !important; flex-direction: column; align-items: center; gap: 8px;
  padding: 28px 16px !important;
  color: var(--nm-gray-500); font-size: 13px;
}
.nm-notif-empty svg { color: var(--nm-gray-300); }
.nm-notif-menu .load_more_li { padding: 6px; border-top: 1px solid var(--nm-gray-100); }
.nm-notif-menu .load_more_li a {
  display: block; padding: 8px; border-radius: 8px; text-align: center;
  color: var(--nm-primary) !important; font-size: 13px; font-weight: 600;
}
.nm-notif-menu .load_more_li a:hover { background: var(--nm-brand-50); text-decoration: none; }

/* Responsive top bar */
.nm-tb-only-mobile { display: inline-flex; }
.nm-tb-only-desktop { display: none !important; }
@media (min-width: 1024px) {
  .nm-tb-only-mobile { display: none !important; }
  .nm-tb-only-desktop { display: inline-flex !important; }
}
@media (max-width: 1279px) { .nm-tb-hide-md { display: none !important; } }
@media (max-width: 1279px) {
  .nm-user-meta, .nm-user-caret { display: none; }
  .nm-user-trigger { padding: 0 3px; }
}
@media (max-width: 767px) {
  .nm-topbar-inner { padding: 0 12px; gap: 6px; }
  .nm-tb-hide-sm, .nm-topbar .nm-tb-slot-btn, .nm-tb-subscription { display: none !important; }
  .nm-tb-btn-primary { padding: 0 !important; width: 36px; }
  .nm-tb-btn-primary span { display: none; }
  .nm-tb-divider { display: none; }
  .nm-crumb-home, .nm-crumb-sep, .nm-crumb:not(.is-current) { display: none; }
  .nm-crumb-trail .nm-crumb-sep:first-child { display: none; }
  .nm-tb-end { gap: 2px; }
  .nm-topbar .nm-tb-slot > button { width: 34px; }
}

/* ==========================================================================
   PAGE HEADER (content-header) & CONTENT RHYTHM
   ========================================================================== */
body.nm-shell .content-header {
  padding: 24px var(--nm-page-x) 4px !important;
  margin: 0;
  background: transparent;
}
body.nm-shell .content-header > h1 {
  margin: 0 !important;
  color: var(--nm-gray-900) !important;
  font-size: 22px !important;
  line-height: 1.3 !important;
  font-weight: 700 !important;
  letter-spacing: -.015em;
}
body.nm-shell .content-header > h1 > small {
  display: block;
  margin-top: 4px;
  padding: 0 !important;
  color: var(--nm-gray-500) !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  letter-spacing: 0;
}
body.nm-shell .content-header > .breadcrumb {
  position: static; float: none;
  margin: 8px 0 0; padding: 0;
  background: transparent;
  font-size: 12.5px;
}
body.nm-shell section.content {
  padding: 16px var(--nm-page-x) 24px;
}
@media (max-width: 767px) {
  :root { --nm-page-x: 16px; }
  body.nm-shell .content-header { padding-top: 18px !important; }
  body.nm-shell .content-header > h1 { font-size: 19px !important; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.nm-footer { margin-top: 8px; padding: 0 var(--nm-page-x); }
.nm-footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 18px 0 22px;
  border-top: 1px solid var(--nm-border);
}
.nm-footer p { margin: 0; color: var(--nm-gray-400); font-size: 12px; }
.nm-footer-ver {
  display: inline-flex; align-items: center; gap: 6px;
  font-variant-numeric: tabular-nums;
  direction: ltr;
}
.nm-footer-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--nm-success-500); }

/* Back-to-top button */
body.nm-shell .scrolltop .scroll {
  border-radius: 10px !important;
  background: var(--nm-gray-900) !important;
  color: #fff !important;
  box-shadow: var(--nm-shadow-md);
}

/* ==========================================================================
   DASHBOARD
   ========================================================================== */
.nm-dash {
  padding: 28px var(--nm-page-x) 4px;
  background:
    radial-gradient(900px 260px at 100% -40px, rgba(42, 54, 177, .07), rgba(42, 54, 177, 0) 70%),
    radial-gradient(700px 220px at 0% -60px, rgba(19, 184, 158, .05), rgba(19, 184, 158, 0) 70%);
}
html[dir="rtl"] .nm-dash {
  background:
    radial-gradient(900px 260px at 0% -40px, rgba(42, 54, 177, .07), rgba(42, 54, 177, 0) 70%),
    radial-gradient(700px 220px at 100% -60px, rgba(19, 184, 158, .05), rgba(19, 184, 158, 0) 70%);
}
.nm-dash-head {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: 28px;
}
.nm-dash-heading { min-width: 0; }
.nm-dash-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 10px;
  padding: 4px 10px 4px 8px;
  padding-inline-start: 8px; padding-inline-end: 10px;
  border-radius: 999px;
  background: var(--nm-surface);
  border: 1px solid var(--nm-border);
  box-shadow: var(--nm-shadow-xs);
  color: var(--nm-gray-600);
  font-size: 12px; font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.nm-dash-eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--nm-success-500); box-shadow: 0 0 0 3px rgba(18, 183, 106, .16); }
.nm-dash-eyebrow-sep { color: var(--nm-gray-300); }
.nm-dash-title {
  margin: 0;
  color: var(--nm-gray-900);
  font-size: 22px; line-height: 1.3; font-weight: 800;
  letter-spacing: -.02em;
}
.nm-dash-sub { margin: 6px 0 0; color: var(--nm-gray-500); font-size: 14px; line-height: 1.6; }
.nm-dash-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nm-dash-location { min-width: 200px; }
.nm-date-filter {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--nm-surface);
  border: 1px solid var(--nm-border-strong);
  box-shadow: var(--nm-shadow-xs);
  color: var(--nm-gray-700);
  font-size: 13.5px; font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--nm-dur), box-shadow var(--nm-dur), background var(--nm-dur);
}
.nm-date-filter:hover { background: var(--nm-gray-25); border-color: var(--nm-gray-400); }
.nm-date-filter:focus-visible { outline: none; box-shadow: var(--nm-focus-ring); border-color: var(--nm-brand-400); }
.nm-date-filter svg { width: 17px; height: 17px; color: var(--nm-gray-500); flex-shrink: 0; }
.nm-date-filter .nm-date-filter-caret { width: 15px; height: 15px; color: var(--nm-gray-400); }

/* KPI sections */
.nm-kpi-section + .nm-kpi-section { margin-top: 24px; }
.nm-section-label {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px;
  color: var(--nm-gray-500);
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
html[dir="rtl"] .nm-section-label { letter-spacing: 0; text-transform: none; font-size: 13px; }
.nm-section-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to right, var(--nm-border), transparent); }
html[dir="rtl"] .nm-section-label::after { background: linear-gradient(to left, var(--nm-border), transparent); }

.nm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.nm-kpi {
  --tone: var(--nm-primary);
  --tone-soft: var(--nm-brand-50);
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 18px 18px 20px;
  background: var(--nm-surface);
  border: 1px solid var(--nm-border);
  border-radius: 12px;
  box-shadow: none;
  transition: border-color var(--nm-dur) var(--nm-ease), box-shadow var(--nm-dur) var(--nm-ease), transform var(--nm-dur) var(--nm-ease);
}

.nm-kpi:hover { border-color: var(--nm-border-strong); box-shadow: var(--nm-shadow-sm); }
.nm-kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.nm-kpi-label {
  display: inline-flex; align-items: center; gap: 6px;
  min-width: 0;
  padding-top: 7px;
  color: var(--nm-gray-500);
  font-size: 13px; font-weight: 500; line-height: 1.35;
}
.nm-kpi-label-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm-kpi-label .fa-info-circle { color: var(--nm-gray-300) !important; font-size: 13px; cursor: help; transition: color var(--nm-dur); }
.nm-kpi-label .fa-info-circle:hover { color: var(--nm-gray-500) !important; }
.nm-kpi-icon {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--tone-soft);
  color: var(--tone);
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .04);
}
.nm-kpi-icon svg { width: 19px; height: 19px; }
.nm-kpi-value {
  margin: 14px 0 0;
  color: var(--nm-gray-900);
  font-size: 24px; line-height: 1.2; font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-height: 29px;
}
.nm-kpi-value:empty::before {
  content: "";
  display: block;
  width: 60%; height: 22px; margin-top: 3px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--nm-gray-100), var(--nm-gray-50), var(--nm-gray-100));
  background-size: 200% 100%;
  animation: nm-shimmer 1.2s linear infinite;
}
@keyframes nm-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.nm-kpi-value .fa-sync, .nm-kpi-value .fa-spin { font-size: 16px; color: var(--nm-gray-300); }

.nm-tone-brand { --tone: var(--nm-brand-600); --tone-soft: var(--nm-brand-50); }
.nm-tone-green { --tone: var(--nm-accent-700); --tone-soft: var(--nm-accent-50); }
.nm-tone-amber { --tone: var(--nm-warning-700); --tone-soft: var(--nm-warning-50); }
.nm-tone-rose  { --tone: var(--nm-danger-700); --tone-soft: var(--nm-danger-50); }
.nm-tone-sky   { --tone: var(--nm-brand-400); --tone-soft: var(--nm-brand-50); }
.nm-tone-slate { --tone: var(--nm-gray-600); --tone-soft: var(--nm-gray-100); }

@media (max-width: 1279px) { .nm-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .nm-dash { padding-top: 20px; }
  .nm-dash-title { font-size: 22px; }
  .nm-dash-sub { font-size: 13px; }
  .nm-dash-head { margin-bottom: 20px; }
  .nm-dash-filters, .nm-dash-location, .nm-date-filter { width: 100%; }
  .nm-date-filter { justify-content: flex-start; }
  .nm-date-filter .nm-date-filter-caret { margin-inline-start: auto; }
  .nm-kpi-grid { gap: 10px; }
  .nm-kpi { padding: 14px 14px 16px; }
  .nm-kpi-icon { width: 30px; height: 30px; border-radius: 8px; }
  .nm-kpi-icon svg { width: 16px; height: 16px; }
  .nm-kpi-label { font-size: 12px; padding-top: 5px; }
  .nm-kpi-value { font-size: 18px; margin-top: 10px; min-height: 22px; }
}

/* Panels (charts + tables) */
.nm-dash-body { padding: 24px var(--nm-page-x) 8px; }
.nm-panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.nm-panel.nm-span-2 { grid-column: 1 / -1; }
@media (max-width: 1023px) { .nm-panel-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
.nm-panel {
  min-width: 0;
  background: var(--nm-surface);
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius-lg);
  box-shadow: var(--nm-shadow-xs);
}
.nm-panel-head {
  display: flex; align-items: center; gap: 12px;
  min-height: 64px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--nm-gray-100);
}
.nm-panel-icon {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--nm-brand-50);
  color: var(--nm-brand-600);
  box-shadow: inset 0 0 0 1px var(--nm-brand-100);
}
.nm-panel-icon .nm-panel-svg { width: 18px; height: 18px; stroke-width: 1.75; }
.nm-panel-titlebar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 10px 16px;
  flex: 1 1 auto; min-width: 0;
}
.nm-panel-title { min-width: 0; flex: 1 1 auto; }
.nm-panel-h {
  margin: 0 !important;
  color: var(--nm-gray-900);
  font-size: 15px !important; line-height: 1.4 !important; font-weight: 600 !important;
  letter-spacing: -.005em;
}
.nm-panel-h .fa-info-circle { color: var(--nm-gray-300) !important; font-size: 13px; margin-inline-start: 4px; }
.nm-panel-head > .nm-panel-h { flex: 1; }
.nm-panel-tools { flex: 0 1 240px; min-width: 180px; }
.nm-panel-tools:empty { display: none; }
.nm-panel-chartwrap { padding: 8px 12px 12px; }
.nm-chart { border: 0; background: transparent; border-radius: 0; }
.nm-chart-canvas { margin: 0; min-height: 300px; }
.nm-chart-canvas > div { width: 100% !important; }
.nm-panel-table { padding: 8px 20px 18px; }
.nm-table-scroll { overflow-x: auto; }
.nm-table-wrap { min-width: 100%; }
.nm-table-wrap > .table, .nm-table-wrap .dataTables_wrapper { margin-bottom: 0; }
@media (max-width: 767px) {
  .nm-dash-body { padding-top: 16px; }
  .nm-panel-head { padding: 12px 14px; }
  .nm-panel-tools { flex-basis: 100%; }
  .nm-panel-table { padding: 6px 12px 14px; }
  .nm-panel-chartwrap { padding: 4px 4px 8px; }
}

/* Highcharts polish (theme set in home view; these are DOM fallbacks) */
.nm-chart .highcharts-background { fill: transparent; }
.nm-chart .highcharts-container { font-family: var(--nm-font) !important; }

/* ==========================================================================
   PRODUCT TOUR (bootstrap-tour)
   ========================================================================== */
.popover.tour {
  max-width: 340px;
  padding: 0;
  border: 1px solid var(--nm-border);
  border-radius: 14px;
  box-shadow: 0 24px 48px -12px rgba(16, 24, 40, .28), 0 4px 8px -4px rgba(16, 24, 40, .08);
  overflow: visible;
}
.popover.tour .popover-title {
  padding: 16px 18px 4px;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 14px 14px 0 0;
  color: var(--nm-gray-900);
  font-size: 15px; font-weight: 600 !important;
  text-align: start;
}
.popover.tour .popover-content {
  padding: 6px 18px 4px;
  color: var(--nm-gray-600);
  font-size: 13.5px; line-height: 1.65;
  text-align: start;
}
.popover.tour .popover-navigation {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 14px 18px 16px;
}
.popover.tour .popover-navigation .btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px !important;
  font-size: 13px; font-weight: 600;
  box-shadow: none;
  float: none !important;
}
.popover.tour .popover-navigation .btn-success {
  background: var(--nm-primary) !important; border: 1px solid var(--nm-primary) !important; color: #fff !important;
}
.popover.tour .popover-navigation .btn-success:hover { background: var(--nm-primary-hover) !important; }
.popover.tour .popover-navigation .btn-success.disabled,
.popover.tour .popover-navigation .btn-success[disabled] {
  background: var(--nm-gray-100) !important; border-color: var(--nm-gray-100) !important; color: var(--nm-gray-400) !important; opacity: 1;
}
.popover.tour .popover-navigation [data-role="end"] {
  margin-inline-start: auto;
  background: transparent !important; border: 0 !important; color: var(--nm-gray-500) !important;
}
.popover.tour .popover-navigation [data-role="end"]:hover { color: var(--nm-gray-900) !important; background: var(--nm-gray-50) !important; }
.tour-backdrop { background: rgba(15, 13, 30, .55) !important; opacity: 1 !important; }
.tour-step-background { border-radius: 10px !important; background: rgba(255, 255, 255, .08) !important; }
.popover.tour.right > .arrow { border-right-color: var(--nm-border); }
.popover.tour.left > .arrow { border-left-color: var(--nm-border); }

/* ==========================================================================
   SETTINGS SEARCH (layouts/partials/search_settings)
   ========================================================================== */
.nm-settings-search { margin-bottom: 8px; }
.nm-settings-search .input-group-addon {
  background: var(--nm-surface); color: var(--nm-gray-400);
  border-color: var(--nm-border-strong);
}
.popover.tour.orphan {
  position: fixed !important;
  top: 50% !important; left: 50% !important; right: auto !important;
  margin: 0 !important;
  transform: translate(-50%, -50%);
  width: 340px; max-width: calc(100vw - 32px);
}

/* Crumbs / module buttons under width pressure */
.nm-crumbs { flex: 1 1 auto; }
.nm-crumb-trail { overflow: hidden; }
.nm-crumb.is-current { min-width: 3.5em; }
@media (max-width: 1279px) {
  .nm-crumb:not(.is-current), .nm-crumb:not(.is-current) + .nm-crumb-sep { display: none; }
  .nm-topbar .nm-tb-slot-btn > a { width: 36px; padding: 0 !important; gap: 0; font-size: 0 !important; }
}

/* ==========================================================================
   CALENDAR (home/calendar — FullCalendar v3)
   ========================================================================== */
body.nm-shell .fc { font-family: var(--nm-font); }
body.nm-shell .fc-toolbar h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; color: var(--nm-gray-900); }
body.nm-shell .fc-toolbar.fc-header-toolbar { margin-bottom: 18px; }
body.nm-shell .fc button.fc-button {
  height: 34px; padding: 0 12px;
  background: var(--nm-surface) !important; background-image: none !important;
  border: 1px solid var(--nm-border-strong) !important;
  color: var(--nm-gray-700) !important;
  text-shadow: none !important; box-shadow: var(--nm-shadow-xs) !important;
  font-size: 13px; font-weight: 500; text-transform: capitalize;
}
body.nm-shell .fc button.fc-button:hover { background: var(--nm-gray-50) !important; color: var(--nm-gray-900) !important; }
body.nm-shell .fc button.fc-state-active,
body.nm-shell .fc button.fc-button.fc-state-active { background: var(--nm-brand-50) !important; border-color: var(--nm-brand-200) !important; color: var(--nm-brand-700) !important; box-shadow: none !important; }
body.nm-shell .fc button.fc-state-disabled { opacity: .5; }
body.nm-shell .fc-unthemed th, body.nm-shell .fc-unthemed td, body.nm-shell .fc-unthemed thead, body.nm-shell .fc-unthemed tbody,
body.nm-shell .fc-unthemed .fc-divider, body.nm-shell .fc-unthemed .fc-row, body.nm-shell .fc-unthemed .fc-content,
body.nm-shell .fc-unthemed .fc-popover, body.nm-shell .fc-unthemed .fc-list-view { border-color: var(--nm-gray-100); }
body.nm-shell .fc th.fc-day-header {
  padding: 10px 0; background: var(--nm-gray-50);
  color: var(--nm-gray-500); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}
body.nm-shell .fc-day-number { padding: 6px 8px !important; color: var(--nm-gray-600); font-size: 12.5px; font-weight: 500; }
body.nm-shell .fc-other-month .fc-day-number { color: var(--nm-gray-300); }
body.nm-shell .fc-unthemed td.fc-today { background: var(--nm-brand-50); }
body.nm-shell .fc-today .fc-day-number {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; margin: 4px; padding: 0 6px !important;
  border-radius: 999px; background: var(--nm-primary); color: #fff;
}
body.nm-shell .fc-event { border-radius: 6px; padding: 1px 4px; font-size: 12px; border-width: 0; }

/* ==========================================================================
   BRAND IDENTITY v1 — logo, workspace block, AI chip
   ========================================================================== */
.nm-sb-brand-link .nm-logo { flex-shrink: 0; }
.nm-sb-logo-icon { display: none !important; }
.nm-sb-workspace {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 12px 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  flex-shrink: 0;
  min-width: 0;
}
.nm-sb-ws-mark {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--nm-brand-600);
  color: #fff; font-size: 13px; font-weight: 800;
}
.nm-sb-ws-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.nm-sb-ws-label { color: var(--nm-sb-faint); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
html[dir="rtl"] .nm-sb-ws-label { letter-spacing: 0; text-transform: none; font-size: 11px; }
.nm-sb-ws-name { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm-sb-workspace .nm-sb-dot { background: var(--nm-sidebar-accent); box-shadow: 0 0 0 3px rgba(63, 214, 188, .16); flex-shrink: 0; }
@media (min-width: 1024px) {
  body.nm-shell.nm-rail aside.side-bar:not(:hover) .nm-sb-logo-full { display: none !important; }
  body.nm-shell.nm-rail aside.side-bar:not(:hover) .nm-sb-logo-icon { display: inline-flex !important; }
  body.nm-shell.nm-rail aside.side-bar:not(:hover) .nm-sb-workspace { margin: 12px 14px 8px; padding: 6px 0; justify-content: center; background: transparent; box-shadow: none; }
  body.nm-shell.nm-rail aside.side-bar:not(:hover) .nm-sb-ws-text,
  body.nm-shell.nm-rail aside.side-bar:not(:hover) .nm-sb-workspace .nm-sb-dot { display: none; }
}

.nm-ai-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px;
  margin-inline-end: 4px;
  border: 1px solid var(--nm-accent-500);
  border-radius: 8px;
  background: var(--nm-surface);
  color: var(--nm-accent-700) !important;
  font-size: 13px; font-weight: 700;
  white-space: nowrap;
  text-decoration: none !important;
  transition: background var(--nm-dur) var(--nm-ease);
}
.nm-ai-chip:hover { background: var(--nm-accent-50); }
.nm-ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--nm-accent-500); box-shadow: 0 0 0 3px rgba(19, 184, 158, .16); }
@media (max-width: 1279px) { .nm-ai-chip { display: none; } }
