/* ShiftNevis profile mobile v9 — native menu buttons + isolated sub-screens. */
@media (max-width: 760px) {
  .profile-mobile-home { display:block !important; }

  .profile-mobile-menu-panel {
    box-sizing:border-box;width:100%;padding:11px;border:1px solid #e4dcef;border-radius:20px;
    background:#fff;box-shadow:0 8px 24px rgba(42,31,63,.045)
  }
  .profile-mobile-menu-panel__head {
    display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:9px;
    padding:1px 2px 9px;border-bottom:1px solid #f0ebf4
  }
  .profile-mobile-menu-panel__head>div{min-width:0}
  .profile-mobile-menu-panel__head small,.profile-mobile-menu-panel__head h2{display:block;margin:0}
  .profile-mobile-menu-panel__head small{color:#7c3aed;font-size:9px;line-height:1.35;font-weight:900}
  .profile-mobile-menu-panel__head h2{margin-top:2px;color:#2a2233;font-size:13px;line-height:1.5;font-weight:950}
  .profile-mobile-menu-panel__head>span{
    flex:0 0 auto;min-height:27px;display:inline-flex;align-items:center;gap:5px;padding:5px 8px;
    border-radius:999px;color:#786d84;background:#f6f3f8;font-size:8px;line-height:1;font-weight:850;white-space:nowrap
  }
  .profile-mobile-menu{display:grid;gap:8px}
  .profile-mobile-menu__item{
    appearance:none;box-sizing:border-box;width:100%;min-width:0;min-height:74px;display:grid;
    grid-template-columns:48px minmax(0,1fr) auto 26px;align-items:center;gap:9px;margin:0;padding:10px;
    border:1px solid #e6deef;border-radius:16px;color:#2c2436;background:linear-gradient(145deg,#fff,#fdfbff);
    box-shadow:0 4px 13px rgba(46,35,65,.025);text-align:right;font-family:var(--font);cursor:pointer;
    -webkit-tap-highlight-color:transparent
  }
  .profile-mobile-menu__item:active{transform:scale(.988);border-color:#d3c1f3;background:#faf7ff}
  .profile-mobile-menu__icon{
    box-sizing:border-box;width:48px;height:48px;display:grid;place-items:center;border-radius:14px;
    color:#6d28d9;background:#efe7ff;box-shadow:inset 0 0 0 1px rgba(124,58,237,.05);font-size:17px
  }
  .profile-mobile-menu__copy{min-width:0;display:grid;gap:3px}
  .profile-mobile-menu__copy b{
    overflow:hidden;color:#2a2233;font-size:12px;line-height:1.45;font-weight:950;text-overflow:ellipsis;white-space:nowrap
  }
  .profile-mobile-menu__copy small{
    overflow:hidden;color:#8b8294;font-size:8.5px;line-height:1.5;font-weight:750;text-overflow:ellipsis;white-space:nowrap
  }
  .profile-mobile-menu__status{
    min-height:25px;display:inline-flex;align-items:center;justify-content:center;padding:5px 7px;border-radius:999px;
    color:#6e6578;background:#f3f0f5;font-size:7.5px;line-height:1;font-weight:900;white-space:nowrap
  }
  .profile-mobile-menu__status.is-ok{color:#08734c;background:#eaf9f2}
  .profile-mobile-menu__status.is-warn{color:#92580a;background:#fff4df}
  .profile-mobile-menu__status.is-neutral{color:#6d28d9;background:#f2ecff}
  .profile-mobile-menu__arrow{
    width:26px;height:26px;display:grid;place-items:center;border-radius:9px;color:#7c3aed;background:#f7f2ff;font-size:9px
  }

  .profile-mobile-detail{display:grid !important;gap:9px !important}
  .profile-mobile-screen-head{
    box-sizing:border-box;min-height:66px;display:grid;grid-template-columns:38px 44px minmax(0,1fr) auto;
    align-items:center;gap:8px;padding:10px;border:1px solid #dfd4f0;border-radius:18px;
    background:linear-gradient(145deg,#fff,#faf7ff);box-shadow:0 7px 20px rgba(47,35,68,.04)
  }
  .profile-mobile-screen-head__back{
    appearance:none;box-sizing:border-box;width:38px;height:38px;display:grid;place-items:center;margin:0;padding:0;
    border:1px solid #ded3eb;border-radius:12px;color:#6d28d9;background:#fff;font-family:inherit;font-size:12px;
    -webkit-tap-highlight-color:transparent
  }
  .profile-mobile-screen-head__back:active{transform:scale(.96);background:#f7f2ff}
  .profile-mobile-screen-head__icon{
    box-sizing:border-box;width:44px;height:44px;display:grid;place-items:center;border-radius:13px;
    color:#6d28d9;background:#efe7ff;font-size:16px
  }
  .profile-mobile-screen-head__copy{min-width:0}
  .profile-mobile-screen-head__copy h2,.profile-mobile-screen-head__copy p{margin:0}
  .profile-mobile-screen-head__copy h2{
    overflow:hidden;color:#281f32;font-size:15px;line-height:1.4;font-weight:950;text-overflow:ellipsis;white-space:nowrap
  }
  .profile-mobile-screen-head__copy p{
    margin-top:2px;overflow:hidden;color:#8b8294;font-size:8.5px;line-height:1.45;font-weight:750;text-overflow:ellipsis;white-space:nowrap
  }
  .profile-mobile-screen-head__badge{
    min-height:25px;display:inline-flex;align-items:center;gap:4px;padding:5px 7px;border-radius:999px;
    color:#6c6377;background:#f4f1f6;font-size:7.25px;line-height:1;font-weight:900;white-space:nowrap
  }
  .profile-mobile-screen-head__badge.is-ok{color:#08734c;background:#eaf9f2}
  .profile-mobile-detail__content{min-width:0}

  /* The sub-screen header is the only title. */
  .profile-mobile-detail__section>.panel__head{display:none !important}
  .profile-mobile-detail--policies>.profile-page-head{display:none !important}

  /* Compact app-like form density. Keep 16px controls to avoid iOS focus zoom. */
  .profile-mobile-detail .input,.profile-mobile-detail .select{
    height:48px !important;min-height:48px !important;border-radius:13px !important;font-size:16px !important
  }
  .profile-mobile-detail .field__label{
    min-height:21px !important;padding-bottom:4px !important;font-size:9.5px !important
  }
  .profile-mobile-detail .field__hint{min-height:16px !important;padding-top:4px !important;font-size:7.5px !important}
  .profile-mobile-detail .profile-file-control{min-height:50px !important;border-radius:13px !important}
  .profile-mobile-detail .profile-entity-save,.profile-mobile-detail .profile-save-row{
    margin-top:10px !important;padding-top:9px !important
  }

  /* Center details are one canonical mobile column. */
  .profile-mobile-detail--center #profile-center .profile-entity-form{
    grid-template-columns:minmax(0,1fr) !important;gap:9px !important
  }
  .profile-mobile-detail--center #profile-center .profile-mobile-field,
  .profile-mobile-detail--center #profile-center .profile-mobile-field.is-wide{
    grid-column:1/-1 !important;min-width:0 !important
  }

  /* Logo editor must remain inside the center card. Reset any legacy positioning
     and let the parent grow around preview + actions. */
  .profile-mobile-detail--center #profile-center{
    display:flow-root !important;
    height:auto !important;
    min-height:0 !important;
    padding-bottom:16px !important;
    overflow:visible !important
  }
  .profile-mobile-detail--center #profile-center .profile-logo-field{
    display:block !important;
    position:static !important;
    float:none !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    margin:0 !important;
    overflow:visible !important
  }
  .profile-mobile-detail--center #profile-center .profile-logo-panel{
    box-sizing:border-box !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    align-items:stretch !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    gap:12px !important;
    padding:12px !important;
    position:static !important;
    inset:auto !important;
    overflow:visible !important
  }
  .profile-mobile-detail--center #profile-center .profile-logo-current,
  .profile-mobile-detail--center #profile-center .profile-logo-empty{
    box-sizing:border-box !important;
    position:static !important;
    float:none !important;
    width:100% !important;
    min-width:0 !important;
    margin:0 !important
  }
  .profile-mobile-detail--center #profile-center .profile-logo-actions{
    box-sizing:border-box !important;
    position:static !important;
    inset:auto !important;
    transform:none !important;
    float:none !important;
    clear:both !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
    margin:0 !important;
    padding:0 !important
  }
  .profile-mobile-detail--center #profile-center .profile-logo-actions .btn,
  .profile-mobile-detail--center #profile-center .profile-logo-actions label{
    box-sizing:border-box !important;
    position:static !important;
    inset:auto !important;
    transform:none !important;
    width:100% !important;
    min-width:0 !important;
    min-height:46px !important;
    margin:0 !important;
    justify-content:center !important
  }

  .profile-mobile-detail--owner #profile-owner .profile-personal-form{grid-template-columns:1fr !important;gap:8px !important}
  .profile-mobile-detail--owner #profile-owner .profile-mobile-field{grid-column:1 !important;min-width:0 !important}

  /* Native mobile workspace management. It has its own DOM and does not restyle
     the desktop profile tree. */
  .profile-mobile-workspace{display:grid;gap:10px}
  .profile-mobile-workspace__create{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .profile-mobile-workspace__create-btn,
  .profile-mobile-workspace__action{
    appearance:none;box-sizing:border-box;border:1px solid #e2d8ee;background:#fff;color:#4e405c;
    font-family:inherit;font-weight:900;cursor:pointer;-webkit-tap-highlight-color:transparent
  }
  .profile-mobile-workspace__create-btn{
    min-height:46px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:9px 10px;
    border-radius:14px;font-size:11px;line-height:1.35
  }
  .profile-mobile-workspace__create-btn--primary{border-color:#7c3aed;background:#7c3aed;color:#fff;box-shadow:0 8px 20px rgba(124,58,237,.16)}
  .profile-mobile-workspace__list{display:grid;gap:10px}
  .profile-mobile-workspace__department{
    overflow:hidden;border:1px solid #e4dcef;border-radius:17px;background:#fff;box-shadow:0 7px 20px rgba(47,35,68,.035)
  }
  .profile-mobile-workspace__department.is-active{border-color:#cfbdf3}
  .profile-mobile-workspace__department-head{
    display:flex;align-items:center;justify-content:space-between;gap:9px;padding:11px 12px;background:#faf8ff;border-bottom:1px solid #eee8f4
  }
  .profile-mobile-workspace__department-copy{min-width:0;display:flex;align-items:center;gap:9px}
  .profile-mobile-workspace__department-icon,
  .profile-mobile-workspace__group-icon{
    flex:0 0 auto;display:grid;place-items:center;color:#6d28d9;background:#eee7ff
  }
  .profile-mobile-workspace__department-icon{width:40px;height:40px;border-radius:12px;font-size:14px}
  .profile-mobile-workspace__department-copy>div{min-width:0;display:grid;gap:1px}
  .profile-mobile-workspace__department-copy small{font-size:8.5px;line-height:1.35;font-weight:800;color:#8a7f95}
  .profile-mobile-workspace__department-copy b{font-size:13px;line-height:1.45;font-weight:950;color:#2a2233;overflow-wrap:anywhere}
  .profile-mobile-workspace__department-copy span{font-size:8.5px;line-height:1.4;font-weight:750;color:#8a7f95}
  .profile-mobile-workspace__department-badge{
    flex:0 0 auto;min-height:26px;display:inline-flex;align-items:center;gap:4px;padding:5px 8px;border-radius:999px;
    background:#eaf9f2;color:#08734c;font-size:8px;line-height:1;font-weight:900;white-space:nowrap
  }
  .profile-mobile-workspace__groups{display:grid;background:#fff}
  .profile-mobile-workspace__group{display:grid;gap:10px;padding:12px;border-bottom:1px solid #f0ebf4;background:#fff}
  .profile-mobile-workspace__group:last-child{border-bottom:0}
  .profile-mobile-workspace__group-head{display:flex;align-items:center;gap:9px;min-width:0}
  .profile-mobile-workspace__group-icon{width:38px;height:38px;border-radius:11px;font-size:13px;color:#315b7d;background:#eef6fb}
  .profile-mobile-workspace__group-copy{min-width:0;display:grid;gap:2px}
  .profile-mobile-workspace__group-copy b{font-size:12px;line-height:1.45;font-weight:950;color:#2a2233;overflow-wrap:anywhere}
  .profile-mobile-workspace__group-copy small{font-size:8.5px;line-height:1.4;font-weight:750;color:#8a7f95}
  .profile-mobile-workspace__actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .profile-mobile-workspace__action,
  .profile-mobile-workspace__status{
    min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 9px;border-radius:11px;
    font-size:9px;line-height:1.3;font-weight:900;text-align:center
  }
  .profile-mobile-workspace__status{background:#eaf9f2;color:#08734c}
  .profile-mobile-workspace__action--soft{border-color:#d9c8f7;background:#f4eeff;color:#6d28d9}
  .profile-mobile-workspace__action--danger{grid-column:1/-1;border-color:#ffc7c2;background:#fff8f7;color:#c0392b}
  .profile-mobile-workspace__sync,
  .profile-mobile-workspace__empty{
    display:flex;align-items:center;justify-content:center;gap:7px;padding:12px;border-radius:12px;background:#f8f6fa;color:#7d7488;
    font-size:9px;line-height:1.6;font-weight:800;text-align:center
  }
  .profile-mobile-workspace__empty--root{min-height:110px;flex-direction:column;border:1px dashed #d9cdea;background:#fff}
  .profile-mobile-workspace__empty--root i{font-size:22px;color:#7c3aed}
  .profile-mobile-workspace__empty--root b{font-size:12px;color:#2a2233}
  .profile-mobile-workspace__empty--root span{font-size:8.5px;color:#8a7f95}

  .profile-mobile-detail--policies .profile-policy-inline{margin:0 !important}
  .profile-mobile-detail--policies .policy-help-strip{
    display:grid !important;grid-template-columns:1fr !important;gap:6px !important;margin:0 0 8px !important
  }
  .profile-mobile-detail--policies .policy-help-strip>span{
    min-height:42px !important;padding:8px 9px !important;border-radius:12px !important;font-size:8px !important;line-height:1.55 !important
  }
}

@media (max-width:420px){
  .profile-mobile-detail--center #profile-center .profile-logo-actions{grid-template-columns:1fr !important}
  .profile-mobile-workspace__create{grid-template-columns:1fr}
}

@media (max-width:390px){
  .profile-mobile-menu-panel{padding:9px;border-radius:18px}
  .profile-mobile-menu__item{
    min-height:70px;grid-template-columns:44px minmax(0,1fr) auto 24px;gap:8px;padding:9px;border-radius:15px
  }
  .profile-mobile-menu__icon{width:44px;height:44px;border-radius:13px;font-size:15px}
  .profile-mobile-screen-head{
    grid-template-columns:36px 40px minmax(0,1fr);min-height:62px;gap:7px;padding:9px;border-radius:17px
  }
  .profile-mobile-screen-head__back{width:36px;height:36px}
  .profile-mobile-screen-head__icon{width:40px;height:40px}
  .profile-mobile-screen-head__badge{grid-column:2/-1;justify-self:start;margin-top:-2px}
  .profile-mobile-workspace__department-head{align-items:flex-start}
  .profile-mobile-workspace__department-badge{font-size:7.5px;padding-inline:7px}
  .profile-mobile-workspace__actions{grid-template-columns:1fr}
  .profile-mobile-workspace__action--danger{grid-column:auto}
}
