/* MultiPortalDashboard styles extracted from the SFC to keep access-control modules below 600 lines. */
.multi-portal-overlay {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  background: rgba(3, 6, 15, 0.99);
  backdrop-filter: blur(24px);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  font-family: 'Outfit', sans-serif;
  inset: 0;
  overflow: hidden;
  position: fixed;
  z-index: 100;
}

.multi-portal-overlay * {
  box-sizing: border-box;
}

.access-session-panel {
  align-items: center;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 8px;
  display: flex;
  gap: 0.6rem;
  padding: 0.45rem 0.55rem 0.45rem 0.75rem;
}

.portal-header {
  flex-wrap: wrap;
  gap: 1rem;
}

.portal-workspace,
.portal-main {
  min-width: 0;
}

.portal-sidebar {
  flex: 0 0 16rem;
  width: 16rem;
}

.access-session-panel span {
  color: #d4af37;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.access-session-panel select {
  appearance: none;
  background: rgba(3, 6, 15, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  outline: none;
  padding: 0.45rem 1.8rem 0.45rem 0.65rem;
}

.change-profile-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0.68rem 0.85rem;
}

.change-profile-btn:hover {
  border-color: rgba(212, 175, 55, 0.32);
  color: #fff;
}

.tab-label-stack {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.tab-label-stack small {
  color: rgba(148, 163, 184, 0.72);
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-top: 0.15rem;
  text-transform: uppercase;
}

.sidebar-item.is-locked {
  opacity: 0.52;
}

.lock-mark {
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 4px;
  color: #fca5a5;
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.25rem;
}

.role-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  gap: 0.85rem;
  padding: 1rem;
}

.role-avatar {
  align-items: center;
  background: #d4af37;
  border-radius: 8px;
  color: #06101f;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 1000;
  height: 2.25rem;
  justify-content: center;
  width: 2.25rem;
}

.role-card strong {
  color: #fff;
  display: block;
  font-size: 0.78rem;
}

.role-card p {
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0.15rem 0 0;
  text-transform: uppercase;
}

.access-context-bar {
  align-items: center;
  background: rgba(4, 8, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
}

.access-context-bar span {
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.access-context-bar strong {
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 999px;
  color: #d4af37;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.65rem;
  text-transform: uppercase;
}

.access-context-bar small {
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-access-frame {
  min-width: 0;
  position: relative;
}

.read-only-banner {
  align-items: center;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 10px;
  color: #bfdbfe;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
}

.read-only-banner strong {
  color: #93c5fd;
  font-size: 0.68rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.read-only-banner span {
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 800;
}

.portal-access-frame.is-read-only button,
.portal-access-frame.is-read-only input,
.portal-access-frame.is-read-only select,
.portal-access-frame.is-read-only textarea,
.portal-access-frame.is-read-only a[href] {
  cursor: not-allowed !important;
}

.portal-access-frame.is-read-only button:not(.read-only-banner button),
.portal-access-frame.is-read-only input,
.portal-access-frame.is-read-only select,
.portal-access-frame.is-read-only textarea {
  opacity: 0.68;
}

.access-denied-panel {
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.16), rgba(15, 23, 42, 0.62));
  border: 1px solid rgba(248, 113, 113, 0.22);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 22rem;
  justify-content: center;
  padding: 3rem;
}

.denied-mark {
  color: #fca5a5;
  font-size: 0.68rem;
  font-weight: 1000;
  letter-spacing: 0.22em;
}

.access-denied-panel h2 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  margin: 0;
}

.access-denied-panel p {
  color: #cbd5e1;
  line-height: 1.7;
  margin: 0;
  max-width: 42rem;
  overflow-wrap: anywhere;
}

.denied-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.denied-actions button {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 8px;
  color: #d4af37;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0.8rem 1rem;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .multi-portal-overlay {
    overflow-x: hidden;
  }

  .portal-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem;
  }

  .portal-header > div {
    flex-wrap: wrap;
    min-width: 0;
    width: 100%;
  }

  .portal-header > div:last-child {
    align-items: stretch;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr;
  }

  .portal-header h1 {
    font-size: 1rem;
    line-height: 1.2;
    max-width: 12rem;
  }

  .access-session-panel {
    max-width: 100%;
  }

  .access-session-panel select {
    flex: 1;
    max-width: 100%;
    min-width: 0;
  }

  .close-portal-btn {
    max-width: 100%;
    width: 100%;
  }

  .change-profile-btn {
    width: 100%;
  }

  .portal-workspace {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .portal-sidebar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 0;
    flex: 0 0 auto;
    padding-bottom: 1rem;
    padding-top: 1rem;
    width: 100%;
  }

  .portal-sidebar > div:first-child {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    overflow-x: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    scrollbar-width: none;
  }

  .portal-sidebar > div:first-child::-webkit-scrollbar {
    display: none;
  }

  .portal-sidebar > div:first-child > span {
    display: none;
  }

  .sidebar-item {
    flex: 0 0 11.5rem;
    min-height: 4.8rem;
  }

  .role-card {
    display: none;
  }

  .portal-main {
    flex: 1 0 auto;
    max-width: 100%;
    overflow: visible;
    padding: 1rem;
    width: 100%;
  }

  .access-context-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .access-denied-panel {
    min-height: 20rem;
    max-width: 100%;
    padding: 1.5rem;
    width: 100%;
  }

  .access-denied-panel h2 {
    font-size: 2.3rem;
    overflow-wrap: anywhere;
  }

  .access-denied-panel p {
    font-size: 0.95rem;
    max-width: 100%;
    width: 100%;
  }

  .access-denied-panel p strong {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .denied-actions {
    flex-direction: column;
    width: 100%;
  }

  .denied-actions button {
    width: 100%;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(1.01); }
  to { opacity: 1; transform: scale(1); }
}

.portal-fade-enter-active,
.portal-fade-leave-active {
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.portal-fade-enter-from,
.portal-fade-leave-to {
  opacity: 0;
  transform: translateY(5px);
}
