/* Approved Loro Piana top navigation. Load after corporate-heritage.css.
   Visual tokens and components only: no changes to permissions or form behavior. */
.portal-modern {
  --hff-dark: #252b2c;
  --hff-gold: #947523;
  --hff-gold-dark: #725a1c;
  --hff-ivory-warm: #f6f1e4;
  --hff-muted: #626f73;
  --hff-border: #e4e8e8;
  --hff-surface: #fff;
  --portal-canvas: #f5f7f7;
  --bs-body-font-family: "Segoe UI", Arial, sans-serif;
  --bs-link-color: #725a1c;
  --bs-link-hover-color: #4d3d14;
  margin: 0;
  color: var(--hff-dark);
  background: var(--portal-canvas);
  font: .94rem/1.5 "Segoe UI", Arial, sans-serif;
}
.portal-modern *, .portal-modern *::before, .portal-modern *::after { box-sizing: border-box; }
.portal-modern :is(button, input, select, textarea) { font: inherit; }
.portal-modern :is(a, button, summary):focus-visible {
  outline: 3px solid #94752399;
  outline-offset: 3px;
}
.portal-icon {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
  vertical-align: -.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.portal-header { width: 100%; }
.portal-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
  padding: 15px 30px;
  color: #eef1f1;
  background: #242829;
}
.portal-brand { flex: 0 0 auto; display: flex; align-items: center; text-decoration: none; }
.portal-brand .tenant-branding--wordmark img { display: block; width: 260px; height: 46px; object-fit: contain; object-position: left center; }
.portal-user-tools { display: flex; align-items: center; justify-content: flex-end; gap: 1.2rem; min-width: 0; }
.portal-user-tools .navbar-nav {
  display: flex; flex-direction: row; align-items: center; gap: .3rem;
  list-style: none; padding: 0; margin: 0;
}
.portal-user-tools :is(.nav-item, form) { display: flex; align-items: center; margin: 0; }
.portal-user-tools .nav-link, .portal-user-tools .culture-selector > summary {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 40px; margin: 0; padding: .4rem 0;
  color: #eef1f1; background: transparent; border: 0;
  font: .85rem/1.4 "Segoe UI", Arial, sans-serif;
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.portal-user-tools .nav-link:hover, .portal-user-tools .culture-selector > summary:hover { color: #fff; }
.portal-account-label { max-width: 24rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-user-tools .culture-selector { display: block; position: relative; margin: 0; }
.portal-user-tools .culture-selector > summary { list-style: none; }
.portal-user-tools .culture-selector > summary::after { content: none; }
.portal-user-tools .culture-selector > summary::-webkit-details-marker { display: none; }
.portal-user-tools .culture-selector > summary .portal-icon:last-child { width: .85rem; }
.portal-user-tools .culture-selector__options {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 1000;
  width: max-content; min-width: 155px; margin: 0; padding: 6px;
  border: 1px solid var(--hff-border); border-radius: 8px;
  background: #fff; box-shadow: 0 8px 30px #1723251c;
}
.portal-user-tools .culture-selector__options > button {
  display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 4px;
  color: var(--hff-dark); background: #fff; text-align: start; cursor: pointer;
}
.portal-user-tools .culture-selector__options > button:is(:hover, [aria-current="true"]) { background: var(--hff-ivory-warm); }
.portal-navigation-shell { background: #fff; border-bottom: 1px solid var(--hff-border); }
.portal-navigation { overflow-x: auto; scrollbar-width: thin; padding-inline: 30px; }
.portal-navigation__list { display: flex; align-items: stretch; gap: 10px; list-style: none; margin: 0; padding: 0; }
.portal-navigation__list:empty { display: none; }
.portal-navigation .nav-link {
  display: flex; align-items: center; gap: 8px; min-height: 50px;
  padding: 12px 10px; color: var(--hff-muted); text-decoration: none;
  border-bottom: 3px solid transparent; white-space: nowrap; font-size: .9rem;
}
.portal-navigation .nav-link:hover { color: var(--hff-dark); background: #fafbfb; }
.portal-navigation .nav-link[aria-current="page"] { color: var(--hff-dark); border-bottom-color: var(--hff-gold); }
.portal-modern .flex-wrapper { min-height: calc(100vh - 126px); }
.portal-modern .app-main, body.portal-modern > main.identity-public {
  width: calc(100% - 76px); max-width: 1440px;
  margin: 0 auto; padding: 34px 0 50px;
}
.portal-modern .app-footer, body.portal-modern > footer {
  padding: 18px 30px; color: #697477; background: var(--portal-canvas);
  border: 0; text-align: center; font-size: .78rem;
}
.portal-modern .app-footer__inner { padding: 0; }
.portal-modern .app-footer p, body.portal-modern > footer p { margin: 0; }
.portal-modern :is(h1, h2, h3, h4) { color: var(--hff-dark); line-height: 1.3; }
.portal-modern .request-page h1, body.portal-modern > main[role="main"] h1 {
  margin: 0 0 .6rem; font-size: clamp(1.55rem, 2.1vw, 1.85rem);
  font-weight: 600; letter-spacing: -.035em;
}
.portal-page-title { display: flex; align-items: center; gap: 12px; }
.portal-page-title > .portal-icon { width: 1.5rem; height: 1.5rem; color: var(--hff-gold); }
.portal-modern .request-page-header { gap: 18px; margin-bottom: 24px; padding: 0; }
.portal-modern .availability-page > .request-page-header { padding-bottom: 12px; }
.portal-modern :is(.btn, .request-action) {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 9px 14px; border-radius: 7px;
  font-size: .9rem; font-weight: 500; line-height: 1.4; box-shadow: none;
  text-decoration: none;
}
.portal-modern :is(.btn-primary, .request-action--primary),
.portal-modern :is(.identity-card, .identity-manage-content) .btn-primary {
  color: #fff; background: var(--hff-dark); border: 1px solid var(--hff-dark);
}
.portal-modern :is(.btn-primary, .request-action--primary):is(:hover, :focus-visible),
.portal-modern :is(.identity-card, .identity-manage-content) .btn-primary:is(:hover, :focus-visible) {
  color: #fff; background: #414b4d; border-color: #414b4d;
}
.portal-modern :is(.btn-outline-primary, .btn-outline-secondary, .request-action:not(.request-action--primary)) {
  color: var(--hff-dark); background: #fff; border: 1px solid #dbe2e3;
}
.portal-modern :is(.btn-outline-primary, .btn-outline-secondary, .request-action:not(.request-action--primary)):hover { background: #edf1f1; }
.portal-modern .btn-link { background: transparent; border-color: transparent; }
.portal-modern .portal-user-tools .nav-link {
  min-height: 40px; padding: .4rem 0; border: 0; border-radius: 0;
  font-size: .85rem; font-weight: 400; line-height: 1.4;
}
.portal-modern :is(.form-control, .form-select),
.portal-modern :is(.identity-card, .identity-manage-content) :is(.form-control, .form-select) {
  min-height: 41px; padding: 9px 11px; color: var(--hff-dark);
  border: 1px solid #dbe2e3; border-radius: 6px;
  background: #fff; box-shadow: none; font: inherit;
}
.portal-modern input[readonly].form-control { background: #fafbfb; }
body.portal-modern > main[role="main"] #account .form-control { background: #fff; }
.portal-modern :is(.form-control, .form-select):focus {
  outline: 2px solid #94752355; border-color: var(--hff-gold); box-shadow: none;
}
.portal-modern :is(.form-label, .identity-card label, .identity-manage-content label) { color: #526166; font-size: .85rem; }
.portal-modern :is(.request-panel, .request-summary, .request-filter, .regional-policy-form) {
  background: #fff; border: 1px solid var(--hff-border); border-radius: 9px; box-shadow: none;
}
.portal-modern .request-filter { padding: 18px 20px; }
.portal-modern .shipment-overview__table-wrap { border: 1px solid var(--hff-border); border-radius: 9px; background: #fff; }
.portal-modern .request-table { margin-bottom: 0; background: #fff; }
.portal-modern .request-table thead th {
  color: #526166; background: #fbfcfc; border-bottom: 1px solid var(--hff-border);
  padding: 12px 16px; font-size: .8rem; font-weight: 600;
}
.portal-modern .request-table tbody td { padding: 15px 16px; border-color: #edf0f0; font-size: .9rem; vertical-align: middle; }
.portal-modern .request-table tbody tr:hover { background: #fafbf9; }
.portal-modern .request-table :is(th, td) { font-variant-numeric: tabular-nums; }
.portal-modern .shipment-search { border-color: var(--hff-border); border-radius: 7px; box-shadow: none; background: #fff; }
.portal-modern .identity-card {
  float: none; width: min(100%, 480px); margin: 10px auto 0; padding: 28px;
  border: 1px solid var(--hff-border); border-radius: 10px; box-shadow: none; background: #fff;
}
.portal-modern .identity-manage-layout { width: 100%; grid-template-columns: 210px minmax(0, 760px); gap: 24px; margin-top: 24px; }
.portal-modern .identity-manage-content { padding: 24px 26px; border: 1px solid var(--hff-border); border-radius: 9px; }
.portal-modern .identity-manage-nav .nav-link {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px;
  color: #526166; border: 0; border-radius: 7px; font-size: .9rem;
}
.portal-modern .identity-manage-nav .nav-link:is(:hover, :focus-visible, .active) { color: var(--hff-dark); background: #e8eded; border: 0; }
.portal-modern .identity-manage-nav .nav-link.active { font-weight: 600; }
.portal-modern .identity-manage-content h4 { font-size: 1.15rem; font-weight: 600; }
.portal-modern .identity-profile-section { max-width: none; padding: 0 0 24px; margin: 0 0 24px; border: 0; border-bottom: 1px solid var(--hff-border); }
.portal-modern .identity-profile-section:last-child { border: 0; margin-bottom: 0; padding-bottom: 0; }
.portal-modern .identity-status { border-radius: 6px; font-size: .9rem; }
.portal-modern .identity-email-current { gap: 12px; }
.portal-modern .identity-email-verified { color: #296b51; font-size: .8rem; }
.portal-modern .identity-action-list { gap: 10px; }
@media (max-width: 1000px) {
  .portal-account-label { max-width: 15rem; }
  .portal-modern .app-main, body.portal-modern > main.identity-public { width: calc(100% - 40px); padding-top: 26px; }
  .portal-modern .identity-manage-layout { grid-template-columns: 1fr; }
  .portal-modern .identity-manage-nav__list { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .portal-masthead { min-height: 70px; padding: 15px 16px; gap: 12px; }
  .portal-brand .tenant-branding--wordmark img { width: min(165px, 42vw); height: 40px; }
  .portal-user-tools { gap: 12px; }
  .portal-account-label, .portal-exit-label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
  }
  .portal-user-tools .nav-link { min-width: 28px; justify-content: center; }
  .portal-user-tools .culture-selector > summary { gap: 5px; font-size: .8rem; }
  .portal-navigation { padding-inline: 10px; }
  .portal-navigation__list { gap: 2px; }
  .portal-navigation .nav-link { min-height: 48px; padding: 11px 9px; font-size: .82rem; }
  .portal-navigation .portal-icon { width: 16px; height: 16px; }
  .portal-modern .app-main, body.portal-modern > main.identity-public { width: calc(100% - 32px); padding: 24px 0 36px; }
  .portal-modern .identity-manage-layout { gap: 20px; margin-top: 18px; }
  .portal-modern .identity-manage-content { padding: 20px; }
  .portal-modern .identity-manage-nav .nav-link { padding: 9px; font-size: .85rem; }
  .portal-modern .identity-card { padding: 22px; }
  .portal-modern .request-page-header { align-items: flex-start; flex-direction: column; gap: 16px; }
  .portal-modern .request-page-header__actions { flex-wrap: wrap; }
  .portal-modern .request-filter { padding: 15px; }
  .portal-modern .request-table :is(th, td) { padding: 12px 14px; }
  .portal-modern .app-footer, body.portal-modern > footer { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-modern *, .portal-modern *::before, .portal-modern *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Operational pages remain readable on large screens without narrowing forms. */
.portal-modern .app-main:has(.request-page) { max-width: 1760px; }
.portal-modern .portal-data-table {
  width: 100%; min-width: 0; table-layout: fixed;
}
.portal-modern .portal-data-table :is(th, td) {
  min-width: 0; max-width: none; width: auto;
  padding: 12px 10px; white-space: normal; overflow-wrap: anywhere;
  text-overflow: clip; line-height: 1.45;
}
.portal-modern .portal-data-table .status-badge {
  max-width: 100%; white-space: normal; overflow-wrap: anywhere;
}
.portal-modern .portal-data-table.availability-table :is(th, td) { padding: 12px 8px; }

/* Preserve the native headers for assistive technology while each cell repeats its
   localized label visually. Explicit table roles retain semantics after reflow. */
@media (max-width: 1100px) {
  .portal-modern .portal-navigation { overflow-x: visible; }
  .portal-modern .request-table.portal-data-table { min-width: 0; }
  .portal-modern .request-table.portal-data-table tbody td:first-child { grid-column: 1 / -1; }
  .portal-modern .portal-navigation__list { flex-wrap: wrap; }
  .portal-modern .portal-data-table { display: block; table-layout: auto; }
  .portal-modern .portal-data-table thead {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); border: 0;
  }
  .portal-modern .portal-data-table tbody { display: grid; gap: 14px; }
  .portal-modern .portal-data-table tbody tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--hff-border); border-radius: 8px; background: #fff;
  }
  .portal-modern .portal-data-table tbody td {
    display: block; width: auto; min-width: 0; padding: 12px 14px;
    text-align: start !important; border: 0; border-bottom: 1px solid #edf0f0;
  }
  .portal-modern .portal-data-table.availability-table .availability-table__description { width: auto; }
  .portal-modern .portal-data-table td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 4px;
    color: #526166; font-size: .8rem; font-weight: 600;
  }
  .portal-modern .portal-data-table td[colspan] { grid-column: 1 / -1; }
  .portal-modern .shipment-overview__table-wrap,
  .portal-modern .availability-table-wrap { border: 0; background: transparent; }
}
@media (max-width: 600px) {
  .portal-modern .availability-filter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-modern .availability-filter__field { min-width: 0; width: auto; }
  .portal-modern .availability-filter__field--search { grid-column: 1 / -1; }
  .portal-modern .portal-data-table tbody tr { grid-template-columns: minmax(0, 1fr); }
}

/* Keep control focus and dropdown menus clear of the legacy list overflow clip. */
.portal-modern :is(.availability-page, .shipment-overview) { overflow: visible; }
.portal-modern :is(.btn, .request-action) {
  --bs-btn-focus-shadow-rgb: 148, 117, 35;
  --bs-btn-active-bg: #edf1f1;
  --bs-btn-active-border-color: #947523;
  --bs-btn-active-color: #252b2c;
}
.portal-modern :is(.btn-primary, .request-action--primary):is(:focus, :active, .active) {
  color: #fff; background: #414b4d; border-color: #414b4d; box-shadow: none;
}
.portal-modern :is(.btn-outline-primary, .btn-outline-secondary, .request-action:not(.request-action--primary)):is(:focus, :active, .active) {
  color: var(--hff-dark); background: #edf1f1; border-color: var(--hff-gold); box-shadow: none;
}
/* Legacy style.css uses !important: override only inside the approved theme. */
.portal-modern :is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--hff-gold) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff !important;
}
.portal-modern .corporate-select { min-width: 0; }
.portal-modern .corporate-select__button {
  min-height: 41px; padding: 9px 36px 9px 11px;
  color: var(--hff-dark); background: #fff;
  border: 1px solid var(--hff-border); border-radius: 6px;
  line-height: 1.5; white-space: normal; overflow-wrap: anywhere;
}
.portal-modern .corporate-select__button::after {
  right: 14px; width: 7px; height: 7px;
  border-color: var(--hff-dark); border-style: solid; border-width: 0 1.5px 1.5px 0;
}
.portal-modern .corporate-select__button[aria-expanded="true"] {
  border-color: var(--hff-gold); outline: 2px solid #94752355; outline-offset: 1px;
}
.portal-modern .corporate-select__menu {
  padding: 6px; background: #fff; border: 1px solid var(--hff-border);
  border-radius: 7px; box-shadow: 0 8px 24px #1723251c;
}
.portal-modern .corporate-select__option {
  padding: 9px 10px; border-radius: 4px; white-space: normal; overflow-wrap: anywhere;
}
.portal-modern .corporate-select__option:is(:hover, :focus-visible, [aria-selected="true"]) {
  color: var(--hff-dark); background: var(--hff-ivory-warm);
}
.portal-modern .corporate-select__option:focus-visible {
  outline-offset: -3px; box-shadow: none !important;
}
.portal-modern .corporate-select__button:disabled {
  color: var(--hff-muted); background: #f1f4f4; cursor: not-allowed;
}
.portal-modern .corporate-select__option:disabled {
  color: #8b8e90; background: transparent;
}

/* At narrow tablet widths reserve the masthead space for the full-size wordmark. */
@media (min-width: 601px) and (max-width: 760px) {
  .portal-modern .portal-account-label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap;
  }
  .portal-modern .portal-user-tools .nav-link { min-width: 28px; justify-content: center; }
}

/* Weight columns by their content instead of giving years and monetary headings
   the same share. Colgroups apply the same geometry to headers and body cells. */
.portal-modern .portal-weighted-table col {
  width: calc(100% * var(--portal-column-weight) / var(--portal-column-total));
}
.portal-modern .portal-column--po { --portal-column-weight: 7; }
.portal-modern .portal-column--year { --portal-column-weight: 4; }
.portal-modern :is(.portal-column--client, .portal-column--article, .portal-column--quantity) { --portal-column-weight: 8; }
.portal-modern :is(.portal-column--description, .portal-column--region) { --portal-column-weight: 14; }
.portal-modern .portal-column--format { --portal-column-weight: 6; }
.portal-modern .portal-column--packing { --portal-column-weight: 7; }
.portal-modern .portal-column--count { --portal-column-weight: 15; }
.portal-modern :is(.portal-column--boutique, .portal-column--availability-money, .portal-column--coverage) { --portal-column-weight: 12; }
.portal-modern .portal-column--money { --portal-column-weight: 11; }
.portal-modern .portal-column--residual-money { --portal-column-weight: 14; }
.portal-modern .portal-weighted-table thead th {
  padding-inline: 8px; text-wrap: balance; hyphens: auto;
}
@media (max-width: 1100px) {
  .portal-modern .portal-weighted-table colgroup { display: none; }
}
.portal-modern .request-dashboard .portal-column--boutique { --portal-column-weight: 14; }
.portal-modern .request-dashboard .portal-column--description { --portal-column-weight: 12; }
.portal-modern .request-dashboard .portal-column--format { --portal-column-weight: 8; }

/* All operational article cells share the availability hierarchy. */
.portal-modern .request-shipment__article { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; }
.portal-modern .portal-article { display: grid; gap: 2px; min-width: 0; }
.portal-modern .portal-article__heading { min-width: 0; }
.portal-modern .portal-article__code { font-weight: 600; overflow-wrap: anywhere; }
.portal-modern .portal-article a.portal-article__code {
  color: var(--hff-gold-dark); text-decoration: none; margin: 0;
}
.portal-modern .portal-article a.portal-article__code:is(:hover, :focus-visible) {
  color: var(--hff-gold-dark); text-decoration: underline; text-underline-offset: 3px;
}
.portal-modern .portal-article a.portal-article__code:focus-visible {
  outline: 2px solid var(--hff-gold); outline-offset: 2px; border-radius: 2px;
}
.portal-modern .portal-article__meta {
  color: var(--hff-muted); font-size: .875em; line-height: 1.45; overflow-wrap: anywhere;
}
.portal-modern .portal-article__format { display: inline; color: inherit; font-size: inherit; margin: 0; }
.portal-modern .portal-article__description + .portal-article__format::before { content: "\00a0\00b7\00a0"; }
.portal-modern .portal-column--article-summary { --portal-column-weight: 24; }
.portal-modern .portal-density { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--hff-muted); }
.portal-modern .portal-density select { width: auto; min-width: 120px; }
.portal-modern .portal-point-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 16px; }
.portal-modern .portal-point-filters label { flex: 1 1 230px; }
.portal-modern .portal-point-filters p { margin: 0; align-self: center; }
.portal-modern .portal-point-type { display: block; font-size: .875em; color: var(--hff-muted); padding: 0 12px 8px; }
.portal-modern [data-point-choice][hidden] { display: none; }
.portal-modern:not([data-table-density="comfortable"]) .portal-data-table :is(th, td) { padding-top: 7px; padding-bottom: 7px; }
.portal-modern:not([data-table-density="comfortable"]) .request-choice__primary { padding-top: 8px; padding-bottom: 8px; }
.portal-modern:not([data-table-density="comfortable"]) .request-choice-grid { gap: 8px; }
.portal-modern:not([data-table-density="comfortable"]) .request-table :is(th, td) { padding-top: 7px; padding-bottom: 7px; }
@media (max-width: 600px) {
  .portal-modern .portal-density { width: 100%; justify-content: flex-end; }
  .portal-modern .portal-point-filters label { flex-basis: 100%; }
}
/* Native management disclosure works in both portal and security layouts. */
.portal-modern .portal-navigation { overflow: visible; }
.portal-modern .portal-navigation__list { flex-wrap: wrap; }
.portal-modern .portal-management-menu { position: relative; margin: 0; }
.portal-modern .portal-management-menu > summary {
  cursor: pointer;
  list-style: none;
}
.portal-modern .portal-management-menu > summary::-webkit-details-marker { display: none; }
.portal-modern .portal-management-menu > summary::marker { content: ""; }
.portal-modern .portal-management-menu > summary .portal-icon { width: 16px; height: 16px; }
.portal-modern .portal-management-menu[open] > summary {
  color: var(--hff-dark);
  border-bottom-color: var(--hff-gold);
}
.portal-modern .portal-management-menu__links {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 1000;
  width: max-content;
  min-width: 13rem;
  max-width: calc(100vw - 2rem);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--hff-surface);
  border: 1px solid var(--hff-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px #1723251c;
}
.portal-modern .portal-management-menu:not([open]) > .portal-management-menu__links { display: none; }
.portal-modern .portal-management-menu__links > li { margin: 0; padding: 0; list-style: none; }
.portal-modern .portal-management-menu__link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--hff-dark);
  border-radius: 4px;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.portal-modern .portal-management-menu__link:is(:hover, :focus-visible, [aria-current="page"]) {
  background: var(--hff-ivory-warm);
}
@media (max-width: 700px) {
  .portal-modern .portal-management-menu__links {
    position: static;
    min-width: 0;
    max-width: 100%;
    margin-bottom: 8px;
  }
}


/* Account identity and action are separate: names are information, the outlined link is the action. */
.portal-modern .portal-account-identity { min-width: 0; max-width: 24rem; text-align: right; line-height: 1.3; }
.portal-modern .portal-account-name { display: block; font-size: .85rem; font-weight: 600; overflow-wrap: anywhere; }
.portal-modern .portal-account-roles { display: block; margin-top: 3px; color: #d9dddc; font-size: .74rem; overflow-wrap: anywhere; }
.portal-modern .portal-user-tools { gap: 14px; }
.portal-modern .portal-user-tools .portal-profile-link {
  padding: 7px 10px; border: 1px solid #6a7475; border-radius: 6px;
  text-decoration: none; font-weight: 500;
}
.portal-modern .portal-user-tools .portal-profile-link:is(:hover, :focus-visible) { background: #3a4243; border-color: #c5cfcd; }

/* Security pages deliberately have no Bootstrap dependency: provide their form primitives locally. */
body.portal-modern:has(> main.identity-public) { min-height: 100vh; display: flex; flex-direction: column; }
body.portal-modern > main.identity-public { flex: 1; }
body.portal-modern > main.identity-public:has(.identity-manage-layout) { max-width: 1120px; }
.portal-modern .identity-manage-layout { grid-template-columns: 200px minmax(0, 1fr); align-items: start; }
.portal-modern .identity-manage-content { background: var(--hff-surface); }
.portal-modern .identity-manage-content > :is(h2, h4),
.portal-modern .identity-manage-content .identity-security-panel > h2,
.portal-modern .identity-manage-content .identity-security-header h2 {
  margin: 0 0 20px; font-size: 1.2rem; font-weight: 600; line-height: 1.4;
}
.portal-modern .identity-manage-content :is(h3, h5) { font-size: 1rem; font-weight: 600; line-height: 1.4; }
.portal-modern .identity-profile-section { background: transparent; }
.portal-modern :is(.identity-card, .identity-manage-content) .form-group { margin: 0 0 20px; }
.portal-modern :is(.identity-card, .identity-manage-content) .form-group > label { display: block; margin: 0 0 7px; line-height: 1.4; }
.portal-modern :is(.identity-card, .identity-manage-content) :is(.form-control, .form-select) {
  display: block; width: 100%; max-width: 35rem; min-width: 0;
}
.portal-modern :is(.identity-card, .identity-manage-content) .form-control:disabled { background: #f1f4f4; color: #526166; opacity: 1; }
.portal-modern :is(.identity-card, .identity-manage-content) .text-danger { display: block; color: #9e3434; font-size: .85rem; }
.portal-modern :is(.identity-card, .identity-manage-content) .validation-summary-valid,
.portal-modern :is(.identity-card, .identity-manage-content) .field-validation-valid { display: none; }
.portal-modern .identity-manage-content .row { margin: 0; display: block; }
.portal-modern .identity-manage-content .row > [class*="col-"] { padding: 0; width: 100%; max-width: none; }
.portal-modern .identity-manage-content .input-group { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.portal-modern .identity-manage-content .input-group > .form-control { flex: 1 1 16rem; }
.portal-modern .identity-manage-content .identity-security-panel { border: 0; margin: 0; padding: 0; background: transparent; }
.portal-modern .identity-manage-content .identity-security-header { align-items: baseline; }
.portal-modern .identity-manage-content .identity-security-header h2 { margin-bottom: 12px; }
.portal-modern .identity-manage-content .identity-card__intro { font-size: .94rem; line-height: 1.65; margin-bottom: 22px; }
.portal-modern .identity-profile-section--summary h5 { margin: 0 0 10px; }
.portal-modern .identity-profile-section--summary ul { margin: 0; padding-inline-start: 20px; }
.portal-modern .identity-manage-content .identity-email-current { align-items: flex-start; }
.portal-modern .identity-manage-content .identity-email-verified { display: inline-flex; align-items: center; gap: 5px; }
.portal-modern .identity-manage-content .identity-action-list { display: flex; flex-wrap: wrap; gap: 10px; }
.portal-modern .identity-manage-content :is(.alert, .identity-status) { margin: 0 0 20px; padding: 12px 14px; line-height: 1.5; }
.portal-modern .identity-manage-content .btn { max-width: 100%; white-space: normal; text-align: center; }
.portal-modern .identity-manage-content .identity-authenticator-qr { max-width: 100%; height: auto; }
.portal-modern .identity-manage-content .identity-secret-key { overflow-wrap: anywhere; }

/* One account disclosure spans both assignment columns; the identity row stays compact. */
.portal-modern .customer-accounts__table > tbody > tr > td { vertical-align: top; }
.portal-modern .customer-accounts__table .customer-accounts__detail-row > td { padding: 0 16px 12px; }
.portal-modern .customer-accounts__assignment-details { margin: 0; }
.portal-modern .customer-accounts__assignment-details > summary {
  width: fit-content; padding: 7px 0; color: var(--hff-gold-dark); cursor: pointer;
  font-size: .85rem; text-decoration: underline; text-underline-offset: .18em;
}
.portal-modern .customer-accounts__assignment-details .customer-accounts__less { display: none; }
.portal-modern .customer-accounts__assignment-details[open] .customer-accounts__expand { display: none; }
.portal-modern .customer-accounts__assignment-details[open] .customer-accounts__less { display: inline; }
.portal-modern .customer-accounts__assignment-columns {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px;
  padding: 18px 0 8px; border-top: 1px solid var(--hff-border);
}
.portal-modern .customer-accounts__assignment-columns h3 { margin: 0 0 14px; font-size: .85rem; font-weight: 600; }
.portal-modern .customer-accounts__assignment-columns .customer-accounts__assignments {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 8px 18px;
}
.portal-modern .customer-accounts__assignment-columns .customer-accounts__assignments > li { margin: 0; overflow-wrap: anywhere; }
.portal-modern .customer-accounts__count { display: block; color: var(--hff-muted); font-size: .78rem; margin-top: 5px; }
@media (max-width: 1000px) {
  .portal-modern .identity-manage-layout { grid-template-columns: 1fr; }
  .portal-modern .portal-account-identity { max-width: 12rem; }
}
@media (max-width: 760px) {
  .portal-modern .portal-account-name { display: none; }
  .portal-modern .portal-account-identity { max-width: 6rem; }
  .portal-modern .portal-account-roles { margin: 0; font-size: .7rem; }
  .portal-modern .portal-user-tools { gap: 8px; }
  .portal-modern .portal-user-tools .portal-profile-link { min-width: 36px; padding: 7px; }
  .portal-modern .customer-accounts__assignment-columns { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 400px) {
  .portal-modern .portal-brand .tenant-branding--wordmark img { width: 132px; }
  .portal-modern .portal-user-tools { gap: 6px; }
  .portal-modern .portal-account-identity { max-width: 4.5rem; }
}



.portal-modern .visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.portal-modern .portal-account-roles { white-space: normal; overflow-wrap: normal; }
.portal-modern .customer-accounts__table { width: 100%; }
@media (max-width: 900px) {
  .portal-modern .customer-accounts__table { display: block; min-width: 0; }
  .portal-modern .customer-accounts__table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0);
  }
  .portal-modern .customer-accounts__table tbody { display: block; }
  .portal-modern .customer-accounts__table tbody tr:not(.customer-accounts__detail-row) {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px;
    padding: 18px 16px; border-bottom: 1px solid var(--hff-border);
  }
  .portal-modern .customer-accounts__table > tbody > tr > td { display: block; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
  .portal-modern .customer-accounts__table tbody tr:not(.customer-accounts__detail-row) > td:first-child { grid-column: 1 / -1; }
  .portal-modern .customer-accounts__table td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 6px;
    color: var(--hff-muted); font-size: .78rem; font-weight: 600;
  }
  .portal-modern .customer-accounts__table .customer-accounts__detail-row { display: block; }
  .portal-modern .customer-accounts__table .customer-accounts__detail-row > td { padding: 0 16px 16px; }
}
@media (max-width: 600px) {
  .portal-modern .portal-masthead { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px 16px; }
  .portal-modern .portal-brand .tenant-branding--wordmark img { width: 220px; height: 40px; }
  .portal-modern .portal-user-tools { width: 100%; justify-content: flex-end; gap: 12px; min-height: 40px; }
  .portal-modern .portal-account-identity { max-width: none; }
  .portal-modern .portal-account-roles { font-size: .74rem; }
}


.portal-modern .identity-manage-content form > br { display: none; }

@media (max-width: 900px) { .portal-modern .customer-accounts__table tbody tr:not(.customer-accounts__detail-row) > td:is(:nth-child(4), :last-child) { grid-column: 1 / -1; } }
