/* ─────────────────────────────────────────────────────────────
   Northwind Admin — design tokens + base styles
   Clean, professional admin shell. Neutral slate + indigo accent.
   ───────────────────────────────────────────────────────────── */

/* Light theme (default) */
.nw-theme-light {
  --nw-bg: #fafaf9;
  --nw-bg-subtle: #f4f4f2;
  --nw-surface: #ffffff;
  --nw-surface-2: #fbfbfa;
  --nw-border: #e7e5e1;
  --nw-border-strong: #d4d1cc;
  --nw-text: #18181b;
  --nw-text-2: #52525b;
  --nw-text-3: #8a8a93;
  --nw-text-4: #b4b4bb;

  --nw-accent: oklch(0.55 0.18 264);
  --nw-accent-hover: oklch(0.50 0.18 264);
  --nw-accent-soft: oklch(0.96 0.03 264);
  --nw-accent-text: oklch(0.45 0.20 264);

  --nw-success: oklch(0.60 0.15 152);
  --nw-success-soft: oklch(0.95 0.04 152);
  --nw-warning: oklch(0.70 0.15 65);
  --nw-warning-soft: oklch(0.96 0.05 85);
  --nw-danger: oklch(0.58 0.20 22);
  --nw-danger-soft: oklch(0.96 0.03 22);
  --nw-info: oklch(0.60 0.12 230);
  --nw-info-soft: oklch(0.96 0.03 230);

  --nw-shadow-sm: 0 1px 2px rgba(16, 16, 20, 0.04);
  --nw-shadow: 0 1px 3px rgba(16, 16, 20, 0.06), 0 1px 2px rgba(16, 16, 20, 0.04);
  --nw-shadow-lg: 0 8px 24px rgba(16, 16, 20, 0.08), 0 2px 6px rgba(16, 16, 20, 0.04);

  --nw-radius: 8px;
  --nw-radius-sm: 6px;
  --nw-radius-lg: 12px;
}

/* Dark theme */
.nw-theme-dark {
  --nw-bg: #0d0d10;
  --nw-bg-subtle: #121215;
  --nw-surface: #17171b;
  --nw-surface-2: #1c1c21;
  --nw-border: #26262c;
  --nw-border-strong: #34343c;
  --nw-text: #f4f4f5;
  --nw-text-2: #a1a1aa;
  --nw-text-3: #71717a;
  --nw-text-4: #52525b;

  --nw-accent: oklch(0.72 0.16 264);
  --nw-accent-hover: oklch(0.78 0.16 264);
  --nw-accent-soft: oklch(0.28 0.08 264);
  --nw-accent-text: oklch(0.78 0.16 264);

  --nw-success: oklch(0.72 0.15 152);
  --nw-success-soft: oklch(0.28 0.06 152);
  --nw-warning: oklch(0.78 0.15 75);
  --nw-warning-soft: oklch(0.30 0.06 75);
  --nw-danger: oklch(0.70 0.18 22);
  --nw-danger-soft: oklch(0.28 0.08 22);
  --nw-info: oklch(0.72 0.12 230);
  --nw-info-soft: oklch(0.28 0.06 230);

  --nw-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --nw-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --nw-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);

  --nw-radius: 8px;
  --nw-radius-sm: 6px;
  --nw-radius-lg: 12px;
}

html.nw-host, html.nw-host body.nw-app { height: 100%; }
body.nw-app {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, sans-serif;
  background: var(--nw-bg);
  color: var(--nw-text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.nw-mono {
  font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, monospace;
}

.nw-app *, .nw-app *::before, .nw-app *::after { box-sizing: border-box; }

/* Scrollbars */
.nw-app *::-webkit-scrollbar { width: 10px; height: 10px; }
.nw-app *::-webkit-scrollbar-track { background: transparent; }
.nw-app *::-webkit-scrollbar-thumb {
  background: var(--nw-border-strong);
  border-radius: 8px;
  border: 2px solid var(--nw-bg);
}
.nw-app *::-webkit-scrollbar-thumb:hover { background: var(--nw-text-4); }

/* ──────────────── Layout shell ──────────────── */
.nw-shell {
  display: grid;
  grid-template-columns: var(--nw-sidebar-w, 240px) 1fr;
  height: 100%;
  min-height: 100%;
}

.nw-sidebar {
  background: var(--nw-surface);
  border-right: 1px solid var(--nw-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* `position: relative` was previously inlined on the <aside> element
     in layout.html so the absolute-positioned `.nw-sidebar-collapse-btn`
     anchors to the sidebar. Inline styles win over class rules — even
     across @media queries — so the mobile breakpoint's
     `position: fixed` override never fired and the sidebar stayed
     in-flow on phones, leaving a tall block of empty space above the
     dashboard. Setting it here lets the @media override take effect. */
  position: relative;
}

.nw-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--nw-border);
}

.nw-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--nw-text);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.nw-brand-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, var(--nw-accent) 50%);
}

.nw-brand-mark svg { position: relative; z-index: 1; }

.nw-brand-name {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--nw-text);
}

.nw-brand-sub {
  font-size: 11px;
  color: var(--nw-text-3);
  margin-top: 1px;
}

.nw-sidebar-section {
  padding: 14px 10px 4px;
}

.nw-sidebar-label {
  padding: 0 10px 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--nw-text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nw-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--nw-radius-sm);
  color: var(--nw-text-2);
  font-size: 13.5px;
  font-weight: 450;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  user-select: none;
  position: relative;
}

.nw-nav-item:hover { background: var(--nw-bg-subtle); color: var(--nw-text); }

.nw-nav-item.is-active {
  background: var(--nw-bg-subtle);
  color: var(--nw-text);
  font-weight: 500;
}

.nw-nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--nw-accent);
  border-radius: 0 2px 2px 0;
}

.nw-nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--nw-text-3);
}

.nw-nav-item.is-active .nw-nav-icon { color: var(--nw-accent); }

.nw-nav-badge {
  margin-left: auto;
  background: var(--nw-bg-subtle);
  color: var(--nw-text-2);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 500;
}

.nw-nav-item.is-active .nw-nav-badge {
  background: var(--nw-surface);
  border: 1px solid var(--nw-border);
}

.nw-sidebar-foot {
  margin-top: auto;
  padding: 10px;
  border-top: 1px solid var(--nw-border);
}

.nw-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--nw-radius-sm);
  cursor: pointer;
  transition: background 0.12s;
}
.nw-user-card:hover { background: var(--nw-bg-subtle); }

.nw-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--nw-bg-subtle);
  color: var(--nw-text);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  border: 1px solid var(--nw-border);
}

/* Avatar tints — sRGB hex first (works everywhere), OKLCH after so
   modern browsers get the perceptually-uniform colour but Safari
   versions / color-managed displays that mishandle OKLCH still get a
   predictable hex value. Without the fallback the OKLCH cascade can
   bleed unexpected hues (saw a coral/orange render of `is-color-3`,
   which is supposed to be blue, on Safari Tech Preview). */
.nw-avatar.is-color-1 { background: #f7d9b5; color: #6a3a00; border-color: transparent; }
.nw-avatar.is-color-2 { background: #cfe9d2; color: #1f5a2a; border-color: transparent; }
.nw-avatar.is-color-3 { background: #d6e3f6; color: #1d4ed8; border-color: transparent; }
.nw-avatar.is-color-4 { background: #f4d7e3; color: #9b1c4f; border-color: transparent; }
.nw-avatar.is-color-5 { background: #cfe5ec; color: #0e6b8a; border-color: transparent; }
@supports (color: oklch(0.85 0.08 50)) {
  .nw-avatar.is-color-1 { background: oklch(0.85 0.08 50); color: oklch(0.30 0.1 50); }
  .nw-avatar.is-color-2 { background: oklch(0.85 0.08 150); color: oklch(0.30 0.1 150); }
  .nw-avatar.is-color-3 { background: oklch(0.85 0.08 260); color: oklch(0.30 0.1 260); }
  .nw-avatar.is-color-4 { background: oklch(0.85 0.08 340); color: oklch(0.30 0.1 340); }
  .nw-avatar.is-color-5 { background: oklch(0.85 0.08 200); color: oklch(0.30 0.1 200); }
}

[data-bs-theme="dark"] .nw-avatar.is-color-1,
.nw-theme-dark .nw-avatar.is-color-1 { background: #5b3a14; color: #f7d9b5; }
[data-bs-theme="dark"] .nw-avatar.is-color-2,
.nw-theme-dark .nw-avatar.is-color-2 { background: #1f4d28; color: #cfe9d2; }
[data-bs-theme="dark"] .nw-avatar.is-color-3,
.nw-theme-dark .nw-avatar.is-color-3 { background: #1e3a8a; color: #d6e3f6; }
[data-bs-theme="dark"] .nw-avatar.is-color-4,
.nw-theme-dark .nw-avatar.is-color-4 { background: #6e1a3f; color: #f4d7e3; }
[data-bs-theme="dark"] .nw-avatar.is-color-5,
.nw-theme-dark .nw-avatar.is-color-5 { background: #0d4357; color: #cfe5ec; }
@supports (color: oklch(0.85 0.08 50)) {
  [data-bs-theme="dark"] .nw-avatar.is-color-1,
  .nw-theme-dark .nw-avatar.is-color-1 { background: oklch(0.30 0.08 50); color: oklch(0.88 0.08 50); }
  [data-bs-theme="dark"] .nw-avatar.is-color-2,
  .nw-theme-dark .nw-avatar.is-color-2 { background: oklch(0.30 0.08 150); color: oklch(0.88 0.08 150); }
  [data-bs-theme="dark"] .nw-avatar.is-color-3,
  .nw-theme-dark .nw-avatar.is-color-3 { background: oklch(0.30 0.08 260); color: oklch(0.88 0.08 260); }
  [data-bs-theme="dark"] .nw-avatar.is-color-4,
  .nw-theme-dark .nw-avatar.is-color-4 { background: oklch(0.30 0.08 340); color: oklch(0.88 0.08 340); }
  [data-bs-theme="dark"] .nw-avatar.is-color-5,
  .nw-theme-dark .nw-avatar.is-color-5 { background: oklch(0.30 0.08 200); color: oklch(0.88 0.08 200); }
}

.nw-user-name { font-size: 13px; font-weight: 500; line-height: 1.2; }
.nw-user-role { font-size: 11px; color: var(--nw-text-3); line-height: 1.2; margin-top: 2px; }

/* ──────────────── Sidebar groups (collapsible per section) ──────────────── */
.nw-sidebar-group { display: flex; flex-direction: column; gap: 2px; }

.nw-sidebar-group .nw-sidebar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 4px 10px;
  border-radius: var(--nw-radius-sm);
  transition: background 0.12s, color 0.12s;
}
.nw-sidebar-group .nw-sidebar-label:hover { background: var(--nw-bg-subtle); color: var(--nw-text-2); }

.nw-group-chevron {
  width: 12px; height: 12px;
  flex-shrink: 0;
  transition: transform 0.15s;
  opacity: 0.55;
}
.nw-sidebar-group.is-collapsed .nw-group-chevron { transform: rotate(-90deg); }
.nw-sidebar-group.is-collapsed > .nw-nav-item,
.nw-sidebar-group.is-collapsed > .nw-subnav { display: none; }

/* ──────────────── Sidebar collapse toggle (icons-only mode) ──────────────── */
.nw-sidebar-collapse-btn {
  position: absolute;
  top: 22px;
  right: -11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--nw-surface);
  border: 1px solid var(--nw-border);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--nw-text-3);
  z-index: 10;
  transition: color 0.12s, background 0.12s, box-shadow 0.12s;
  box-shadow: var(--nw-shadow-sm);
}
.nw-sidebar-collapse-btn:hover { color: var(--nw-text); background: var(--nw-bg-subtle); }
.nw-sidebar-collapse-btn svg { width: 12px; height: 12px; transition: transform 0.18s; }

/* Sidebar in collapsed (icons-only) mode */
.nw-shell.is-sidebar-collapsed { grid-template-columns: 56px 1fr; }
.nw-shell.is-sidebar-collapsed .nw-sidebar-collapse-btn svg { transform: rotate(180deg); }
.nw-shell.is-sidebar-collapsed .nw-sidebar { overflow: visible; }
.nw-shell.is-sidebar-collapsed .nw-sidebar-section { overflow: visible; padding: 10px 6px 4px; }
.nw-shell.is-sidebar-collapsed .nw-sidebar-brand {
  padding: 14px 10px;
  justify-content: center;
  overflow: hidden;
}
.nw-shell.is-sidebar-collapsed .nw-sidebar-brand > a { gap: 0 !important; overflow: hidden; }
.nw-shell.is-sidebar-collapsed .nw-sidebar-brand > a > div:not(.nw-brand-mark) { display: none; }
.nw-shell.is-sidebar-collapsed .nw-brand-logo-img {
  max-height: 28px;
  max-width: 28px;
  width: 28px;
  height: 28px;
  object-fit: contain;
  object-position: left center;
}
.nw-shell.is-sidebar-collapsed .nw-sidebar-label { display: none; }
.nw-shell.is-sidebar-collapsed .nw-sidebar-group { margin-top: 6px !important; }
.nw-shell.is-sidebar-collapsed .nw-nav-item {
  justify-content: center;
  padding: 8px 0;
  position: relative;
}
.nw-shell.is-sidebar-collapsed .nw-nav-item > span:not(.nw-nav-mono),
.nw-shell.is-sidebar-collapsed .nw-nav-item > .nw-nav-badge { display: none; }
.nw-shell.is-sidebar-collapsed .nw-nav-item.is-active::before { left: -6px; }

/* Fallback monogram (injected by JS as .nw-nav-mono span) when a resource
   has no icon set — keeps icons-only sidebar visually readable. */
.nw-nav-mono {
  display: none;
  width: 24px; height: 24px;
  border-radius: var(--nw-radius-sm);
  background: var(--nw-bg-subtle);
  color: var(--nw-text-2);
  font-size: 11px;
  font-weight: 600;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}
.nw-shell.is-sidebar-collapsed .nw-nav-mono { display: inline-flex; }
.nw-shell.is-sidebar-collapsed .nw-nav-item.is-active .nw-nav-mono {
  background: var(--nw-accent-soft);
  color: var(--nw-accent-text);
}
.nw-shell.is-sidebar-collapsed .nw-user-card {
  justify-content: center;
  padding: 6px;
}
.nw-shell.is-sidebar-collapsed .nw-user-card > div:not(.nw-avatar):not(.nw-dd-menu),
.nw-shell.is-sidebar-collapsed .nw-user-card > svg { display: none; }
.nw-shell.is-sidebar-collapsed .nw-subnav {
  padding: 2px 0;
}
.nw-shell.is-sidebar-collapsed .nw-subnav .nw-nav-item { padding: 6px 0; font-size: 12px; }

/* Tooltip on hover when collapsed — uses ::after only to avoid clashing
   with the .is-active ::before left-bar indicator. */
.nw-shell.is-sidebar-collapsed .nw-nav-item[data-tooltip] { overflow: visible; }
.nw-shell.is-sidebar-collapsed .nw-nav-item[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--nw-text);
  color: var(--nw-surface);
  padding: 5px 9px;
  border-radius: var(--nw-radius-sm);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 1100;
  pointer-events: none;
  box-shadow:
    -5px 0 0 -2px var(--nw-text),
    var(--nw-shadow);
}

/* Hide collapse toggle on small screens (mobile uses the hamburger instead) */
@media (max-width: 992px) {
  .nw-sidebar-collapse-btn { display: none; }
}

/* ──────────────── Main area / topbar ──────────────── */
.nw-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.nw-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--nw-border);
  background: var(--nw-surface);
  flex-shrink: 0;
  min-height: 52px;
}

.nw-crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--nw-text-3);
  /* Prevent the topbar's narrow allowance for breadcrumbs from wrapping
     "Blog Post" onto a second line on mobile. min-width:0 lets the
     flex item ellipsize instead of forcing the parent to grow, and
     nowrap on the crumb text spans keeps them on one line. */
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
}

.nw-crumbs > * { white-space: nowrap; }
.nw-crumbs .nw-crumb-current {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.nw-crumbs .nw-crumb-sep { color: var(--nw-text-4); }

.nw-crumbs .nw-crumb-current {
  color: var(--nw-text);
  font-weight: 500;
}

.nw-crumbs a {
  color: var(--nw-text-2);
  text-decoration: none;
  cursor: pointer;
}
.nw-crumbs a:hover { color: var(--nw-text); }

.nw-topbar-spacer { flex: 1; }

.nw-searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--nw-bg-subtle);
  border: 1px solid transparent;
  border-radius: var(--nw-radius-sm);
  padding: 5px 10px;
  width: 280px;
  font-size: 13px;
  color: var(--nw-text-3);
  cursor: text;
  transition: border-color 0.12s, background 0.12s;
}

.nw-searchbar:hover { border-color: var(--nw-border); }

.nw-searchbar input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  font: inherit;
  color: var(--nw-text);
  min-width: 0;
}
.nw-searchbar input::placeholder { color: var(--nw-text-3); }

.nw-kbd {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--nw-surface);
  border: 1px solid var(--nw-border);
  color: var(--nw-text-3);
  line-height: 1;
}

.nw-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--nw-radius-sm);
  background: transparent;
  border: none;
  color: var(--nw-text-2);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.12s, color 0.12s;
  position: relative;
}
.nw-icon-btn:hover { background: var(--nw-bg-subtle); color: var(--nw-text); }

.nw-icon-btn .nw-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nw-danger);
  border: 1.5px solid var(--nw-surface);
}

/* ──────────────── Content scroll area ──────────────── */
.nw-content {
  flex: 1;
  overflow: auto;
  padding: 24px 28px 40px;
}

.nw-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.nw-page-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--nw-text);
  margin: 0;
}

.nw-page-sub {
  font-size: 13.5px;
  color: var(--nw-text-3);
  margin-top: 4px;
}

/* ──────────────── Buttons ──────────────── */
.nw-btn, a.nw-btn, a.nw-page-btn, a.nw-chip, a.nw-nav-item {
  text-decoration: none;
}
.nw-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--nw-radius-sm);
  font: inherit;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--nw-border);
  background: var(--nw-surface);
  color: var(--nw-text);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
  user-select: none;
}
.nw-btn:hover { background: var(--nw-bg-subtle); border-color: var(--nw-border-strong); }

.nw-btn-primary {
  background: var(--nw-text);
  color: var(--nw-surface);
  border-color: var(--nw-text);
}
.nw-btn-primary:hover { background: #000; border-color: #000; }
.nw-theme-dark .nw-btn-primary { background: var(--nw-text); color: var(--nw-bg); border-color: var(--nw-text); }
.nw-theme-dark .nw-btn-primary:hover { background: #fff; border-color: #fff; }

.nw-btn-accent {
  background: var(--nw-accent);
  color: #fff;
  border-color: var(--nw-accent);
}
.nw-btn-accent:hover { background: var(--nw-accent-hover); border-color: var(--nw-accent-hover); }

.nw-btn-ghost { background: transparent; border-color: transparent; color: var(--nw-text-2); }
.nw-btn-ghost:hover { background: var(--nw-bg-subtle); color: var(--nw-text); border-color: transparent; }

.nw-btn-danger {
  color: var(--nw-danger);
  border-color: var(--nw-border);
}
.nw-btn-danger:hover { background: var(--nw-danger-soft); border-color: var(--nw-danger); color: var(--nw-danger); }

.nw-btn-sm { height: 26px; padding: 0 9px; font-size: 12px; gap: 5px; }
.nw-btn-lg { height: 38px; padding: 0 16px; font-size: 14px; }

.nw-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ──────────────── Cards ──────────────── */
.nw-card {
  background: var(--nw-surface);
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius-lg);
  overflow: hidden;
}

.nw-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--nw-border);
}

.nw-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--nw-text);
  letter-spacing: -0.005em;
}

.nw-card-sub {
  font-size: 12px;
  color: var(--nw-text-3);
  margin-top: 2px;
  font-weight: 400;
}

.nw-card-body { padding: 18px; }
.nw-card-body.no-pad { padding: 0; }

/* ──────────────── Stat widgets ──────────────── */
.nw-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.nw-stat {
  background: var(--nw-surface);
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius-lg);
  padding: 16px 18px;
}

.nw-stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--nw-text-2);
  font-weight: 500;
}

.nw-stat-label-icon {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--nw-bg-subtle);
  display: grid; place-items: center;
  color: var(--nw-text-2);
  font-size: 13px;
  line-height: 1;
}
.nw-stat-label-icon svg { width: 13px; height: 13px; }
.nw-stat-label-icon i { font-size: 13px; line-height: 1; }
/* Tinted variants — drive both the background and glyph colour from
   the `color` arg passed to CountWidget. Neutral is the default; the
   alternates use accessible-contrast pairs so the icon stays visible
   without raising the saturation of the badge to alarming levels. */
.nw-stat-label-icon[data-color="blue"]    { background: rgba(34, 113, 177, 0.14); color: #2271b1; }
.nw-stat-label-icon[data-color="green"]   { background: rgba(34, 139, 34, 0.14);  color: #2e7d32; }
.nw-stat-label-icon[data-color="amber"],
.nw-stat-label-icon[data-color="yellow"]  { background: rgba(217, 119, 6, 0.16);  color: #b45309; }
.nw-stat-label-icon[data-color="red"]     { background: rgba(220, 53, 69, 0.14);  color: #b02a37; }
.nw-stat-label-icon[data-color="purple"]  { background: rgba(124, 58, 237, 0.15); color: #6d28d9; }
.nw-stat-label-icon[data-color="cyan"]    { background: rgba(8, 145, 178, 0.14);  color: #0e7490; }
[data-bs-theme="dark"] .nw-stat-label-icon[data-color="blue"]   { background: rgba(96, 165, 250, 0.18); color: #93c5fd; }
[data-bs-theme="dark"] .nw-stat-label-icon[data-color="green"]  { background: rgba(74, 222, 128, 0.16); color: #86efac; }
[data-bs-theme="dark"] .nw-stat-label-icon[data-color="amber"],
[data-bs-theme="dark"] .nw-stat-label-icon[data-color="yellow"] { background: rgba(251, 191, 36, 0.18); color: #fcd34d; }
[data-bs-theme="dark"] .nw-stat-label-icon[data-color="red"]    { background: rgba(248, 113, 113, 0.18); color: #fca5a5; }
[data-bs-theme="dark"] .nw-stat-label-icon[data-color="purple"] { background: rgba(167, 139, 250, 0.18); color: #c4b5fd; }
[data-bs-theme="dark"] .nw-stat-label-icon[data-color="cyan"]   { background: rgba(34, 211, 238, 0.16); color: #67e8f9; }

.nw-stat-value {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--nw-text);
  margin-top: 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.nw-stat-value .nw-stat-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--nw-text-3);
  letter-spacing: 0;
}

.nw-stat-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.nw-stat-delta.is-up { color: var(--nw-success); background: var(--nw-success-soft); }
.nw-stat-delta.is-down { color: var(--nw-danger); background: var(--nw-danger-soft); }
.nw-stat-delta svg { width: 11px; height: 11px; }

.nw-stat-spark {
  margin-top: 12px;
  height: 36px;
  width: 100%;
}

/* ──────────────── Tables ──────────────── */
.nw-table-wrap { position: relative; }

.nw-table-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--nw-border);
  flex-wrap: wrap;
}

.nw-table-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--nw-bg-subtle);
  border: 1px solid transparent;
  border-radius: var(--nw-radius-sm);
  padding: 5px 9px;
  width: 240px;
  font-size: 13px;
  color: var(--nw-text-3);
  transition: border-color 0.12s;
}
.nw-table-search:hover { border-color: var(--nw-border); }
.nw-table-search input { border: none; background: transparent; outline: none; flex: 1; font: inherit; color: var(--nw-text); min-width: 0; }
.nw-table-search input::placeholder { color: var(--nw-text-3); }
.nw-search-help { padding: 0 4px; font-size: 11.5px; line-height: 1; flex-basis: 100%; }

.nw-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 500;
  background: var(--nw-surface);
  border: 1px solid var(--nw-border);
  color: var(--nw-text-2);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.nw-chip:hover { background: var(--nw-bg-subtle); border-color: var(--nw-border-strong); }
.nw-chip.is-active { background: var(--nw-accent-soft); color: var(--nw-accent-text); border-color: transparent; }
.nw-chip svg { width: 12px; height: 12px; }

.nw-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.nw-table th {
  text-align: left;
  font-weight: 500;
  font-size: 11.5px;
  color: var(--nw-text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 9px 14px;
  background: var(--nw-bg-subtle);
  border-bottom: 1px solid var(--nw-border);
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
  user-select: none;
}

.nw-table th.is-sortable { cursor: pointer; }
.nw-table th.is-sortable:hover { color: var(--nw-text); }
.nw-table th .nw-th-inner { display: inline-flex; align-items: center; gap: 4px; }
.nw-table th svg { width: 11px; height: 11px; opacity: 0.6; }

.nw-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--nw-border);
  color: var(--nw-text);
  vertical-align: middle;
}

.nw-table tbody tr { transition: background 0.08s; }
.nw-table tbody tr:hover { background: var(--nw-bg-subtle); }
.nw-table tbody tr.is-selected { background: var(--nw-accent-soft); }
.nw-table tbody tr:last-child td { border-bottom: none; }

.nw-table .nw-col-check { width: 32px; padding-right: 0; }
.nw-table .nw-col-actions { width: 40px; }

.nw-check {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1.5px solid var(--nw-border-strong);
  background: var(--nw-surface);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: background 0.12s, border-color 0.12s;
  flex-shrink: 0;
  vertical-align: middle;
}
.nw-check:hover { border-color: var(--nw-text-2); }
.nw-check.is-checked {
  background: var(--nw-accent);
  border-color: var(--nw-accent);
}
.nw-check.is-checked svg { color: white; width: 10px; height: 10px; }
.nw-check.is-indeterminate { background: var(--nw-accent); border-color: var(--nw-accent); }
.nw-check.is-indeterminate::after { content: ""; width: 7px; height: 1.5px; background: white; border-radius: 1px; }

.nw-id {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--nw-text-3);
  font-weight: 500;
}

.nw-num {
  font-variant-numeric: tabular-nums;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 500;
}

.nw-money {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* ──────────────── Badges ──────────────── */
.nw-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1;
}

.nw-badge-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.nw-badge.is-success { background: var(--nw-success-soft); color: var(--nw-success); }
.nw-badge.is-warning { background: var(--nw-warning-soft); color: var(--nw-warning); }
.nw-badge.is-danger { background: var(--nw-danger-soft); color: var(--nw-danger); }
.nw-badge.is-info { background: var(--nw-info-soft); color: var(--nw-info); }
.nw-badge.is-neutral { background: var(--nw-bg-subtle); color: var(--nw-text-2); }
.nw-badge.is-accent { background: var(--nw-accent-soft); color: var(--nw-accent-text); }

/* ──────────────── Pagination ──────────────── */
.nw-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--nw-border);
  font-size: 12.5px;
  color: var(--nw-text-3);
  gap: 10px;
  flex-wrap: wrap;
}

.nw-page-ctrl { display: flex; align-items: center; gap: 4px; }
.nw-page-btn {
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 5px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--nw-text-2);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nw-page-btn:hover { background: var(--nw-bg-subtle); color: var(--nw-text); }
.nw-page-btn.is-active {
  background: var(--nw-surface);
  border-color: var(--nw-border);
  color: var(--nw-text);
  font-weight: 500;
}

/* ──────────────── Forms ──────────────── */
.nw-form-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--nw-border);
  align-items: flex-start;
}
.nw-form-row:last-child { border-bottom: none; }
.nw-form-label { font-size: 13px; font-weight: 500; color: var(--nw-text); }
.nw-form-hint { font-size: 12px; color: var(--nw-text-3); margin-top: 4px; line-height: 1.45; }

.nw-input, .nw-textarea, .nw-select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius-sm);
  background: var(--nw-surface);
  color: var(--nw-text);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.nw-input:focus, .nw-textarea:focus, .nw-select:focus {
  border-color: var(--nw-accent);
  box-shadow: 0 0 0 3px var(--nw-accent-soft);
}
.nw-textarea { min-height: 80px; resize: vertical; font-family: inherit; line-height: 1.5; }

.nw-input-inline { max-width: 420px; }
.nw-input-money { font-variant-numeric: tabular-nums; font-family: "JetBrains Mono", monospace; }

.nw-switch {
  position: relative;
  width: 32px; height: 18px;
  background: var(--nw-border-strong);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.nw-switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: white;
  border-radius: 50%;
  transition: transform 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.nw-switch.is-on { background: var(--nw-accent); }
.nw-switch.is-on::after { transform: translateX(14px); }

/* ──────────────── Chart placeholders ──────────────── */
.nw-chart-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.nw-chart-svg .nw-chart-grid { stroke: var(--nw-border); stroke-dasharray: 2 3; }
.nw-chart-svg .nw-chart-line { fill: none; stroke: var(--nw-accent); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.nw-chart-svg .nw-chart-area { fill: var(--nw-accent); opacity: 0.08; }
.nw-chart-svg .nw-chart-axis { fill: var(--nw-text-3); font-size: 10px; font-family: inherit; }

/* Activity feed */
.nw-feed-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--nw-border);
  align-items: flex-start;
}
.nw-feed-item:last-child { border-bottom: none; padding-bottom: 0; }
.nw-feed-item:first-child { padding-top: 0; }
.nw-feed-title { font-size: 13px; color: var(--nw-text); line-height: 1.4; }
.nw-feed-title strong { font-weight: 600; }
.nw-feed-meta { font-size: 11.5px; color: var(--nw-text-3); margin-top: 2px; font-variant-numeric: tabular-nums; }
.nw-feed-time { font-size: 11.5px; color: var(--nw-text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.nw-feed-icon {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--nw-bg-subtle);
  display: grid; place-items: center;
  color: var(--nw-text-2);
  flex-shrink: 0;
}
.nw-feed-icon svg { width: 13px; height: 13px; }
.nw-feed-icon.is-success { background: var(--nw-success-soft); color: var(--nw-success); }
.nw-feed-icon.is-danger { background: var(--nw-danger-soft); color: var(--nw-danger); }
.nw-feed-icon.is-accent { background: var(--nw-accent-soft); color: var(--nw-accent-text); }
.nw-feed-icon.is-warning { background: var(--nw-warning-soft); color: var(--nw-warning); }

/* Dropdown */
.nw-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--nw-surface);
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius);
  box-shadow: var(--nw-shadow-lg);
  min-width: 200px;
  padding: 5px;
  z-index: 100;
}

.nw-dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 5px;
  font-size: 13px;
  color: var(--nw-text);
  cursor: pointer;
  white-space: nowrap;
}
.nw-dropdown-item:hover { background: var(--nw-bg-subtle); }
.nw-dropdown-item.is-danger { color: var(--nw-danger); }
.nw-dropdown-item svg { width: 13px; height: 13px; color: var(--nw-text-3); }
.nw-dropdown-item.is-danger svg { color: var(--nw-danger); }
.nw-dropdown-sep { height: 1px; background: var(--nw-border); margin: 4px 0; }
.nw-dropdown-label { padding: 5px 9px; font-size: 11px; color: var(--nw-text-3); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }

/* Bulk action bar */
.nw-bulk-bar {
  position: sticky;
  top: 0;
  background: var(--nw-text);
  color: var(--nw-surface);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  z-index: 2;
}
.nw-theme-dark .nw-bulk-bar { background: var(--nw-accent); color: #fff; }
.nw-bulk-bar .nw-btn-ghost { color: var(--nw-surface); }
.nw-bulk-bar .nw-btn-ghost:hover { background: rgba(255,255,255,0.12); color: var(--nw-surface); }
.nw-theme-dark .nw-bulk-bar .nw-btn-ghost { color: #fff; }
.nw-theme-dark .nw-bulk-bar .nw-btn-ghost:hover { background: rgba(255,255,255,0.15); }

/* Tabs */
.nw-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--nw-border);
  margin-bottom: 20px;
}

.nw-tab {
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--nw-text-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.12s, border-color 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.nw-tab:hover { color: var(--nw-text); }
.nw-tab.is-active { color: var(--nw-text); border-bottom-color: var(--nw-text); }
.nw-tab .nw-tab-count {
  background: var(--nw-bg-subtle);
  color: var(--nw-text-3);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 500;
}
.nw-tab.is-active .nw-tab-count { background: var(--nw-accent-soft); color: var(--nw-accent-text); }

/* Image placeholder (products, user avatars, etc) */
.nw-ph {
  background-color: var(--nw-bg-subtle);
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 6px,
    var(--nw-border) 6px,
    var(--nw-border) 7px
  );
  display: grid;
  place-items: center;
  color: var(--nw-text-3);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--nw-radius-sm);
}

.nw-thumb {
  width: 32px; height: 32px;
  border-radius: 6px;
  background: var(--nw-bg-subtle);
  border: 1px solid var(--nw-border);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  background-image: repeating-linear-gradient(135deg, transparent 0, transparent 4px, var(--nw-border) 4px, var(--nw-border) 5px);
}

/* Utility */
.nw-row { display: flex; align-items: center; gap: 8px; }
.nw-col { display: flex; flex-direction: column; gap: 4px; }
.nw-spacer { flex: 1; }
.nw-muted { color: var(--nw-text-3); }
.nw-small { font-size: 12px; }

.nw-grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.nw-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* login */
.nw-login-wrap {
  display: grid;
  place-items: center;
  height: 100%;
  background:
    radial-gradient(circle at 20% 20%, var(--nw-accent-soft) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, var(--nw-warning-soft) 0%, transparent 40%),
    var(--nw-bg);
}

.nw-login-card {
  width: 360px;
  background: var(--nw-surface);
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius-lg);
  padding: 28px;
  box-shadow: var(--nw-shadow-lg);
}

/* Responsive-ish collapse */
@media (max-width: 900px) {
  .nw-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .nw-grid-2 { grid-template-columns: 1fr; }
}

/* ──────────────── Dropdowns (custom, for sidebar/topbar menus) ──────────────── */
.nw-dd { position: relative; display: inline-flex; }
.nw-dd-menu {
  position: absolute;
  min-width: 180px;
  background: var(--nw-surface);
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius);
  box-shadow: var(--nw-shadow-lg);
  padding: 4px;
  z-index: 1000;
  display: none;
}
.nw-dd.is-open > .nw-dd-menu { display: block; }
.nw-dd-menu.align-right { right: 0; top: calc(100% + 6px); }
.nw-dd-menu.align-left { left: 0; top: calc(100% + 6px); }
.nw-dd-menu.align-up-right { right: 0; bottom: calc(100% + 6px); }
.nw-dd-menu.align-up-left { left: 0; bottom: calc(100% + 6px); }
.nw-dd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--nw-text-2);
  border-radius: var(--nw-radius-sm);
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
}
.nw-dd-item:hover { background: var(--nw-bg-subtle); color: var(--nw-text); }
.nw-dd-item.is-active { background: var(--nw-accent-soft); color: var(--nw-accent-text); }
.nw-dd-divider { height: 1px; background: var(--nw-border); margin: 4px 0; }
.nw-dd-label {
  padding: 6px 10px 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--nw-text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ──────────────── Alerts ──────────────── */
.nw-alert {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border-radius: var(--nw-radius-sm);
  font-size: 13px;
  line-height: 1.4;
  background: var(--nw-bg-subtle);
  border: 1px solid var(--nw-border);
  color: var(--nw-text);
}
.nw-alert .nw-alert-icon { flex-shrink: 0; margin-top: 1px; }
.nw-alert.is-danger { background: var(--nw-danger-soft); border-color: var(--nw-danger); color: var(--nw-danger); }
.nw-alert.is-success { background: var(--nw-success-soft); border-color: var(--nw-success); color: var(--nw-success); }
.nw-alert.is-warning { background: var(--nw-warning-soft); border-color: var(--nw-warning); color: var(--nw-warning); }
.nw-alert.is-info { background: var(--nw-info-soft); border-color: var(--nw-info); color: var(--nw-info); }

/* ──────────────── Sidebar sub-items (dropdown resources, expanded inline) ──────────────── */
.nw-subnav { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 2px 22px; }
.nw-subnav .nw-nav-item { font-size: 13px; padding: 6px 10px; }

/* ──────────────── Mobile table → stack-card layout ──────────────── */
/* Reusable pattern: any `<table class="nw-table">` collapses to a
   stack of cards on phones, with each cell rendering its
   `data-label` attribute as a left-aligned key opposite the value.
   Used by list.html (the main resource list) and _logs.html (audit
   log). New views opting in just need both: `class="nw-table"` on
   the table plus `data-label="…"` on every td. */
@media (max-width: 767.98px) {
    .nw-table thead { display: none; }
    .nw-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--nw-border);
        border-radius: var(--nw-radius);
        padding: 12px;
        background: var(--nw-surface);
    }
    .nw-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 6px 0;
        border: none;
        white-space: normal;
        word-break: break-word;
        min-width: 0;
    }
    .nw-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 1rem;
        flex-shrink: 0;
        max-width: 40%;
        color: var(--nw-text-3);
    }
    .nw-table tbody td > * { max-width: 100%; overflow-wrap: anywhere; }
    .nw-table .nw-col-actions { justify-content: flex-end; }
}

/* ──────────────── Mobile inline tabular ──────────────── */
/* Tabular inline formsets jam N editable columns into ~100% width.
   On phones (<=600 px) Bootstrap's `.table { width: 100%; }` shrinks
   each cell to ~40 px and the textarea/select inputs render unusable
   1-char-per-line columns. Pin a sensible minimum on the inline
   table so it stays legible — the parent `.table-responsive`
   provides horizontal scroll for the overflow. */
@media (max-width: 600px) {
    [data-nw-inline-table] {
        min-width: 720px;
        table-layout: auto;
    }
    [data-nw-inline-table] td,
    [data-nw-inline-table] th { min-width: 100px; }
    [data-nw-inline-table] td input[type="text"],
    [data-nw-inline-table] td input[type="number"],
    [data-nw-inline-table] td input[type="date"],
    [data-nw-inline-table] td input[type="email"],
    [data-nw-inline-table] td textarea,
    [data-nw-inline-table] td select {
        min-width: 0;
        width: 100%;
    }
}

/* ──────────────── Mobile sidebar ──────────────── */
.nw-sidebar-toggle { display: none; }
.nw-sidebar-backdrop { display: none; }
@media (max-width: 900px) {
  .nw-shell { grid-template-columns: 1fr; }
  .nw-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .nw-shell.is-sidebar-open .nw-sidebar { transform: translateX(0); }
  .nw-shell.is-sidebar-open .nw-sidebar-backdrop {
    display: block; position: fixed; inset: 0;
    background: rgba(0,0,0,0.4); z-index: 1090;
  }
  .nw-sidebar-toggle { display: grid; }
  .nw-searchbar { display: none; }
}

/* ──────────────── Login (extends existing) ──────────────── */
.nw-login-wrap {
  min-height: 100vh;
  padding: 24px;
}
.nw-login-card {
  width: 100%;
  max-width: 380px;
}
@media (max-width: 420px) {
  .nw-login-wrap { padding: 12px; }
  .nw-login-card { padding: 22px 20px; }
}

/* ──────────────── Form compat layer for in-page forms (placeholder) ──────────────── */
.nw-form-col { display: flex; flex-direction: column; gap: 12px; }
.nw-label-row { display: flex; align-items: center; justify-content: space-between; }
.nw-input-group { position: relative; }
.nw-input-group .nw-input { padding-right: 36px; }
.nw-input-addon {
  position: absolute; top: 0; right: 0; height: 100%;
  display: grid; place-items: center;
  width: 34px; color: var(--nw-text-3);
  background: transparent; border: none; cursor: pointer;
  border-radius: var(--nw-radius-sm);
}
.nw-input-addon:hover { color: var(--nw-text); }

.nw-check-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--nw-text-2);
  cursor: pointer; user-select: none;
}
.nw-check-row input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--nw-accent);
  cursor: pointer; margin: 0;
}

.nw-divider-or {
  display: flex; align-items: center; gap: 8px;
  margin: 16px 0; color: var(--nw-text-4);
}
.nw-divider-or::before, .nw-divider-or::after {
  content: ""; flex: 1; height: 1px; background: var(--nw-border);
}

/* ──────────────── Brand mark (used in sidebar + login) ──────────────── */
.nw-brand-logo-img { max-height: 32px; width: auto; display: block; }

/* ──────────────── Tabler form compat layer (scoped to .nw-app) ──────────────── */
/* Maps Tabler form classes used in widgets to nw design inside the admin shell. */
.nw-app .form-group, .nw-app .form-group.mb-3 { margin-bottom: 14px; }

.nw-app .form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--nw-text);
  margin-bottom: 6px;
  letter-spacing: 0;
}

.nw-app .form-control,
.nw-app .form-select,
.nw-app textarea.form-control,
.nw-app input[type="text"].form-control,
.nw-app input[type="email"].form-control,
.nw-app input[type="password"].form-control,
.nw-app input[type="number"].form-control,
.nw-app input[type="url"].form-control,
.nw-app input[type="tel"].form-control,
.nw-app input[type="search"].form-control,
.nw-app input[type="date"].form-control,
.nw-app input[type="datetime-local"].form-control,
.nw-app input[type="time"].form-control {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius-sm);
  background: var(--nw-surface);
  color: var(--nw-text);
  font: inherit;
  font-size: 13px;
  outline: none;
  box-shadow: none;
  transition: border-color 0.12s, box-shadow 0.12s;
  line-height: 1.4;
  min-height: 34px;
}
.nw-app .form-control:focus,
.nw-app .form-select:focus,
.nw-app textarea.form-control:focus {
  border-color: var(--nw-accent);
  box-shadow: 0 0 0 3px var(--nw-accent-soft);
}
.nw-app textarea.form-control { min-height: 80px; resize: vertical; line-height: 1.5; }

/* Inline list_editable selects need enough width for their longest
   option label — without this, narrow columns clip "published" to
   "publis" with no ellipsis. The list table has class .nw-table, not
   .table, so target both for portability. */
.nw-app .nw-table .form-select[name^="list_edit-"],
.nw-app .table .form-select[name^="list_edit-"] { min-width: 9.5em; }

/* Selectize dropdowns are anchored to <body> via dropdownParent:'body'
   so .nw-card overflow doesn't clip them. The filter side panel runs
   at z-index 1100, so without an explicit boost the body-level
   dropdown sits behind the panel and looks invisible. */
.selectize-dropdown { z-index: 1200; }

.nw-app .form-hint, .nw-app small.form-hint {
  font-size: 12px;
  color: var(--nw-text-3);
  margin-top: 4px;
  line-height: 1.45;
  display: block;
}

.nw-app .form-check-input {
  width: 16px; height: 16px;
  accent-color: var(--nw-accent);
  cursor: pointer;
  margin-right: 6px;
}
.nw-app .form-check-label { font-size: 13px; color: var(--nw-text-2); cursor: pointer; user-select: none; }
.nw-app .form-check { display: flex; align-items: center; gap: 6px; }

.nw-app .form-switch .form-check-input {
  appearance: none;
  -webkit-appearance: none;
  width: 34px; height: 18px;
  background: var(--nw-border-strong);
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}
.nw-app .form-switch .form-check-input:checked { background: var(--nw-accent); }
.nw-app .form-switch .form-check-input::before {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s;
}
.nw-app .form-switch .form-check-input:checked::before { transform: translateX(16px); }

.nw-app .form-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--nw-border);
}

/* Tabler .btn mapped to nw-btn appearance (only when inside forms we control) */
.nw-app .form-footer .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--nw-radius-sm);
  font: inherit;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--nw-border);
  background: var(--nw-surface);
  color: var(--nw-text);
  text-decoration: none;
}
.nw-app .form-footer .btn-primary {
  background: var(--nw-accent);
  color: #fff;
  border-color: var(--nw-accent);
}
.nw-app .form-footer .btn-primary:hover { background: var(--nw-accent-hover); border-color: var(--nw-accent-hover); color: #fff; }
.nw-app .form-footer .btn-info {
  background: var(--nw-info-soft);
  color: var(--nw-info);
  border-color: transparent;
}
.nw-app .form-footer .btn-info:hover { background: var(--nw-info); color: #fff; }
.nw-app .form-footer .btn-secondary { background: var(--nw-surface); color: var(--nw-text-2); }
.nw-app .form-footer .btn-secondary:hover { background: var(--nw-bg-subtle); border-color: var(--nw-border-strong); color: var(--nw-text); }
.nw-app .form-footer .btn-warning {
  background: var(--nw-warning-soft); color: var(--nw-warning); border-color: transparent;
}
.nw-app .form-footer .btn-warning:hover { background: var(--nw-warning); color: #fff; }
.nw-app .form-footer .btn-danger {
  background: var(--nw-danger-soft); color: var(--nw-danger); border-color: transparent;
}
.nw-app .form-footer .btn-danger:hover { background: var(--nw-danger); color: #fff; }

/* Fieldset card (nw styled) */
.nw-fieldset {
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius);
  background: var(--nw-surface);
  margin-bottom: 14px;
  overflow: hidden;
}
.nw-fieldset-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--nw-bg-subtle);
  border-bottom: 1px solid var(--nw-border);
  cursor: pointer;
  user-select: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--nw-text);
}
.nw-fieldset-head .nw-fieldset-chevron {
  margin-left: auto;
  transition: transform 0.15s;
}
.nw-fieldset.is-collapsed .nw-fieldset-head .nw-fieldset-chevron { transform: rotate(-90deg); }
.nw-fieldset-body { padding: 16px; }
.nw-fieldset.is-collapsed .nw-fieldset-body { display: none; }

/* ──────────────── Empty / error page ──────────────── */
.nw-empty-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, var(--nw-accent-soft) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, var(--nw-warning-soft) 0%, transparent 40%),
    var(--nw-bg);
}
.nw-empty-card {
  max-width: 480px;
  width: 100%;
  text-align: center;
  padding: 40px 28px;
  background: var(--nw-surface);
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius-lg);
  box-shadow: var(--nw-shadow-lg);
}
.nw-empty-code {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--nw-text);
  line-height: 1;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.nw-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--nw-text);
  margin: 0 0 6px;
}
.nw-empty-sub {
  font-size: 13.5px;
  color: var(--nw-text-3);
  margin-bottom: 24px;
  line-height: 1.55;
}

/* ──────────────── Footer (minimal) ──────────────── */
.nw-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--nw-border);
  background: var(--nw-surface);
  font-size: 12px;
  color: var(--nw-text-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.nw-footer a { color: var(--nw-text-2); text-decoration: none; }
.nw-footer a:hover { color: var(--nw-accent); }
.nw-footer .nw-footer-links { display: flex; gap: 16px; }

/* ──────────────── File input (drag-drop zone) ──────────────── */
.nw-fileinput {
  position: relative;
  border: 1.5px dashed var(--nw-border);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--nw-surface);
  transition: border-color 120ms ease, background 120ms ease;
}
.nw-fileinput.is-dragover {
  border-color: var(--nw-accent);
  background: color-mix(in oklab, var(--nw-accent) 6%, var(--nw-surface));
}
.nw-fileinput-input {
  display: block;
  width: 100%;
}
.nw-fileinput-meta {
  margin-top: 6px;
}
.nw-fileinput-error {
  margin-top: 6px;
  font-weight: 500;
}
.nw-fileinput-preview {
  display: block;
  max-width: 100%;
}

/* ──────────────── Sortable column headers ──────────────── */
.nw-th-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}
.nw-th-sort:hover { color: var(--nw-accent); }
.nw-th-arrow {
  font-size: 10px;
  opacity: 0.85;
}
.nw-th-arrow-idle {
  opacity: 0.35;
}
.nw-table thead th.is-sorted {
  background: color-mix(in oklab, var(--nw-accent) 6%, var(--nw-surface));
}

/* ──────────────── FK autocomplete combobox ──────────────── */
.nw-autocomplete {
  position: relative;
}
.nw-autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  margin: 2px 0 0;
  padding: 4px 0;
  list-style: none;
  background: var(--nw-surface);
  border: 1px solid var(--nw-border);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  max-height: 240px;
  overflow-y: auto;
}
.nw-autocomplete-item {
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--nw-text-1);
  border-radius: 3px;
}
.nw-autocomplete-item:hover {
  background: color-mix(in oklab, var(--nw-accent) 8%, var(--nw-surface));
  color: var(--nw-accent);
}

/* ──────────────── Confirm modal (nwConfirm) ──────────────── */
.nw-modal {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nw-modal[hidden] { display: none; }
.nw-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 17, 21, 0.45);
  backdrop-filter: blur(2px);
  cursor: pointer;
}
.nw-modal-dialog {
  position: relative;
  width: min(440px, 92vw);
  background: var(--nw-surface);
  color: var(--nw-text-1);
  border: 1px solid var(--nw-border);
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: nw-modal-pop 120ms ease-out;
}
.nw-modal-dialog.nw-modal-wide { width: min(960px, 95vw); }
.nw-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--nw-text-3);
  cursor: pointer;
}
.nw-modal-close:hover { color: var(--nw-text-1); }
@keyframes nw-modal-pop {
  from { opacity: 0; transform: translateY(-4px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
.nw-modal-header {
  padding: 16px 20px 8px;
}
.nw-modal-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.nw-modal-body {
  padding: 8px 20px 16px;
  font-size: 14px;
  color: var(--nw-text-2);
  line-height: 1.5;
}
.nw-modal-footer {
  padding: 12px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--nw-border);
  background: color-mix(in oklab, var(--nw-text-1) 3%, var(--nw-surface));
}

/* ──────────────── Bookmarks (saved filter presets) ──────────────── */
.nw-bookmarks {
  position: relative;
}
.nw-bookmarks-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  width: 240px;
  padding: 6px;
  background: var(--nw-surface);
  border: 1px solid var(--nw-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}
.nw-bookmarks-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow-y: auto;
}
.nw-bookmarks-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nw-bookmarks-link {
  flex: 1;
  display: block;
  padding: 6px 8px;
  font-size: 13.5px;
  color: var(--nw-text-1);
  text-decoration: none;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nw-bookmarks-link:hover {
  background: color-mix(in oklab, var(--nw-accent) 8%, var(--nw-surface));
  color: var(--nw-accent);
}
.nw-bookmarks-del {
  border: 0;
  background: none;
  color: var(--nw-text-3);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 16px;
  line-height: 1;
  border-radius: 3px;
}
.nw-bookmarks-del:hover {
  color: var(--nw-text-1);
  background: color-mix(in oklab, var(--nw-text-1) 6%, var(--nw-surface));
}
.nw-bookmarks-empty {
  padding: 8px 8px 4px;
}
.nw-bookmarks-footer {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--nw-border);
}

/* ──────────────── Keyboard shortcuts overlay ──────────────── */
.nw-shortcuts-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 14px;
  margin: 0;
}
.nw-shortcuts-list dt {
  text-align: right;
  margin: 0;
}
.nw-shortcuts-list dd {
  margin: 0;
  font-size: 13.5px;
  color: var(--nw-text-2);
  align-self: center;
}
.nw-shortcuts-list kbd {
  display: inline-block;
  min-width: 22px;
  padding: 2px 6px;
  text-align: center;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--nw-text-1);
  background: color-mix(in oklab, var(--nw-text-1) 4%, var(--nw-surface));
  border: 1px solid var(--nw-border);
  border-bottom-width: 2px;
  border-radius: 4px;
}

/* ──────────────── Per-row inline action icons ──────────────── */
.nw-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.nw-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  color: var(--nw-text-2);
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
  transition: background 100ms ease, color 100ms ease;
}
.nw-row-action:hover,
.nw-row-action:focus-visible {
  color: var(--nw-text-1);
  background: color-mix(in oklab, var(--nw-text-1) 6%, var(--nw-surface));
  outline: none;
}
.nw-row-action--update:hover,
.nw-row-action--update:focus-visible {
  color: #d97706; /* amber-600 — independent of theme accent so it always reads as "edit" */
  background: color-mix(in oklab, #d97706 12%, var(--nw-surface));
}
.nw-row-action--delete:hover,
.nw-row-action--delete:focus-visible {
  color: #dc2626; /* red-600 */
  background: color-mix(in oklab, #dc2626 12%, var(--nw-surface));
}
.nw-row-action--purge:hover,
.nw-row-action--purge:focus-visible {
  color: #991b1b; /* red-800 — purge is the harder destructive */
  background: color-mix(in oklab, #991b1b 14%, var(--nw-surface));
}
.nw-row-action--restore:hover,
.nw-row-action--restore:focus-visible {
  color: #059669; /* emerald-600 — restore is the friendly inverse */
  background: color-mix(in oklab, #059669 12%, var(--nw-surface));
}

/* ──────────────── Date hierarchy nav ──────────────── */
.nw-date-hierarchy {
  padding: 12px 16px;
  border-bottom: 1px solid var(--nw-border);
  background: color-mix(in oklab, var(--nw-text-1) 2%, var(--nw-surface));
}
.nw-date-hier-crumbs {
  font-size: 13px;
  color: var(--nw-text-2);
  margin-bottom: 8px;
}
.nw-date-hier-crumbs a {
  color: var(--nw-text-2);
  text-decoration: none;
}
.nw-date-hier-crumbs a:hover {
  color: var(--nw-accent);
}
.nw-date-hier-crumbs .nw-crumb-sep {
  margin: 0 6px;
  color: var(--nw-text-3);
}
.nw-date-hier-current {
  font-weight: 600;
  color: var(--nw-text-1);
}
.nw-date-hier-buckets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nw-date-hier-bucket {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--nw-text-1);
  background: var(--nw-surface);
  border: 1px solid var(--nw-border);
  border-radius: 14px;
  text-decoration: none;
  transition: background 100ms ease, color 100ms ease, border-color 100ms ease;
}
.nw-date-hier-bucket:hover {
  color: var(--nw-accent);
  border-color: var(--nw-accent);
  background: color-mix(in oklab, var(--nw-accent) 8%, var(--nw-surface));
}

/* ──────────────── Cell links (list_display_links) ──────────────── */
.nw-cell-link {
  color: var(--nw-text-1);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color 100ms ease, border-color 100ms ease;
}
.nw-cell-link:hover {
  color: var(--nw-accent);
  border-bottom-color: var(--nw-accent);
}

/* ──────────────── filter_horizontal M2M widget ──────────────── */
.nw-m2m-fh {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
}
.nw-m2m-fh-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.nw-m2m-fh-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--nw-text-2);
}
.nw-m2m-fh-head > span {
  white-space: nowrap;
}
.nw-m2m-fh-filter {
  flex: 1;
  min-width: 0;
}
.nw-m2m-fh-select {
  min-height: 220px;
  max-height: 360px;
  overflow-y: auto;
}
.nw-m2m-fh-select option {
  padding: 4px 8px;
  cursor: pointer;
}
.nw-m2m-fh-arrows {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  align-self: center;
}
.nw-m2m-fh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--nw-border);
  background: var(--nw-surface);
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--nw-text-2);
  cursor: pointer;
  transition: background 100ms ease, color 100ms ease, border-color 100ms ease;
}
.nw-m2m-fh-btn:hover {
  color: var(--nw-accent);
  border-color: var(--nw-accent);
  background: color-mix(in oklab, var(--nw-accent) 8%, var(--nw-surface));
}
@media (max-width: 640px) {
  .nw-m2m-fh {
    grid-template-columns: 1fr;
  }
  .nw-m2m-fh-arrows {
    flex-direction: row;
    justify-content: center;
  }
}

/* ──────────────── Radio fields (Django parity) ──────────────── */
.nw-radio-group { display: flex; gap: 14px; }
.nw-radio-group[data-orientation="vertical"] { flex-direction: column; gap: 6px; }
.nw-radio-option { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

/* ──────────────── StackedInline layout (Django parity) ──────────────── */
.nw-stacked-list { display: flex; flex-direction: column; gap: 14px; }
.nw-stacked-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 16px;
  padding: 14px;
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius-sm);
  background: var(--nw-bg-subtle);
}
.nw-stacked-field { display: flex; flex-direction: column; gap: 4px; }
.nw-stacked-field .form-label { font-weight: 500; font-size: 12.5px; color: var(--nw-text-2); margin: 0; }
.nw-stacked-delete { position: absolute; top: 8px; right: 12px; }
.nw-stacked-action { position: absolute; top: 8px; right: 12px; }

/* ──────────────── Inline collapse (Django parity) ──────────────── */
.nw-inline-card .nw-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.nw-inline-chevron {
  transition: transform 0.18s ease;
  color: var(--nw-text-3);
  flex-shrink: 0;
  margin-left: 12px;
}
.nw-inline-card.is-collapsed .nw-inline-chevron { transform: rotate(-90deg); }
.nw-inline-card.is-collapsed .nw-inline-body { display: none; }
.nw-inline-bounds { color: var(--nw-text-3); margin-left: 4px; font-size: 11px; }

/* ──────────────── Breadcrumbs (Django parity) ──────────────── */
.nw-breadcrumbs {
  margin-bottom: 6px;
  font-size: 12.5px;
  color: var(--nw-text-3);
}
.nw-breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.nw-breadcrumbs li { display: inline-flex; align-items: center; gap: 4px; }
.nw-breadcrumbs a {
  color: var(--nw-text-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.12s, color 0.12s;
}
.nw-breadcrumbs a:hover { color: var(--nw-accent); border-bottom-color: currentColor; }
.nw-breadcrumbs [aria-current="page"] { color: var(--nw-text); font-weight: 500; }
.nw-breadcrumbs-sep { color: var(--nw-text-4, var(--nw-text-3)); opacity: 0.55; }

/* ──────────────── Boolean cell icons (Django parity) ──────────────── */
.nw-bool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}
.nw-bool--true {
  color: var(--nw-success, #10b981);
  background: color-mix(in oklab, var(--nw-success, #10b981) 14%, transparent);
}
.nw-bool--false {
  color: var(--nw-danger, #ef4444);
  background: color-mix(in oklab, var(--nw-danger, #ef4444) 14%, transparent);
}
