/* v2.16 — larger, clearer role navigation while preserving the mobile hamburger behavior. */
  #main-header {
    position: relative;
    z-index: 70;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    padding: 1rem 1.25rem !important;
    min-height: 104px;
    border-radius: 30px !important;
    border-bottom-width: 3px !important;
    box-shadow: 0 16px 38px rgba(15,23,42,.08) !important;
  }

  #main-header > div:first-child {
    flex: 0 0 auto;
    min-width: 0;
  }
  #main-header > div:first-child img {
    width: 184px !important;
    max-width: 184px !important;
    height: auto !important;
  }

  .mv-role-nav-shell {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #student-nav, #teacher-nav { margin: 0 !important; }
  #student-nav:not(.hidden), #teacher-nav:not(.hidden) {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: .28rem !important;
  }

  #student-nav .mv-student-nav-btn,
  #teacher-nav button {
    position: relative;
    min-height: 50px !important;
    padding: .68rem .82rem !important;
    border: 1px solid transparent !important;
    border-radius: 15px !important;
    background: transparent !important;
    color: #52647c !important;
    box-shadow: none !important;
    transform: none !important;
    font-family: 'Fredoka', sans-serif !important;
    font-size: .84rem !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    letter-spacing: -.01em;
    white-space: nowrap;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .46rem !important;
    transition: color 130ms ease, background-color 130ms ease, border-color 130ms ease, box-shadow 130ms ease, transform 130ms ease !important;
  }

  #teacher-nav button i {
    width: 1.15rem;
    text-align: center;
    font-size: .9rem;
    color: #64748b;
    transition: color 130ms ease;
  }

  #student-nav .mv-student-nav-icon {
    width: 1.8rem !important;
    height: 1.8rem !important;
    flex: 0 0 1.8rem !important;
    border-radius: .7rem !important;
    background: #f1f5f9 !important;
    color: #64748b !important;
    font-size: .78rem !important;
  }

  #student-nav .mv-student-nav-btn:hover,
  #teacher-nav button:hover {
    color: #0369a1 !important;
    background: #f5fbff !important;
    border-color: #d7eefc !important;
    transform: translateY(-1px) !important;
  }
  #teacher-nav button:hover i { color: #0284c7; }

  #student-nav .mv-student-nav-btn.is-active,
  #teacher-nav button.bg-brand-blue {
    color: #0284c7 !important;
    background: linear-gradient(180deg,#f0f9ff 0%,#e7f7ff 100%) !important;
    border-color: #cbeafd !important;
    box-shadow: 0 8px 18px rgba(14,165,233,.10) !important;
  }
  #teacher-nav button.bg-brand-blue i { color:#0284c7 !important; }
  #student-nav .mv-student-nav-btn.is-active .mv-student-nav-icon {
    background: #dff4ff !important;
    color: #0284c7 !important;
  }
  #student-nav .mv-student-nav-btn.is-active::after,
  #teacher-nav button.bg-brand-blue::after {
    content: "";
    position: absolute;
    left: 24%;
    right: 24%;
    bottom: -9px;
    height: 4px;
    border-radius: 999px;
    background: #06d6a0;
    box-shadow: 0 2px 8px rgba(6,214,160,.24);
  }

  #user-header-info {
    flex: 0 0 auto;
    gap: .45rem !important;
  }
  #user-header-info > div:first-child {
    min-height: 50px;
    padding: .5rem .72rem !important;
    border-radius: 17px !important;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(15,23,42,.035);
  }
  #user-header-info > div:first-child > span {
    font-size: 1.45rem !important;
  }
  #user-header-info > div:first-child .text-left p:first-child {
    font-size: .78rem !important;
    line-height: 1.15 !important;
  }
  #user-header-info > div:first-child .text-left p:last-child {
    font-size: .66rem !important;
    line-height: 1.2 !important;
    margin-top: .16rem;
  }
  #user-header-info button {
    width: 42px;
    height: 42px;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center;
    border-radius: 13px !important;
    font-size: .86rem !important;
  }

  .mv-mobile-menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe7f0;
    border-radius: 15px;
    background: #f8fafc;
    color: #475569;
    font-size: 1.05rem;
    box-shadow: 0 5px 14px rgba(15,23,42,.04);
    transition: background-color 120ms ease,color 120ms ease,transform 120ms ease;
  }
  .mv-mobile-menu-toggle:hover { background:#f0f9ff; color:#0284c7; }
  .mv-mobile-menu-toggle:active { transform:scale(.96); }

  /* Keep the full desktop navigation usable on medium-width landscape tablets. */
  @media (max-width:1060px) and (min-width:769px) {
    #main-header { gap:.6rem !important; padding:.85rem .9rem !important; min-height:94px; }
    #main-header > div:first-child img { width:150px !important; max-width:150px !important; }
    #student-nav:not(.hidden), #teacher-nav:not(.hidden) { gap:.12rem !important; }
    #student-nav .mv-student-nav-btn, #teacher-nav button {
      min-height:46px !important;
      padding-inline:.5rem !important;
      font-size:.74rem !important;
      gap:.28rem !important;
    }
    #student-nav .mv-student-nav-icon { width:1.55rem !important; height:1.55rem !important; flex-basis:1.55rem !important; }
    #teacher-nav button i { font-size:.78rem !important; }
    #user-header-info > div:first-child { padding-left:.55rem !important; padding-right:.55rem !important; }
    #user-header-info > div:first-child .text-left p:first-child { font-size:.72rem !important; }
    #user-header-info > div:first-child .text-left p:last-child { font-size:.6rem !important; }
  }

  /* Mobile/portrait: hide role modules until the three-line menu is opened. */
  @media (max-width:768px) {
    body.mobile-bottom-nav-padding { padding-bottom:1.25rem !important; }
    #app { padding-top:.65rem !important; }
    #main-header {
      min-height:76px;
      padding:.72rem .8rem !important;
      border-radius:23px !important;
      gap:.5rem !important;
    }
    #main-header > div:first-child img { width:124px !important; max-width:124px !important; }
    .mv-mobile-menu-toggle { display:inline-flex !important; order:4; }
    #user-header-info { margin-left:auto; order:3; }
    .mv-role-nav-shell {
      position:absolute;
      left:0;
      right:0;
      top:calc(100% + 8px);
      z-index:120;
      display:block;
      pointer-events:none;
    }
    #student-nav:not(.hidden), #teacher-nav:not(.hidden) { display:none !important; }
    #main-header.is-menu-open .mv-role-nav-shell { pointer-events:auto; }
    #main-header.is-menu-open #student-nav:not(.hidden),
    #main-header.is-menu-open #teacher-nav:not(.hidden) {
      display:grid !important;
      grid-template-columns:1fr !important;
      gap:.42rem !important;
      width:100%;
      padding:.72rem;
      border:1px solid #e2e8f0;
      border-radius:21px;
      background:rgba(255,255,255,.985);
      box-shadow:0 22px 48px rgba(15,23,42,.17);
      backdrop-filter:blur(14px);
      -webkit-backdrop-filter:blur(14px);
    }
    #main-header.is-menu-open #student-nav .mv-student-nav-btn,
    #main-header.is-menu-open #teacher-nav button {
      width:100% !important;
      min-height:52px !important;
      justify-content:flex-start !important;
      padding:.78rem .9rem !important;
      border-radius:14px !important;
      font-size:.86rem !important;
      gap:.72rem !important;
    }
    #main-header.is-menu-open #student-nav .mv-student-nav-btn.is-active,
    #main-header.is-menu-open #teacher-nav button.bg-brand-blue {
      background:linear-gradient(180deg,#f0f9ff,#e8f7ff) !important;
      color:#0369a1 !important;
      border-color:#cbeafd !important;
    }
    #main-header.is-menu-open #student-nav .mv-student-nav-btn::after,
    #main-header.is-menu-open #teacher-nav button::after { display:none !important; }
    #main-header.is-menu-open #student-nav .mv-student-nav-icon {
      display:grid !important;
      width:2rem !important;
      height:2rem !important;
      flex-basis:2rem !important;
    }
    #main-header.is-menu-open #teacher-nav button i {
      display:inline-block !important;
      width:2rem;
      text-align:center;
      color:#64748b;
      font-size:.95rem !important;
    }
    #main-header.is-menu-open #teacher-nav button.bg-brand-blue i { color:#0369a1; }
    #user-header-info > div:first-child { padding:.4rem .55rem !important; border-radius:14px !important; min-height:44px; }
    #user-header-info button { width:40px; height:40px; }
  }

  @media (max-width:540px) {
    #main-header > div:first-child img { width:108px !important; max-width:108px !important; }
    #user-header-info > div:first-child .text-left { display:none !important; }
    #user-header-info > div:first-child {
      width:40px;
      height:40px;
      min-height:40px;
      padding:0 !important;
      display:grid !important;
      place-items:center;
      border-radius:999px !important;
    }
    #user-header-info > div:first-child > span { font-size:1.2rem !important; }
    #user-header-info button { display:none !important; }
  }
  @media (max-width:360px) {
    #main-header > div:first-child img { width:94px !important; max-width:94px !important; }
    .mv-mobile-menu-toggle { width:42px; height:42px; flex-basis:42px; }
  }
