.portal-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.portal-page__main {
  flex: 1 0 auto;
}

.portal-page__shell {
  margin: 0 auto;
  max-width: 100rem;
  padding: 1.5rem 2rem 3rem;
}

.portal-page__card {
  align-items: center;
  background: var(--color-white, #ffffff);
  border: 1px solid rgba(9, 32, 46, 0.06);
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(9, 32, 46, 0.06);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 22rem;
  padding: 3rem 2rem;
  text-align: center;
}

.portal-page__title {
  color: var(--color-primary, #09202e);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

.portal-page__message {
  color: var(--color-primary, #09202e);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
  margin: 0;
  max-width: 58rem;
}

.portal-page__message p {
  margin: 0;
}

.portal-home-header {
  background: rgba(255, 255, 255);
  border-bottom: 1px solid rgba(9, 32, 46, 0.08);
  box-shadow: 0 12px 32px rgba(9, 32, 46, 0.06);
  position: sticky;
  top: 0;
  z-index: 10;
}

.portal-home-header__inner {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 180px) 1fr auto;
  margin: 0 auto;
  max-width: 120rem;
  padding: 0.5rem 1.5rem;
}

.portal-home-header__brand {
  display: inline-flex;
}

.portal-home-header__logo {
  display: block;
  height: 2.875rem;
  object-fit: contain;
  width: 11.25rem;
}

.portal-home-header__title-wrap {
  display: grid;
  justify-items: center;
  text-align: center;
}

.portal-home-header__title {
  color: var(--color-primary);
  font-size: var(--font-size-32);
  font-weight: var(--font-weight-semibold);
  line-height: 1.05;
  margin: 0;
}

.portal-home-header__title-brand {
  color: var(--color-secondary);
}

.portal-home-header__title-text {
  color: var(--color-primary);
}

.portal-home-profile {
  position: relative;
}

.portal-home-profile__avatar {
  background-color: var(--color-gray-200);
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  padding: 0.5rem;
}

.portal-home-profile__trigger {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: none;
  display: inline-flex;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.5rem 0.75rem;
}

.portal-home-profile__copy {
  align-items: flex-start;
  color: var(--color-primary);
  display: flex;
  flex-direction: column;
  text-align: left;
}

.portal-home-profile__name {
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-semibold);
  line-height: 1.5;
}

.portal-home-profile__meta {
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-regular);
  line-height: 1.5;
}

.portal-home-profile__menu {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(9, 32, 46, 0.12);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  display: none;
  min-width: 15rem;
  padding: 0.5rem;
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
}

.portal-home-profile.is-open .portal-home-profile__menu {
  display: grid;
  gap: 0.25rem;
}

.portal-home-profile__menu-item {
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-medium);
  justify-content: flex-start;
  padding: 0.75rem 0.875rem;
  text-align: left;
}

.portal-home-profile__menu-item--identity {
  border-bottom: 1px solid rgba(9, 32, 46, 0.08);
  border-radius: 0;
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin-bottom: 0.25rem;
  padding-bottom: 0.75rem;
  pointer-events: none;
}

.portal-home-profile__menu-name {
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
}

.portal-home-profile__menu-meta {
  color: var(--color-gray-700);
  font-size: var(--font-size-14);
  font-weight: var(--font-weight-regular);
  line-height: 1.4;
}

.portal-home-profile__menu-item:hover,
.portal-home-profile__menu-item:focus-visible {
  background: rgba(9, 32, 46, 0.06);
}

.portal-home-breadcrumb,
.forgot-password-page__crumb {
  align-items: center;
  background: var(--color-white, #ffffff);
  border: 1px solid rgba(9, 32, 46, 0.08);
  border-radius: var(--radius-sm, 0.5rem);
  box-shadow: var(--shadow-soft, 0 12px 32px rgba(9, 32, 46, 0.06));
  box-sizing: border-box;
  display: flex;
  width: 100%;
}

.portal-home-breadcrumb {
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.875rem 1rem;
}

.forgot-password-page__crumb {
  margin-bottom: 1.25rem;
  min-height: 3.25rem;
  padding: 0 1.5rem;
}

.portal-home-breadcrumb__label {
  color: var(--color-primary, #09202e);
  font-size: var(--font-size-14, 0.875rem);
  font-weight: var(--font-weight-medium, 500);
  line-height: 1.25;
}

.portal-home-breadcrumb__icon,
.portal-home-breadcrumb__separator {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
}

.portal-home-footer {
  background: var(--color-white, #ffffff);
  border-top: 1px solid rgba(9, 32, 46, 0.08);
  margin-top: auto;
  padding: 1rem 1.5rem;
}

.portal-home-footer__inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin: 0 auto;
  max-width: 120rem;
  text-align: right;
}

.portal-home-footer__links,
.portal-home-footer__links a {
  color: var(--color-blue, #4a83ff);
  font-size: var(--font-size-14, 0.875rem);
  font-weight: var(--font-weight-medium, 500);
  line-height: 1rem;
}

.portal-home-footer__copy {
  color: var(--color-gray-700, #70747d);
  font-size: var(--font-size-14, 0.875rem);
  font-weight: var(--font-weight-regular, 400);
  line-height: 1rem;
  margin: 0;
  white-space: normal;
}

.expandable-panel {
  background: var(--color-white, #ffffff);
  border: 1px solid rgba(9, 32, 46, 0.08);
  border-radius: 0.375rem;
  overflow: hidden;
}

.expandable-panel__toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--color-primary, #09202e);
  cursor: pointer;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  text-align: left;
  width: 100%;
}

.expandable-panel__title {
  font-size: var(--font-size-16, 1rem);
  font-weight: var(--font-weight-semibold, 600);
  line-height: 1.3;
}

.expandable-panel__chevron {
  display: inline-flex;
  flex-shrink: 0;
  transform: rotate(-90deg);
  transition: transform 180ms ease;
}

.expandable-panel.is-expanded .expandable-panel__chevron {
  transform: rotate(0deg);
}

.expandable-panel__body {
  max-height: 0;
  opacity: 1;
  overflow: hidden;
  padding: 0 1.5rem 1.5rem;
  transition: max-height 220ms ease;
}

@media (max-width: 1080px) {
  .portal-home-header__inner {
    grid-template-columns: auto 1fr auto;
    justify-items: stretch;
  }

  .portal-home-profile {
    justify-self: end;
  }

  .portal-home-profile__trigger {
    justify-content: flex-end;
    width: auto;
  }
}

@media (max-width: 720px) {
  .portal-home-header__inner {
    gap: 0.75rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0.875rem 1rem;
  }

  .portal-home-header__logo {
    height: 2.5rem;
    width: 2.5rem;
  }

  .portal-home-header__title-wrap {
    align-items: center;
    display: flex;
    justify-items: start;
    text-align: left;
  }

  .portal-home-header__title {
    font-size: 1rem;
    white-space: nowrap;
  }

  .portal-home-header__title-text {
    display: inline;
  }

  .portal-home-header__brand {
    align-items: center;
    justify-self: start;
  }

  .portal-home-header__brand picture {
    display: inline-flex;
  }

  .portal-home-profile__trigger {
    border-radius: 999px;
    gap: 0;
    justify-content: center;
    min-height: 0;
    padding: 0;
  }

  .portal-home-profile__avatar {
    padding: 0.375rem;
  }

  .portal-home-profile__copy,
  .portal-home-profile__chevron {
    display: none;
  }

  .portal-home-profile__menu {
    min-width: 13rem;
  }

  .portal-page__shell {
    padding: 1rem 1rem 2rem;
  }

  .portal-page__card {
    gap: 1rem;
    min-height: 0;
    padding: 2rem 1.25rem;
  }

  .portal-page__title {
    font-size: 1.25rem;
  }

  .portal-page__message {
    font-size: 1rem;
    line-height: 1.6;
  }

  .forgot-password-page__crumb {
    min-height: 3.25rem;
    padding: 0 1rem;
  }

  .portal-home-footer__inner {
    justify-content: center;
    text-align: center;
  }

  .portal-home-footer__copy {
    white-space: normal;
  }

  .expandable-panel__toggle {
    padding: 1rem 1rem 0.875rem;
  }

  .expandable-panel__body {
    padding: 0 1rem 1rem;
  }
}
