.role-switcher {
  position: relative;
}

.profile-dropdown .role-trigger {
  position: relative;
  padding-right: 30px;
}

.profile-dropdown .role-trigger > svg:last-child {
  color: #315674;
  margin-left: auto;
  transition: transform .16s;
}

.profile-dropdown {
  transform-origin: top right;
  animation: profileMenuIn .16s ease-out both;
}

.profile-dropdown.is-closing {
  pointer-events: none;
  animation: profileMenuOut .14s ease-in both;
}

.role-switcher.open .role-trigger {
  background: var(--blue-soft);
}

.role-switcher.open .role-trigger > svg:last-child {
  transform: rotate(90deg);
}

.role-options {
  z-index: 70;
  -webkit-backdrop-filter: blur(22px) saturate(1.22);
  backdrop-filter: blur(22px) saturate(1.22);
  background: #fffffff5;
  border: 1px solid #94b8d057;
  border-radius: 18px;
  width: 332px;
  padding: 8px;
  position: absolute;
  top: 0;
  right: calc(100% + 10px);
  box-shadow: 0 22px 52px #0d44672e;
  transform-origin: top right;
  animation: roleOptionsIn .15s ease-out both;
}

.role-options.is-closing {
  pointer-events: none;
  animation: roleOptionsOut .13s ease-in both;
}

.role-options button {
  min-height: 38px;
  height: auto !important;
  white-space: normal;
  text-align: left;
  line-height: 1.22;
  padding: 9px 10px !important;
}

.role-options button:hover {
  background: var(--blue-soft);
  color: var(--blue-2);
}

@keyframes profileMenuIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes profileMenuOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-6px) scale(.985);
  }
}

@keyframes roleOptionsIn {
  from {
    opacity: 0;
    transform: translateX(8px) scale(.985);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes roleOptionsOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateX(8px) scale(.985);
  }
}

.role-mode-loader {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .24s ease;
}

.role-mode-loader.is-visible {
  opacity: 1;
}

.role-mode-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(238, 247, 252, .42);
  -webkit-backdrop-filter: blur(8px) saturate(1.08);
  backdrop-filter: blur(8px) saturate(1.08);
}

.role-mode-loader__panel {
  position: relative;
  min-width: 312px;
  min-height: 112px;
  padding: 22px 26px;
  border-radius: 22px;
  border: 1px solid #a9c7db;
  background: #fffffff2;
  box-shadow: 0 28px 78px #0d446738;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 5px 14px;
  align-items: center;
}

.role-mode-loader__panel span {
  grid-row: 1 / 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid #d8e9f3;
  border-top-color: var(--purple);
  animation: roleModeSpin .82s linear infinite;
}

.role-mode-loader__panel b {
  font-size: 16px;
  line-height: 1.15;
  color: var(--text);
}

.role-mode-loader__panel small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.role-mode-is-loading .workspace {
  filter: blur(1.5px);
  transform: translateY(3px);
  transition: filter .24s ease, transform .24s ease;
}

.role-mode-is-loading .sidebar {
  filter: blur(.8px);
  transition: filter .24s ease;
}

@keyframes roleModeSpin {
  to {
    transform: rotate(360deg);
  }
}

.top-profile {
  min-width: 210px !important;
  max-width: 210px !important;
}

.top-profile b {
  max-width: 126px;
}

.top-profile small {
  max-width: 154px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: 10.8px;
}

body[data-psych-role-mode="learner"] .tariff {
  background: #0c538285;
  color: #dff8ff;
}

body[data-psych-role-mode="learner"] .top-profile {
  min-width: 154px !important;
  max-width: 164px;
}

body[data-psych-role-mode="learner"] .top-profile small {
  max-width: 98px;
  font-size: 11.4px;
}

body[data-psych-role-mode="learner"] .home-dashboard {
  background: linear-gradient(180deg, #f8fcff 0%, #f4f1ff 48%, #eef7fc 100%);
}

body[data-psych-role-mode="learner"] .home-status {
  color: var(--purple);
  background: var(--purple-soft);
  border-color: #c5b1f69e;
}

body[data-psych-role-mode="learner"] .home-welcome {
  border-color: #c5b1f69e;
  background: linear-gradient(135deg, #ffffffef, #f6f1ffd9);
}

body[data-psych-role-mode="learner"] .home-action.home-ai,
body[data-psych-role-mode="learner"] .learner-tools-block article:first-child {
  border-color: #c5b1f69e;
  background: #f7f2ffde;
}

body[data-psych-role-mode="learner"] .learner-hidden {
  display: none !important;
}

body[data-psych-role-mode="learner"] .home-tools article {
  min-height: 176px;
}

body[data-psych-role-mode="learner"] .home-progress {
  margin-top: 18px;
}

body[data-psych-role-mode="learner"] .learner-profile-page .page-heading h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
}

body[data-psych-role-mode="learner"] .learner-profile-page .page-heading strong {
  display: inline-block;
}

body[data-psych-role-mode="learner"] .learner-profile-page .page-heading span {
  display: inline-block;
  font-size: 16px;
  white-space: nowrap;
}

body[data-psych-role-mode="learner"] .learner-profile-page .cockpit {
  grid-template-columns: 118px minmax(0, 1fr) 330px;
  min-height: 208px;
}

body[data-psych-role-mode="learner"] .learner-profile-page .avatar-wrap,
body[data-psych-role-mode="learner"] .learner-profile-page .avatar-wrap img {
  width: 112px;
  height: 112px;
  border-radius: 22px;
}

body[data-psych-role-mode="learner"] .learner-profile-page .profession,
body[data-psych-role-mode="learner"] .learner-profile-page .readiness-panel h3 {
  color: var(--blue-2);
}

body[data-psych-role-mode="learner"] .learner-profile-page .description {
  max-width: 660px;
}

body[data-psych-role-mode="learner"] .learner-profile-page .trust-badge {
  height: 27px;
}

body[data-psych-role-mode="learner"] .learner-profile-page .progress-ring {
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(var(--blue) 0 62%, #d8e9f3 62% 100%);
}

body[data-psych-role-mode="learner"] .learner-profile-page .tabs {
  width: max-content;
  max-width: 100%;
  height: 52px;
  margin-bottom: 16px;
}

body[data-psych-role-mode="learner"] .learner-profile-page .tabs a.active {
  background: linear-gradient(#188fc5, #0479b5);
}

body[data-psych-role-mode="learner"] #profile-documents {
  padding-top: 6px;
}

body[data-psych-role-mode="learner"] #profile-documents .section-title > span {
  color: var(--blue-2);
  background: var(--blue-soft);
}

body[data-psych-role-mode="learner"] .learner-profile-rail {
  gap: 12px;
}

body[data-psych-role-mode="learner"] .learner-profile-rail .rail-actions {
  margin-top: 39px;
}

body[data-psych-role-mode="learner"] .learner-profile-rail .rail-overview {
  grid-template-rows: none;
  height: auto;
  gap: 12px;
}

body[data-psych-role-mode="learner"] .learner-profile-rail .ai-card {
  min-height: 224px;
}

body[data-psych-role-mode="learner"] .learner-profile-rail .section-hints {
  display: grid;
  gap: 12px;
}

body[data-psych-role-mode="learner"] .learner-profile-rail .section-hint-slot {
  height: auto;
  margin-top: 0;
}

body[data-psych-role-mode="learner"] .learner-profile-rail .section-hint {
  position: sticky;
  top: 92px;
}
