@media (max-width: 1279px) {
  .nk-search-bar {
    flex: 1;
    gap: 10px;
  }
  .nk-sidebar {
    width: 310px;
  }
}

@media (max-width: 1023px) {
  .nk-home-topbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .nk-search-bar {
    order: 3;
    flex: 1 0 100%;
    height: auto;
    padding: 8px 12px;
    border-radius: 16px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .nk-search-sep {
    display: none;
  }
  .nk-mobile-toggle {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    margin-left: auto;
  }
  .nk-sidebar {
    top: 132px;
    transform: translateX(-110%);
    transition: transform 0.25s ease;
    width: min(340px, calc(100vw - 28px));
  }
  .nk-sidebar.is-open {
    transform: translateX(0);
  }
  .nk-unit-sheet,
  .nk-drawer {
    width: min(360px, calc(100vw - 28px));
  }
  .nk-compare-tray {
    display: none;
  }
}

@media (max-width: 719px) {
  .nk-drawer.nk-connectivity-drawer {
    top: auto;
    height: min(43dvh, 380px);
  }
}

@media (max-width: 639px) {
  .nk-brand-pill {
    height: 44px;
    padding: 0 12px 0 8px;
  }
  .nk-search-bar {
    padding: 8px 10px;
  }
  .nk-search-dropdown {
    width: calc(100vw - 36px);
    left: 0;
  }
  .nk-toolbar {
    max-width: calc(100vw - 16px);
    overflow-x: auto;
    padding: 4px 6px;
  }
  .nk-tb-btn {
    padding: 5px 8px;
    font-size: 10.5px;
  }
  .nk-compass-host {
    bottom: 84px;
    right: 10px;
  }
  #ui-root:has(.nk-connectivity-drawer, .nk-sun-panel) ~ #compass-host {
    top: 70px;
    bottom: auto;
  }
  .nk-compass {
    width: 58px;
    height: 58px;
  }
  .nk-project-dev-badge {
    display: none;
  }
  .v2-chip {
    max-width: calc(100vw - 28px);
  }
  .nk-unit-sheet {
    top: auto;
    bottom: 84px;
    left: 10px;
    right: 10px;
    width: auto;
    max-height: 56vh;
  }
  .nk-stock-dock {
    left: 10px;
    right: 10px;
    bottom: 84px;
    width: auto;
    max-height: 56vh;
  }
  .nk-drawer {
    top: 112px;
    left: 10px;
    right: 10px;
    bottom: 84px;
    width: auto;
  }
  .nk-sun-panel {
    width: calc(100vw - 20px);
    bottom: 84px;
  }
}

.nk-inventory-nav { display: none; }
.sg-axis small { display: block; font-weight: 500; }
@media (min-width: 1024px) {
  .nk-project-shell { --color-brand: #950b25; --color-brand-faded: #fff0f3; }
  .nk-project-menu-anchor { top: 76px; }
  .nk-project-menu-anchor > button { display: none; }
  .nk-project-menu, .nk-project-menu.hidden { display: flex !important; width: 74px; margin: 0; padding: 7px; gap: 1px; }
  .nk-project-menu button { flex-direction: column; text-align: center; gap: 5px; font-size: 12px; padding: 8px 2px; }
  .nk-project-menu button span { font-size: 20px; color: var(--color-brand); }
  .nk-drawer--left { left: 102px; }
  .nk-inventory-nav { display: flex; flex-direction: column; position: absolute; top: 76px; left: 102px; bottom: 15px; width: min(295px, 22vw); overflow: auto; padding: 10px 14px; z-index: 25; background: rgba(255,255,255,.94); }
  .nk-inventory-nav h3 { margin: 0; padding: 16px 0; border-block: 1px solid var(--v2-line); font-size: 16px; }
  .nk-inventory-nav button { padding: 12px 6px; text-align: left; }
  .nk-inventory-tabs { display: flex; gap: 3px; background: #f4f3f2; border-radius: 12px; padding: 3px; margin: 15px 0; }
  .nk-inventory-tabs button { flex: 1; text-align: center; border-radius: 9px; padding: 8px 0; font-size: 13px; }
  .nk-inventory-tabs [aria-pressed=true] { color: white; background: var(--color-brand); }
  .nk-inventory-groups button { width: 100%; display: flex; justify-content: space-between; }
  .nk-inventory-groups span { color: #087d3a; }
  .nk-stock-unit { padding-left: 24px !important; }
  .nk-stock-dock { left: auto; right: 15px; top: 76px; bottom: 15px; width: min(650px,36vw); height: auto; background: #fff; }
  .nk-stock-dock.is-expanded { height: auto; width: min(1050px,70vw); }
  .nk-stock-dock__body { padding: 0; min-height: 0; }
  .nk-stock-dock .nk-sg-scroll { border: none; border-radius: 0; }
  .nk-stock-dock .sg-axis { line-height: 1.12; height: 32px; }
  .nk-stock-dock .sg td { height: 26px; min-width: 56px; font-size: 12px; }
  body:has(.nk-stock-dock) .nk-compass-host { right: calc(min(650px,36vw) + 29px); bottom: 16px; }
}
