/* ===== MODULE 15.52 — PREMIUM NAVIGATION SHELL ===== */
/* Navigation-only polish. No card FX, no opening transforms, no JS dependency. */

@layer opening {
  .sidebar,
  .app-sidebar,
  .main-sidebar {
    position: relative;
    isolation: isolate;
    background:
      radial-gradient(circle at 50% 0%, rgba(123, 43, 255, .22), transparent 38%),
      linear-gradient(180deg, rgba(12, 7, 24, .96), rgba(5, 1, 13, .96));
    border-right: 1px solid rgba(185, 124, 255, .16);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .035);
    backdrop-filter: blur(var(--blur-panel, 18px));
  }

  .sidebar::before,
  .app-sidebar::before,
  .main-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 18%),
      radial-gradient(circle at 50% 18%, rgba(0, 243, 255, .08), transparent 28%);
    opacity: .8;
  }

  .sidebar .logo,
  .app-sidebar .logo,
  .brand,
  .app-brand {
    letter-spacing: .18em;
    text-transform: uppercase;
  }

  .nav,
  .nav-list,
  .sidebar-nav {
    display: grid;
    gap: 8px;
  }

  .nav-item,
  .sidebar-link,
  .sidebar button,
  .app-sidebar button,
  [data-nav],
  [data-view-button] {
    position: relative;
    min-height: var(--tap-target-min, 44px);
    border-radius: 14px;
    border: 1px solid transparent;
    color: var(--void-text-muted, #b9acd9);
    transition:
      color .18s ease,
      background .18s ease,
      border-color .18s ease,
      box-shadow .18s ease,
      transform .18s ease;
  }

  .nav-item:hover,
  .sidebar-link:hover,
  .sidebar button:hover,
  .app-sidebar button:hover,
  [data-nav]:hover,
  [data-view-button]:hover {
    color: var(--void-text, #f3ecff);
    background: rgba(123, 43, 255, .13);
    border-color: rgba(185, 124, 255, .22);
    box-shadow: 0 0 24px rgba(123, 43, 255, .12);
  }

  .nav-item.active,
  .nav-item[aria-current="page"],
  .sidebar-link.active,
  .sidebar-link[aria-current="page"],
  .sidebar button.active,
  .app-sidebar button.active,
  [data-nav].active,
  [data-view-button].active {
    color: var(--void-text, #f3ecff);
    background:
      linear-gradient(90deg, rgba(123, 43, 255, .36), rgba(123, 43, 255, .12)),
      rgba(255, 255, 255, .035);
    border-color: rgba(185, 124, 255, .36);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, .035),
      0 0 30px rgba(123, 43, 255, .18);
  }

  .nav-item.active::before,
  .nav-item[aria-current="page"]::before,
  .sidebar-link.active::before,
  .sidebar-link[aria-current="page"]::before,
  .sidebar button.active::before,
  .app-sidebar button.active::before,
  [data-nav].active::before,
  [data-view-button].active::before {
    content: "";
    position: absolute;
    inset: 9px auto 9px 0;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--void-primary-soft, #b97cff), var(--void-primary, #7b2bff));
    box-shadow: 0 0 16px rgba(185, 124, 255, .72);
  }

  .nav-item:focus-visible,
  .sidebar-link:focus-visible,
  .sidebar button:focus-visible,
  .app-sidebar button:focus-visible,
  [data-nav]:focus-visible,
  [data-view-button]:focus-visible {
    outline: 2px solid rgba(185, 124, 255, .72);
    outline-offset: 3px;
  }

  @media (max-width: 760px) {
    .sidebar,
    .app-sidebar,
    .main-sidebar {
      border-right: 0;
      border-top: 1px solid rgba(185, 124, 255, .16);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
    }

    .nav,
    .nav-list,
    .sidebar-nav {
      grid-auto-flow: column;
      grid-auto-columns: minmax(64px, 1fr);
      overflow-x: auto;
      scrollbar-width: none;
    }

    .nav::-webkit-scrollbar,
    .nav-list::-webkit-scrollbar,
    .sidebar-nav::-webkit-scrollbar {
      display: none;
    }

    .nav-item,
    .sidebar-link,
    .sidebar button,
    .app-sidebar button,
    [data-nav],
    [data-view-button] {
      min-width: 64px;
      justify-content: center;
    }
  }
}
