/* This navigation exists only on desktop. Mobile keeps its current bottom
   navigation and no mobile dimensions or interaction rules are changed. */
@media (min-width: 992px) {
  :root {
    --desktop-nav-width: 248px;
    --desktop-nav-offset: 276px;
  }

  .glass-sidebar,
  .admin-mobile-nav,
  .teacher-nav,
  .guardian-nav {
    display: none !important;
  }

  body:has(.desktop-role-nav) #page {
    padding-right: 0 !important;
  }

  .desktop-role-nav {
    position: fixed;
    inset: 18px 18px 18px auto;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    width: var(--desktop-nav-width);
    padding: 14px;
    direction: rtl;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(23, 50, 77, 0.1);
    border-radius: 26px;
    box-shadow: 0 18px 44px rgba(23, 50, 77, 0.12);
    backdrop-filter: blur(16px);
  }

  .desktop-role-nav__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 18px;
    color: #17324d;
    font-size: 1rem;
    font-weight: 900;
    border-bottom: 1px solid rgba(23, 50, 77, 0.08);
  }

  .desktop-role-nav__brand-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #1f7ae0, #16a085);
    border-radius: 12px;
  }

  .desktop-role-nav__items {
    display: grid;
    gap: 6px;
    padding-top: 16px;
  }

  .desktop-role-nav__link,
  .desktop-role-nav__logout {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 12px;
    color: #62758a;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 800;
    border-radius: 15px;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
  }

  .desktop-role-nav__link i,
  .desktop-role-nav__logout i {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    flex: 0 0 30px;
    border-radius: 10px;
    font-size: 1rem;
  }

  .desktop-role-nav__link img,
  .desktop-role-nav__logout img {
    display: inline-block;
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex: 0 0 30px;
  }

  .desktop-role-nav__link:hover {
    color: #17324d;
    background: #f2f6fa;
    transform: translateX(-2px);
  }

  .desktop-role-nav__link.is-active {
    color: #17324d;
    background: #eaf2f8;
    box-shadow: inset -3px 0 0 #2b7fff;
  }

  .desktop-role-nav__link.is-active i {
    color: #1769c2;
    background: #fff;
    box-shadow: 0 4px 10px rgba(23, 50, 77, 0.08);
  }

  .desktop-role-nav__logout {
    margin-top: auto;
    color: #bd3e4b;
    background: #fff5f5;
  }

  .desktop-role-nav__logout:hover {
    color: #9f2636;
    background: #ffe8ea;
  }

  body:has(.desktop-role-nav) .page-content {
    margin-right: var(--desktop-nav-offset);
    margin-left: 24px;
  }

  body:has(.desktop-role-nav) .admin-home,
  body:has(.desktop-role-nav) .admin-students,
  body:has(.desktop-role-nav) .admin-notices,
  body:has(.desktop-role-nav) .admin-settings {
    padding: 28px 24px !important;
  }

  body:has(.desktop-role-nav) .admin-home__shell,
  body:has(.desktop-role-nav) [class*="admin-"][class*="__shell"] {
    max-width: 1280px !important;
  }

  body:has(.desktop-role-nav) .teacher-shell,
  body:has(.desktop-role-nav) .guardian-shell,
  body:has(.desktop-role-nav) .student-page {
    max-width: 1280px !important;
    margin-inline: auto !important;
    padding: 28px 24px !important;
  }

  body:has(.desktop-role-nav) .student-page-body {
    max-width: 1240px;
    margin-inline: auto;
  }
}
