/* Desktop-oriented management shell (PlanOps layout, TechCom tokens). */

/* Page background (theme tokens from manage_theme.css): colour + image on <html>,
   body transparent. Fallbacks keep the pre-theme look if the tokens are missing. */
html:has(> body.manage-portal) {
  background: var(--bg-page, var(--bg)) var(--bg-image, none) center / cover no-repeat fixed;
}

/* iOS Safari does not handle fixed backgrounds well. */
@media (max-width: 960px), (hover: none) and (pointer: coarse) {
  html:has(> body.manage-portal) {
    background-attachment: scroll;
  }
}

body.manage-portal {
  background: transparent;
  overflow: hidden;
}

body.manage-portal .shell {
  max-width: none;
  margin: 0;
  padding: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

body.manage-portal .auth-page-loading {
  min-height: 100vh;
  min-height: 100dvh;
}

.mp-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  height: 100%;
  overflow: hidden;
}

.mp-sidebar {
  width: 248px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(20px + var(--safe-top)) 16px calc(20px + var(--safe-bottom));
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.mp-brand {
  /* Brand sizing comes from shared .tc-header / .tc-logo / .tc-tagline in app_v3.css */
  flex: 0 1 auto;
}

.mp-brand__full {
  display: block;
  line-height: 0;
}

.mp-brand__mark {
  display: none;
}

.mp-sidebar__head {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
}

/* Floating glass sidebar (desktop). Below 961px the sidebar is the white sticky
   header with the account menu (see the max-width: 960px block). */
@media (min-width: 961px) {
  /* White page behind the floating sidebar. Only the page itself: --bg stays as is,
     so components that use it as a fill (inputs, chips, hovers) keep their grey. */
  html:has(> body.manage-portal) {
    background-color: var(--bg-page, #fff);
  }

  .mp-sidebar {
    --mp-side-gap: 12px;
    --mp-side-pad: 14px;
    --mp-side-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --mp-side-time: 240ms;
    --mp-side-accent: #ff681f;
    --mp-side-text: var(--chrome-text-2, rgba(255, 255, 255, 0.86));
    --mp-side-icon: var(--chrome-icon, rgba(226, 226, 232, 0.68));
    --mp-side-muted: var(--chrome-faint, rgba(255, 255, 255, 0.42));
    --mp-side-hover: var(--chrome-hover, rgba(255, 255, 255, 0.08));
    --mp-side-line: var(--chrome-hover, rgba(255, 255, 255, 0.08));

    align-self: stretch;
    height: auto;
    width: 248px;
    margin: calc(var(--mp-side-gap) + var(--safe-top)) 0 calc(var(--mp-side-gap) + var(--safe-bottom)) var(--mp-side-gap);
    padding: 18px var(--mp-side-pad) 12px;
    gap: 12px;
    overflow: hidden;
    color: var(--mp-side-text);
    color-scheme: var(--chrome-scheme, normal);
    background: var(--surface-sidebar, rgba(35, 33, 38, 0.9));
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--chrome-line, rgba(255, 255, 255, 0.1));
    border-radius: 24px;
    box-shadow: var(--shadow-md, 0 8px 32px rgba(0, 0, 0, 0.12));
    transition: width var(--mp-side-time) var(--mp-side-ease);
  }

  /* Both logos stay loaded and cross-fade; the box keeps one height so nothing below moves. */
  /* Header row: logo + collapse toggle. Same height in both states, so the nav never moves. */
  .mp-sidebar__head {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
  }

  .mp-brand {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
    min-height: 44px;
    padding-left: 4px;
    border-radius: 14px;
  }

  .mp-brand .tc-logo {
    width: 156px;
    max-width: none;
    height: auto;
    object-fit: contain;
  }

  .mp-brand__full,
  .mp-brand .tc-tagline,
  .mp-brand .tc-logo-wordmark {
    transition: opacity 160ms ease 80ms, visibility 0s linear 0s;
  }

  /* "Management" stays in the mobile header only. */
  .mp-brand .tc-tagline {
    display: none;
  }

  .mp-sidebar-toggle {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--mp-side-icon);
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease;
  }

  .mp-sidebar-toggle:hover {
    background: var(--mp-side-hover);
    color: var(--chrome-strong, #fff);
  }

  .mp-sidebar-toggle:focus-visible {
    outline: 2px solid var(--chrome-focus, rgba(255, 255, 255, 0.85));
    outline-offset: -2px;
  }

  .mp-sidebar-toggle__icon {
    width: 18px;
    height: 18px;
    transition: transform var(--mp-side-time) var(--mp-side-ease);
  }

  .mp-brand .tc-logo-wordmark {
    font-size: 30px;
    color: var(--chrome-strong, #fff);
    white-space: nowrap;
  }

  .mp-brand__mark {
    display: block;
    position: absolute;
    top: 50%;
    left: 0;
    width: 44px;
    height: 44px;
    overflow: hidden;
    transform: translateY(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 160ms ease, visibility 0s linear 160ms;
  }

  /* m_techcom.png has wide transparent margins: draw it larger and let the box crop them. */
  .mp-brand__mark img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70px;
    height: 70px;
    object-fit: contain;
    transform: translate(-50%, -50%);
  }

  .mp-brand__mark.is-missing img {
    display: none;
  }

  .mp-brand__mark.is-missing::before {
    content: "T";
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: var(--mp-side-accent);
    color: #fff;
    font-weight: 800;
    font-size: 18px;
  }

  .mp-brand:focus-visible {
    outline: 2px solid var(--chrome-focus, rgba(255, 255, 255, 0.85));
    outline-offset: 2px;
  }

  /* Only the item list scrolls; the logo and the footer stay put. */
  .mp-nav--desktop {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 calc(-1 * var(--mp-side-pad));
    padding: 2px var(--mp-side-pad) 8px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--chrome-scroll, rgba(255, 255, 255, 0.18)) transparent;
  }

  .mp-nav--desktop::-webkit-scrollbar {
    width: 6px;
  }

  .mp-nav--desktop::-webkit-scrollbar-thumb {
    border-radius: 3px;
    background: var(--chrome-scroll, rgba(255, 255, 255, 0.18));
  }

  .mp-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .mp-nav__group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 8px;
  }

  /* Same height in both states; collapsed it turns into a short divider. */
  .mp-nav__label {
    position: relative;
    margin: 0;
    padding: 0 11px;
    height: 26px;
    line-height: 26px;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mp-side-muted);
    transition: color 150ms ease 90ms;
  }

  .mp-nav__label::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 12px;
    width: 20px;
    height: 1px;
    background: var(--chrome-control-line, rgba(255, 255, 255, 0.16));
    opacity: 0;
    transition: opacity 150ms ease;
  }

  /* Icon x-position is the same expanded and collapsed: (44px item - 22px icon) / 2 = 11px. */
  .mp-nav__link,
  .mp-sidebar__feedback {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 0 11px;
    border: none;
    border-radius: 14px;
    background: transparent;
    color: var(--mp-side-text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease;
  }

  .mp-nav__icon,
  .mp-sidebar__feedback-icon {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    color: var(--mp-side-icon);
    transition: color 160ms ease;
  }

  .mp-nav__text,
  .mp-sidebar__feedback-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 150ms ease 90ms;
  }

  /* body.manage-portal outranks the Fleet pages' "no hover pill" rule (management_fleet.css). */
  body.manage-portal .mp-sidebar .mp-nav__link:hover:not(.is-active),
  .mp-sidebar__feedback:hover {
    background: var(--mp-side-hover);
    color: var(--chrome-strong, #fff);
  }

  .mp-nav__link:hover .mp-nav__icon,
  .mp-sidebar__feedback:hover .mp-sidebar__feedback-icon {
    color: var(--chrome-icon-hover, rgba(255, 255, 255, 0.94));
  }

  .mp-nav__link.is-active {
    background: var(--surface-active, var(--mp-side-accent));
    color: var(--active-text, #fff);
    box-shadow: var(--active-shadow, 0 4px 14px rgba(255, 104, 31, 0.24));
  }

  .mp-nav__link.is-active .mp-nav__icon {
    color: var(--active-text, #fff);
  }

  .mp-nav__link:focus-visible,
  .mp-sidebar__feedback:focus-visible {
    outline: 2px solid var(--chrome-focus, rgba(255, 255, 255, 0.85));
    outline-offset: -2px;
  }

  .mp-sidebar__foot {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 10px;
    border-top: 1px solid var(--mp-side-line);
  }

  /* Signed-in person, last in the footer. The avatar's centre is the icon column's
     (6px + 32px / 2 = 22px), so it stays put when the sidebar collapses. */
  .mp-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    margin-top: 4px;
    padding: 8px 8px 8px 6px;
    border: none;
    border-radius: 14px;
    background: transparent;
    color: var(--mp-side-text);
    font: inherit;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
    transition: background-color 160ms ease;
  }

  .mp-profile:hover,
  .mp-profile[aria-expanded="true"] {
    background: var(--mp-side-hover);
  }

  .mp-profile:focus-visible {
    outline: 2px solid var(--chrome-focus, rgba(255, 255, 255, 0.85));
    outline-offset: -2px;
  }

  .mp-profile .mp-profile__text,
  .mp-profile__chevron {
    transition: opacity 150ms ease 90ms;
  }

  .mp-profile__chevron {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-left: auto;
    color: var(--mp-side-icon);
  }

  html.mp-sidebar-collapsed .mp-profile .mp-profile__text,
  html.mp-sidebar-collapsed .mp-profile__chevron {
    opacity: 0;
    transition-delay: 0s;
  }

  /* Collapsed: same container, icons only. Labels stay in the DOM as the accessible names. */
  html.mp-sidebar-collapsed .mp-sidebar {
    width: 72px;
  }

  html.mp-sidebar-collapsed .mp-brand__full,
  html.mp-sidebar-collapsed .mp-brand .tc-tagline,
  html.mp-sidebar-collapsed .mp-brand .tc-logo-wordmark {
    opacity: 0;
    visibility: hidden;
    transition: opacity 120ms ease, visibility 0s linear 120ms;
  }

  html.mp-sidebar-collapsed .mp-brand__mark {
    opacity: 1;
    visibility: visible;
    transition: opacity 160ms ease 80ms, visibility 0s linear 0s;
  }

  /* Collapsed: no room beside the mark, so the toggle sits over it (pointing right);
     hovering the header or focusing the toggle swaps the mark for the chevrons. */
  html.mp-sidebar-collapsed .mp-sidebar-toggle {
    position: absolute;
    top: 50%;
    left: 0;
    width: 44px;
    height: 44px;
    transform: translateY(-50%);
    opacity: 0;
  }

  html.mp-sidebar-collapsed .mp-sidebar-toggle__icon {
    transform: rotate(180deg);
  }

  html.mp-sidebar-collapsed .mp-sidebar__head:hover .mp-sidebar-toggle,
  html.mp-sidebar-collapsed .mp-sidebar-toggle:focus-visible {
    opacity: 1;
    background: var(--mp-side-hover);
    color: var(--chrome-strong, #fff);
  }

  html.mp-sidebar-collapsed .mp-sidebar__head:hover .mp-brand__mark,
  html.mp-sidebar-collapsed .mp-sidebar__head:has(.mp-sidebar-toggle:focus-visible) .mp-brand__mark {
    opacity: 0;
    transition-delay: 0s;
  }

  html.mp-sidebar-collapsed .mp-nav__text,
  html.mp-sidebar-collapsed .mp-sidebar__feedback-label {
    opacity: 0;
    transition-delay: 0s;
  }

  html.mp-sidebar-collapsed .mp-nav__label {
    color: transparent;
    transition-delay: 0s;
  }

  html.mp-sidebar-collapsed .mp-nav__label::after {
    opacity: 1;
    transition-delay: 90ms;
  }

  /* No scrollbar gutter in the 72px rail (it would push icons off-centre); wheel/touch still scroll. */
  html.mp-sidebar-collapsed .mp-nav--desktop {
    scrollbar-width: none;
  }

  html.mp-sidebar-collapsed .mp-nav--desktop::-webkit-scrollbar {
    display: none;
  }

  /* Central content block: floats over the page background with the sidebar's
     12px gaps. No backdrop-filter/transform here: fixed-position modals live
     inside .mp-main and must stay relative to the viewport. */
  .mp-main:not(.mp-main--mywork) {
    align-self: stretch;
    height: auto;
    margin: calc(12px + var(--safe-top)) 12px calc(12px + var(--safe-bottom));
    background: var(--surface-content, transparent);
    border: 1px solid var(--content-line, transparent);
    border-radius: 24px;
    box-shadow: var(--content-shadow, none);
  }
}

/* Phones / tablets: the same block under the sticky header. */
@media (max-width: 960px) {
  .mp-main:not(.mp-main--mywork) {
    margin: 12px 12px calc(12px + var(--safe-bottom));
    background: var(--surface-content, transparent);
    border: 1px solid var(--content-line, transparent);
    border-radius: 20px;
    box-shadow: var(--content-shadow, none);
  }
}

@media (max-width: 600px) {
  .mp-main:not(.mp-main--mywork) {
    margin: 8px 8px calc(8px + var(--safe-bottom));
    border-radius: 18px;
  }
}

/* Collapsed-sidebar tooltip; lives on <body> so the scrolling nav cannot clip it. */
.mp-nav-tooltip {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  max-width: 260px;
  padding: 7px 11px;
  border-radius: 10px;
  background: var(--surface-popover, rgba(28, 27, 31, 0.96));
  color: var(--popover-text, #fff);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: var(--popover-shadow, 0 8px 24px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.06));
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-4px, -50%);
  transition: opacity 120ms ease, transform 120ms ease, visibility 0s linear 120ms;
}

.mp-nav-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
  transition-delay: 0s;
}

/* Avatar: initials underneath, the photo on top once it has loaded (manage_profile.js). */
.mp-profile__avatar,
.mp-profile-modal__avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: var(--avatar-bg, rgba(255, 104, 31, 0.18));
  color: var(--avatar-text, #ffb38f);
  font-weight: 800;
  letter-spacing: 0.02em;
  user-select: none;
}

.mp-profile__avatar {
  width: 32px;
  height: 32px;
  font-size: 0.74rem;
}

.mp-profile__avatar img,
.mp-profile-modal__avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 150ms ease;
}

.mp-profile__avatar.has-photo img,
.mp-profile-modal__avatar.has-photo img {
  opacity: 1;
}

.mp-profile__text {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.2;
}

.mp-profile__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--chrome-strong, #fff);
}

.mp-profile__email {
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--chrome-subtle, rgba(255, 255, 255, 0.5));
}

.mp-profile__email[hidden] {
  display: none;
}

/* Profile menu: same dark glass as the sidebar, on <body> so nothing clips it. */
.mp-profile-menu {
  position: fixed;
  z-index: 1001;
  top: 0;
  left: 0;
  box-sizing: border-box;
  width: 248px;
  padding: 6px;
  border: 1px solid var(--chrome-line, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  background: var(--surface-menu, rgba(30, 28, 33, 0.96));
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: var(--menu-shadow, 0 16px 40px rgba(0, 0, 0, 0.28));
  color: var(--menu-text, rgba(255, 255, 255, 0.88));
  font-size: 0.88rem;
  opacity: 0;
  transform: translateY(4px) scale(0.98);
  transition: opacity 140ms ease, transform 140ms ease;
}

.mp-profile-menu.is-open {
  opacity: 1;
  transform: none;
}

.mp-profile-menu[hidden] {
  display: none;
}

.mp-profile-menu__who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 8px 10px;
}

.mp-profile-menu__sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--chrome-hover, rgba(255, 255, 255, 0.08));
}

.mp-profile-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.mp-profile-menu__icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: var(--menu-icon, rgba(226, 226, 232, 0.7));
  transition: color 140ms ease;
}

.mp-profile-menu__item:hover,
.mp-profile-menu__item:focus-visible {
  outline: none;
  background: var(--menu-hover, rgba(255, 104, 31, 0.16));
  color: var(--menu-hover-text, #fff);
}

.mp-profile-menu__item:focus-visible {
  box-shadow: inset 0 0 0 1.5px rgba(255, 104, 31, 0.75);
}

.mp-profile-menu__item:hover .mp-profile-menu__icon,
.mp-profile-menu__item:focus-visible .mp-profile-menu__icon {
  color: var(--menu-hover-icon, #ff8a4c);
}

/* Edit Profile: light dialog over a dimmed page. */
html.mp-profile-modal-open body {
  overflow: hidden;
}

.mp-profile-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 16px;
}

.mp-profile-modal[hidden] {
  display: none;
}

.mp-profile-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.mp-profile-modal__dialog {
  position: relative;
  box-sizing: border-box;
  width: min(480px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 28px;
  border-radius: 20px;
  background: #fff;
  color: #1d1b20;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.mp-profile-modal.is-open .mp-profile-modal__backdrop,
.mp-profile-modal.is-open .mp-profile-modal__dialog {
  opacity: 1;
  transform: none;
}

.mp-profile-modal__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.mp-profile-modal__subtitle {
  margin: 4px 0 22px;
  color: #6b6870;
  font-size: 0.9rem;
}

.mp-profile-modal__photo {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.mp-profile-modal__avatar {
  width: 88px;
  height: 88px;
  background: #fff1ea;
  color: #ff681f;
  font-size: 1.6rem;
  box-shadow: 0 0 0 1px #f1e4dd;
}

.mp-profile-modal__photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #e0dde3;
  border-radius: 10px;
  background: #fff;
  color: #1d1b20;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease;
}

.mp-profile-modal__photo-icon {
  width: 16px;
  height: 16px;
}

.mp-profile-modal__photo-btn:hover:not(:disabled) {
  border-color: #ff681f;
  color: #ff681f;
}

.mp-profile-modal__file {
  display: none;
}

.mp-profile-modal__hint {
  margin: 6px 0 0;
  color: #8a868f;
  font-size: 0.78rem;
}

.mp-profile-modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mp-profile-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.mp-profile-field--wide {
  grid-column: 1 / -1;
}

.mp-profile-field__label {
  color: #4a4650;
  font-size: 0.78rem;
  font-weight: 700;
}

.mp-profile-field__input {
  box-sizing: border-box;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #dcd9df;
  border-radius: 10px;
  background: #fff;
  color: #1d1b20;
  font: inherit;
  font-size: 0.92rem;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.mp-profile-field__input:focus {
  outline: none;
  border-color: #ff681f;
  box-shadow: 0 0 0 3px rgba(255, 104, 31, 0.18);
}

.mp-profile-field__input[readonly] {
  background: #f6f5f7;
  color: #6b6870;
}

.mp-profile-field__input[aria-invalid="true"] {
  border-color: #d93025;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.14);
}

.mp-profile-field__hint {
  color: #8a868f;
  font-size: 0.75rem;
  line-height: 1.35;
}

.mp-profile-modal__error {
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdecea;
  color: #b3261e;
  font-size: 0.85rem;
  font-weight: 600;
}

.mp-profile-modal__error[hidden] {
  display: none;
}

.mp-profile-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.mp-profile-modal__btn {
  height: 40px;
  padding: 0 18px;
  border: 1px solid #dcd9df;
  border-radius: 10px;
  background: #fff;
  color: #1d1b20;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.mp-profile-modal__btn:hover:not(:disabled) {
  background: #f6f5f7;
}

.mp-profile-modal__btn--primary {
  border-color: #ff681f;
  background: #ff681f;
  color: #fff;
}

.mp-profile-modal__btn--primary:hover:not(:disabled) {
  border-color: #f05a12;
  background: #f05a12;
}

.mp-profile-modal__btn:disabled,
.mp-profile-modal__photo-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.mp-profile-modal__btn:focus-visible,
.mp-profile-modal__photo-btn:focus-visible {
  outline: 2px solid #ff681f;
  outline-offset: 2px;
}

/* Adjust Photo: replaces the form inside the same dialog. The ring is the saved area. */
.mp-profile-modal__dialog.is-cropping > .mp-profile-modal__photo,
.mp-profile-modal__dialog.is-cropping > .mp-profile-modal__grid,
.mp-profile-modal__dialog.is-cropping > .mp-profile-modal__actions {
  display: none;
}

.mp-profile-crop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.mp-profile-crop[hidden] {
  display: none;
}

.mp-profile-crop > .mp-profile-modal__actions {
  align-self: stretch;
  margin-top: 8px;
}

.mp-profile-crop__stage {
  position: relative;
  width: min(300px, 100%);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  background: #232126;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.mp-profile-crop__stage.is-dragging {
  cursor: grabbing;
}

.mp-profile-crop__stage:focus-visible {
  outline: 2px solid #ff681f;
  outline-offset: 2px;
}

.mp-profile-crop__image {
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  transform-origin: 0 0;
  transition: none;
  pointer-events: none;
}

.mp-profile-crop__ring {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  box-shadow: 0 0 0 200px rgba(35, 33, 38, 0.62), inset 0 0 0 2px rgba(255, 255, 255, 0.92);
  pointer-events: none;
}

.mp-profile-crop__zoom {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(300px, 100%);
  color: #6b6870;
}

.mp-profile-crop__zoom-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.mp-profile-crop__slider {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  accent-color: #ff681f;
  cursor: pointer;
}

@media (max-width: 520px) {
  .mp-profile-modal__dialog {
    padding: 22px 18px;
  }

  .mp-profile-modal__grid {
    grid-template-columns: 1fr;
  }

  .mp-profile-modal__actions .mp-profile-modal__btn {
    flex: 1 1 0;
  }
}

.mp-profile-toast {
  position: fixed;
  z-index: 1200;
  left: 50%;
  bottom: 24px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(30, 28, 33, 0.96);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.mp-profile-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.mp-profile-toast[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .mp-sidebar,
  .mp-sidebar *,
  .mp-sidebar *::after,
  .mp-nav-tooltip,
  .mp-profile-menu,
  .mp-profile-modal *,
  .mp-profile-toast {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

html:not(.mp-ready) .mp-nav__link[data-mp-feature],
html:not(.mp-ready) .mp-nav__group[data-mp-feature],
html:not(.mp-ready) .mp-user-menu__item[data-mp-feature],
html:not(.mp-ready) .mp-user-menu__group-label[data-mp-feature],
html.mp-ready:not(.mp-feat-projects) .mp-nav__link[data-mp-feature="projects"],
html.mp-ready:not(.mp-feat-projects) .mp-user-menu__item[data-mp-feature="projects"],
html.mp-ready:not(.mp-feat-tasks) .mp-nav__link[data-mp-feature="tasks"],
html.mp-ready:not(.mp-feat-tasks) .mp-user-menu__item[data-mp-feature="tasks"],
html.mp-ready:not(.mp-feat-osp) .mp-nav__link[data-mp-feature="osp"],
html.mp-ready:not(.mp-feat-osp) .mp-user-menu__item[data-mp-feature="osp"],
html.mp-ready:not(.mp-feat-locates) .mp-nav__link[data-mp-feature="locates"],
html.mp-ready:not(.mp-feat-locates) .mp-user-menu__item[data-mp-feature="locates"],
html.mp-ready:not(.mp-feat-dig_tickets) .mp-nav__link[data-mp-feature="dig_tickets"],
html.mp-ready:not(.mp-feat-dig_tickets) .mp-user-menu__item[data-mp-feature="dig_tickets"],
html.mp-ready:not(.mp-feat-damage) .mp-nav__link[data-mp-feature="damage"],
html.mp-ready:not(.mp-feat-damage) .mp-user-menu__item[data-mp-feature="damage"],
html.mp-ready:not(.mp-feat-fleet) .mp-nav__link[data-mp-feature="fleet"],
html.mp-ready:not(.mp-feat-fleet) .mp-user-menu__item[data-mp-feature="fleet"],
html.mp-ready:not(.mp-feat-warehouse) .mp-nav__link[data-mp-feature="warehouse"],
html.mp-ready:not(.mp-feat-warehouse) .mp-user-menu__item[data-mp-feature="warehouse"],
html.mp-ready:not(.mp-feat-my_work) .mp-nav__link[data-mp-feature="my_work"],
html.mp-ready:not(.mp-feat-my_work) .mp-user-menu__item[data-mp-feature="my_work"],
html.mp-ready:not(.mp-feat-bank_transactions) .mp-nav__link[data-mp-feature="bank_transactions"],
html.mp-ready:not(.mp-feat-bank_transactions) .mp-user-menu__item[data-mp-feature="bank_transactions"],
html.mp-ready:not(.mp-feat-payrolls) .mp-nav__link[data-mp-feature="payrolls"],
html.mp-ready:not(.mp-feat-payrolls) .mp-user-menu__item[data-mp-feature="payrolls"],
html.mp-ready:not(.mp-feat-reimbursement) .mp-nav__link[data-mp-feature="reimbursement"],
html.mp-ready:not(.mp-feat-reimbursement) .mp-user-menu__item[data-mp-feature="reimbursement"],
html.mp-ready:not(.mp-feat-deductions) .mp-nav__link[data-mp-feature="deductions"],
html.mp-ready:not(.mp-feat-deductions) .mp-user-menu__item[data-mp-feature="deductions"],
html.mp-ready:not(.mp-feat-phishing_simulation) .mp-nav__link[data-mp-feature="phishing_simulation"],
html.mp-ready:not(.mp-feat-phishing_simulation) .mp-user-menu__item[data-mp-feature="phishing_simulation"],
html.mp-ready:not(.mp-feat-ai_chat) .mp-nav__link[data-mp-feature="ai_chat"],
html.mp-ready:not(.mp-feat-ai_chat) .mp-user-menu__item[data-mp-feature="ai_chat"],
html.mp-ready:not(.mp-feat-ai_chat_admin) .mp-nav__link[data-mp-feature="ai_chat_admin"],
html.mp-ready:not(.mp-feat-ai_chat_admin) .mp-user-menu__item[data-mp-feature="ai_chat_admin"],
html.mp-ready:not(.mp-feat-ai_chat):not(.mp-feat-ai_chat_admin) .mp-nav__group[data-mp-feature="ai_chat ai_chat_admin"],
html.mp-ready:not(.mp-feat-ai_chat):not(.mp-feat-ai_chat_admin) .mp-user-menu__group-label[data-mp-feature="ai_chat ai_chat_admin"],
html.mp-ready:not(.mp-feat-bank_transactions):not(.mp-feat-payrolls):not(.mp-feat-reimbursement):not(.mp-feat-deductions) .mp-nav__group[data-mp-feature="bank_transactions payrolls reimbursement deductions"],
html.mp-ready:not(.mp-feat-bank_transactions):not(.mp-feat-payrolls):not(.mp-feat-reimbursement):not(.mp-feat-deductions) .mp-user-menu__group-label[data-mp-feature="bank_transactions payrolls reimbursement deductions"],
.mp-nav__link[data-mp-feature][hidden],
.mp-nav__group[data-mp-feature][hidden],
.mp-user-menu__item[data-mp-feature][hidden],
.mp-user-menu__group-label[data-mp-feature][hidden] {
  display: none !important;
}

.mp-nav__group[hidden],
.mp-user-menu__group-label[hidden] {
  display: none !important;
}

/* Mobile account menu — mirror home-user-menu sizing/chrome. */
.mp-user-menu {
  display: none;
  position: relative;
  flex: 0 0 auto;
  z-index: 100;
  margin-left: auto;
}

.mp-user-menu__trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.mp-user-menu__trigger:active {
  transform: scale(0.96);
}

.mp-user-menu__trigger[aria-expanded="true"] {
  border-color: var(--border-hover);
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.1);
}

.mp-user-menu__avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
}

.mp-user-menu__avatar-fallback {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.mp-user-menu__avatar-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.mp-user-menu__avatar.is-loaded .mp-user-menu__avatar-photo {
  opacity: 1;
}

.mp-user-menu__avatar--panel {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.mp-user-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(240px, calc(100vw - 32px));
  max-height: min(70vh, calc(100dvh - 5.75rem - env(safe-area-inset-bottom, 0px)));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 12px 36px rgba(17, 17, 17, 0.18);
  box-sizing: border-box;
}

.mp-user-menu__profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mp-user-menu__identity {
  min-width: 0;
  flex: 1;
}

.mp-user-menu__name {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-user-menu__email {
  margin: 2px 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-user-menu__divider {
  height: 1px;
  margin: 12px 0 8px;
  background: var(--border);
}

.mp-user-menu__group-label {
  margin: 12px 8px 4px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-user-menu__item,
.mp-user-menu__sign-out {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 8px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.15s ease;
}

.mp-user-menu__item.is-active {
  background: var(--accent-soft);
  color: var(--text);
}

.mp-user-menu__item:active,
.mp-user-menu__sign-out:active {
  background: var(--surface2);
  transform: scale(0.99);
}

@media (hover: hover) and (pointer: fine) {
  .mp-user-menu__item:hover,
  .mp-user-menu__sign-out:hover {
    background: var(--surface2);
  }
}

.mp-main {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(16px + var(--safe-top)) 24px calc(32px + var(--safe-bottom));
}

.mp-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.mp-topbar__lead {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mp-topbar__crumb {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-page__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.mp-page__actions {
  display: flex;
  gap: 8px;
}

.mp-eyebrow {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.mp-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.mp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.mp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 240px;
  min-width: 200px;
  max-width: 420px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
}

.mp-search input,
.mp-toolbar select {
  min-height: 42px;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
}

.mp-search input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  color: var(--text);
  outline: none;
}

.mp-search svg {
  flex: 0 0 auto;
  pointer-events: none;
}

.mp-toolbar select {
  min-width: 140px;
  max-width: 220px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.mp-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
}

.mp-refresh {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.mp-refresh:hover {
  border-color: var(--border-hover);
}

.mp-refresh:disabled {
  opacity: 0.6;
  cursor: wait;
}

.mp-count {
  margin: 0 0 0 auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

.mp-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px 0 8px;
}

.mp-pager__btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.mp-pager__btn:hover:not(:disabled) {
  border-color: var(--border-hover);
}

.mp-pager__btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.mp-pager__label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}

.mp-state {
  padding: 28px 8px;
  color: var(--muted);
  font-weight: 600;
}

.mp-cards {
  display: grid;
  gap: 14px;
}

.mp-card {
  display: block;
  padding: 20px 22px 16px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  box-shadow: none;
}

.mp-card:hover {
  border-color: var(--border-hover);
}

.mp-card.is-progress {
  border-color: #3b82f6;
}

.mp-card.is-progress:hover {
  border-color: #1d4ed8;
}

.mp-card.is-done {
  border-color: #22c55e;
}

.mp-card.is-done:hover {
  border-color: #15803d;
}

.mp-card.is-hold {
  border-color: #f59e0b;
}

.mp-card.is-hold:hover {
  border-color: #b45309;
}

.mp-card.is-idle,
.mp-card.is-restore {
  border-color: rgba(17, 17, 17, 0.22);
}

.mp-card.is-idle:hover,
.mp-card.is-restore:hover {
  border-color: rgba(17, 17, 17, 0.4);
}

.mp-card__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.mp-card__top:empty {
  display: none;
}

.mp-code {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.mp-badge,
.mp-status,
.mp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mp-badge {
  background: var(--surface2);
  color: var(--text);
}

.mp-status {
  margin-left: auto;
  background: var(--surface2);
}

.mp-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}

.mp-status.is-progress {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.mp-status.is-progress::before {
  background: currentColor;
}

.mp-status.is-done {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.mp-status.is-done::before {
  background: currentColor;
}

.mp-status.is-hold {
  background: rgba(217, 119, 6, 0.14);
  color: #b45309;
}

.mp-status.is-restore {
  background: rgba(17, 17, 17, 0.08);
}

.mp-card__title {
  margin: 10px 0 0;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.mp-card__client {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.mp-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin-top: 16px;
  font-size: 0.95rem;
  font-weight: 700;
}

.mp-meta > div {
  min-width: 0;
}

.mp-meta > div > span:first-child {
  display: block;
  margin-bottom: 4px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.mp-progress__track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--surface2);
  overflow: hidden;
}

.mp-progress__bar {
  height: 100%;
  background: var(--accent);
}

.mp-progress__label {
  font-size: 0.78rem;
  font-weight: 800;
}

.mp-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.mp-card__stage {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mp-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
}

.mp-dot.is-done {
  border-color: #15803d;
  background: #15803d;
}

.mp-dot.is-current {
  border-color: var(--accent);
  background: var(--accent);
}

.mp-chip--muted {
  background: var(--surface2);
  color: var(--muted);
}

.mp-chip--assigned {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.mp-chip--created {
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
}

.mp-chip--team {
  background: rgba(13, 148, 136, 0.12);
  color: #0f766e;
}

.mp-chip--subitems {
  background: var(--accent-soft);
  color: var(--text);
}

.mp-mirror {
  text-transform: none;
  letter-spacing: 0;
}

.mp-mirror.is-synced {
  background: rgba(21, 128, 61, 0.12);
  color: #166534;
}

.mp-mirror.is-pending {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.mp-mirror.is-retrying {
  background: rgba(217, 119, 6, 0.14);
  color: #92400e;
}

.mp-mirror.is-error,
.mp-mirror.is-conflict {
  background: rgba(185, 28, 28, 0.12);
  color: #991b1b;
}

.mp-pm-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.mp-person {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.mp-page--detail {
  max-width: 1080px;
}

.mp-back-row {
  margin: 0 0 12px;
}

.mp-back {
  font-weight: 700;
  text-decoration: none;
}

.mp-hero {
  margin-bottom: 18px;
}

.mp-hero__meta,
.mp-hero__sub {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.mp-hero__meta {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mp-hero__meta a,
.mp-dl a {
  color: inherit;
  font-weight: 800;
}

.mp-hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 8px 0 0;
}

.mp-hero__copy {
  flex: 1 1 16rem;
  min-width: 0;
}

.mp-hero h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.mp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  padding-top: 2px;
}

.mp-hero__meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.mp-hero__meta-row .mp-status {
  margin-left: 0;
}

.mp-action {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
}

.mp-action:hover {
  border-color: var(--border-hover);
}

.mp-life-band {
  margin: 0 0 16px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface2);
}

.mp-life-card {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.mp-life-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.mp-life-card__head h2 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-life {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.mp-life__tile {
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  text-align: center;
}

.mp-life__tile.is-done {
  background: rgba(22, 163, 74, 0.1);
  border-color: transparent;
}

.mp-life__tile.is-current {
  background: var(--accent-soft);
  border-color: transparent;
}

.mp-life__tile strong,
.mp-life__tile em {
  display: block;
}

.mp-life__tile strong {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mp-life__tile em {
  margin-top: 4px;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.mp-life-card__foot {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.mp-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.mp-kpi,
.mp-panel {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.mp-kpi {
  border-left: 3px solid var(--border);
}

.mp-kpi:first-child {
  border-left-color: var(--accent);
}

.mp-kpi > span {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-kpi strong {
  display: block;
  margin-top: 6px;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.mp-kpi em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
}

.mp-muted {
  color: var(--muted);
  font-weight: 600;
}

.mp-panel {
  margin-bottom: 14px;
}

.mp-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}

.mp-panel__head h2,
.mp-panel h2 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-panel__meta {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.mp-dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  margin: 0 0 16px;
}

.mp-dl dt {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-dl dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.mp-dl .mp-status {
  margin-left: 0;
}

.mp-staff {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.mp-staff__person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mp-staff__person strong,
.mp-staff__person em {
  display: block;
}

.mp-staff__person strong {
  font-size: 0.92rem;
}

.mp-staff__person em {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.mp-avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--surface2);
}

.mp-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mp-avatar--sm {
  width: 24px;
  height: 24px;
}

.mp-avatar--sm.mp-avatar--initials {
  font-size: 0.58rem;
}

.mp-avatar--initials {
  overflow: hidden;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: none;
}

.mp-person__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}

.mp-split {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.mp-split > .mp-panel {
  margin-bottom: 0;
}

.mp-section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 12px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.mp-section-label::after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: var(--border);
}

/* Project Lifecycle is intentionally namespaced from the legacy Monday
   closeout widgets above it. */
.mp-lc-shell {
  position: relative;
  margin: 22px 0 18px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface2);
  min-width: 0;
}

.mp-lc-shell.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  cursor: progress;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.5);
}

.mp-lc-loading {
  color: var(--muted);
  font-weight: 700;
}

.mp-lc-head,
.mp-lc-panel__head,
.mp-lc-scope__head,
.mp-lc-completion-card > div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mp-lc-head {
  align-items: center;
  margin-bottom: 16px;
}

.mp-lc-head p,
.mp-lc-panel__head p,
.mp-lc-scope__head p,
.mp-lc-modal__dialog > p:first-child {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.mp-lc-head h2,
.mp-lc-panel__head h3,
.mp-lc-scope__head h4,
.mp-lc-modal__dialog h3 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.02em;
}

.mp-lc-head h2 {
  font-size: 1.35rem;
}

.mp-lc-rollout,
.mp-lc-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface2);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mp-lc-rollout.is-pilot,
.mp-lc-state.is-ready,
.mp-lc-state.is-complete,
.mp-lc-state.is-completed {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.mp-lc-rollout.is-enabled,
.mp-lc-state.is-in_progress {
  background: var(--accent-soft);
  color: var(--accent);
}

.mp-lc-state.is-blocked,
.mp-lc-state.is-planned,
.mp-lc-state.is-scheduled {
  background: rgba(217, 119, 6, 0.12);
  color: #a16207;
}

.mp-lc-rollout.is-disabled,
.mp-lc-rollout.is-unmanaged,
.mp-lc-rollout.is-unavailable {
  background: var(--surface);
  border: 1px solid var(--border);
}

.mp-lc-unmanaged,
.mp-lc-unavailable,
.mp-lc-disabled,
.mp-lc-completed {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.mp-lc-unmanaged > div,
.mp-lc-completed > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 900;
}

.mp-lc-unmanaged h3 {
  margin: 0;
  font-size: 1rem;
}

.mp-lc-unmanaged p,
.mp-lc-unavailable span,
.mp-lc-disabled span {
  display: block;
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.mp-lc-unavailable,
.mp-lc-disabled {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
}

.mp-lc-unavailable span,
.mp-lc-disabled span {
  margin: 0;
}

.mp-lc-disabled {
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(217, 119, 6, 0.06);
}

.mp-lc-completed {
  margin-bottom: 14px;
  border-color: rgba(22, 163, 74, 0.26);
}

.mp-lc-completed > span {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.mp-lc-completed strong,
.mp-lc-completed em {
  display: block;
}

.mp-lc-completed em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
}

.mp-lc-notice {
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.86rem;
  font-weight: 700;
}

.mp-lc-notice.is-success {
  border-color: rgba(22, 163, 74, 0.3);
  color: #15803d;
}

.mp-lc-notice.is-warning {
  border-color: rgba(217, 119, 6, 0.32);
  color: #92400e;
}

.mp-lc-notice.is-error {
  border-color: rgba(185, 28, 28, 0.3);
  color: #b91c1c;
}

.mp-lc-stepper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}

.mp-lc-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 13px 11px;
  border-right: 1px solid var(--border);
}

.mp-lc-step:last-child {
  border-right: 0;
}

.mp-lc-step.is-current {
  background: var(--accent-soft);
}

.mp-lc-step.is-complete {
  background: rgba(22, 163, 74, 0.08);
}

.mp-lc-step.is-locked,
.mp-lc-step.is-future {
  color: var(--muted);
}

.mp-lc-step__mark {
  flex: 0 0 auto;
  font-size: 1rem;
  font-weight: 900;
}

.mp-lc-step.is-complete .mp-lc-step__mark {
  color: #15803d;
}

.mp-lc-step.is-blocked .mp-lc-step__mark {
  color: #a16207;
}

.mp-lc-step__copy {
  min-width: 0;
}

.mp-lc-step strong,
.mp-lc-step em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-lc-step strong {
  font-size: 0.76rem;
}

.mp-lc-step em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.mp-lc-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.mp-lc-summary article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.mp-lc-summary span,
.mp-lc-label {
  display: block;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.mp-lc-summary strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.mp-lc-summary strong.is-good {
  color: #15803d;
}

.mp-lc-summary strong.is-warn {
  color: #a16207;
}

.mp-lc-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.mp-lc-reopen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.mp-lc-reopen > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mp-lc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.mp-lc-btn:hover:not(:disabled) {
  border-color: var(--border-hover);
}

.mp-lc-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mp-lc-btn--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.mp-lc-btn--quiet {
  background: var(--surface2);
}

.mp-lc-btn--danger {
  border-color: rgba(185, 28, 28, 0.3);
  color: #b91c1c;
}

.mp-lc-panel {
  min-width: 0;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.mp-lc-panel__head {
  align-items: center;
  margin-bottom: 14px;
}

.mp-lc-panel__head h3 {
  font-size: 1.05rem;
}

.mp-lc-panel__head > div > span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.mp-lc-columns,
.mp-lc-post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mp-lc-columns--lower {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.mp-lc-columns h4,
.mp-lc-panel > h4 {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.mp-lc-columns h4:not(:first-child) {
  margin-top: 16px;
}

.mp-lc-blockers,
.mp-lc-checklist,
.mp-lc-requirements,
.mp-lc-compact-files,
.mp-lc-file-group ul,
.mp-lc-history {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mp-lc-blockers,
.mp-lc-checklist,
.mp-lc-requirements,
.mp-lc-compact-files {
  display: grid;
  gap: 7px;
}

.mp-lc-blockers li,
.mp-lc-checklist li,
.mp-lc-requirements li {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--surface2);
}

.mp-lc-blockers li > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(217, 119, 6, 0.14);
  color: #a16207;
  font-weight: 900;
}

.mp-lc-blockers strong,
.mp-lc-blockers em,
.mp-lc-checklist strong,
.mp-lc-checklist em {
  display: block;
}

.mp-lc-blockers strong,
.mp-lc-checklist strong {
  font-size: 0.82rem;
}

.mp-lc-blockers em,
.mp-lc-checklist em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 600;
}

.mp-lc-empty {
  margin: 0;
  padding: 10px 11px;
  border-radius: 9px;
  background: var(--surface2);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.mp-lc-empty--success {
  color: #15803d;
}

.mp-lc-empty-inline {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.mp-lc-checklist__mark {
  flex: 0 0 auto;
  font-weight: 900;
}

.mp-lc-checklist li.is-complete .mp-lc-checklist__mark,
.mp-lc-requirements li.is-complete > span {
  color: #15803d;
}

.mp-lc-checklist li > div {
  min-width: 0;
  flex: 1 1 auto;
}

.mp-lc-check {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.mp-lc-requirements li strong {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.8rem;
}

.mp-lc-requirements li em {
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 700;
}

.mp-lc-scope-list {
  display: grid;
  gap: 8px;
}

.mp-lc-scope-list article {
  position: relative;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.mp-lc-scope-list article > strong {
  font-size: 0.9rem;
}

.mp-lc-scope-list article > span {
  float: right;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mp-lc-scope-list dl,
.mp-lc-completion-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
}

.mp-lc-scope-list dt,
.mp-lc-completion-card dt {
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mp-lc-scope-list dd,
.mp-lc-completion-card dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  font-weight: 700;
}

.mp-lc-scopes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 12px;
}

.mp-lc-scope {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
}

.mp-lc-scope__head {
  align-items: center;
  margin-bottom: 12px;
}

.mp-lc-scope__head h4 {
  font-size: 1rem;
}

.mp-lc-scope__crews {
  margin-bottom: 10px;
}

.mp-lc-crews {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.mp-lc-crew {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 5px 7px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 700;
}

.mp-lc-crew span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-lc-crew small {
  display: block;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 600;
}

.mp-lc-crew button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.mp-lc-assign {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin-bottom: 10px;
}

.mp-lc-assign-date {
  grid-column: 1 / -1;
}

.mp-lc-assign-date span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mp-lc-assign input,
.mp-lc-date-grid input,
.mp-lc-closeout-form input,
.mp-lc-closeout-form textarea,
.mp-lc-invoice-form input,
.mp-lc-upload input,
.mp-lc-upload select,
.mp-lc-modal__dialog textarea {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
}

.mp-lc-assign input,
.mp-lc-date-grid input,
.mp-lc-closeout-form input,
.mp-lc-invoice-form input,
.mp-lc-upload input,
.mp-lc-upload select {
  min-height: 36px;
  padding: 0 9px;
}

.mp-lc-closeout-form textarea,
.mp-lc-modal__dialog textarea {
  padding: 8px 9px;
  resize: vertical;
}

.mp-lc-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mp-lc-date-grid label > span,
.mp-lc-closeout-form label > span,
.mp-lc-invoice-form label > span,
.mp-lc-upload label > span,
.mp-lc-modal__dialog label > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mp-lc-scope__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.mp-lc-scope__blocker {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: #92400e;
  font-size: 0.72rem;
}

.mp-lc-scope__blocker.is-clear {
  color: #15803d;
}

.mp-lc-scope__blocker strong {
  flex: 0 0 auto;
}

.mp-lc-panel[data-lc-stage="construction"] .mp-lc-scopes {
  grid-template-columns: minmax(0, 1fr);
}

.mp-lc-construction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mp-lc-construction-grid > section,
.mp-lc-tracking,
.mp-lc-reports {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.mp-lc-construction-grid h5,
.mp-lc-tracking h5,
.mp-lc-reports h5 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mp-lc-person-list,
.mp-lc-crew-history ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 0.82rem;
}

.mp-lc-mini-dl,
.mp-lc-tracking-list {
  margin: 0;
}

.mp-lc-mini-dl > div,
.mp-lc-tracking-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}

.mp-lc-mini-dl > div:last-child,
.mp-lc-tracking-list > div:last-child {
  border-bottom: 0;
}

.mp-lc-mini-dl dt,
.mp-lc-tracking-list dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.mp-lc-mini-dl dd,
.mp-lc-tracking-list dd {
  margin: 0;
  color: var(--text);
  font-size: 0.8rem;
}

.mp-lc-hold-banner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.76rem;
}

.mp-lc-tracking,
.mp-lc-reports {
  margin-top: 12px;
}

.mp-lc-section-head,
.mp-lc-reports,
.mp-lc-reports > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mp-lc-section-head > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mp-lc-section-head h5,
.mp-lc-reports h5 {
  margin: 0;
}

.mp-lc-reports > div {
  align-items: flex-start;
  flex-direction: column;
}

.mp-lc-reports span,
.mp-lc-crew-history,
.mp-lc-crew-history span {
  color: var(--muted);
  font-size: 0.72rem;
}

.mp-lc-crew-history {
  margin-top: 8px;
}

.mp-lc-crew-history li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.mp-lc-tracking-option,
.mp-lc-progress-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.mp-lc-tracking-option > span,
.mp-lc-progress-field > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-lc-tracking-option em,
.mp-lc-progress-field em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
}

.mp-lc-tracking-option input[type="number"],
.mp-lc-progress-field input,
.mp-lc-modal__dialog select {
  min-height: 36px;
  box-sizing: border-box;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.mp-lc-modal__dialog--wide {
  width: min(100%, 760px);
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.mp-lc-report-table {
  overflow-x: auto;
}

.mp-lc-report-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.mp-lc-report-table th,
.mp-lc-report-table td {
  padding: 9px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.mp-lc-completion-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-left: 3px solid #d97706;
  border-radius: 11px;
  background: var(--surface2);
}

.mp-lc-completion-card.is-complete {
  border-left-color: #16a34a;
}

.mp-lc-completion-card > div:first-child span,
.mp-lc-completion-card > div:first-child strong {
  font-size: 0.85rem;
  font-weight: 800;
}

.mp-lc-completion-card > div:first-child strong {
  color: var(--muted);
}

.mp-lc-closeout-form,
.mp-lc-invoice-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.mp-lc-compact-files li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--surface2);
}

.mp-lc-compact-files strong,
.mp-lc-compact-files em {
  display: block;
}

.mp-lc-compact-files strong {
  overflow-wrap: anywhere;
  font-size: 0.8rem;
}

.mp-lc-compact-files em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 700;
}

.mp-lc-compact-files a,
.mp-lc-file-actions a,
.mp-lc-file-actions button {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
}

.mp-lc-file-group {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.mp-lc-file-group > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  background: var(--surface2);
}

.mp-lc-file-group > div strong {
  font-size: 0.8rem;
}

.mp-lc-file-group > div span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mp-lc-file-group li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px 11px;
  border-top: 1px solid var(--border);
}

.mp-lc-file-group li > div:first-child {
  min-width: 0;
}

.mp-lc-file-group li strong,
.mp-lc-file-group li span {
  display: block;
  overflow-wrap: anywhere;
}

.mp-lc-file-group li strong {
  font-size: 0.8rem;
}

.mp-lc-file-group li span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.mp-lc-file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mp-lc-compact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.mp-lc-file-actions button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #b91c1c;
  cursor: pointer;
}

.mp-lc-upload {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr) auto;
  align-items: end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.mp-lc-upload__file input {
  padding: 5px 7px;
}

.mp-lc-history {
  position: relative;
}

.mp-lc-history li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 13px;
}

.mp-lc-history li:last-child {
  padding-bottom: 0;
}

.mp-lc-history__dot {
  position: relative;
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.mp-lc-history li:not(:last-child) .mp-lc-history__dot::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: -17px;
  left: 3px;
  width: 1px;
  background: var(--border);
}

.mp-lc-history strong,
.mp-lc-history span,
.mp-lc-history em {
  display: block;
}

.mp-lc-history strong {
  font-size: 0.82rem;
}

.mp-lc-history span,
.mp-lc-history em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 600;
}

.mp-lc-history p {
  margin: 5px 0 0;
  font-size: 0.75rem;
}

.mp-lc-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
}

.mp-lc-modal[hidden] {
  display: none;
}

.mp-lc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}

.mp-lc-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 470px);
  box-sizing: border-box;
  padding: 20px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.22);
}

.mp-lc-modal__dialog h3 {
  font-size: 1.1rem;
}

.mp-lc-modal__copy {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.mp-lc-modal__dialog > div:last-child {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.mp-files {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.mp-file,
.mp-files .is-disabled {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface2);
  color: inherit;
  text-decoration: none;
}

.mp-file.mp-file--readonly {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.mp-file:hover {
  background: var(--accent-soft);
}

.mp-files .is-disabled {
  opacity: 0.65;
}

.mp-file__ext {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.mp-file__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 700;
}

.mp-file__open {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.mp-stage + .mp-stage {
  margin-top: 16px;
}

.mp-stage__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.mp-stage__head h3 {
  margin: 0;
  font-size: 0.95rem;
}

.mp-stage__head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.mp-stage__head strong {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--muted);
}

.mp-check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.mp-check__mark {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
}

.mp-check.is-done .mp-check__mark {
  border-color: var(--accent);
  background: var(--accent);
  position: relative;
}

.mp-check.is-done .mp-check__mark::after {
  content: "";
  display: block;
  width: 5px;
  height: 9px;
  margin: 1px 0 0 5px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(40deg);
}

.mp-check > div span {
  font-weight: 700;
  font-size: 0.9rem;
}

.mp-check em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.mp-subitems {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.mp-subitems li:not(.mp-subitem) {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}

.mp-subitems li:not(.mp-subitem):last-child {
  border-bottom: 0;
}

.mp-subitem {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface2);
}

.mp-subitem.is-deleting {
  opacity: 0.72;
  outline: 1px dashed var(--border-hover);
  pointer-events: none;
}

.mp-file-status--inline {
  margin: 0;
  padding: 6px 10px;
  min-height: 34px;
}

.mp-subitem__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mp-subitem__title {
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mp-subitem__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.mp-subitem__status .mp-status {
  margin-left: 0;
}

.mp-subitem__dl {
  margin: 12px 0 0;
  gap: 10px 20px;
}

.mp-subitem__pct {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-subitem__pct .mp-progress {
  margin-top: 0;
  min-width: 72px;
}

.mp-subitem__pct .mp-progress__track {
  width: 72px;
  flex: 0 0 72px;
}

.mp-subitem__pct .mp-progress__label {
  display: none;
}

.mp-subitem__block {
  margin-top: 12px;
}

.mp-subitem__block h4 {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-subitem__block .mp-prose {
  font-size: 0.88rem;
}

.mp-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.mp-prose {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
  font-weight: 600;
}

@media (max-width: 960px) {
  body.manage-portal {
    overflow: auto;
  }

  body.manage-portal .shell {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }

  .mp-sidebar-toggle {
    display: none;
  }

  html.mp-sidebar-collapsed .mp-layout {
    grid-template-columns: 1fr;
  }

  html.mp-sidebar-collapsed .mp-sidebar {
    width: auto;
    padding-left: var(--shell-pad-x, 16px);
    padding-right: var(--shell-pad-right, 16px);
  }

  html.mp-sidebar-collapsed .mp-brand::before {
    display: none;
  }

  html.mp-sidebar-collapsed .mp-brand .tc-logo,
  html.mp-sidebar-collapsed .mp-brand .tc-tagline {
    display: block !important;
  }

  .mp-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .mp-sidebar {
    width: auto;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    height: auto;
    overflow: visible;
    margin: 0;
    padding: var(--shell-pad-top, calc(12px + var(--safe-top)))
      var(--shell-pad-right, 16px)
      12px
      var(--shell-pad-x, 16px);
    background: var(--bg);
    border-right: none;
    box-shadow: 0 1px 0 rgba(17, 17, 17, 0.06);
  }

  .mp-nav--desktop,
  .mp-sidebar__foot,
  html.mp-sidebar-collapsed .mp-sidebar__foot {
    display: none;
  }

  .mp-user-menu {
    display: block;
    z-index: 60;
  }

  .mp-main {
    height: auto;
    overflow: visible;
    /* Sticky header already clears the notch; don't add safe-top again. */
    padding: 16px 16px calc(32px + var(--safe-bottom));
  }

  .mp-page__head,
  .mp-hero__row,
  .mp-life,
  .mp-kpis,
  .mp-split,
  .mp-dl,
  .mp-staff,
  .mp-meta {
    grid-template-columns: 1fr;
  }

  .mp-page__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .mp-count {
    margin-left: 0;
  }
}

.mp-file__remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 0;
}

.mp-file__remove:hover {
  color: var(--danger, #b42318);
}

.mp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.mp-btn[hidden] {
  display: none;
}

.mp-btn:hover {
  border-color: var(--border-hover);
}

.mp-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.mp-btn--primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.mp-btn--danger {
  background: var(--danger, #b42318);
  border-color: var(--danger, #b42318);
  color: #fff;
}

.mp-btn--ghost {
  background: transparent;
}

.mp-form-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(180, 35, 24, 0.08);
  color: var(--danger, #b42318);
  font-weight: 700;
  font-size: 0.88rem;
}

.mp-form-grid {
  display: grid;
  gap: 12px 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 16px;
}

.mp-field {
  display: grid;
  gap: 6px;
}

.mp-field--full {
  grid-column: 1 / -1;
}

.mp-field label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-field input[type="text"],
.mp-field input[type="date"],
.mp-field input[type="search"],
.mp-field select,
.mp-field textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: inherit;
  font: inherit;
  font-weight: 600;
}

.mp-field textarea {
  min-height: 96px;
  resize: vertical;
}

.mp-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  font-weight: 700;
}

.mp-check input {
  width: 16px;
  height: 16px;
}

.mp-people {
  display: grid;
  gap: 8px;
}

.mp-people__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.mp-chip-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 8px 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.mp-chip-edit button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}

.mp-people__results {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  max-height: 160px;
  overflow: auto;
}

.mp-people__results[hidden] {
  display: none;
}

.mp-people__results button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.mp-people__results button:hover {
  background: var(--accent-soft);
}

.mp-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px;
}

.mp-create-sub {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.mp-create-sub__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.mp-create-sub__toggle:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--surface2);
}

.mp-create-sub__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1;
}

.mp-create-sub.is-expanded {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface2);
}

.mp-create-sub__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mp-create-sub__head h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.mp-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
}

.mp-modal[hidden] {
  display: none;
}

.mp-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
}

.mp-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 20px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 18px 48px rgba(17, 17, 17, 0.18);
}

.mp-modal__title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.mp-modal__body {
  margin: 0 0 16px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.45;
}

.mp-modal__body strong {
  color: var(--text);
}

.mp-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 960px) {
  .mp-form-grid {
    grid-template-columns: 1fr;
  }
}

.mp-file-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
}

.mp-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(17, 17, 17, 0.15);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: mp-spin 0.7s linear infinite;
  flex: 0 0 auto;
}

@keyframes mp-spin {
  to {
    transform: rotate(360deg);
  }
}

.mp-file.is-busy {
  opacity: 0.72;
  outline: 1px dashed var(--border-hover);
}

.mp-file__remove:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.mp-modal.is-busy .mp-modal__backdrop,
.mp-modal.is-busy [data-mp-modal-dismiss].mp-btn {
  pointer-events: none;
  opacity: 0.55;
}

.mp-modal.is-busy #mp-file-confirm-ok {
  min-width: 7.5rem;
}

.mp-file-picked {
  margin: 8px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.mp-file-picked .mp-btn {
  min-height: 28px;
  margin-left: 6px;
  padding: 0 10px;
  font-size: 0.75rem;
}

.mf-board {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.mf-board[hidden] {
  display: none;
}

.mf-group__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 10px;
}

.mf-group__title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mf-group__count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

@media (max-width: 760px) {
  .mp-lc-shell {
    padding: 12px;
    border-radius: 14px;
  }

  .mp-lc-head,
  .mp-lc-panel__head {
    align-items: flex-start;
  }

  .mp-lc-stepper {
    grid-template-columns: 1fr;
  }

  .mp-lc-step {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .mp-lc-step:last-child {
    border-bottom: 0;
  }

  .mp-lc-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mp-lc-summary article:last-child {
    grid-column: 1 / -1;
  }

  .mp-lc-columns,
  .mp-lc-post-grid,
  .mp-lc-scopes,
  .mp-lc-upload {
    grid-template-columns: minmax(0, 1fr);
  }

  .mp-lc-reopen {
    width: 100%;
    margin-left: 0;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }

  .mp-lc-file-group li {
    align-items: flex-start;
    flex-direction: column;
  }

  .mp-lc-file-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .mp-lc-modal__dialog {
    padding: 16px;
  }

  .mp-lc-construction-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mp-lc-hold-banner,
  .mp-lc-reports,
  .mp-lc-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .mp-lc-tracking-option,
  .mp-lc-progress-field {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Portal-native Projects — shared page helpers (the list itself: management_projects_list.css) */
.mp-page {
  --mp-green: #218358;
  --mp-green-soft: #e8f5ee;
  --mp-yellow: #e0aa22;
  --mp-yellow-soft: #fff7d9;
  --mp-gray: #a8b0bb;
  --mp-gray-soft: #eef1f4;
  --mp-ink: #17202a;
  --mp-border: #dfe4e8;
  min-width: 0;
}

.mp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mp-muted {
  color: #87919a;
  font-size: 0.8rem;
}

.mp-state strong,
.mp-state span {
  display: block;
}

.mp-state span {
  margin-top: 5px;
  color: #77818a;
}

@media (max-width: 720px) {
  .mp-page {
    max-width: 100%;
    overflow-x: clip;
  }

  .mp-page__head {
    align-items: flex-start;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mp-page *,
  .mp-page *::before,
  .mp-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
