body.auth-pending > * {
  visibility: hidden;
}

.student-topbar-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
  min-width: 0;
}

.student-account-bar {
  position: relative;
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 14px;
  padding: 7px 9px 7px 16px;
  border: 1px solid rgba(41, 69, 67, 0.16);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.94);
  color: #294543;
  box-shadow: 0 10px 30px rgba(32, 48, 44, 0.1);
}

.student-account-bar .account-avatar-button {
  position: relative;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid #39776a;
  border-radius: 50%;
  background: #f7f3e8;
  color: #1f5d72;
  font-weight: 900;
}

.student-account-bar .account-avatar-button img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.student-account-bar .avatar-upload-message {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 3;
  padding: 5px 8px;
  border: 1px solid #9ab7aa;
  border-radius: 4px;
  background: #fffdf7;
  font-size: 10px;
}

.student-account-bar .avatar-upload-message[hidden] { display: none; }

.student-account-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-account-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-home-link,
.student-logout {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
}

.student-home-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(41, 69, 67, 0.34);
  text-underline-offset: 4px;
}

.student-account-copy {
  display: grid;
  min-width: 112px;
  line-height: 1.2;
}

.student-account-copy small {
  color: #66746d;
  font-size: 11px;
}

.student-account-copy strong {
  overflow: hidden;
  margin-top: 3px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-logout {
  min-width: 58px;
  padding: 0 14px;
  border: 0;
  background: #294543;
  color: #fffdf7;
  cursor: pointer;
}

.student-home-link:focus-visible,
.student-logout:focus-visible {
  outline: 3px solid rgba(197, 166, 75, 0.72);
  outline-offset: 3px;
}

.student-logout:active {
  transform: translateY(1px) scale(0.98);
}

@media (max-width: 980px) {
  .student-topbar-actions {
    width: 100%;
    justify-items: start;
  }

  .student-account-bar {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .student-account-bar {
    gap: 10px;
    padding-left: 12px;
  }

  .student-account-copy {
    min-width: 0;
    flex: 1;
  }

  .report-account-bar .student-account-name { max-width: 68px; }
  .report-account-bar .student-account-actions { gap: 6px; }
  .report-account-bar .student-home-link,
  .report-account-bar .student-logout { min-height: 38px; font-size: 12px; }
  .report-account-bar .student-logout { min-width: 46px; padding: 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .student-logout {
    transition: none;
  }
}
