/* Shared header for both teaching modes. Keep navigation IDs and actions stable. */
.portal-common {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-height: 72px;
  margin: 0;
  padding: 12px clamp(20px, 3vw, 48px);
  border: 0;
  border-radius: 0;
  background: #171b24;
  box-shadow: none;
  color: #f3f2ed;
  font-family: var(--font-ui, sans-serif);
}
.portal-common .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 205px;
  color: #f3f2ed;
  text-decoration: none;
}
.portal-common .brand .mark {
  display: block;
  width: 32px;
  height: 36px;
  flex: 0 0 32px;
  border: 0;
  border-radius: 0;
  background: currentColor;
  color: #f3f2ed;
  font-size: 0;
  box-shadow: none;
  mask: url("/assets/academy/mark.svg") center / contain no-repeat;
}
.portal-common .mark::before,
.portal-common .mark::after {
  display: none;
}
.portal-common .brand b {
  display: block;
  color: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.025em;
}
.portal-common .brand small {
  display: block;
  margin-top: 3px;
  color: #a6acb7;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.015em;
}
.portal-common .role-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow-x: auto;
  max-width: 100%;
}
.portal-common .role-btn {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #bec3cc;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.portal-common .role-btn.active {
  background: #3454d1;
  color: white;
  box-shadow: none;
}
.portal-common .role-btn:hover {
  background: #ffffff12;
  color: white;
}
.portal-common .role-btn.active:hover {
  background: #405fd9;
}
.portal-common .teacher-portal-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}
.portal-common .student-theme-button,
.portal-common .teacher-logout {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid #ffffff25;
  border-radius: 6px;
  color: #ecede9;
  background: transparent;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}
.portal-common .student-theme-button {
  width: 38px;
  padding: 0;
  font-size: 20px;
}
.portal-common #cabinetLink {
  color: #ecede9;
  background: transparent;
  font-size: 13px;
  padding: 0;
}
.portal-common .learner-name {
  font-size: 13px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1000px) {
  .portal-common {
    flex-wrap: wrap;
    gap: 12px;
    padding-block: 12px;
  }
  .portal-common .role-switch {
    order: 3;
    width: 100%;
  }
  .portal-common .brand {
    flex: 1;
  }
}
@media (max-width: 600px) {
  .portal-common .brand {
    min-width: 0;
  }
  .portal-common .brand small {
    display: none;
  }
  .portal-common .brand b {
    font-size: 13px;
  }
  .portal-common .role-btn {
    padding: 0 11px;
  }
}
