.topbarActions,
.topbar-nav,
.mobileMenuCtas,
.panel-session {
  position: relative;
}

@media (min-width: 981px) {
  .topbarActions {
    margin-left: auto;
    padding-right: 0;
  }

  .topbarActions [data-auth-link] {
    margin-right: -6px;
  }
}

.auth-profile-menu {
  position: absolute;
  top: calc(100% + 0.7rem);
  right: 0;
  z-index: 160;
  width: min(92vw, 300px);
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.26s cubic-bezier(.22, 1, .36, 1);
}

.auth-profile-menu.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.auth-profile-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(18, 18, 28, 0.94);
  color: #fff;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.auth-profile-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.auth-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.auth-profile-copy {
  min-width: 0;
}

.auth-profile-name,
.auth-profile-username {
  margin: 0;
}

.auth-profile-name {
  font-weight: 700;
  line-height: 1.2;
}

.auth-profile-username {
  margin-top: 0.24rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.auth-profile-actions {
  display: grid;
  gap: 0.65rem;
}

.auth-profile-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
}

.auth-profile-action.danger {
  background: linear-gradient(135deg, rgba(255, 103, 124, 0.22), rgba(255, 142, 160, 0.22));
}

.global-welcome-toast,
.welcome-toast {
  transform: translate(-50%, -26px) scale(0.94);
  filter: blur(10px);
  transition:
    transform 0.56s cubic-bezier(.22, 1, .36, 1),
    opacity 0.34s ease,
    filter 0.42s ease !important;
}

.global-welcome-toast.is-visible,
.welcome-toast.is-visible {
  transform: translate(-50%, 0) scale(1);
  filter: blur(0);
}

.global-welcome-toast-card,
.welcome-toast-card {
  animation: sessionToastPulse 0.85s ease;
}

@keyframes sessionToastPulse {
  0% {
    transform: scale(0.96);
  }
  55% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

.auth-profile-actions{ gap: 8px !important; }
.auth-profile-action{ display: flex !important; justify-content: flex-start !important; gap: 12px !important; padding-left: 18px !important; text-align: left !important; }
.auth-profile-action i{ width: 20px; text-align: center; font-size: 15px; opacity: .85; }

.jisooRail{ position: fixed; z-index: 60; left: 18px; top: 50%; transform: translateY(-50%); display: grid; gap: 8px; padding: 10px; border-radius: 24px; background: rgba(255,255,255,.88); border: 1px solid rgba(123,63,228,.18); box-shadow: 0 18px 40px rgba(44,27,84,.14); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: railIn .45s cubic-bezier(.22,1,.36,1); }
@keyframes railIn{ from{ opacity: 0; transform: translate(-16px, -50%); } to{ opacity: 1; transform: translate(0, -50%); } }
.railItem{ position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: #7B3FE4; background: transparent; text-decoration: none; font-size: 18px; transition: background .15s ease, color .15s ease, transform .15s ease; }
.railItem:hover{ background: #F1ECFF; transform: translateX(2px); }
.railItem.is-active{ background: #6A35D0; color: #fff; }
.railItem img{ width: 48px; height: 48px; border-radius: 15px; object-fit: cover; border: 2px solid #fff; box-shadow: 0 0 0 2px #D9CCFF; }
.railItem.is-active img{ box-shadow: 0 0 0 2px #6A35D0; }
.railSep{ height: 1px; margin: 2px 6px; background: rgba(123,63,228,.22); }
.railItem::after{ content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; transform: translate(-6px, -50%); padding: 7px 12px; border-radius: 10px; background: #6A35D0; color: #fff; font: 700 13px/1 "Plus Jakarta Sans", sans-serif; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; }
.railItem:hover::after{ opacity: 1; transform: translate(0, -50%); }

@media (max-width: 1280px){
  .jisooRail{ left: 50%; top: auto; bottom: 14px; transform: translateX(-50%); grid-auto-flow: column; padding: 8px; border-radius: 22px; animation-name: railUp; }
  @keyframes railUp{ from{ opacity: 0; transform: translate(-50%, 16px); } to{ opacity: 1; transform: translate(-50%, 0); } }
  .railSep{ width: 1px; height: auto; margin: 6px 2px; }
  .railItem{ width: 46px; height: 46px; }
  .railItem img{ width: 46px; height: 46px; }
  .railItem::after{ display: none; }
  body.hasRail{ padding-bottom: 80px; }
  body.hasRail .copyToast{ bottom: 92px; }
}

.railItem.railLogin{ background: #5865F2; color: #fff; animation: railNudge 2.4s ease-in-out infinite; }
.railItem.railLogin:hover{ background: #4752C4; }
@keyframes railNudge{ 0%,100%{ box-shadow: 0 0 0 0 rgba(88,101,242,.45); } 50%{ box-shadow: 0 0 0 8px rgba(88,101,242,0); } }
.railItem.isLocked{ color: #B9A3F0; }
.railLock{ position: absolute; right: 3px; bottom: 3px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #fff; color: #7B3FE4; font-size: 8px; box-shadow: 0 0 0 1px rgba(123,63,228,.3); }
@media (prefers-reduced-motion: reduce){ .railItem.railLogin{ animation: none; } }

.railItem.railCenter{ width: 54px; height: 54px; border-radius: 17px; }
.railItem.railCenter img{ width: 54px; height: 54px; border-radius: 17px; }
@media (max-width: 1280px){
  .railItem.railCenter{ width: 52px; height: 52px; box-shadow: 0 8px 20px rgba(44,27,84,.25); }
  .railItem.railCenter img{ width: 52px; height: 52px; }
}
@media (max-width: 440px){
  .jisooRail{ gap: 4px; padding: 6px; bottom: 10px; }
  .railItem{ width: 40px; height: 40px; border-radius: 13px; font-size: 16px; }
  .railItem img{ width: 40px; height: 40px; border-radius: 13px; }
  .railItem.railCenter, .railItem.railCenter img{ width: 48px; height: 48px; border-radius: 15px; }
  .railSep{ margin: 6px 1px; }
}

/* barra: estilo más limpio */
.jisooRail .railSep{ display: none; }
.jisooRail{ align-items: center; justify-items: center; }
.railItem.is-active{ background: #EEE7FF; color: #6A35D0; box-shadow: inset 0 0 0 1.5px #D9CCFF; }
.railItem.is-active::before{ content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #7B3FE4; }
@media (min-width: 1281px){ .railItem.is-active::before{ left: -9px; top: 50%; margin-top: -2.5px; } }
@media (max-width: 1280px){
  .railItem.is-active::before{ bottom: -7px; left: 50%; margin-left: -2.5px; }
  .railItem.railCenter{ margin: 0 6px; box-shadow: 0 6px 16px rgba(88,101,242,.35); }
  .railItem.railCenter:has(img){ box-shadow: 0 6px 16px rgba(44,27,84,.25); }
}
.railItem.railCenter img{ border: 2px solid #fff; box-shadow: 0 0 0 2px #C9B8FF; }

/* casita al inicio, separada arriba del menú lateral */
.jisooRailHome{ position: fixed; z-index: 60; left: 18px; top: 12px; display: grid; place-items: center; width: 68px; height: 56px; border-radius: 20px; background: rgba(255,255,255,.9); border: 1px solid rgba(123,63,228,.18); box-shadow: 0 12px 28px rgba(44,27,84,.12); color: #7B3FE4; font-size: 18px; text-decoration: none; backdrop-filter: blur(12px); transition: transform .15s ease, background .15s ease; }
.jisooRailHome:hover{ background: #F1ECFF; transform: translateY(-2px); }
.jisooRailHome::after{ content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; transform: translate(-6px, -50%); padding: 7px 12px; border-radius: 10px; background: #6A35D0; color: #fff; font: 700 13px/1 "Plus Jakarta Sans", sans-serif; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; }
.jisooRailHome:hover::after{ opacity: 1; transform: translate(0, -50%); }
@media (max-width: 1280px){ .jisooRailHome{ display: none; } }

/* la casita entra con la misma animación que la barra lateral */
.jisooRailHome{ animation: railHomeIn .45s cubic-bezier(.22,1,.36,1); }
@keyframes railHomeIn{ from{ opacity: 0; transform: translateX(-16px); } to{ opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce){ .jisooRail, .jisooRailHome{ animation: none; } }

/* icono del dashboard: estrella grande de 4 puntas + dos estrellitas */
.fa-solid.jIconSparkle::before{ content: ""; display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -0.15em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3Cmask id='m'%3E%3Crect width='24' height='24' fill='white'/%3E%3Cpath d='M19.50 10.48 L20.36 13.90 L23.75 14.88 L20.76 16.75 L20.88 20.27 L18.18 18.01 L14.86 19.21 L16.18 15.94 L14.01 13.16 L17.53 13.40Z' fill='black' stroke='black' stroke-width='3' stroke-linejoin='round'/%3E%3C/mask%3E%3C/defs%3E%3Cg stroke-linejoin='round' stroke-width='1.6'%3E%3Cpath d='M6.97 4.07 L10.82 8.99 L17.00 8.12 L13.51 13.30 L16.25 18.91 L10.25 17.20 L5.75 21.53 L5.53 15.29 L0.02 12.36 L5.89 10.22Z' fill='black' stroke='black' mask='url(%23m)'/%3E%3Cpath d='M19.50 10.48 L20.36 13.90 L23.75 14.88 L20.76 16.75 L20.88 20.27 L18.18 18.01 L14.86 19.21 L16.18 15.94 L14.01 13.16 L17.53 13.40Z' fill='black' stroke='black'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cdefs%3E%3Cmask id='m'%3E%3Crect width='24' height='24' fill='white'/%3E%3Cpath d='M19.50 10.48 L20.36 13.90 L23.75 14.88 L20.76 16.75 L20.88 20.27 L18.18 18.01 L14.86 19.21 L16.18 15.94 L14.01 13.16 L17.53 13.40Z' fill='black' stroke='black' stroke-width='3' stroke-linejoin='round'/%3E%3C/mask%3E%3C/defs%3E%3Cg stroke-linejoin='round' stroke-width='1.6'%3E%3Cpath d='M6.97 4.07 L10.82 8.99 L17.00 8.12 L13.51 13.30 L16.25 18.91 L10.25 17.20 L5.75 21.53 L5.53 15.29 L0.02 12.36 L5.89 10.22Z' fill='black' stroke='black' mask='url(%23m)'/%3E%3Cpath d='M19.50 10.48 L20.36 13.90 L23.75 14.88 L20.76 16.75 L20.88 20.27 L18.18 18.01 L14.86 19.21 L16.18 15.94 L14.01 13.16 L17.53 13.40Z' fill='black' stroke='black'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }
.jisooRailHome.isDash{ color: #7B3FE4; font-size: 20px; }

/* ===================== panel lateral (menú) ===================== */
/* el botón de menú también se ve en PC: abre el mismo panel */
.topbarActions .menuBtn{ display: inline-flex; }
.jisooRailHome.isDash{ color: #7B3FE4; }

.mobileMenu .mobileMenuOverlay{ background: rgba(28,14,56,.28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
@media (min-width: 981px){
  .mobileMenu .mobileMenuPanel{
    top: 12px; right: 12px; bottom: 12px;
    width: 372px; padding: 20px 18px 18px;
    border-radius: 28px;
    box-shadow: 0 2px 6px rgba(44,27,84,.05), 0 40px 80px -24px rgba(74,38,141,.45);
    transform: translateX(calc(100% + 28px));
    transition: transform .42s cubic-bezier(.22, 1, .36, 1);
  }
  .mobileMenu:not(.is-open) .mobileMenuPanel{ transition-duration: .26s; transition-timing-function: cubic-bezier(.4, 0, 1, 1); }
  /* en PC las secciones ya están en la barra de arriba */
  .mobileMenu .mobileNav{ display: none; }
}

/* los bloques entran uno tras otro al abrir */
.mobileMenu.is-open .mobileMenuPanel > *{ animation: drawerIn .45s cubic-bezier(.22, 1, .36, 1) both; }
.mobileMenu.is-open .mobileMenuPanel > *:nth-child(2){ animation-delay: .05s; }
.mobileMenu.is-open .mobileMenuPanel > *:nth-child(3){ animation-delay: .1s; }
.mobileMenu.is-open .mobileMenuPanel > *:nth-child(4){ animation-delay: .15s; }
.mobileMenu.is-open .mobileMenuPanel > *:nth-child(5){ animation-delay: .2s; }
.mobileMenu.is-open .mobileMenuPanel > *:nth-child(n+6){ animation-delay: .25s; }
@keyframes drawerIn{ from{ opacity: 0; transform: translateX(18px); } to{ opacity: 1; transform: none; } }

.drawerLabel{ display: flex; align-items: center; gap: 7px; margin: 18px 4px 8px; color: var(--muted, #736F87); font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.drawerLabel i{ color: var(--lav-600, #7B3FE4); font-size: 12px; }

.drawerMe{ display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 20px; background: var(--lav-50, #F7F5FE); border: 1px solid var(--line, #E9E8F3); color: var(--ink, #2C1B54); text-decoration: none; transition: background .18s ease, border-color .18s ease; }
.drawerMe img, .drawerMeAv{ width: 52px; height: 52px; border-radius: 16px; object-fit: cover; flex: none; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--lav-300, #CFC4FF); }
.drawerMeAv{ display: grid; place-items: center; background: var(--lav-200, #E2DCFF); color: var(--lav-700, #6435BE); }
.drawerMe > span:not(.drawerMeAv){ display: grid; flex: 1; min-width: 0; }
.drawerMe b{ font: 800 17px/1.2 var(--font-display, inherit); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawerMe small{ color: var(--muted, #736F87); font-size: 13px; }
.drawerMe > i{ color: var(--lav-500, #9978F5); font-size: 13px; transition: transform .2s ease; }
.drawerMe:hover{ background: var(--lav-100, #EFECFF); border-color: var(--lav-300, #CFC4FF); }
.drawerMe:hover > i{ transform: translateX(3px); }

.drawerGrid{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.drawerGrid a{ display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line, #E9E8F3); color: var(--ink, #2C1B54); font-weight: 700; font-size: 14px; text-decoration: none; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.drawerGrid a i{ width: 18px; text-align: center; color: var(--lav-600, #7B3FE4); font-size: 15px; }
.drawerGrid a:hover{ background: var(--lav-50, #F7F5FE); border-color: var(--lav-300, #CFC4FF); }
.drawerGrid a:active{ transform: scale(.97); }

.langSeg{ margin-bottom: 14px; }
.langSegTrack{ position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px; border-radius: 16px; background: var(--lav-50, #F7F5FE); border: 1px solid var(--line, #E9E8F3); }
.langSegThumb{ position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(44,27,84,.08), 0 6px 14px -6px rgba(74,38,141,.35); transform: translateX(calc(var(--k, 0) * 100%)); transition: transform .32s cubic-bezier(.22, 1, .36, 1); }
.langSegTrack button{ position: relative; z-index: 1; min-height: 40px; border: 0; background: none; border-radius: 12px; color: var(--ink-2, #4E4961); font: 700 13.5px/1 var(--font-body, inherit); cursor: pointer; transition: color .2s ease; }
.langSegTrack button.is-current{ color: var(--lav-700, #6435BE); }
.langSegTrack button:focus-visible{ outline: 2px solid var(--lav-600, #7B3FE4); outline-offset: 1px; }
.langSeg.isFloating{ position: fixed; left: 16px; bottom: 16px; z-index: 90; width: 300px; padding: 10px; border-radius: 18px; background: #fff; box-shadow: 0 20px 40px -16px rgba(74,38,141,.35); }
.langSeg.isFloating .drawerLabel{ margin-top: 2px; }

.drawerOut{ display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; margin-top: 10px; border-radius: 14px; color: #C04F83; font-weight: 800; font-size: 14px; text-decoration: none; transition: background .16s ease; }
.drawerOut:hover{ background: #FFF0F5; }

@media (prefers-reduced-motion: reduce){
  .mobileMenu.is-open .mobileMenuPanel > *{ animation: none; }
  .langSegThumb{ transition: none; }
}
/* con sesión, "dashboard" ya está en "tu panel": no repetirlo en la lista de secciones */
.mobileMenuPanel:has(.drawerPanel) .mobileNav a.navDash{ display: none; }
.mobileMenu .mobileNav{ margin-top: 6px; }

/* acceso único al dashboard dentro del menú */
.drawerDash{ display: flex; align-items: center; gap: 10px; min-height: 52px; margin-top: 10px; padding: 0 16px; border-radius: 16px; background: linear-gradient(120deg, #7B3FE4, #9978F5); color: #fff; font-weight: 800; font-size: 15px; text-decoration: none; box-shadow: 0 10px 22px -12px rgba(74,38,141,.6); transition: transform .16s ease, box-shadow .16s ease; }
.drawerDash span{ flex: 1; }
.drawerDash:hover{ transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgba(74,38,141,.7); }
.drawerDash:active{ transform: scale(.98); }
/* en celular "dashboard" ya está en la lista de secciones */
@media (max-width: 980px){ .drawerDash{ display: none; } }
.mobileMenuPanel:has(.drawerPanel) .mobileNav a.navDash{ display: block; }
