/* ShiftNevis mobile workflow hubs v3 — canonical 5..8 hub + isolated app step screens. */
@media (max-width: 760px) {
  body:has(.profile-mobile-home) .profile-policy-tabs-wrap,
  body:has(.profile-mobile-detail) .profile-policy-tabs-wrap,
  body:has(.profile-mobile-home) .profile-section-nav,
  body:has(.profile-mobile-detail) .profile-section-nav {
    display: none !important;
  }

  body .program-workflow-tabs-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 9px !important;
    width: 100% !important;
    margin: 0 0 12px !important;
  }

  body .program-workflow-progress {
    order: -1 !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 0 3px !important;
    color: #8b8197 !important;
    font-size: 9px !important;
    font-weight: 800 !important;
  }

  body .program-workflow-progress b {
    color: #6d28d9 !important;
    font-size: 10px !important;
    font-weight: 950 !important;
    white-space: nowrap !important;
  }

  body .program-workflow-progress span:last-child {
    min-width: 0 !important;
    overflow: hidden !important;
    color: #8b8294 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body .program-workflow-tabs {
    direction: rtl !important;
    box-sizing: border-box !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 11px !important;
    border: 1px solid #e4dcef !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 8px 24px rgba(42,31,63,.045) !important;
  }

  body .program-workflow-tabs__item {
    appearance: none !important;
    position: relative !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 74px !important;
    display: grid !important;
    grid-template-columns: 48px minmax(0,1fr) 30px !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    column-gap: 9px !important;
    row-gap: 2px !important;
    margin: 0 !important;
    padding: 10px !important;
    border: 1px solid #e6deef !important;
    border-radius: 16px !important;
    color: #2c2436 !important;
    background: linear-gradient(145deg,#fff,#fdfbff) !important;
    box-shadow: 0 4px 13px rgba(46,35,65,.025) !important;
    text-align: right !important;
    font: inherit !important;
    cursor: pointer !important;
    transition: transform .14s ease,border-color .14s ease,background .14s ease,box-shadow .14s ease !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  body .program-workflow-tabs__item::after {
    content: "←" !important;
    grid-column: 3 !important;
    grid-row: 1 / 3 !important;
    width: 28px !important;
    height: 28px !important;
    display: grid !important;
    place-items: center !important;
    align-self: center !important;
    justify-self: center !important;
    border-radius: 9px !important;
    color: #7c3aed !important;
    background: #f7f2ff !important;
    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
  }

  body .program-workflow-tabs__item:active {
    transform: scale(.988) !important;
    border-color: #d3c1f3 !important;
    background: #faf7ff !important;
  }

  body .program-workflow-tabs__item.is-active {
    border-color: #cdb9f5 !important;
    background: linear-gradient(145deg,#fff,#faf7ff) !important;
    box-shadow: 0 7px 18px rgba(109,40,217,.07) !important;
  }

  body .program-workflow-tabs__number {
    grid-column: 1 !important;
    grid-row: 1 / 3 !important;
    box-sizing: border-box !important;
    width: 48px !important;
    height: 48px !important;
    display: grid !important;
    place-items: center !important;
    align-self: center !important;
    border-radius: 14px !important;
    color: #6d28d9 !important;
    background: #efe7ff !important;
    box-shadow: inset 0 0 0 1px rgba(124,58,237,.05) !important;
    font-size: 14px !important;
    line-height: 1 !important;
    font-weight: 950 !important;
  }

  body .program-workflow-tabs__item.is-active .program-workflow-tabs__number {
    color: #fff !important;
    background: #7c3aed !important;
    box-shadow: 0 6px 15px rgba(124,58,237,.18) !important;
  }

  body .program-workflow-tabs__title {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    align-self: end !important;
    overflow: hidden !important;
    color: #2a2233 !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
    font-weight: 950 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body .program-workflow-tabs__item.is-active .program-workflow-tabs__title {
    color: #6d28d9 !important;
  }

  body .program-workflow-tabs__title i {
    flex: 0 0 auto !important;
    color: #7c3aed !important;
    font-size: 12px !important;
  }

  body .program-workflow-tabs__desc {
    grid-column: 2 !important;
    grid-row: 2 !important;
    min-width: 0 !important;
    display: block !important;
    align-self: start !important;
    overflow: hidden !important;
    color: #8b8294 !important;
    font-size: 8.5px !important;
    line-height: 1.5 !important;
    font-weight: 750 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.program-workflow-mobile-hub .calendar-needs-mobile-app,
  body.program-workflow-mobile-hub .personnel-mobile-app,
  body.program-workflow-mobile-hub .requests-mobile-app,
  body.program-workflow-mobile-hub .builder-mobile-app {
    display: none !important;
  }

  body.program-workflow-mobile-hub .program-workflow-tabs__item.is-active {
    border-color: #e6deef !important;
    background: linear-gradient(145deg,#fff,#fdfbff) !important;
    box-shadow: 0 4px 13px rgba(46,35,65,.025) !important;
  }

  body.program-workflow-mobile-hub .program-workflow-tabs__item.is-active .program-workflow-tabs__number {
    color: #6d28d9 !important;
    background: #efe7ff !important;
    box-shadow: inset 0 0 0 1px rgba(124,58,237,.05) !important;
  }

  body.program-workflow-mobile-hub .program-workflow-tabs__item.is-active .program-workflow-tabs__title {
    color: #2a2233 !important;
  }

  body.program-workflow-mobile-detail .program-workflow-tabs-wrap {
    display: none !important;
  }

  .program-workflow-mobile-back {
    appearance: none;
    box-sizing: border-box;
    width: 100%;
    min-height: 64px;
    display: grid;
    grid-template-columns: 40px minmax(0,1fr) auto;
    align-items: center;
    gap: 9px;
    margin: 0 0 10px;
    padding: 10px;
    border: 1px solid #dfd4f0;
    border-radius: 17px;
    color: #2a2233;
    background: linear-gradient(145deg,#fff,#faf7ff);
    box-shadow: 0 7px 20px rgba(47,35,68,.04);
    text-align: right;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
  }

  .program-workflow-mobile-back:active {
    transform: scale(.99);
    background: #f8f4ff;
  }

  .program-workflow-mobile-back__icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid #ded3eb;
    border-radius: 12px;
    color: #6d28d9;
    background: #fff;
    font-size: 11px;
  }

  .program-workflow-mobile-back__copy {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .program-workflow-mobile-back__copy small,
  .program-workflow-mobile-back__copy b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .program-workflow-mobile-back__copy small {
    color: #8b8294;
    font-size: 8px;
    font-weight: 800;
  }

  .program-workflow-mobile-back__copy b {
    color: #2a2233;
    font-size: 12px;
    font-weight: 950;
  }

  .program-workflow-mobile-back__step {
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 7px;
    border-radius: 999px;
    color: #6d28d9;
    background: #f2ecff;
    font-size: 7.5px;
    line-height: 1;
    font-weight: 900;
    white-space: nowrap;
  }
}

@media (max-width: 390px) {
  body .program-workflow-tabs {
    padding: 9px !important;
    border-radius: 18px !important;
  }

  body .program-workflow-tabs__item {
    min-height: 70px !important;
    grid-template-columns: 44px minmax(0,1fr) 28px !important;
    gap: 8px !important;
    padding: 9px !important;
    border-radius: 15px !important;
  }

  body .program-workflow-tabs__number {
    width: 44px !important;
    height: 44px !important;
    border-radius: 13px !important;
    font-size: 13px !important;
  }

  body .program-workflow-tabs__item::after {
    width: 26px !important;
    height: 26px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
  }

  body .program-workflow-tabs__title { font-size: 11.5px !important; }
  body .program-workflow-tabs__desc { font-size: 8px !important; }

  .program-workflow-mobile-back {
    min-height: 60px;
    grid-template-columns: 38px minmax(0,1fr);
    gap: 8px;
    padding: 9px;
    border-radius: 16px;
  }

  .program-workflow-mobile-back__icon {
    width: 38px;
    height: 38px;
  }

  .program-workflow-mobile-back__step {
    grid-column: 2;
    justify-self: start;
    margin-top: -2px;
  }
}
