/* ========================================================= */
/* === PERFIL (perfil.css) — Layout i seccions principals === */
/* ========================================================= */

.perfil-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

/* 🟨 Contenidor de candidatures (ja estilitzat correctament) */
.candidatures-container {
  width: 100%;
  max-width: 1080px;
  justify-self: center;
  margin: 56px 0 0;
  padding: 36px 40px;
  background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(248,250,255,0.94));
  border: 1px solid rgba(188, 198, 216, 0.42);
  border-radius: 30px;
  box-shadow:
    0 28px 60px rgba(15, 23, 42, 0.10),
    0 8px 20px rgba(27, 46, 94, 0.07);
  backdrop-filter: blur(16px);
  transition: var(--transition);
}

/* Escola - ofertes publicades */
.section-title {
  font-size: 1.4em;
  color: var(--color-principal);
  font-weight: 700;
  border-left: 4px solid var(--color-daurat);
  padding-left: 12px;
  margin-bottom: 1rem;
  font-family: var(--font-principal);
}

.user-avatar {
  position: absolute;
  top: 20px;
  right: 40px;
  position: absolute;
}

.user-avatar--with-status {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  width: 148px;
}

.user-avatar__image {
  display: block;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-daurat);
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
  background: var(--color-surface);
}

.user-avatar__ring-toggle {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  left: calc(50% + 20px);
  top: 58px;
  width: 26px;
  height: 26px;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.94);
  background: #1b2e5e;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.20);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
  z-index: 3;
}

.user-avatar__ring-toggle:hover,
.user-avatar__ring-toggle:focus-visible,
.user-avatar__ring-toggle.is-open {
  background: #163f96;
  transform: scale(1.04);
  box-shadow: 0 10px 20px rgba(22, 63, 150, 0.24);
}

.user-avatar__ring-menu {
  position: absolute;
  top: calc(100% - 6px);
  right: -4px;
  min-width: 220px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(188, 198, 216, 0.42);
  background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(248,250,255,0.96));
  box-shadow:
    0 18px 36px rgba(15, 23, 42, 0.12),
    0 8px 18px rgba(27, 46, 94, 0.08);
  backdrop-filter: blur(16px);
  z-index: 30;
}

.user-avatar__ring-menu.hidden {
  display: none;
}

.user-avatar__ring-option {
  width: 100%;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  background: transparent;
  border: 0;
  text-align: left;
  transition: background .18s ease, color .18s ease;
}

.user-avatar__ring-option:hover,
.user-avatar__ring-option:focus-visible {
  background: rgba(22, 63, 150, 0.08);
}

.user-avatar__ring-option.is-active {
  background: rgba(22, 63, 150, 0.12);
}

.user-avatar__ring-option.is-locked {
  opacity: 0.68;
  cursor: pointer;
}

.user-avatar__ring-option.is-locked:hover,
.user-avatar__ring-option.is-locked:focus-visible {
  background: rgba(22, 63, 150, 0.04);
}

.user-avatar__ring-swatch {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.96);
  box-shadow: 0 0 0 1px rgba(27, 46, 94, 0.14);
  flex: 0 0 auto;
}

.user-avatar__ring-optionText {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-avatar__ring-optionTitle {
  color: var(--color-title);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.15;
}

.user-avatar__ring-optionMeta {
  color: var(--color-subtext);
  font-size: 0.78rem;
  line-height: 1.15;
}

.user-avatar__ring-note {
  margin-top: 8px;
  padding: 8px 10px 0;
  color: rgba(27, 46, 94, 0.72);
  font-size: 0.76rem;
  line-height: 1.35;
}

.user-avatar__ring-note.hidden {
  display: none;
}

.user-avatar__progress-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  padding: 3px 0 0;
  margin: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: opacity .18s ease, color .18s ease;
}

.user-avatar__progress-toggle:hover,
.user-avatar__progress-toggle:focus-visible {
  opacity: 1;
}

.user-avatar__progress-toggle.is-active {
  opacity: 1;
}

.user-avatar__progress-value {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  color: rgba(27, 46, 94, 0.46);
  opacity: 1;
}

.user-avatar__progress-toggle:hover .user-avatar__progress-value,
.user-avatar__progress-toggle:focus-visible .user-avatar__progress-value,
.user-avatar__progress-toggle.is-active .user-avatar__progress-value {
  color: #163f96;
  opacity: 1;
}

#perfil-page .bd-feedback-ack--spaceUnlocked{
  position: relative;
  margin: 34px 0 40px;
  padding: 18px 22px;
  border-radius: 22px;
  background: linear-gradient(145deg, #eef6ef, #e4f0e7);
  border: 1px solid rgba(136, 168, 139, 0.34);
  color: #35533a;
  box-shadow:
    0 18px 36px rgba(76, 104, 81, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.72);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}

#perfil-page .bd-feedback-ack--spaceUnlocked.is-visible{
  opacity: 1;
  transform: translateY(0);
}

#perfil-page .bd-feedback-ack__content{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: nowrap;
}

#perfil-page .bd-feedback-ack__title{
  font-size: 0.98rem;
  font-weight: 800;
  color: #29452e;
  line-height: 1.1;
  flex: 1 1 auto;
  white-space: nowrap;
  min-width: 0;
}

#perfil-page .bd-feedback-ack__cta{
  flex: 0 1 420px;
  width: auto;
  max-width: 420px;
  min-height: 46px;
  padding: 0 18px;
  margin-right: 86px;
  border-radius: 16px;
  box-shadow: 0 14px 26px rgba(31, 63, 143, 0.18);
  white-space: nowrap;
}

#perfil-page .bd-notice-shortcuts{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

#perfil-page .bd-notice-shortcuts.hidden{
  display: none;
}

#perfil-page .bd-notice-chip{
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(189, 198, 214, 0.72);
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  color: #51617d;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 20px rgba(27, 46, 94, 0.08);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

#perfil-page .bd-notice-chip.hidden{
  display: none;
}

#perfil-page .bd-notice-chip:hover,
#perfil-page .bd-notice-chip:focus-visible{
  transform: translateY(-1px);
  border-color: rgba(98, 123, 174, 0.42);
  box-shadow: 0 12px 24px rgba(27, 46, 94, 0.12);
}

#perfil-page .bd-notice-dismiss{
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(201, 158, 46, 0.22);
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  color: #8b7440;
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

#perfil-page .bd-notice-dismiss:hover,
#perfil-page .bd-notice-dismiss:focus-visible{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.9);
  color: #594a26;
  box-shadow: 0 10px 22px rgba(191, 144, 32, 0.12);
}

#perfil-page .bd-notice-dismiss--soft{
  position: absolute;
  top: 16px;
  right: 16px;
  border-color: rgba(66, 110, 84, 0.16);
  background: rgba(255,255,255,0.7);
  color: #5d7d63;
}

#perfil-page .bd-progress-card{
  transition: opacity .18s ease, transform .18s ease;
  transform-origin: top center;
}

#perfil-page .bd-progress-card.is-leaving{
  opacity: 0;
  transform: translateY(-8px);
}

@media (max-width: 720px){
  #perfil-page .bd-feedback-ack--spaceUnlocked{
    margin: 26px 0 30px;
    padding: 16px 16px 18px;
  }

  #perfil-page .bd-feedback-ack__content{
    flex-direction: column;
    align-items: stretch;
    padding-right: 34px;
  }

  #perfil-page .bd-feedback-ack__title{
    font-size: 0.98rem;
  }

  #perfil-page .bd-feedback-ack__cta{
    width: 100%;
    margin-right: 0;
  }

  #perfil-page .bd-notice-dismiss--soft{
    top: 14px;
    right: 14px;
  }
}

/*Marge formulari perfil*/

#perfil-page .form-container {
  margin-top: 70px; /* ajustable */
}

/* ========================================================= */
/* === PERFIL DOCENT — UPGRADE VISUAL DEL FORM PREVI       === */
/* ========================================================= */

#perfil-page{
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.10), transparent 28%),
    radial-gradient(circle at top right, rgba(27, 46, 94, 0.10), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(246,248,252,0.98) 100%);
}

.perfil-layout{
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto 72px;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.bd-main{
  grid-column: 2;
  min-width: 0;
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  position: relative;
}

#perfil-page .bd-main-loader{
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: start center;
  padding-top: 56px;
  pointer-events: none;
}

#perfil-page .bd-main-loader__card{
  display: inline-grid;
  justify-items: center;
  gap: 12px;
  min-width: min(320px, calc(100vw - 64px));
  padding: 18px 22px;
  border-radius: 24px;
  border: 1px solid rgba(188, 198, 216, 0.42);
  background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(248,250,255,0.94));
  box-shadow:
    0 20px 40px rgba(15, 23, 42, 0.10),
    0 8px 20px rgba(27, 46, 94, 0.07);
  backdrop-filter: blur(16px);
}

#perfil-page .bd-main-loader__spinner{
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(212,175,55,.28);
  border-top-color: #d4af37;
  animation: chatSpin .75s linear infinite;
}

#perfil-page .bd-main-loader__text{
  color: var(--color-title);
  font-weight: 800;
  text-align: center;
}

.perfil-layout:has(.bd-sidebar.hidden){
  max-width: 1200px;
  grid-template-columns: minmax(0, 1fr);
  justify-content: center;
}

.perfil-layout:has(.bd-sidebar.hidden) .bd-main{
  grid-column: 1;
  max-width: 1120px;
}

#perfil-page .bd-sidebar{
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 20px 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,248,252,0.94));
  border: 1px solid rgba(188, 198, 216, 0.42);
  box-shadow:
    0 20px 40px rgba(15, 23, 42, 0.08),
    0 8px 20px rgba(27, 46, 94, 0.05);
  backdrop-filter: blur(14px);
}

#perfil-page .bd-sidebar__title{
  margin-bottom: 14px;
  padding-left: 8px;
  color: var(--color-subtext);
}

#perfil-page .bd-sidebar__link{
  width: 100%;
  min-height: 54px;
  margin-bottom: 10px;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  column-gap: 10px;
  align-items: center;
  border-radius: 16px;
  color: var(--color-title);
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(189, 198, 214, 0.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.76);
  opacity: 1;
  font-size: 1.02rem;
  line-height: 1.25;
}

#perfil-page .bd-sidebar__link--new{
  grid-template-columns: 14px minmax(0, 1fr) auto;
  min-height: 82px;
  padding: 14px 16px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

#perfil-page .bd-sidebar__bullet{
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 14px;
  color: currentColor;
  font-weight: 800;
}

#perfil-page .bd-sidebar__label{
  min-width: 0;
  text-align: left;
}

#perfil-page .bd-sidebar__link--new .bd-sidebar__label{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  max-width: 92px;
  line-height: 1.25;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

#perfil-page .bd-sidebar__link--new .bd-sidebar__labelLine{
  display: block;
}

#perfil-page .bd-sidebar__link:hover{
  background: rgba(247,249,253,0.96);
  border-color: rgba(27,46,94,0.16);
}

#perfil-page .bd-sidebar__link.active{
  background: linear-gradient(135deg, rgba(255,248,231,0.98), rgba(248,239,209,0.94));
  border-color: rgba(212,175,55,0.36);
  color: #8a6a00;
  box-shadow: 0 10px 22px rgba(212,175,55,0.14);
}

#perfil-page #viewPerfilBD.form-container{
  max-width: 1080px;
  width: 100%;
  justify-self: center;
  margin: 20px 0 0;
  padding: 36px 40px;
  border-radius: 30px;
  border: 1px solid rgba(188, 198, 216, 0.42);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.98), rgba(248,250,255,0.94));
  box-shadow:
    0 28px 60px rgba(15, 23, 42, 0.10),
    0 8px 20px rgba(27, 46, 94, 0.07);
  backdrop-filter: blur(16px);
}

#perfil-page #viewPerfilBD.form-container::before{
  content:"";
  display:block;
  width:100%;
  height:1px;
  margin-bottom:28px;
  background: linear-gradient(90deg, rgba(212,175,55,0.82), rgba(27,46,94,0.22), transparent);
}

#perfil-page #espaiDocentSectionBD,
#perfil-page #viewFormacionsBD,
#perfil-page #viewNotificationsBD,
#perfil-page #viewInboxBD,
#perfil-page #viewChatBD,
#perfil-page #viewAccountBD{
  width: 100%;
  max-width: 1080px;
  justify-self: center;
  margin: 56px 0 0;
  padding: 36px 40px;
  border-radius: 30px;
  border: 1px solid rgba(188, 198, 216, 0.42);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.98), rgba(248,250,255,0.94));
  box-shadow:
    0 28px 60px rgba(15, 23, 42, 0.10),
    0 8px 20px rgba(27, 46, 94, 0.07);
  backdrop-filter: blur(16px);
}

#perfil-page #espaiDocentSectionBD::before,
#perfil-page #viewFormacionsBD::before,
#perfil-page #viewNotificationsBD::before,
#perfil-page #viewInboxBD::before,
#perfil-page #viewChatBD::before,
#perfil-page #viewAccountBD::before{
  content:"";
  display:block;
  width:100%;
  height:1px;
  margin-bottom:28px;
  background: linear-gradient(90deg, rgba(212,175,55,0.82), rgba(27,46,94,0.22), transparent);
}

#perfil-page #espaiDocentSectionBD{
  display: grid;
  gap: 24px;
}

#perfil-page #espaiDocentSectionBD .bd-space__header{
  align-items: flex-start;
  gap: 16px;
  padding: 0;
}

#perfil-page #espaiDocentSectionBD .bd-space__title,
#perfil-page #viewNotificationsBD .section-title,
#perfil-page #viewInboxBD .section-title,
#perfil-page #viewAccountBD .section-title{
  color: var(--color-title);
}

#perfil-page #viewNotificationsBD,
#perfil-page #viewAccountBD{
  display: grid;
  gap: 18px;
}

#perfil-page #viewFormacionsBD{
  display: grid;
  gap: 18px;
}

#perfil-page #viewFormacionsBD.bd-formacions--demo{
  position: relative;
  overflow: hidden;
  pointer-events: none;
}

#perfil-page #viewFormacionsBD.bd-formacions--demo::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(244, 246, 249, 0.18);
  backdrop-filter: blur(1.2px) grayscale(0.45) saturate(0.82);
  -webkit-backdrop-filter: blur(1.2px) grayscale(0.45) saturate(0.82);
  z-index: 3;
}

#perfil-page #viewFormacionsBD.bd-formacions--demo > *{
  position: relative;
  z-index: 1;
}

#perfil-page .bd-formacions{
  display: grid;
  gap: 20px;
}

#perfil-page .bd-formacions__header{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

#perfil-page .bd-formacions__lead{
  margin-top: 8px;
  color: var(--color-subtext);
  line-height: 1.65;
}

#perfil-page .bd-formacions__lead p{
  margin: 0;
}

#perfil-page .bd-formacions__lead p + p{
  margin-top: 6px;
}

#perfil-page .bd-formacions__counter{
  min-width: 138px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.24);
  background: linear-gradient(180deg, rgba(255, 251, 238, 0.96), rgba(247, 249, 255, 0.90));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.76);
  text-align: center;
}

#perfil-page .bd-formacions__counter strong{
  display: block;
  font-size: 1.9rem;
  line-height: 1;
  color: #8a6a00;
}

#perfil-page .bd-formacions__counter span{
  display: block;
  margin-top: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-subtext);
}

#perfil-page .bd-formacions__filters{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#perfil-page .bd-formacions__filter{
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(189, 198, 214, 0.42);
  background: rgba(255,255,255,0.76);
  color: var(--color-title);
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.76);
  cursor: default;
}

#perfil-page .bd-formacions__filter:hover{
  border-color: rgba(27, 46, 94, 0.18);
  background: rgba(247, 249, 253, 0.98);
}

#perfil-page .bd-formacions__filter.is-active{
  background: linear-gradient(135deg, rgba(255,248,231,0.98), rgba(248,239,209,0.94));
  border-color: rgba(212,175,55,0.36);
  color: #8a6a00;
  box-shadow: 0 10px 22px rgba(212,175,55,0.14);
}

#perfil-page .bd-formacions__context{
  color: var(--color-subtext);
  line-height: 1.5;
}

#perfil-page .bd-formacions__grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

#perfil-page .bd-formacions__card{
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(188, 198, 216, 0.34);
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(245,248,253,0.88));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.78),
    0 12px 28px rgba(15, 23, 42, 0.06);
  opacity: 0.9;
}

#perfil-page .bd-formacions__cardTop{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

#perfil-page .bd-formacions__eyebrow{
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(27, 46, 94, 0.08);
  color: var(--color-principal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#perfil-page .bd-formacions__title{
  margin: 8px 0 0;
  color: var(--color-title);
  font-size: 1.08rem;
  line-height: 1.35;
}

#perfil-page .bd-formacions__duration{
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 248, 231, 0.92);
  border: 1px solid rgba(212,175,55,0.22);
  color: #8a6a00;
  font-weight: 800;
  font-size: 0.86rem;
}

#perfil-page .bd-formacions__description{
  margin: 12px 0 0;
  color: var(--color-subtext);
  line-height: 1.6;
}

#perfil-page .bd-formacions__tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

#perfil-page .bd-formacions__tag{
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(27, 46, 94, 0.06);
  border: 1px solid rgba(27, 46, 94, 0.10);
  color: var(--color-principal);
  font-size: 0.82rem;
  font-weight: 700;
}

#perfil-page #viewFormacionsBD.bd-formacions--demo .bd-formacions__filters,
#perfil-page #viewFormacionsBD.bd-formacions--demo .bd-formacions__card{
  filter: grayscale(0.42) saturate(0.84);
}

#perfil-page #viewFormacionsBD.bd-formacions--demo .bd-formacions__filter{
  opacity: 0.92;
}

#perfil-page #viewFormacionsBD.bd-formacions--demo .bd-formacions__card,
#perfil-page #viewFormacionsBD.bd-formacions--demo .bd-formacions__counter{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    0 12px 28px rgba(15, 23, 42, 0.04);
}

#perfil-page .bd-notifications-lead,
#perfil-page .bd-account-lead{
  margin: -2px 0 0;
  color: var(--color-subtext);
  line-height: 1.6;
}

#perfil-page .bd-notifications-shell{
  display: grid;
  gap: 20px;
}

#perfil-page #viewNotificationsBD .bd-notifications-loading{
  display:grid;
  place-items:center;
  min-height: 160px;
  margin-top: 4px;
  font-weight: 700;
  color: #1f3b7a;
  border-style: solid;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(245,248,253,0.78));
}

#perfil-page #viewNotificationsBD .bd-notifications-loading::before{
  content:"";
  width:16px;
  height:16px;
  margin-bottom:10px;
  border-radius:50%;
  border:2px solid rgba(212,175,55,.28);
  border-top-color:#d4af37;
  animation: chatSpin .75s linear infinite;
}

#perfil-page .bd-notifications-card{
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(188, 198, 216, 0.34);
  background: linear-gradient(180deg, rgba(255,255,255,0.90), rgba(245,248,253,0.84));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.76),
    0 12px 28px rgba(15, 23, 42, 0.06);
}

#perfil-page .bd-notifications-card--meta{
  background: linear-gradient(180deg, rgba(255,251,238,0.94), rgba(247,249,255,0.88));
  border-color: rgba(212,175,55,0.24);
}

#perfil-page .bd-notifications-card__top{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
}

#perfil-page .bd-notifications-card__title{
  margin:0;
  color: var(--color-title);
  font-size: 1.18rem;
  font-weight: 800;
}

#perfil-page .bd-notifications-card__text{
  margin: 8px 0 0;
  color: var(--color-subtext);
  line-height: 1.58;
}

#perfil-page .bd-notifications-list{
  display:grid;
  gap:14px;
  margin-top:18px;
}

#perfil-page .bd-notification-toggle{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  padding:18px 18px 18px 20px;
  border-radius:20px;
  border:1px solid rgba(188, 198, 216, 0.4);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,255,0.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
  cursor:pointer;
}

#perfil-page .bd-notification-toggle__copy{
  display:grid;
  gap:6px;
}

#perfil-page .bd-notification-toggle__copy strong{
  color: var(--color-title);
  font-size: 1rem;
  line-height: 1.4;
}

#perfil-page .bd-notification-toggle__copy span{
  color: var(--color-subtext);
  line-height: 1.5;
}

#perfil-page .bd-switch{
  position:relative;
  flex:0 0 auto;
  width:58px;
  height:34px;
}

#perfil-page .bd-switch input{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer;
  margin:0;
}

#perfil-page .bd-switch__slider{
  position:absolute;
  inset:0;
  border-radius:999px;
  background: rgba(181, 191, 211, 0.95);
  box-shadow: inset 0 1px 2px rgba(15,23,42,0.12);
  transition: background .2s ease, box-shadow .2s ease;
}

#perfil-page .bd-switch__slider::after{
  content:"";
  position:absolute;
  top:4px;
  left:4px;
  width:26px;
  height:26px;
  border-radius:999px;
  background:#fff;
  box-shadow: 0 8px 18px rgba(15,23,42,0.18);
  transition: transform .2s ease;
}

#perfil-page .bd-switch input:checked + .bd-switch__slider{
  background: linear-gradient(135deg, rgba(212,175,55,0.96), rgba(27,46,94,0.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.32), 0 10px 20px rgba(27,46,94,0.14);
}

#perfil-page .bd-switch input:checked + .bd-switch__slider::after{
  transform: translateX(24px);
}

#perfil-page .bd-switch input:focus-visible + .bd-switch__slider{
  outline: none;
  box-shadow:
    0 0 0 4px rgba(212,175,55,0.18),
    inset 0 1px 2px rgba(15,23,42,0.12);
}

#perfil-page .bd-notifications-meta{
  display:grid;
  gap:12px;
}

#perfil-page .bd-notifications-meta__row{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  padding:14px 16px;
  border-radius:18px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(212,175,55,0.16);
}

#perfil-page .bd-notifications-meta__row span{
  color: var(--color-subtext);
}

#perfil-page .bd-notifications-meta__row strong{
  color: var(--color-title);
  text-align:right;
}

#perfil-page .bd-notifications-actions{
  display:grid;
  gap:12px;
  margin-top:18px;
}

#perfil-page .bd-notifications-actions .btn{
  min-height:58px;
  width:min(260px, 100%);
}

#perfil-page .bd-notifications-status{
  min-height: 24px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-subtext);
}

#perfil-page .bd-notifications-status.is-success{
  color:#166534;
}

#perfil-page .bd-notifications-status.is-error{
  color:#b91c1c;
}

#perfil-page .docent-account-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

#perfil-page .docent-account-card{
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(188, 198, 216, 0.34);
  background: linear-gradient(180deg, rgba(255,255,255,0.90), rgba(245,248,253,0.84));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.76),
    0 12px 28px rgba(15, 23, 42, 0.06);
}

#perfil-page .docent-account-card.is-active{
  border-color: rgba(212,175,55,0.34);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.78),
    0 14px 30px rgba(212,175,55,0.10);
}

#perfil-page .docent-account-card--featured{
  background: linear-gradient(180deg, rgba(255,252,241,0.94), rgba(249,244,225,0.88));
}

#perfil-page .docent-account-card__head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

#perfil-page .docent-account-card__eyebrow{
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(27,46,94,0.08);
  color: var(--color-subtext);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#perfil-page .docent-account-card__eyebrow.is-gold{
  background: rgba(212,175,55,0.16);
  color: #8a6a00;
}

#perfil-page .docent-account-card__title{
  margin: 10px 0 8px;
  color: var(--color-title);
  font-size: 1.35rem;
  line-height: 1.15;
}

#perfil-page .docent-account-card__desc{
  margin: 0;
  color: var(--color-subtext);
  line-height: 1.6;
}

#perfil-page .docent-account-card__price{
  min-width: 120px;
  text-align: right;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-title);
}

#perfil-page .docent-account-card__price small{
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-subtext);
}

#perfil-page .docent-account-card__meta{
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

#perfil-page .docent-account-card__row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.54);
  border: 1px solid rgba(188, 198, 216, 0.24);
}

#perfil-page .docent-account-card__row span:first-child{
  color: var(--color-subtext);
}

#perfil-page .docent-account-card__row strong{
  color: var(--color-title);
  text-align: right;
}

#perfil-page .docent-account-card__list{
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--color-subtext);
}

#perfil-page .docent-account-card__actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

#perfil-page #espaiDocentSectionBD .bd-space__subtitle{
  margin-top: 8px;
  color: var(--color-subtext);
  line-height: 1.55;
}

#perfil-page #espaiDocentSectionBD .bd-space__grid{
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.9fr);
  gap: 20px;
  align-items: start;
}

#perfil-page #espaiDocentSectionBD .bd-space__community-strip{
  grid-column: 1 / -1;
  order: 1;
  display: grid;
  gap: 20px;
}

#perfil-page #espaiDocentSectionBD .bd-space__card{
  width: 100%;
  max-width: none;
  border-radius: 24px;
  border: 1px solid rgba(188, 198, 216, 0.34);
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(245,248,253,0.82));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.76),
    0 12px 28px rgba(15, 23, 42, 0.06);
}

#perfil-page #espaiDocentSectionBD .bd-space__divider{
  display: none;
}

#perfil-page #espaiDocentSectionBD .bd-space__card--community,
#perfil-page #communityFeedCardBD{
  grid-column: auto;
  order: initial;
}

#perfil-page #espaiDocentSectionBD .bd-space__card--moments{
  grid-column: 1 / -1;
  order: 2;
}

#perfil-page #espaiDocentSectionBD .bd-space__card--discover{
  grid-column: 1 / -1;
  order: 3;
  position: relative;
  overflow: hidden;
}

#perfil-page #espaiDocentSectionBD .bd-space__card--following{
  order: 4;
}

#perfil-page #espaiDocentSectionBD .bd-space__card--followers{
  order: 5;
}

#perfil-page #espaiDocentSectionBD .bd-space__cardTitle{
  font-size: 1.1rem;
}

#perfil-page #espaiDocentSectionBD .bd-space__cardHead--people{
  align-items: flex-start;
}

#perfil-page .bd-people-hub__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

#perfil-page .bd-people-hub__tab{
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(181, 191, 211, 0.62);
  background: rgba(255,255,255,0.84);
  color: var(--color-title);
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

#perfil-page .bd-people-hub__tab:hover{
  transform: translateY(-1px);
  border-color: rgba(212,175,55,0.4);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

#perfil-page .bd-people-hub__tab.is-active{
  background: linear-gradient(135deg, rgba(255,248,231,0.98), rgba(248,239,209,0.94));
  border-color: rgba(212,175,55,0.36);
  color: #8a6a00;
}

#perfil-page .bd-people-hub__panel{
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(390px, 100%);
  padding: 22px 22px 18px;
  border-left: 1px solid rgba(188, 198, 216, 0.34);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,254,0.96));
  box-shadow: -18px 0 34px rgba(15, 23, 42, 0.10);
  z-index: 2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#perfil-page .bd-space__card--discover.is-panel-open .bd-people-scroll,
#perfil-page .bd-space__card--discover.is-panel-open #peopleEmptyBD{
  padding-right: min(408px, calc(100% + 18px));
}

#perfil-page .bd-space__card--discover.is-panel-open .bd-carousel-nav{
  opacity: 0;
  pointer-events: none;
}

#perfil-page .bd-people-hub__panel.hidden{
  display: none;
}

#perfil-page .bd-people-hub__backdrop{
  display: none;
}

#perfil-page .bd-people-hub__panelHead{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

#perfil-page .bd-people-hub__panelBody{
  display: grid;
  gap: 14px;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 4px;
}

#perfil-page .bd-people-hub__close{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(181, 191, 211, 0.62);
  background: rgba(255,255,255,0.9);
  color: var(--color-title);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

[data-theme="dark"] #perfil-page .bd-people-hub__tab{
  border-color: rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(15,23,42,0.88), rgba(17,24,39,0.90));
  color: #f3f4f6;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 10px 22px rgba(0,0,0,0.18);
}

[data-theme="dark"] #perfil-page .bd-people-hub__tab:hover{
  border-color: rgba(212,175,55,0.34);
  background: linear-gradient(180deg, rgba(24,33,51,0.96), rgba(17,24,39,0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 14px 28px rgba(0,0,0,0.24);
}

[data-theme="dark"] #perfil-page .bd-people-hub__tab.is-active{
  border-color: rgba(212,175,55,0.42);
  background: linear-gradient(135deg, rgba(67,56,17,0.58), rgba(17,24,39,0.96));
  color: #f5d36a;
}

[data-theme="dark"] #perfil-page .bd-people-hub__panel{
  border-left-color: rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(11,18,32,0.98), rgba(15,23,42,0.97));
  box-shadow: -18px 0 34px rgba(0,0,0,0.32);
}

[data-theme="dark"] #perfil-page .bd-people-hub__backdrop{
  background: rgba(2, 6, 23, 0.68);
}

[data-theme="dark"] #perfil-page .bd-people-hub__close{
  border-color: rgba(255,255,255,0.10);
  background: rgba(15,23,42,0.86);
  color: #e5e7eb;
}

[data-theme="dark"] #perfil-page .bd-people-hub__close:hover{
  border-color: rgba(212,175,55,0.34);
  color: #f5d36a;
}

@media (max-width: 1024px){
  #perfil-page .bd-people-hub__actions{
    justify-content: flex-start;
  }

  #perfil-page #espaiDocentSectionBD .bd-people-fixed{
    width: 220px;
    min-width: 220px;
    max-width: 220px;
  }

  #perfil-page .bd-people-hub__panel{
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 18px;
    border-left: 0;
    border-top: 1px solid rgba(188, 198, 216, 0.34);
    box-shadow: none;
  }

  #perfil-page .bd-space__card--discover.is-panel-open .bd-people-scroll,
  #perfil-page .bd-space__card--discover.is-panel-open #peopleEmptyBD{
    padding-right: 0;
  }

  #perfil-page .bd-space__card--discover.is-panel-open .bd-carousel-nav{
    opacity: 1;
    pointer-events: auto;
  }
}

#perfil-page #espaiDocentSectionBD .bd-space__cardSub{
  margin-top: 6px;
  margin-bottom: 14px;
  line-height: 1.55;
}

#perfil-page #espaiDocentSectionBD .bd-discover-search{
  margin: 0 0 16px;
}

#perfil-page #espaiDocentSectionBD .bd-discover-search__input{
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(212,175,55,0.22);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,247,239,0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.75),
    0 8px 20px rgba(15,23,42,0.05);
  padding: 0 18px;
  font-size: 0.98rem;
  color: var(--color-title);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

#perfil-page #espaiDocentSectionBD .bd-discover-search__input::placeholder{
  color: #7c8798;
}

#perfil-page #espaiDocentSectionBD .bd-discover-search__input:focus{
  outline: none;
  border-color: rgba(212,175,55,0.55);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.75),
    0 0 0 4px rgba(212,175,55,0.12),
    0 10px 24px rgba(15,23,42,0.08);
}

#perfil-page #espaiDocentSectionBD .bd-user-card[hidden]{
  display: none !important;
}

#perfil-page #espaiDocentSectionBD .bd-user-avatarStack{
  position: relative;
  width: 120px;
  min-height: 132px;
  align-self: center;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 14px;
}

#perfil-page #espaiDocentSectionBD .bd-user-avatarButton{
  position: relative;
  width: 120px;
  height: 120px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  z-index: 1;
  transition: transform .18s ease, box-shadow .18s ease;
}

#perfil-page #espaiDocentSectionBD .bd-user-avatarButton::before{
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}

#perfil-page #espaiDocentSectionBD .bd-user-avatarButton:hover{
  transform: translateY(-2px) scale(1.02);
}

#perfil-page #espaiDocentSectionBD .bd-user-avatarButton:focus-visible{
  outline: 3px solid rgba(212,175,55,0.28);
  outline-offset: 4px;
}

#perfil-page #espaiDocentSectionBD .bd-user-avatarButton.has-active{
  border-radius: 999px;
  box-shadow:
    0 18px 30px rgba(15,23,42,0.14);
}

#perfil-page #espaiDocentSectionBD .bd-user-avatarButton.has-active::before{
  opacity: 1;
  transform: scale(1);
  background:
    conic-gradient(
      from 220deg,
      #ffb347 0deg,
      #ffd86f 70deg,
      #6dd3ff 160deg,
      #6c63ff 245deg,
      #ff7eb3 320deg,
      #ffb347 360deg
    );
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.96),
    0 8px 20px rgba(108,99,255,0.18);
}

#perfil-page #espaiDocentSectionBD .bd-user-avatarButton .bd-user-avatar{
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

#perfil-page #espaiDocentSectionBD .bd-user-moment-add{
  position: absolute;
  right: -6px;
  top: 86px;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #1b2e5e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(15,23,42,0.16);
  cursor: pointer;
  z-index: 3;
  transition: transform .18s ease, box-shadow .18s ease;
}

#perfil-page #espaiDocentSectionBD .bd-user-moment-add:hover{
  transform: scale(1.06);
  box-shadow: 0 14px 24px rgba(15,23,42,0.2);
}

#perfil-page #espaiDocentSectionBD .bd-user-moment-add:focus-visible{
  outline: 3px solid rgba(212,175,55,0.28);
  outline-offset: 2px;
}

#perfil-page #espaiDocentSectionBD .bd-user-moment-hint{
  display: block;
  margin-top: -4px;
  margin-bottom: 12px;
  color: var(--color-subtext);
  font-size: 0.79rem;
  line-height: 1.35;
}

#perfil-page #espaiDocentSectionBD .bd-space__header{
  padding-bottom: 2px;
}

#perfil-page #espaiDocentSectionBD .bd-space__headerMain{
  display: grid;
  gap: 8px;
}

#perfil-page #espaiDocentSectionBD .bd-space__back-btn{
  justify-self: start;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(181, 191, 211, 0.62);
  background: rgba(255,255,255,0.84);
  color: var(--color-title);
  font-weight: 700;
  cursor: pointer;
}

#perfil-page #espaiDocentSectionBD .bd-space__back-btn.hidden{
  display: none;
}

#perfil-page #espaiDocentSectionBD .bd-space__title{
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  line-height: 1.1;
}

#perfil-page #espaiDocentSectionBD .bd-space__subtitle{
  max-width: 60ch;
  margin-top: 10px;
}

#perfil-page #espaiDocentSectionBD .bd-people-scroll{
  max-width: none;
  margin: 0;
}

#perfil-page #espaiDocentSectionBD .bd-people-fixed .bd-user-card{
  min-width: 200px;
  max-width: 220px;
  width: 100%;
  margin: 0 auto;
}

#perfil-page #espaiDocentSectionBD .bd-user-card--own{
  border-color: rgba(212,175,55,0.34);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.76),
    0 18px 32px rgba(15, 23, 42, 0.08),
    0 6px 16px rgba(212,175,55,0.10);
}

#perfil-page #espaiDocentSectionBD .bd-carousel{
  min-height: 100%;
}

#perfil-page #espaiDocentSectionBD .bd-following-list{
  max-height: 320px;
}

#perfil-page #espaiDocentSectionBD .bd-space__card--following,
#perfil-page #espaiDocentSectionBD .bd-space__card--followers{
  padding-top: 20px;
}

#perfil-page #espaiDocentSectionBD .bd-space__cardHead{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

#perfil-page .bd-moments-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(212,175,55,0.14);
  color: #8a6a00;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

#perfil-page .bd-moments-banner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(212,175,55,0.3);
  background:
    radial-gradient(circle at top left, rgba(212,175,55,0.12), transparent 55%),
    linear-gradient(180deg, rgba(255,252,241,0.94), rgba(255,247,224,0.85));
  color: var(--color-title);
}

#perfil-page .bd-moments-banner__text{
  line-height: 1.5;
  color: var(--color-subtext);
}

#perfil-page .bd-moments-banner__btn{
  flex: 0 0 auto;
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(27,46,94,0.12);
  color: var(--color-title);
  font-weight: 800;
  cursor: pointer;
}

#perfil-page .bd-moments-status{
  margin-bottom: 14px;
  padding: 11px 14px;
  border-radius: 16px;
  background: rgba(27,46,94,0.08);
  color: var(--color-title);
  font-weight: 700;
}

#perfil-page .bd-moments-status.is-error{
  background: rgba(220,38,38,0.1);
  color: #991b1b;
}

#perfil-page .bd-moments-status.is-success{
  background: rgba(34,197,94,0.12);
  color: #166534;
}

#perfil-page .bd-moments-status.is-loading{
  background: rgba(27,46,94,0.08);
  color: var(--color-title);
}

#perfil-page .bd-moments-rail{
  display: flex;
  align-items: flex-start;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 6px;
  scrollbar-width: none;
}

#perfil-page .bd-moments-rail::-webkit-scrollbar{
  display: none;
}

#perfil-page .bd-moment-item{
  position: relative;
  flex: 0 0 106px;
  width: 106px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: center;
}

#perfil-page .bd-moment-item.is-inactive{
  opacity: 0.84;
  cursor: default;
}

#perfil-page .bd-moment-item--own{
  cursor: default;
}

#perfil-page .bd-moment-visual{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border: none;
  border-radius: 999px;
  padding: 3px;
  background: linear-gradient(135deg, #d4af37 0%, #f7e8a4 40%, #1b2e5e 100%);
  box-shadow:
    0 12px 24px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.65);
  cursor: pointer;
  overflow: hidden;
}

#perfil-page .bd-moment-visual.has-active{
  box-shadow:
    0 12px 24px rgba(15, 23, 42, 0.12),
    0 0 0 4px rgba(212,175,55,0.14),
    inset 0 1px 0 rgba(255,255,255,0.65);
}

#perfil-page .bd-moment-item.is-inactive .bd-moment-visual{
  background: linear-gradient(135deg, rgba(27,46,94,0.1), rgba(180,190,206,0.22));
  box-shadow:
    0 10px 18px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.5);
  cursor: default;
}

#perfil-page .bd-moment-visualInner{
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243,247,252,0.96));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#perfil-page .bd-moment-visualInner img,
#perfil-page .bd-moment-visualInner video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#perfil-page .bd-moment-item.is-empty .bd-moment-visual{
  background: linear-gradient(135deg, rgba(27,46,94,0.16), rgba(212,175,55,0.18));
}

#perfil-page .bd-moment-placeholder{
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  border-radius: 999px;
  background:
    radial-gradient(circle at top, rgba(212,175,55,0.26), transparent 58%),
    linear-gradient(180deg, rgba(245,248,253,0.98), rgba(233,239,247,0.94));
  font-size: 2rem;
  font-weight: 300;
  color: var(--color-title);
}

#perfil-page .bd-moment-placeholder--inactive{
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.68), transparent 58%),
    linear-gradient(180deg, rgba(241,245,249,0.98), rgba(226,232,240,0.94));
}

#perfil-page .bd-moment-add{
  position: absolute;
  right: 10px;
  top: 60px;
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #1b2e5e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15,23,42,0.18);
  cursor: pointer;
}

#perfil-page .bd-moment-live{
  position: absolute;
  right: 7px;
  bottom: 9px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #ef4444;
  border: 2px solid #fff;
  box-shadow: 0 0 0 5px rgba(239,68,68,0.14);
}

#perfil-page .bd-moment-label{
  width: 100%;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--color-title);
}

#perfil-page .bd-moment-followingTag{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(27,46,94,0.08);
  color: var(--color-subtext);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#perfil-page .bd-moment-meta{
  width: 100%;
  line-height: 1.35;
  font-size: 0.8rem;
  color: var(--color-subtext);
}

#perfil-page .bd-moment-empty{
  min-height: 88px;
  display: flex;
  align-items: center;
  color: var(--color-subtext);
}

#perfil-page .bd-moments-viewer{
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

#perfil-page .bd-moments-viewer.hidden{
  display: none;
}

#perfil-page .bd-moments-viewer__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(9, 14, 25, 0.78);
  backdrop-filter: blur(8px);
}

#perfil-page .bd-moments-viewer__dialog{
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(88vh, 820px);
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,247,252,0.95));
  box-shadow: 0 30px 80px rgba(0,0,0,0.28);
  overflow: hidden;
}

#perfil-page .bd-moments-viewer__close{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 999px;
  background: rgba(15,23,42,0.08);
  color: var(--color-title);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

#perfil-page .bd-moments-viewer__nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(15,23,42,0.08);
  color: var(--color-title);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

#perfil-page .bd-moments-viewer__nav:disabled{
  opacity: 0.35;
  cursor: default;
}

#perfil-page .bd-moments-viewer__nav--prev{
  left: 14px;
}

#perfil-page .bd-moments-viewer__nav--next{
  right: 14px;
}

#perfil-page .bd-moments-viewer__counter{
  margin: 0 auto 10px;
  width: fit-content;
  min-width: 72px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15,23,42,0.08);
  color: var(--color-title);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

#perfil-page .bd-moments-viewer__meta{
  padding: 0 56px;
  margin-bottom: 14px;
  color: var(--color-title);
  font-weight: 800;
  line-height: 1.45;
}

#perfil-page .bd-moments-viewer__content{
  border-radius: 22px;
  overflow: hidden;
  background: rgba(15,23,42,0.05);
}

#perfil-page .bd-moments-viewer__content img,
#perfil-page .bd-moments-viewer__content video{
  width: 100%;
  max-height: min(72vh, 640px);
  object-fit: cover;
  display: block;
  background: #e8edf5;
}

#perfil-page #viewInboxBD{
  display: grid;
  gap: 18px;
}

#perfil-page #viewInboxBD .section-title{
  margin-bottom: 0;
}

#perfil-page .bd-inbox-search{
  position: relative;
  margin-top: -2px;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid rgba(188, 198, 216, 0.34);
  background: linear-gradient(180deg, rgba(255,255,255,0.80), rgba(245,248,253,0.76));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.76),
    0 10px 24px rgba(15, 23, 42, 0.05);
}

#perfil-page .bd-inbox-search::before{
  content: "";
  position: absolute;
  left: 28px;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(27, 46, 94, 0.36);
  border-radius: 999px;
  transform: translateY(-58%);
  pointer-events: none;
}

#perfil-page .bd-inbox-search::after{
  content: "";
  position: absolute;
  left: 42px;
  top: 50%;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: rgba(27, 46, 94, 0.36);
  transform: translateY(4px) rotate(45deg);
  transform-origin: left center;
  pointer-events: none;
}

#perfil-page .bd-inbox-search input{
  width: 100%;
  min-height: 54px;
  padding: 0 18px 0 50px;
  border-radius: 18px;
  border: 1px solid rgba(181, 191, 211, 0.68);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,248,252,0.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
  font-size: 1rem;
  color: var(--color-title);
}

#perfil-page .bd-inbox-search input::placeholder{
  color: #7d8aa1;
}

#perfil-page .bd-inbox-search input:focus{
  border-color: rgba(212, 175, 55, 0.72);
  box-shadow:
    0 0 0 4px rgba(212, 175, 55, 0.12),
    0 10px 24px rgba(27, 46, 94, 0.08);
  background: #fff;
}

#perfil-page #viewInboxBD #inboxListBD{
  margin-top: 0;
  max-height: none;
  padding-right: 0;
}

#perfil-page #viewInboxBD .bd-following-item{
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(188, 198, 216, 0.34);
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(245,248,253,0.80));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

#perfil-page #viewInboxBD .bd-following-item > div{
  flex: 1 1 auto;
  min-width: 0;
}

#perfil-page #viewInboxBD .bd-following-name,
#perfil-page #viewInboxBD .bd-following-role{
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#perfil-page #viewInboxBD .bd-following-item:hover{
  transform: translateY(-2px);
  border-color: rgba(212,175,55,0.34);
  background: linear-gradient(180deg, rgba(255,252,241,0.96), rgba(249,244,225,0.90));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.78),
    0 14px 28px rgba(15, 23, 42, 0.08);
}

#perfil-page #viewInboxBD .bd-empty{
  margin-top: 4px;
}

#perfil-page #viewInboxBD .bd-inbox-loading{
  display:grid;
  place-items:center;
  min-height: 140px;
  margin-top: 0;
  font-weight: 700;
  color: #1f3b7a;
  border-style: solid;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.78), rgba(245,248,253,0.74));
}

#perfil-page #viewInboxBD .bd-inbox-loading::before{
  content:"";
  width:16px;
  height:16px;
  margin-bottom:10px;
  border-radius:50%;
  border:2px solid rgba(212,175,55,.28);
  border-top-color:#d4af37;
  animation: chatSpin .75s linear infinite;
}

#perfil-page .bd-community-card,
#perfil-page .bd-space__card--community-feed{
  overflow: hidden;
}

#perfil-page #communityComposerCardBD{
  position: static;
}

#perfil-page #communityComposerCardBD.hidden{
  display: none;
}

#perfil-page #communityFeedTabsBD.hidden{
  display: none;
}

#perfil-page #communityFeedCardBD{
  display: grid;
  align-content: start;
  min-height: 0;
}

#perfil-page .bd-feed{
  margin-top: 16px;
  display: grid;
  gap: 16px;
  max-height: min(68vh, 980px);
  overflow-y: auto;
  padding-right: 8px;
  align-content: start;
}

#perfil-page .bd-feed::-webkit-scrollbar{
  width: 10px;
}

#perfil-page .bd-feed::-webkit-scrollbar-track{
  background: rgba(188, 198, 216, 0.18);
  border-radius: 999px;
}

#perfil-page .bd-feed::-webkit-scrollbar-thumb{
  background: rgba(27,46,94,0.18);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

#perfil-page .bd-community-composer{
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(188, 198, 216, 0.30);
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(246,248,252,0.78));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.76);
}

#perfil-page .bd-community-composer__title{
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-title);
}

#perfil-page .bd-community-composer__hint,
#perfil-page .bd-community-intro{
  color: var(--color-subtext);
  line-height: 1.55;
}

#perfil-page .bd-community-types{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#perfil-page .bd-community-type,
#perfil-page .bd-community-tab{
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(181, 191, 211, 0.62);
  background: rgba(255,255,255,0.82);
  color: var(--color-title);
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

#perfil-page .bd-community-type:hover,
#perfil-page .bd-community-tab:hover{
  transform: translateY(-1px);
  border-color: rgba(27,46,94,0.16);
}

#perfil-page .bd-community-type.is-active,
#perfil-page .bd-community-tab.is-active{
  background: linear-gradient(135deg, rgba(255,248,231,0.98), rgba(248,239,209,0.94));
  border-color: rgba(212,175,55,0.38);
  color: #8a6a00;
  box-shadow: 0 10px 20px rgba(212,175,55,0.12);
}

#perfil-page .bd-community-textarea{
  width: 100%;
  min-height: 138px;
  resize: vertical;
  padding: 18px 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(181, 191, 211, 0.68);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,248,252,0.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-title);
}

#perfil-page .bd-community-textarea::placeholder{
  color: #7d8aa1;
}

#perfil-page .bd-community-textarea:focus{
  outline: none;
  border-color: rgba(212, 175, 55, 0.72);
  box-shadow:
    0 0 0 4px rgba(212, 175, 55, 0.12),
    0 10px 24px rgba(27, 46, 94, 0.08);
  background: #fff;
}

#perfil-page .bd-community-preview{
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(188, 198, 216, 0.30);
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(246,248,252,0.8));
}

#perfil-page .bd-community-preview.hidden{
  display: none;
}

#perfil-page .bd-community-preview__label{
  color: var(--color-subtext);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

#perfil-page .bd-community-preview__content{
  color: var(--color-title);
  line-height: 1.6;
  word-break: break-word;
}

#perfil-page .bd-community-composer__footer{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#perfil-page .bd-community-composer__actions{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  margin-left: auto;
}

#perfil-page .bd-community-count{
  font-weight: 700;
  color: var(--color-subtext);
}

#perfil-page .bd-community-link-btn{
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(181, 191, 211, 0.62);
  background: rgba(255,255,255,0.72);
  color: var(--color-subtext);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

#perfil-page .bd-community-link-btn:hover,
#perfil-page .bd-post-link-btn:hover{
  background: rgba(255,255,255,0.92);
  border-color: rgba(181, 191, 211, 0.82);
  color: var(--color-title);
  transform: translateY(-1px);
}

#perfil-page .bd-community-link-anchor{
  position: relative;
  display: inline-flex;
  align-items: center;
}

#perfil-page .bd-community-composer__tools{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#perfil-page .bd-community-emoji-btn,
#perfil-page .bd-post-emoji-btn{
  min-height: 40px;
  min-width: 40px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(181, 191, 211, 0.62);
  background: rgba(255,255,255,0.72);
  color: var(--color-title);
  font-size: 1.05rem;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

#perfil-page .bd-community-emoji-btn:hover,
#perfil-page .bd-post-emoji-btn:hover{
  background: rgba(255,255,255,0.92);
  border-color: rgba(181, 191, 211, 0.82);
  transform: translateY(-1px);
}

#perfil-page .bd-community-emoji-picker{
  position: fixed;
  z-index: 10035;
  height: 380px;
  border-radius: 18px;
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

#perfil-page .bd-community-emoji-picker.hidden{
  display: none;
}

#perfil-page .bd-community-link-panel{
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 10030;
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(188, 198, 216, 0.30);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,248,252,0.92));
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.82);
}

#perfil-page .bd-community-link-panel.is-floating{
  position: fixed;
}

#perfil-page .bd-community-link-panel.hidden{
  display: none;
}

#perfil-page .bd-community-link-panel.is-composer-anchor{
  padding: 10px 12px;
  border-radius: 16px;
}

#perfil-page .bd-community-link-panel::after{
  content: "";
  position: absolute;
  left: var(--community-link-arrow-left, 40px);
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(246,248,252,0.9));
  border-right: 1px solid rgba(188, 198, 216, 0.30);
  border-bottom: 1px solid rgba(188, 198, 216, 0.30);
  transform: translateX(-50%) rotate(45deg);
}

#perfil-page .bd-community-link-panel.is-composer-anchor::after{
  bottom: -6px;
  width: 12px;
  height: 12px;
}

#perfil-page .bd-community-link-panel__field{
  display: grid;
  gap: 5px;
}

#perfil-page .bd-community-link-panel__field span{
  color: var(--color-subtext);
  font-size: 0.82rem;
  font-weight: 700;
}

#perfil-page .bd-community-link-panel__field input{
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(181, 191, 211, 0.68);
  background: rgba(255,255,255,0.96);
  color: var(--color-title);
}

#perfil-page .bd-community-link-panel__actions{
  display: flex;
  justify-content: flex-end;
}

#perfil-page .bd-community-tabs{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

#perfil-page .bd-community-typeSelectWrap{
  display: none;
}

#perfil-page .bd-community-typeSelect,
#perfil-page .bd-community-typeCustomInput{
  width: 100%;
  min-height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(181, 191, 211, 0.68);
  background: rgba(255,255,255,0.94);
  color: var(--color-title);
  padding: 0 14px;
  font-size: 0.95rem;
}

#perfil-page .bd-community-typeCustomInput{
  margin-top: 10px;
}

#perfil-page .bd-community-typeCustomInput.hidden{
  display: none;
}

#perfil-page .bd-community-intro{
  margin-top: 10px;
}

#perfil-page .bd-community-intro.is-public-profile{
  margin-top: 16px;
}

#perfil-page .bd-community-feed__nav{
  display: none;
}

#perfil-page .bd-community-feed__nav.hidden{
  display: none;
}

#perfil-page .bd-community-feed__navBtn{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(181, 191, 211, 0.62);
  background: rgba(255,255,255,0.88);
  color: var(--color-title);
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
}

#perfil-page .bd-post-card{
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(188, 198, 216, 0.34);
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(245,248,253,0.80));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.74),
    0 12px 28px rgba(15, 23, 42, 0.06);
}

#perfil-page .bd-post-card__header{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

#perfil-page .bd-post-card__avatar{
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #d4af37;
  background: #fff;
}

#perfil-page .bd-post-card__topline{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

#perfil-page .bd-post-card__name{
  font-weight: 800;
  color: var(--color-title);
}

#perfil-page .bd-post-card__name-btn,
#perfil-page .bd-post-comment__name-btn{
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

#perfil-page .bd-post-card__name-btn:hover .bd-post-card__name,
#perfil-page .bd-post-card__name-btn:focus-visible .bd-post-card__name,
#perfil-page .bd-post-comment__name-btn:hover .bd-post-comment__name,
#perfil-page .bd-post-comment__name-btn:focus-visible .bd-post-comment__name{
  text-decoration: underline;
}

#perfil-page .bd-post-card__name-btn:focus-visible,
#perfil-page .bd-post-comment__name-btn:focus-visible{
  outline: 2px solid rgba(39, 70, 144, 0.26);
  outline-offset: 3px;
  border-radius: 10px;
}

#perfil-page .bd-post-card__time,
#perfil-page .bd-post-card__subline,
#perfil-page .bd-post-card__likes{
  color: var(--color-subtext);
  font-size: 0.94rem;
}

#perfil-page .bd-post-card__subline{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

#perfil-page .bd-post-card__dot{
  opacity: .45;
}

#perfil-page .bd-post-card__type{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
  white-space: nowrap;
}

#perfil-page .bd-post-card__type.is-dubte{
  background: rgba(59,130,246,0.12);
  color: #2859af;
}

#perfil-page .bd-post-card__type.is-recurs{
  background: rgba(16,185,129,0.12);
  color: #0f766e;
}

#perfil-page .bd-post-card__type.is-reflexio{
  background: rgba(99,102,241,0.12);
  color: #4f46e5;
}

#perfil-page .bd-post-card__type.is-feina{
  background: rgba(212,175,55,0.18);
  color: #8a6a00;
}

#perfil-page .bd-post-card__type.is-anecdota{
  background: rgba(244,114,182,0.12);
  color: #be185d;
}

#perfil-page .bd-post-card__body{
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-title);
  word-break: break-word;
}

#perfil-page .bd-post-card__footer{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

#perfil-page .bd-post-like{
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(181, 191, 211, 0.62);
  background: rgba(255,255,255,0.84);
  color: var(--color-title);
  font-weight: 700;
  cursor: pointer;
}

#perfil-page .bd-post-comment-toggle{
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(181, 191, 211, 0.62);
  background: rgba(255,255,255,0.84);
  color: var(--color-title);
  font-weight: 700;
  cursor: pointer;
}

#perfil-page .bd-post-like.is-active{
  border-color: rgba(212,175,55,0.38);
  background: linear-gradient(135deg, rgba(255,248,231,0.98), rgba(248,239,209,0.94));
  color: #8a6a00;
}

#perfil-page .bd-post-comments{
  display: grid;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid rgba(188, 198, 216, 0.28);
}

#perfil-page .bd-post-comments__list{
  display: grid;
  gap: 10px;
}

#perfil-page .bd-post-comments__empty{
  color: var(--color-subtext);
  font-size: 0.94rem;
}

#perfil-page .bd-post-comment{
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(248,250,255,0.86);
  border: 1px solid rgba(188, 198, 216, 0.24);
}

#perfil-page .bd-post-comment__meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin-bottom: 6px;
}

#perfil-page .bd-post-comment__name{
  font-weight: 700;
  color: var(--color-title);
}

#perfil-page .bd-post-comment__time{
  color: var(--color-subtext);
  font-size: 0.88rem;
}

#perfil-page .bd-post-comment__text{
  color: var(--color-title);
  line-height: 1.6;
}

#perfil-page .bd-post-comments__composer{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
}

#perfil-page .bd-post-comment-preview{
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(188, 198, 216, 0.28);
  background: linear-gradient(180deg, rgba(255,255,255,0.84), rgba(246,248,252,0.78));
}

#perfil-page .bd-post-comment-preview.hidden{
  display: none;
}

#perfil-page .bd-post-comment-preview__label{
  color: var(--color-subtext);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

#perfil-page .bd-post-comment-preview__content{
  color: var(--color-title);
  line-height: 1.55;
  word-break: break-word;
}

#perfil-page .bd-post-comment-input{
  min-height: 52px;
  max-height: 120px;
  align-self: stretch;
  resize: vertical;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(181, 191, 211, 0.68);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,248,252,0.92));
  color: var(--color-title);
}

#perfil-page .bd-post-comment-input::placeholder{
  color: #7d8aa1;
}

#perfil-page .bd-post-comment-input:focus{
  outline: none;
  border-color: rgba(212, 175, 55, 0.72);
  box-shadow:
    0 0 0 4px rgba(212, 175, 55, 0.12),
    0 10px 24px rgba(27, 46, 94, 0.08);
  background: #fff;
}

#perfil-page .bd-post-comment-submit{
  min-height: 52px;
  padding: 0 18px;
  border-radius: 18px;
  border: none;
  background: linear-gradient(135deg, rgba(27,46,94,0.96), rgba(48,76,148,0.92));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  align-self: center;
}

#perfil-page .bd-post-link-btn{
  min-height: 44px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid rgba(181, 191, 211, 0.62);
  background: rgba(255,255,255,0.72);
  color: var(--color-subtext);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  align-self: center;
}

#perfil-page .bd-post-emoji-btn{
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  align-self: center;
  justify-self: start;
}

#perfil-page #viewChatBD{
  padding: 30px 34px 34px;
}

#perfil-page #viewChatBD .bd-chat{
  border-radius: 24px;
  border: 1px solid rgba(188, 198, 216, 0.34);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(246,248,252,0.88));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.78),
    0 12px 28px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

#perfil-page #viewChatBD .bd-chat__header{
  padding: 16px 18px;
  background: rgba(255,255,255,0.62);
}

#perfil-page #viewChatBD .bd-chat__messages{
  background: linear-gradient(180deg, rgba(250,251,255,0.98), rgba(244,247,252,0.94));
}

#perfil-page #viewChatBD .bd-chat__input{
  background: rgba(255,255,255,0.72);
}

#perfil-page #perfil-form{
  display:grid;
  grid-template-columns:
    minmax(128px, 170px) minmax(220px, 1fr)
    minmax(128px, 170px) minmax(220px, 1fr);
  gap: 18px 22px;
  align-items:center;
}

#perfil-page #perfil-form > label{
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--color-title);
  line-height: 1.35;
}

#perfil-page #perfil-form > label[for="avatar"],
#perfil-page #perfil-form > label[for="phone"],
#perfil-page #perfil-form > label[for="province"],
#perfil-page #perfil-form > label[for="location"],
#perfil-page #perfil-form > label[for="specialty"],
#perfil-page #perfil-form > label[for="cv"]{
  margin-top: 0;
}

#perfil-page #perfil-form > input,
#perfil-page #perfil-form > select,
#perfil-page #perfil-form > textarea{
  min-height: 58px;
  width: 100%;
  min-width: 0;
  margin-bottom: 0;
  padding: 0.98rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(181, 191, 211, 0.68);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,248,252,0.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78);
  font-size: 1.02rem;
}

#perfil-page #perfil-form > select{
  appearance: none;
  -webkit-appearance: none;
  padding-right: 3rem;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,248,252,0.92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231b2e5e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 1rem center;
  background-size: auto, 18px 18px;
  cursor: pointer;
}

#perfil-page #perfil-form > input::placeholder,
#perfil-page #perfil-form > textarea::placeholder{
  color: #7d8aa1;
}

#perfil-page #perfil-form > input:focus,
#perfil-page #perfil-form > select:focus,
#perfil-page #perfil-form > textarea:focus{
  border-color: rgba(212, 175, 55, 0.72);
  box-shadow:
    0 0 0 4px rgba(212, 175, 55, 0.12),
    0 10px 24px rgba(27, 46, 94, 0.08);
  background: #fff;
}

#perfil-page .profile-file-input{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#perfil-page .profile-avatar-section,
#perfil-page .profile-cv-section,
#perfil-page .perfil-consent-wrap,
#perfil-page #status,
#perfil-page #avís-canvis,
#perfil-page #perfil-form > button[type="submit"]{
  grid-column: 1 / -1;
}

#perfil-page .profile-avatar-section,
#perfil-page .profile-cv-section{
  margin-top: -2px !important;
  padding: 24px;
  border-radius: 24px;
  border: 1px dashed rgba(181, 191, 211, 0.72);
  background: linear-gradient(180deg, rgba(248, 249, 255, 0.96), rgba(244, 246, 252, 0.92));
  display: grid;
  gap: 18px;
}

#perfil-page .profile-avatar-section__header,
#perfil-page .profile-cv-section__header{
  display: grid;
  gap: 6px;
}

#perfil-page .profile-avatar-section__title,
#perfil-page .profile-cv-section__title{
  margin: 0;
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--color-title);
}

#perfil-page .profile-avatar-section__subtitle,
#perfil-page .profile-cv-section__subtitle{
  margin: 0;
  max-width: 680px;
  color: var(--color-subtext);
  line-height: 1.45;
}

#perfil-page .profile-avatar-preview-wrap{
  position: relative;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: rgba(255, 255, 255, 0.9);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#perfil-page .profile-avatar-section__actions,
#perfil-page .profile-cv-section__actions{
  display: grid;
  gap: 12px;
  justify-items: start;
}

#perfil-page .profile-ai-tools{
  width: 100%;
  display: grid;
  gap: 12px;
}

#perfil-page .profile-upload-progress{
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(212, 175, 55, 0.24);
  background:
    radial-gradient(circle at top left, rgba(255, 244, 214, 0.92), rgba(255,255,255,0) 42%),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(249,250,255,0.94));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.88),
    0 10px 24px rgba(27, 46, 94, 0.06);
}

#perfil-page .profile-upload-progress.hidden{
  display: none !important;
}

#perfil-page .profile-upload-progress__meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

#perfil-page .profile-upload-progress__label{
  color: var(--color-title);
  font-size: 0.92rem;
  font-weight: 700;
}

#perfil-page .profile-upload-progress__value{
  color: #9c7422;
  font-size: 0.9rem;
  font-weight: 800;
}

#perfil-page .profile-upload-progress__bar{
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.14);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

#perfil-page .profile-upload-progress__fill{
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d9b04b 0%, #f0cc72 45%, #c7952d 100%);
  box-shadow: 0 8px 18px rgba(212, 175, 55, 0.28);
  transition: width .18s ease;
}

#perfil-page .profile-ai-note{
  margin: 0;
  color: var(--color-subtext);
  line-height: 1.45;
}

#perfil-page .profile-ai-note--error{
  color: #a63c2d;
}

#perfil-page .profile-ai-toggle{
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(212,175,55,0.28);
  border-radius: 16px;
  background: rgba(212,175,55,0.12);
  color: #9c7422;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

#perfil-page .profile-ai-toggle:hover,
#perfil-page .profile-ai-toggle:focus-visible{
  background: linear-gradient(145deg, rgba(255,239,184,0.9), rgba(245,210,106,0.28));
  border-color: rgba(212,175,55,0.56);
  color: #8b6518;
  box-shadow: 0 14px 28px rgba(212,175,55,0.18);
  transform: translateY(-1px);
}

#perfil-page .profile-ai-toggle[aria-expanded="true"]{
  background: rgba(27, 46, 94, 0.08);
  border-color: rgba(27, 46, 94, 0.18);
  color: var(--color-title);
}

#perfil-page .profile-file-trigger{
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 12px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(27,46,94,0.96), rgba(48,76,148,0.92));
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(27, 46, 94, 0.16);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}

#perfil-page .profile-file-trigger:hover,
#perfil-page .profile-file-trigger:focus-visible{
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(30,56,122,0.98), rgba(72,108,204,0.94));
  box-shadow: 0 18px 30px rgba(27, 46, 94, 0.22);
}

#perfil-page .profile-file-trigger:focus-visible{
  outline: none;
}

#perfil-page .profile-file-trigger:active{
  transform: translateY(0);
  box-shadow: 0 10px 18px rgba(27, 46, 94, 0.16);
}

#perfil-page #avatarPreview{
  width: min(100%, 220px);
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border-radius: 28px !important;
  border: 2px solid rgba(212, 175, 55, 0.58);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

#perfil-page .profile-avatar-clear{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(27, 46, 94, 0.92);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

#perfil-page .profile-avatar-clear.is-visible{
  display: inline-flex;
}

#perfil-page .profile-file-info,
#perfil-page .profile-doc-info{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(245, 248, 255, 0.95);
  border: 1px solid rgba(189, 198, 214, 0.62);
  color: var(--color-subtext);
  font-size: 0.94rem;
  line-height: 1.45;
}

#perfil-page .profile-file-info[hidden],
#perfil-page .profile-doc-info[hidden]{
  display: none !important;
}

#perfil-page .profile-file-info span{
  min-width: 0;
  flex: 1;
}

#perfil-page .profile-doc-info__main{
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 8px;
}

#perfil-page .profile-doc-info__primary{
  color: var(--color-title);
  font-size: 0.94rem;
}

#perfil-page .profile-doc-info__link{
  border: 0;
  padding: 6px 10px;
  background: transparent;
  color: var(--color-title);
  font: inherit;
  font-size: 0.94rem;
  text-align: left;
  cursor: pointer;
  border-radius: 12px;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

#perfil-page .profile-doc-info__link:hover,
#perfil-page .profile-doc-info__link:focus-visible{
  color: #163f96;
  background: rgba(212,175,55,0.14);
  box-shadow: inset 0 0 0 1px rgba(212,175,55,0.22);
  transform: translateY(-1px);
}

#perfil-page .profile-doc-info__link:focus-visible{
  outline: none;
}

#perfil-page .profile-doc-info__primary a{
  color: var(--color-title);
  text-decoration: none;
}

#perfil-page .profile-doc-info__secondary{
  color: var(--color-subtext);
}

#perfil-page .profile-ai-suggestions{
  display: grid;
  gap: 12px;
  width: 100%;
}

#perfil-page .profile-ai-suggestion-card{
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(189, 198, 214, 0.62);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82);
}

#perfil-page .profile-ai-suggestion-card h4{
  margin: 0 0 8px;
  color: var(--color-title);
  font-size: 1rem;
}

#perfil-page .profile-ai-suggestion-card p{
  margin: 0;
  color: var(--color-subtext);
  line-height: 1.5;
}

#perfil-page .profile-ai-suggestion-card p + p{
  margin-top: 10px;
}

#perfil-page .profile-ai-suggestion-card__priority{
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(27, 46, 94, 0.08);
  color: var(--color-title);
}

#perfil-page .profile-ai-suggestion-card__priority[data-priority="high"]{
  background: rgba(191, 92, 55, 0.14);
  color: #9b3f22;
}

#perfil-page .profile-ai-suggestion-card__priority[data-priority="low"]{
  background: rgba(75, 127, 95, 0.14);
  color: #2d6a45;
}

#perfil-page .profile-file-clear{
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(27, 46, 94, 0.12);
  color: var(--color-title);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

#perfil-page .profile-file-clear.is-visible{
  display: inline-flex;
}

#perfil-page .bd-progress-card{
  width: min(100%, 760px);
  margin-inline: auto;
  margin-bottom: 26px;
  padding: 26px 26px 24px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,248,241,0.94));
  border: 1px solid rgba(212,175,55,0.22);
  box-shadow:
    0 16px 34px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.86);
}

#perfil-page .bd-progress-top{
  display:flex;
  justify-content:space-between;
  gap:22px;
  align-items:flex-start;
}

#perfil-page .bd-progress-title{
  max-width: 16ch;
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  line-height: 1.12;
  font-weight: 800;
  color: var(--color-title);
}

#perfil-page .bd-progress-subtitle{
  max-width: 42ch;
  margin-top: 10px;
  font-size: 1.02rem;
  color: var(--color-subtext);
  line-height: 1.62;
}

#perfil-page .bd-progress-pct{
  min-width: 114px;
  padding: 12px 18px;
  border-radius: 20px;
  text-align:center;
  background: rgba(212, 175, 55, 0.12);
  color: var(--color-title);
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.68);
}

#perfil-page .bd-progress-bar{
  margin-top: 22px;
  height: 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

#perfil-page .bd-progress-bar__fill{
  border-radius: inherit;
  background: linear-gradient(90deg, #d4af37, #e8cf7b);
}

#perfil-page .bd-progress-checklist{
  margin: 22px 0 0;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

#perfil-page .bd-progress-checklist li{
  display:flex;
  align-items:center;
  gap:10px;
  min-height: 56px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(189, 198, 214, 0.28);
  font-weight: 600;
  line-height: 1.4;
  overflow: visible;
}

#perfil-page .bd-dot{
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  display: inline-block;
}

#perfil-page .bd-progress-hint{
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(27, 46, 94, 0.06);
  color: var(--color-subtext);
  line-height: 1.6;
}

#perfil-page #consentRecomBox{
  margin-top: 6px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(183, 193, 212, 0.7);
  background: linear-gradient(180deg, rgba(250,251,255,0.96), rgba(243,246,252,0.92));
}

#perfil-page #consentRecomBox .consent-title{
  color: var(--color-title);
  font-size: 1rem;
}

#perfil-page #consentRecomBox .consent-help{
  color: var(--color-subtext);
  line-height: 1.5;
}

#perfil-page #perfil-form button[type="submit"]{
  min-height: 58px;
  width: min(240px, 100%);
  max-width: 100%;
  padding: 0 24px;
  border-radius: 18px;
  font-size: 1rem;
  font-weight: 800;
  justify-self: center;
  min-width: min(220px, 100%);
  box-shadow: 0 18px 30px rgba(27, 46, 94, 0.14);
}

#perfil-page #status{
  margin-top: 6px;
}

#perfil-page #avís-canvis{
  margin-top: 12px !important;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(212,175,55,0.12);
  border: 1px solid rgba(212,175,55,0.28);
}

#perfil-page .bd-unsaved-leave-modal{
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

#perfil-page .bd-unsaved-leave-modal.hidden{
  display: none;
}

#perfil-page .bd-unsaved-leave-modal__panel{
  width: min(92vw, 560px);
  max-width: 560px;
  padding: 28px 28px 24px;
  border-radius: 30px;
  border: 1px solid rgba(220, 228, 241, 0.92);
  background:
    radial-gradient(circle at top left, rgba(255,248,225,0.92), rgba(255,255,255,0) 38%),
    linear-gradient(145deg, rgba(255,255,255,0.98), rgba(246,249,255,0.96));
  box-shadow:
    0 28px 70px rgba(27,46,94,0.18),
    0 10px 28px rgba(15,23,42,0.10);
  backdrop-filter: blur(16px);
}

#perfil-page .bd-unsaved-leave-modal__badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(212,175,55,0.14);
  border: 1px solid rgba(212,175,55,0.24);
  color: #9a6b00;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

#perfil-page .bd-unsaved-leave-modal__badge::before{
  content: "✦";
  font-size: 0.8rem;
}

#perfil-page .bd-unsaved-leave-modal__text{
  margin: 10px 0 0;
  color: #5f6f8b;
  font-size: 1rem;
  line-height: 1.6;
}

#perfil-page .bd-unsaved-leave-modal__actions{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

#perfil-page .bd-unsaved-leave-modal__actions .btn{
  min-height: 52px;
  border-radius: 18px;
  padding-inline: 18px;
}

#perfil-page .bd-unsaved-leave-modal__ghost{
  color: #203b80;
  background: rgba(219,228,247,0.46);
  border: 1px solid rgba(181,191,211,0.4);
}

#perfil-page .bd-unsaved-leave-modal__ghost:hover,
#perfil-page .bd-unsaved-leave-modal__ghost:focus-visible{
  background: rgba(219,228,247,0.74);
}

#perfil-page .premium-label{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: min(100%, 560px);
  padding: 14px 20px;
  margin: 0 0 18px;
  border-radius: 22px;
  border: 1px solid rgba(233, 196, 92, 0.42);
  background:
    radial-gradient(circle at top left, rgba(255, 240, 191, 0.88), rgba(255,255,255,0) 32%),
    linear-gradient(145deg, rgba(255,251,238,0.98), rgba(255,247,223,0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.86),
    0 12px 30px rgba(191, 144, 32, 0.10);
  color: #2b344d;
}

#perfil-page .premium-label__top{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

#perfil-page .premium-label__title{
  color: #2c3858;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

#perfil-page .premium-label__divider{
  width: 18px;
  height: 1px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(201, 158, 46, 0.95), rgba(201, 158, 46, 0.35));
}

#perfil-page .premium-label__meta{
  display: inline-flex;
  align-items: center;
  color: #7a6940;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: nowrap;
}

@media (max-width: 720px){
  #perfil-page .premium-label{
    align-items: flex-start;
    padding-right: 58px;
  }

  #perfil-page .bd-notice-dismiss{
    position: absolute;
    top: 14px;
    right: 14px;
  }
}

#perfil-page .site-header{
  max-width: 1120px;
  margin: 0 auto 18px;
  padding-left: 24px !important;
  padding-right: 24px !important;
  position: relative;
  overflow: visible !important;
  isolation: isolate;
  z-index: 400;
  transition: padding-bottom .18s ease;
}

#perfil-page .site-header.has-avatar-ring-menu-open{
  padding-bottom: 300px !important;
  z-index: 520;
}

#perfil-page #btn-torna-inici.back-to-index--perfil{
  position: absolute;
  left: 24px;
  top: 22px;
  z-index: 3;
}

#perfil-page .theme-toggle{
  position: absolute;
  left: 50%;
  top: 30px;
  transform: translateX(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(188, 198, 216, 0.42);
  background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(248,250,255,0.94));
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.09),
    0 4px 12px rgba(27, 46, 94, 0.07);
  font-size: 1.42rem;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}

#perfil-page .theme-toggle:hover{
  transform: translateX(-50%) translateY(-1px);
  box-shadow:
    0 14px 26px rgba(15, 23, 42, 0.12),
    0 6px 14px rgba(212, 175, 55, 0.14);
  background: linear-gradient(145deg, rgba(255,255,255,1), rgba(251,246,231,0.98));
}

#perfil-page .user-avatar{
  right: 24px;
  top: 22px;
  z-index: 420;
}

#perfil-page .bd-main{
  position: relative;
  z-index: 1;
}

#perfil-page .user-avatar__progress-toggle{
  backdrop-filter: blur(16px);
}

#perfil-page #linkComunitat.new-badge-btn{
  position: absolute;
  right: 24px;
  bottom: 22px;
  left: auto;
  z-index: 3;
  max-width: calc(100% - 48px);
}

@media (max-width: 1024px){
  .perfil-layout{
    width: min(100% - 28px, 960px);
    grid-template-columns: 1fr;
    gap: 22px;
  }

  #perfil-page #viewPerfilBD.form-container{
    max-width: none;
    margin-top: 12px;
  }

  #perfil-page .bd-main{
    grid-column: 1;
    max-width: 980px;
  }

  .candidatures-container{
    max-width: none;
    padding: 28px 26px;
  }

  #perfil-page #espaiDocentSectionBD,
  #perfil-page #viewFormacionsBD,
  #perfil-page #viewNotificationsBD,
  #perfil-page #viewInboxBD,
  #perfil-page #viewChatBD{
    max-width: none;
    padding: 28px 26px;
  }

  #perfil-page #espaiDocentSectionBD .bd-space__grid{
    grid-template-columns: 1fr;
    gap: 18px;
  }

  #perfil-page #communityComposerCardBD{
    position: static;
    top: auto;
  }

  #perfil-page .bd-feed{
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  #perfil-page #espaiDocentSectionBD .bd-space__card--community,
  #perfil-page #espaiDocentSectionBD .bd-space__card--moments,
  #perfil-page #espaiDocentSectionBD .bd-space__card--discover,
  #perfil-page #espaiDocentSectionBD .bd-space__card--following,
  #perfil-page #espaiDocentSectionBD .bd-space__card--followers{
    grid-column: auto;
  }

  #perfil-page .bd-post-card__header{
    grid-template-columns: auto minmax(0, 1fr);
  }

  #perfil-page .bd-post-card__type{
    grid-column: 2;
    justify-self: start;
  }

  #perfil-page .bd-notification-toggle{
    align-items:flex-start;
  }

  #perfil-page #perfil-form{
    grid-template-columns: minmax(138px, 180px) minmax(0, 1fr);
    gap: 14px 18px;
  }
}

@media (max-width: 720px){
  html.bd-people-hub-modal-open,
  body.bd-people-hub-modal-open{
    overflow: hidden;
    height: 100dvh;
    overscroll-behavior: none;
  }

  #perfil-page .perfil-layout{
    width: min(100% - 18px, 100%);
    gap: 14px;
    padding-top: 122px;
  }

  #perfil-page .bd-main{
    width: 100%;
    max-width: none;
  }

  #perfil-page .bd-sidebar{
    padding: 10px 8px;
    border-radius: 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  #perfil-page .bd-sidebar::-webkit-scrollbar{
    display: none;
  }

  #perfil-page .bd-sidebar__title{
    padding-left: 6px;
    margin-bottom: 10px;
  }

  #perfil-page .bd-sidebar__link{
    min-width: max-content;
    white-space: nowrap;
    margin-bottom: 0;
  }

  #perfil-page .site-header{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    min-height: 106px;
    padding-top: 78px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    z-index: 80;
    background:
      linear-gradient(180deg, rgba(248,250,255,0.98) 0%, rgba(248,250,255,0.92) 72%, rgba(248,250,255,0.82) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  #perfil-page .site-header.has-avatar-ring-menu-open{
    padding-bottom: 236px !important;
  }

  #perfil-page .site-header::before{
    display: none;
  }

  #perfil-page #btn-torna-inici.back-to-index--perfil{
    display: none;
  }

  #perfil-page .theme-toggle{
    position: fixed;
    left: 50%;
    top: 14px;
    z-index: 81;
  }

  #perfil-page .user-avatar{
    position: fixed;
    right: 16px;
    top: 14px;
    z-index: 81;
    width: 116px;
  }

  #perfil-page .user-avatar__ring-toggle{
    left: calc(50% + 16px);
    top: 48px;
    width: 24px;
    height: 24px;
  }

  #perfil-page .user-avatar__ring-menu{
    right: -8px;
    min-width: 196px;
  }

  #perfil-page .user-avatar__image{
    width: 76px;
    height: 76px;
  }

  #perfil-page .user-avatar__progress-toggle{
    padding: 2px 0 0;
  }

  #perfil-page .user-avatar__progress-value{
    font-size: 0.86rem;
  }

  #perfil-page #mobileSidebarToggle{
    position: fixed;
    top: 64px;
    left: 16px;
    right: auto;
    z-index: 81;
  }

  #perfil-page .form-title{
    position: relative;
    z-index: 1;
    margin-top: 0;
    font-size: 2.2rem;
  }

  #perfil-page .form-underline{
    margin-top: 2px;
    margin-bottom: 0;
  }

  #perfil-page #linkComunitat.new-badge-btn{
    position: static;
    margin: 18px auto 0;
    max-width: 100%;
  }

  #perfil-page #viewPerfilBD.form-container{
    padding: 24px 20px;
    border-radius: 24px;
  }

  .candidatures-container{
    padding: 24px 20px;
    border-radius: 24px;
  }

  #perfil-page #viewCandidaturesBD{
    margin-top: 24px;
  }

  #perfil-page #viewCandidaturesBD .section-title{
    margin-bottom: 12px;
    font-size: 1.12rem;
    line-height: 1.35;
  }

  #perfil-page #candidatures-list{
    display: grid;
    gap: 14px;
  }

  #perfil-page #candidatures-list li{
    margin-bottom: 0;
    padding: 1.1rem 1rem;
    border-radius: 20px;
  }

  #perfil-page .candidatura-card__header{
    gap: 12px;
  }

  #perfil-page .candidatura-card__title-wrap{
    gap: 8px;
  }

  #perfil-page .candidatura-card__title{
    font-size: 1.02rem;
    line-height: 1.35;
  }

  #perfil-page .candidatura-card__meta{
    gap: 12px;
    margin-top: 0.9rem;
  }

  #perfil-page .candidatura-card__meta-item{
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
    min-width: 0;
    font-size: 0.98rem;
    line-height: 1.45;
  }

  #perfil-page .candidatura-card__meta-item--academic{
    gap: 10px;
  }

  #perfil-page .candidatura-card__meta-label{
    width: fit-content;
    max-width: 100%;
    white-space: normal;
    line-height: 1.2;
    padding: 0.38rem 0.72rem;
    font-size: 0.76rem;
  }

  #perfil-page .candidatura-card__academic-list{
    gap: 8px;
  }

  #perfil-page .candidatura-card__academic-summary{
    padding: 11px 12px 11px 32px;
  }

  #perfil-page .candidatura-card__academic-summary::before{
    left: 12px;
  }

  #perfil-page .candidatura-card__academic-title{
    font-size: 0.94rem;
    line-height: 1.35;
  }

  #perfil-page .candidatura-card__academic-subtitle,
  #perfil-page .candidatura-card__academic-meta{
    font-size: 0.92rem;
    line-height: 1.45;
  }

  #perfil-page .candidatura-card__meta-item--date{
    margin-top: 0;
    padding-top: 0.9rem;
  }

  #perfil-page #espaiDocentSectionBD,
  #perfil-page #viewFormacionsBD,
  #perfil-page #viewNotificationsBD,
  #perfil-page #viewInboxBD,
  #perfil-page #viewChatBD{
    padding: 24px 20px;
    border-radius: 24px;
  }

  #perfil-page #viewInboxBD{
    margin-top: 24px;
    height: auto;
    max-height: calc(100dvh - 160px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #perfil-page .bd-notifications-card{
    padding: 20px 18px;
    border-radius: 22px;
  }

  #perfil-page .bd-notification-toggle{
    display:grid;
    grid-template-columns: 1fr;
    gap:14px;
  }

  #perfil-page .bd-switch{
    justify-self:end;
  }

  #perfil-page .bd-notifications-meta__row{
    flex-direction:column;
  }

  #perfil-page .bd-notifications-meta__row strong{
    text-align:left;
  }

  #perfil-page #viewInboxBD #inboxListBD{
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100dvh - 320px);
    overflow-y: auto;
    padding-right: 4px;
  }

  #perfil-page #espaiDocentSectionBD .bd-following-list{
    max-height: none;
  }

  #perfil-page #espaiDocentSectionBD{
    gap: 20px;
    overflow-x: hidden;
  }

  #perfil-page #espaiDocentSectionBD .bd-space__header{
    flex-direction: column;
    align-items: stretch;
  }

  #perfil-page #espaiDocentSectionBD .bd-space__headerMain{
    gap: 6px;
  }

  #perfil-page #espaiDocentSectionBD .bd-pill{
    align-self: flex-start;
  }

  #perfil-page #espaiDocentSectionBD,
  #perfil-page #espaiDocentSectionBD .bd-space__grid,
  #perfil-page #espaiDocentSectionBD .bd-space__card,
  #perfil-page #espaiDocentSectionBD .bd-community-card,
  #perfil-page #espaiDocentSectionBD .bd-community-composer,
  #perfil-page #espaiDocentSectionBD .bd-post-card,
  #perfil-page #espaiDocentSectionBD .bd-post-card__header,
  #perfil-page #espaiDocentSectionBD .bd-post-card__body,
  #perfil-page #espaiDocentSectionBD .bd-following-item,
  #perfil-page #espaiDocentSectionBD .bd-following-info{
    min-width: 0;
  }

  #perfil-page #espaiDocentSectionBD .bd-space__card{
    max-width: none;
  }

  #perfil-page .bd-space__card--discover.is-panel-open{
    overflow: visible;
  }

  #perfil-page .bd-space__card--discover.is-panel-open .bd-people-scroll,
  #perfil-page .bd-space__card--discover.is-panel-open #peopleEmptyBD,
  #perfil-page .bd-space__card--discover.is-panel-open .bd-carousel-nav{
    opacity: 1;
    pointer-events: auto;
    padding-right: 0;
  }

  #perfil-page .bd-people-hub__backdrop{
    position: fixed;
    inset: 0;
    display: block;
    background: rgba(9, 16, 31, 0.48);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 10018;
    opacity: 1;
    transition: opacity .22s ease;
  }

  #perfil-page .bd-people-hub__backdrop.hidden{
    display: none;
  }

  #perfil-page .bd-people-hub__panel{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100dvh;
    max-height: 100dvh;
    width: 100vw;
    max-width: 100vw;
    margin-top: 0;
    padding: max(env(safe-area-inset-top, 0px), 12px) max(env(safe-area-inset-right, 0px), 16px) max(env(safe-area-inset-bottom, 0px), 14px) max(env(safe-area-inset-left, 0px), 16px);
    border-top: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
    z-index: 10019;
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
    overflow: hidden;
  }

  #perfil-page .bd-people-hub__panelHead{
    flex: 0 0 auto;
    margin-bottom: 0;
    padding: 2px 0 12px;
    border-bottom: 1px solid rgba(188, 198, 216, 0.22);
    background: inherit;
  }

  #perfil-page .bd-people-hub__stickyControls{
    flex: 0 0 auto;
    display: grid;
    gap: 10px;
    padding: 12px 0 10px;
    background: inherit;
    border-bottom: 1px solid rgba(188, 198, 216, 0.14);
  }

  #perfil-page .bd-people-hub__stickyControls.hidden{
    display: none;
  }

  #perfil-page #peopleHubFollowingControlsBD .bd-space__cardHead{
    margin-bottom: 0;
  }

  #perfil-page #peopleHubFollowingControlsBD .bd-discover-search--panel,
  #perfil-page #peopleHubFollowersControlsBD .bd-discover-search--panel{
    margin-bottom: 0;
  }

  #perfil-page #peopleHubFollowingControlsBD .bd-discover-search__input,
  #perfil-page #peopleHubFollowersControlsBD .bd-discover-search__input{
    -webkit-tap-highlight-color: transparent;
    font-size: 16px;
  }

  #perfil-page #peopleHubFollowingControlsBD .bd-discover-search__input:focus,
  #perfil-page #peopleHubFollowingControlsBD .bd-discover-search__input:focus-visible,
  #perfil-page #peopleHubFollowersControlsBD .bd-discover-search__input:focus,
  #perfil-page #peopleHubFollowersControlsBD .bd-discover-search__input:focus-visible{
    outline: none !important;
    border-color: rgba(188, 198, 216, 0.22) !important;
    box-shadow: none !important;
    transform: none !important;
  }

  #perfil-page #groupComposerBD .bd-group-composer__input:focus{
    outline: none;
    border-color: rgba(188, 198, 216, 0.22);
    box-shadow: none;
    transform: none;
  }

  #perfil-page #groupComposerBD .bd-group-composer__input{
    font-size: 16px;
  }

  #perfil-page #peopleHubFollowingControlsBD #groupComposerBD{
    margin-bottom: 0;
    max-height: min(48dvh, 420px);
    overflow: hidden;
  }

  #perfil-page #peopleHubPanelBD.is-group-composer-open #peopleHubFollowingControlsBD{
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
  }

  #perfil-page #peopleHubPanelBD.is-group-composer-open #peopleHubFollowingPanelBD{
    display: none !important;
  }

  #perfil-page #peopleHubPanelBD.is-group-composer-open #groupComposerBD{
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    height: 100%;
    margin-top: 12px;
  }

  #perfil-page #peopleHubFollowingPanelBD,
  #perfil-page #peopleHubFollowersPanelBD{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding-top: 0;
  }

  #perfil-page .bd-people-hub__panelBody{
    gap: 10px;
    padding-right: 0;
    padding-bottom: 0;
  }

  #perfil-page #followingListBD,
  #perfil-page #followersListBD{
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    margin-top: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
    padding-bottom: 12px;
    padding-top: 12px;
    align-content: start;
  }

  #perfil-page #groupComposerBD .bd-group-composer__body{
    min-height: 0;
    overflow: hidden;
  }

  #perfil-page #groupSelectedListBD{
    max-height: 88px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #perfil-page #groupResultsBD{
    display: grid;
    gap: 8px;
    min-height: 0;
    flex: 1 1 auto;
    max-height: min(26dvh, 240px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
  }

  #perfil-page #peopleHubPanelBD.is-group-composer-open #groupComposerBD .bd-group-composer__body{
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    flex: 1 1 auto;
    min-height: 0;
  }

  #perfil-page #peopleHubPanelBD.is-group-composer-open #groupResultsBD{
    max-height: none;
    height: 100%;
  }

  #perfil-page #peopleHubPanelBD.is-group-composer-open #groupComposerBD .bd-group-composer__actions{
    position: sticky;
    bottom: 0;
    margin-top: 0;
    padding-top: 12px;
  }

  #perfil-page #followingEmptyBD,
  #perfil-page #followersEmptyBD{
    flex: 0 0 auto;
    margin-top: 2px;
  }

  #perfil-page .bd-people-hub__close{
    flex: 0 0 auto;
  }

  #perfil-page #espaiDocentSectionBD .bd-space__community-strip{
    display: grid;
    grid-auto-flow: row;
    gap: 14px;
    overflow: visible;
    padding: 0;
    margin: 0;
    align-items: stretch;
  }

  #perfil-page #espaiDocentSectionBD .bd-space__community-strip > .bd-space__card{
    width: 100%;
    min-width: 0;
  }

  #perfil-page #communityComposerCardBD,
  #perfil-page #communityFeedCardBD{
    padding: 16px 14px;
    border-radius: 22px;
  }

  #perfil-page #communityComposerCardBD .bd-space__cardSub,
  #perfil-page #communityFeedCardBD .bd-space__cardSub{
    margin-bottom: 10px;
    font-size: 0.92rem;
    line-height: 1.45;
  }

  #perfil-page #communityComposerCardBD .bd-community-composer{
    gap: 12px;
    padding: 14px;
    border-radius: 20px;
  }

  #perfil-page #communityComposerCardBD .bd-community-composer__title{
    font-size: 1rem;
  }

  #perfil-page #communityComposerCardBD .bd-community-types,
  #perfil-page #communityFeedCardBD .bd-community-tabs{
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  #perfil-page #communityComposerCardBD .bd-community-types::-webkit-scrollbar,
  #perfil-page #communityFeedCardBD .bd-community-tabs::-webkit-scrollbar{
    display: none;
  }

  #perfil-page #communityComposerCardBD .bd-community-type,
  #perfil-page #communityFeedCardBD .bd-community-tab{
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.84rem;
  }

  #perfil-page #communityComposerCardBD .bd-community-types{
    display: none;
  }

  #perfil-page #communityComposerCardBD .bd-community-typeSelectWrap{
    display: block;
  }

  #perfil-page #communityComposerCardBD .bd-community-typeSelect,
  #perfil-page #communityComposerCardBD .bd-community-typeCustomInput{
    min-height: 42px;
    font-size: 16px;
    border-radius: 16px;
  }

  #perfil-page #communityComposerCardBD .bd-community-textarea{
    min-height: 108px;
    padding: 14px 15px 16px;
    border-radius: 18px;
    line-height: 1.55;
  }

  #perfil-page #communityComposerCardBD .bd-community-composer__footer{
    display: grid;
    gap: 10px;
  }

  #perfil-page #communityComposerCardBD .bd-community-composer__actions{
    justify-content: space-between;
  }

  #perfil-page #communityFeedCardBD .bd-community-intro{
    margin-top: 4px;
    display: block;
  }

  #perfil-page #communityFeedCardBD .bd-community-tabs{
    display: none;
  }

  #perfil-page #communityFeedCardBD .bd-community-feed__nav{
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }

  #perfil-page #communityFeedCardBD .bd-community-feed__nav.hidden{
    display: none;
  }

  #perfil-page #communityFeedCardBD .bd-feed{
    margin-top: 12px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(88%, 88%);
    gap: 12px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #perfil-page #communityFeedCardBD .bd-feed::-webkit-scrollbar{
    display: none;
  }

  #perfil-page #communityFeedCardBD .bd-feed > *{
    scroll-snap-align: start;
    min-width: 0;
  }

  #perfil-page #espaiDocentSectionBD .bd-space__card--discover{
    padding: 20px 16px;
  }

  #perfil-page #espaiDocentSectionBD .bd-space__cardHead--people{
    gap: 14px;
  }

  #perfil-page #espaiDocentSectionBD .bd-space__cardHead--people > div:first-child{
    min-width: 0;
  }

  #perfil-page #espaiDocentSectionBD .bd-space__cardHead--people .bd-space__cardSub{
    margin-bottom: 0;
  }

  #perfil-page .bd-people-hub__actions{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #perfil-page .bd-people-hub__tab{
    width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    padding: 0 12px;
    font-size: 0.92rem;
    text-align: center;
  }

  #perfil-page #espaiDocentSectionBD .bd-discover-search{
    margin: 14px 0 14px;
  }

  #perfil-page #espaiDocentSectionBD .bd-discover-search__input{
    min-height: 46px;
    font-size: 0.94rem;
    padding: 0 16px;
  }

  #perfil-page #espaiDocentSectionBD .bd-people-showcase{
    display: block;
  }

  #perfil-page #espaiDocentSectionBD .bd-people-fixed{
    display: none;
  }

  #perfil-page #espaiDocentSectionBD .bd-people-fixed .bd-user-card{
    max-width: none;
    min-width: 0;
    width: 100%;
  }

  #perfil-page #espaiDocentSectionBD .bd-user-card--own{
    padding: 14px 12px;
    border-radius: 22px;
    text-align: center;
    align-items: center;
  }

  #perfil-page #espaiDocentSectionBD .bd-user-card--own .bd-user-avatarStack{
    width: 80px;
    min-height: 90px;
    margin-bottom: 8px;
  }

  #perfil-page #espaiDocentSectionBD .bd-user-card--own .bd-user-avatarButton{
    width: 80px;
    height: 80px;
  }

  #perfil-page #espaiDocentSectionBD .bd-user-card--own .bd-user-avatar{
    width: 80px;
    min-width: 80px;
    height: 80px;
    min-height: 80px;
    max-width: 80px;
    max-height: 80px;
    margin-bottom: 0;
    flex: 0 0 80px;
  }

  #perfil-page #espaiDocentSectionBD .bd-user-card--own .bd-user-moment-add{
    top: auto;
    right: -16px;
    bottom: 2px;
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
  }

  #perfil-page #espaiDocentSectionBD .bd-user-card--own .bd-user-moment-hint{
    margin-bottom: 6px;
    font-size: 0.7rem;
    text-align: center;
  }

  #perfil-page #espaiDocentSectionBD .bd-user-card--own .bd-user-name{
    font-size: 1.05rem;
    margin-bottom: 3px;
    text-align: center;
  }

  #perfil-page #espaiDocentSectionBD .bd-user-card--own .bd-user-role{
    font-size: 0.92rem;
    margin-bottom: 12px;
    text-align: center;
  }

  #perfil-page #espaiDocentSectionBD .bd-user-card--own .bd-user-actions{
    width: 100%;
  }

  #perfil-page #espaiDocentSectionBD .bd-user-card--own .bd-user-actions .primary{
    padding: 7px 10px;
    font-size: 0.95rem;
  }

  #perfil-page #espaiDocentSectionBD .bd-people-carousel{
    width: 100%;
  }

  #perfil-page .bd-space__cardHead,
  #perfil-page .bd-moments-banner{
    flex-direction: column;
    align-items: stretch;
  }

  #perfil-page .bd-moments-badge{
    align-self: flex-start;
  }

  #perfil-page .bd-moment-item{
    flex-basis: 96px;
    width: 96px;
  }

  #perfil-page .bd-moment-visual{
    width: 82px;
    height: 82px;
  }

  #perfil-page .bd-moment-add{
    top: 56px;
    right: 6px;
  }

  #perfil-page .bd-moment-live{
    right: 5px;
    bottom: 8px;
  }

  #perfil-page .bd-moments-viewer{
    padding: 14px;
  }

  #perfil-page .bd-moments-viewer__dialog{
    padding: 14px;
    border-radius: 22px;
  }

  #perfil-page .bd-moments-viewer__nav{
    width: 38px;
    height: 38px;
  }

  #perfil-page .bd-moments-viewer__nav--prev{
    left: 8px;
  }

  #perfil-page .bd-moments-viewer__nav--next{
    right: 8px;
  }

  #perfil-page .bd-moments-viewer__meta{
    padding: 0 40px;
  }

  #perfil-page #espaiDocentSectionBD .bd-space__cardTitle,
  #perfil-page #espaiDocentSectionBD .bd-space__cardSub,
  #perfil-page #espaiDocentSectionBD .bd-community-composer__title,
  #perfil-page #espaiDocentSectionBD .bd-community-composer__hint,
  #perfil-page #espaiDocentSectionBD .bd-community-intro,
  #perfil-page #espaiDocentSectionBD .bd-post-card__body{
    overflow-wrap: anywhere;
  }

  #perfil-page #espaiDocentSectionBD .bd-people-scroll{
    max-width: 100%;
    margin: 0;
    padding-inline: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  #perfil-page #espaiDocentSectionBD .bd-carousel-nav{
    display: none;
  }

  #perfil-page #espaiDocentSectionBD .bd-people-grid{
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(84%, 84%);
    gap: 12px;
    padding: 4px 2px 8px;
  }

  #perfil-page #espaiDocentSectionBD .bd-people-grid > .bd-user-card{
    min-width: 0;
    width: 100%;
    scroll-snap-align: start;
  }

  #perfil-page #espaiDocentSectionBD .bd-people-grid > .bd-user-card.is-left,
  #perfil-page #espaiDocentSectionBD .bd-people-grid > .bd-user-card.is-right{
    opacity: 1;
    transform: none;
    filter: none;
  }

  #perfil-page .bd-people-hub__panel{
    margin-top: 0;
    padding: max(env(safe-area-inset-top, 0px), 12px) max(env(safe-area-inset-right, 0px), 16px) max(env(safe-area-inset-bottom, 0px), 14px) max(env(safe-area-inset-left, 0px), 16px);
    border-top: 0;
    border-radius: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,249,254,0.96));
  }

  #perfil-page .bd-people-hub__panelHead{
    margin-bottom: 0;
  }

  #perfil-page .bd-people-hub__panelBody{
    gap: 10px;
    padding-right: 0;
  }

  #perfil-page .bd-space__cardHead .bd-group-create-btn{
    width: 100%;
  }

  #perfil-page #followingListBD,
  #perfil-page #followersListBD{
    display: grid;
    gap: 10px;
    margin-top: 0;
  }

  #perfil-page #followingListBD .bd-following-item,
  #perfil-page #followersListBD .bd-following-item{
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 38px;
    column-gap: 10px;
    padding: 12px;
    border-radius: 16px;
    align-items: start;
  }

  #perfil-page #followingListBD .bd-following-item > div,
  #perfil-page #followersListBD .bd-following-item > div{
    min-width: 0;
    display: grid;
    gap: 4px;
  }

  #perfil-page #followingListBD .bd-following-avatar,
  #perfil-page #followersListBD .bd-following-avatar{
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
  }

  #perfil-page #followingListBD .bd-following-name,
  #perfil-page #followersListBD .bd-following-name,
  #perfil-page #followingListBD .bd-following-name-btn,
  #perfil-page #followersListBD .bd-following-name-btn{
    font-size: 0.96rem;
    line-height: 1.25;
    display: block;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #perfil-page #followingListBD .bd-following-role,
  #perfil-page #followersListBD .bd-following-role{
    font-size: 0.84rem;
    line-height: 1.35;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #perfil-page #followingListBD .bd-msg-btn,
  #perfil-page #followersListBD .bd-msg-btn{
    width: 38px;
    height: 38px;
    min-width: 38px;
    margin-left: 0;
    justify-self: end;
    align-self: start;
  }

  #perfil-page .bd-community-composer{
    padding: 18px;
  }

  #perfil-page .bd-community-types,
  #perfil-page .bd-community-tabs{
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  #perfil-page .bd-community-types::-webkit-scrollbar,
  #perfil-page .bd-community-tabs::-webkit-scrollbar{
    display: none;
  }

  #perfil-page .bd-community-type,
  #perfil-page .bd-community-tab{
    flex: 0 0 auto;
    white-space: nowrap;
  }

  #perfil-page #espaiDocentSectionBD .bd-community-composer__footer{
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  #perfil-page #espaiDocentSectionBD .bd-community-composer__actions{
    width: auto;
    justify-content: space-between;
  }

  #perfil-page .bd-post-comments__composer{
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }

  #perfil-page .bd-community-composer__tools{
    width: auto;
    flex: 0 0 auto;
  }

  #perfil-page .bd-post-comment-input,
  #perfil-page .bd-post-comment-preview{
    grid-column: 1 / -1;
  }

  #perfil-page .bd-post-emoji-btn{
    width: 40px;
    min-width: 40px;
    padding: 0;
    justify-self: start;
  }

  #perfil-page .bd-post-link-btn,
  #perfil-page .bd-post-comment-submit{
    width: auto;
    min-width: 0;
  }

  #perfil-page .bd-community-emoji-btn,
  #perfil-page .bd-community-link-btn{
    width: auto;
  }

  #perfil-page .bd-community-emoji-btn{
    width: 40px;
    min-width: 40px;
    padding: 0;
  }

  #perfil-page .bd-progress-card{
    padding: 22px 18px 20px;
    border-radius: 24px;
  }

  #perfil-page #perfil-form{
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
  }

  #perfil-page #perfil-form > label{
    margin-bottom: -4px;
  }

  #perfil-page #perfil-form > input[type="file"]::file-selector-button{
    margin-right: 10px;
    padding: 9px 12px;
    font-size: 0.88rem;
  }

  #perfil-page .bd-progress-top{
    flex-direction: column;
    align-items: stretch;
  }

  #perfil-page .bd-progress-pct{
    min-width: 0;
    align-self: flex-start;
  }

  #perfil-page #perfil-form > button[type="submit"]{
    width: 100%;
    justify-self: stretch;
    min-width: 0;
  }

  #perfil-page .bd-community-composer__footer,
  #perfil-page .bd-post-card__footer{
    flex-direction: column;
    align-items: stretch;
  }

  #perfil-page .bd-community-composer__actions{
    justify-content: space-between;
  }

  #perfil-page #espaiDocentSectionBD .bd-community-composer__footer{
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  #perfil-page #espaiDocentSectionBD .bd-community-composer__tools{
    width: auto;
    flex: 0 0 auto;
  }

  #perfil-page #espaiDocentSectionBD .bd-community-composer__actions{
    width: auto;
    flex: 0 0 auto;
    align-items: center;
  }

  #perfil-page #espaiDocentSectionBD .bd-community-emoji-btn{
    width: 40px;
    min-width: 40px;
    padding: 0;
  }

  #perfil-page #espaiDocentSectionBD .bd-community-link-btn{
    width: auto;
  }

  #perfil-page .bd-post-comments__composer{
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }

  #perfil-page .bd-post-comment-input,
  #perfil-page .bd-post-comment-preview{
    grid-column: 1 / -1;
  }

  #perfil-page .bd-post-emoji-btn{
    width: 40px;
    min-width: 40px;
    padding: 0;
    justify-self: start;
  }

  #perfil-page .bd-post-link-btn,
  #perfil-page .bd-post-comment-submit{
    width: auto;
    min-width: 0;
  }

  #perfil-page #viewChatBD .bd-chat{
    min-height: auto;
  }

  #perfil-page #viewChatBD .bd-chat__header{
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  #perfil-page #viewChatBD .bd-chat__messages{
    min-height: 280px;
    max-height: 52vh;
  }

  #perfil-page #viewChatBD .bd-chat__input{
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  #perfil-page #viewChatBD .bd-chat__emoji-btn{
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    flex: 0 0 44px;
    font-size: 1.05rem;
  }

  #perfil-page #viewChatBD .bd-chat__link-btn{
    grid-row: 1;
    grid-column: 2;
    width: 100%;
    min-width: 0;
    padding: 0 14px;
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #perfil-page #viewChatBD .bd-chat__input input{
    grid-row: 2;
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    min-height: 56px;
    padding: 0 18px;
    font-size: 1rem;
    margin-top: 2px;
  }

  #perfil-page #viewChatBD #chatSendBtn{
    grid-row: 1;
    grid-column: 3;
    width: auto;
    min-width: 88px;
    min-height: 50px;
    padding-inline: 16px;
    justify-self: end;
  }

  #perfil-page #viewChatBD #chatLinkPanel{
    left: 0;
    right: 0;
    width: auto;
    bottom: 116px;
  }

  #perfil-page #viewChatBD .bd-chat__emoji-picker{
    position: fixed;
    left: 50%;
    right: auto;
    bottom: max(88px, env(safe-area-inset-bottom, 0px) + 16px);
    width: min(360px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: min(52vh, 420px);
    transform: translateX(-50%);
    transform-origin: bottom center;
    z-index: 10040;
    overflow: hidden;
  }

  #perfil-page #viewChatBD .bd-chat__emoji-picker.is-hidden{
    transform: translateX(-50%) translateY(8px) scale(.98);
  }

  #perfil-page #viewChatBD .bd-chat__emoji-picker.is-open{
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@media (max-width: 520px){
  #perfil-page .perfil-layout{
    width: min(100% - 12px, 100%);
    gap: 12px;
  }

  #perfil-page .site-header{
    min-height: 118px;
    padding-top: 82px !important;
  }

  #perfil-page .site-header.has-avatar-ring-menu-open{
    padding-bottom: 214px !important;
  }

  #perfil-page #viewChatBD .bd-chat__input{
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
  }

  #perfil-page #viewChatBD .bd-chat__emoji-btn{
    width: 42px;
    height: 42px;
    min-width: 42px;
    flex-basis: 42px;
  }

  #perfil-page #viewChatBD .bd-chat__link-btn{
    grid-row: 1;
    grid-column: 2;
    width: 42px;
    min-width: 0;
    min-height: 42px;
    padding: 0;
    font-size: 1rem;
  }

  #perfil-page #viewChatBD .bd-chat__input input{
    grid-row: 2;
    min-height: 54px;
    padding: 0 14px;
    font-size: 0.98rem;
  }

  #perfil-page #viewChatBD #chatSendBtn{
    grid-row: 1;
    grid-column: 3;
    width: auto;
    min-width: 84px;
    min-height: 48px;
    padding-inline: 14px;
    justify-self: end;
  }

  #perfil-page #viewChatBD .bd-chat__emoji-picker{
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    bottom: max(82px, env(safe-area-inset-bottom, 0px) + 12px);
  }

  #perfil-page .bd-sidebar{
    padding: 8px 6px;
    border-radius: 16px;
  }

  #perfil-page .bd-sidebar__link{
    padding: 9px 11px;
    font-size: 0.95rem;
    border-radius: 12px;
  }

  #perfil-page #btn-torna-inici.back-to-index--perfil{
    display: none;
  }

  #perfil-page #mobileSidebarToggle{
    top: 58px;
    left: 12px;
    right: auto;
    width: 42px;
    height: 42px;
  }

  #perfil-page .user-avatar{
    right: 12px;
    top: 12px;
    width: 104px;
  }

  #perfil-page .user-avatar__ring-toggle{
    left: calc(50% + 14px);
    top: 44px;
    width: 22px;
    height: 22px;
    font-size: 0.82rem;
  }

  #perfil-page .user-avatar__ring-menu{
    right: -10px;
    min-width: 180px;
    padding: 8px;
  }

  #perfil-page .user-avatar__image{
    width: 70px;
    height: 70px;
  }

  #perfil-page .user-avatar__progress-toggle{
    padding: 4px 0 0;
  }

  #perfil-page .user-avatar__progress-value{
    font-size: 0.76rem;
  }

  #perfil-page .theme-toggle{
    top: 12px;
    left: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.28rem;
  }

  #perfil-page .form-title{
    font-size: 1.95rem;
  }

  [data-theme="dark"] #perfil-page .site-header{
    background:
      linear-gradient(180deg, rgba(10,15,28,0.96) 0%, rgba(10,15,28,0.90) 72%, rgba(10,15,28,0.82) 100%);
  }

  #perfil-page .bd-progress-title{
    max-width: none;
    font-size: 1.22rem;
  }

  #perfil-page .bd-progress-subtitle{
    max-width: none;
    font-size: 0.98rem;
  }

  #perfil-page .bd-progress-checklist{
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #perfil-page .bd-progress-checklist li{
    min-height: 0;
  }

  #perfil-page .bd-progress-hint{
    padding: 14px 15px;
  }

  #perfil-page #viewPerfilBD.form-container,
  #perfil-page .candidatures-container,
  #perfil-page #espaiDocentSectionBD,
  #perfil-page #viewInboxBD,
  #perfil-page #viewChatBD,
  #perfil-page #viewAccountBD{
    padding: 18px 14px;
    border-radius: 20px;
  }

  #perfil-page #viewInboxBD{
    max-height: calc(100dvh - 138px);
  }

  #perfil-page #viewInboxBD #inboxListBD{
    max-height: calc(100dvh - 286px);
    padding-right: 2px;
  }

  #perfil-page .docent-account-grid{
    grid-template-columns: 1fr;
  }

  #perfil-page .docent-account-card__head,
  #perfil-page .docent-account-card__row{
    flex-direction: column;
    align-items: flex-start;
  }

  #perfil-page .docent-account-card__price,
  #perfil-page .docent-account-card__row strong{
    text-align: left;
  }

  #perfil-page #candidatures-list li{
    padding: 0.95rem 1rem;
    font-size: 0.96rem;
  }

  #perfil-page .candidatura-card__title{
    font-size: 0.98rem;
  }

  #perfil-page .candidatura-card__meta{
    gap: 7px;
  }

  #perfil-page .candidatura-card__meta-item{
    gap: 6px;
    font-size: 0.93rem;
  }

  #perfil-page .candidatura-card__meta-item--date{
    margin-top: 0.1rem;
    padding-top: 0.72rem;
  }

  #perfil-page #viewInboxBD .bd-following-item{
    padding: 12px 12px;
    border-radius: 14px;
  }

  #perfil-page #viewInboxBD{
    overflow-x: hidden;
  }

  #perfil-page #viewInboxBD #inboxListBD{
    overflow-x: hidden;
  }

  #perfil-page #viewInboxBD .bd-following-item{
    align-items: flex-start;
  }

  #perfil-page #viewInboxBD .bd-following-head{
    align-items: flex-start;
  }

  #perfil-page #viewInboxBD .bd-following-role{
    font-size: 0.96rem;
    line-height: 1.45;
  }

  #perfil-page #espaiDocentSectionBD .bd-space__card{
    padding: 16px 14px;
    border-radius: 18px;
  }

  #perfil-page .bd-community-composer{
    padding: 14px;
  }

  #perfil-page .bd-community-textarea{
    min-height: 132px;
  }

  #perfil-page #espaiDocentSectionBD .bd-community-type,
  #perfil-page #espaiDocentSectionBD .bd-community-tab{
    font-size: 0.9rem;
    padding-inline: 12px;
  }

  #perfil-page #viewChatBD .bd-chat__messages{
    max-height: 48vh;
    padding: 12px;
  }

  #perfil-page #viewChatBD .bd-chat-msg{
    max-width: 92%;
  }
}

[data-theme="dark"] #perfil-page{
  background:
    radial-gradient(circle at top left, rgba(212, 175, 55, 0.10), transparent 26%),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.10), transparent 30%),
    linear-gradient(180deg, #09111f 0%, #0b1220 100%);
}

[data-theme="dark"] #perfil-page #viewPerfilBD.form-container{
  border-color: rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(15,23,42,0.96), rgba(11,18,32,0.94));
  box-shadow:
    0 30px 60px rgba(0,0,0,0.42),
    0 10px 24px rgba(0,0,0,0.24);
}

[data-theme="dark"] #perfil-page #viewPerfilBD.form-container::before{
  background: linear-gradient(90deg, rgba(212,175,55,0.85), rgba(96,165,250,0.25), transparent);
}

[data-theme="dark"] #perfil-page #espaiDocentSectionBD,
[data-theme="dark"] #perfil-page #viewFormacionsBD,
[data-theme="dark"] #perfil-page #viewNotificationsBD,
[data-theme="dark"] #perfil-page #viewInboxBD,
[data-theme="dark"] #perfil-page #viewChatBD,
[data-theme="dark"] #perfil-page #viewAccountBD{
  border-color: rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(15,23,42,0.96), rgba(11,18,32,0.94));
  box-shadow:
    0 30px 60px rgba(0,0,0,0.42),
    0 10px 24px rgba(0,0,0,0.24);
}

[data-theme="dark"] #perfil-page .bd-main-loader__card{
  border-color: rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(15,23,42,0.96), rgba(11,18,32,0.94));
  box-shadow:
    0 30px 60px rgba(0,0,0,0.42),
    0 10px 24px rgba(0,0,0,0.24);
}

[data-theme="dark"] #perfil-page .bd-main-loader__text{
  color: #dbe7ff;
}

[data-theme="dark"] #perfil-page #espaiDocentSectionBD::before,
[data-theme="dark"] #perfil-page #viewFormacionsBD::before,
[data-theme="dark"] #perfil-page #viewNotificationsBD::before,
[data-theme="dark"] #perfil-page #viewInboxBD::before,
[data-theme="dark"] #perfil-page #viewChatBD::before,
[data-theme="dark"] #perfil-page #viewAccountBD::before{
  background: linear-gradient(90deg, rgba(212,175,55,0.85), rgba(96,165,250,0.25), transparent);
}

[data-theme="dark"] #perfil-page #espaiDocentSectionBD .bd-space__card,
[data-theme="dark"] #perfil-page #viewFormacionsBD .bd-formacions__card,
[data-theme="dark"] #perfil-page #viewInboxBD .bd-following-item,
[data-theme="dark"] #perfil-page #viewChatBD .bd-chat{
  background: linear-gradient(180deg, rgba(17,24,39,0.96), rgba(15,23,42,0.94));
  border-color: rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 12px 24px rgba(0,0,0,0.18);
}

[data-theme="dark"] #perfil-page .bd-formacions__counter{
  border-color: rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(15,23,42,0.96), rgba(11,18,32,0.94));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 12px 24px rgba(0,0,0,0.18);
}

[data-theme="dark"] #perfil-page .bd-formacions__counter strong{
  color: #f0c96b;
}

[data-theme="dark"] #perfil-page .bd-formacions__filter{
  border-color: rgba(255,255,255,0.08);
  background: rgba(17,24,39,0.88);
  color: #dbe7ff;
}

[data-theme="dark"] #perfil-page .bd-formacions__filter:hover{
  background: rgba(22,28,42,0.96);
}

[data-theme="dark"] #perfil-page .bd-formacions__filter.is-active{
  color: #f0c96b;
}

[data-theme="dark"] #perfil-page .bd-formacions__context,
[data-theme="dark"] #perfil-page .bd-formacions__lead,
[data-theme="dark"] #perfil-page .bd-formacions__description,
[data-theme="dark"] #perfil-page .bd-formacions__title{
  color: #dbe7ff;
}

[data-theme="dark"] #perfil-page .bd-formacions__eyebrow{
  background: rgba(96, 165, 250, 0.12);
  color: #dbe7ff;
}

[data-theme="dark"] #perfil-page .bd-formacions__duration{
  background: rgba(212,175,55,0.10);
  border-color: rgba(212,175,55,0.20);
  color: #f0c96b;
}

[data-theme="dark"] #perfil-page .bd-formacions__tag{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  color: #dbe7ff;
}

[data-theme="dark"] #perfil-page .bd-notifications-lead,
[data-theme="dark"] #perfil-page .bd-account-lead,
[data-theme="dark"] #perfil-page .bd-notifications-card__text,
[data-theme="dark"] #perfil-page .bd-notification-toggle__copy span,
[data-theme="dark"] #perfil-page .bd-notifications-meta__row span,
[data-theme="dark"] #perfil-page .docent-account-card__desc,
[data-theme="dark"] #perfil-page .docent-account-card__row span:first-child,
[data-theme="dark"] #perfil-page .docent-account-card__list{
  color: #9fb0c7;
}

[data-theme="dark"] #perfil-page #viewNotificationsBD .bd-notifications-loading{
  color: #dbe7ff;
  border-color: rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(15,23,42,0.76), rgba(17,24,39,0.72));
}

[data-theme="dark"] #perfil-page .bd-notifications-card,
[data-theme="dark"] #perfil-page .docent-account-card{
  background: linear-gradient(180deg, rgba(17,24,39,0.96), rgba(15,23,42,0.94));
  border-color: rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 12px 24px rgba(0,0,0,0.18);
}

[data-theme="dark"] #perfil-page .bd-notifications-card--meta{
  background: linear-gradient(180deg, rgba(48,38,11,0.42), rgba(15,23,42,0.96));
  border-color: rgba(212,175,55,0.24);
}

[data-theme="dark"] #perfil-page .bd-notification-toggle,
[data-theme="dark"] #perfil-page .bd-notifications-meta__row{
  background: linear-gradient(180deg, rgba(17,24,39,0.96), rgba(15,23,42,0.94));
  border-color: rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 12px 24px rgba(0,0,0,0.18);
}

[data-theme="dark"] #perfil-page .bd-notification-toggle__copy strong,
[data-theme="dark"] #perfil-page .bd-notifications-meta__row strong,
[data-theme="dark"] #perfil-page .bd-notifications-card__title{
  color: #eef4ff;
}

[data-theme="dark"] #perfil-page .bd-switch__slider{
  background: rgba(71, 85, 105, 0.92);
}

[data-theme="dark"] #perfil-page .bd-notifications-status{
  color: #9fb0c7;
}

[data-theme="dark"] #perfil-page .bd-notifications-status.is-success{
  color: #7dd3a7;
}

[data-theme="dark"] #perfil-page .bd-notifications-status.is-error{
  color: #fca5a5;
}

[data-theme="dark"] #perfil-page .docent-account-card.is-active{
  border-color: rgba(212,175,55,0.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 14px 28px rgba(0,0,0,0.24);
}

[data-theme="dark"] #perfil-page .docent-account-card--featured{
  background: linear-gradient(180deg, rgba(39,31,11,0.52), rgba(17,24,39,0.96));
}

[data-theme="dark"] #perfil-page .docent-account-card__eyebrow{
  background: rgba(255,255,255,0.08);
  color: #cbd5e1;
}

[data-theme="dark"] #perfil-page .docent-account-card__eyebrow.is-gold{
  background: rgba(212,175,55,0.16);
  color: #f5d36a;
}

[data-theme="dark"] #perfil-page .docent-account-card__title,
[data-theme="dark"] #perfil-page .docent-account-card__price,
[data-theme="dark"] #perfil-page .docent-account-card__row strong{
  color: #f8fafc;
}

[data-theme="dark"] #perfil-page .docent-account-card__price small{
  color: #9fb0c7;
}

[data-theme="dark"] #perfil-page .docent-account-card__row{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] #perfil-page #viewChatBD .bd-chat__header,
[data-theme="dark"] #perfil-page #viewChatBD .bd-chat__input{
  background: rgba(2,6,23,0.34);
}

[data-theme="dark"] #perfil-page .bd-community-composer,
[data-theme="dark"] #perfil-page .bd-post-card{
  background: linear-gradient(180deg, rgba(17,24,39,0.96), rgba(15,23,42,0.94));
  border-color: rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 12px 24px rgba(0,0,0,0.18);
}

[data-theme="dark"] #perfil-page .bd-community-composer__title,
[data-theme="dark"] #perfil-page .bd-post-card__name,
[data-theme="dark"] #perfil-page .bd-post-card__body{
  color: #f8fafc;
}

[data-theme="dark"] #perfil-page #espaiDocentSectionBD .bd-space__back-btn{
  border-color: rgba(255,255,255,0.10);
  background: rgba(15,23,42,0.74);
  color: #e5e7eb;
}

[data-theme="dark"] #perfil-page .bd-community-composer__hint,
[data-theme="dark"] #perfil-page .bd-community-composer__meta,
[data-theme="dark"] #perfil-page .bd-community-intro,
[data-theme="dark"] #perfil-page .bd-post-card__time,
[data-theme="dark"] #perfil-page .bd-post-card__subline,
[data-theme="dark"] #perfil-page .bd-post-card__likes{
  color: #9fb0c7;
}

[data-theme="dark"] #perfil-page .bd-community-type,
[data-theme="dark"] #perfil-page .bd-community-tab,
[data-theme="dark"] #perfil-page .bd-community-link-btn,
[data-theme="dark"] #perfil-page .bd-post-like,
[data-theme="dark"] #perfil-page .bd-post-comment-toggle,
[data-theme="dark"] #perfil-page .bd-post-link-btn{
  border-color: rgba(255,255,255,0.10);
  background: rgba(15,23,42,0.74);
  color: #e5e7eb;
}

[data-theme="dark"] #perfil-page .bd-community-link-panel{
  background: linear-gradient(180deg, rgba(17,24,39,0.96), rgba(15,23,42,0.94));
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] #perfil-page .bd-community-link-panel__field span{
  color: #9fb0c7;
}

[data-theme="dark"] #perfil-page .bd-community-link-panel__field input{
  border-color: rgba(255,255,255,0.10);
  background: rgba(15,23,42,0.82);
  color: #f8fafc;
}

[data-theme="dark"] #perfil-page .bd-community-type.is-active,
[data-theme="dark"] #perfil-page .bd-community-tab.is-active,
[data-theme="dark"] #perfil-page .bd-post-like.is-active{
  border-color: rgba(212,175,55,0.34);
  background: linear-gradient(135deg, rgba(67,56,17,0.54), rgba(17,24,39,0.94));
  color: #f5d36a;
}

[data-theme="dark"] #perfil-page #communityPublishBtnBD{
  border-color: rgba(212,175,55,0.42);
  background: linear-gradient(135deg, #f2d27a, #c89d34);
  color: #1f2937;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.32),
    0 10px 20px rgba(0,0,0,0.22);
}

[data-theme="dark"] #perfil-page #communityPublishBtnBD:hover{
  border-color: rgba(240,198,92,0.58);
  background: linear-gradient(135deg, #f6dd93, #d6ab44);
  color: #111827;
}

[data-theme="dark"] #perfil-page #communityPublishBtnBD:disabled{
  border-color: rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.08);
  color: rgba(229,231,235,0.46);
  box-shadow: none;
}

[data-theme="dark"] #perfil-page .bd-post-comments{
  border-top-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] #perfil-page .bd-post-comment{
  background: rgba(15,23,42,0.78);
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] #perfil-page .bd-post-comments__empty,
[data-theme="dark"] #perfil-page .bd-post-comment__time{
  color: #9fb0c7;
}

[data-theme="dark"] #perfil-page .bd-post-comment__name,
[data-theme="dark"] #perfil-page .bd-post-comment__text{
  color: #f8fafc;
}

[data-theme="dark"] #perfil-page .bd-community-textarea{
  border-color: rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(9,17,31,0.96), rgba(15,23,42,0.94));
  color: #e5e7eb;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

[data-theme="dark"] #perfil-page .bd-community-textarea::placeholder{
  color: #93a4bc;
}

[data-theme="dark"] #perfil-page .bd-community-textarea:focus{
  background: #0f172a;
  border-color: rgba(212,175,55,0.65);
  box-shadow:
    0 0 0 4px rgba(212,175,55,0.10),
    0 14px 28px rgba(0,0,0,0.26);
}

[data-theme="dark"] #perfil-page .bd-post-comment-input{
  border-color: rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(9,17,31,0.96), rgba(15,23,42,0.94));
  color: #e5e7eb;
}

[data-theme="dark"] #perfil-page .bd-post-comment-input::placeholder{
  color: #93a4bc;
}

[data-theme="dark"] #perfil-page .bd-post-comment-input:focus{
  background: #0f172a;
  border-color: rgba(212,175,55,0.65);
  box-shadow:
    0 0 0 4px rgba(212,175,55,0.10),
    0 14px 28px rgba(0,0,0,0.26);
}

[data-theme="dark"] #perfil-page .bd-inbox-search input{
  border-color: rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(9,17,31,0.96), rgba(15,23,42,0.94));
  color: #e5e7eb;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

[data-theme="dark"] #perfil-page .bd-space__card--weekly-quiz {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 211, 92, 0.12), transparent 22%),
    radial-gradient(circle at 88% 10%, rgba(76, 48, 182, 0.18), transparent 26%),
    radial-gradient(circle at 86% 82%, rgba(31, 197, 184, 0.10), transparent 20%),
    linear-gradient(135deg, rgba(39, 68, 190, 0.05), rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, rgba(9, 17, 31, 0.98), rgba(15, 23, 42, 0.98) 62%, rgba(17, 24, 39, 0.98));
  border-color: rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 24px 48px rgba(0,0,0,0.28);
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__header > div:first-child::before {
  background:
    radial-gradient(circle at 28% 30%, rgba(255,255,255,0.12) 0 10%, transparent 11%),
    radial-gradient(circle at 72% 70%, rgba(255,219,112,0.34) 0 9%, transparent 10%),
    linear-gradient(145deg, rgba(79, 70, 229, 0.18), rgba(14, 165, 233, 0.16));
  border-color: rgba(255,255,255,0.06);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 18px 34px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] #perfil-page .bd-space__card--weekly-quiz .bd-space__cardTitle,
[data-theme="dark"] #perfil-page .bd-weekly-quiz__statusTitle,
[data-theme="dark"] #perfil-page .bd-weekly-quiz__week strong,
[data-theme="dark"] #perfil-page .bd-weekly-quiz__prizeTitle,
[data-theme="dark"] #perfil-page .bd-weekly-quiz__lock h3,
[data-theme="dark"] #perfil-page .bd-weekly-quiz__user strong,
[data-theme="dark"] #perfil-page .bd-weekly-quiz__score {
  color: #f8fafc;
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__header p,
[data-theme="dark"] #perfil-page .bd-weekly-quiz__prizeText,
[data-theme="dark"] #perfil-page .bd-weekly-quiz__week span,
[data-theme="dark"] #perfil-page .bd-weekly-quiz__week em,
[data-theme="dark"] #perfil-page .bd-weekly-quiz__statusText,
[data-theme="dark"] #perfil-page .bd-weekly-quiz__lock p,
[data-theme="dark"] #perfil-page .bd-weekly-quiz__user span,
[data-theme="dark"] #perfil-page .bd-weekly-quiz__legalBody,
[data-theme="dark"] #perfil-page .bd-weekly-quiz__resultGrid span {
  color: #94a3b8;
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__prize {
  background:
    radial-gradient(circle at top right, rgba(255, 219, 112, 0.14), transparent 28%),
    linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.96) 55%, rgba(9, 17, 31, 0.98));
  border-color: rgba(240, 201, 107, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 18px 34px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__prizeEyebrow {
  background: rgba(240, 201, 107, 0.14);
  color: #f0c96b;
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__prizeImage {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(240, 201, 107, 0.2);
  box-shadow:
    0 18px 32px rgba(0,0,0,0.26),
    0 8px 18px rgba(240, 201, 107, 0.12);
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__week {
  background: linear-gradient(180deg, rgba(17,24,39,0.96), rgba(15,23,42,0.94));
  border-color: rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 10px 22px rgba(0,0,0,0.18);
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__week.is-active {
  border-color: rgba(240, 201, 107, 0.5);
  background:
    linear-gradient(180deg, rgba(31, 41, 55, 0.98), rgba(51, 41, 18, 0.86)),
    rgba(15,23,42,0.96);
  box-shadow:
    0 18px 30px rgba(240, 201, 107, 0.12),
    0 10px 22px rgba(0,0,0,0.2);
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__week.is-done em {
  color: #4ade80;
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__status {
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(51, 41, 18, 0.28)),
    rgba(15,23,42,0.94);
  border-color: rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 16px 30px rgba(0,0,0,0.18);
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__results {
  background:
    linear-gradient(135deg, rgba(21, 128, 61, 0.14), rgba(37, 99, 235, 0.08)),
    rgba(15,23,42,0.92);
  border-color: rgba(74, 222, 128, 0.18);
  box-shadow: 0 16px 30px rgba(0,0,0,0.18);
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__lock {
  background:
    radial-gradient(circle at top right, rgba(255, 196, 74, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(17,24,39,0.96), rgba(15,23,42,0.96));
  border-color: rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 18px 36px rgba(0,0,0,0.22);
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__resultPill {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(59, 130, 246, 0.14));
  color: #86efac;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__leaderboard {
  background: linear-gradient(180deg, rgba(17,24,39,0.96), rgba(15,23,42,0.94));
  border-color: rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 16px 28px rgba(0,0,0,0.18);
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__ranking--full {
  scrollbar-color: rgba(240, 201, 107, 0.55) rgba(15, 23, 42, 0.3);
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__row {
  background: linear-gradient(180deg, rgba(15,23,42,0.98), rgba(17,24,39,0.94));
  border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__row.is-current {
  background: linear-gradient(90deg, rgba(240, 201, 107, 0.16), rgba(56, 189, 248, 0.08));
  border-color: rgba(240, 201, 107, 0.32);
  box-shadow: 0 12px 24px rgba(240, 201, 107, 0.10);
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__rank {
  background: linear-gradient(135deg, rgba(51, 41, 18, 0.96), rgba(91, 60, 8, 0.92));
  color: #f8d477;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__user img {
  border-color: rgba(240, 201, 107, 0.3);
  box-shadow: 0 8px 18px rgba(0,0,0,0.22);
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__legal {
  border-top-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__legalLink {
  color: #9fb0c7;
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__legalLink:hover {
  color: #f8fafc;
}

[data-theme="dark"] #perfil-page .bd-weekly-quiz__legalModal {
  background: linear-gradient(180deg, rgba(17,24,39,0.98), rgba(15,23,42,0.96));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 24px 48px rgba(0,0,0,0.32);
}

[data-theme="dark"] #perfil-page .bd-inbox-search{
  border-color: rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(15,23,42,0.76), rgba(17,24,39,0.72));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.03),
    0 12px 24px rgba(0,0,0,0.18);
}

[data-theme="dark"] #perfil-page .bd-inbox-search::before{
  border-color: rgba(212,175,55,0.52);
}

[data-theme="dark"] #perfil-page .bd-inbox-search::after{
  background: rgba(212,175,55,0.52);
}

[data-theme="dark"] #perfil-page .bd-inbox-search input::placeholder{
  color: #93a4bc;
}

[data-theme="dark"] #perfil-page .bd-inbox-search input:focus{
  background: #0f172a;
  border-color: rgba(212,175,55,0.65);
  box-shadow:
    0 0 0 4px rgba(212,175,55,0.10),
    0 14px 28px rgba(0,0,0,0.26);
}

[data-theme="dark"] #perfil-page #viewInboxBD .bd-following-item:hover{
  border-color: rgba(212,175,55,0.34);
  background: linear-gradient(180deg, rgba(39,31,11,0.58), rgba(17,24,39,0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 14px 28px rgba(0,0,0,0.22);
}

[data-theme="dark"] #perfil-page #espaiDocentSectionBD #followingListBD .bd-following-item,
[data-theme="dark"] #perfil-page #espaiDocentSectionBD #followersListBD .bd-following-item{
  border-color: rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(17,24,39,0.96), rgba(15,23,42,0.94));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 12px 24px rgba(0,0,0,0.18);
}

[data-theme="dark"] #perfil-page #espaiDocentSectionBD #followingListBD .bd-following-item:hover,
[data-theme="dark"] #perfil-page #espaiDocentSectionBD #followersListBD .bd-following-item:hover{
  border-color: rgba(212,175,55,0.34);
  background: linear-gradient(180deg, rgba(39,31,11,0.58), rgba(17,24,39,0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 14px 28px rgba(0,0,0,0.24);
}

[data-theme="dark"] #perfil-page #espaiDocentSectionBD #followingListBD .bd-following-name,
[data-theme="dark"] #perfil-page #espaiDocentSectionBD #followersListBD .bd-following-name,
[data-theme="dark"] #perfil-page #espaiDocentSectionBD #followingListBD .bd-following-name-btn,
[data-theme="dark"] #perfil-page #espaiDocentSectionBD #followersListBD .bd-following-name-btn{
  color: #f8fafc;
}

[data-theme="dark"] #perfil-page #espaiDocentSectionBD #followingListBD .bd-following-role,
[data-theme="dark"] #perfil-page #espaiDocentSectionBD #followersListBD .bd-following-role,
[data-theme="dark"] #perfil-page #espaiDocentSectionBD #followingListBD .bd-following-time,
[data-theme="dark"] #perfil-page #espaiDocentSectionBD #followersListBD .bd-following-time,
[data-theme="dark"] #perfil-page #followingListBD .bd-empty,
[data-theme="dark"] #perfil-page #followersListBD .bd-empty{
  color: #9fb0c7;
}

[data-theme="dark"] #perfil-page .bd-modal__panel{
  background: linear-gradient(180deg, rgba(17,24,39,0.98), rgba(11,18,32,0.98));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 24px 60px rgba(0,0,0,0.42);
}

#perfil-page .bd-avatar-photo-modal{
  z-index: 10020;
}

#perfil-page .bd-avatar-photo-modal__panel{
  display: grid;
  gap: 14px;
  max-width: 420px;
  width: min(92vw, 420px);
  padding: 18px;
  border-radius: 24px;
}

#perfil-page .bd-avatar-photo-modal__frame{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  min-height: 0;
  max-height: min(56vh, 380px);
  border-radius: 22px;
  border: 1px solid rgba(214, 227, 255, 0.92);
  background:
    radial-gradient(circle at 12% 12%, rgba(244, 198, 79, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(248, 250, 255, 0.98), rgba(236, 242, 255, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.82),
    0 24px 50px rgba(27, 54, 110, 0.14);
}

#perfil-page .bd-avatar-photo-modal__image{
  display: block;
  width: 100%;
  height: 100%;
  max-height: min(56vh, 380px);
  object-fit: contain;
  object-position: center;
}

#perfil-page .bd-avatar-photo-modal__delete{
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff4f4, #ffe8e8);
  color: #dc2626;
  text-shadow: 0 1px 0 rgba(255,255,255,0.55);
  font-size: 20px;
  box-shadow: 0 12px 20px rgba(239, 47, 47, 0.14);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

#perfil-page .bd-avatar-photo-modal__delete::after{
  content: "Esborrar foto";
  position: absolute;
  top: 50%;
  right: calc(100% + 12px);
  transform: translateY(-50%) translateX(6px);
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.94);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.22);
  transition: opacity .16s ease, transform .16s ease;
}

#perfil-page .bd-avatar-photo-modal__delete:hover:not(:disabled){
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 18px 28px rgba(239, 47, 47, 0.22);
  background: linear-gradient(180deg, #ef4444, #dc2626);
  color: #fff7f7;
  text-shadow: 0 1px 0 rgba(127, 29, 29, 0.28);
}

#perfil-page .bd-avatar-photo-modal__delete:hover:not(:disabled)::after,
#perfil-page .bd-avatar-photo-modal__delete:focus-visible::after{
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

#perfil-page .bd-avatar-photo-modal__delete:disabled{
  opacity: .55;
  cursor: wait;
}

#perfil-page .bd-cv-modal__panel{
  max-width: min(92vw, 880px);
  width: min(92vw, 880px);
}

#perfil-page .bd-cv-modal__topActions{
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  gap: 10px;
}

#perfil-page .bd-cv-modal__topActions .bd-avatar-photo-modal__delete{
  position: static;
}

#perfil-page .bd-cv-modal__download{
  position: static;
  width: auto;
  min-width: 152px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  border-color: rgba(59, 130, 246, 0.24);
  background: linear-gradient(180deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
  box-shadow: 0 12px 20px rgba(37, 99, 235, 0.14);
}

#perfil-page .bd-cv-modal__download::after{
  content: none;
}

#perfil-page .bd-cv-modal__downloadIcon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
}

#perfil-page .bd-cv-modal__downloadLabel{
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
}

#perfil-page .bd-cv-modal__download:hover:not(.is-disabled){
  transform: translateY(-1px);
  box-shadow: 0 18px 28px rgba(37, 99, 235, 0.22);
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: #eff6ff;
  text-shadow: 0 1px 0 rgba(30, 64, 175, 0.3);
}

#perfil-page .bd-cv-modal__download:focus-visible{
  transform: translateY(-1px);
  box-shadow: 0 18px 28px rgba(37, 99, 235, 0.22);
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: #eff6ff;
  text-shadow: 0 1px 0 rgba(30, 64, 175, 0.3);
}

#perfil-page .bd-cv-modal__download.is-disabled{
  opacity: .42;
  pointer-events: none;
  border-color: rgba(189, 198, 214, 0.44);
  background: linear-gradient(180deg, rgba(244, 247, 252, 0.92), rgba(234, 239, 248, 0.92));
  color: #93a4bc;
  text-shadow: none;
  box-shadow: none;
  filter: saturate(.65);
}

#perfil-page .bd-cv-modal__panel button.bd-avatar-photo-modal__delete::after{
  content: "Esborrar CV";
}

#perfil-page .bd-cv-modal__frame{
  aspect-ratio: auto;
  min-height: min(72vh, 820px);
  max-height: min(72vh, 820px);
  padding: 12px;
}

#perfil-page .bd-cv-modal__viewer{
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 16px;
  background: #fff;
}

#perfil-page .bd-cv-modal__empty{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 240px;
  padding: 28px;
  border-radius: 18px;
  color: var(--color-subtext);
  font-weight: 600;
  text-align: center;
  background: rgba(255,255,255,0.72);
}

#perfil-page .bd-avatar-photo-modal__actions{
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 0;
}

#perfil-page .bd-avatar-photo-modal__actions .btn{
  flex: 1 1 0;
  min-height: 56px;
  border-radius: 18px;
  font-size: 0.98rem;
}

#perfil-page .bd-avatar-photo-modal__actions .btn--primary{
  background: linear-gradient(180deg, #2b4da3, #1f3f8f);
  color: #fff;
  border: 1px solid rgba(28, 55, 125, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 18px 28px rgba(31, 63, 143, 0.28);
}

#perfil-page .bd-avatar-photo-modal__actions .btn--primary:hover{
  transform: translateY(-1px);
  background: linear-gradient(180deg, #3158bb, #23479f);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 22px 32px rgba(31, 63, 143, 0.34);
}

#perfil-page .bd-avatar-photo-modal__actions .btn--soft{
  background: linear-gradient(180deg, #fffaf0, #f6eed2);
  color: #b38716;
  border: 1px solid rgba(212, 175, 55, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.72),
    0 10px 18px rgba(212, 175, 55, 0.08);
}

#perfil-page .bd-avatar-photo-modal__actions .btn--soft:hover{
  background: linear-gradient(180deg, #fff8e6, #f2e6bc);
  color: #9d7410;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 12px 20px rgba(212, 175, 55, 0.10);
}

#perfil-page .toast{
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10040;
  background: #111827;
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
  transition: all .3s ease;
}

#perfil-page .toast[hidden]{
  display:none !important;
}

#perfil-page .toast.toast-success{
  background: #15803d;
  color: #f0fdf4;
}

#perfil-page .toast.show{
  opacity: 1;
  transform: translate(-50%, -5px);
}

[data-theme="dark"] #perfil-page .bd-avatar-photo-modal__frame{
  border-color: rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at 12% 12%, rgba(240, 201, 107, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(17,24,39,0.98), rgba(11,18,32,0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 24px 50px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] #perfil-page .bd-avatar-photo-modal__delete{
  border-color: rgba(248, 113, 113, 0.22);
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.62), rgba(153, 27, 27, 0.72));
  color: #ffe4e4;
  text-shadow: none;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] #perfil-page .bd-cv-modal__download{
  border-color: rgba(96, 165, 250, 0.28);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(30, 64, 175, 0.62));
  color: #bfdbfe;
  text-shadow: none;
}

[data-theme="dark"] #perfil-page .bd-cv-modal__download.is-disabled{
  border-color: rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.76));
  color: #6f819d;
  box-shadow: none;
  filter: saturate(.55);
}

[data-theme="dark"] #perfil-page .bd-cv-modal__frame{
  border-color: rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at 12% 12%, rgba(96, 165, 250, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(17,24,39,0.98), rgba(11,18,32,0.96));
}

[data-theme="dark"] #perfil-page .bd-cv-modal__viewer{
  background: rgba(15,23,42,0.96);
}

[data-theme="dark"] #perfil-page .bd-cv-modal__empty{
  background: rgba(15,23,42,0.74);
  color: #cbd5e1;
}

[data-theme="dark"] #perfil-page .bd-avatar-photo-modal__actions .btn--primary{
  background: linear-gradient(180deg, #3158bb, #1f3f8f);
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.14);
}

[data-theme="dark"] #perfil-page .bd-avatar-photo-modal__actions .btn--soft{
  background: linear-gradient(180deg, rgba(51, 41, 18, 0.58), rgba(39, 31, 11, 0.66));
  color: #eac86e;
  border-color: rgba(212, 175, 55, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

[data-theme="dark"] #perfil-page .toast{
  background: rgba(15, 23, 42, 0.98);
}

[data-theme="dark"] #perfil-page .toast.toast-success{
  background: #166534;
}

[data-theme="dark"] #perfil-page .bd-modal__badge{
  background: rgba(212,175,55,0.16);
  color: #f5d36a;
}

[data-theme="dark"] #perfil-page .bd-modal__title,
[data-theme="dark"] #perfil-page .bd-feedback-modal__question,
[data-theme="dark"] #perfil-page .bd-feedback-modal__label,
[data-theme="dark"] #perfil-page .bd-feedback-rating__value{
  color: #f8fafc;
}

[data-theme="dark"] #perfil-page .bd-modal__text,
[data-theme="dark"] #perfil-page .bd-modal__legal,
[data-theme="dark"] #perfil-page .bd-feedback-modal__intro,
[data-theme="dark"] #perfil-page .bd-feedback-modal__count,
[data-theme="dark"] #perfil-page .bd-feedback-rating__hint{
  color: #9fb0c7;
}

[data-theme="dark"] #perfil-page .bd-choice{
  border-color: rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(15,23,42,0.84), rgba(17,24,39,0.88));
  color: #e5e7eb;
}

[data-theme="dark"] #perfil-page .bd-choice__title{
  color: #f8fafc;
}

[data-theme="dark"] #perfil-page .bd-choice__desc{
  color: #9fb0c7;
}

[data-theme="dark"] #perfil-page .bd-feedback-rating__btn{
  border-color: rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(15,23,42,0.84), rgba(17,24,39,0.88));
  color: #e5e7eb;
}

[data-theme="dark"] #perfil-page .bd-feedback-rating__btn:hover{
  border-color: rgba(212,175,55,0.34);
  box-shadow: 0 12px 24px rgba(0,0,0,0.24);
}

[data-theme="dark"] #perfil-page .bd-feedback-rating__btn.is-selected{
  background: linear-gradient(135deg, rgba(67,56,17,0.58), rgba(17,24,39,0.96));
  border-color: rgba(212,175,55,0.42);
  box-shadow: 0 14px 28px rgba(0,0,0,0.26);
}

[data-theme="dark"] #perfil-page .bd-feedback-modal__textarea{
  border-color: rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(9,17,31,0.96), rgba(15,23,42,0.94));
  color: #f8fafc;
}

[data-theme="dark"] #perfil-page .bd-feedback-modal__textarea::placeholder{
  color: #93a4bc;
}

[data-theme="dark"] #perfil-page .bd-feedback-modal__textarea:focus{
  background: #0f172a;
  border-color: rgba(212,175,55,0.65);
  box-shadow:
    0 0 0 4px rgba(212,175,55,0.10),
    0 14px 28px rgba(0,0,0,0.26);
}

[data-theme="dark"] #perfil-page .bd-feedback-modal__status{
  color: #f5d36a;
}

[data-theme="dark"] #perfil-page .bd-feedback-modal__status.is-error{
  color: #fca5a5;
}

[data-theme="dark"] #perfil-page .bd-feedback-modal__status.is-success{
  color: #7dd3a7;
}

[data-theme="dark"] #perfil-page #viewInboxBD .bd-empty{
  color: #9fb0c7;
}

[data-theme="dark"] #perfil-page .bd-community-typeSelect,
[data-theme="dark"] #perfil-page .bd-community-typeCustomInput{
  border-color: rgba(255,255,255,0.12);
  background: linear-gradient(180deg, rgba(9,17,31,0.96), rgba(15,23,42,0.94));
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

[data-theme="dark"] #perfil-page .bd-community-typeSelect{
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #f8fafc 50%),
    linear-gradient(135deg, #f8fafc 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 14px) calc(50% - 3px);
  background-size: 8px 8px, 8px 8px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

[data-theme="dark"] #perfil-page .bd-community-typeSelect option{
  background: #0f172a;
  color: #f8fafc;
}

[data-theme="dark"] #perfil-page .bd-community-typeSelect:focus,
[data-theme="dark"] #perfil-page .bd-community-typeCustomInput:focus{
  background-color: #0f172a;
  border-color: rgba(212,175,55,0.65);
  box-shadow:
    0 0 0 4px rgba(212,175,55,0.10),
    0 14px 28px rgba(0,0,0,0.26);
}

[data-theme="dark"] #perfil-page .bd-community-typeCustomInput::placeholder{
  color: #93a4bc;
}

[data-theme="dark"] #perfil-page #viewChatBD .bd-chat__messages{
  background: linear-gradient(180deg, rgba(8,15,28,0.98), rgba(11,18,32,0.98));
}

[data-theme="dark"] #perfil-page #viewChatBD .bd-chat__empty{
  color: #94a3b8;
}

[data-theme="dark"] #perfil-page #viewChatBD .bd-chat__empty--loading{
  color: #e5e7eb;
}

[data-theme="dark"] #perfil-page #perfil-form > input,
[data-theme="dark"] #perfil-page #perfil-form > select,
[data-theme="dark"] #perfil-page #perfil-form > textarea{
  border-color: rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(9,17,31,0.96), rgba(15,23,42,0.94));
  color: #e5e7eb;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

[data-theme="dark"] #perfil-page #perfil-form > select{
  background-image:
    linear-gradient(180deg, rgba(9,17,31,0.96), rgba(15,23,42,0.94)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23e5e7eb' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

[data-theme="dark"] #perfil-page #perfil-form > input::placeholder,
[data-theme="dark"] #perfil-page #perfil-form > textarea::placeholder{
  color: #93a4bc;
}

[data-theme="dark"] #perfil-page #perfil-form > input:focus,
[data-theme="dark"] #perfil-page #perfil-form > select:focus,
[data-theme="dark"] #perfil-page #perfil-form > textarea:focus{
  background: #0f172a;
  border-color: rgba(212,175,55,0.65);
  box-shadow:
    0 0 0 4px rgba(212,175,55,0.10),
    0 14px 28px rgba(0,0,0,0.26);
}

[data-theme="dark"] #perfil-page #perfil-form > div[style*="margin-top:8px;"],
[data-theme="dark"] #perfil-page #cv-info{
  background: rgba(15,23,42,0.82);
  border-color: rgba(255,255,255,0.08);
  color: #94a3b8;
}

[data-theme="dark"] #perfil-page .profile-avatar-section,
[data-theme="dark"] #perfil-page .profile-cv-section{
  border-color: rgba(148,163,184,0.18);
  background: linear-gradient(180deg, rgba(17,24,39,0.96), rgba(15,23,42,0.94));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 14px 28px rgba(0,0,0,0.18);
}

[data-theme="dark"] #perfil-page .profile-avatar-section__title,
[data-theme="dark"] #perfil-page .profile-cv-section__title,
[data-theme="dark"] #perfil-page .profile-doc-info__primary,
[data-theme="dark"] #perfil-page .profile-doc-info__primary a,
[data-theme="dark"] #perfil-page .profile-ai-suggestion-card h4{
  color: #f8fafc;
}

[data-theme="dark"] #perfil-page .profile-file-trigger:hover,
[data-theme="dark"] #perfil-page .profile-file-trigger:focus-visible{
  background: linear-gradient(135deg, rgba(49,88,187,0.98), rgba(84,124,231,0.94));
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.34);
}

[data-theme="dark"] #perfil-page .profile-doc-info__link:hover,
[data-theme="dark"] #perfil-page .profile-doc-info__link:focus-visible{
  color: #f8fafc;
  background: rgba(245,211,106,0.12);
  box-shadow: inset 0 0 0 1px rgba(245,211,106,0.24);
}

[data-theme="dark"] #perfil-page .profile-avatar-section__subtitle,
[data-theme="dark"] #perfil-page .profile-cv-section__subtitle,
[data-theme="dark"] #perfil-page .profile-file-info,
[data-theme="dark"] #perfil-page .profile-doc-info,
[data-theme="dark"] #perfil-page .profile-doc-info__secondary,
[data-theme="dark"] #perfil-page .profile-ai-note,
[data-theme="dark"] #perfil-page .profile-ai-suggestion-card p{
  color: #9fb0c7;
}

[data-theme="dark"] #perfil-page .profile-avatar-preview-wrap{
  border-color: rgba(212,175,55,0.24);
  background: linear-gradient(180deg, rgba(9,17,31,0.92), rgba(15,23,42,0.88));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

[data-theme="dark"] #perfil-page .profile-file-info,
[data-theme="dark"] #perfil-page .profile-doc-info,
[data-theme="dark"] #perfil-page .profile-ai-suggestion-card{
  background: rgba(15,23,42,0.82);
  border-color: rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

[data-theme="dark"] #perfil-page .profile-upload-progress{
  border-color: rgba(245, 211, 106, 0.18);
  background:
    radial-gradient(circle at top left, rgba(245,211,106,0.12), rgba(15,23,42,0) 42%),
    linear-gradient(180deg, rgba(15,23,42,0.96), rgba(17,24,39,0.94));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 10px 24px rgba(0,0,0,0.18);
}

[data-theme="dark"] #perfil-page .profile-upload-progress__label{
  color: #f8fafc;
}

[data-theme="dark"] #perfil-page .profile-upload-progress__value{
  color: #f5d36a;
}

[data-theme="dark"] #perfil-page .profile-upload-progress__bar{
  background: rgba(245, 211, 106, 0.12);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.26);
}

[data-theme="dark"] #perfil-page .profile-ai-toggle{
  background: rgba(212,175,55,0.14);
  border-color: rgba(212,175,55,0.24);
  color: #f5d36a;
}

[data-theme="dark"] #perfil-page .profile-ai-toggle:hover,
[data-theme="dark"] #perfil-page .profile-ai-toggle:focus-visible{
  background: linear-gradient(145deg, rgba(245,211,106,0.18), rgba(245,211,106,0.08));
  border-color: rgba(245,211,106,0.44);
  color: #ffe08a;
  box-shadow: 0 14px 28px rgba(212,175,55,0.16);
}

[data-theme="dark"] #perfil-page .profile-ai-toggle[aria-expanded="true"]{
  background: rgba(30,41,59,0.92);
  border-color: rgba(148,163,184,0.18);
  color: #e5e7eb;
}

[data-theme="dark"] #perfil-page .profile-file-clear{
  background: rgba(255,255,255,0.08);
  color: #e5e7eb;
}

[data-theme="dark"] #perfil-page .profile-avatar-clear{
  background: rgba(15,23,42,0.92);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
}

[data-theme="dark"] #perfil-page .profile-ai-suggestion-card__priority{
  background: rgba(96,165,250,0.14);
  color: #dbeafe;
}

[data-theme="dark"] #perfil-page .profile-ai-suggestion-card__priority[data-priority="high"]{
  background: rgba(248,113,113,0.16);
  color: #fecaca;
}

[data-theme="dark"] #perfil-page .profile-ai-suggestion-card__priority[data-priority="low"]{
  background: rgba(74,222,128,0.14);
  color: #bbf7d0;
}

[data-theme="dark"] #perfil-page .bd-progress-card{
  background: linear-gradient(180deg, rgba(17,24,39,0.96), rgba(15,23,42,0.94));
  border-color: rgba(212,175,55,0.22);
  box-shadow:
    0 20px 40px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

[data-theme="dark"] #perfil-page #perfil-form button[type="submit"]{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 18px 30px rgba(0,0,0,0.28);
}

[data-theme="dark"] #perfil-page #status{
  color: #cbd5e1;
}

[data-theme="dark"] #perfil-page #avís-canvis{
  background: rgba(212,175,55,0.12);
  border-color: rgba(212,175,55,0.26);
  color: #f5d36a;
}

[data-theme="dark"] #perfil-page .bd-unsaved-leave-modal__panel{
  border-color: rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at top left, rgba(212,175,55,0.16), rgba(15,23,42,0) 38%),
    linear-gradient(160deg, rgba(15,23,42,0.96), rgba(11,18,32,0.96));
  box-shadow:
    0 28px 70px rgba(0,0,0,0.44),
    0 10px 28px rgba(0,0,0,0.28);
}

[data-theme="dark"] #perfil-page .bd-unsaved-leave-modal__badge{
  background: rgba(212,175,55,0.14);
  border-color: rgba(212,175,55,0.22);
  color: #f5d36a;
}

[data-theme="dark"] #perfil-page .bd-unsaved-leave-modal__text{
  color: #c2cfdf;
}

[data-theme="dark"] #perfil-page .bd-unsaved-leave-modal__ghost{
  color: #e2e8f0;
  background: rgba(71,85,105,0.22);
  border-color: rgba(148,163,184,0.22);
}

[data-theme="dark"] #perfil-page .bd-unsaved-leave-modal__ghost:hover,
[data-theme="dark"] #perfil-page .bd-unsaved-leave-modal__ghost:focus-visible{
  background: rgba(71,85,105,0.38);
}

[data-theme="dark"] #perfil-page .premium-label{
  border-color: rgba(233,196,92,0.18);
  background:
    radial-gradient(circle at top left, rgba(212,175,55,0.18), rgba(15,23,42,0) 32%),
    linear-gradient(155deg, rgba(24,32,48,0.96), rgba(17,24,39,0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 12px 30px rgba(0,0,0,0.28);
  color: #e5e7eb;
}

[data-theme="dark"] #perfil-page .premium-label__title{
  color: #f8fafc;
}

[data-theme="dark"] #perfil-page .premium-label__meta{
  color: #d4c089;
}

[data-theme="dark"] #perfil-page .premium-label__meta strong,
[data-theme="dark"] #perfil-page .premium-label__meta b,
[data-theme="dark"] #perfil-page .premium-label__meta #premium-data,
[data-theme="dark"] #perfil-page .premium-label__meta #premium-expiry{
  color: #f8e7ad;
}

[data-theme="dark"] #perfil-page .premium-label__dot{
  color: rgba(212,192,137,0.66);
}

[data-theme="dark"] #perfil-page .bd-progress-title,
[data-theme="dark"] #perfil-page .bd-progress-pct,
[data-theme="dark"] #perfil-page #consentRecomBox .consent-title{
  color: #f8fafc;
}

[data-theme="dark"] #perfil-page .bd-progress-subtitle,
[data-theme="dark"] #perfil-page .bd-progress-hint,
[data-theme="dark"] #perfil-page #consentRecomBox .consent-help{
  color: #9fb0c7;
}

[data-theme="dark"] #perfil-page .bd-progress-bar{
  background: rgba(255,255,255,0.08);
}

[data-theme="dark"] #perfil-page .bd-progress-checklist li,
[data-theme="dark"] #perfil-page .bd-progress-hint,
[data-theme="dark"] #perfil-page #consentRecomBox{
  background: rgba(15,23,42,0.74);
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] #perfil-page .bd-gamification-card{
  background:
    radial-gradient(circle at top right, rgba(212,175,55,0.14), transparent 34%),
    linear-gradient(180deg, rgba(15,23,42,0.96), rgba(11,18,32,0.94));
  border-color: rgba(255,255,255,0.08);
  box-shadow:
    0 20px 40px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

[data-theme="dark"] #perfil-page .bd-gamification-card__eyebrow{
  color: #f1c96c;
}

[data-theme="dark"] #perfil-page .bd-gamification-card__title,
[data-theme="dark"] #perfil-page .bd-gamification-card__xp,
[data-theme="dark"] #perfil-page .bd-gamification-card__actionsTitle,
[data-theme="dark"] #perfil-page .bd-gamification-card__actionText,
[data-theme="dark"] #perfil-page .bd-gamification-card__detailsSummary,
[data-theme="dark"] #perfil-page .bd-gamification-card__summary strong,
[data-theme="dark"] #perfil-page .bd-gamification-card__timelineItem strong{
  color: #f8fafc;
}

[data-theme="dark"] #perfil-page .bd-gamification-card__text,
[data-theme="dark"] #perfil-page .bd-gamification-card__meta,
[data-theme="dark"] #perfil-page .bd-gamification-card__actionsHint,
[data-theme="dark"] #perfil-page .bd-gamification-card__timelineMeta{
  color: #9fb0c7;
}

[data-theme="dark"] #perfil-page .bd-gamification-card__bar{
  background: rgba(255,255,255,0.08);
}

[data-theme="dark"] #perfil-page .bd-gamification-card__pickerLabel,
[data-theme="dark"] #perfil-page .bd-gamification-card__label,
[data-theme="dark"] #perfil-page .bd-gamification-card__detailsSummary::before{
  color: #d6b980;
}

[data-theme="dark"] #perfil-page .bd-gamification-card__select{
  border-color: rgba(255,255,255,0.10);
  background-color: #0f172a;
  color: #e5e7eb;
  background-image:
    linear-gradient(45deg, transparent 50%, #e5e7eb 50%),
    linear-gradient(135deg, #e5e7eb 50%, transparent 50%),
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03));
  background-position:
    calc(100% - 22px) calc(50% - 4px),
    calc(100% - 16px) calc(50% - 4px),
    calc(100% - 44px) 50%;
  background-size:
    7px 7px,
    7px 7px,
    1px 58%;
  background-repeat: no-repeat;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 12px 26px rgba(0,0,0,0.24);
}

[data-theme="dark"] #perfil-page .bd-gamification-card__select option{
  background: #0f172a;
  color: #e5e7eb;
}

[data-theme="dark"] #perfil-page .bd-gamification-card__select:hover{
  border-color: rgba(212,175,55,0.28);
  background-color: #111c31;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 14px 28px rgba(0,0,0,0.28);
}

[data-theme="dark"] #perfil-page .bd-gamification-card__select:focus{
  border-color: rgba(212,175,55,0.42);
  box-shadow:
    0 0 0 4px rgba(212,175,55,0.10),
    0 14px 28px rgba(0,0,0,0.28);
}

[data-theme="dark"] #perfil-page .bd-gamification-card__actions,
[data-theme="dark"] #perfil-page .bd-gamification-card__reward{
  background: rgba(15,23,42,0.74);
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] #perfil-page .bd-gamification-card__reward[open]{
  background: rgba(17,24,39,0.86);
}

[data-theme="dark"] #perfil-page .bd-gamification-card__actionItem,
[data-theme="dark"] #perfil-page .bd-gamification-card__timelineItem{
  background: rgba(255,255,255,0.04);
}

[data-theme="dark"] #perfil-page .bd-gamification-card__actionXp{
  color: #f5d36a;
}

[data-theme="dark"] #perfil-page .bd-gamification-card__timelineItem.is-current{
  border-color: rgba(96,165,250,0.24);
  background: rgba(37,99,235,0.12);
}

[data-theme="dark"] #perfil-page .bd-gamification-card__timelineItem.is-achieved .bd-gamification-card__timelineIcon{
  background: rgba(212,175,55,0.18);
  color: #f5d36a;
}

[data-theme="dark"] #perfil-page .bd-gamification-card__timelineItem.is-locked{
  opacity: 0.82;
}

[data-theme="dark"] #perfil-page .bd-gamification-card__timelineItem.is-locked .bd-gamification-card__timelineIcon{
  background: rgba(148,163,184,0.16);
  color: #94a3b8;
}

[data-theme="dark"] #perfil-page #avís-canvis{
  background: rgba(212,175,55,0.12);
  border-color: rgba(212,175,55,0.24);
  color: #f5deb3 !important;
}

/* Perfil + candidatures */
  .perfil-grid { grid-template-columns: 1fr; gap: 2rem; padding: 0 10px; }
  .candidatures-container { margin-top: 0; }
  #candidatures-list li { font-size: 1em; padding: 1rem; }

/* ========================================================= */
/* === CANDIDATURES ENVIADES === */
/* ========================================================= */

#candidatures-list {
  list-style: none; /* ✅ treu el punt */
  padding: 0;
  margin: 0;
}

#candidatures-list li {
  border-radius: 22px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,251,255,0.96));
  border: 1px solid rgba(214, 223, 237, 0.9);
  box-shadow: 0 16px 34px rgba(25, 45, 94, 0.08);
  font-size: 1rem;
  color: var(--color-text);
  position: relative;
  line-height: 1.6;
  max-width: 100%;
  word-break: break-word;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

#candidatures-list li strong {
  font-weight: 700;
}

#candidatures-list li::after {
  display: none;
}

#candidatures-list li:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.42);
  box-shadow: 0 20px 38px rgba(25, 45, 94, 0.12);
}

#candidatures-list li:hover::after {
  display: none;
}

.candidatura-card__header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.candidatura-card__title-wrap{
  display: grid;
  align-items: start;
  gap: 10px;
  width: 100%;
  max-width: 960px;
}

.candidatura-card__title{
  display: block;
  color: var(--color-title);
  font-size: 1.08rem;
  line-height: 1.45;
}

.candidatura-card__meta{
  display: grid;
  gap: 8px;
  margin-top: 0.85rem;
  max-width: 960px;
}

.candidatura-card__header .candidatura-seen-badge{
  justify-self: start;
  margin-left: 0;
}

.candidatura-card__meta-item{
  display: flex;
  width: 100%;
  gap: 8px;
  align-items: baseline;
  color: var(--color-text);
}

.candidatura-card__meta-item--academic{
  align-items: flex-start;
  flex-direction: column;
  gap: 10px;
}

.candidatura-card__academic-list{
  width: 100%;
  display: grid;
  gap: 10px;
}

.candidatura-card__academic-card{
  width: 100%;
  border-radius: 16px;
  background: rgba(248,250,255,0.92);
  border: 1px solid rgba(214, 223, 237, 0.9);
  overflow: hidden;
}

.candidatura-card__academic-summary{
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 12px 14px 12px 34px;
  display: block;
}

.candidatura-card__academic-summary::-webkit-details-marker{
  display: none;
}

.candidatura-card__academic-summary::before{
  content: "";
  position: absolute;
  left: 14px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  color: var(--color-subtext);
  transition: transform 0.18s ease, top 0.18s ease;
}

.candidatura-card__academic-card[open] .candidatura-card__academic-summary::before{
  transform: rotate(-135deg);
  top: 21px;
}

.candidatura-card__academic-title{
  color: var(--color-title);
  font-weight: 800;
  display: block;
}

.candidatura-card__academic-subtitle{
  color: var(--color-subtext);
  font-size: 0.95rem;
  display: block;
  margin-top: 4px;
}

.candidatura-card__academic-body{
  padding: 0 14px 14px;
  display: grid;
  gap: 4px;
}

.candidatura-card__academic-meta{
  color: var(--color-text);
  line-height: 1.5;
}

.candidatura-card__meta-label{
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.11);
  color: #9b6b21;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.candidatura-card__meta-item--date{
  margin-top: 0.2rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(214, 223, 237, 0.8);
}

.candidatura-card__date-value{
  color: var(--color-title);
  font-size: 0.92rem;
  font-weight: 700;
}

.candidatures-empty-primary{
  padding: 18px 20px !important;
  border-radius: 18px !important;
  background: rgba(247, 249, 253, 0.94) !important;
  border: 1px dashed rgba(189, 198, 214, 0.82) !important;
  box-shadow: none !important;
  color: var(--color-subtext);
}

.candidatures-empty-primary::after{
  display: none !important;
}

.candidatures-deleted-block{
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.candidatures-deleted-block::after{
  display: none !important;
}

.candidatures-deleted-details{
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: rgba(247, 249, 253, 0.92);
  padding: 12px 14px;
}

.candidatures-deleted-details--expired{
  background: rgba(255, 249, 235, 0.92);
  border-color: rgba(212, 175, 55, 0.28);
}

.candidatures-deleted-details--active{
  background: linear-gradient(180deg, rgba(247, 249, 253, 0.96), rgba(255, 255, 255, 0.98));
  border-color: rgba(191, 206, 232, 0.92);
}

.candidatures-deleted-details summary{
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--color-title);
}

.candidatures-deleted-details summary::-webkit-details-marker{
  display: none;
}

.candidatures-deleted-details summary::after{
  content: "▾";
  float: right;
  color: var(--color-subtext);
}

.candidatures-deleted-details[open] summary::after{
  content: "▴";
}

.candidatures-deleted-list{
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.candidatura-deleted-item{
  margin: 0 !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,0.86) !important;
  border: 1px dashed rgba(189, 198, 214, 0.8) !important;
  box-shadow: none !important;
}

.candidatura-deleted-item::after{
  display: none !important;
}

.candidatura-deleted-summary{
  display: block;
  color: var(--color-subtext);
  line-height: 1.5;
}

.candidatura-expired-item{
  background: linear-gradient(180deg, rgba(255, 249, 237, 0.98), rgba(255, 252, 244, 0.96)) !important;
  border-color: rgba(212, 175, 55, 0.28) !important;
}

.candidatura-seen-badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  background: rgba(35, 79, 141, 0.09);
  color: #234f8d;
  font-size: 0.78rem;
  font-weight: 800;
  vertical-align: middle;
  white-space: nowrap;
}




/* Selecciona qualsevol <li> dins d’un div amb id que comença per "candidatures-" */
[id^="candidatures-"] {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

[id^="candidatures-"] li {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  transition: transform .08s ease, box-shadow .12s ease;
  margin-bottom: 10px; /* separació extra */
}

[id^="candidatures-"] li:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,.08);
}

[id^="candidatures-"] li strong {
  font-weight: 600;
  color: var(--color-title);
}

[id^="candidatures-"] li .email {
  color: var(--color-subtext);
  text-decoration: none;
  border-bottom: 1px dotted rgba(0,0,0,.15);
}
[id^="candidatures-"] li .email:hover {
  border-bottom-color: #4b5b6b;
}

/*Desplegable candidatures panell escola*/

.cand-toggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border:1px solid var(--color-border);
  border-radius:12px;
  background:var(--color-surface);
  cursor:pointer;
  margin-top:8px; /* opcional */
}

.cand-toggle .section-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--color-principal);
}

.cand-toggle:hover {
  background: var(--color-surface-2);
}


/* Fletxa amb animació */
.cand-toggle .chev{ transition: transform .25s ease; }
.cand-toggle[aria-expanded="true"] .chev{ transform: rotate(180deg); }

/* Panell plegable */
.cand-panel{
  overflow:hidden;
  max-height:0;
  transition:max-height .25s ease;
}

/* Missatge quan no hi ha candidatures */
.candidatura-empty {
  background: var(--color-surface-2);
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  color: var(--color-subtext);
  font-style: italic;
  box-shadow: none;
}


/* Badges per al CV */
.cv-ok {
  background:#f3fbf6;
  border:1px solid #c9e7d9;
  color:#166534;
  font-weight:600;
  padding:4px 10px;
  border-radius:999px;
  font-size:13px;
}
.cv-pendent {
  background:var(--color-warning-soft);
  border:1px solid rgba(217,119,6,.22);
  color:var(--color-warning);
  font-weight:600;
  padding:4px 10px;
  border-radius:999px;
  font-size:13px;
}
.cv-blocat {
  background:var(--color-surface-2);
  border:1px solid var(--color-border);
  color:var(--color-subtext);
  font-weight:600;
  padding:4px 10px;
  border-radius:999px;
  font-size:13px;
}
.cv-desbloqueig {
  background:var(--color-surface);
  border:1px solid var(--color-border);
  padding:4px 10px;
  border-radius:8px;
  text-decoration:none;
}
.cv-desbloqueig:hover {
  background:var(--color-surface-2);
}

/* Xip de data */
.candidatura-date {
  margin-left: auto;
  font-size: 12px;
  color: var(--color-subtext);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  padding: 4px 8px;
  border-radius: 999px;
}


/* Botó de nova oferta panell escola */

#nova-oferta-form .btn-primary:hover {
  background: linear-gradient(135deg, #a67c00, #d4af37); /* daurat */
  color: black;
}
/*panells escola */

.panell-dues-columnes {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

.columna-esquerra,
.columna-dreta {
  flex: 1 1 45%;
  min-width: 320px;
}


/* ========================================================= */
/* === MODAL PERFIL CENTRE ================ */
/* ========================================================= */

/* === MODAL GENERAL === */
#modal-perfil-escola .modal-content {
  background: #ffffff;
  border-radius: 20px;
  padding: 2rem 2.2rem;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  animation: fadeInScale 0.25s ease-out;
}

/* Animació */
@keyframes fadeInScale {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Títol */
#modal-perfil-escola h3 {
  font-size: 1.4rem;
  color: #1a237e;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

/* Formulari */
#formulari-perfil-centre {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

/* Labels */
#formulari-perfil-centre label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a237e;
}

/* Inputs */
#formulari-perfil-centre input,
#formulari-perfil-centre textarea {
  width: 100%;
  font-size: 1rem;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  border: 1.5px solid #ddd;
  background: #fafafa;
  transition: all 0.2s ease;
  outline: none;
}

/* Input focus */
#formulari-perfil-centre input:focus,
#formulari-perfil-centre textarea:focus {
  border-color: #1a237e;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(26, 35, 126, 0.12);
}

/* Textarea */
#formulari-perfil-centre textarea {
  min-height: 90px;
  resize: vertical;
}

/* Botó Desar canvis */
#formulari-perfil-centre button[type="submit"] {
  margin-top: 0.6rem;
  padding: 0.75rem;
  background: linear-gradient(135deg, #1a237e, #3949ab);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}

#formulari-perfil-centre button[type="submit"]:hover {
  background: linear-gradient(135deg, #1a237e, #283593);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Botó TANCA */
#modal-perfil-escola .btn-tancar {
  margin-top: 1rem;
  text-align: center;
  color: #1a237e;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}

#modal-perfil-escola .btn-tancar:hover {
  opacity: 0.6;
}

.logo-preview {
  margin: 10px 0 20px 0;
  text-align: center;
}

.logo-centre-preview {
  max-width: 170px;
  max-height: 170px;
  border-radius: 14px;
  border: 2px solid #d4af37;
  padding: 6px;
  background: white;
  object-fit: contain;
}


/* === RESPONSIVE === */
@media (max-width: 480px) {

  /* Reduir marges laterals */
  #modal-perfil-escola .modal-content {
    padding: 1.4rem 1.2rem;
    width: 94%;
    border-radius: 16px;
  }

  /* Títol més petit */
  #modal-perfil-escola h3 {
    font-size: 1.25rem;
  }

  /* Inputs més compactes */
  #formulari-perfil-centre input,
  #formulari-perfil-centre textarea {
    padding: 0.55rem 0.7rem;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  /* Botó de desar */
  #formulari-perfil-centre button[type="submit"] {
    font-size: 0.95rem;
    padding: 0.65rem;
    border-radius: 12px;
  }

  /* Logo preview més petit */
  .logo-centre-preview {
    max-width: 90px;
    max-height: 90px;
    padding: 3px;
    border-width: 1.5px;
  }

  /* Botó de tancar */
  #modal-perfil-escola .btn-tancar {
    margin-top: 0.8rem;
    font-size: 0.9rem;
  }
}

/* --- Prevenir desbordaments del modal --- */
#modal-perfil-escola .modal-content {
  box-sizing: border-box;
  overflow-y: auto;
  max-height: 85vh;
}



/* ========================================================= */
/* === RESPONSIVE PERFIL (≤900px i ≤600px) ================ */
/* ========================================================= */

/* 📱 Tauletes i pantalles mitjanes */
@media (max-width: 900px) {
  .perfil-grid {
    grid-template-columns: 1fr;   /* passa a 1 sola columna */
    gap: 1.5rem;
    padding: 0 16px;
    max-width: 100%;              /* ✅ evita columnes estretes */
    width: 100%;                  /* ✅ força amplada completa */
    margin: 0 auto;
  }

  .candidatures-container {
    margin-top: 40px;
    padding: 1.5rem;
    max-width: 100%;              /* ✅ elimina el límit fix de 500px */
    width: 100%;
  }

  .section-title {
    font-size: 1.25em;
    margin-bottom: 0.8rem;
  }
}

/* 📱 Mòbils petits */
@media (max-width: 600px) {
  .perfil-grid {
    display: flex;                /* ✅ canvia a flex per evitar errors de grid */
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
    margin: 20px auto;
    padding: 0 12px;
    width: 100%;
    max-width: 100%;
  }

  .candidatures-container {
    padding: 1.2rem;
    border-width: 1px;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  }

  #candidatures-list li {
    padding: 1rem 1.2rem;
    font-size: 1rem;
    line-height: 1.5;
  }

  .section-title {
    font-size: 1.1em;
    border-left-width: 3px;
    padding-left: 8px;
  }

  /* ✅ formulari sense desbordaments */
  input[type="text"],
  input[type="file"],
  input[type="email"],
  select,
  textarea {
    width: 100%;
    box-sizing: border-box;
  }

  /* ✅ botó Desa gran i centrat */
  .btn--primary {
    width: 100%;
    font-size: 1rem;
    padding: 12px;
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  #perfil-page .candidatures-container{
    padding: 20px 14px;
    border-radius: 22px;
  }

  #perfil-page #viewCandidaturesBD .section-title{
    font-size: 1.02rem;
    line-height: 1.3;
  }

  #perfil-page #candidatures-list li{
    padding: 0.95rem 0.9rem;
    border-radius: 18px;
  }

  #perfil-page .candidatura-card__title{
    font-size: 0.97rem;
  }

  #perfil-page .candidatura-card__meta-item{
    font-size: 0.94rem;
  }

  #perfil-page .candidatura-card__meta-label{
    font-size: 0.72rem;
    padding: 0.34rem 0.62rem;
  }

  #perfil-page .candidatura-card__academic-summary{
    padding-right: 10px;
  }
}

/* 📱 Extra: iPhone molt petit (≤400px) */
@media (max-width: 400px) {
  .candidatures-container {
    padding: 1rem;
  }

  #candidatures-list li {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1rem;
  }
}

/* Botó PERFIL, posició a l'esquerra */
.perfil-esq {
  position: absolute;
  top: 220px;  /* abans 15px */
  left: 100px;
  z-index: 10;
}


/* Botó TORNAR centrat a sobre */
.tornar-centre {
  margin-top: 60px !important;
  display: block;
}


/* Donem aire al header perquè no es solapin */
.site-header {
  position: relative;
  padding-top: 110px !important;
}

/* Avatar rodó del centre */
.perfil-escola-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #d4af37;
  background: #d4af37;
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  transition: transform .15s ease;
}

.perfil-escola-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.perfil-escola-avatar:hover {
  transform: scale(1.05);
}


@media (max-width: 600px) {

  .perfil-esq {
    top: 95px !important;   /* posat sota el botó Tornar */
    left: 12px !important;  /* arraconat a l’esquerra */
  }

  .perfil-escola-avatar {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }

  /* Evitem que el header quedi exageradament alt al mòbil */
  .site-header {
    padding-top: 70px !important;
  }
}

/* =========================================================
   ✅ CONSENTIMENT Recomanacions (Hard isolate)
   ========================================================= */

#consentRecomBox{
  all: unset;               /* ← LA CLAU */
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  margin-top: 16px;
  padding: 12px;

  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

/* 🔥 Important: torna a definir estils bàsics dins (all:unset els mata) */
#consentRecomBox *{
  all: unset;
  box-sizing: border-box;
}

#consentRecomBox .consent-inner{
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

#consentRecomBox input[type="checkbox"]{
  all: revert;
  margin-top: 3px;
}

#consentRecomBox .consent-text{
  display: block;
  flex: 1;
  min-width: 0;
}

#consentRecomBox .consent-title{
  display: block;
  font-weight: 700;
  line-height: 1.25;
}

#consentRecomBox .consent-help{
  display: block;
  margin-top: 6px;
  font-size: 0.9em;
  color: #555;
  line-height: 1.35;
}

/* espai clar entre el consent box i el botó */
#consentRecomBox{
  margin-bottom: 18px !important;
}

/* i per assegurar-ho encara més: el botó amb aire a dalt */
#perfil-form button[type="submit"]{
  margin-top: 14px !important;
}


#consentRecomBox .consent-inner{
  width: 100%;
}

/* =========================================================
   ✅ TOP 5 DOCENTS RECOMANATS (PANELL ESCOLA)
   ========================================================= */

.recomanats-box{
  margin-top: 12px;
  padding: 14px 14px;
  border: 1px solid #eee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Títol: blau + línia daurada com section-title */
.recomanats-title{
  font-weight: 800;
  font-size: 15px;
  color: #1a237e;
  border-left: 4px solid #d4af37;
  padding-left: 10px;
  margin-bottom: 10px;
}

/* Llista */
.recomanats-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

/* Item */
.recomanat-item{
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  transition: transform .08s ease, box-shadow .12s ease;
}

.recomanat-item:hover{
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,.08);
}

.recomanat-item strong{
  font-weight: 700;
  color: #111;
}

/* Meta: especialitat + localitat */
.recomanat-meta{
  color: #4b5b6b;
  font-size: 13px;
}

/* Badge CV */
.recomanat-badge{
  margin-left: auto;
  background:#f3fbf6;
  border:1px solid #c9e7d9;
  color:#166534;
  font-weight:700;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
}

/* Badge quan no té CV */
.recomanat-badge.pending{
  background:#fff8e6;
  border:1px solid #f6d58b;
  color:#8a6d1f;
}

/* Empty */
.recomanats-empty{
  background: #f9fafb;
  border: 1px dashed #ddd;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: center;
  color: #6b7a8c;
  font-style: italic;
  box-shadow: none;
}

/* =========================================================
   💸 MONETITZACIÓ: Recomanats bloquejats (no premium)
   (si després ho pintem per JS)
   ========================================================= */

.recomanats-lock{
  background: #fff8e6;
  border: 1px solid #f6d58b;
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 10px;
}

.recomanats-lock strong{
  color:#1a237e;
  font-weight:800;
}

.recomanats-cta{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.recomanats-cta a{
  display:inline-block;
  padding: 8px 12px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}

/* CTA premium */
.recomanats-cta .cta-premium{
  background: linear-gradient(135deg, #1a237e, #3949ab);
  color: #fff;
}

/* CTA 1,99€ */
.recomanats-cta .cta-unlock{
  background: #fff;
  border: 1px solid #d1d5db;
  color: #111;
}
.recomanats-cta .cta-unlock:hover{
  background: #f9fafb;
}

.cv-btn{
  cursor:pointer;
  border:none;
}
.cv-btn:hover{
  opacity:.9;
  transform:translateY(-1px);
}

/* =========================================================
   🌙 DARK MODE — PERFIL (SIMPLE I CLAR)
   ========================================================= */

[data-theme="dark"] .candidatures-container {
  background: #111827;
  border-color: #d4af37;
  color: #e5e7eb;
}

[data-theme="dark"] .section-title {
  color: #e5e7eb;
  border-left-color: #d4af37;
}

/* Llista de candidatures */
[data-theme="dark"] #candidatures-list li,
[data-theme="dark"] [id^="candidatures-"] li {
background: linear-gradient(180deg, rgba(30,41,59,0.96), rgba(17,24,39,0.96));
  border-color: rgba(255,255,255,0.08);
  color: #e5e7eb;
}

[data-theme="dark"] .candidatures-empty-primary{
  background: rgba(15,23,42,0.82) !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #9fb0c7 !important;
}

[data-theme="dark"] .candidatures-deleted-details{
  background: rgba(15,23,42,0.78) !important;
  border-color: rgba(255,255,255,0.10) !important;
}

[data-theme="dark"] .candidatures-deleted-details--expired{
  background: linear-gradient(180deg, rgba(39,31,11,0.52), rgba(15,23,42,0.88)) !important;
  border-color: rgba(212,175,55,0.30) !important;
}

[data-theme="dark"] .candidatures-deleted-details--active{
  background: linear-gradient(180deg, rgba(20,31,52,0.92), rgba(15,23,42,0.94)) !important;
  border-color: rgba(117, 165, 255, 0.18) !important;
}

[data-theme="dark"] .candidatures-deleted-details summary{
  color: #f8fafc;
}

[data-theme="dark"] .candidatures-deleted-details summary::after{
  color: #9fb0c7;
}

[data-theme="dark"] .candidatura-deleted-item{
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.10) !important;
}

[data-theme="dark"] .candidatura-deleted-summary{
  color: #cbd5e1;
}

[data-theme="dark"] .candidatura-expired-item{
  background: rgba(39,31,11,0.44) !important;
  border-color: rgba(212,175,55,0.24) !important;
}

[data-theme="dark"] .candidatura-card__title{
  color: #f8fafc;
}

[data-theme="dark"] .candidatura-card__meta-item{
  color: #dbe4f0;
}

[data-theme="dark"] .candidatura-card__academic-card{
  background: rgba(15, 23, 42, 0.68);
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .candidatura-card__academic-title{
  color: #f8fafc;
}

[data-theme="dark"] .candidatura-card__academic-subtitle{
  color: #94a3b8;
}

[data-theme="dark"] .candidatura-card__academic-meta{
  color: #dbe4f0;
}

[data-theme="dark"] .candidatura-card__meta-label{
  background: rgba(212,175,55,0.14);
  color: #f2d57a;
}

[data-theme="dark"] .candidatura-card__meta-item--date{
  border-top-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .candidatura-card__date-value{
  color: #f8fafc;
}

[data-theme="dark"] .candidatura-seen-badge{
  background: rgba(117, 165, 255, 0.14);
  color: #a9c7ff;
}

[data-theme="dark"] .candidatura-empty{
  background: rgba(15,23,42,0.78);
  border-color: rgba(255,255,255,0.10);
  color: #9fb0c7;
}

/* Textos secundaris */
[data-theme="dark"] .candidatura-date,
[data-theme="dark"] .meta,
[data-theme="dark"] .recomanat-meta {
  color: #9ca3af;
}

/* Panells desplegables */
[data-theme="dark"] .cand-toggle {
  background: #111827;
  border-color: rgba(255,255,255,0.08);
  color: #e5e7eb;
}

/* Recomanats */
[data-theme="dark"] .recomanats-box,
[data-theme="dark"] .recomanat-item {
background: #1e293b;
  border-color: rgba(255,255,255,0.08);
  color: #e5e7eb;
}

/* ===== DARK — Recomanats refinat ===== */

[data-theme="dark"] .recomanats-title{
  color:#f3f4f6;
  border-left-color:#d4af37;
}

[data-theme="dark"] .recomanat-badge{
  background: rgba(34,197,94,.15);
  border:1px solid rgba(34,197,94,.35);
  color:#22c55e;
}

[data-theme="dark"] .recomanat-badge.pending{
  background: rgba(250,204,21,.12);
  border:1px solid rgba(250,204,21,.35);
  color:#fde047;
}

[data-theme="dark"] .recomanats-lock{
  background: rgba(212,175,55,.08);
  border:1px solid rgba(212,175,55,.35);
}

[data-theme="dark"] .recomanats-lock strong{
  color:#f5d36a;
}

[data-theme="dark"] .recomanats-cta .cta-unlock{
  background:#1f2937;
  border:1px solid rgba(255,255,255,.15);
  color:#e5e7eb;
}

[data-theme="dark"] .recomanats-cta .cta-unlock:hover{
  background:#111827;
}

[data-theme="dark"] [id^="candidatures-"] li strong,
[data-theme="dark"] .recomanat-item strong {
  color: #f9fafb;
}

[data-theme="dark"] .candidatura-date {
  background: #1f2937;
  border: 1px solid rgba(255,255,255,.08);
  color: #cbd5e1;
}

[data-theme="dark"] .cv-ok,
[data-theme="dark"] .recomanat-badge {
  background: rgba(34,197,94,.18);
  border: 1px solid rgba(34,197,94,.45);
  color: #22c55e;
}

[data-theme="dark"] .bd-chat-reactions{
  background:transparent;
  border:none;
  box-shadow:none;
}

[data-theme="dark"] .bd-chat-msg-time,
[data-theme="dark"] .bd-chat-msg.me .bd-chat-msg-footer .bd-chat-msg-time{
  color:#94a3b8;
}

[data-theme="dark"] .bd-chat-link{
  background: rgba(96,165,250,0.12);
  border-color: rgba(96,165,250,0.24);
  color: #dbeafe;
  box-shadow: none;
}

[data-theme="dark"] .bd-chat-link:hover{
  background: rgba(96,165,250,0.18);
}

[data-theme="dark"] .bd-chat-msg.me .bd-chat-link{
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.28);
  color: #fff7db;
}

[data-theme="dark"] .bd-react-btn{
  background: rgba(15,23,42,0.92);
  border-color: rgba(148,163,184,0.32);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 8px 18px rgba(2,6,23,0.24);
}

[data-theme="dark"] .bd-copy-msg-btn,
[data-theme="dark"] .bd-delete-msg-btn{
  border-color: rgba(255,255,255,0.12);
  background: rgba(15,23,42,0.9);
  box-shadow: 0 8px 18px rgba(2,6,23,0.22);
}

[data-theme="dark"] .bd-reaction:hover{
  background:rgba(255,255,255,0.08);
}



/* Modal perfil escola */
[data-theme="dark"] #modal-perfil-escola .modal-content {
  background: #111827;
  color: #e5e7eb;
}

[data-theme="dark"] #formulari-perfil-centre input,
[data-theme="dark"] #formulari-perfil-centre textarea {
  background: #020617;
  color: #e5e7eb;
  border-color: rgba(255,255,255,0.15);
}

/* ✅ DARK: triangle bafarada */
[data-theme="dark"] #candidatures-list li::after{
  border-top-color: #0f172a;
}
[data-theme="dark"] #candidatures-list li:hover::after{
  border-top-color: #d4af37;
}

/* ===== FIX DARK — CONSENT BOX ===== */

[data-theme="dark"] #consentRecomBox{
  background: #0f172a;
  border-color: rgba(255,255,255,.08);
}

[data-theme="dark"] #consentRecomBox .consent-title{
  color: #e5e7eb;
}

[data-theme="dark"] #consentRecomBox .consent-help{
  color: #94a3b8;
}

[data-theme="dark"] #consentRecomBox *{
  color: inherit;
}

.bd-sidebar__link.is-locked{
  opacity: .55;
  cursor: not-allowed;
}

.bd-sidebar__link.is-locked::after{
  content: "Bloquejat";
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  background: rgba(212,175,55,.12);
  color: #8a6a00;
}

.bd-sidebar__link.is-locked:hover{
  background: transparent !important;
  opacity: .55;
}

[data-theme="dark"] .bd-sidebar__link.is-locked::after{
  background: rgba(212,175,55,.14);
  color: #f5d36a;
}

[data-theme="dark"] #perfil-page .bd-sidebar{
  background: linear-gradient(180deg, rgba(15,23,42,0.96), rgba(11,18,32,0.94));
  border-color: rgba(255,255,255,.08);
  box-shadow:
    0 24px 46px rgba(0,0,0,.34),
    0 8px 20px rgba(0,0,0,.22);
}

[data-theme="dark"] #perfil-page .bd-sidebar__title{
  color: #94a3b8;
}

[data-theme="dark"] #perfil-page .bd-sidebar__link{
  background: rgba(15,23,42,0.78);
  border-color: rgba(255,255,255,.08);
  color: #e5e7eb;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

[data-theme="dark"] #perfil-page .bd-sidebar__link:hover{
  background: rgba(30,41,59,0.9);
  border-color: rgba(255,255,255,.12);
}

[data-theme="dark"] #perfil-page .bd-sidebar__link.active{
  background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(212,175,55,0.10));
  border-color: rgba(212,175,55,0.32);
  color: #f5d36a;
  box-shadow: 0 10px 24px rgba(0,0,0,.24);
}

[data-theme="dark"] .bd-sidebar-badge--new{
  background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(212,175,55,0.10));
  border-color: rgba(212,175,55,0.32);
  color: #f5d36a;
  box-shadow: 0 8px 16px rgba(0,0,0,.20);
}


/* =========================================================
   🌙 DARK MODE — ESPAI DOCENT
   ========================================================= */

/* Cards principals */
[data-theme="dark"] .bd-space__card{
  background: #0f172a;
  border-color: rgba(255,255,255,.08);
  box-shadow: none;
  color: #e5e7eb;
}

/* Títols */
[data-theme="dark"] .bd-space__title,
[data-theme="dark"] .bd-space__cardTitle{
  color: #f3f4f6;
}

/* Subtítols */
[data-theme="dark"] .bd-space__subtitle,
[data-theme="dark"] .bd-space__cardSub{
  color: #9ca3af;
}

/* Pill visibilitat */
[data-theme="dark"] .bd-pill{
  background: rgba(255,255,255,.06);
  color: #e5e7eb;
}

[data-theme="dark"] .bd-pill.is-public{
  background: rgba(34,197,94,.18);
  color: #22c55e;
}

[data-theme="dark"] .bd-moments-badge{
  background: rgba(212,175,55,0.18);
  color: #f2d57a;
}

[data-theme="dark"] .bd-moments-banner{
  border-color: rgba(212,175,55,0.2);
  background:
    radial-gradient(circle at top left, rgba(212,175,55,0.12), transparent 55%),
    linear-gradient(180deg, rgba(39,31,11,0.42), rgba(15,23,42,0.9));
}

[data-theme="dark"] .bd-moments-banner__text,
[data-theme="dark"] .bd-moment-meta{
  color: #9fb0c7;
}

[data-theme="dark"] .bd-moments-banner__btn{
  background: rgba(255,255,255,0.08);
  color: #f8fafc;
}

[data-theme="dark"] .bd-moments-status{
  background: rgba(148,163,184,0.12);
  color: #e2e8f0;
}

[data-theme="dark"] .bd-moment-placeholder{
  background:
    radial-gradient(circle at top, rgba(212,175,55,0.18), transparent 58%),
    linear-gradient(180deg, rgba(30,41,59,0.95), rgba(15,23,42,0.92));
  color: #f8fafc;
}

[data-theme="dark"] .bd-moment-placeholder--inactive{
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 58%),
    linear-gradient(180deg, rgba(51,65,85,0.95), rgba(30,41,59,0.92));
}

[data-theme="dark"] .bd-moment-label{
  color: #f8fafc;
}

[data-theme="dark"] .bd-moment-empty{
  color: #9fb0c7;
}

[data-theme="dark"] .bd-moment-followingTag,
[data-theme="dark"] .bd-moments-viewer__counter,
[data-theme="dark"] .bd-moments-viewer__nav{
  background: rgba(255,255,255,0.08);
  color: #f8fafc;
}

[data-theme="dark"] .bd-moments-viewer__dialog{
  background: linear-gradient(180deg, rgba(17,24,39,0.98), rgba(15,23,42,0.96));
}

[data-theme="dark"] .bd-moments-viewer__close{
  background: rgba(255,255,255,0.08);
  color: #f8fafc;
}

[data-theme="dark"] .bd-moments-viewer__meta{
  color: #f8fafc;
}

[data-theme="dark"] .bd-moments-viewer__content{
  background: rgba(2,6,23,0.7);
}

/* Targetes docents */
[data-theme="dark"] .bd-user-card{
  background: #111827;
  border: 1px solid rgba(255,255,255,.06);
  color: #e5e7eb;
}

/* Nom i rol */
[data-theme="dark"] .bd-user-name{
  color: #f9fafb;
}

[data-theme="dark"] .bd-user-role{
  color: #9ca3af;
}

/* Chat */
[data-theme="dark"] .bd-chat{
  background: #0f172a;
  border-color: rgba(255,255,255,.08);
}

[data-theme="dark"] .bd-chat__header{
  border-color: rgba(255,255,255,.08);
}

[data-theme="dark"] .bd-chat__messages{
  background: #0b1220;
}

[data-theme="dark"] .bd-chat__empty--loading{
  color: #e5e7eb;
}

[data-theme="dark"] #perfil-page #espaiDocentSectionBD .bd-discover-search__input{
  background: linear-gradient(180deg, rgba(15,23,42,0.96), rgba(17,24,39,0.96));
  border-color: rgba(212,175,55,0.26);
  color: #e5e7eb;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.03),
    0 8px 20px rgba(2,6,23,0.24);
}

[data-theme="dark"] #perfil-page #espaiDocentSectionBD .bd-discover-search__input::placeholder{
  color: #94a3b8;
}

[data-theme="dark"] #perfil-page #espaiDocentSectionBD .bd-discover-search__input:focus{
  border-color: rgba(212,175,55,0.62);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.03),
    0 0 0 4px rgba(212,175,55,0.14),
    0 10px 24px rgba(2,6,23,0.3);
}

[data-theme="dark"] .bd-chat-msg{
  background: linear-gradient(180deg, rgba(30,41,59,0.96), rgba(22,31,49,0.96));
  border: 1px solid rgba(148,163,184,0.14);
  color: #e5e7eb;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.03),
    0 10px 22px rgba(2,6,23,0.22);
}

[data-theme="dark"] .bd-chat-msg.me{
  background: linear-gradient(180deg, #e1bb45, #cda430);
  border: 1px solid rgba(255,255,255,0.16);
  color: #111827;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 10px 22px rgba(2,6,23,0.18);
}

[data-theme="dark"] .bd-chat__input{
  border-color: rgba(255,255,255,.08);
}

[data-theme="dark"] .bd-chat__input input{
  background: linear-gradient(180deg, rgba(2,6,23,0.96), rgba(15,23,42,0.96));
  color: #e5e7eb;
  border-color: rgba(255,255,255,.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

[data-theme="dark"] .bd-chat__input input::placeholder{
  color: #8fa1b9;
}

[data-theme="dark"] .bd-group-composer{
  background: linear-gradient(180deg, rgba(17,24,39,0.96), rgba(15,23,42,0.94));
  border-color: rgba(255,255,255,0.08);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 12px 24px rgba(0,0,0,0.18);
}

[data-theme="dark"] .bd-group-composer__input{
  background: linear-gradient(180deg, rgba(2,6,23,0.96), rgba(15,23,42,0.96));
  border-color: rgba(255,255,255,0.12);
  color: #e5e7eb;
}

[data-theme="dark"] .bd-group-composer__input::placeholder,
[data-theme="dark"] .bd-group-composer__hint,
[data-theme="dark"] .bd-chat__member-role{
  color: #94a3b8;
}

[data-theme="dark"] .bd-group-chip{
  background: rgba(212,175,55,0.16);
  color: #f5d36a;
}

[data-theme="dark"] .bd-group-member,
[data-theme="dark"] .bd-chat__group-meta{
  background: rgba(15,23,42,0.82);
  border-color: rgba(255,255,255,0.08);
  color: #e5e7eb;
}

[data-theme="dark"] .bd-group-member.is-selected{
  border-color: rgba(212,175,55,0.34);
  background: linear-gradient(180deg, rgba(67,56,17,0.38), rgba(17,24,39,0.9));
}

[data-theme="dark"] .bd-group-composer__actions{
  border-top-color: rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(15,23,42,0.74), rgba(15,23,42,0.96));
}

[data-theme="dark"] .bd-chat__member-name,
[data-theme="dark"] .bd-group-member__check{
  color: #f8fafc;
}

[data-theme="dark"] .bd-chat__member-remove,
[data-theme="dark"] .bd-chat__danger{
  background: rgba(127,29,29,0.22);
  color: #fecaca;
  border: 1px solid rgba(248,113,113,0.18);
}

[data-theme="dark"] .bd-chat__meta-toggle{
  background: rgba(15,23,42,0.88);
  border-color: rgba(255,255,255,0.1);
  color: #e5e7eb;
}

/* ===== PREMIUM CARD ===== */

[data-theme="dark"] .premium-label{
  background:#111827;
  border:1px solid #d4af37;
  color:#e5e7eb;
}

/* ===== PROGRESS CARD ===== */

[data-theme="dark"] .bd-progress-card{
  background:#0f172a;
  border:1px solid rgba(255,255,255,.08);
  color:#e5e7eb;
}

[data-theme="dark"] .bd-progress-bar{
  background:rgba(255,255,255,.08);
}

[data-theme="dark"] .bd-progress-subtitle,
[data-theme="dark"] .bd-progress-hint{
  color:#94a3b8;
}

[data-theme="dark"] .bd-dot{
  background:rgba(255,255,255,.25);
}

/* ===== SIDEBAR DARK ===== */

[data-theme="dark"] .bd-sidebar__title{
  color:#9ca3af;
}

[data-theme="dark"] .bd-sidebar__link{
  color:#cbd5e1;
}

[data-theme="dark"] .bd-sidebar__link:hover{
  background:rgba(255,255,255,.06);
}

[data-theme="dark"] .bd-sidebar__link.active{
  background:rgba(212,175,55,.18);
  color:#d4af37;
}

/* ===== CAROUSEL NAV DARK ===== */

[data-theme="dark"] .bd-carousel-nav{
  background:#1f2937;
  color:#e5e7eb;
  box-shadow:none;
  border:1px solid rgba(255,255,255,.08);
}

/*Dins espai docent - numero de docents que segueixes*/

.bd-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  padding:0 8px;
  border-radius:999px;
  background: rgba(212,175,55,.18);
  color:#8a6a00;
  font-weight:900;
  font-size:12px;
  margin-left:8px;
}
.bd-following-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;

  /* 👇 LIMIT VISUAL */
  max-height: calc(7 * 56px); /* 7 files aprox */
  overflow-y: auto;
  padding-right: 8px; /* una mica més d’aire */
}

/* ===== Scroll daurat ===== */
.bd-following-list::-webkit-scrollbar {
  width: 7px;
}

.bd-following-list::-webkit-scrollbar-track {
  background: rgba(212, 175, 55, 0.12);
  border-radius: 999px;
}

.bd-following-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d4af37, #b8962e);
  border-radius: 999px;
}

.bd-following-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #e0bf4a, #c9a23a);
}

/* Firefox */
.bd-following-list {
  scrollbar-width: thin;
  scrollbar-color: #d4af37 rgba(212, 175, 55, 0.12);
}

.bd-following-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 56px; /* 👈 important pel càlcul */
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

/* ✅ Inbox (extra segur) */
#inboxListBD {
  max-height: calc(7 * 56px);
  overflow-y: auto;
  padding-right: 8px;
  margin-top: 12px;
}


.bd-space__card .bd-following-list{
  overflow-y: auto;
}

#perfil-page #espaiDocentSectionBD #followingListBD .bd-following-item,
#perfil-page #espaiDocentSectionBD #followersListBD .bd-following-item{
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: start !important;
  column-gap: 12px;
  padding: 12px 14px;
  min-height: unset;
}

#perfil-page #espaiDocentSectionBD #followingListBD .bd-following-item > div,
#perfil-page #espaiDocentSectionBD #followersListBD .bd-following-item > div{
  min-width: 0;
  display: grid;
  gap: 6px;
}

#perfil-page #espaiDocentSectionBD #followingListBD .bd-following-avatar,
#perfil-page #espaiDocentSectionBD #followersListBD .bd-following-avatar{
  align-self: flex-start;
  margin-top: 2px;
}

#perfil-page #espaiDocentSectionBD #followingListBD .bd-following-role,
#perfil-page #espaiDocentSectionBD #followersListBD .bd-following-role{
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

#perfil-page #espaiDocentSectionBD #followingListBD .bd-following-item:hover,
#perfil-page #espaiDocentSectionBD #followersListBD .bd-following-item:hover{
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(255,252,241,0.96), rgba(249,244,225,0.90));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.78),
    0 14px 28px rgba(15, 23, 42, 0.08);
}

#perfil-page #espaiDocentSectionBD #followingListBD .bd-following-item:hover .bd-following-avatar,
#perfil-page #espaiDocentSectionBD #followersListBD .bd-following-item:hover .bd-following-avatar{
  border-color: #111827;
  box-shadow:
    0 0 0 3px rgba(255,255,255,0.94),
    0 0 0 5px rgba(17, 24, 39, 0.24),
    0 10px 20px rgba(15, 23, 42, 0.14);
}

.bd-space__divider {
  height: 1px;
  margin: 24px 0;
  background: linear-gradient(
    to right,
    transparent,
    rgba(212, 175, 55, 0.6),
    transparent
  );
}

/*icona misssatge*/
.bd-following-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bd-following-info {
  flex: 1;
  min-width: 0;
}

.bd-msg-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  opacity: 0.7;
  flex: 0 0 auto;
  align-self: center;
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: opacity .18s ease, transform .18s ease;
}

#perfil-page #espaiDocentSectionBD #followingListBD .bd-msg-btn,
#perfil-page #espaiDocentSectionBD #followersListBD .bd-msg-btn{
  justify-self: end;
  align-self: center;
}

.bd-msg-btn:hover {
  opacity: 1;
}

.bd-msg-btn__icon{
  width: 24px;
  height: 24px;
  display: block;
  background: center / 24px 24px no-repeat url("/icons/message-closed.svg");
  transition: transform .22s ease, filter .22s ease, background-image .12s ease;
}

.bd-msg-btn:hover .bd-msg-btn__icon,
.bd-msg-btn:focus-visible .bd-msg-btn__icon{
  background-image: url("/icons/message-open.svg");
  transform: translateY(-1px) scale(1.03);
  filter: drop-shadow(0 4px 10px rgba(15, 23, 42, 0.12));
}

.bd-msg-btn.is-disabled,
.bd-user-message.is-disabled{
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/*Seguiment dels no llegits amb puntet*/

.bd-following-item.is-unread{
  background: rgba(212,175,55,.10);
}

.bd-unread-dot{
  display:inline-block;
  width:8px;
  height:8px;
  margin-left:6px;
  border-radius:999px;
  background:#d4af37;
  box-shadow: 0 0 0 2px rgba(212,175,55,.18);
}

.bd-sidebar-badge {
  margin-left: 6px;
  background: #ef4444;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1;
}

.bd-sidebar-badge--new{
  position: absolute;
  top: 12px;
  right: 12px;
  margin-left: 0;
  padding: 3px 10px;
  background: linear-gradient(135deg, rgba(255,248,231,0.98), rgba(248,239,209,0.94));
  border: 1px solid rgba(212,175,55,0.36);
  color: #8a6a00;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 8px 16px rgba(212,175,55,0.12);
}

/* =========================================================
   💬 CHAT — REACCIONS MISSATGES
   ========================================================= */

.bd-chat-msg{
  position: relative;
}

.bd-chat-msg-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:8px;
  padding:0;
  background:transparent;
  border:none;
  box-shadow:none;
}

.bd-chat-reactions{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:0;
  border-radius:999px;
  background:transparent;
  border:none;
  box-shadow:none;
  position:relative;
  z-index:3;
  transform:none;
}

/* emojis existents */
.bd-reaction{
  border:none;
  background:none;
  cursor:pointer;
  font-size:14px;

  padding:2px 6px;
  border-radius:10px;

  transition:transform .15s ease, background .15s ease;
}

.bd-reaction:hover{
  background:rgba(0,0,0,.06);
  transform:scale(1.15);
}

/* botó afegir reacció 😊 */
.bd-react-btn{
  width:40px;
  height:40px;
  padding:0;
  border:1px solid rgba(255,255,255,0.98);
  border-radius:999px;
  background:#fff;
  cursor:pointer;
  font-size:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  opacity:.92;
  box-shadow:
    0 0 0 2px rgba(255,255,255,0.35),
    0 8px 18px rgba(15, 23, 42, 0.12);
  transition:transform .15s ease, opacity .15s ease;
}

.bd-react-btn:hover{
  opacity:1;
  transform:scale(1.2);
}

.bd-react-btn{
  opacity:0;
  transition:opacity .15s;
}

.bd-chat-msg:hover .bd-react-btn{
  opacity:0.7;
}

.bd-chat-msg:not(:hover) .bd-chat-reactions:has(.bd-reaction) .bd-react-btn{
  opacity:0;
}

.bd-chat-msg-time{
  margin-left:auto;
}

.bd-chat-msg.me .bd-chat-msg-footer{
  background:transparent;
  border:none;
  box-shadow:none;
}

.bd-chat-msg.me .bd-chat-msg-footer .bd-chat-msg-time{
  color:#64748b;
}

.bd-chat__reaction-popover{
  position: fixed;
  z-index: 10050;
  display: grid;
  grid-template-columns: repeat(6, 36px);
  gap: 8px;
  padding: 12px;
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(181, 191, 211, 0.62);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

.bd-chat__reaction-popover.is-hidden{
  display:none;
}

.bd-chat__reaction-choice{
  width:36px;
  height:36px;
  padding:0;
  border:none;
  border-radius:999px;
  background:transparent;
  cursor:pointer;
  font-size:20px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:transform .15s ease, background .15s ease;
}

.bd-chat__reaction-choice:hover{
  background:rgba(212,175,55,.12);
  transform:scale(1.12);
}

[data-theme="dark"] .bd-chat__reaction-popover{
  background: rgba(15,23,42,0.98);
  border-color: rgba(148,163,184,0.22);
  box-shadow: 0 20px 50px rgba(2,6,23,0.42);
}

[data-theme="dark"] .bd-chat__reaction-choice:hover{
  background:rgba(255,255,255,0.08);
}

.bd-reaction{
  animation: popReaction .18s ease;
}

@keyframes popReaction{
  0%{transform:scale(.6); opacity:0}
  100%{transform:scale(1); opacity:1}
}

#perfil-page .bd-space__card--weekly-quiz {
  grid-column: 1 / -1;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 211, 92, 0.22), transparent 22%),
    radial-gradient(circle at 88% 10%, rgba(76, 48, 182, 0.22), transparent 26%),
    radial-gradient(circle at 86% 82%, rgba(31, 197, 184, 0.16), transparent 20%),
    linear-gradient(135deg, rgba(39, 68, 190, 0.08), rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, #ffffff, #f7f5ff 62%, #f4f8ff);
  border: 1px solid rgba(88, 72, 187, 0.12);
  box-shadow:
    0 28px 60px rgba(41, 59, 132, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  overflow: hidden;
  position: relative;
}

#perfil-page .bd-space__card--weekly-quiz::before,
#perfil-page .bd-space__card--weekly-quiz::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

#perfil-page .bd-space__card--weekly-quiz::before {
  inset: 0;
  background:
    radial-gradient(circle at 8% 30%, rgba(255,255,255,0.9) 0 2px, transparent 3px),
    radial-gradient(circle at 14% 72%, rgba(255,219,112,0.65) 0 3px, transparent 4px),
    radial-gradient(circle at 92% 38%, rgba(255,255,255,0.78) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 16%, rgba(110,231,255,0.6) 0 3px, transparent 4px);
  opacity: .85;
}

#perfil-page .bd-space__card--weekly-quiz::after {
  top: -72px;
  right: -72px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(132, 92, 255, 0.28), rgba(132, 92, 255, 0));
}

#perfil-page .bd-weekly-quiz__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  z-index: 1;
}

#perfil-page .bd-weekly-quiz__header > div:first-child {
  position: relative;
  flex: 1 1 auto;
  padding-right: 112px;
}

#perfil-page .bd-weekly-quiz__header > div:first-child::before {
  content: "";
  position: absolute;
  top: -4px;
  right: 16px;
  width: 88px;
  height: 88px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 28% 30%, rgba(255,255,255,0.78) 0 10%, transparent 11%),
    radial-gradient(circle at 72% 70%, rgba(255,219,112,0.88) 0 9%, transparent 10%),
    linear-gradient(145deg, rgba(79, 70, 229, 0.18), rgba(14, 165, 233, 0.22));
  border: 1px solid rgba(93, 77, 206, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 18px 34px rgba(77, 70, 174, 0.14);
  transform: rotate(8deg);
}

#perfil-page .bd-weekly-quiz__header > div:first-child::after {
  content: "🌍🏫";
  position: absolute;
  top: 16px;
  right: 28px;
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 10px 18px rgba(45, 55, 120, 0.18));
}

#perfil-page .bd-weekly-quiz__streak {
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 218, 107, 0.9), rgba(255, 171, 64, 0.95));
  color: #5f2d00;
  font-weight: 800;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    0 12px 24px rgba(255, 171, 64, 0.24);
}

#perfil-page .bd-weekly-quiz__prize {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 24px;
  position: relative;
  z-index: 1;
  background:
    radial-gradient(circle at top right, rgba(255, 219, 112, 0.28), transparent 28%),
    linear-gradient(135deg, rgba(255, 248, 223, 0.98), rgba(255, 255, 255, 0.92) 55%, rgba(239, 246, 255, 0.94));
  border: 1px solid rgba(255, 183, 77, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.88),
    0 18px 34px rgba(255, 183, 77, 0.12);
}

#perfil-page .bd-weekly-quiz__prizeContent {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 18px;
  align-items: center;
}

#perfil-page .bd-weekly-quiz__prizeCopy {
  min-width: 0;
}

#perfil-page .bd-weekly-quiz__prizeEyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.22);
  color: #8a5a00;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#perfil-page .bd-weekly-quiz__prizeTitle {
  margin-top: 12px;
  font-size: 24px;
  font-weight: 900;
  color: var(--color-title);
  line-height: 1.1;
}

#perfil-page .bd-weekly-quiz__prizeText {
  margin-top: 8px;
  max-width: 780px;
  color: var(--color-subtext);
  line-height: 1.55;
}

#perfil-page .bd-weekly-quiz__prizeImage {
  width: 128px;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid rgba(255, 183, 77, 0.34);
  box-shadow:
    0 18px 32px rgba(36, 48, 112, 0.14),
    0 8px 18px rgba(255, 183, 77, 0.18);
  justify-self: end;
  background: #fff;
}

#perfil-page .bd-weekly-quiz__weeks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 16px 0 18px;
  position: relative;
  z-index: 1;
}

#perfil-page .bd-weekly-quiz__weeksSummary.hidden {
  display: none;
}

#perfil-page .bd-weekly-quiz__week {
  text-align: left;
  border: 1px solid rgba(102, 92, 194, 0.18);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,247,255,0.92));
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.88),
    0 10px 22px rgba(53, 69, 153, 0.08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

#perfil-page .bd-weekly-quiz__week.is-active {
  border-color: rgba(255, 183, 77, 0.72);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,246,222,0.95)),
    #fff;
  box-shadow:
    0 18px 30px rgba(255, 183, 77, 0.2),
    0 10px 22px rgba(53, 69, 153, 0.08);
  transform: translateY(-2px);
}

#perfil-page .bd-weekly-quiz__week.is-done em {
  color: #13803d;
}

#perfil-page .bd-weekly-quiz__week strong {
  font-size: 15px;
  color: var(--color-title);
}

#perfil-page .bd-weekly-quiz__week span,
#perfil-page .bd-weekly-quiz__week em {
  font-size: 13px;
  color: var(--color-subtext);
  font-style: normal;
}

#perfil-page .bd-weekly-quiz__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(40, 53, 147, 0.06), rgba(255, 201, 95, 0.12)),
    rgba(255,255,255,.86);
  border: 1px solid rgba(94, 101, 198, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.85),
    0 16px 30px rgba(61, 76, 155, 0.08);
  position: relative;
  z-index: 1;
}

#perfil-page .bd-weekly-quiz__statusTitle {
  font-size: 18px;
  font-weight: 900;
  color: var(--color-title);
}

#perfil-page .bd-weekly-quiz__statusText {
  margin-top: 4px;
  color: var(--color-subtext);
  line-height: 1.45;
}

#perfil-page .bd-weekly-quiz__game {
  margin-top: 18px;
}

#perfil-page .bd-weekly-quiz__question {
  padding: 24px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.14), transparent 22%),
    radial-gradient(circle at 90% 18%, rgba(110,231,255,0.18), transparent 20%),
    linear-gradient(145deg, #221f78, #4f2eb6 58%, #1f6fe5);
  color: #fff;
  box-shadow:
    0 28px 48px rgba(49, 42, 133, 0.28),
    inset 0 1px 0 rgba(255,255,255,0.14);
  position: relative;
  overflow: hidden;
}

#perfil-page .bd-weekly-quiz__question::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 206, 84, 0.24), rgba(255, 206, 84, 0));
  pointer-events: none;
}

#perfil-page .bd-weekly-quiz__questionMeta,
#perfil-page .bd-weekly-quiz__inlineMeta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

#perfil-page .bd-weekly-quiz__questionMeta {
  margin-bottom: 10px;
  font-size: 13px;
  opacity: .95;
  font-weight: 700;
}

#perfil-page .bd-weekly-quiz__question h3 {
  margin: 0;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: #eef4ff;
  text-shadow: 0 10px 24px rgba(17, 24, 39, 0.28);
}

#perfil-page .bd-weekly-quiz__question p {
  margin: 14px 0 0;
  opacity: .92;
  font-size: 17px;
}

#perfil-page .bd-weekly-quiz__answers {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

#perfil-page .bd-weekly-quiz__answer {
  display: flex;
  align-items: center;
  gap: 14px;
  border: none;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f8f6ff);
  color: #1d2143;
  padding: 18px 20px;
  text-align: left;
  cursor: pointer;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.85),
    0 12px 24px rgba(18, 26, 70, 0.18);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

#perfil-page .bd-weekly-quiz__answer:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    0 18px 34px rgba(18, 26, 70, 0.24);
}

#perfil-page .bd-weekly-quiz__answer span {
  font-size: 28px;
}

#perfil-page .bd-weekly-quiz__answer.is-correct {
  outline: 2px solid rgba(50, 170, 98, 0.95);
  background: #effdf4;
}

#perfil-page .bd-weekly-quiz__answer.is-wrong {
  outline: 2px solid rgba(227, 72, 98, 0.95);
  background: #fff2f4;
}

#perfil-page .bd-weekly-quiz__inlineMeta {
  margin-top: 14px;
  font-size: 13px;
  opacity: .88;
}

#perfil-page .bd-weekly-quiz__results {
  padding: 18px 20px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(99, 102, 241, 0.08)),
    rgba(255,255,255,0.88);
  border: 1px solid rgba(34, 197, 94, 0.2);
  box-shadow: 0 16px 30px rgba(30, 64, 175, 0.08);
}

#perfil-page .bd-weekly-quiz__lock {
  padding: 22px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(255, 196, 74, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(230, 239, 255, 0.92), rgba(243, 239, 255, 0.96));
  border: 1px solid rgba(84, 77, 206, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 18px 36px rgba(62, 79, 167, 0.12);
}

#perfil-page .bd-weekly-quiz__lock h3 {
  margin: 12px 0 6px;
  color: var(--color-title);
  font-size: 18px;
}

#perfil-page .bd-weekly-quiz__lock p {
  margin: 0;
  color: var(--color-subtext);
  line-height: 1.5;
}

#perfil-page .bd-weekly-quiz__resultPill {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(59, 130, 246, 0.12));
  color: #157347;
  font-weight: 800;
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

#perfil-page .bd-weekly-quiz__resultGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

#perfil-page .bd-weekly-quiz__resultGrid span {
  display: block;
  font-size: 12px;
  color: var(--color-subtext);
}

#perfil-page .bd-weekly-quiz__resultGrid strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
  color: var(--color-title);
}

#perfil-page .bd-weekly-quiz__leaderboards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

#perfil-page .bd-weekly-quiz__leaderboard {
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(247,249,255,0.9));
  border: 1px solid rgba(88, 72, 187, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.88),
    0 16px 28px rgba(63, 81, 181, 0.08);
}

#perfil-page .bd-weekly-quiz__ranking {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

#perfil-page .bd-weekly-quiz__ranking--full {
  max-height: 360px;
  overflow: auto;
}

#perfil-page .bd-weekly-quiz__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(249,250,255,.96), rgba(244,247,255,.9));
  border: 1px solid rgba(99, 102, 241, 0.06);
}

#perfil-page .bd-weekly-quiz__row.is-current {
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.28), rgba(110, 231, 255, 0.14));
  border: 1px solid rgba(255, 183, 77, 0.45);
  box-shadow: 0 12px 24px rgba(255, 183, 77, 0.14);
}

#perfil-page .bd-weekly-quiz__rank {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffffff, #fff3d5);
  color: #7a4b00;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(255, 183, 77, 0.2);
}

#perfil-page .bd-weekly-quiz__user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

#perfil-page .bd-weekly-quiz__user img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 183, 77, 0.48);
  box-shadow: 0 8px 18px rgba(93, 77, 206, 0.16);
}

#perfil-page .bd-weekly-quiz__user strong,
#perfil-page .bd-weekly-quiz__user span {
  display: block;
}

#perfil-page .bd-weekly-quiz__user strong {
  color: var(--color-title);
}

#perfil-page .bd-weekly-quiz__user span {
  font-size: 12px;
  color: var(--color-subtext);
}

#perfil-page .bd-weekly-quiz__score {
  color: var(--color-title);
  font-size: 18px;
  font-weight: 900;
}

#perfil-page .bd-weekly-quiz__legal {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(88, 72, 187, 0.14);
  position: relative;
  z-index: 1;
}

#perfil-page .bd-weekly-quiz__legalLink {
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(40, 53, 96, 0.72);
  font-size: 12px;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

#perfil-page .bd-weekly-quiz__legalLink:hover {
  color: rgba(25, 39, 86, 0.92);
}

#perfil-page .bd-weekly-quiz__legalModal {
  max-width: 640px;
}

#perfil-page .bd-weekly-quiz__legalBody {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  color: #51606f;
  line-height: 1.6;
}

#perfil-page .bd-weekly-quiz__legalBody p {
  margin: 0;
}

@media (max-width: 900px) {
  #perfil-page .bd-weekly-quiz__leaderboards,
  #perfil-page .bd-weekly-quiz__resultGrid {
    grid-template-columns: 1fr;
  }

  #perfil-page .bd-weekly-quiz__status,
  #perfil-page .bd-weekly-quiz__header,
  #perfil-page .bd-weekly-quiz__prizeContent,
  #perfil-page .bd-weekly-quiz__questionMeta,
  #perfil-page .bd-weekly-quiz__inlineMeta {
    flex-direction: column;
    align-items: flex-start;
  }

  #perfil-page .bd-weekly-quiz__prizeContent {
    display: flex;
  }

  #perfil-page .bd-weekly-quiz__prizeImage {
    width: 112px;
    justify-self: start;
  }

  #perfil-page .bd-weekly-quiz__play {
    width: 100%;
    min-width: 0;
  }

  #perfil-page .bd-weekly-quiz__header > div:first-child {
    padding-right: 0;
    padding-top: 94px;
  }

  #perfil-page .bd-weekly-quiz__header > div:first-child::before {
    right: auto;
    left: 0;
    top: 0;
  }

  #perfil-page .bd-weekly-quiz__header > div:first-child::after {
    right: auto;
    left: 14px;
    top: 19px;
  }
}

@media (max-width: 720px) {
  #perfil-page .bd-weekly-quiz__weeksSummary {
    display: block;
    margin: 14px 0 10px;
  }

  #perfil-page .bd-weekly-quiz__weeksToggle {
    width: 100%;
    border: 1px solid rgba(102, 92, 194, 0.14);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,247,255,0.92));
    padding: 14px 16px;
    display: grid;
    gap: 12px;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,0.88),
      0 10px 22px rgba(53, 69, 153, 0.08);
  }

  #perfil-page .bd-weekly-quiz__weeksToggleMeta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--color-title);
    font-size: 0.92rem;
  }

  #perfil-page .bd-weekly-quiz__weeksToggleMeta span {
    color: var(--color-subtext);
    font-size: 0.86rem;
  }

  #perfil-page .bd-weekly-quiz__weeksToggleMeta strong {
    color: var(--color-title);
    font-size: 0.96rem;
  }

  #perfil-page .bd-weekly-quiz__weeksDots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  #perfil-page .bd-weekly-quiz__weeksDot {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(188, 198, 216, 0.82);
    background: rgba(255,255,255,0.96);
    flex: 0 0 18px;
  }

  #perfil-page .bd-weekly-quiz__weeksDot.is-done {
    background: #16a34a;
    border-color: #16a34a;
  }

  #perfil-page .bd-weekly-quiz__weeksDot.is-done::before {
    content: "✓";
    color: #fff;
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1;
  }

  #perfil-page .bd-weekly-quiz__weeksDot.is-pending {
    border-color: rgba(255, 183, 77, 0.9);
    background: rgba(255, 246, 222, 0.96);
  }

  #perfil-page .bd-weekly-quiz__weeksDot.is-locked {
    border-color: rgba(188, 198, 216, 0.82);
    background: rgba(255,255,255,0.82);
  }

  #perfil-page .bd-weekly-quiz__weeksDot.is-selected {
    box-shadow: 0 0 0 4px rgba(255, 183, 77, 0.14);
    transform: scale(1.04);
  }

  #perfil-page .bd-weekly-quiz__weeksToggle.is-expanded {
    border-color: rgba(255, 183, 77, 0.38);
  }

  #perfil-page .bd-weekly-quiz__weeks.is-collapsed {
    display: none;
  }

  #perfil-page .bd-weekly-quiz__row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px 12px;
  }

  #perfil-page .bd-weekly-quiz__rank {
    grid-row: 1 / span 2;
  }

  #perfil-page .bd-weekly-quiz__user {
    grid-column: 2;
    grid-row: 1;
    align-items: flex-start;
  }

  #perfil-page .bd-weekly-quiz__user > div {
    min-width: 0;
  }

  #perfil-page .bd-weekly-quiz__user strong {
    line-height: 1.2;
    word-break: break-word;
  }

  #perfil-page .bd-weekly-quiz__score {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: start;
    font-size: 1.4rem;
    line-height: 1;
  }

  [data-theme="dark"] #perfil-page .bd-weekly-quiz__weeksToggle {
    background: linear-gradient(180deg, rgba(17,24,39,0.96), rgba(15,23,42,0.94));
    border-color: rgba(255,255,255,0.08);
  }

  [data-theme="dark"] #perfil-page .bd-weekly-quiz__weeksToggleMeta span {
    color: #9fb0c7;
  }

  [data-theme="dark"] #perfil-page .bd-weekly-quiz__weeksToggleMeta strong {
    color: #f8fafc;
  }

[data-theme="dark"] #perfil-page .bd-weekly-quiz__weeksDot.is-locked {
    border-color: rgba(148, 163, 184, 0.54);
    background: rgba(15,23,42,0.92);
  }
}

/* Safari clips descendants of the rounded, filtered header even with overflow visible. */
.user-avatar__ring-menu.is-portaled,
#perfil-page .user-avatar__ring-menu.is-portaled{
  position: fixed !important;
  right: auto !important;
  z-index: 9000 !important;
}
